mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:57:47 +00:00
LibWeb: Add constructor to Document IDL interface
This commit is contained in:
parent
8c7d1986b8
commit
0f1da7d40c
2 changed files with 12 additions and 1 deletions
|
@ -36,6 +36,7 @@
|
||||||
#include <LibCore/Forward.h>
|
#include <LibCore/Forward.h>
|
||||||
#include <LibJS/Forward.h>
|
#include <LibJS/Forward.h>
|
||||||
#include <LibWeb/Bindings/ScriptExecutionContext.h>
|
#include <LibWeb/Bindings/ScriptExecutionContext.h>
|
||||||
|
#include <LibWeb/Bindings/WindowObject.h>
|
||||||
#include <LibWeb/CSS/StyleResolver.h>
|
#include <LibWeb/CSS/StyleResolver.h>
|
||||||
#include <LibWeb/CSS/StyleSheet.h>
|
#include <LibWeb/CSS/StyleSheet.h>
|
||||||
#include <LibWeb/CSS/StyleSheetList.h>
|
#include <LibWeb/CSS/StyleSheetList.h>
|
||||||
|
@ -60,7 +61,15 @@ class Document
|
||||||
public:
|
public:
|
||||||
using WrapperType = Bindings::DocumentWrapper;
|
using WrapperType = Bindings::DocumentWrapper;
|
||||||
|
|
||||||
static NonnullRefPtr<Document> create(const URL& url = "about:blank") { return adopt(*new Document(url)); }
|
static NonnullRefPtr<Document> create(const URL& url = "about:blank")
|
||||||
|
{
|
||||||
|
return adopt(*new Document(url));
|
||||||
|
}
|
||||||
|
static NonnullRefPtr<Document> create_with_global_object(Bindings::WindowObject&)
|
||||||
|
{
|
||||||
|
return Document::create();
|
||||||
|
}
|
||||||
|
|
||||||
virtual ~Document() override;
|
virtual ~Document() override;
|
||||||
|
|
||||||
bool should_invalidate_styles_on_attribute_changes() const { return m_should_invalidate_styles_on_attribute_changes; }
|
bool should_invalidate_styles_on_attribute_changes() const { return m_should_invalidate_styles_on_attribute_changes; }
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
interface Document : Node {
|
interface Document : Node {
|
||||||
|
|
||||||
|
constructor();
|
||||||
|
|
||||||
readonly attribute DOMImplementation implementation;
|
readonly attribute DOMImplementation implementation;
|
||||||
|
|
||||||
readonly attribute DOMString characterSet;
|
readonly attribute DOMString characterSet;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue