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

LibWeb: Add Exposed attribute and IDL spec links where missing

The intent is to use these to autogenerate prototype declarations for
Window and WorkerGlobalScope classes.

And the spec links are just nice to have :^)
This commit is contained in:
Andrew Kaster 2022-10-07 16:45:09 -06:00 committed by Andreas Kling
parent 0265041d44
commit 67ceba2e6a
123 changed files with 236 additions and 14 deletions

View file

@ -3,6 +3,7 @@
#import <DOM/Node.idl>
// https://dom.spec.whatwg.org/#characterdata
[Exposed=Window]
interface CharacterData : Node {
[LegacyNullToEmptyString] attribute DOMString data;
readonly attribute unsigned long length;

View file

@ -1,5 +1,7 @@
#import <DOM/CharacterData.idl>
// https://dom.spec.whatwg.org/#comment
[Exposed=Window]
interface Comment : CharacterData {
constructor(optional DOMString data = "");
};

View file

@ -1,5 +1,7 @@
#import <DOM/Document.idl>
// https://dom.spec.whatwg.org/#domimplementation
[Exposed=Window]
interface DOMImplementation {
// FIXME: This should return XMLDocument instead of Document.

View file

@ -1,4 +1,5 @@
[]
// https://dom.spec.whatwg.org/#interface-domtokenlist
[Exposed=Window]
interface DOMTokenList {
readonly attribute unsigned long length;
getter DOMString? item(unsigned long index);

View file

@ -20,6 +20,7 @@
#import <HTML/HTMLScriptElement.idl>
// https://dom.spec.whatwg.org/#document
[Exposed=Window]
interface Document : Node {
constructor();

View file

@ -5,6 +5,7 @@
#import <DOM/ParentNode.idl>
// https://dom.spec.whatwg.org/#documentfragment
[Exposed=Window]
interface DocumentFragment : Node {
constructor();

View file

@ -2,6 +2,7 @@
#import <DOM/Node.idl>
// https://dom.spec.whatwg.org/#documenttype
[Exposed=Window]
interface DocumentType : Node {
readonly attribute DOMString name;
readonly attribute DOMString publicId;

View file

@ -21,6 +21,7 @@ dictionary ScrollIntoViewOptions : ScrollOptions {
};
// https://dom.spec.whatwg.org/#element
[Exposed=Window]
interface Element : Node {
readonly attribute DOMString? namespaceURI;
readonly attribute DOMString? prefix;

View file

@ -1,6 +1,7 @@
#import <DOM/EventTarget.idl>
[]
// https://dom.spec.whatwg.org/#event
[Exposed=*]
interface Event {
constructor(DOMString type, optional EventInit eventInitDict = {});

View file

@ -1,5 +1,7 @@
#import <DOM/AbortSignal.idl>
// https://dom.spec.whatwg.org/#eventtarget
[Exposed=*]
interface EventTarget {
undefined addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});

View file

@ -2,6 +2,8 @@
#import <DOM/Element.idl>
#import <DOM/EventTarget.idl>
// https://dom.spec.whatwg.org/#node
[Exposed=Window]
interface Node : EventTarget {
readonly attribute unsigned short nodeType;

View file

@ -1,5 +1,7 @@
#import <DOM/CharacterData.idl>
// https://dom.spec.whatwg.org/#processinginstruction
[Exposed=Window]
interface ProcessingInstruction : CharacterData {
readonly attribute DOMString target;
};

View file

@ -2,6 +2,7 @@
#import <DOM/InnerHTML.idl>
// https://dom.spec.whatwg.org/#shadowroot
[Exposed=Window]
interface ShadowRoot : DocumentFragment {
// FIXME: mode should return a ShadowRootMode
readonly attribute DOMString mode;

View file

@ -1,5 +1,7 @@
#import <DOM/CharacterData.idl>
// https://dom.spec.whatwg.org/#text
[Exposed=Window]
interface Text : CharacterData {
constructor(optional DOMString data = "");