mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:47:35 +00:00
LibWeb: Expose the Window object as Document.defaultView
This should really be a WindowProxy? but since we don't have anything representing that concept yet, let's just expose the Window object directly so document.defaultView.foo works. :^)
This commit is contained in:
parent
7f66a4e3ba
commit
15cfde7233
2 changed files with 4 additions and 0 deletions
|
@ -214,6 +214,8 @@ public:
|
||||||
|
|
||||||
Window& window() { return *m_window; }
|
Window& window() { return *m_window; }
|
||||||
|
|
||||||
|
Window* default_view() { return m_window; }
|
||||||
|
|
||||||
const String& content_type() const { return m_content_type; }
|
const String& content_type() const { return m_content_type; }
|
||||||
void set_content_type(const String& content_type) { m_content_type = content_type; }
|
void set_content_type(const String& content_type) { m_content_type = content_type; }
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@ interface Document : Node {
|
||||||
readonly attribute DOMString inputEncoding;
|
readonly attribute DOMString inputEncoding;
|
||||||
readonly attribute DOMString contentType;
|
readonly attribute DOMString contentType;
|
||||||
|
|
||||||
|
readonly attribute Window? defaultView;
|
||||||
|
|
||||||
Element? getElementById(DOMString id);
|
Element? getElementById(DOMString id);
|
||||||
ArrayFromVector getElementsByName(DOMString name);
|
ArrayFromVector getElementsByName(DOMString name);
|
||||||
ArrayFromVector getElementsByTagName(DOMString tagName);
|
ArrayFromVector getElementsByTagName(DOMString tagName);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue