1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00
serenity/Userland/Libraries/LibWeb/DOM
Andreas Kling a59b1825ce LibWeb: Basic implementation of global event handlers :^)
Document and HTMLElement now inherit from HTML::GlobalEventHandlers
which allows them to support "onfoo" event handler attributes.

These are assignable both via IDL attributes and content attributes.

Event listeners constructed this way get a special "attribute" flag
on them so we know which one to replace if you reassign them.
This also allows them to coexist with EventTarget.addEventListener().

This is all a bit sloppy, but it works decently for a first cut.
The Window object should also inherit GlobalEventHandlers, but since
we don't generate it from IDL, I haven't taken that step here.

Also this would be a lot nicer if we supported IDL mixins.
2021-02-03 23:03:05 +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 LibWeb: Move main thread JavaScript VM to its own file 2021-02-03 10:45:39 +01:00
Document.h LibWeb: Basic implementation of global event handlers :^) 2021-02-03 23:03:05 +01:00
Document.idl LibWeb: Basic implementation of global event handlers :^) 2021-02-03 23:03:05 +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 LibWeb: Parse "display: flex" and create BlockBox layout nodes for them 2021-01-18 20:20:00 +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: Add missing headers 2021-01-22 21:49:54 +01:00
EventListener.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
EventListener.h LibWeb: Basic implementation of global event handlers :^) 2021-02-03 23:03:05 +01:00
EventTarget.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
EventTarget.h LibWeb: Basic implementation of global event handlers :^) 2021-02-03 23:03:05 +01:00
EventTarget.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Node.cpp LibWeb: Add simple implementation of Node.removeChild() 2021-01-28 08:58:22 +01:00
Node.h LibWeb: Add simple implementation of Node.removeChild() 2021-01-28 08:58:22 +01:00
Node.idl LibWeb: Add simple implementation of Node.removeChild() 2021-01-28 08:58:22 +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
Range.idl LibWeb: Generate JS bindings for Range from IDL :^) 2021-01-23 17:59:42 +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: Add missing headers 2021-01-22 21:49:54 +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