1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:27:44 +00:00
serenity/Userland/Libraries/LibWeb
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
..
Bindings LibWeb: Make the Window object "inherit" from EventTarget :^) 2021-01-18 12:18:29 +01:00
CodeGenerators LibWeb: Make the Window object "inherit" from EventTarget :^) 2021-01-18 12:18:29 +01:00
CSS Everywhere: Replace a bundle of dbg with dbgln. 2021-01-16 11:54:35 +01:00
DOM LibWeb: Make the Window object "inherit" from EventTarget :^) 2021-01-18 12:18:29 +01:00
DumpLayoutTree Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
HighResolutionTime LibWeb: Make the Window object "inherit" from EventTarget :^) 2021-01-18 12:18:29 +01:00
HTML LibWeb: Move HTML::SubmitEvent functions out of line 2021-01-18 12:18:29 +01:00
Layout LibWeb: Add fast_is<T>() for some DOM and layout node subclasses 2021-01-17 14:42:50 +01:00
Loader Everywhere: Remove a bunch of <AK/SharedBuffer.h> includes 2021-01-16 11:26:53 +01:00
Page Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Painting Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Scripts Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
SVG Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Tests Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
UIEvents Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
CMakeLists.txt LibWeb: Generate constructor and prototype classes for IDL interfaces 2021-01-18 12:18:29 +01:00
DOMTreeModel.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
DOMTreeModel.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Dump.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Dump.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
FontCache.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
FontCache.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Forward.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
InProcessWebView.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
InProcessWebView.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LayoutTreeModel.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LayoutTreeModel.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Namespace.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Namespace.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Origin.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
OutOfProcessWebView.cpp Everywhere: Remove more <AK/SharedBuffer.h> includes 2021-01-17 00:04:42 +01:00
OutOfProcessWebView.h LibWeb+WebContent: Use anonymous files for OOPWV backing stores 2021-01-16 23:21:52 +01:00
QualifiedName.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
StylePropertiesModel.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
StylePropertiesModel.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
TreeNode.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
URLEncoder.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
URLEncoder.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
WebContentClient.cpp LibWeb+WebContent: Use anonymous files for OOPWV backing stores 2021-01-16 23:21:52 +01:00
WebContentClient.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
WebViewHooks.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00