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:
parent
0265041d44
commit
67ceba2e6a
123 changed files with 236 additions and 14 deletions
|
@ -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;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#import <DOM/CharacterData.idl>
|
||||
|
||||
// https://dom.spec.whatwg.org/#comment
|
||||
[Exposed=Window]
|
||||
interface Comment : CharacterData {
|
||||
constructor(optional DOMString data = "");
|
||||
};
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#import <HTML/HTMLScriptElement.idl>
|
||||
|
||||
// https://dom.spec.whatwg.org/#document
|
||||
[Exposed=Window]
|
||||
interface Document : Node {
|
||||
constructor();
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#import <DOM/ParentNode.idl>
|
||||
|
||||
// https://dom.spec.whatwg.org/#documentfragment
|
||||
[Exposed=Window]
|
||||
interface DocumentFragment : Node {
|
||||
constructor();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#import <DOM/EventTarget.idl>
|
||||
|
||||
[]
|
||||
// https://dom.spec.whatwg.org/#event
|
||||
[Exposed=*]
|
||||
interface Event {
|
||||
|
||||
constructor(DOMString type, optional EventInit eventInitDict = {});
|
||||
|
|
|
@ -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 = {});
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#import <DOM/CharacterData.idl>
|
||||
|
||||
// https://dom.spec.whatwg.org/#processinginstruction
|
||||
[Exposed=Window]
|
||||
interface ProcessingInstruction : CharacterData {
|
||||
readonly attribute DOMString target;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#import <DOM/CharacterData.idl>
|
||||
|
||||
// https://dom.spec.whatwg.org/#text
|
||||
[Exposed=Window]
|
||||
interface Text : CharacterData {
|
||||
constructor(optional DOMString data = "");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue