mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 02:48:11 +00:00
LibWeb: Start generating code for the Window object from IDL :^)
This commit is contained in:
parent
e13f89c9eb
commit
c130fd6993
3 changed files with 6 additions and 2 deletions
|
@ -1122,6 +1122,8 @@ WebIDL::ExceptionOr<void> Window::initialize_web_interfaces(Badge<WindowEnvironm
|
|||
m_location = MUST_OR_THROW_OOM(heap().allocate<Location>(realm, realm));
|
||||
m_navigator = MUST_OR_THROW_OOM(heap().allocate<Navigator>(realm, realm));
|
||||
|
||||
MUST_OR_THROW_OOM(Bindings::WindowGlobalMixin::initialize(realm, *this));
|
||||
|
||||
// FIXME: These should be native accessors, not properties
|
||||
define_native_accessor(realm, "top", top_getter, nullptr, JS::Attribute::Enumerable);
|
||||
define_native_accessor(realm, "window", window_getter, {}, JS::Attribute::Enumerable);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <LibWeb/HTML/Plugin.h>
|
||||
#include <LibWeb/HTML/Scripting/ImportMap.h>
|
||||
#include <LibWeb/HTML/WindowEventHandlers.h>
|
||||
#include <LibWeb/Bindings/WindowGlobalMixin.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -34,7 +35,8 @@ using TimerHandler = Variant<JS::Handle<WebIDL::CallbackType>, DeprecatedString>
|
|||
class Window final
|
||||
: public DOM::EventTarget
|
||||
, public HTML::GlobalEventHandlers
|
||||
, public HTML::WindowEventHandlers {
|
||||
, public HTML::WindowEventHandlers
|
||||
, public Bindings::WindowGlobalMixin {
|
||||
WEB_PLATFORM_OBJECT(Window, DOM::EventTarget);
|
||||
|
||||
public:
|
||||
|
|
|
@ -163,7 +163,7 @@ libweb_js_bindings(HTML/PromiseRejectionEvent)
|
|||
libweb_js_bindings(HTML/Storage)
|
||||
libweb_js_bindings(HTML/SubmitEvent)
|
||||
libweb_js_bindings(HTML/TextMetrics)
|
||||
libweb_js_bindings(HTML/Window)
|
||||
libweb_js_bindings(HTML/Window GLOBAL)
|
||||
libweb_js_bindings(HTML/Worker)
|
||||
libweb_js_bindings(HTML/WorkerGlobalScope)
|
||||
libweb_js_bindings(HTML/WorkerLocation)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue