1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:17:35 +00:00

LibWeb: Add a bunch of missing CEReactions

This is almost guaranteed not to be all CEReactions we need to add, but
this puts us in a much better situation.
This commit is contained in:
Luke Wilde 2023-03-01 01:45:18 +00:00 committed by Andreas Kling
parent 034aaf3f51
commit 32e27bc7fa
61 changed files with 256 additions and 253 deletions

View file

@ -74,8 +74,8 @@ interface Document : Node {
// FIXME: Should return an HTMLAllCollection
readonly attribute HTMLCollection all;
Element createElement(DOMString tagName, optional (DOMString or ElementCreationOptions) options = {});
Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (DOMString or ElementCreationOptions) options = {});
[CEReactions, NewObject] Element createElement(DOMString tagName, optional (DOMString or ElementCreationOptions) options = {});
[CEReactions, NewObject] Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (DOMString or ElementCreationOptions) options = {});
DocumentFragment createDocumentFragment();
Text createTextNode(DOMString data);
Comment createComment(DOMString data);
@ -96,13 +96,13 @@ interface Document : Node {
readonly attribute DocumentType? doctype;
readonly attribute Element? documentElement;
attribute HTMLElement? body;
[CEReactions] attribute HTMLElement? body;
readonly attribute HTMLHeadElement? head;
readonly attribute HTMLScriptElement? currentScript;
readonly attribute DOMString readyState;
attribute DOMString title;
[CEReactions] attribute DOMString title;
boolean queryCommandSupported(DOMString commandId);
readonly boolean hidden;

View file

@ -27,12 +27,12 @@ interface Element : Node {
readonly attribute DOMString tagName;
DOMString? getAttribute(DOMString qualifiedName);
undefined setAttribute(DOMString qualifiedName, DOMString value);
[CEReactions] undefined setAttribute(DOMString qualifiedName, DOMString value);
[CEReactions] undefined setAttributeNS(DOMString? namespace , DOMString qualifiedName , DOMString value);
[CEReactions] Attr? setAttributeNode(Attr attr);
[CEReactions] Attr? setAttributeNodeNS(Attr attr);
undefined removeAttribute(DOMString qualifiedName);
[CEReactions] undefined removeAttribute(DOMString qualifiedName);
[CEReactions] boolean toggleAttribute(DOMString qualifiedName, optional boolean force);
boolean hasAttribute(DOMString qualifiedName);
boolean hasAttributes();
@ -45,8 +45,8 @@ interface Element : Node {
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
HTMLCollection getElementsByClassName(DOMString className);
[Reflect] attribute DOMString id;
[Reflect=class] attribute DOMString className;
[Reflect, CEReactions] attribute DOMString id;
[Reflect=class, CEReactions] attribute DOMString className;
[SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
ShadowRoot attachShadow(ShadowRootInit init);

View file

@ -27,13 +27,13 @@ interface Node : EventTarget {
// FIXME: [LegacyNullToEmptyString] is not allowed on nullable types as per the Web IDL spec.
// However, we only apply it to setters, so this works as a stop gap.
// Replace this with something like a special cased [LegacyNullToEmptyString].
[LegacyNullToEmptyString] attribute DOMString? textContent;
[LegacyNullToEmptyString, CEReactions] attribute DOMString? textContent;
Node appendChild(Node node);
[ImplementedAs=pre_insert] Node insertBefore(Node node, Node? child);
Node replaceChild(Node node, Node child);
[ImplementedAs=pre_remove] Node removeChild(Node child);
[ImplementedAs=clone_node_binding] Node cloneNode(optional boolean deep = false);
[CEReactions] Node appendChild(Node node);
[ImplementedAs=pre_insert, CEReactions] Node insertBefore(Node node, Node? child);
[CEReactions] Node replaceChild(Node node, Node child);
[ImplementedAs=pre_remove, CEReactions] Node removeChild(Node child);
[ImplementedAs=clone_node_binding, CEReactions] Node cloneNode(optional boolean deep = false);
boolean contains(Node? other);
boolean isEqualNode(Node? otherNode);
boolean isSameNode(Node? otherNode);