1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00
serenity/Userland/Libraries/LibWeb/DOM
Andreas Kling 0639e77898 LibWeb: Make the Window object "inherit" from EventTarget :^)
Since Web::Bindings::WindowObject inherits from JS::GlobalObject, it
cannot also inherit from Web::Bindings::EventTargetWrapper.

However, that's not actually necessary. Instead, we simply set the
Window object's prototype to the EventTargetPrototype, and add a little
extra branch in the impl_from() function that turns the JS "this" value
into a DOM::EventTarget*.

With this, you can now call window.addEventListener()! Very cool :^)

Fixes #4758.
2021-01-18 12:18:29 +01:00
..
Attribute.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
CharacterData.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
CharacterData.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
CharacterData.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Comment.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Comment.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Comment.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Document.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Document.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Document.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
DocumentFragment.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
DocumentFragment.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
DocumentFragment.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
DocumentType.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
DocumentType.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
DocumentType.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
DOMImplementation.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
DOMImplementation.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
DOMImplementation.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Element.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Element.h LibWeb: Add fast_is<T>() for some DOM and layout node subclasses 2021-01-17 14:42:50 +01:00
Element.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
ElementFactory.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
ElementFactory.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Event.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Event.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Event.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
EventDispatcher.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
EventDispatcher.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
EventListener.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
EventListener.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
EventTarget.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
EventTarget.h LibWeb: Make the Window object "inherit" from EventTarget :^) 2021-01-18 12:18:29 +01:00
EventTarget.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Node.cpp LibWeb: Make the Window object "inherit" from EventTarget :^) 2021-01-18 12:18:29 +01:00
Node.h LibWeb: Make the Window object "inherit" from EventTarget :^) 2021-01-18 12:18:29 +01:00
Node.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
NonDocumentTypeChildNode.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
NonElementParentNode.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
ParentNode.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
ParentNode.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Position.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Position.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Range.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Range.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
ShadowRoot.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
ShadowRoot.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
ShadowRoot.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Text.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Text.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Text.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Timer.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Timer.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Window.cpp LibWeb: Make the Window object "inherit" from EventTarget :^) 2021-01-18 12:18:29 +01:00
Window.h LibWeb: Make the Window object "inherit" from EventTarget :^) 2021-01-18 12:18:29 +01:00
XMLHttpRequest.cpp LibWeb: Make the Window object "inherit" from EventTarget :^) 2021-01-18 12:18:29 +01:00
XMLHttpRequest.h LibWeb: Make the Window object "inherit" from EventTarget :^) 2021-01-18 12:18:29 +01:00