Rearrange kotlin-stdlib-js library sources
Move kotlin.* api inside kotlin directory. Update copyright paths.
This commit is contained in:
committed by
Stanislav Erokhin
parent
57e47d1830
commit
00b23a0fe9
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,229 @@
|
||||
namespace org.w3c.dom.css;
|
||||
|
||||
/* written by CSS3 spec */
|
||||
partial interface CSSStyleDeclaration {
|
||||
attribute String alignContent;
|
||||
attribute String alignItems;
|
||||
attribute String alignSelf;
|
||||
attribute String animation;
|
||||
attribute String animationDelay;
|
||||
attribute String animationDirection;
|
||||
attribute String animationDuration;
|
||||
attribute String animationFillMode;
|
||||
attribute String animationIterationCount;
|
||||
attribute String animationName;
|
||||
attribute String animationPlayState;
|
||||
attribute String animationTimingFunction;
|
||||
attribute String backfaceVisibility;
|
||||
attribute String background;
|
||||
attribute String backgroundAttachment;
|
||||
attribute String backgroundClip;
|
||||
attribute String backgroundColor;
|
||||
attribute String backgroundImage;
|
||||
attribute String backgroundOrigin;
|
||||
attribute String backgroundPosition;
|
||||
attribute String backgroundRepeat;
|
||||
attribute String backgroundSize;
|
||||
attribute String border;
|
||||
attribute String borderBottom;
|
||||
attribute String borderBottomColor;
|
||||
attribute String borderBottomLeftRadius;
|
||||
attribute String borderBottomRightRadius;
|
||||
attribute String borderBottomStyle;
|
||||
attribute String borderBottomWidth;
|
||||
attribute String borderCollapse;
|
||||
attribute String borderColor;
|
||||
attribute String borderImage;
|
||||
attribute String borderImageOutset;
|
||||
attribute String borderImageRepeat;
|
||||
attribute String borderImageSlice;
|
||||
attribute String borderImageSource;
|
||||
attribute String borderImageWidth;
|
||||
attribute String borderLeft;
|
||||
attribute String borderLeftColor;
|
||||
attribute String borderLeftStyle;
|
||||
attribute String borderLeftWidth;
|
||||
attribute String borderRadius;
|
||||
attribute String borderRight;
|
||||
attribute String borderRightColor;
|
||||
attribute String borderRightStyle;
|
||||
attribute String borderRightWidth;
|
||||
attribute String borderSpacing;
|
||||
attribute String borderStyle;
|
||||
attribute String borderTop;
|
||||
attribute String borderTopColor;
|
||||
attribute String borderTopLeftRadius;
|
||||
attribute String borderTopRightRadius;
|
||||
attribute String borderTopStyle;
|
||||
attribute String borderTopWidth;
|
||||
attribute String borderWidth;
|
||||
attribute String bottom;
|
||||
attribute String boxDecorationBreak;
|
||||
attribute String boxShadow;
|
||||
attribute String boxSizing;
|
||||
attribute String breakAfter;
|
||||
attribute String breakBefore;
|
||||
attribute String breakInside;
|
||||
attribute String captionSide;
|
||||
attribute String clear;
|
||||
attribute String clip;
|
||||
attribute String color;
|
||||
attribute String columnCount;
|
||||
attribute String columnFill;
|
||||
attribute String columnGap;
|
||||
attribute String columnRule;
|
||||
attribute String columnRuleColor;
|
||||
attribute String columnRuleStyle;
|
||||
attribute String columnRuleWidth;
|
||||
attribute String columnSpan;
|
||||
attribute String columnWidth;
|
||||
attribute String columns;
|
||||
attribute String content;
|
||||
attribute String counterIncrement;
|
||||
attribute String counterReset;
|
||||
attribute String cursor;
|
||||
attribute String direction;
|
||||
attribute String display;
|
||||
attribute String emptyCells;
|
||||
attribute String filter;
|
||||
attribute String flex;
|
||||
attribute String flexBasis;
|
||||
attribute String flexDirection;
|
||||
attribute String flexFlow;
|
||||
attribute String flexGrow;
|
||||
attribute String flexShrink;
|
||||
attribute String flexWrap;
|
||||
attribute String cssFloat;
|
||||
attribute String font;
|
||||
attribute String fontFamily;
|
||||
attribute String fontFeatureSettings;
|
||||
attribute String fontKerning;
|
||||
attribute String fontLanguageOverride;
|
||||
attribute String fontSize;
|
||||
attribute String fontSizeAdjust;
|
||||
attribute String fontStretch;
|
||||
attribute String fontStyle;
|
||||
attribute String fontSynthesis;
|
||||
attribute String fontVariant;
|
||||
attribute String fontVariantAlternates;
|
||||
attribute String fontVariantCaps;
|
||||
attribute String fontVariantEastAsian;
|
||||
attribute String fontVariantLigatures;
|
||||
attribute String fontVariantNumeric;
|
||||
attribute String fontVariantPosition;
|
||||
attribute String fontWeight;
|
||||
attribute String hangingPunctuation;
|
||||
attribute String height;
|
||||
attribute String hyphens;
|
||||
attribute String imageOrientation;
|
||||
attribute String imageRendering;
|
||||
attribute String imageResolution;
|
||||
attribute String imeMode;
|
||||
attribute String justifyContent;
|
||||
attribute String left;
|
||||
attribute String letterSpacing;
|
||||
attribute String lineBreak;
|
||||
attribute String lineHeight;
|
||||
attribute String listStyle;
|
||||
attribute String listStyleImage;
|
||||
attribute String listStylePosition;
|
||||
attribute String listStyleType;
|
||||
attribute String margin;
|
||||
attribute String marginBottom;
|
||||
attribute String marginLeft;
|
||||
attribute String marginRight;
|
||||
attribute String marginTop;
|
||||
attribute String mark;
|
||||
attribute String markAfter;
|
||||
attribute String markBefore;
|
||||
attribute String marks;
|
||||
attribute String marqueeDirection;
|
||||
attribute String marqueePlayCount;
|
||||
attribute String marqueeSpeed;
|
||||
attribute String marqueeStyle;
|
||||
attribute String mask;
|
||||
attribute String maskType;
|
||||
attribute String maxHeight;
|
||||
attribute String maxWidth;
|
||||
attribute String minHeight;
|
||||
attribute String minWidth;
|
||||
attribute String navDown;
|
||||
attribute String navIndex;
|
||||
attribute String navLeft;
|
||||
attribute String navRight;
|
||||
attribute String navUp;
|
||||
attribute String objectFit;
|
||||
attribute String objectPosition;
|
||||
attribute String opacity;
|
||||
attribute String order;
|
||||
attribute String orphans;
|
||||
attribute String outline;
|
||||
attribute String outlineColor;
|
||||
attribute String outlineOffset;
|
||||
attribute String outlineStyle;
|
||||
attribute String outlineWidth;
|
||||
attribute String overflowWrap;
|
||||
attribute String overflowX;
|
||||
attribute String overflowY;
|
||||
attribute String padding;
|
||||
attribute String paddingBottom;
|
||||
attribute String paddingLeft;
|
||||
attribute String paddingRight;
|
||||
attribute String paddingTop;
|
||||
attribute String pageBreakAfter;
|
||||
attribute String pageBreakBefore;
|
||||
attribute String pageBreakInside;
|
||||
attribute String perspective;
|
||||
attribute String perspectiveOrigin;
|
||||
attribute String phonemes;
|
||||
attribute String position;
|
||||
attribute String quotes;
|
||||
attribute String resize;
|
||||
attribute String rest;
|
||||
attribute String restAfter;
|
||||
attribute String restBefore;
|
||||
attribute String right;
|
||||
attribute String tabSize;
|
||||
attribute String tableLayout;
|
||||
attribute String textAlign;
|
||||
attribute String textAlignLast;
|
||||
attribute String textCombineUpright;
|
||||
attribute String textDecoration;
|
||||
attribute String textDecorationColor;
|
||||
attribute String textDecorationLine;
|
||||
attribute String textDecorationStyle;
|
||||
attribute String textIndent;
|
||||
attribute String textJustify;
|
||||
attribute String textOrientation;
|
||||
attribute String textOverflow;
|
||||
attribute String textShadow;
|
||||
attribute String textTransform;
|
||||
attribute String textUnderlinePosition;
|
||||
attribute String top;
|
||||
attribute String transform;
|
||||
attribute String transformOrigin;
|
||||
attribute String transformStyle;
|
||||
attribute String transition;
|
||||
attribute String transitionDelay;
|
||||
attribute String transitionDuration;
|
||||
attribute String transitionProperty;
|
||||
attribute String transitionTimingFunction;
|
||||
attribute String unicodeBidi;
|
||||
attribute String verticalAlign;
|
||||
attribute String visibility;
|
||||
attribute String voiceBalance;
|
||||
attribute String voiceDuration;
|
||||
attribute String voicePitch;
|
||||
attribute String voicePitchRange;
|
||||
attribute String voiceRate;
|
||||
attribute String voiceStress;
|
||||
attribute String voiceVolume;
|
||||
attribute String whiteSpace;
|
||||
attribute String widows;
|
||||
attribute String width;
|
||||
attribute String wordBreak;
|
||||
attribute String wordSpacing;
|
||||
attribute String wordWrap;
|
||||
attribute String writingMode;
|
||||
attribute String zIndex;
|
||||
};
|
||||
@@ -0,0 +1,258 @@
|
||||
namespace org.w3c.dom.css;
|
||||
|
||||
|
||||
// Downloaded from https://drafts.csswg.org/cssom/
|
||||
[ArrayClass]
|
||||
interface MediaList {
|
||||
[TreatNullAs=EmptyString] stringifier attribute DOMString mediaText;
|
||||
readonly attribute unsigned long length;
|
||||
getter DOMString? item(unsigned long index);
|
||||
void appendMedium(DOMString medium);
|
||||
void deleteMedium(DOMString medium);
|
||||
};
|
||||
interface StyleSheet {
|
||||
readonly attribute DOMString type;
|
||||
readonly attribute DOMString? href;
|
||||
readonly attribute (Element or ProcessingInstruction)? ownerNode;
|
||||
readonly attribute StyleSheet? parentStyleSheet;
|
||||
readonly attribute DOMString? title;
|
||||
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;
|
||||
attribute boolean disabled;
|
||||
};
|
||||
interface CSSStyleSheet : StyleSheet {
|
||||
readonly attribute CSSRule? ownerRule;
|
||||
[SameObject] readonly attribute CSSRuleList cssRules;
|
||||
unsigned long insertRule(DOMString rule, unsigned long index);
|
||||
void deleteRule(unsigned long index);
|
||||
};
|
||||
[ArrayClass]
|
||||
interface StyleSheetList {
|
||||
getter StyleSheet? item(unsigned long index);
|
||||
readonly attribute unsigned long length;
|
||||
};
|
||||
partial interface Document {
|
||||
[SameObject] readonly attribute StyleSheetList styleSheets;
|
||||
};
|
||||
[NoInterfaceObject]
|
||||
interface LinkStyle {
|
||||
readonly attribute StyleSheet? sheet;
|
||||
};
|
||||
ProcessingInstruction implements LinkStyle;
|
||||
[ArrayClass]
|
||||
interface CSSRuleList {
|
||||
getter CSSRule? item(unsigned long index);
|
||||
readonly attribute unsigned long length;
|
||||
};
|
||||
interface CSSRule {
|
||||
const unsigned short STYLE_RULE = 1;
|
||||
const unsigned short CHARSET_RULE = 2; // historical
|
||||
const unsigned short IMPORT_RULE = 3;
|
||||
const unsigned short MEDIA_RULE = 4;
|
||||
const unsigned short FONT_FACE_RULE = 5;
|
||||
const unsigned short PAGE_RULE = 6;
|
||||
const unsigned short MARGIN_RULE = 9;
|
||||
const unsigned short NAMESPACE_RULE = 10;
|
||||
readonly attribute unsigned short type;
|
||||
attribute DOMString cssText;
|
||||
readonly attribute CSSRule? parentRule;
|
||||
readonly attribute CSSStyleSheet? parentStyleSheet;
|
||||
};
|
||||
interface CSSStyleRule : CSSRule {
|
||||
attribute DOMString selectorText;
|
||||
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
|
||||
};
|
||||
interface CSSImportRule : CSSRule {
|
||||
readonly attribute DOMString href;
|
||||
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;
|
||||
[SameObject] readonly attribute CSSStyleSheet styleSheet;
|
||||
};
|
||||
interface CSSGroupingRule : CSSRule {
|
||||
[SameObject] readonly attribute CSSRuleList cssRules;
|
||||
unsigned long insertRule(DOMString rule, unsigned long index);
|
||||
void deleteRule(unsigned long index);
|
||||
};
|
||||
interface CSSMediaRule : CSSGroupingRule {
|
||||
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;
|
||||
};
|
||||
interface CSSPageRule : CSSGroupingRule {
|
||||
attribute DOMString selectorText;
|
||||
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
|
||||
};
|
||||
interface CSSMarginRule : CSSRule {
|
||||
readonly attribute DOMString name;
|
||||
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
|
||||
};
|
||||
interface CSSNamespaceRule : CSSRule {
|
||||
readonly attribute DOMString namespaceURI;
|
||||
readonly attribute DOMString prefix;
|
||||
};
|
||||
interface CSSStyleDeclaration {
|
||||
[CEReactions] attribute DOMString cssText;
|
||||
readonly attribute unsigned long length;
|
||||
getter DOMString item(unsigned long index);
|
||||
DOMString getPropertyValue(DOMString property);
|
||||
DOMString getPropertyPriority(DOMString property);
|
||||
[CEReactions] void setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value, [TreatNullAs=EmptyString] optional DOMString priority = "");
|
||||
[CEReactions] void setPropertyValue(DOMString property, [TreatNullAs=EmptyString] DOMString value);
|
||||
[CEReactions] void setPropertyPriority(DOMString property, [TreatNullAs=EmptyString] DOMString priority);
|
||||
[CEReactions] DOMString removeProperty(DOMString property);
|
||||
readonly attribute CSSRule? parentRule;
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString cssFloat;
|
||||
};
|
||||
partial interface CSSStyleDeclaration {
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString _dashed_attribute;
|
||||
};
|
||||
[NoInterfaceObject]
|
||||
interface ElementCSSInlineStyle {
|
||||
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
|
||||
};
|
||||
HTMLElement implements ElementCSSInlineStyle;
|
||||
SVGElement implements ElementCSSInlineStyle;
|
||||
partial interface Window {
|
||||
[NewObject] CSSStyleDeclaration getComputedStyle(Element elt, optional DOMString? pseudoElt);
|
||||
};
|
||||
interface CSS {
|
||||
static DOMString escape(DOMString ident);
|
||||
};
|
||||
[ArrayClass]
|
||||
interface MediaList {
|
||||
[TreatNullAs=EmptyString] stringifier attribute DOMString mediaText;
|
||||
readonly attribute unsigned long length;
|
||||
getter DOMString? item(unsigned long index);
|
||||
void appendMedium(DOMString medium);
|
||||
void deleteMedium(DOMString medium);
|
||||
};
|
||||
|
||||
interface StyleSheet {
|
||||
readonly attribute DOMString type;
|
||||
readonly attribute DOMString? href;
|
||||
readonly attribute (Element or ProcessingInstruction)? ownerNode;
|
||||
readonly attribute StyleSheet? parentStyleSheet;
|
||||
readonly attribute DOMString? title;
|
||||
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;
|
||||
attribute boolean disabled;
|
||||
};
|
||||
|
||||
interface CSSStyleSheet : StyleSheet {
|
||||
readonly attribute CSSRule? ownerRule;
|
||||
[SameObject] readonly attribute CSSRuleList cssRules;
|
||||
unsigned long insertRule(DOMString rule, unsigned long index);
|
||||
void deleteRule(unsigned long index);
|
||||
};
|
||||
|
||||
[ArrayClass]
|
||||
interface StyleSheetList {
|
||||
getter StyleSheet? item(unsigned long index);
|
||||
readonly attribute unsigned long length;
|
||||
};
|
||||
|
||||
partial interface Document {
|
||||
[SameObject] readonly attribute StyleSheetList styleSheets;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface LinkStyle {
|
||||
readonly attribute StyleSheet? sheet;
|
||||
};
|
||||
|
||||
ProcessingInstruction implements LinkStyle;
|
||||
[ArrayClass]
|
||||
interface CSSRuleList {
|
||||
getter CSSRule? item(unsigned long index);
|
||||
readonly attribute unsigned long length;
|
||||
};
|
||||
|
||||
interface CSSRule {
|
||||
const unsigned short STYLE_RULE = 1;
|
||||
const unsigned short CHARSET_RULE = 2; // historical
|
||||
const unsigned short IMPORT_RULE = 3;
|
||||
const unsigned short MEDIA_RULE = 4;
|
||||
const unsigned short FONT_FACE_RULE = 5;
|
||||
const unsigned short PAGE_RULE = 6;
|
||||
const unsigned short MARGIN_RULE = 9;
|
||||
const unsigned short NAMESPACE_RULE = 10;
|
||||
readonly attribute unsigned short type;
|
||||
attribute DOMString cssText;
|
||||
readonly attribute CSSRule? parentRule;
|
||||
readonly attribute CSSStyleSheet? parentStyleSheet;
|
||||
};
|
||||
|
||||
interface CSSStyleRule : CSSRule {
|
||||
attribute DOMString selectorText;
|
||||
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
|
||||
};
|
||||
|
||||
interface CSSImportRule : CSSRule {
|
||||
readonly attribute DOMString href;
|
||||
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;
|
||||
[SameObject] readonly attribute CSSStyleSheet styleSheet;
|
||||
};
|
||||
|
||||
interface CSSGroupingRule : CSSRule {
|
||||
[SameObject] readonly attribute CSSRuleList cssRules;
|
||||
unsigned long insertRule(DOMString rule, unsigned long index);
|
||||
void deleteRule(unsigned long index);
|
||||
};
|
||||
|
||||
interface CSSMediaRule : CSSGroupingRule {
|
||||
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;
|
||||
};
|
||||
|
||||
interface CSSPageRule : CSSGroupingRule {
|
||||
attribute DOMString selectorText;
|
||||
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
|
||||
};
|
||||
|
||||
interface CSSMarginRule : CSSRule {
|
||||
readonly attribute DOMString name;
|
||||
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
|
||||
};
|
||||
|
||||
interface CSSNamespaceRule : CSSRule {
|
||||
readonly attribute DOMString namespaceURI;
|
||||
readonly attribute DOMString prefix;
|
||||
};
|
||||
|
||||
interface CSSStyleDeclaration {
|
||||
[CEReactions] attribute DOMString cssText;
|
||||
readonly attribute unsigned long length;
|
||||
getter DOMString item(unsigned long index);
|
||||
DOMString getPropertyValue(DOMString property);
|
||||
DOMString getPropertyPriority(DOMString property);
|
||||
[CEReactions] void setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value, [TreatNullAs=EmptyString] optional DOMString priority = "");
|
||||
[CEReactions] void setPropertyValue(DOMString property, [TreatNullAs=EmptyString] DOMString value);
|
||||
[CEReactions] void setPropertyPriority(DOMString property, [TreatNullAs=EmptyString] DOMString priority);
|
||||
[CEReactions] DOMString removeProperty(DOMString property);
|
||||
readonly attribute CSSRule? parentRule;
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString cssFloat;
|
||||
};
|
||||
|
||||
partial interface CSSStyleDeclaration {
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString _camel_cased_attribute;
|
||||
};
|
||||
|
||||
partial interface CSSStyleDeclaration {
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString _webkit_cased_attribute;
|
||||
};
|
||||
|
||||
partial interface CSSStyleDeclaration {
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString _dashed_attribute;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface ElementCSSInlineStyle {
|
||||
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
|
||||
};
|
||||
|
||||
HTMLElement implements ElementCSSInlineStyle;
|
||||
|
||||
SVGElement implements ElementCSSInlineStyle;
|
||||
|
||||
partial interface Window {
|
||||
[NewObject] CSSStyleDeclaration getComputedStyle(Element elt, optional DOMString? pseudoElt);
|
||||
};
|
||||
|
||||
interface CSS {
|
||||
static DOMString escape(DOMString ident);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,282 @@
|
||||
namespace org.w3c.dom.events;
|
||||
|
||||
|
||||
// Downloaded from http://www.w3.org/TR/uievents/
|
||||
[Constructor(DOMString type, optional UIEventInit eventInitDict)]
|
||||
interface UIEvent : Event {
|
||||
readonly attribute Window? view;
|
||||
readonly attribute long detail;
|
||||
};
|
||||
dictionary UIEventInit : EventInit {
|
||||
Window? view = null;
|
||||
long detail = 0;
|
||||
};
|
||||
[Constructor(DOMString type, optional FocusEventInit eventInitDict)]
|
||||
interface FocusEvent : UIEvent {
|
||||
readonly attribute EventTarget? relatedTarget;
|
||||
};
|
||||
dictionary FocusEventInit : UIEventInit {
|
||||
EventTarget? relatedTarget = null;
|
||||
};
|
||||
[Constructor(DOMString type, optional MouseEventInit eventInitDict)]
|
||||
interface MouseEvent : UIEvent {
|
||||
readonly attribute long screenX;
|
||||
readonly attribute long screenY;
|
||||
readonly attribute long clientX;
|
||||
readonly attribute long clientY;
|
||||
|
||||
readonly attribute boolean ctrlKey;
|
||||
readonly attribute boolean shiftKey;
|
||||
readonly attribute boolean altKey;
|
||||
readonly attribute boolean metaKey;
|
||||
|
||||
readonly attribute short button;
|
||||
readonly attribute unsigned short buttons;
|
||||
|
||||
readonly attribute EventTarget? relatedTarget;
|
||||
|
||||
boolean getModifierState(DOMString keyArg);
|
||||
};
|
||||
dictionary MouseEventInit : EventModifierInit {
|
||||
long screenX = 0;
|
||||
long screenY = 0;
|
||||
long clientX = 0;
|
||||
long clientY = 0;
|
||||
|
||||
short button = 0;
|
||||
unsigned short buttons = 0;
|
||||
EventTarget? relatedTarget = null;
|
||||
};
|
||||
dictionary EventModifierInit : UIEventInit {
|
||||
boolean ctrlKey = false;
|
||||
boolean shiftKey = false;
|
||||
boolean altKey = false;
|
||||
boolean metaKey = false;
|
||||
|
||||
boolean modifierAltGraph = false;
|
||||
boolean modifierCapsLock = false;
|
||||
boolean modifierFn = false;
|
||||
boolean modifierFnLock = false;
|
||||
boolean modifierHyper = false;
|
||||
boolean modifierNumLock = false;
|
||||
boolean modifierScrollLock = false;
|
||||
boolean modifierSuper = false;
|
||||
boolean modifierSymbol = false;
|
||||
boolean modifierSymbolLock = false;
|
||||
};
|
||||
[Constructor(DOMString type, optional WheelEventInit eventInitDict)]
|
||||
interface WheelEvent : MouseEvent {
|
||||
// DeltaModeCode
|
||||
const unsigned long DOM_DELTA_PIXEL = 0x00;
|
||||
const unsigned long DOM_DELTA_LINE = 0x01;
|
||||
const unsigned long DOM_DELTA_PAGE = 0x02;
|
||||
|
||||
readonly attribute double deltaX;
|
||||
readonly attribute double deltaY;
|
||||
readonly attribute double deltaZ;
|
||||
readonly attribute unsigned long deltaMode;
|
||||
};
|
||||
dictionary WheelEventInit : MouseEventInit {
|
||||
double deltaX = 0.0;
|
||||
double deltaY = 0.0;
|
||||
double deltaZ = 0.0;
|
||||
unsigned long deltaMode = 0;
|
||||
};
|
||||
[Constructor(DOMString type, optional InputEventInit eventInitDict)]
|
||||
interface InputEvent : UIEvent {
|
||||
readonly attribute DOMString data;
|
||||
readonly attribute boolean isComposing;
|
||||
};
|
||||
dictionary InputEventInit : UIEventInit {
|
||||
DOMString data = "";
|
||||
boolean isComposing = false;
|
||||
};
|
||||
[Constructor(DOMString type, optional KeyboardEventInit eventInitDict)]
|
||||
interface KeyboardEvent : UIEvent {
|
||||
// KeyLocationCode
|
||||
const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
|
||||
const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
|
||||
const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02;
|
||||
const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03;
|
||||
|
||||
readonly attribute DOMString key;
|
||||
readonly attribute DOMString code;
|
||||
readonly attribute unsigned long location;
|
||||
|
||||
readonly attribute boolean ctrlKey;
|
||||
readonly attribute boolean shiftKey;
|
||||
readonly attribute boolean altKey;
|
||||
readonly attribute boolean metaKey;
|
||||
|
||||
readonly attribute boolean repeat;
|
||||
readonly attribute boolean isComposing;
|
||||
|
||||
boolean getModifierState(DOMString keyArg);
|
||||
};
|
||||
dictionary KeyboardEventInit : EventModifierInit {
|
||||
DOMString key = "";
|
||||
DOMString code = "";
|
||||
unsigned long location = 0;
|
||||
boolean repeat = false;
|
||||
boolean isComposing = false;
|
||||
};
|
||||
[Constructor(DOMString type, optional CompositionEventInit eventInitDict)]
|
||||
interface CompositionEvent : UIEvent {
|
||||
readonly attribute DOMString data;
|
||||
};
|
||||
dictionary CompositionEventInit : UIEventInit {
|
||||
DOMString data = "";
|
||||
};
|
||||
partial interface KeyboardEvent {
|
||||
// The following support legacy user agents
|
||||
readonly attribute unsigned long charCode;
|
||||
readonly attribute unsigned long keyCode;
|
||||
readonly attribute unsigned long which;
|
||||
};
|
||||
[Constructor(DOMString type, optional UIEventInit eventInitDict)]
|
||||
interface UIEvent : Event {
|
||||
readonly attribute Window? view;
|
||||
readonly attribute long detail;
|
||||
};
|
||||
|
||||
dictionary UIEventInit : EventInit {
|
||||
Window? view = null;
|
||||
long detail = 0;
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, optional FocusEventInit eventInitDict)]
|
||||
interface FocusEvent : UIEvent {
|
||||
readonly attribute EventTarget? relatedTarget;
|
||||
};
|
||||
|
||||
dictionary FocusEventInit : UIEventInit {
|
||||
EventTarget? relatedTarget = null;
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, optional MouseEventInit eventInitDict)]
|
||||
interface MouseEvent : UIEvent {
|
||||
readonly attribute long screenX;
|
||||
readonly attribute long screenY;
|
||||
readonly attribute long clientX;
|
||||
readonly attribute long clientY;
|
||||
|
||||
readonly attribute boolean ctrlKey;
|
||||
readonly attribute boolean shiftKey;
|
||||
readonly attribute boolean altKey;
|
||||
readonly attribute boolean metaKey;
|
||||
|
||||
readonly attribute short button;
|
||||
readonly attribute unsigned short buttons;
|
||||
|
||||
readonly attribute EventTarget? relatedTarget;
|
||||
|
||||
boolean getModifierState(DOMString keyArg);
|
||||
};
|
||||
|
||||
dictionary MouseEventInit : EventModifierInit {
|
||||
long screenX = 0;
|
||||
long screenY = 0;
|
||||
long clientX = 0;
|
||||
long clientY = 0;
|
||||
|
||||
short button = 0;
|
||||
unsigned short buttons = 0;
|
||||
EventTarget? relatedTarget = null;
|
||||
};
|
||||
|
||||
dictionary EventModifierInit : UIEventInit {
|
||||
boolean ctrlKey = false;
|
||||
boolean shiftKey = false;
|
||||
boolean altKey = false;
|
||||
boolean metaKey = false;
|
||||
|
||||
boolean modifierAltGraph = false;
|
||||
boolean modifierCapsLock = false;
|
||||
boolean modifierFn = false;
|
||||
boolean modifierFnLock = false;
|
||||
boolean modifierHyper = false;
|
||||
boolean modifierNumLock = false;
|
||||
boolean modifierScrollLock = false;
|
||||
boolean modifierSuper = false;
|
||||
boolean modifierSymbol = false;
|
||||
boolean modifierSymbolLock = false;
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, optional WheelEventInit eventInitDict)]
|
||||
interface WheelEvent : MouseEvent {
|
||||
// DeltaModeCode
|
||||
const unsigned long DOM_DELTA_PIXEL = 0x00;
|
||||
const unsigned long DOM_DELTA_LINE = 0x01;
|
||||
const unsigned long DOM_DELTA_PAGE = 0x02;
|
||||
|
||||
readonly attribute double deltaX;
|
||||
readonly attribute double deltaY;
|
||||
readonly attribute double deltaZ;
|
||||
readonly attribute unsigned long deltaMode;
|
||||
};
|
||||
|
||||
dictionary WheelEventInit : MouseEventInit {
|
||||
double deltaX = 0.0;
|
||||
double deltaY = 0.0;
|
||||
double deltaZ = 0.0;
|
||||
unsigned long deltaMode = 0;
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, optional InputEventInit eventInitDict)]
|
||||
interface InputEvent : UIEvent {
|
||||
readonly attribute DOMString data;
|
||||
readonly attribute boolean isComposing;
|
||||
};
|
||||
|
||||
dictionary InputEventInit : UIEventInit {
|
||||
DOMString data = "";
|
||||
boolean isComposing = false;
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, optional KeyboardEventInit eventInitDict)]
|
||||
interface KeyboardEvent : UIEvent {
|
||||
// KeyLocationCode
|
||||
const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
|
||||
const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
|
||||
const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02;
|
||||
const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03;
|
||||
|
||||
readonly attribute DOMString key;
|
||||
readonly attribute DOMString code;
|
||||
readonly attribute unsigned long location;
|
||||
|
||||
readonly attribute boolean ctrlKey;
|
||||
readonly attribute boolean shiftKey;
|
||||
readonly attribute boolean altKey;
|
||||
readonly attribute boolean metaKey;
|
||||
|
||||
readonly attribute boolean repeat;
|
||||
readonly attribute boolean isComposing;
|
||||
|
||||
boolean getModifierState(DOMString keyArg);
|
||||
};
|
||||
|
||||
dictionary KeyboardEventInit : EventModifierInit {
|
||||
DOMString key = "";
|
||||
DOMString code = "";
|
||||
unsigned long location = 0;
|
||||
boolean repeat = false;
|
||||
boolean isComposing = false;
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, optional CompositionEventInit eventInitDict)]
|
||||
interface CompositionEvent : UIEvent {
|
||||
readonly attribute DOMString data;
|
||||
};
|
||||
|
||||
dictionary CompositionEventInit : UIEventInit {
|
||||
DOMString data = "";
|
||||
};
|
||||
|
||||
partial interface KeyboardEvent {
|
||||
// The following support legacy user agents
|
||||
readonly attribute unsigned long charCode;
|
||||
readonly attribute unsigned long keyCode;
|
||||
readonly attribute unsigned long which;
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
namespace org.w3c.dom.parsing;
|
||||
|
||||
|
||||
// Downloaded from http://www.w3.org/TR/DOM-Parsing/
|
||||
[Constructor]
|
||||
interface DOMParser {
|
||||
[NewObject] Document parseFromString (DOMString str, SupportedType type);
|
||||
};
|
||||
[Constructor]
|
||||
interface XMLSerializer {
|
||||
DOMString serializeToString (Node root);
|
||||
};
|
||||
partial interface Element {
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString innerHTML;
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString outerHTML;
|
||||
[CEReactions] void insertAdjacentHTML (DOMString position, DOMString text);
|
||||
};
|
||||
partial interface Range {
|
||||
[CEReactions, NewObject] DocumentFragment createContextualFragment (DOMString fragment);
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,68 @@
|
||||
namespace org.w3c.dom.url;
|
||||
|
||||
|
||||
// Downloaded from https://raw.githubusercontent.com/whatwg/url/master/url.html
|
||||
[Constructor(USVString url, optional USVString base),
|
||||
Exposed=(Window,Worker)]
|
||||
interface URL {
|
||||
static USVString domainToASCII(USVString domain);
|
||||
static USVString domainToUnicode(USVString domain);
|
||||
|
||||
stringifier attribute USVString href;
|
||||
readonly attribute USVString origin;
|
||||
attribute USVString protocol;
|
||||
attribute USVString username;
|
||||
attribute USVString password;
|
||||
attribute USVString host;
|
||||
attribute USVString hostname;
|
||||
attribute USVString port;
|
||||
attribute USVString pathname;
|
||||
attribute USVString search;
|
||||
readonly attribute URLSearchParams searchParams;
|
||||
attribute USVString hash;
|
||||
};
|
||||
[Constructor(optional (USVString or URLSearchParams) init = ""),
|
||||
Exposed=(Window,Worker)]
|
||||
interface URLSearchParams {
|
||||
void append(USVString name, USVString value);
|
||||
void delete(USVString name);
|
||||
USVString? get(USVString name);
|
||||
sequence<USVString> getAll(USVString name);
|
||||
boolean has(USVString name);
|
||||
void set(USVString name, USVString value);
|
||||
iterable<USVString, USVString>;
|
||||
stringifier;
|
||||
};
|
||||
[Constructor(USVString url, optional USVString base),
|
||||
Exposed=(Window,Worker)]
|
||||
interface URL {
|
||||
static USVString domainToASCII(USVString domain);
|
||||
static USVString domainToUnicode(USVString domain);
|
||||
|
||||
stringifier attribute USVString href;
|
||||
readonly attribute USVString origin;
|
||||
attribute USVString protocol;
|
||||
attribute USVString username;
|
||||
attribute USVString password;
|
||||
attribute USVString host;
|
||||
attribute USVString hostname;
|
||||
attribute USVString port;
|
||||
attribute USVString pathname;
|
||||
attribute USVString search;
|
||||
readonly attribute URLSearchParams searchParams;
|
||||
attribute USVString hash;
|
||||
};
|
||||
|
||||
[Constructor(optional (USVString or URLSearchParams) init = ""),
|
||||
Exposed=(Window,Worker)]
|
||||
interface URLSearchParams {
|
||||
void append(USVString name, USVString value);
|
||||
void delete(USVString name);
|
||||
USVString? get(USVString name);
|
||||
sequence<USVString> getAll(USVString name);
|
||||
boolean has(USVString name);
|
||||
void set(USVString name, USVString value);
|
||||
iterable<USVString, USVString>;
|
||||
stringifier;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
namespace org.w3c.fetch;
|
||||
|
||||
|
||||
// Downloaded from https://raw.githubusercontent.com/whatwg/fetch/master/Overview.src.html
|
||||
typedef (Headers or sequence<sequence<ByteString>> or OpenEndedDictionary<ByteString>) HeadersInit;
|
||||
[Constructor(optional HeadersInit init),
|
||||
Exposed=(Window,Worker)]
|
||||
interface Headers {
|
||||
void append(ByteString name, ByteString value);
|
||||
void delete(ByteString name);
|
||||
ByteString? get(ByteString name);
|
||||
boolean has(ByteString name);
|
||||
void set(ByteString name, ByteString value);
|
||||
iterable<ByteString, ByteString>;
|
||||
};
|
||||
typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) BodyInit;
|
||||
typedef (BodyInit or ReadableStream) ResponseBodyInit;
|
||||
[NoInterfaceObject,
|
||||
Exposed=(Window,Worker)]
|
||||
interface Body {
|
||||
readonly attribute boolean bodyUsed;
|
||||
[NewObject] Promise<ArrayBuffer> arrayBuffer();
|
||||
[NewObject] Promise<Blob> blob();
|
||||
[NewObject] Promise<FormData> formData();
|
||||
[NewObject] Promise<any> json();
|
||||
[NewObject] Promise<USVString> text();
|
||||
};
|
||||
typedef (Request or USVString) RequestInfo;
|
||||
|
||||
[Constructor(RequestInfo input, optional RequestInit init),
|
||||
Exposed=(Window,Worker)]
|
||||
interface Request {
|
||||
readonly attribute ByteString method;
|
||||
readonly attribute USVString url;
|
||||
[SameObject] readonly attribute Headers headers;
|
||||
|
||||
readonly attribute RequestType type;
|
||||
readonly attribute RequestDestination destination;
|
||||
readonly attribute USVString referrer;
|
||||
readonly attribute ReferrerPolicy referrerPolicy;
|
||||
readonly attribute RequestMode mode;
|
||||
readonly attribute RequestCredentials credentials;
|
||||
readonly attribute RequestCache cache;
|
||||
readonly attribute RequestRedirect redirect;
|
||||
readonly attribute DOMString integrity;
|
||||
readonly attribute boolean keepalive;
|
||||
|
||||
[NewObject] Request clone();
|
||||
};
|
||||
Request implements Body;
|
||||
|
||||
dictionary RequestInit {
|
||||
ByteString method;
|
||||
HeadersInit headers;
|
||||
BodyInit? body;
|
||||
USVString referrer;
|
||||
ReferrerPolicy referrerPolicy;
|
||||
RequestMode mode;
|
||||
RequestCredentials credentials;
|
||||
RequestCache cache;
|
||||
RequestRedirect redirect;
|
||||
DOMString integrity;
|
||||
boolean keepalive;
|
||||
any window; // can only be set to null
|
||||
};
|
||||
|
||||
enum RequestType { "", "audio", "font", "image", "script", "style", "track", "video" };
|
||||
enum RequestDestination { "", "document", "embed", "font", "image", "manifest", "media", "object", "report", "script", "serviceworker", "sharedworker", "style", "worker", "xslt" };
|
||||
enum RequestMode { "navigate", "same-origin", "no-cors", "cors" };
|
||||
enum RequestCredentials { "omit", "same-origin", "include" };
|
||||
enum RequestCache { "default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached" };
|
||||
enum RequestRedirect { "follow", "error", "manual" };
|
||||
[Constructor(optional ResponseBodyInit? body = null, optional ResponseInit init),
|
||||
Exposed=(Window,Worker)]
|
||||
interface Response {
|
||||
[NewObject] static Response error();
|
||||
[NewObject] static Response redirect(USVString url, optional unsigned short status = 302);
|
||||
|
||||
readonly attribute ResponseType type;
|
||||
|
||||
readonly attribute USVString url;
|
||||
readonly attribute boolean redirected;
|
||||
readonly attribute unsigned short status;
|
||||
readonly attribute boolean ok;
|
||||
readonly attribute ByteString statusText;
|
||||
[SameObject] readonly attribute Headers headers;
|
||||
readonly attribute ReadableStream? body;
|
||||
[SameObject] readonly attribute Promise<Headers> trailer;
|
||||
|
||||
[NewObject] Response clone();
|
||||
};
|
||||
Response implements Body;
|
||||
|
||||
dictionary ResponseInit {
|
||||
unsigned short status = 200;
|
||||
ByteString statusText = "OK";
|
||||
HeadersInit headers;
|
||||
};
|
||||
|
||||
enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredirect" };
|
||||
partial interface WindowOrWorkerGlobalScope {
|
||||
[NewObject] Promise<Response> fetch(RequestInfo input, optional RequestInit init);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
namespace org.w3c.files;
|
||||
|
||||
|
||||
// Downloaded from https://raw.githubusercontent.com/w3c/FileAPI/gh-pages/index.html
|
||||
[Constructor(optional sequence<BlobPart> blobParts, optional BlobPropertyBag options),
|
||||
Exposed=(Window,Worker)]
|
||||
interface Blob {
|
||||
|
||||
readonly attribute unsigned long long size;
|
||||
readonly attribute DOMString type;
|
||||
readonly attribute boolean isClosed;
|
||||
|
||||
//slice Blob into byte-ranged chunks
|
||||
|
||||
Blob slice([Clamp] optional long long start,
|
||||
[Clamp] optional long long end,
|
||||
optional DOMString contentType);
|
||||
void close();
|
||||
|
||||
};
|
||||
|
||||
dictionary BlobPropertyBag {
|
||||
DOMString type = "";
|
||||
};
|
||||
|
||||
typedef (BufferSource or Blob or USVString) BlobPart;
|
||||
[Constructor(sequence<BlobPart> fileBits,
|
||||
[EnsureUTF16] DOMString fileName,
|
||||
optional FilePropertyBag options),
|
||||
Exposed=(Window,Worker)]
|
||||
interface File : Blob {
|
||||
readonly attribute DOMString name;
|
||||
readonly attribute long long lastModified;
|
||||
};
|
||||
|
||||
dictionary FilePropertyBag : BlobPropertyBag {
|
||||
long long lastModified;
|
||||
};
|
||||
[Exposed=(Window,Worker)]
|
||||
interface FileList {
|
||||
getter File? item(unsigned long index);
|
||||
readonly attribute unsigned long length;
|
||||
};
|
||||
[Constructor, Exposed=(Window,Worker)]
|
||||
interface FileReader: EventTarget {
|
||||
|
||||
// async read methods
|
||||
void readAsArrayBuffer(Blob blob);
|
||||
void readAsBinaryString(Blob blob);
|
||||
void readAsText(Blob blob, optional DOMString label);
|
||||
void readAsDataURL(Blob blob);
|
||||
|
||||
void abort();
|
||||
|
||||
// states
|
||||
const unsigned short EMPTY = 0;
|
||||
const unsigned short LOADING = 1;
|
||||
const unsigned short DONE = 2;
|
||||
|
||||
|
||||
readonly attribute unsigned short readyState;
|
||||
|
||||
// File or Blob data
|
||||
readonly attribute (DOMString or ArrayBuffer)? result;
|
||||
|
||||
readonly attribute DOMError? error;
|
||||
|
||||
// event handler content attributes
|
||||
attribute EventHandler onloadstart;
|
||||
attribute EventHandler onprogress;
|
||||
attribute EventHandler onload;
|
||||
attribute EventHandler onabort;
|
||||
attribute EventHandler onerror;
|
||||
attribute EventHandler onloadend;
|
||||
|
||||
};
|
||||
[Constructor, Exposed=Worker]
|
||||
interface FileReaderSync {
|
||||
// Synchronously return strings
|
||||
|
||||
ArrayBuffer readAsArrayBuffer(Blob blob);
|
||||
DOMString readAsBinaryString(Blob blob);
|
||||
DOMString readAsText(Blob blob, optional DOMString label);
|
||||
DOMString readAsDataURL(Blob blob);
|
||||
};
|
||||
[Exposed=(Window,DedicatedWorker,SharedWorker)]
|
||||
partial interface URL {
|
||||
static DOMString createObjectURL(Blob blob);
|
||||
static DOMString createFor(Blob blob);
|
||||
static void revokeObjectURL(DOMString url);
|
||||
};
|
||||
[Constructor(optional sequence<BlobPart> blobParts, optional BlobPropertyBag options),
|
||||
Exposed=(Window,Worker)]
|
||||
interface Blob {
|
||||
|
||||
readonly attribute unsigned long long size;
|
||||
readonly attribute DOMString type;
|
||||
readonly attribute boolean isClosed;
|
||||
|
||||
//slice Blob into byte-ranged chunks
|
||||
|
||||
Blob slice([Clamp] optional long long start,
|
||||
[Clamp] optional long long end,
|
||||
optional DOMString contentType);
|
||||
void close();
|
||||
|
||||
};
|
||||
|
||||
dictionary BlobPropertyBag {
|
||||
DOMString type = "";
|
||||
};
|
||||
|
||||
typedef (BufferSource or Blob or USVString) BlobPart;
|
||||
|
||||
[Constructor(sequence<BlobPart> fileBits,
|
||||
[EnsureUTF16] DOMString fileName,
|
||||
optional FilePropertyBag options),
|
||||
Exposed=(Window,Worker)]
|
||||
interface File : Blob {
|
||||
readonly attribute DOMString name;
|
||||
readonly attribute long long lastModified;
|
||||
};
|
||||
|
||||
dictionary FilePropertyBag : BlobPropertyBag {
|
||||
long long lastModified;
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface FileList {
|
||||
getter File? item(unsigned long index);
|
||||
readonly attribute unsigned long length;
|
||||
};
|
||||
|
||||
[Constructor, Exposed=(Window,Worker)]
|
||||
interface FileReader: EventTarget {
|
||||
|
||||
// async read methods
|
||||
void readAsArrayBuffer(Blob blob);
|
||||
void readAsBinaryString(Blob blob);
|
||||
void readAsText(Blob blob, optional DOMString label);
|
||||
void readAsDataURL(Blob blob);
|
||||
|
||||
void abort();
|
||||
|
||||
// states
|
||||
const unsigned short EMPTY = 0;
|
||||
const unsigned short LOADING = 1;
|
||||
const unsigned short DONE = 2;
|
||||
|
||||
|
||||
readonly attribute unsigned short readyState;
|
||||
|
||||
// File or Blob data
|
||||
readonly attribute (DOMString or ArrayBuffer)? result;
|
||||
|
||||
readonly attribute DOMError? error;
|
||||
|
||||
// event handler content attributes
|
||||
attribute EventHandler onloadstart;
|
||||
attribute EventHandler onprogress;
|
||||
attribute EventHandler onload;
|
||||
attribute EventHandler onabort;
|
||||
attribute EventHandler onerror;
|
||||
attribute EventHandler onloadend;
|
||||
|
||||
};
|
||||
|
||||
[Constructor, Exposed=Worker]
|
||||
interface FileReaderSync {
|
||||
// Synchronously return strings
|
||||
|
||||
ArrayBuffer readAsArrayBuffer(Blob blob);
|
||||
DOMString readAsBinaryString(Blob blob);
|
||||
DOMString readAsText(Blob blob, optional DOMString label);
|
||||
DOMString readAsDataURL(Blob blob);
|
||||
};
|
||||
|
||||
[Exposed=(Window,DedicatedWorker,SharedWorker)]
|
||||
partial interface URL {
|
||||
static DOMString createObjectURL(Blob blob);
|
||||
static DOMString createFor(Blob blob);
|
||||
static void revokeObjectURL(DOMString url);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace org.w3c.fullscreen;
|
||||
|
||||
|
||||
// Downloaded from https://raw.githubusercontent.com/whatwg/fullscreen/master/fullscreen.html
|
||||
partial interface Element {
|
||||
Promise<void> requestFullscreen();
|
||||
};
|
||||
|
||||
partial interface Document {
|
||||
[LenientSetter] readonly attribute boolean fullscreenEnabled;
|
||||
[LenientSetter] readonly attribute boolean fullscreen; // historical
|
||||
|
||||
Promise<void> exitFullscreen();
|
||||
|
||||
attribute EventHandler onfullscreenchange;
|
||||
attribute EventHandler onfullscreenerror;
|
||||
};
|
||||
|
||||
partial interface DocumentOrShadowRoot {
|
||||
[LenientSetter] readonly attribute Element? fullscreenElement;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
namespace org.w3c.notifications;
|
||||
|
||||
|
||||
// Downloaded from https://raw.githubusercontent.com/whatwg/notifications/master/notifications.html
|
||||
[Constructor(DOMString title, optional NotificationOptions options),
|
||||
Exposed=(Window,Worker)]
|
||||
interface Notification : EventTarget {
|
||||
static readonly attribute NotificationPermission permission;
|
||||
[Exposed=Window] static Promise<NotificationPermission> requestPermission(optional NotificationPermissionCallback deprecatedCallback);
|
||||
|
||||
static readonly attribute unsigned long maxActions;
|
||||
|
||||
attribute EventHandler onclick;
|
||||
attribute EventHandler onerror;
|
||||
|
||||
readonly attribute DOMString title;
|
||||
readonly attribute NotificationDirection dir;
|
||||
readonly attribute DOMString lang;
|
||||
readonly attribute DOMString body;
|
||||
readonly attribute DOMString tag;
|
||||
readonly attribute USVString image;
|
||||
readonly attribute USVString icon;
|
||||
readonly attribute USVString badge;
|
||||
readonly attribute USVString sound;
|
||||
[SameObject] readonly attribute FrozenArray<unsigned long> vibrate;
|
||||
readonly attribute DOMTimeStamp timestamp;
|
||||
readonly attribute boolean renotify;
|
||||
readonly attribute boolean silent;
|
||||
readonly attribute boolean noscreen;
|
||||
readonly attribute boolean requireInteraction;
|
||||
readonly attribute boolean sticky;
|
||||
[SameObject] readonly attribute any data;
|
||||
[SameObject] readonly attribute FrozenArray<NotificationAction> actions;
|
||||
|
||||
void close();
|
||||
};
|
||||
|
||||
dictionary NotificationOptions {
|
||||
NotificationDirection dir = "auto";
|
||||
DOMString lang = "";
|
||||
DOMString body = "";
|
||||
DOMString tag = "";
|
||||
USVString image;
|
||||
USVString icon;
|
||||
USVString badge;
|
||||
USVString sound;
|
||||
VibratePattern vibrate;
|
||||
DOMTimeStamp timestamp;
|
||||
boolean renotify = false;
|
||||
boolean silent = false;
|
||||
boolean noscreen = false;
|
||||
boolean requireInteraction = false;
|
||||
boolean sticky = false;
|
||||
any data = null;
|
||||
sequence<NotificationAction> actions = [];
|
||||
};
|
||||
|
||||
enum NotificationPermission {
|
||||
"default",
|
||||
"denied",
|
||||
"granted"
|
||||
};
|
||||
|
||||
enum NotificationDirection {
|
||||
"auto",
|
||||
"ltr",
|
||||
"rtl"
|
||||
};
|
||||
|
||||
dictionary NotificationAction {
|
||||
required DOMString action;
|
||||
required DOMString title;
|
||||
USVString icon;
|
||||
};
|
||||
|
||||
callback NotificationPermissionCallback = void (NotificationPermission permission);
|
||||
dictionary GetNotificationOptions {
|
||||
DOMString tag = "";
|
||||
};
|
||||
|
||||
partial interface ServiceWorkerRegistration {
|
||||
Promise<void> showNotification(DOMString title, optional NotificationOptions options);
|
||||
Promise<sequence<Notification>> getNotifications(optional GetNotificationOptions filter);
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, NotificationEventInit eventInitDict),
|
||||
Exposed=ServiceWorker]
|
||||
interface NotificationEvent : ExtendableEvent {
|
||||
readonly attribute Notification notification;
|
||||
readonly attribute DOMString action;
|
||||
};
|
||||
|
||||
dictionary NotificationEventInit : ExtendableEventInit {
|
||||
required Notification notification;
|
||||
DOMString action = "";
|
||||
};
|
||||
|
||||
partial interface ServiceWorkerGlobalScope {
|
||||
attribute EventHandler onnotificationclick;
|
||||
attribute EventHandler onnotificationclose;
|
||||
};
|
||||
[Constructor(DOMString title, optional NotificationOptions options),
|
||||
Exposed=(Window,Worker)]
|
||||
interface Notification : EventTarget {
|
||||
static readonly attribute NotificationPermission permission;
|
||||
[Exposed=Window] static Promise<NotificationPermission> requestPermission(optional NotificationPermissionCallback deprecatedCallback);
|
||||
|
||||
static readonly attribute unsigned long maxActions;
|
||||
|
||||
attribute EventHandler onclick;
|
||||
attribute EventHandler onerror;
|
||||
|
||||
readonly attribute DOMString title;
|
||||
readonly attribute NotificationDirection dir;
|
||||
readonly attribute DOMString lang;
|
||||
readonly attribute DOMString body;
|
||||
readonly attribute DOMString tag;
|
||||
readonly attribute USVString image;
|
||||
readonly attribute USVString icon;
|
||||
readonly attribute USVString badge;
|
||||
readonly attribute USVString sound;
|
||||
[SameObject] readonly attribute FrozenArray<unsigned long> vibrate;
|
||||
readonly attribute DOMTimeStamp timestamp;
|
||||
readonly attribute boolean renotify;
|
||||
readonly attribute boolean silent;
|
||||
readonly attribute boolean noscreen;
|
||||
readonly attribute boolean requireInteraction;
|
||||
readonly attribute boolean sticky;
|
||||
[SameObject] readonly attribute any data;
|
||||
[SameObject] readonly attribute FrozenArray<NotificationAction> actions;
|
||||
|
||||
void close();
|
||||
};
|
||||
|
||||
dictionary NotificationOptions {
|
||||
NotificationDirection dir = "auto";
|
||||
DOMString lang = "";
|
||||
DOMString body = "";
|
||||
DOMString tag = "";
|
||||
USVString image;
|
||||
USVString icon;
|
||||
USVString badge;
|
||||
USVString sound;
|
||||
VibratePattern vibrate;
|
||||
DOMTimeStamp timestamp;
|
||||
boolean renotify = false;
|
||||
boolean silent = false;
|
||||
boolean noscreen = false;
|
||||
boolean requireInteraction = false;
|
||||
boolean sticky = false;
|
||||
any data = null;
|
||||
sequence<NotificationAction> actions = [];
|
||||
};
|
||||
|
||||
enum NotificationPermission {
|
||||
"default",
|
||||
"denied",
|
||||
"granted"
|
||||
};
|
||||
|
||||
enum NotificationDirection {
|
||||
"auto",
|
||||
"ltr",
|
||||
"rtl"
|
||||
};
|
||||
|
||||
dictionary NotificationAction {
|
||||
required DOMString action;
|
||||
required DOMString title;
|
||||
USVString icon;
|
||||
};
|
||||
|
||||
callback NotificationPermissionCallback = void (NotificationPermission permission);
|
||||
|
||||
dictionary GetNotificationOptions {
|
||||
DOMString tag = "";
|
||||
};
|
||||
|
||||
partial interface ServiceWorkerRegistration {
|
||||
Promise<void> showNotification(DOMString title, optional NotificationOptions options);
|
||||
Promise<sequence<Notification>> getNotifications(optional GetNotificationOptions filter);
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, NotificationEventInit eventInitDict),
|
||||
Exposed=ServiceWorker]
|
||||
interface NotificationEvent : ExtendableEvent {
|
||||
readonly attribute Notification notification;
|
||||
readonly attribute DOMString action;
|
||||
};
|
||||
|
||||
dictionary NotificationEventInit : ExtendableEventInit {
|
||||
required Notification notification;
|
||||
DOMString action = "";
|
||||
};
|
||||
|
||||
partial interface ServiceWorkerGlobalScope {
|
||||
attribute EventHandler onnotificationclick;
|
||||
attribute EventHandler onnotificationclose;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
namespace org.w3c.performance;
|
||||
|
||||
|
||||
// Downloaded from http://www.w3.org/TR/hr-time/
|
||||
typedef double DOMHighResTimeStamp;
|
||||
[Exposed=(Window,Worker)]
|
||||
interface Performance : EventTarget {
|
||||
DOMHighResTimeStamp now();
|
||||
serializer = {attribute};
|
||||
};
|
||||
[NoInterfaceObject,
|
||||
Exposed=(Window,Worker)]
|
||||
interface GlobalPerformance {
|
||||
[Replaceable] readonly attribute Performance performance;
|
||||
};
|
||||
|
||||
Window implements GlobalPerformance;
|
||||
|
||||
WorkerGlobalScope implements GlobalPerformance;
|
||||
// Downloaded from http://www.w3.org/TR/2012/REC-navigation-timing-20121217/
|
||||
interface PerformanceTiming {
|
||||
readonly attribute unsigned long long navigationStart;
|
||||
readonly attribute unsigned long long unloadEventStart;
|
||||
readonly attribute unsigned long long unloadEventEnd;
|
||||
readonly attribute unsigned long long redirectStart;
|
||||
readonly attribute unsigned long long redirectEnd;
|
||||
readonly attribute unsigned long long fetchStart;
|
||||
readonly attribute unsigned long long domainLookupStart;
|
||||
readonly attribute unsigned long long domainLookupEnd;
|
||||
readonly attribute unsigned long long connectStart;
|
||||
readonly attribute unsigned long long connectEnd;
|
||||
readonly attribute unsigned long long secureConnectionStart;
|
||||
readonly attribute unsigned long long requestStart;
|
||||
readonly attribute unsigned long long responseStart;
|
||||
readonly attribute unsigned long long responseEnd;
|
||||
readonly attribute unsigned long long domLoading;
|
||||
readonly attribute unsigned long long domInteractive;
|
||||
readonly attribute unsigned long long domContentLoadedEventStart;
|
||||
readonly attribute unsigned long long domContentLoadedEventEnd;
|
||||
readonly attribute unsigned long long domComplete;
|
||||
readonly attribute unsigned long long loadEventStart;
|
||||
readonly attribute unsigned long long loadEventEnd;
|
||||
};
|
||||
interface PerformanceNavigation {
|
||||
const unsigned short TYPE_NAVIGATE = 0;
|
||||
const unsigned short TYPE_RELOAD = 1;
|
||||
const unsigned short TYPE_BACK_FORWARD = 2;
|
||||
const unsigned short TYPE_RESERVED = 255;
|
||||
readonly attribute unsigned short type;
|
||||
readonly attribute unsigned short redirectCount;
|
||||
};
|
||||
interface Performance {
|
||||
readonly attribute PerformanceTiming timing;
|
||||
readonly attribute PerformanceNavigation navigation;
|
||||
};
|
||||
|
||||
partial interface Window {
|
||||
[Replaceable] readonly attribute Performance performance;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace org.w3c.vibration;
|
||||
|
||||
|
||||
// Downloaded from http://www.w3.org/TR/vibration/
|
||||
typedef (unsigned long or sequence<unsigned long>) VibratePattern; partial interface Navigator {
|
||||
boolean vibrate (VibratePattern pattern);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace org.w3c.webidl;
|
||||
|
||||
/** written by WebIDL spec */
|
||||
|
||||
typedef unsigned long long DOMTimeStamp;
|
||||
callback Function = any (any... arguments);
|
||||
callback VoidFunction = void ();
|
||||
@@ -0,0 +1,505 @@
|
||||
namespace org.w3c.workers;
|
||||
|
||||
|
||||
// Downloaded from https://w3c.github.io/ServiceWorker/
|
||||
[SecureContext, Exposed=(Window,Worker)]
|
||||
interface ServiceWorker : EventTarget {
|
||||
readonly attribute USVString scriptURL;
|
||||
readonly attribute ServiceWorkerState state;
|
||||
void postMessage(any message, optional sequence<object> transfer);
|
||||
|
||||
// event
|
||||
attribute EventHandler onstatechange;
|
||||
};
|
||||
ServiceWorker implements AbstractWorker;
|
||||
|
||||
enum ServiceWorkerState {
|
||||
"installing",
|
||||
"installed",
|
||||
"activating",
|
||||
"activated",
|
||||
"redundant"
|
||||
};
|
||||
[SecureContext, Exposed=(Window,Worker)]
|
||||
interface ServiceWorkerRegistration : EventTarget {
|
||||
readonly attribute ServiceWorker? installing;
|
||||
readonly attribute ServiceWorker? waiting;
|
||||
readonly attribute ServiceWorker? active;
|
||||
|
||||
readonly attribute USVString scope;
|
||||
|
||||
[NewObject] Promise<void> update();
|
||||
[NewObject] Promise<boolean> unregister();
|
||||
|
||||
// event
|
||||
attribute EventHandler onupdatefound;
|
||||
};
|
||||
partial interface Navigator {
|
||||
[SecureContext, SameObject] readonly attribute ServiceWorkerContainer serviceWorker;
|
||||
};
|
||||
|
||||
partial interface WorkerNavigator {
|
||||
[SecureContext, SameObject] readonly attribute ServiceWorkerContainer serviceWorker;
|
||||
};
|
||||
[SecureContext, Exposed=(Window,Worker)]
|
||||
interface ServiceWorkerContainer : EventTarget {
|
||||
readonly attribute ServiceWorker? controller;
|
||||
[SameObject] readonly attribute Promise<ServiceWorkerRegistration> ready;
|
||||
|
||||
[NewObject] Promise<ServiceWorkerRegistration> register(USVString scriptURL, optional RegistrationOptions options);
|
||||
|
||||
[NewObject] Promise<any> getRegistration(optional USVString clientURL = "");
|
||||
[NewObject] Promise<sequence<ServiceWorkerRegistration>> getRegistrations();
|
||||
|
||||
void startMessages();
|
||||
|
||||
|
||||
// events
|
||||
attribute EventHandler oncontrollerchange;
|
||||
attribute EventHandler onmessage; // event.source of message events is ServiceWorker object
|
||||
};
|
||||
dictionary RegistrationOptions {
|
||||
USVString scope;
|
||||
WorkerType type = "classic";
|
||||
};
|
||||
[Constructor(DOMString type, optional ServiceWorkerMessageEventInit eventInitDict), Exposed=(Window,Worker)]
|
||||
interface ServiceWorkerMessageEvent : Event {
|
||||
readonly attribute any data;
|
||||
readonly attribute DOMString origin;
|
||||
readonly attribute DOMString lastEventId;
|
||||
[SameObject] readonly attribute (ServiceWorker or MessagePort)? source;
|
||||
readonly attribute FrozenArray<MessagePort>? ports;
|
||||
};
|
||||
dictionary ServiceWorkerMessageEventInit : EventInit {
|
||||
any data;
|
||||
DOMString origin;
|
||||
DOMString lastEventId;
|
||||
(ServiceWorker or MessagePort)? source;
|
||||
sequence<MessagePort>? ports;
|
||||
};
|
||||
[Global=(Worker,ServiceWorker), Exposed=ServiceWorker]
|
||||
interface ServiceWorkerGlobalScope : WorkerGlobalScope {
|
||||
// A container for a list of Client objects that correspond to
|
||||
// browsing contexts (or shared workers) that are on the origin of this SW
|
||||
[SameObject] readonly attribute Clients clients;
|
||||
[SameObject] readonly attribute ServiceWorkerRegistration registration;
|
||||
|
||||
[NewObject] Promise<void> skipWaiting();
|
||||
|
||||
attribute EventHandler oninstall;
|
||||
attribute EventHandler onactivate;
|
||||
attribute EventHandler onfetch;
|
||||
attribute EventHandler onforeignfetch;
|
||||
|
||||
// event
|
||||
attribute EventHandler onmessage; // event.source of the message events is Client object
|
||||
};
|
||||
[Exposed=ServiceWorker]
|
||||
interface Client {
|
||||
readonly attribute USVString url;
|
||||
readonly attribute FrameType frameType;
|
||||
readonly attribute DOMString id;
|
||||
void postMessage(any message, optional sequence<object> transfer);
|
||||
};
|
||||
|
||||
[Exposed=ServiceWorker]
|
||||
interface WindowClient : Client {
|
||||
readonly attribute VisibilityState visibilityState;
|
||||
readonly attribute boolean focused;
|
||||
[NewObject] Promise<WindowClient> focus();
|
||||
[NewObject] Promise<WindowClient> navigate(USVString url);
|
||||
};
|
||||
|
||||
enum FrameType {
|
||||
"auxiliary",
|
||||
"top-level",
|
||||
"nested",
|
||||
"none"
|
||||
};
|
||||
[Exposed=ServiceWorker]
|
||||
interface Clients {
|
||||
// The objects returned will be new instances every time
|
||||
[NewObject] Promise<any> get(DOMString id);
|
||||
[NewObject] Promise<sequence<Client>> matchAll(optional ClientQueryOptions options);
|
||||
[NewObject] Promise<WindowClient?> openWindow(USVString url);
|
||||
[NewObject] Promise<void> claim();
|
||||
};
|
||||
dictionary ClientQueryOptions {
|
||||
boolean includeUncontrolled = false;
|
||||
ClientType type = "window";
|
||||
};
|
||||
enum ClientType {
|
||||
"window",
|
||||
"worker",
|
||||
"sharedworker",
|
||||
"all"
|
||||
};
|
||||
[Constructor(DOMString type, optional ExtendableEventInit eventInitDict), Exposed=ServiceWorker]
|
||||
interface ExtendableEvent : Event {
|
||||
void waitUntil(Promise<any> f);
|
||||
};
|
||||
dictionary ExtendableEventInit : EventInit {
|
||||
// Defined for the forward compatibility across the derived events
|
||||
};
|
||||
[Constructor(DOMString type, optional ExtendableEventInit eventInitDict), Exposed=ServiceWorker]
|
||||
interface InstallEvent : ExtendableEvent {
|
||||
void registerForeignFetch(ForeignFetchOptions options);
|
||||
};
|
||||
|
||||
dictionary ForeignFetchOptions {
|
||||
required sequence<USVString> scopes;
|
||||
required sequence<USVString> origins;
|
||||
};
|
||||
[Constructor(DOMString type, FetchEventInit eventInitDict), Exposed=ServiceWorker]
|
||||
interface FetchEvent : ExtendableEvent {
|
||||
[SameObject] readonly attribute Request request;
|
||||
readonly attribute DOMString? clientId;
|
||||
readonly attribute boolean isReload;
|
||||
|
||||
void respondWith(Promise<Response> r);
|
||||
};
|
||||
dictionary FetchEventInit : ExtendableEventInit {
|
||||
required Request request;
|
||||
DOMString? clientId = null;
|
||||
boolean isReload = false;
|
||||
};
|
||||
[Constructor(DOMString type, ForeignFetchEventInit eventInitDict), Exposed=ServiceWorker]
|
||||
interface ForeignFetchEvent : ExtendableEvent {
|
||||
[SameObject] readonly attribute Request request;
|
||||
readonly attribute USVString origin;
|
||||
|
||||
void respondWith(Promise<ForeignFetchResponse> r);
|
||||
};
|
||||
|
||||
dictionary ForeignFetchEventInit : ExtendableEventInit {
|
||||
required Request request;
|
||||
USVString origin = "null";
|
||||
};
|
||||
|
||||
dictionary ForeignFetchResponse {
|
||||
required Response response;
|
||||
USVString origin;
|
||||
sequence<ByteString> headers;
|
||||
};
|
||||
[Constructor(DOMString type, optional ExtendableMessageEventInit eventInitDict), Exposed=ServiceWorker]
|
||||
interface ExtendableMessageEvent : ExtendableEvent {
|
||||
readonly attribute any data;
|
||||
readonly attribute DOMString origin;
|
||||
readonly attribute DOMString lastEventId;
|
||||
[SameObject] readonly attribute (Client or ServiceWorker or MessagePort)? source;
|
||||
readonly attribute FrozenArray<MessagePort>? ports;
|
||||
};
|
||||
dictionary ExtendableMessageEventInit : ExtendableEventInit {
|
||||
any data;
|
||||
DOMString origin;
|
||||
DOMString lastEventId;
|
||||
(Client or ServiceWorker or MessagePort)? source;
|
||||
sequence<MessagePort>? ports;
|
||||
};
|
||||
partial interface HTMLLinkElement {
|
||||
[CEReactions] attribute USVString scope;
|
||||
[CEReactions] attribute WorkerType workerType;
|
||||
};
|
||||
partial interface WindowOrWorkerGlobalScope {
|
||||
[SecureContext, SameObject] readonly attribute CacheStorage caches;
|
||||
};
|
||||
[SecureContext, Exposed=(Window,Worker)]
|
||||
interface Cache {
|
||||
[NewObject] Promise<any> match(RequestInfo request, optional CacheQueryOptions options);
|
||||
[NewObject] Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
|
||||
[NewObject] Promise<void> add(RequestInfo request);
|
||||
[NewObject] Promise<void> addAll(sequence<RequestInfo> requests);
|
||||
[NewObject] Promise<void> put(RequestInfo request, Response response);
|
||||
[NewObject] Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options);
|
||||
[NewObject] Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options);
|
||||
};
|
||||
dictionary CacheQueryOptions {
|
||||
boolean ignoreSearch = false;
|
||||
boolean ignoreMethod = false;
|
||||
boolean ignoreVary = false;
|
||||
DOMString cacheName;
|
||||
};
|
||||
dictionary CacheBatchOperation {
|
||||
DOMString type;
|
||||
Request request;
|
||||
Response response;
|
||||
CacheQueryOptions options;
|
||||
};
|
||||
[SecureContext, Exposed=(Window,Worker)]
|
||||
interface CacheStorage {
|
||||
[NewObject] Promise<any> match(RequestInfo request, optional CacheQueryOptions options);
|
||||
[NewObject] Promise<boolean> has(DOMString cacheName);
|
||||
[NewObject] Promise<Cache> open(DOMString cacheName);
|
||||
[NewObject] Promise<boolean> delete(DOMString cacheName);
|
||||
[NewObject] Promise<sequence<DOMString>> keys();
|
||||
};
|
||||
partial interface ServiceWorkerRegistration {
|
||||
// e.g. define an API namespace
|
||||
readonly attribute APISpaceType APISpace;
|
||||
// e.g. define a method
|
||||
Promise<T> methodName(/* list of arguments */);
|
||||
};
|
||||
// e.g. define FunctionalEvent interface
|
||||
interface FunctionalEvent : ExtendableEvent {
|
||||
// add a functional event’s own attributes and methods
|
||||
};
|
||||
partial interface ServiceWorkerGlobalScope {
|
||||
attribute EventHandler onfunctionalevent;
|
||||
};
|
||||
[SecureContext, Exposed=(Window,Worker)]
|
||||
interface ServiceWorker : EventTarget {
|
||||
readonly attribute USVString scriptURL;
|
||||
readonly attribute ServiceWorkerState state;
|
||||
void postMessage(any message, optional sequence<object> transfer);
|
||||
|
||||
// event
|
||||
attribute EventHandler onstatechange;
|
||||
};
|
||||
ServiceWorker implements AbstractWorker;
|
||||
|
||||
enum ServiceWorkerState {
|
||||
"installing",
|
||||
"installed",
|
||||
"activating",
|
||||
"activated",
|
||||
"redundant"
|
||||
};
|
||||
|
||||
[SecureContext, Exposed=(Window,Worker)]
|
||||
interface ServiceWorkerRegistration : EventTarget {
|
||||
readonly attribute ServiceWorker? installing;
|
||||
readonly attribute ServiceWorker? waiting;
|
||||
readonly attribute ServiceWorker? active;
|
||||
|
||||
readonly attribute USVString scope;
|
||||
|
||||
[NewObject] Promise<void> update();
|
||||
[NewObject] Promise<boolean> unregister();
|
||||
|
||||
// event
|
||||
attribute EventHandler onupdatefound;
|
||||
};
|
||||
|
||||
partial interface Navigator {
|
||||
[SecureContext, SameObject] readonly attribute ServiceWorkerContainer serviceWorker;
|
||||
};
|
||||
|
||||
partial interface WorkerNavigator {
|
||||
[SecureContext, SameObject] readonly attribute ServiceWorkerContainer serviceWorker;
|
||||
};
|
||||
|
||||
[SecureContext, Exposed=(Window,Worker)]
|
||||
interface ServiceWorkerContainer : EventTarget {
|
||||
readonly attribute ServiceWorker? controller;
|
||||
[SameObject] readonly attribute Promise<ServiceWorkerRegistration> ready;
|
||||
|
||||
[NewObject] Promise<ServiceWorkerRegistration> register(USVString scriptURL, optional RegistrationOptions options);
|
||||
|
||||
[NewObject] Promise<any> getRegistration(optional USVString clientURL = "");
|
||||
[NewObject] Promise<sequence<ServiceWorkerRegistration>> getRegistrations();
|
||||
|
||||
void startMessages();
|
||||
|
||||
|
||||
// events
|
||||
attribute EventHandler oncontrollerchange;
|
||||
attribute EventHandler onmessage; // event.source of message events is ServiceWorker object
|
||||
};
|
||||
|
||||
dictionary RegistrationOptions {
|
||||
USVString scope;
|
||||
WorkerType type = "classic";
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, optional ServiceWorkerMessageEventInit eventInitDict), Exposed=(Window,Worker)]
|
||||
interface ServiceWorkerMessageEvent : Event {
|
||||
readonly attribute any data;
|
||||
readonly attribute DOMString origin;
|
||||
readonly attribute DOMString lastEventId;
|
||||
[SameObject] readonly attribute (ServiceWorker or MessagePort)? source;
|
||||
readonly attribute FrozenArray<MessagePort>? ports;
|
||||
};
|
||||
|
||||
dictionary ServiceWorkerMessageEventInit : EventInit {
|
||||
any data;
|
||||
DOMString origin;
|
||||
DOMString lastEventId;
|
||||
(ServiceWorker or MessagePort)? source;
|
||||
sequence<MessagePort>? ports;
|
||||
};
|
||||
|
||||
[Global=(Worker,ServiceWorker), Exposed=ServiceWorker]
|
||||
interface ServiceWorkerGlobalScope : WorkerGlobalScope {
|
||||
// A container for a list of Client objects that correspond to
|
||||
// browsing contexts (or shared workers) that are on the origin of this SW
|
||||
[SameObject] readonly attribute Clients clients;
|
||||
[SameObject] readonly attribute ServiceWorkerRegistration registration;
|
||||
|
||||
[NewObject] Promise<void> skipWaiting();
|
||||
|
||||
attribute EventHandler oninstall;
|
||||
attribute EventHandler onactivate;
|
||||
attribute EventHandler onfetch;
|
||||
attribute EventHandler onforeignfetch;
|
||||
|
||||
// event
|
||||
attribute EventHandler onmessage; // event.source of the message events is Client object
|
||||
};
|
||||
|
||||
[Exposed=ServiceWorker]
|
||||
interface Client {
|
||||
readonly attribute USVString url;
|
||||
readonly attribute FrameType frameType;
|
||||
readonly attribute DOMString id;
|
||||
void postMessage(any message, optional sequence<object> transfer);
|
||||
};
|
||||
|
||||
[Exposed=ServiceWorker]
|
||||
interface WindowClient : Client {
|
||||
readonly attribute VisibilityState visibilityState;
|
||||
readonly attribute boolean focused;
|
||||
[NewObject] Promise<WindowClient> focus();
|
||||
[NewObject] Promise<WindowClient> navigate(USVString url);
|
||||
};
|
||||
|
||||
enum FrameType {
|
||||
"auxiliary",
|
||||
"top-level",
|
||||
"nested",
|
||||
"none"
|
||||
};
|
||||
|
||||
[Exposed=ServiceWorker]
|
||||
interface Clients {
|
||||
// The objects returned will be new instances every time
|
||||
[NewObject] Promise<any> get(DOMString id);
|
||||
[NewObject] Promise<sequence<Client>> matchAll(optional ClientQueryOptions options);
|
||||
[NewObject] Promise<WindowClient?> openWindow(USVString url);
|
||||
[NewObject] Promise<void> claim();
|
||||
};
|
||||
|
||||
dictionary ClientQueryOptions {
|
||||
boolean includeUncontrolled = false;
|
||||
ClientType type = "window";
|
||||
};
|
||||
|
||||
enum ClientType {
|
||||
"window",
|
||||
"worker",
|
||||
"sharedworker",
|
||||
"all"
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, optional ExtendableEventInit eventInitDict), Exposed=ServiceWorker]
|
||||
interface ExtendableEvent : Event {
|
||||
void waitUntil(Promise<any> f);
|
||||
};
|
||||
|
||||
dictionary ExtendableEventInit : EventInit {
|
||||
// Defined for the forward compatibility across the derived events
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, optional ExtendableEventInit eventInitDict), Exposed=ServiceWorker]
|
||||
interface InstallEvent : ExtendableEvent {
|
||||
void registerForeignFetch(ForeignFetchOptions options);
|
||||
};
|
||||
|
||||
dictionary ForeignFetchOptions {
|
||||
required sequence<USVString> scopes;
|
||||
required sequence<USVString> origins;
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, FetchEventInit eventInitDict), Exposed=ServiceWorker]
|
||||
interface FetchEvent : ExtendableEvent {
|
||||
[SameObject] readonly attribute Request request;
|
||||
readonly attribute DOMString? clientId;
|
||||
readonly attribute boolean isReload;
|
||||
|
||||
void respondWith(Promise<Response> r);
|
||||
};
|
||||
|
||||
dictionary FetchEventInit : ExtendableEventInit {
|
||||
required Request request;
|
||||
DOMString? clientId = null;
|
||||
boolean isReload = false;
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, ForeignFetchEventInit eventInitDict), Exposed=ServiceWorker]
|
||||
interface ForeignFetchEvent : ExtendableEvent {
|
||||
[SameObject] readonly attribute Request request;
|
||||
readonly attribute USVString origin;
|
||||
|
||||
void respondWith(Promise<ForeignFetchResponse> r);
|
||||
};
|
||||
|
||||
dictionary ForeignFetchEventInit : ExtendableEventInit {
|
||||
required Request request;
|
||||
USVString origin = "null";
|
||||
};
|
||||
|
||||
dictionary ForeignFetchResponse {
|
||||
required Response response;
|
||||
USVString origin;
|
||||
sequence<ByteString> headers;
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, optional ExtendableMessageEventInit eventInitDict), Exposed=ServiceWorker]
|
||||
interface ExtendableMessageEvent : ExtendableEvent {
|
||||
readonly attribute any data;
|
||||
readonly attribute DOMString origin;
|
||||
readonly attribute DOMString lastEventId;
|
||||
[SameObject] readonly attribute (Client or ServiceWorker or MessagePort)? source;
|
||||
readonly attribute FrozenArray<MessagePort>? ports;
|
||||
};
|
||||
|
||||
dictionary ExtendableMessageEventInit : ExtendableEventInit {
|
||||
any data;
|
||||
DOMString origin;
|
||||
DOMString lastEventId;
|
||||
(Client or ServiceWorker or MessagePort)? source;
|
||||
sequence<MessagePort>? ports;
|
||||
};
|
||||
|
||||
partial interface HTMLLinkElement {
|
||||
[CEReactions] attribute USVString scope;
|
||||
[CEReactions] attribute WorkerType workerType;
|
||||
};
|
||||
|
||||
partial interface WindowOrWorkerGlobalScope {
|
||||
[SecureContext, SameObject] readonly attribute CacheStorage caches;
|
||||
};
|
||||
|
||||
[SecureContext, Exposed=(Window,Worker)]
|
||||
interface Cache {
|
||||
[NewObject] Promise<any> match(RequestInfo request, optional CacheQueryOptions options);
|
||||
[NewObject] Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
|
||||
[NewObject] Promise<void> add(RequestInfo request);
|
||||
[NewObject] Promise<void> addAll(sequence<RequestInfo> requests);
|
||||
[NewObject] Promise<void> put(RequestInfo request, Response response);
|
||||
[NewObject] Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options);
|
||||
[NewObject] Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options);
|
||||
};
|
||||
|
||||
dictionary CacheQueryOptions {
|
||||
boolean ignoreSearch = false;
|
||||
boolean ignoreMethod = false;
|
||||
boolean ignoreVary = false;
|
||||
DOMString cacheName;
|
||||
};
|
||||
|
||||
dictionary CacheBatchOperation {
|
||||
DOMString type;
|
||||
Request request;
|
||||
Response response;
|
||||
CacheQueryOptions options;
|
||||
};
|
||||
|
||||
[SecureContext, Exposed=(Window,Worker)]
|
||||
interface CacheStorage {
|
||||
[NewObject] Promise<any> match(RequestInfo request, optional CacheQueryOptions options);
|
||||
[NewObject] Promise<boolean> has(DOMString cacheName);
|
||||
[NewObject] Promise<Cache> open(DOMString cacheName);
|
||||
[NewObject] Promise<boolean> delete(DOMString cacheName);
|
||||
[NewObject] Promise<sequence<DOMString>> keys();
|
||||
};
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
namespace org.w3c.xhr;
|
||||
|
||||
|
||||
// Downloaded from https://raw.githubusercontent.com/whatwg/xhr/master/Overview.src.html
|
||||
[Exposed=(Window,DedicatedWorker,SharedWorker)]
|
||||
interface XMLHttpRequestEventTarget : EventTarget {
|
||||
// event handlers
|
||||
attribute EventHandler onloadstart;
|
||||
attribute EventHandler onprogress;
|
||||
attribute EventHandler onabort;
|
||||
attribute EventHandler onerror;
|
||||
attribute EventHandler onload;
|
||||
attribute EventHandler ontimeout;
|
||||
attribute EventHandler onloadend;
|
||||
};
|
||||
|
||||
[Exposed=(Window,DedicatedWorker,SharedWorker)]
|
||||
interface XMLHttpRequestUpload : XMLHttpRequestEventTarget {
|
||||
};
|
||||
|
||||
enum XMLHttpRequestResponseType {
|
||||
"",
|
||||
"arraybuffer",
|
||||
"blob",
|
||||
"document",
|
||||
"json",
|
||||
"text"
|
||||
};
|
||||
|
||||
[Constructor,
|
||||
Exposed=(Window,DedicatedWorker,SharedWorker)]
|
||||
interface XMLHttpRequest : XMLHttpRequestEventTarget {
|
||||
// event handler
|
||||
attribute EventHandler onreadystatechange;
|
||||
|
||||
// states
|
||||
const unsigned short UNSENT = 0;
|
||||
const unsigned short OPENED = 1;
|
||||
const unsigned short HEADERS_RECEIVED = 2;
|
||||
const unsigned short LOADING = 3;
|
||||
const unsigned short DONE = 4;
|
||||
readonly attribute unsigned short readyState;
|
||||
|
||||
// request
|
||||
void open(ByteString method, USVString url);
|
||||
void open(ByteString method, USVString url, boolean async, optional USVString? username = null, optional USVString? password = null);
|
||||
void setRequestHeader(ByteString name, ByteString value);
|
||||
attribute unsigned long timeout;
|
||||
attribute boolean withCredentials;
|
||||
readonly attribute XMLHttpRequestUpload upload;
|
||||
void send(optional (Document or BodyInit)? body = null);
|
||||
void abort();
|
||||
|
||||
// response
|
||||
readonly attribute USVString responseURL;
|
||||
readonly attribute unsigned short status;
|
||||
readonly attribute ByteString statusText;
|
||||
ByteString? getResponseHeader(ByteString name);
|
||||
ByteString getAllResponseHeaders();
|
||||
void overrideMimeType(DOMString mime);
|
||||
attribute XMLHttpRequestResponseType responseType;
|
||||
readonly attribute any response;
|
||||
readonly attribute USVString responseText;
|
||||
[Exposed=Window] readonly attribute Document? responseXML;
|
||||
};
|
||||
typedef (File or USVString) FormDataEntryValue;
|
||||
|
||||
[Constructor(optional HTMLFormElement form),
|
||||
Exposed=(Window,Worker)]
|
||||
interface FormData {
|
||||
void append(USVString name, USVString value);
|
||||
void append(USVString name, Blob value, optional USVString filename);
|
||||
void delete(USVString name);
|
||||
FormDataEntryValue? get(USVString name);
|
||||
sequence<FormDataEntryValue> getAll(USVString name);
|
||||
boolean has(USVString name);
|
||||
void set(USVString name, USVString value);
|
||||
void set(USVString name, Blob value, optional USVString filename);
|
||||
iterable<USVString, FormDataEntryValue>;
|
||||
};
|
||||
[Constructor(DOMString type, optional ProgressEventInit eventInitDict),
|
||||
Exposed=(Window,DedicatedWorker,SharedWorker)]
|
||||
interface ProgressEvent : Event {
|
||||
readonly attribute boolean lengthComputable;
|
||||
readonly attribute unsigned long long loaded;
|
||||
readonly attribute unsigned long long total;
|
||||
};
|
||||
|
||||
dictionary ProgressEventInit : EventInit {
|
||||
boolean lengthComputable = false;
|
||||
unsigned long long loaded = 0;
|
||||
unsigned long long total = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user