-
Notifications
You must be signed in to change notification settings - Fork 440
Add HTML webappapi types #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"origin": "Returns the global object's origin, serialized as string.", | ||
"btoa": "Takes the input data, in the form of a Unicode string containing only characters in the range\nU+0000 to U+00FF, each representing a binary byte with values 0x00 to 0xFF respectively, and\nconverts it to its base64 representation, which it returns.\nThrows an \"InvalidCharacterError\" DOMException\nexception if the input string contains any out-of-range characters.", | ||
"atob": "Takes the input data, in the form of a Unicode string containing base64-encoded binary data,\ndecodes it, and returns a string consisting of characters in the range U+0000 to U+00FF, each\nrepresenting a binary byte with values 0x00 to 0xFF respectively, corresponding to that binary\ndata.\nThrows an \"InvalidCharacterError\" DOMException if the\ninput string is not valid base64 data." | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
[Constructor(DOMString type, optional ErrorEventInit eventInitDict), Exposed=(Window,Worker)] | ||
interface ErrorEvent : Event { | ||
readonly attribute DOMString message; | ||
readonly attribute USVString filename; | ||
readonly attribute unsigned long lineno; | ||
readonly attribute unsigned long colno; | ||
readonly attribute any error; | ||
}; | ||
|
||
dictionary ErrorEventInit : EventInit { | ||
DOMString message = ""; | ||
USVString filename = ""; | ||
unsigned long lineno = 0; | ||
unsigned long colno = 0; | ||
any error = null; | ||
}; | ||
|
||
[Constructor(DOMString type, PromiseRejectionEventInit eventInitDict), Exposed=(Window,Worker)] | ||
interface PromiseRejectionEvent : Event { | ||
readonly attribute Promise<any> promise; | ||
readonly attribute any reason; | ||
}; | ||
|
||
dictionary PromiseRejectionEventInit : EventInit { | ||
required Promise<any> promise; | ||
any reason; | ||
}; | ||
|
||
[TreatNonObjectAsNull] | ||
callback EventHandlerNonNull = any (Event event); | ||
typedef EventHandlerNonNull? EventHandler; | ||
|
||
[TreatNonObjectAsNull] | ||
callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long colno, optional any error); | ||
typedef OnErrorEventHandlerNonNull? OnErrorEventHandler; | ||
|
||
[TreatNonObjectAsNull] | ||
callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event); | ||
typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler; | ||
|
||
interface mixin GlobalEventHandlers { | ||
attribute EventHandler onabort; | ||
attribute EventHandler onauxclick; | ||
attribute EventHandler onblur; | ||
attribute EventHandler oncancel; | ||
attribute EventHandler oncanplay; | ||
attribute EventHandler oncanplaythrough; | ||
attribute EventHandler onchange; | ||
attribute EventHandler onclick; | ||
attribute EventHandler onclose; | ||
attribute EventHandler oncontextmenu; | ||
attribute EventHandler oncuechange; | ||
attribute EventHandler ondblclick; | ||
attribute EventHandler ondrag; | ||
attribute EventHandler ondragend; | ||
attribute EventHandler ondragenter; | ||
attribute EventHandler ondragexit; | ||
attribute EventHandler ondragleave; | ||
attribute EventHandler ondragover; | ||
attribute EventHandler ondragstart; | ||
attribute EventHandler ondrop; | ||
attribute EventHandler ondurationchange; | ||
attribute EventHandler onemptied; | ||
attribute EventHandler onended; | ||
attribute OnErrorEventHandler onerror; | ||
attribute EventHandler onfocus; | ||
attribute EventHandler oninput; | ||
attribute EventHandler oninvalid; | ||
attribute EventHandler onkeydown; | ||
attribute EventHandler onkeypress; | ||
attribute EventHandler onkeyup; | ||
attribute EventHandler onload; | ||
attribute EventHandler onloadeddata; | ||
attribute EventHandler onloadedmetadata; | ||
attribute EventHandler onloadend; | ||
attribute EventHandler onloadstart; | ||
attribute EventHandler onmousedown; | ||
[LenientThis] attribute EventHandler onmouseenter; | ||
[LenientThis] attribute EventHandler onmouseleave; | ||
attribute EventHandler onmousemove; | ||
attribute EventHandler onmouseout; | ||
attribute EventHandler onmouseover; | ||
attribute EventHandler onmouseup; | ||
attribute EventHandler onwheel; | ||
attribute EventHandler onpause; | ||
attribute EventHandler onplay; | ||
attribute EventHandler onplaying; | ||
attribute EventHandler onprogress; | ||
attribute EventHandler onratechange; | ||
attribute EventHandler onreset; | ||
attribute EventHandler onresize; | ||
attribute EventHandler onscroll; | ||
attribute EventHandler onsecuritypolicyviolation; | ||
attribute EventHandler onseeked; | ||
attribute EventHandler onseeking; | ||
attribute EventHandler onselect; | ||
attribute EventHandler onstalled; | ||
attribute EventHandler onsubmit; | ||
attribute EventHandler onsuspend; | ||
attribute EventHandler ontimeupdate; | ||
attribute EventHandler ontoggle; | ||
attribute EventHandler onvolumechange; | ||
attribute EventHandler onwaiting; | ||
}; | ||
|
||
interface mixin WindowEventHandlers { | ||
attribute EventHandler onafterprint; | ||
attribute EventHandler onbeforeprint; | ||
attribute OnBeforeUnloadEventHandler onbeforeunload; | ||
attribute EventHandler onhashchange; | ||
attribute EventHandler onlanguagechange; | ||
attribute EventHandler onmessage; | ||
attribute EventHandler onmessageerror; | ||
attribute EventHandler onoffline; | ||
attribute EventHandler ononline; | ||
attribute EventHandler onpagehide; | ||
attribute EventHandler onpageshow; | ||
attribute EventHandler onpopstate; | ||
attribute EventHandler onrejectionhandled; | ||
attribute EventHandler onstorage; | ||
attribute EventHandler onunhandledrejection; | ||
attribute EventHandler onunload; | ||
}; | ||
|
||
interface mixin DocumentAndElementEventHandlers { | ||
attribute EventHandler oncopy; | ||
attribute EventHandler oncut; | ||
attribute EventHandler onpaste; | ||
}; | ||
|
||
typedef (DOMString or Function) TimerHandler; | ||
|
||
interface mixin WindowOrWorkerGlobalScope { | ||
[Replaceable] readonly attribute USVString origin; | ||
|
||
// base64 utility methods | ||
DOMString btoa(DOMString data); | ||
ByteString atob(DOMString data); | ||
|
||
// timers | ||
long setTimeout(TimerHandler handler, optional long timeout = 0, any... arguments); | ||
void clearTimeout(optional long handle = 0); | ||
long setInterval(TimerHandler handler, optional long timeout = 0, any... arguments); | ||
void clearInterval(optional long handle = 0); | ||
|
||
// ImageBitmap | ||
Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options); | ||
Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options); | ||
}; | ||
Window includes WindowOrWorkerGlobalScope; | ||
WorkerGlobalScope includes WindowOrWorkerGlobalScope; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these can be removed now