diff --git a/libraries/idl/org.khronos.webgl.idl b/libraries/idl/org.khronos.webgl.idl index 7e029965020..2f8048686f3 100644 --- a/libraries/idl/org.khronos.webgl.idl +++ b/libraries/idl/org.khronos.webgl.idl @@ -24,7 +24,7 @@ typedef octet GLubyte; /* 'octet' should be an unsigned 8 bit ty typedef unsigned short GLushort; typedef unsigned long GLuint; typedef unrestricted float GLfloat; -typedef unrestricted float GLclampf; +typedef unrestricted float GLclampf; dictionary WebGLContextAttributes { @@ -74,6 +74,14 @@ interface WebGLShaderPrecisionFormat { readonly attribute GLint precision; }; +typedef (ArrayBuffer or ArrayBufferView) BufferDataSource; +typedef (ImageBitmap or + ImageData or + HTMLImageElement or + HTMLCanvasElement or + HTMLVideoElement) TexImageSource; +typedef (Float32Array or sequence) VertexAttribFVSource; + [NoInterfaceObject] interface WebGLRenderingContextBase { @@ -82,7 +90,7 @@ interface WebGLRenderingContextBase const GLenum DEPTH_BUFFER_BIT = 0x00000100; const GLenum STENCIL_BUFFER_BIT = 0x00000400; const GLenum COLOR_BUFFER_BIT = 0x00004000; - + /* BeginMode */ const GLenum POINTS = 0x0000; const GLenum LINES = 0x0001; @@ -91,7 +99,7 @@ interface WebGLRenderingContextBase const GLenum TRIANGLES = 0x0004; const GLenum TRIANGLE_STRIP = 0x0005; const GLenum TRIANGLE_FAN = 0x0006; - + /* AlphaFunction (not supported in ES20) */ /* NEVER */ /* LESS */ @@ -101,7 +109,7 @@ interface WebGLRenderingContextBase /* NOTEQUAL */ /* GEQUAL */ /* ALWAYS */ - + /* BlendingFactorDest */ const GLenum ZERO = 0; const GLenum ONE = 1; @@ -111,7 +119,7 @@ interface WebGLRenderingContextBase const GLenum ONE_MINUS_SRC_ALPHA = 0x0303; const GLenum DST_ALPHA = 0x0304; const GLenum ONE_MINUS_DST_ALPHA = 0x0305; - + /* BlendingFactorSrc */ /* ZERO */ /* ONE */ @@ -122,17 +130,17 @@ interface WebGLRenderingContextBase /* ONE_MINUS_SRC_ALPHA */ /* DST_ALPHA */ /* ONE_MINUS_DST_ALPHA */ - + /* BlendEquationSeparate */ const GLenum FUNC_ADD = 0x8006; const GLenum BLEND_EQUATION = 0x8009; const GLenum BLEND_EQUATION_RGB = 0x8009; /* same as BLEND_EQUATION */ const GLenum BLEND_EQUATION_ALPHA = 0x883D; - + /* BlendSubtract */ const GLenum FUNC_SUBTRACT = 0x800A; const GLenum FUNC_REVERSE_SUBTRACT = 0x800B; - + /* Separate Blend Functions */ const GLenum BLEND_DST_RGB = 0x80C8; const GLenum BLEND_SRC_RGB = 0x80C9; @@ -143,27 +151,27 @@ interface WebGLRenderingContextBase const GLenum CONSTANT_ALPHA = 0x8003; const GLenum ONE_MINUS_CONSTANT_ALPHA = 0x8004; const GLenum BLEND_COLOR = 0x8005; - + /* Buffer Objects */ const GLenum ARRAY_BUFFER = 0x8892; const GLenum ELEMENT_ARRAY_BUFFER = 0x8893; const GLenum ARRAY_BUFFER_BINDING = 0x8894; const GLenum ELEMENT_ARRAY_BUFFER_BINDING = 0x8895; - + const GLenum STREAM_DRAW = 0x88E0; const GLenum STATIC_DRAW = 0x88E4; const GLenum DYNAMIC_DRAW = 0x88E8; - + const GLenum BUFFER_SIZE = 0x8764; const GLenum BUFFER_USAGE = 0x8765; - + const GLenum CURRENT_VERTEX_ATTRIB = 0x8626; - + /* CullFaceMode */ const GLenum FRONT = 0x0404; const GLenum BACK = 0x0405; const GLenum FRONT_AND_BACK = 0x0408; - + /* DepthFunction */ /* NEVER */ /* LESS */ @@ -173,7 +181,7 @@ interface WebGLRenderingContextBase /* NOTEQUAL */ /* GEQUAL */ /* ALWAYS */ - + /* EnableCap */ /* TEXTURE_2D */ const GLenum CULL_FACE = 0x0B44; @@ -185,18 +193,18 @@ interface WebGLRenderingContextBase const GLenum POLYGON_OFFSET_FILL = 0x8037; const GLenum SAMPLE_ALPHA_TO_COVERAGE = 0x809E; const GLenum SAMPLE_COVERAGE = 0x80A0; - + /* ErrorCode */ const GLenum NO_ERROR = 0; const GLenum INVALID_ENUM = 0x0500; const GLenum INVALID_VALUE = 0x0501; const GLenum INVALID_OPERATION = 0x0502; const GLenum OUT_OF_MEMORY = 0x0505; - + /* FrontFaceDirection */ const GLenum CW = 0x0900; const GLenum CCW = 0x0901; - + /* GetPName */ const GLenum LINE_WIDTH = 0x0B21; const GLenum ALIASED_POINT_SIZE_RANGE = 0x846D; @@ -246,23 +254,23 @@ interface WebGLRenderingContextBase const GLenum SAMPLES = 0x80A9; const GLenum SAMPLE_COVERAGE_VALUE = 0x80AA; const GLenum SAMPLE_COVERAGE_INVERT = 0x80AB; - + /* GetTextureParameter */ /* TEXTURE_MAG_FILTER */ /* TEXTURE_MIN_FILTER */ /* TEXTURE_WRAP_S */ /* TEXTURE_WRAP_T */ - + const GLenum COMPRESSED_TEXTURE_FORMATS = 0x86A3; - + /* HintMode */ const GLenum DONT_CARE = 0x1100; const GLenum FASTEST = 0x1101; const GLenum NICEST = 0x1102; - + /* HintTarget */ const GLenum GENERATE_MIPMAP_HINT = 0x8192; - + /* DataType */ const GLenum BYTE = 0x1400; const GLenum UNSIGNED_BYTE = 0x1401; @@ -271,7 +279,7 @@ interface WebGLRenderingContextBase const GLenum INT = 0x1404; const GLenum UNSIGNED_INT = 0x1405; const GLenum FLOAT = 0x1406; - + /* PixelFormat */ const GLenum DEPTH_COMPONENT = 0x1902; const GLenum ALPHA = 0x1906; @@ -279,13 +287,13 @@ interface WebGLRenderingContextBase const GLenum RGBA = 0x1908; const GLenum LUMINANCE = 0x1909; const GLenum LUMINANCE_ALPHA = 0x190A; - + /* PixelType */ /* UNSIGNED_BYTE */ const GLenum UNSIGNED_SHORT_4_4_4_4 = 0x8033; const GLenum UNSIGNED_SHORT_5_5_5_1 = 0x8034; const GLenum UNSIGNED_SHORT_5_6_5 = 0x8363; - + /* Shaders */ const GLenum FRAGMENT_SHADER = 0x8B30; const GLenum VERTEX_SHADER = 0x8B31; @@ -305,7 +313,7 @@ interface WebGLRenderingContextBase const GLenum ACTIVE_ATTRIBUTES = 0x8B89; const GLenum SHADING_LANGUAGE_VERSION = 0x8B8C; const GLenum CURRENT_PROGRAM = 0x8B8D; - + /* StencilFunction */ const GLenum NEVER = 0x0200; const GLenum LESS = 0x0201; @@ -315,7 +323,7 @@ interface WebGLRenderingContextBase const GLenum NOTEQUAL = 0x0205; const GLenum GEQUAL = 0x0206; const GLenum ALWAYS = 0x0207; - + /* StencilOp */ /* ZERO */ const GLenum KEEP = 0x1E00; @@ -325,16 +333,16 @@ interface WebGLRenderingContextBase const GLenum INVERT = 0x150A; const GLenum INCR_WRAP = 0x8507; const GLenum DECR_WRAP = 0x8508; - + /* StringName */ const GLenum VENDOR = 0x1F00; const GLenum RENDERER = 0x1F01; const GLenum VERSION = 0x1F02; - + /* TextureMagFilter */ const GLenum NEAREST = 0x2600; const GLenum LINEAR = 0x2601; - + /* TextureMinFilter */ /* NEAREST */ /* LINEAR */ @@ -342,17 +350,17 @@ interface WebGLRenderingContextBase const GLenum LINEAR_MIPMAP_NEAREST = 0x2701; const GLenum NEAREST_MIPMAP_LINEAR = 0x2702; const GLenum LINEAR_MIPMAP_LINEAR = 0x2703; - + /* TextureParameterName */ const GLenum TEXTURE_MAG_FILTER = 0x2800; const GLenum TEXTURE_MIN_FILTER = 0x2801; const GLenum TEXTURE_WRAP_S = 0x2802; const GLenum TEXTURE_WRAP_T = 0x2803; - + /* TextureTarget */ const GLenum TEXTURE_2D = 0x0DE1; const GLenum TEXTURE = 0x1702; - + const GLenum TEXTURE_CUBE_MAP = 0x8513; const GLenum TEXTURE_BINDING_CUBE_MAP = 0x8514; const GLenum TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; @@ -362,7 +370,7 @@ interface WebGLRenderingContextBase const GLenum TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; const GLenum MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; - + /* TextureUnit */ const GLenum TEXTURE0 = 0x84C0; const GLenum TEXTURE1 = 0x84C1; @@ -397,12 +405,12 @@ interface WebGLRenderingContextBase const GLenum TEXTURE30 = 0x84DE; const GLenum TEXTURE31 = 0x84DF; const GLenum ACTIVE_TEXTURE = 0x84E0; - + /* TextureWrapMode */ const GLenum REPEAT = 0x2901; const GLenum CLAMP_TO_EDGE = 0x812F; const GLenum MIRRORED_REPEAT = 0x8370; - + /* Uniform Types */ const GLenum FLOAT_VEC2 = 0x8B50; const GLenum FLOAT_VEC3 = 0x8B51; @@ -419,7 +427,7 @@ interface WebGLRenderingContextBase const GLenum FLOAT_MAT4 = 0x8B5C; const GLenum SAMPLER_2D = 0x8B5E; const GLenum SAMPLER_CUBE = 0x8B60; - + /* Vertex Arrays */ const GLenum VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622; const GLenum VERTEX_ATTRIB_ARRAY_SIZE = 0x8623; @@ -428,14 +436,14 @@ interface WebGLRenderingContextBase const GLenum VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A; const GLenum VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; const GLenum VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; - + /* Read Format */ const GLenum IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A; const GLenum IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; /* Shader Source */ const GLenum COMPILE_STATUS = 0x8B81; - + /* Shader Precision-Specified Types */ const GLenum LOW_FLOAT = 0x8DF0; const GLenum MEDIUM_FLOAT = 0x8DF1; @@ -443,11 +451,11 @@ interface WebGLRenderingContextBase const GLenum LOW_INT = 0x8DF3; const GLenum MEDIUM_INT = 0x8DF4; const GLenum HIGH_INT = 0x8DF5; - + /* Framebuffer Object. */ const GLenum FRAMEBUFFER = 0x8D40; const GLenum RENDERBUFFER = 0x8D41; - + const GLenum RGBA4 = 0x8056; const GLenum RGB5_A1 = 0x8057; const GLenum RGB565 = 0x8D62; @@ -455,7 +463,7 @@ interface WebGLRenderingContextBase const GLenum STENCIL_INDEX = 0x1901; const GLenum STENCIL_INDEX8 = 0x8D48; const GLenum DEPTH_STENCIL = 0x84F9; - + const GLenum RENDERBUFFER_WIDTH = 0x8D42; const GLenum RENDERBUFFER_HEIGHT = 0x8D43; const GLenum RENDERBUFFER_INTERNAL_FORMAT = 0x8D44; @@ -465,31 +473,31 @@ interface WebGLRenderingContextBase const GLenum RENDERBUFFER_ALPHA_SIZE = 0x8D53; const GLenum RENDERBUFFER_DEPTH_SIZE = 0x8D54; const GLenum RENDERBUFFER_STENCIL_SIZE = 0x8D55; - + const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0; const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1; const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2; const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3; - + const GLenum COLOR_ATTACHMENT0 = 0x8CE0; const GLenum DEPTH_ATTACHMENT = 0x8D00; const GLenum STENCIL_ATTACHMENT = 0x8D20; const GLenum DEPTH_STENCIL_ATTACHMENT = 0x821A; - + const GLenum NONE = 0; - + const GLenum FRAMEBUFFER_COMPLETE = 0x8CD5; const GLenum FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6; const GLenum FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7; const GLenum FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9; const GLenum FRAMEBUFFER_UNSUPPORTED = 0x8CDD; - + const GLenum FRAMEBUFFER_BINDING = 0x8CA6; const GLenum RENDERBUFFER_BINDING = 0x8CA7; const GLenum MAX_RENDERBUFFER_SIZE = 0x84E8; - + const GLenum INVALID_FRAMEBUFFER_OPERATION = 0x0506; - + /* WebGL-specific enums */ const GLenum UNPACK_FLIP_Y_WEBGL = 0x9240; const GLenum UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241; @@ -503,7 +511,7 @@ interface WebGLRenderingContextBase [WebGLHandlesContextLoss] WebGLContextAttributes? getContextAttributes(); [WebGLHandlesContextLoss] boolean isContextLost(); - + sequence? getSupportedExtensions(); object? getExtension(DOMString name); @@ -518,10 +526,9 @@ interface WebGLRenderingContextBase void blendEquation(GLenum mode); void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); void blendFunc(GLenum sfactor, GLenum dfactor); - void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, + void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); - typedef (ArrayBuffer or ArrayBufferView) BufferDataSource; void bufferData(GLenum target, GLsizeiptr size, GLenum usage); void bufferData(GLenum target, BufferDataSource? data, GLenum usage); void bufferSubData(GLenum target, GLintptr offset, BufferDataSource? data); @@ -542,10 +549,10 @@ interface WebGLRenderingContextBase GLsizei width, GLsizei height, GLenum format, ArrayBufferView data); - void copyTexImage2D(GLenum target, GLint level, GLenum internalformat, - GLint x, GLint y, GLsizei width, GLsizei height, + void copyTexImage2D(GLenum target, GLint level, GLenum internalformat, + GLint x, GLint y, GLsizei width, GLsizei height, GLint border); - void copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + void copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); WebGLBuffer? createBuffer(); @@ -577,10 +584,10 @@ interface WebGLRenderingContextBase void enableVertexAttribArray(GLuint index); void finish(); void flush(); - void framebufferRenderbuffer(GLenum target, GLenum attachment, - GLenum renderbuffertarget, + void framebufferRenderbuffer(GLenum target, GLenum attachment, + GLenum renderbuffertarget, WebGLRenderbuffer? renderbuffer); - void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, + void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, WebGLTexture? texture, GLint level); void frontFace(GLenum mode); @@ -597,7 +604,7 @@ interface WebGLRenderingContextBase [WebGLHandlesContextLoss] GLenum getError(); - any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, + any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, GLenum pname); any getProgramParameter(WebGLProgram? program, GLenum pname); DOMString? getProgramInfoLog(WebGLProgram? program); @@ -616,7 +623,7 @@ interface WebGLRenderingContextBase any getVertexAttrib(GLuint index, GLenum pname); - [WebGLHandlesContextLoss] GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname); + [WebGLHandlesContextLoss] GLintptr getVertexAttribOffset(GLuint index, GLenum pname); void hint(GLenum target, GLenum mode); [WebGLHandlesContextLoss] GLboolean isBuffer(WebGLBuffer? buffer); @@ -631,10 +638,10 @@ interface WebGLRenderingContextBase void pixelStorei(GLenum pname, GLint param); void polygonOffset(GLfloat factor, GLfloat units); - void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, + void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, ArrayBufferView? pixels); - void renderbufferStorage(GLenum target, GLenum internalformat, + void renderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); void sampleCoverage(GLclampf value, GLboolean invert); void scissor(GLint x, GLint y, GLsizei width, GLsizei height); @@ -648,23 +655,19 @@ interface WebGLRenderingContextBase void stencilOp(GLenum fail, GLenum zfail, GLenum zpass); void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); - typedef (ImageData or - HTMLImageElement or - HTMLCanvasElement or - HTMLVideoElement) TexImageSource; - void texImage2D(GLenum target, GLint level, GLenum internalformat, - GLsizei width, GLsizei height, GLint border, GLenum format, + void texImage2D(GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, ArrayBufferView? pixels); - void texImage2D(GLenum target, GLint level, GLenum internalformat, + void texImage2D(GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type, TexImageSource? source); // May throw DOMException void texParameterf(GLenum target, GLenum pname, GLfloat param); void texParameteri(GLenum target, GLenum pname, GLint param); - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, + void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLenum type, ArrayBufferView? pixels); - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLenum format, GLenum type, TexImageSource? source); // May throw DOMException void uniform1f(WebGLUniformLocation? location, GLfloat x); @@ -692,35 +695,31 @@ interface WebGLRenderingContextBase void uniform4iv(WebGLUniformLocation? location, Int32Array v); void uniform4iv(WebGLUniformLocation? location, sequence v); - void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, + void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value); - void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, + void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, sequence value); - void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, + void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value); - void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, + void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, sequence value); - void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, + void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value); - void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, + void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, sequence value); void useProgram(WebGLProgram? program); void validateProgram(WebGLProgram? program); - void vertexAttrib1f(GLuint indx, GLfloat x); - void vertexAttrib1fv(GLuint indx, Float32Array values); - void vertexAttrib1fv(GLuint indx, sequence values); - void vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y); - void vertexAttrib2fv(GLuint indx, Float32Array values); - void vertexAttrib2fv(GLuint indx, sequence values); - void vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z); - void vertexAttrib3fv(GLuint indx, Float32Array values); - void vertexAttrib3fv(GLuint indx, sequence values); - void vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void vertexAttrib4fv(GLuint indx, Float32Array values); - void vertexAttrib4fv(GLuint indx, sequence values); - void vertexAttribPointer(GLuint indx, GLint size, GLenum type, + void vertexAttrib1f(GLuint index, GLfloat x); + void vertexAttrib1fv(GLuint index, VertexAttribFVSource values); + void vertexAttrib2f(GLuint index, GLfloat x, GLfloat y); + void vertexAttrib2fv(GLuint index, VertexAttribFVSource values); + void vertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z); + void vertexAttrib3fv(GLuint index, VertexAttribFVSource values); + void vertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + void vertexAttrib4fv(GLuint index, VertexAttribFVSource values); + void vertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); void viewport(GLint x, GLint y, GLsizei width, GLsizei height); @@ -739,7 +738,7 @@ interface WebGLContextEvent : Event { // EventInit is defined in the DOM4 specification. dictionary WebGLContextEventInit : EventInit { - DOMString statusMessage; + DOMString statusMessage = ""; }; // Downloaded from https://www.khronos.org/registry/typedarray/specs/latest/typedarray.idl diff --git a/libraries/idl/org.w3c.dom.css.idl b/libraries/idl/org.w3c.dom.css.idl index d701488b6ce..a43d39e059a 100644 --- a/libraries/idl/org.w3c.dom.css.idl +++ b/libraries/idl/org.w3c.dom.css.idl @@ -1,8 +1,9 @@ namespace org.w3c.dom.css; -// Downloaded from http://dev.w3.org/csswg/cssom/ -[ArrayClass]interface MediaList { +// 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); @@ -24,26 +25,26 @@ interface CSSStyleSheet : StyleSheet { unsigned long insertRule(DOMString rule, unsigned long index); void deleteRule(unsigned long index); }; -[ArrayClass]interface StyleSheetList { +[ArrayClass] +interface StyleSheetList { getter StyleSheet? item(unsigned long index); readonly attribute unsigned long length; }; -partial interface Document { [SameObject] readonly attribute StyleSheetList styleSheets; - attribute DOMString? selectedStyleSheetSet; - readonly attribute DOMString? lastStyleSheetSet; - readonly attribute DOMString? preferredStyleSheetSet; - readonly attribute DOMString[] styleSheetSets; - void enableStyleSheetsForSet(DOMString? name); +partial interface Document { + [SameObject] readonly attribute StyleSheetList styleSheets; }; -[NoInterfaceObject]interface LinkStyle { +[NoInterfaceObject] +interface LinkStyle { readonly attribute StyleSheet? sheet; }; ProcessingInstruction implements LinkStyle; -[ArrayClass]interface CSSRuleList { +[ArrayClass] +interface CSSRuleList { getter CSSRule? item(unsigned long index); readonly attribute unsigned long length; }; -interface CSSRule { const unsigned short STYLE_RULE = 1; +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; @@ -56,72 +57,72 @@ interface CSSRule { const unsigned short STYLE_RULE = 1; readonly attribute CSSRule? parentRule; readonly attribute CSSStyleSheet? parentStyleSheet; }; -interface CSSStyleRule : CSSRule { attribute DOMString selectorText; +interface CSSStyleRule : CSSRule { + attribute DOMString selectorText; [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; }; -interface CSSImportRule : CSSRule { readonly attribute DOMString href; +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; +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 CSSMediaRule : CSSGroupingRule { + [SameObject, PutForwards=mediaText] readonly attribute MediaList media; }; -interface CSSPageRule : CSSGroupingRule { attribute DOMString selectorText; +interface CSSPageRule : CSSGroupingRule { + attribute DOMString selectorText; [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; }; -interface CSSMarginRule : CSSRule { readonly attribute DOMString name; +interface CSSMarginRule : CSSRule { + readonly attribute DOMString name; [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; }; -interface CSSNamespaceRule : CSSRule { [TreatNullAs=EmptyString] attribute DOMString namespaceURI; - [TreatNullAs=EmptyString] attribute DOMString prefix; +interface CSSNamespaceRule : CSSRule { + readonly attribute DOMString namespaceURI; + readonly attribute DOMString prefix; }; -interface CSSStyleDeclaration { attribute DOMString cssText; +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); - void setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value, [TreatNullAs=EmptyString] optional DOMString priority = ""); - void setPropertyValue(DOMString property, [TreatNullAs=EmptyString] DOMString value); - void setPropertyPriority(DOMString property, [TreatNullAs=EmptyString] DOMString priority); - DOMString removeProperty(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; - [TreatNullAs=EmptyString] attribute DOMString cssFloat; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString cssFloat; }; -partial interface CSSStyleDeclaration { [TreatNullAs=EmptyString] attribute DOMString _dashed_attribute; +partial interface CSSStyleDeclaration { + [CEReactions, TreatNullAs=EmptyString] attribute DOMString _dashed_attribute; }; -[NoInterfaceObject]interface ElementCSSInlineStyle { +[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); +partial interface Window { + [NewObject] CSSStyleDeclaration getComputedStyle(Element elt, optional DOMString? pseudoElt); }; -[NoInterfaceObject]interface GetStyleUtils { - [SameObject] readonly attribute CSSStyleDeclaration cascadedStyle; - [SameObject] readonly attribute CSSStyleDeclaration defaultStyle; - [SameObject] readonly attribute CSSStyleDeclaration rawComputedStyle; - [SameObject] readonly attribute CSSStyleDeclaration usedStyle; +interface CSS { + static DOMString escape(DOMString ident); }; -partial interface Element { PseudoElement? pseudo(DOMString pseudoElt); -}; - -Element implements GetStyleUtils; -interface PseudoElement { -}; - -PseudoElement implements GetStyleUtils; -interface CSS { static DOMString escape(DOMString ident); -}; -[ArrayClass]interface MediaList { +[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; @@ -139,26 +140,30 @@ interface CSSStyleSheet : StyleSheet { void deleteRule(unsigned long index); }; -[ArrayClass]interface StyleSheetList { +[ArrayClass] +interface StyleSheetList { getter StyleSheet? item(unsigned long index); readonly attribute unsigned long length; }; -partial interface Document { [SameObject] readonly attribute StyleSheetList styleSheets; - attribute DOMString? selectedStyleSheetSet; - readonly attribute DOMString? lastStyleSheetSet; - readonly attribute DOMString? preferredStyleSheetSet; - readonly attribute DOMString[] styleSheetSets; - void enableStyleSheetsForSet(DOMString? name); + +partial interface Document { + [SameObject] readonly attribute StyleSheetList styleSheets; }; -[NoInterfaceObject]interface LinkStyle { + +[NoInterfaceObject] +interface LinkStyle { readonly attribute StyleSheet? sheet; }; + ProcessingInstruction implements LinkStyle; -[ArrayClass]interface CSSRuleList { +[ArrayClass] +interface CSSRuleList { getter CSSRule? item(unsigned long index); readonly attribute unsigned long length; }; -interface CSSRule { const unsigned short STYLE_RULE = 1; + +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; @@ -171,65 +176,83 @@ interface CSSRule { const unsigned short STYLE_RULE = 1; readonly attribute CSSRule? parentRule; readonly attribute CSSStyleSheet? parentStyleSheet; }; -interface CSSStyleRule : CSSRule { attribute DOMString selectorText; + +interface CSSStyleRule : CSSRule { + attribute DOMString selectorText; [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; }; -interface CSSImportRule : CSSRule { readonly attribute DOMString href; + +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; + +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 CSSMediaRule : CSSGroupingRule { + [SameObject, PutForwards=mediaText] readonly attribute MediaList media; }; -interface CSSPageRule : CSSGroupingRule { attribute DOMString selectorText; + +interface CSSPageRule : CSSGroupingRule { + attribute DOMString selectorText; [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; }; -interface CSSMarginRule : CSSRule { readonly attribute DOMString name; + +interface CSSMarginRule : CSSRule { + readonly attribute DOMString name; [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; }; -interface CSSNamespaceRule : CSSRule { [TreatNullAs=EmptyString] attribute DOMString namespaceURI; - [TreatNullAs=EmptyString] attribute DOMString prefix; + +interface CSSNamespaceRule : CSSRule { + readonly attribute DOMString namespaceURI; + readonly attribute DOMString prefix; }; -interface CSSStyleDeclaration { attribute DOMString cssText; + +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); - void setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value, [TreatNullAs=EmptyString] optional DOMString priority = ""); - void setPropertyValue(DOMString property, [TreatNullAs=EmptyString] DOMString value); - void setPropertyPriority(DOMString property, [TreatNullAs=EmptyString] DOMString priority); - DOMString removeProperty(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; - [TreatNullAs=EmptyString] attribute DOMString cssFloat; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString cssFloat; }; -partial interface CSSStyleDeclaration { [TreatNullAs=EmptyString] attribute DOMString _camel_cased_attribute; + +partial interface CSSStyleDeclaration { + [CEReactions, TreatNullAs=EmptyString] attribute DOMString _camel_cased_attribute; }; -partial interface CSSStyleDeclaration { [TreatNullAs=EmptyString] attribute DOMString _dashed_attribute; + +partial interface CSSStyleDeclaration { + [CEReactions, TreatNullAs=EmptyString] attribute DOMString _webkit_cased_attribute; }; -[NoInterfaceObject]interface ElementCSSInlineStyle { + +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); -}; -[NoInterfaceObject]interface GetStyleUtils { - [SameObject] readonly attribute CSSStyleDeclaration cascadedStyle; - [SameObject] readonly attribute CSSStyleDeclaration defaultStyle; - [SameObject] readonly attribute CSSStyleDeclaration rawComputedStyle; - [SameObject] readonly attribute CSSStyleDeclaration usedStyle; -}; -partial interface Element { PseudoElement? pseudo(DOMString pseudoElt); + +partial interface Window { + [NewObject] CSSStyleDeclaration getComputedStyle(Element elt, optional DOMString? pseudoElt); }; -Element implements GetStyleUtils; -interface PseudoElement { -}; - -PseudoElement implements GetStyleUtils; -interface CSS { static DOMString escape(DOMString ident); +interface CSS { + static DOMString escape(DOMString ident); }; diff --git a/libraries/idl/org.w3c.dom.events.idl b/libraries/idl/org.w3c.dom.events.idl index 7464fb50e33..18fde5edb8c 100644 --- a/libraries/idl/org.w3c.dom.events.idl +++ b/libraries/idl/org.w3c.dom.events.idl @@ -4,160 +4,279 @@ 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; + readonly attribute Window? view; + readonly attribute long detail; }; dictionary UIEventInit : EventInit { - Window? view = null; - long detail = 0; + Window? view = null; + long detail = 0; }; -[Constructor(DOMString typeArg, optional FocusEventInit focusEventInitDict)] +[Constructor(DOMString type, optional FocusEventInit eventInitDict)] interface FocusEvent : UIEvent { - readonly attribute EventTarget? relatedTarget; + readonly attribute EventTarget? relatedTarget; }; dictionary FocusEventInit : UIEventInit { - EventTarget? relatedTarget = null; + EventTarget? relatedTarget = null; }; -[Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict)] +[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 EventTarget? relatedTarget; - // Introduced in this specification - readonly attribute unsigned short buttons; - boolean getModifierState (DOMString keyArg); + 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; + 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 modifierOS = false; - boolean modifierScrollLock = false; - boolean modifierSuper = false; - boolean modifierSymbol = false; - boolean modifierSymbolLock = false; + 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 typeArg, optional WheelEventInit wheelEventInitDict)] +[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; + // 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; + double deltaX = 0.0; + double deltaY = 0.0; + double deltaZ = 0.0; + unsigned long deltaMode = 0; }; -[Constructor(DOMString typeArg, optional KeyboardEventInit keyboardEventInitDict)] +[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); + // 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; + DOMString key = ""; + DOMString code = ""; + unsigned long location = 0; + boolean repeat = false; + boolean isComposing = false; }; -[Constructor(DOMString typeArg, optional CompositionEventInit compositionEventInitDict)] +[Constructor(DOMString type, optional CompositionEventInit eventInitDict)] interface CompositionEvent : UIEvent { - readonly attribute DOMString data; + readonly attribute DOMString data; }; dictionary CompositionEventInit : UIEventInit { - DOMString data = ""; -}; -partial interface CustomEvent { - // Originally introduced (and deprecated) in this specification - void initCustomEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, any detailArg); -}; -partial interface UIEvent { - // Deprecated in this specification - void initUIEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg); -}; -partial interface FocusEvent { - // Originally introduced (and deprecated) in this specification - void initFocusEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg, EventTarget? relatedTargetArg); -}; -partial interface MouseEvent { - // Deprecated in this specification - void initMouseEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg, long screenXArg, long screenYArg, long clientXArg, long clientYArg, boolean ctrlKeyArg, boolean altKeyArg, boolean shiftKeyArg, boolean metaKeyArg, short buttonArg, EventTarget? relatedTargetArg); -}; -partial interface WheelEvent { - // Originally introduced (and deprecated) in this specification - void initWheelEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg, long screenXArg, long screenYArg, long clientXArg, long clientYArg, short buttonArg, EventTarget? relatedTargetArg, DOMString modifiersListArg, double deltaXArg, double deltaYArg, double deltaZArg, unsigned long deltaMode); + DOMString data = ""; }; partial interface KeyboardEvent { - // Originally introduced (and deprecated) in this specification - void initKeyboardEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, DOMString keyArg, unsigned long locationArg, DOMString modifiersListArg, boolean repeat, DOMString locale); + // The following support legacy user agents + readonly attribute unsigned long charCode; + readonly attribute unsigned long keyCode; + readonly attribute unsigned long which; }; -partial interface CompositionEvent { - // Originally introduced (and deprecated) in this specification - void initCompositionEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, DOMString dataArg, DOMString locale); -}; -partial interface KeyboardEvent { - // The following support legacy user agents - readonly attribute unsigned long charCode; - readonly attribute unsigned long keyCode; - readonly attribute unsigned long which; -}; -partial dictionary KeyboardEventInit { - unsigned long charCode = 0; - unsigned long keyCode = 0; - unsigned long which = 0; -}; -interface MutationEvent : Event { - // attrChangeType - const unsigned short MODIFICATION = 1; - const unsigned short ADDITION = 2; - const unsigned short REMOVAL = 3; - readonly attribute Node? relatedNode; - readonly attribute DOMString prevValue; - readonly attribute DOMString newValue; - readonly attribute DOMString attrName; - readonly attribute unsigned short attrChange; - void initMutationEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Node? relatedNodeArg, DOMString prevValueArg, DOMString newValueArg, DOMString attrNameArg, unsigned short attrChangeArg); +[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; }; diff --git a/libraries/idl/org.w3c.dom.idl b/libraries/idl/org.w3c.dom.idl index 962b07f3808..78b1fac6c38 100644 --- a/libraries/idl/org.w3c.dom.idl +++ b/libraries/idl/org.w3c.dom.idl @@ -2,75 +2,47 @@ namespace org.w3c.dom; // Downloaded from https://raw.githubusercontent.com/whatwg/html-mirror/master/source -typedef (Int8Array or Uint8Array or Uint8ClampedArray or - Int16Array or Uint16Array or - Int32Array or Uint32Array or - Float32Array or Float64Array or - DataView) ArrayBufferView; -interface HTMLAllCollection : HTMLCollection { - // inherits length and 'getter' - Element? item(unsigned long index); - (HTMLCollection or Element)? item(DOMString name); - legacycaller getter (HTMLCollection or Element)? namedItem(DOMString name); // shadows inherited namedItem() +[LegacyUnenumerableNamedProperties] +interface HTMLAllCollection { + readonly attribute unsigned long length; + getter Element? (unsigned long index); + getter (HTMLCollection or Element)? namedItem(DOMString name); + legacycaller (HTMLCollection or Element)? item(optional DOMString nameOrIndex); }; interface HTMLFormControlsCollection : HTMLCollection { // inherits length and item() - legacycaller getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem() + getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem() }; interface RadioNodeList : NodeList { attribute DOMString value; }; interface HTMLOptionsCollection : HTMLCollection { - // inherits item() + // inherits item(), namedItem() attribute unsigned long length; // shadows inherited length - legacycaller HTMLOptionElement? (DOMString name); - setter creator void (unsigned long index, HTMLOptionElement? option); - void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); - void remove(long index); + [CEReactions] setter void (unsigned long index, HTMLOptionElement? option); + [CEReactions] void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); + [CEReactions] void remove(long index); attribute long selectedIndex; }; -interface HTMLPropertiesCollection : HTMLCollection { - // inherits length and item() - getter PropertyNodeList? namedItem(DOMString name); // shadows inherited namedItem() - [SameObject] readonly attribute DOMString[] names; -}; - -typedef sequence PropertyValueArray; - -interface PropertyNodeList : NodeList { - PropertyValueArray getValues(); -}; -[OverrideBuiltins, Exposed=(Window,Worker)] -interface DOMStringMap { - getter DOMString (DOMString name); - setter creator void (DOMString name, DOMString value); - deleter void (DOMString name); -}; -interface DOMElementMap { - getter Element (DOMString name); - setter creator void (DOMString name, Element value); - deleter void (DOMString name); -}; -typedef (ArrayBuffer or CanvasProxy or MessagePort) Transferable; -callback FileCallback = void (File file); enum DocumentReadyState { "loading", "interactive", "complete" }; +typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement; [OverrideBuiltins] -partial /*sealed*/ interface Document { +partial interface Document { // resource metadata management [PutForwards=href, Unforgeable] readonly attribute Location? location; - attribute DOMString domain; - readonly attribute DOMString referrer; - attribute DOMString cookie; + attribute USVString domain; + readonly attribute USVString referrer; + attribute USVString cookie; readonly attribute DOMString lastModified; readonly attribute DocumentReadyState readyState; // DOM tree accessors getter object (DOMString name); - attribute DOMString title; - attribute DOMString dir; - attribute HTMLElement? body; + [CEReactions] attribute DOMString title; + [CEReactions] attribute DOMString dir; + [CEReactions] attribute HTMLElement? body; readonly attribute HTMLHeadElement? head; [SameObject] readonly attribute HTMLCollection images; [SameObject] readonly attribute HTMLCollection embeds; @@ -79,2264 +51,247 @@ partial /*sealed*/ interface Document { [SameObject] readonly attribute HTMLCollection forms; [SameObject] readonly attribute HTMLCollection scripts; NodeList getElementsByName(DOMString elementName); - NodeList getItems(optional DOMString typeNames = ""); // microdata - [SameObject] readonly attribute DOMElementMap cssElementMap; - readonly attribute HTMLScriptElement? currentScript; + readonly attribute HTMLOrSVGScriptElement? currentScript; // classic scripts in a document tree only // dynamic markup insertion - Document open(optional DOMString type = "text/html", optional DOMString replace = ""); - WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false); - void close(); - void write(DOMString... text); - void writeln(DOMString... text); + [CEReactions] Document open(optional DOMString type = "text/html", optional DOMString replace = ""); + WindowProxy open(USVString url, DOMString name, DOMString features); + [CEReactions] void close(); + [CEReactions] void write(DOMString... text); + [CEReactions] void writeln(DOMString... text); // user interaction readonly attribute WindowProxy? defaultView; readonly attribute Element? activeElement; boolean hasFocus(); - attribute DOMString designMode; - boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = ""); + [CEReactions] attribute DOMString designMode; + [CEReactions] boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = ""); boolean queryCommandEnabled(DOMString commandId); boolean queryCommandIndeterm(DOMString commandId); boolean queryCommandState(DOMString commandId); boolean queryCommandSupported(DOMString commandId); DOMString queryCommandValue(DOMString commandId); - readonly attribute HTMLCollection commands; // special event handler IDL attributes that only apply to Document objects [LenientThis] attribute EventHandler onreadystatechange; }; Document implements GlobalEventHandlers; -partial interface XMLDocument { - boolean load(DOMString url); -}; +Document implements DocumentAndElementEventHandlers; +[HTMLConstructor] interface HTMLElement : Element { // metadata attributes - attribute DOMString title; - attribute DOMString lang; - attribute boolean translate; - attribute DOMString dir; + [CEReactions] attribute DOMString title; + [CEReactions] attribute DOMString lang; + [CEReactions] attribute boolean translate; + [CEReactions] attribute DOMString dir; [SameObject] readonly attribute DOMStringMap dataset; - // microdata - attribute boolean itemScope; - [PutForwards=value] readonly attribute DOMSettableTokenList itemType; - attribute DOMString itemId; - [PutForwards=value] readonly attribute DOMSettableTokenList itemRef; - [PutForwards=value] readonly attribute DOMSettableTokenList itemProp; - readonly attribute HTMLPropertiesCollection properties; - attribute any itemValue; // acts as DOMString on setting - // user interaction - attribute boolean hidden; + [CEReactions] attribute boolean hidden; void click(); - attribute long tabIndex; + [CEReactions] attribute long tabIndex; void focus(); void blur(); - attribute DOMString accessKey; + [CEReactions] attribute DOMString accessKey; readonly attribute DOMString accessKeyLabel; - attribute boolean draggable; - [PutForwards=value] readonly attribute DOMSettableTokenList dropzone; - attribute HTMLMenuElement? contextMenu; - attribute boolean spellcheck; + [CEReactions] attribute boolean draggable; + [CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList dropzone; + [CEReactions] attribute HTMLMenuElement? contextMenu; + [CEReactions] attribute boolean spellcheck; void forceSpellCheck(); - // command API - readonly attribute DOMString? commandType; - readonly attribute DOMString? commandLabel; - readonly attribute DOMString? commandIcon; - readonly attribute boolean? commandHidden; - readonly attribute boolean? commandDisabled; - readonly attribute boolean? commandChecked; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString innerText; }; HTMLElement implements GlobalEventHandlers; +HTMLElement implements DocumentAndElementEventHandlers; HTMLElement implements ElementContentEditable; interface HTMLUnknownElement : HTMLElement { }; +[OverrideBuiltins] +interface DOMStringMap { + getter DOMString (DOMString name); + [CEReactions] setter void (DOMString name, DOMString value); + [CEReactions] deleter void (DOMString name); +}; +[HTMLConstructor] interface HTMLHtmlElement : HTMLElement {}; interface HTMLHeadElement : HTMLElement {}; +[HTMLConstructor] interface HTMLTitleElement : HTMLElement { - attribute DOMString text; + [CEReactions] attribute DOMString text; }; +[HTMLConstructor] interface HTMLBaseElement : HTMLElement { - attribute DOMString href; - attribute DOMString target; + [CEReactions] attribute USVString href; + [CEReactions] attribute DOMString target; }; +[HTMLConstructor] interface HTMLLinkElement : HTMLElement { - attribute DOMString href; - attribute DOMString? crossOrigin; - attribute DOMString rel; - readonly attribute DOMTokenList relList; - attribute DOMString media; - attribute DOMString hreflang; - attribute DOMString type; - [PutForwards=value] readonly attribute DOMSettableTokenList sizes; + [CEReactions] attribute USVString href; + [CEReactions] attribute DOMString? crossOrigin; + [CEReactions] attribute DOMString rel; + [CEReactions] attribute RequestDestination as; // (default "") + [CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList relList; + [CEReactions] attribute DOMString media; + [CEReactions] attribute DOMString nonce; + [CEReactions] attribute DOMString hreflang; + [CEReactions] attribute DOMString type; + [CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList sizes; + [CEReactions] attribute DOMString referrerPolicy; }; HTMLLinkElement implements LinkStyle; +[HTMLConstructor] interface HTMLMetaElement : HTMLElement { - attribute DOMString name; - attribute DOMString httpEquiv; - attribute DOMString content; + [CEReactions] attribute DOMString name; + [CEReactions] attribute DOMString httpEquiv; + [CEReactions] attribute DOMString content; }; +[HTMLConstructor] interface HTMLStyleElement : HTMLElement { - attribute DOMString media; - attribute DOMString type; - attribute boolean scoped; + [CEReactions] attribute DOMString media; + [CEReactions] attribute DOMString nonce; + [CEReactions] attribute DOMString type; }; HTMLStyleElement implements LinkStyle; -interface HTMLBodyElement : HTMLElement { -}; +[HTMLConstructor] +interface HTMLBodyElement : HTMLElement {}; + HTMLBodyElement implements WindowEventHandlers; +[HTMLConstructor] interface HTMLHeadingElement : HTMLElement {}; +[HTMLConstructor] interface HTMLParagraphElement : HTMLElement {}; +[HTMLConstructor] interface HTMLHRElement : HTMLElement {}; +[HTMLConstructor] interface HTMLPreElement : HTMLElement {}; +[HTMLConstructor] interface HTMLQuoteElement : HTMLElement { - attribute DOMString cite; + [CEReactions] attribute USVString cite; }; +[HTMLConstructor] interface HTMLOListElement : HTMLElement { - attribute boolean reversed; - attribute long start; - attribute DOMString type; + [CEReactions] attribute boolean reversed; + [CEReactions] attribute long start; + [CEReactions] attribute DOMString type; }; +[HTMLConstructor] interface HTMLUListElement : HTMLElement {}; +[HTMLConstructor] interface HTMLLIElement : HTMLElement { - attribute long value; + [CEReactions] attribute long value; }; +[HTMLConstructor] interface HTMLDListElement : HTMLElement {}; +[HTMLConstructor] interface HTMLDivElement : HTMLElement {}; +[HTMLConstructor] interface HTMLAnchorElement : HTMLElement { - attribute DOMString target; - attribute DOMString download; - [PutForwards=value] attribute DOMSettableTokenList ping; - attribute DOMString rel; - readonly attribute DOMTokenList relList; - attribute DOMString hreflang; - attribute DOMString type; + [CEReactions] attribute DOMString target; + [CEReactions] attribute DOMString download; + [CEReactions] attribute USVString ping; + [CEReactions] attribute DOMString rel; + [CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList relList; + [CEReactions] attribute DOMString hreflang; + [CEReactions] attribute DOMString type; - attribute DOMString text; + [CEReactions] attribute DOMString text; + + [CEReactions] attribute DOMString referrerPolicy; }; -HTMLAnchorElement implements URLUtils; +HTMLAnchorElement implements HTMLHyperlinkElementUtils; +[HTMLConstructor] interface HTMLDataElement : HTMLElement { - attribute DOMString value; + [CEReactions] attribute DOMString value; }; +[HTMLConstructor] interface HTMLTimeElement : HTMLElement { - attribute DOMString dateTime; + [CEReactions] attribute DOMString dateTime; }; +[HTMLConstructor] interface HTMLSpanElement : HTMLElement {}; +[HTMLConstructor] interface HTMLBRElement : HTMLElement {}; +[NoInterfaceObject] +interface HTMLHyperlinkElementUtils { + [CEReactions] stringifier attribute USVString href; + readonly attribute USVString origin; + [CEReactions] attribute USVString protocol; + [CEReactions] attribute USVString username; + [CEReactions] attribute USVString password; + [CEReactions] attribute USVString host; + [CEReactions] attribute USVString hostname; + [CEReactions] attribute USVString port; + [CEReactions] attribute USVString pathname; + [CEReactions] attribute USVString search; + [CEReactions] attribute USVString hash; +}; +[HTMLConstructor] interface HTMLModElement : HTMLElement { - attribute DOMString cite; - attribute DOMString dateTime; -}; -interface HTMLIFrameElement : HTMLElement { - attribute DOMString src; - attribute DOMString srcdoc; - attribute DOMString name; - [PutForwards=value] readonly attribute DOMSettableTokenList sandbox; - attribute boolean seamless; - attribute boolean allowFullscreen; - attribute DOMString width; - attribute DOMString height; - readonly attribute Document? contentDocument; - readonly attribute WindowProxy? contentWindow; - Document? getSVGDocument(); -}; -interface HTMLEmbedElement : HTMLElement { - attribute DOMString src; - attribute DOMString type; - attribute DOMString width; - attribute DOMString height; - Document? getSVGDocument(); - legacycaller any (any... arguments); -}; -interface HTMLObjectElement : HTMLElement { - attribute DOMString data; - attribute DOMString type; - attribute boolean typeMustMatch; - attribute DOMString name; - attribute DOMString useMap; - readonly attribute HTMLFormElement? form; - attribute DOMString width; - attribute DOMString height; - readonly attribute Document? contentDocument; - readonly attribute WindowProxy? contentWindow; - Document? getSVGDocument(); - - readonly attribute boolean willValidate; - readonly attribute ValidityState validity; - readonly attribute DOMString validationMessage; - boolean checkValidity(); - boolean reportValidity(); - void setCustomValidity(DOMString error); - - legacycaller any (any... arguments); -}; -interface HTMLParamElement : HTMLElement { - attribute DOMString name; - attribute DOMString value; -}; -interface HTMLVideoElement : HTMLMediaElement { - attribute unsigned long width; - attribute unsigned long height; - readonly attribute unsigned long videoWidth; - readonly attribute unsigned long videoHeight; - attribute DOMString poster; -}; -[NamedConstructor=Audio(optional DOMString src)] -interface HTMLAudioElement : HTMLMediaElement {}; -interface HTMLSourceElement : HTMLElement { - attribute DOMString src; - attribute DOMString type; -}; -interface HTMLTrackElement : HTMLElement { - attribute DOMString kind; - attribute DOMString src; - attribute DOMString srclang; - attribute DOMString label; - attribute boolean default; - - const unsigned short NONE = 0; - const unsigned short LOADING = 1; - const unsigned short LOADED = 2; - const unsigned short ERROR = 3; - readonly attribute unsigned short readyState; - - readonly attribute TextTrack track; -}; -enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" }; -typedef (MediaStream or MediaSource or Blob) MediaProvider; -interface HTMLMediaElement : HTMLElement { - - // error state - readonly attribute MediaError? error; - - // network state - attribute DOMString src; - attribute MediaProvider? srcObject; - readonly attribute DOMString currentSrc; - attribute DOMString? crossOrigin; - const unsigned short NETWORK_EMPTY = 0; - const unsigned short NETWORK_IDLE = 1; - const unsigned short NETWORK_LOADING = 2; - const unsigned short NETWORK_NO_SOURCE = 3; - readonly attribute unsigned short networkState; - attribute DOMString preload; - readonly attribute TimeRanges buffered; - void load(); - CanPlayTypeResult canPlayType(DOMString type); - - // ready state - const unsigned short HAVE_NOTHING = 0; - const unsigned short HAVE_METADATA = 1; - const unsigned short HAVE_CURRENT_DATA = 2; - const unsigned short HAVE_FUTURE_DATA = 3; - const unsigned short HAVE_ENOUGH_DATA = 4; - readonly attribute unsigned short readyState; - readonly attribute boolean seeking; - - // playback state - attribute double currentTime; - void fastSeek(double time); - readonly attribute unrestricted double duration; - Date getStartDate(); - readonly attribute boolean paused; - attribute double defaultPlaybackRate; - attribute double playbackRate; - readonly attribute TimeRanges played; - readonly attribute TimeRanges seekable; - readonly attribute boolean ended; - attribute boolean autoplay; - attribute boolean loop; - void play(); - void pause(); - - // media controller - attribute DOMString mediaGroup; - attribute MediaController? controller; - - // controls - attribute boolean controls; - attribute double volume; - attribute boolean muted; - attribute boolean defaultMuted; - - // tracks - [SameObject] readonly attribute AudioTrackList audioTracks; - [SameObject] readonly attribute VideoTrackList videoTracks; - [SameObject] readonly attribute TextTrackList textTracks; - TextTrack addTextTrack(TextTrackKind kind, optional DOMString label = "", optional DOMString language = ""); -}; -interface MediaError { - const unsigned short MEDIA_ERR_ABORTED = 1; - const unsigned short MEDIA_ERR_NETWORK = 2; - const unsigned short MEDIA_ERR_DECODE = 3; - const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4; - readonly attribute unsigned short code; -}; -interface AudioTrackList : EventTarget { - readonly attribute unsigned long length; - getter AudioTrack (unsigned long index); - AudioTrack? getTrackById(DOMString id); - - attribute EventHandler onchange; - attribute EventHandler onaddtrack; - attribute EventHandler onremovetrack; -}; - -interface AudioTrack { - readonly attribute DOMString id; - readonly attribute DOMString kind; - readonly attribute DOMString label; - readonly attribute DOMString language; - attribute boolean enabled; -}; - -interface VideoTrackList : EventTarget { - readonly attribute unsigned long length; - getter VideoTrack (unsigned long index); - VideoTrack? getTrackById(DOMString id); - readonly attribute long selectedIndex; - - attribute EventHandler onchange; - attribute EventHandler onaddtrack; - attribute EventHandler onremovetrack; -}; - -interface VideoTrack { - readonly attribute DOMString id; - readonly attribute DOMString kind; - readonly attribute DOMString label; - readonly attribute DOMString language; - attribute boolean selected; -}; -enum MediaControllerPlaybackState { "waiting", "playing", "ended" }; -[Constructor] -interface MediaController : EventTarget { - readonly attribute unsigned short readyState; // uses HTMLMediaElement.readyState's values - - readonly attribute TimeRanges buffered; - readonly attribute TimeRanges seekable; - readonly attribute unrestricted double duration; - attribute double currentTime; - - readonly attribute boolean paused; - readonly attribute MediaControllerPlaybackState playbackState; - readonly attribute TimeRanges played; - void pause(); - void unpause(); - void play(); // calls play() on all media elements as well - - attribute double defaultPlaybackRate; - attribute double playbackRate; - - attribute double volume; - attribute boolean muted; - - attribute EventHandler onemptied; - attribute EventHandler onloadedmetadata; - attribute EventHandler onloadeddata; - attribute EventHandler oncanplay; - attribute EventHandler oncanplaythrough; - attribute EventHandler onplaying; - attribute EventHandler onended; - attribute EventHandler onwaiting; - - attribute EventHandler ondurationchange; - attribute EventHandler ontimeupdate; - attribute EventHandler onplay; - attribute EventHandler onpause; - attribute EventHandler onratechange; - attribute EventHandler onvolumechange; -}; -interface TextTrackList : EventTarget { - readonly attribute unsigned long length; - getter TextTrack (unsigned long index); - TextTrack? getTrackById(DOMString id); - - attribute EventHandler onchange; - attribute EventHandler onaddtrack; - attribute EventHandler onremovetrack; -}; -enum TextTrackMode { "disabled", "hidden", "showing" }; -enum TextTrackKind { "subtitles", "captions", "descriptions", "chapters", "metadata" }; -interface TextTrack : EventTarget { - readonly attribute TextTrackKind kind; - readonly attribute DOMString label; - readonly attribute DOMString language; - - readonly attribute DOMString id; - readonly attribute DOMString inBandMetadataTrackDispatchType; - - attribute TextTrackMode mode; - - readonly attribute TextTrackCueList? cues; - readonly attribute TextTrackCueList? activeCues; - - void addCue(TextTrackCue cue); - void removeCue(TextTrackCue cue); - - attribute EventHandler oncuechange; -}; -interface TextTrackCueList { - readonly attribute unsigned long length; - getter TextTrackCue (unsigned long index); - TextTrackCue? getCueById(DOMString id); -}; -interface TextTrackCue : EventTarget { - readonly attribute TextTrack? track; - - attribute DOMString id; - attribute double startTime; - attribute double endTime; - attribute boolean pauseOnExit; - - attribute EventHandler onenter; - attribute EventHandler onexit; -}; -interface TimeRanges { - readonly attribute unsigned long length; - double start(unsigned long index); - double end(unsigned long index); -}; -[Constructor(DOMString type, optional TrackEventInit eventInitDict)] -interface TrackEvent : Event { - readonly attribute (VideoTrack or AudioTrack or TextTrack)? track; -}; - -dictionary TrackEventInit : EventInit { - (VideoTrack or AudioTrack or TextTrack)? track; -}; -interface HTMLMapElement : HTMLElement { - attribute DOMString name; - readonly attribute HTMLCollection areas; - readonly attribute HTMLCollection images; -}; -interface HTMLAreaElement : HTMLElement { - attribute DOMString alt; - attribute DOMString coords; - attribute DOMString shape; - attribute DOMString target; - attribute DOMString download; - [PutForwards=value] attribute DOMSettableTokenList ping; - attribute DOMString rel; - readonly attribute DOMTokenList relList; - attribute DOMString hreflang; - attribute DOMString type; -}; -HTMLAreaElement implements URLUtils; -interface HTMLTableElement : HTMLElement { - attribute HTMLTableCaptionElement? caption; - HTMLElement createCaption(); - void deleteCaption(); - attribute HTMLTableSectionElement? tHead; - HTMLElement createTHead(); - void deleteTHead(); - attribute HTMLTableSectionElement? tFoot; - HTMLElement createTFoot(); - void deleteTFoot(); - readonly attribute HTMLCollection tBodies; - HTMLElement createTBody(); - readonly attribute HTMLCollection rows; - HTMLElement insertRow(optional long index = -1); - void deleteRow(long index); - attribute boolean sortable; - void stopSorting(); -}; -interface HTMLTableCaptionElement : HTMLElement {}; -interface HTMLTableColElement : HTMLElement { - attribute unsigned long span; -}; -interface HTMLTableSectionElement : HTMLElement { - readonly attribute HTMLCollection rows; - HTMLElement insertRow(optional long index = -1); - void deleteRow(long index); -}; -interface HTMLTableRowElement : HTMLElement { - readonly attribute long rowIndex; - readonly attribute long sectionRowIndex; - readonly attribute HTMLCollection cells; - HTMLElement insertCell(optional long index = -1); - void deleteCell(long index); -}; -interface HTMLTableDataCellElement : HTMLTableCellElement {}; -interface HTMLTableHeaderCellElement : HTMLTableCellElement { - attribute DOMString scope; - attribute DOMString abbr; - attribute DOMString sorted; - void sort(); -}; -interface HTMLTableCellElement : HTMLElement { - attribute unsigned long colSpan; - attribute unsigned long rowSpan; - [PutForwards=value] readonly attribute DOMSettableTokenList headers; - readonly attribute long cellIndex; -}; -[OverrideBuiltins] -interface HTMLFormElement : HTMLElement { - attribute DOMString acceptCharset; - attribute DOMString action; - attribute DOMString autocomplete; - attribute DOMString enctype; - attribute DOMString encoding; - attribute DOMString method; - attribute DOMString name; - attribute boolean noValidate; - attribute DOMString target; - - readonly attribute HTMLFormControlsCollection elements; - readonly attribute long length; - getter Element (unsigned long index); - getter (RadioNodeList or Element) (DOMString name); - - void submit(); - void reset(); - boolean checkValidity(); - boolean reportValidity(); - - void requestAutocomplete(); -}; -interface HTMLLabelElement : HTMLElement { - readonly attribute HTMLFormElement? form; - attribute DOMString htmlFor; - readonly attribute HTMLElement? control; -}; -interface HTMLInputElement : HTMLElement { - attribute DOMString accept; - attribute DOMString alt; - attribute DOMString autocomplete; - attribute boolean autofocus; - attribute boolean defaultChecked; - attribute boolean checked; - attribute DOMString dirName; - attribute boolean disabled; - readonly attribute HTMLFormElement? form; - readonly attribute FileList? files; - attribute DOMString formAction; - attribute DOMString formEnctype; - attribute DOMString formMethod; - attribute boolean formNoValidate; - attribute DOMString formTarget; - attribute unsigned long height; - attribute boolean indeterminate; - attribute DOMString inputMode; - readonly attribute HTMLElement? list; - attribute DOMString max; - attribute long maxLength; - attribute DOMString min; - attribute long minLength; - attribute boolean multiple; - attribute DOMString name; - attribute DOMString pattern; - attribute DOMString placeholder; - attribute boolean readOnly; - attribute boolean required; - attribute unsigned long size; - attribute DOMString src; - attribute DOMString step; - attribute DOMString type; - attribute DOMString defaultValue; - [TreatNullAs=EmptyString] attribute DOMString value; - attribute Date? valueAsDate; - attribute unrestricted double valueAsNumber; - attribute double valueLow; - attribute double valueHigh; - attribute unsigned long width; - - void stepUp(optional long n = 1); - void stepDown(optional long n = 1); - - readonly attribute boolean willValidate; - readonly attribute ValidityState validity; - readonly attribute DOMString validationMessage; - boolean checkValidity(); - boolean reportValidity(); - void setCustomValidity(DOMString error); - - readonly attribute NodeList labels; - - void select(); - attribute unsigned long selectionStart; - attribute unsigned long selectionEnd; - attribute DOMString selectionDirection; - void setRangeText(DOMString replacement); - void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); - void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); -}; -interface HTMLButtonElement : HTMLElement { - attribute boolean autofocus; - attribute boolean disabled; - readonly attribute HTMLFormElement? form; - attribute DOMString formAction; - attribute DOMString formEnctype; - attribute DOMString formMethod; - attribute boolean formNoValidate; - attribute DOMString formTarget; - attribute DOMString name; - attribute DOMString type; - attribute DOMString value; - attribute HTMLMenuElement? menu; - - readonly attribute boolean willValidate; - readonly attribute ValidityState validity; - readonly attribute DOMString validationMessage; - boolean checkValidity(); - boolean reportValidity(); - void setCustomValidity(DOMString error); - - readonly attribute NodeList labels; -}; -interface HTMLSelectElement : HTMLElement { - attribute DOMString autocomplete; - attribute boolean autofocus; - attribute boolean disabled; - readonly attribute HTMLFormElement? form; - attribute boolean multiple; - attribute DOMString name; - attribute boolean required; - attribute unsigned long size; - - readonly attribute DOMString type; - - readonly attribute HTMLOptionsCollection options; - attribute unsigned long length; - getter Element? item(unsigned long index); - HTMLOptionElement? namedItem(DOMString name); - void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); - void remove(); // ChildNode overload - void remove(long index); - setter creator void (unsigned long index, HTMLOptionElement? option); - - readonly attribute HTMLCollection selectedOptions; - attribute long selectedIndex; - attribute DOMString value; - - readonly attribute boolean willValidate; - readonly attribute ValidityState validity; - readonly attribute DOMString validationMessage; - boolean checkValidity(); - boolean reportValidity(); - void setCustomValidity(DOMString error); - - readonly attribute NodeList labels; -}; -interface HTMLDataListElement : HTMLElement { - readonly attribute HTMLCollection options; -}; -interface HTMLOptGroupElement : HTMLElement { - attribute boolean disabled; - attribute DOMString label; -}; -[NamedConstructor=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false)] -interface HTMLOptionElement : HTMLElement { - attribute boolean disabled; - readonly attribute HTMLFormElement? form; - attribute DOMString label; - attribute boolean defaultSelected; - attribute boolean selected; - attribute DOMString value; - - attribute DOMString text; - readonly attribute long index; -}; -interface HTMLTextAreaElement : HTMLElement { - attribute DOMString autocomplete; - attribute boolean autofocus; - attribute unsigned long cols; - attribute DOMString dirName; - attribute boolean disabled; - readonly attribute HTMLFormElement? form; - attribute DOMString inputMode; - attribute long maxLength; - attribute long minLength; - attribute DOMString name; - attribute DOMString placeholder; - attribute boolean readOnly; - attribute boolean required; - attribute unsigned long rows; - attribute DOMString wrap; - - readonly attribute DOMString type; - attribute DOMString defaultValue; - [TreatNullAs=EmptyString] attribute DOMString value; - readonly attribute unsigned long textLength; - - readonly attribute boolean willValidate; - readonly attribute ValidityState validity; - readonly attribute DOMString validationMessage; - boolean checkValidity(); - boolean reportValidity(); - void setCustomValidity(DOMString error); - - readonly attribute NodeList labels; - - void select(); - attribute unsigned long selectionStart; - attribute unsigned long selectionEnd; - attribute DOMString selectionDirection; - void setRangeText(DOMString replacement); - void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); - void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); -}; -interface HTMLKeygenElement : HTMLElement { - attribute boolean autofocus; - attribute DOMString challenge; - attribute boolean disabled; - readonly attribute HTMLFormElement? form; - attribute DOMString keytype; - attribute DOMString name; - - readonly attribute DOMString type; - - readonly attribute boolean willValidate; - readonly attribute ValidityState validity; - readonly attribute DOMString validationMessage; - boolean checkValidity(); - boolean reportValidity(); - void setCustomValidity(DOMString error); - - readonly attribute NodeList labels; -}; -interface HTMLOutputElement : HTMLElement { - [PutForwards=value] readonly attribute DOMSettableTokenList htmlFor; - readonly attribute HTMLFormElement? form; - attribute DOMString name; - - readonly attribute DOMString type; - attribute DOMString defaultValue; - attribute DOMString value; - - readonly attribute boolean willValidate; - readonly attribute ValidityState validity; - readonly attribute DOMString validationMessage; - boolean checkValidity(); - boolean reportValidity(); - void setCustomValidity(DOMString error); - - readonly attribute NodeList labels; -}; -interface HTMLProgressElement : HTMLElement { - attribute double value; - attribute double max; - readonly attribute double position; - readonly attribute NodeList labels; -}; -interface HTMLMeterElement : HTMLElement { - attribute double value; - attribute double min; - attribute double max; - attribute double low; - attribute double high; - attribute double optimum; - readonly attribute NodeList labels; -}; -interface HTMLFieldSetElement : HTMLElement { - attribute boolean disabled; - readonly attribute HTMLFormElement? form; - attribute DOMString name; - - readonly attribute DOMString type; - - readonly attribute HTMLFormControlsCollection elements; - - readonly attribute boolean willValidate; - [SameObject] readonly attribute ValidityState validity; - readonly attribute DOMString validationMessage; - boolean checkValidity(); - boolean reportValidity(); - void setCustomValidity(DOMString error); -}; -interface HTMLLegendElement : HTMLElement { - readonly attribute HTMLFormElement? form; -}; -enum AutocompleteErrorReason { "" /* empty string */, "cancel", "disabled", "invalid" }; - -[Constructor(DOMString type, optional AutocompleteErrorEventInit eventInitDict)] -interface AutocompleteErrorEvent : Event { - readonly attribute AutocompleteErrorReason reason; -}; - -dictionary AutocompleteErrorEventInit : EventInit { - AutocompleteErrorReason reason; -}; -enum SelectionMode { - "select", - "start", - "end", - "preserve", // default -}; -interface ValidityState { - readonly attribute boolean valueMissing; - readonly attribute boolean typeMismatch; - readonly attribute boolean patternMismatch; - readonly attribute boolean tooLong; - readonly attribute boolean tooShort; - readonly attribute boolean rangeUnderflow; - readonly attribute boolean rangeOverflow; - readonly attribute boolean stepMismatch; - readonly attribute boolean badInput; - readonly attribute boolean customError; - readonly attribute boolean valid; -}; -interface HTMLDetailsElement : HTMLElement { - attribute boolean open; -}; -interface HTMLMenuElement : HTMLElement { - attribute DOMString type; - attribute DOMString label; -}; -interface HTMLMenuItemElement : HTMLElement { - attribute DOMString type; - attribute DOMString label; - attribute DOMString icon; - attribute boolean disabled; - attribute boolean checked; - attribute DOMString radiogroup; - attribute boolean default; - readonly attribute HTMLElement? command; -}; -[Constructor(DOMString type, optional RelatedEventInit eventInitDict)] -interface RelatedEvent : Event { - readonly attribute EventTarget? relatedTarget; -}; - -dictionary RelatedEventInit : EventInit { - EventTarget? relatedTarget; -}; -interface HTMLDialogElement : HTMLElement { - attribute boolean open; - attribute DOMString returnValue; - void show(optional (MouseEvent or Element) anchor); - void showModal(optional (MouseEvent or Element) anchor); - void close(optional DOMString returnValue); -}; -interface HTMLScriptElement : HTMLElement { - attribute DOMString src; - attribute DOMString type; - attribute DOMString charset; - attribute boolean async; - attribute boolean defer; - attribute DOMString? crossOrigin; - attribute DOMString text; -}; -interface HTMLTemplateElement : HTMLElement { - readonly attribute DocumentFragment content; -}; -typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext; - -interface HTMLCanvasElement : HTMLElement { - attribute unsigned long width; - attribute unsigned long height; - - RenderingContext? getContext(DOMString contextId, any... arguments); - boolean probablySupportsContext(DOMString contextId, any... arguments); - - void setContext(RenderingContext context); - CanvasProxy transferControlToProxy(); - - DOMString toDataURL(optional DOMString type, any... arguments); - void toBlob(FileCallback? _callback, optional DOMString type, any... arguments); -}; -[Exposed=(Window,Worker)] -interface CanvasProxy { - void setContext(RenderingContext context); -}; -// CanvasProxy implements Transferable; -typedef (HTMLImageElement or - HTMLVideoElement or - HTMLCanvasElement or - CanvasRenderingContext2D or - ImageBitmap) CanvasImageSource; - -enum CanvasFillRule { "nonzero", "evenodd" }; - -dictionary CanvasRenderingContext2DSettings { - boolean alpha = true; -}; - -[Constructor(), - Constructor(unsigned long width, unsigned long height), - Exposed=(Window,Worker)] -interface CanvasRenderingContext2D { - - // back-reference to the canvas - readonly attribute HTMLCanvasElement canvas; - - // canvas dimensions - attribute unsigned long width; - attribute unsigned long height; - - // for contexts that aren't directly fixed to a specific canvas - void commit(); // push the image to the output bitmap - - // state - void save(); // push state on state stack - void restore(); // pop state stack and restore state - - // transformations (default transform is the identity matrix) - attribute SVGMatrix currentTransform; - void scale(unrestricted double x, unrestricted double y); - void rotate(unrestricted double angle); - void translate(unrestricted double x, unrestricted double y); - void transform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f); - void setTransform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f); - void resetTransform(); - - // compositing - attribute unrestricted double globalAlpha; // (default 1.0) - attribute DOMString globalCompositeOperation; // (default source-over) - - // image smoothing - attribute boolean imageSmoothingEnabled; // (default true) - - // colours and styles (see also the CanvasDrawingStyles interface) - attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black) - attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black) - CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1); - CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1); - CanvasPattern createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition); - - // shadows - attribute unrestricted double shadowOffsetX; // (default 0) - attribute unrestricted double shadowOffsetY; // (default 0) - attribute unrestricted double shadowBlur; // (default 0) - attribute DOMString shadowColor; // (default transparent black) - - // rects - void clearRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); - void fillRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); - void strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); - - // path API (see also CanvasPathMethods) - void beginPath(); - void fill(optional CanvasFillRule fillRule = "nonzero"); - void fill(Path2D path, optional CanvasFillRule fillRule = "nonzero"); - void stroke(); - void stroke(Path2D path); - void drawFocusIfNeeded(Element element); - void drawFocusIfNeeded(Path2D path, Element element); - void scrollPathIntoView(); - void scrollPathIntoView(Path2D path); - void clip(optional CanvasFillRule fillRule = "nonzero"); - void clip(Path2D path, optional CanvasFillRule fillRule = "nonzero"); - void resetClip(); - boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero"); - boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero"); - boolean isPointInStroke(unrestricted double x, unrestricted double y); - boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y); - - // text (see also the CanvasDrawingStyles interface) - void fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); - void strokeText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); - TextMetrics measureText(DOMString text); - - // drawing images - void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy); - void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); - void drawImage(CanvasImageSource image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); - - // hit regions - void addHitRegion(optional HitRegionOptions options); - void removeHitRegion(DOMString id); - void clearHitRegions(); - - // pixel manipulation - ImageData createImageData(double sw, double sh); - ImageData createImageData(ImageData imagedata); - ImageData getImageData(double sx, double sy, double sw, double sh); - void putImageData(ImageData imagedata, double dx, double dy); - void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight); -}; -CanvasRenderingContext2D implements CanvasDrawingStyles; -CanvasRenderingContext2D implements CanvasPathMethods; - -[NoInterfaceObject, Exposed=(Window,Worker)] -interface CanvasDrawingStyles { - // line caps/joins - attribute unrestricted double lineWidth; // (default 1) - attribute DOMString lineCap; // "butt", "round", "square" (default "butt") - attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") - attribute unrestricted double miterLimit; // (default 10) - - // dashed lines - void setLineDash(sequence segments); // default empty - sequence getLineDash(); - attribute unrestricted double lineDashOffset; - - // text - attribute DOMString font; // (default 10px sans-serif) - attribute DOMString textAlign; // "start", "end", "left", "right", "center" (default: "start") - attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic") - attribute DOMString direction; // "ltr", "rtl", "inherit" (default: "inherit") -}; - -[NoInterfaceObject, Exposed=(Window,Worker)] -interface CanvasPathMethods { - // shared path API methods - void closePath(); - void moveTo(unrestricted double x, unrestricted double y); - void lineTo(unrestricted double x, unrestricted double y); - void quadraticCurveTo(unrestricted double cpx, unrestricted double cpy, unrestricted double x, unrestricted double y); - void bezierCurveTo(unrestricted double cp1x, unrestricted double cp1y, unrestricted double cp2x, unrestricted double cp2y, unrestricted double x, unrestricted double y); - void arcTo(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radius); - void arcTo(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation); - void rect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); - void arc(unrestricted double x, unrestricted double y, unrestricted double radius, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false); - void ellipse(unrestricted double x, unrestricted double y, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false); -}; - -[Exposed=(Window,Worker)] -interface CanvasGradient { - // opaque object - void addColorStop(double offset, DOMString color); -}; - -[Exposed=(Window,Worker)] -interface CanvasPattern { - // opaque object - void setTransform(SVGMatrix transform); -}; - -[Exposed=(Window,Worker)] -interface TextMetrics { - // x-direction - readonly attribute double width; // advance width - readonly attribute double actualBoundingBoxLeft; - readonly attribute double actualBoundingBoxRight; - - // y-direction - readonly attribute double fontBoundingBoxAscent; - readonly attribute double fontBoundingBoxDescent; - readonly attribute double actualBoundingBoxAscent; - readonly attribute double actualBoundingBoxDescent; - readonly attribute double emHeightAscent; - readonly attribute double emHeightDescent; - readonly attribute double hangingBaseline; - readonly attribute double alphabeticBaseline; - readonly attribute double ideographicBaseline; -}; - -dictionary HitRegionOptions { - Path2D? path = null; - CanvasFillRule fillRule = "nonzero"; - DOMString id = ""; - DOMString? parentID = null; - DOMString cursor = "inherit"; - // for control-backed regions: - Element? control = null; - // for unbacked regions: - DOMString? label = null; - DOMString? role = null; -}; - -[Constructor(unsigned long sw, unsigned long sh), - Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh), - Exposed=(Window,Worker)] -interface ImageData { - readonly attribute unsigned long width; - readonly attribute unsigned long height; - readonly attribute Uint8ClampedArray data; -}; - -[Constructor(optional Element scope), Exposed=(Window,Worker)] -interface DrawingStyle { }; -DrawingStyle implements CanvasDrawingStyles; - -[Constructor, - Constructor(Path2D path), - Constructor(Path2D[] paths, optional CanvasFillRule fillRule = "nonzero"), - Constructor(DOMString d), Exposed=(Window,Worker)] -interface Path2D { - void addPath(Path2D path, optional SVGMatrix? transformation = null); - void addPathByStrokingPath(Path2D path, CanvasDrawingStyles styles, optional SVGMatrix? transformation = null); - void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); - void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); - void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path2D path, optional unrestricted double maxWidth); - void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path2D path, optional unrestricted double maxWidth); -}; -Path2D implements CanvasPathMethods; -partial interface MouseEvent { - readonly attribute DOMString? region; -}; - -partial dictionary MouseEventInit { - DOMString? region; -}; -partial interface Touch { - readonly attribute DOMString? region; -}; -[NoInterfaceObject] -interface ElementContentEditable { - attribute DOMString contentEditable; - readonly attribute boolean isContentEditable; -}; -interface DataTransfer { - attribute DOMString dropEffect; - attribute DOMString effectAllowed; - - [SameObject] readonly attribute DataTransferItemList items; - - void setDragImage(Element image, long x, long y); - - /* old interface */ - [SameObject] readonly attribute DOMString[] types; - DOMString getData(DOMString format); - void setData(DOMString format, DOMString data); - void clearData(optional DOMString format); - [SameObject] readonly attribute FileList files; -}; -interface DataTransferItemList { - readonly attribute unsigned long length; - getter DataTransferItem (unsigned long index); - DataTransferItem? add(DOMString data, DOMString type); - DataTransferItem? add(File data); - void remove(unsigned long index); - void clear(); -}; -interface DataTransferItem { - readonly attribute DOMString kind; - readonly attribute DOMString type; - void getAsString(FunctionStringCallback? _callback); - File? getAsFile(); -}; - -callback FunctionStringCallback = void (DOMString data); -[Constructor(DOMString type, optional DragEventInit eventInitDict)] -interface DragEvent : MouseEvent { - readonly attribute DataTransfer? dataTransfer; -}; - -dictionary DragEventInit : MouseEventInit { - DataTransfer? dataTransfer; -}; -[PrimaryGlobal] -/*sealed*/ interface Window : EventTarget { - // the current browsing context - [Unforgeable] readonly attribute WindowProxy window; - [Replaceable] readonly attribute WindowProxy self; - [Unforgeable] readonly attribute Document document; - attribute DOMString name; - [PutForwards=href, Unforgeable] readonly attribute Location location; - readonly attribute History history; - [Replaceable] readonly attribute BarProp locationbar; - [Replaceable] readonly attribute BarProp menubar; - [Replaceable] readonly attribute BarProp personalbar; - [Replaceable] readonly attribute BarProp scrollbars; - [Replaceable] readonly attribute BarProp statusbar; - [Replaceable] readonly attribute BarProp toolbar; - attribute DOMString status; - void close(); - readonly attribute boolean closed; - void stop(); - void focus(); - void blur(); - - // other browsing contexts - [Replaceable] readonly attribute WindowProxy frames; - [Replaceable] readonly attribute unsigned long length; - [Unforgeable] readonly attribute WindowProxy top; - attribute any opener; - [Replaceable] readonly attribute WindowProxy parent; - readonly attribute Element? frameElement; - WindowProxy open(optional DOMString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = "", optional boolean replace = false); - getter WindowProxy (unsigned long index); - getter object (DOMString name); - - // the user agent - readonly attribute Navigator navigator; - [Replaceable, SameObject] readonly attribute External external; - readonly attribute ApplicationCache applicationCache; - - // user prompts - void alert(); - void alert(DOMString message); - boolean confirm(optional DOMString message = ""); - DOMString? prompt(optional DOMString message = "", optional DOMString default = ""); - void print(); - any showModalDialog(DOMString url, optional any argument); // deprecated - - long requestAnimationFrame(FrameRequestCallback callback); - void cancelAnimationFrame(long handle); - - void postMessage(any message, DOMString targetOrigin, optional sequence transfer); -}; -Window implements GlobalEventHandlers; -Window implements WindowEventHandlers; -interface BarProp { - attribute boolean visible; -}; -interface History { - readonly attribute long length; - readonly attribute any state; - void go(optional long delta); - void back(); - void forward(); - void pushState(any data, DOMString title, optional DOMString? url = null); - void replaceState(any data, DOMString title, optional DOMString? url = null); -}; -[Unforgeable] interface Location { - void assign(DOMString url); - void replace(DOMString url); - void reload(); - - [SameObject] readonly attribute DOMString[] ancestorOrigins; -}; -Location implements URLUtils; -[Constructor(DOMString type, optional PopStateEventInit eventInitDict), Exposed=(Window,Worker)] -interface PopStateEvent : Event { - readonly attribute any state; -}; - -dictionary PopStateEventInit : EventInit { - any state; -}; -[Constructor(DOMString type, optional HashChangeEventInit eventInitDict), Exposed=(Window,Worker)] -interface HashChangeEvent : Event { - readonly attribute DOMString oldURL; - readonly attribute DOMString newURL; -}; - -dictionary HashChangeEventInit : EventInit { - DOMString oldURL; - DOMString newURL; -}; -[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), Exposed=(Window,Worker)] -interface PageTransitionEvent : Event { - readonly attribute boolean persisted; -}; - -dictionary PageTransitionEventInit : EventInit { - boolean persisted; -}; -interface BeforeUnloadEvent : Event { - attribute DOMString returnValue; -}; -[Exposed=(Window,SharedWorker)] -interface ApplicationCache : EventTarget { - - // update status - const unsigned short UNCACHED = 0; - const unsigned short IDLE = 1; - const unsigned short CHECKING = 2; - const unsigned short DOWNLOADING = 3; - const unsigned short UPDATEREADY = 4; - const unsigned short OBSOLETE = 5; - readonly attribute unsigned short status; - - // updates - void update(); - void abort(); - void swapCache(); - - // events - attribute EventHandler onchecking; - attribute EventHandler onerror; - attribute EventHandler onnoupdate; - attribute EventHandler ondownloading; - attribute EventHandler onprogress; - attribute EventHandler onupdateready; - attribute EventHandler oncached; - attribute EventHandler onobsolete; -}; -[NoInterfaceObject, Exposed=(Window,Worker)] -interface NavigatorOnLine { - readonly attribute boolean onLine; -}; -[Constructor(DOMString type, optional ErrorEventInit eventInitDict), Exposed=(Window,Worker)] -interface ErrorEvent : Event { - readonly attribute DOMString message; - readonly attribute DOMString filename; - readonly attribute unsigned long lineno; - readonly attribute unsigned long colno; - readonly attribute any error; -}; - -dictionary ErrorEventInit : EventInit { - DOMString message; - DOMString filename; - unsigned long lineno; - unsigned long colno; - any error; -}; -[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 column, optional any error); -typedef OnErrorEventHandlerNonNull? OnErrorEventHandler; -[TreatNonObjectAsNull] -callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event); -typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler; -[NoInterfaceObject] -interface GlobalEventHandlers { - attribute EventHandler onabort; - attribute EventHandler onautocomplete; - attribute EventHandler onautocompleteerror; - 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 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 onmousewheel; - 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 onseeked; - attribute EventHandler onseeking; - attribute EventHandler onselect; - attribute EventHandler onshow; - attribute EventHandler onsort; - attribute EventHandler onstalled; - attribute EventHandler onsubmit; - attribute EventHandler onsuspend; - attribute EventHandler ontimeupdate; - attribute EventHandler ontoggle; - attribute EventHandler onvolumechange; - attribute EventHandler onwaiting; -}; - -[NoInterfaceObject] -interface WindowEventHandlers { - attribute EventHandler onafterprint; - attribute EventHandler onbeforeprint; - attribute OnBeforeUnloadEventHandler onbeforeunload; - attribute EventHandler onhashchange; - attribute EventHandler onlanguagechange; - attribute EventHandler onmessage; - attribute EventHandler onoffline; - attribute EventHandler ononline; - attribute EventHandler onpagehide; - attribute EventHandler onpageshow; - attribute EventHandler onpopstate; - attribute EventHandler onstorage; - attribute EventHandler onunload; -}; -[NoInterfaceObject, Exposed=(Window,Worker)] -interface WindowBase64 { - DOMString btoa(DOMString btoa); - DOMString atob(DOMString atob); -}; -Window implements WindowBase64; -[NoInterfaceObject, Exposed=(Window,Worker)] -interface WindowTimers { - long setTimeout(Function handler, optional long timeout = 0, any... arguments); - long setTimeout(DOMString handler, optional long timeout = 0, any... arguments); - void clearTimeout(optional long handle = 0); - long setInterval(Function handler, optional long timeout = 0, any... arguments); - long setInterval(DOMString handler, optional long timeout = 0, any... arguments); - void clearInterval(optional long handle = 0); -}; -Window implements WindowTimers; -[NoInterfaceObject] -interface WindowModal { - readonly attribute any dialogArguments; - attribute any returnValue; -}; -interface Navigator { - // objects implementing this interface also implement the interfaces given below -}; -Navigator implements NavigatorID; -Navigator implements NavigatorLanguage; -Navigator implements NavigatorOnLine; -Navigator implements NavigatorContentUtils; -Navigator implements NavigatorStorageUtils; -Navigator implements NavigatorPlugins; -[NoInterfaceObject, Exposed=(Window,Worker)] -interface NavigatorID { - readonly attribute DOMString appCodeName; // constant "Mozilla" - readonly attribute DOMString appName; - readonly attribute DOMString appVersion; - readonly attribute DOMString platform; - readonly attribute DOMString product; // constant "Gecko" - boolean taintEnabled(); // constant false - readonly attribute DOMString userAgent; - readonly attribute DOMString vendorSub; -}; -[NoInterfaceObject, Exposed=(Window,Worker)] -interface NavigatorLanguage { - readonly attribute DOMString? language; - readonly attribute DOMString[] languages; -}; -[NoInterfaceObject] -interface NavigatorContentUtils { - // content handler registration - void registerProtocolHandler(DOMString scheme, DOMString url, DOMString title); - void registerContentHandler(DOMString mimeType, DOMString url, DOMString title); - DOMString isProtocolHandlerRegistered(DOMString scheme, DOMString url); - DOMString isContentHandlerRegistered(DOMString mimeType, DOMString url); - void unregisterProtocolHandler(DOMString scheme, DOMString url); - void unregisterContentHandler(DOMString mimeType, DOMString url); -}; -[NoInterfaceObject] -interface NavigatorStorageUtils { - readonly attribute boolean cookieEnabled; - void yieldForStorageUpdates(); -}; -[NoInterfaceObject] -interface NavigatorPlugins { - [SameObject] readonly attribute PluginArray plugins; - [SameObject] readonly attribute MimeTypeArray mimeTypes; - readonly attribute boolean javaEnabled; -}; - -interface PluginArray { - void refresh(optional boolean reload = false); - readonly attribute unsigned long length; - getter Plugin? item(unsigned long index); - getter Plugin? namedItem(DOMString name); -}; - -interface MimeTypeArray { - readonly attribute unsigned long length; - getter MimeType? item(unsigned long index); - getter MimeType? namedItem(DOMString name); -}; - -interface Plugin { - readonly attribute DOMString name; - readonly attribute DOMString description; - readonly attribute DOMString filename; - readonly attribute unsigned long length; - getter MimeType? item(unsigned long index); - getter MimeType? namedItem(DOMString name); -}; - -interface MimeType { - readonly attribute DOMString type; - readonly attribute DOMString description; - readonly attribute DOMString suffixes; // comma-separated - readonly attribute Plugin enabledPlugin; -}; -interface External { - void AddSearchProvider(DOMString engineURL); - unsigned long IsSearchProviderInstalled(DOMString engineURL); -}; -[Exposed=(Window,Worker)] -interface ImageBitmap { - readonly attribute unsigned long width; - readonly attribute unsigned long height; -}; - -typedef (HTMLImageElement or - HTMLVideoElement or - HTMLCanvasElement or - Blob or - ImageData or - CanvasRenderingContext2D or - ImageBitmap) ImageBitmapSource; - -[NoInterfaceObject, Exposed=(Window,Worker)] -interface ImageBitmapFactories { - Promise createImageBitmap(ImageBitmapSource image); - Promise createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh); -}; -Window implements ImageBitmapFactories; -WorkerGlobalScope implements ImageBitmapFactories; -[Constructor(DOMString type, optional MessageEventInit eventInitDict), Exposed=(Window,Worker)] -interface MessageEvent : Event { - readonly attribute any data; - readonly attribute DOMString origin; - readonly attribute DOMString lastEventId; - readonly attribute (WindowProxy or MessagePort)? source; - readonly attribute MessagePort[]? ports; - - void initMessageEvent(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, (WindowProxy or MessagePort) sourceArg, sequence? portsArg); -}; - -dictionary MessageEventInit : EventInit { - any data; - DOMString origin; - DOMString lastEventId; - (WindowProxy or MessagePort)? source; - sequence ports; -}; -[Constructor(DOMString url, optional EventSourceInit eventSourceInitDict), Exposed=(Window,Worker)] -interface EventSource : EventTarget { - readonly attribute DOMString url; - readonly attribute boolean withCredentials; - - // ready state - const unsigned short CONNECTING = 0; - const unsigned short OPEN = 1; - const unsigned short CLOSED = 2; - readonly attribute unsigned short readyState; - - // networking - attribute EventHandler onopen; - attribute EventHandler onmessage; - attribute EventHandler onerror; - void close(); -}; - -dictionary EventSourceInit { - boolean withCredentials = false; -}; -enum BinaryType { "blob", "arraybuffer" }; -[Constructor(DOMString url, optional (DOMString or DOMString[]) protocols), Exposed=(Window,Worker)] -interface WebSocket : EventTarget { - readonly attribute DOMString url; - - // ready state - const unsigned short CONNECTING = 0; - const unsigned short OPEN = 1; - const unsigned short CLOSING = 2; - const unsigned short CLOSED = 3; - readonly attribute unsigned short readyState; - readonly attribute unsigned long bufferedAmount; - - // networking - attribute EventHandler onopen; - attribute EventHandler onerror; - attribute EventHandler onclose; - readonly attribute DOMString extensions; - readonly attribute DOMString protocol; - void close([Clamp] optional unsigned short code, optional USVString reason); - - // messaging - attribute EventHandler onmessage; - attribute BinaryType binaryType; - void send(USVString data); - void send(Blob data); - void send(ArrayBuffer data); - void send(ArrayBufferView data); -}; -[Constructor(DOMString type, optional CloseEventInit eventInitDict), Exposed=(Window,Worker)] -interface CloseEvent : Event { - readonly attribute boolean wasClean; - readonly attribute unsigned short code; - readonly attribute DOMString reason; -}; - -dictionary CloseEventInit : EventInit { - boolean wasClean; - unsigned short code; - DOMString reason; -}; -[Constructor, Exposed=(Window,Worker)] -interface MessageChannel { - readonly attribute MessagePort port1; - readonly attribute MessagePort port2; -}; -[Exposed=(Window,Worker)] -interface MessagePort : EventTarget { - void postMessage(any message, optional sequence transfer); - void start(); - void close(); - - // event handlers - attribute EventHandler onmessage; -}; -// MessagePort implements Transferable; -[Constructor, Exposed=(Window,Worker)] -interface PortCollection { - void add(MessagePort port); - void remove(MessagePort port); - void clear(); - void iterate(PortCollectionCallback callback); -}; - -callback PortCollectionCallback = void (MessagePort port); -[Constructor(DOMString channel), Exposed=(Window,Worker)] -interface BroadcastChannel : EventTarget { - readonly attribute DOMString name; - void postMessage(any message); - void close(); - attribute EventHandler onmessage; -}; -[Exposed=Worker] -interface WorkerGlobalScope : EventTarget { - readonly attribute WorkerGlobalScope self; - readonly attribute WorkerLocation location; - - void close(); - attribute OnErrorEventHandler onerror; - attribute EventHandler onlanguagechange; - attribute EventHandler onoffline; - attribute EventHandler ononline; -}; -[Global=(Worker,DedicatedWorker),Exposed=DedicatedWorker] -/*sealed*/ interface DedicatedWorkerGlobalScope : WorkerGlobalScope { - void postMessage(any message, optional sequence transfer); - attribute EventHandler onmessage; -}; -[Global=(Worker,SharedWorker),Exposed=SharedWorker] -/*sealed*/ interface SharedWorkerGlobalScope : WorkerGlobalScope { - readonly attribute DOMString name; - readonly attribute ApplicationCache applicationCache; - attribute EventHandler onconnect; -}; -[NoInterfaceObject, Exposed=(Window,Worker)] -interface AbstractWorker { - attribute EventHandler onerror; -}; -[Constructor(DOMString scriptURL), Exposed=(Window,Worker)] -interface Worker : EventTarget { - void terminate(); - - void postMessage(any message, optional sequence transfer); - attribute EventHandler onmessage; -}; -Worker implements AbstractWorker; -[Constructor(DOMString scriptURL, optional DOMString name), Exposed=(Window,Worker)] -interface SharedWorker : EventTarget { - readonly attribute MessagePort port; -}; -SharedWorker implements AbstractWorker; -[Exposed=Worker] -partial interface WorkerGlobalScope { // not obsolete - void importScripts(DOMString... urls); - readonly attribute WorkerNavigator navigator; -}; -WorkerGlobalScope implements WindowTimers; -WorkerGlobalScope implements WindowBase64; -[Exposed=Worker] -interface WorkerNavigator {}; -WorkerNavigator implements NavigatorID; -WorkerNavigator implements NavigatorLanguage; -WorkerNavigator implements NavigatorOnLine; -[Exposed=Worker] -interface WorkerLocation { }; -WorkerLocation implements URLUtilsReadOnly; -interface Storage { - readonly attribute unsigned long length; - DOMString? key(unsigned long index); - getter DOMString? getItem(DOMString key); - setter creator void setItem(DOMString key, DOMString value); - deleter void removeItem(DOMString key); - void clear(); -}; -[NoInterfaceObject] -interface WindowSessionStorage { - readonly attribute Storage sessionStorage; -}; -Window implements WindowSessionStorage; -[NoInterfaceObject] -interface WindowLocalStorage { - readonly attribute Storage localStorage; -}; -Window implements WindowLocalStorage; -[Constructor(DOMString type, optional StorageEventInit eventInitDict)] -interface StorageEvent : Event { - readonly attribute DOMString? key; - readonly attribute DOMString? oldValue; - readonly attribute DOMString? newValue; - readonly attribute DOMString url; - readonly attribute Storage? storageArea; -}; - -dictionary StorageEventInit : EventInit { - DOMString? key; - DOMString? oldValue; - DOMString? newValue; - DOMString url; - Storage? storageArea; -}; -interface HTMLAppletElement : HTMLElement { - attribute DOMString align; - attribute DOMString alt; - attribute DOMString archive; - attribute DOMString code; - attribute DOMString codeBase; - attribute DOMString height; - attribute unsigned long hspace; - attribute DOMString name; - attribute DOMString _object; // the underscore is not part of the identifier - attribute unsigned long vspace; - attribute DOMString width; -}; -interface HTMLMarqueeElement : HTMLElement { - attribute DOMString behavior; - attribute DOMString bgColor; - attribute DOMString direction; - attribute DOMString height; - attribute unsigned long hspace; - attribute long loop; - attribute unsigned long scrollAmount; - attribute unsigned long scrollDelay; - attribute boolean trueSpeed; - attribute unsigned long vspace; - attribute DOMString width; - - attribute EventHandler onbounce; - attribute EventHandler onfinish; - attribute EventHandler onstart; - - void start(); - void stop(); -}; -interface HTMLFrameSetElement : HTMLElement { - attribute DOMString cols; - attribute DOMString rows; -}; -HTMLFrameSetElement implements WindowEventHandlers; -interface HTMLFrameElement : HTMLElement { - attribute DOMString name; - attribute DOMString scrolling; - attribute DOMString src; - attribute DOMString frameBorder; - attribute DOMString longDesc; - attribute boolean noResize; - readonly attribute Document? contentDocument; - readonly attribute WindowProxy? contentWindow; - - [TreatNullAs=EmptyString] attribute DOMString marginHeight; - [TreatNullAs=EmptyString] attribute DOMString marginWidth; -}; -partial interface HTMLAnchorElement { - attribute DOMString coords; - attribute DOMString charset; - attribute DOMString name; - attribute DOMString rev; - attribute DOMString shape; -}; -partial interface HTMLAreaElement { - attribute boolean noHref; -}; -partial interface HTMLBodyElement { - [TreatNullAs=EmptyString] attribute DOMString text; - [TreatNullAs=EmptyString] attribute DOMString link; - [TreatNullAs=EmptyString] attribute DOMString vLink; - [TreatNullAs=EmptyString] attribute DOMString aLink; - [TreatNullAs=EmptyString] attribute DOMString bgColor; - attribute DOMString background; -}; -partial interface HTMLBRElement { - attribute DOMString clear; -}; -partial interface HTMLTableCaptionElement { - attribute DOMString align; -}; -partial interface HTMLTableColElement { - attribute DOMString align; - attribute DOMString ch; - attribute DOMString chOff; - attribute DOMString vAlign; - attribute DOMString width; -}; -interface HTMLDirectoryElement : HTMLElement { - attribute boolean compact; -}; -partial interface HTMLDivElement { - attribute DOMString align; -}; -partial interface HTMLDListElement { - attribute boolean compact; -}; -partial interface HTMLEmbedElement { - attribute DOMString align; - attribute DOMString name; -}; -interface HTMLFontElement : HTMLElement { - [TreatNullAs=EmptyString] attribute DOMString color; - attribute DOMString face; - attribute DOMString size; -}; -partial interface HTMLHeadingElement { - attribute DOMString align; -}; -partial interface HTMLHRElement { - attribute DOMString align; - attribute DOMString color; - attribute boolean noShade; - attribute DOMString size; - attribute DOMString width; -}; -partial interface HTMLHtmlElement { - attribute DOMString version; -}; -partial interface HTMLIFrameElement { - attribute DOMString align; - attribute DOMString scrolling; - attribute DOMString frameBorder; - attribute DOMString longDesc; - - [TreatNullAs=EmptyString] attribute DOMString marginHeight; - [TreatNullAs=EmptyString] attribute DOMString marginWidth; -}; -partial interface HTMLImageElement { - attribute DOMString name; - attribute DOMString lowsrc; - attribute DOMString align; - attribute unsigned long hspace; - attribute unsigned long vspace; - attribute DOMString longDesc; - - [TreatNullAs=EmptyString] attribute DOMString border; -}; -partial interface HTMLInputElement { - attribute DOMString align; - attribute DOMString useMap; -}; -partial interface HTMLLegendElement { - attribute DOMString align; -}; -partial interface HTMLLIElement { - attribute DOMString type; -}; -partial interface HTMLLinkElement { - attribute DOMString charset; - attribute DOMString rev; - attribute DOMString target; -}; -partial interface HTMLMenuElement { - attribute boolean compact; -}; -partial interface HTMLMetaElement { - attribute DOMString scheme; -}; -partial interface HTMLObjectElement { - attribute DOMString align; - attribute DOMString archive; - attribute DOMString code; - attribute boolean declare; - attribute unsigned long hspace; - attribute DOMString standby; - attribute unsigned long vspace; - attribute DOMString codeBase; - attribute DOMString codeType; - - [TreatNullAs=EmptyString] attribute DOMString border; -}; -partial interface HTMLOListElement { - attribute boolean compact; -}; -partial interface HTMLParagraphElement { - attribute DOMString align; -}; -partial interface HTMLParamElement { - attribute DOMString type; - attribute DOMString valueType; -}; -partial interface HTMLPreElement { - attribute long width; -}; -partial interface HTMLScriptElement { - attribute DOMString event; - attribute DOMString htmlFor; -}; -partial interface HTMLTableElement { - attribute DOMString align; - attribute DOMString border; - attribute DOMString frame; - attribute DOMString rules; - attribute DOMString summary; - attribute DOMString width; - - [TreatNullAs=EmptyString] attribute DOMString bgColor; - [TreatNullAs=EmptyString] attribute DOMString cellPadding; - [TreatNullAs=EmptyString] attribute DOMString cellSpacing; -}; -partial interface HTMLTableSectionElement { - attribute DOMString align; - attribute DOMString ch; - attribute DOMString chOff; - attribute DOMString vAlign; -}; -partial interface HTMLTableCellElement { - attribute DOMString align; - attribute DOMString axis; - attribute DOMString height; - attribute DOMString width; - - attribute DOMString ch; - attribute DOMString chOff; - attribute boolean noWrap; - attribute DOMString vAlign; - - [TreatNullAs=EmptyString] attribute DOMString bgColor; -}; -partial interface HTMLTableDataCellElement { - attribute DOMString abbr; -}; -partial interface HTMLTableRowElement { - attribute DOMString align; - attribute DOMString ch; - attribute DOMString chOff; - attribute DOMString vAlign; - - [TreatNullAs=EmptyString] attribute DOMString bgColor; -}; -partial interface HTMLUListElement { - attribute boolean compact; - attribute DOMString type; -}; -partial interface Document { - [TreatNullAs=EmptyString] attribute DOMString fgColor; - [TreatNullAs=EmptyString] attribute DOMString linkColor; - [TreatNullAs=EmptyString] attribute DOMString vlinkColor; - [TreatNullAs=EmptyString] attribute DOMString alinkColor; - [TreatNullAs=EmptyString] attribute DOMString bgColor; - - readonly attribute HTMLCollection anchors; - readonly attribute HTMLCollection applets; - - void clear(); - void captureEvents(); - void releaseEvents(); - - readonly attribute HTMLAllCollection all; -}; -partial interface Window { - void captureEvents(); - void releaseEvents(); -}; -// Downloaded from https://html.spec.whatwg.org/ -typedef (Int8Array or Uint8Array or Uint8ClampedArray or - Int16Array or Uint16Array or - Int32Array or Uint32Array or - Float32Array or Float64Array or - DataView) ArrayBufferView; -interface HTMLAllCollection : HTMLCollection { - // inherits length and 'getter' - Element? item(unsigned long index); - (HTMLCollection or Element)? item(DOMString name); - legacycaller getter (HTMLCollection or Element)? namedItem(DOMString name); // shadows inherited namedItem() -}; -interface HTMLFormControlsCollection : HTMLCollection { - // inherits length and item() - legacycaller getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem() -}; - -interface RadioNodeList : NodeList { - attribute DOMString value; -}; -interface HTMLOptionsCollection : HTMLCollection { - // inherits item() - attribute unsigned long length; // shadows inherited length - legacycaller HTMLOptionElement? (DOMString name); - setter creator void (unsigned long index, HTMLOptionElement? option); - void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); - void remove(long index); - attribute long selectedIndex; -}; -interface HTMLPropertiesCollection : HTMLCollection { - // inherits length and item() - getter PropertyNodeList? namedItem(DOMString name); // shadows inherited namedItem() - [SameObject] readonly attribute DOMString[] names; -}; - -typedef sequence PropertyValueArray; - -interface PropertyNodeList : NodeList { - PropertyValueArray getValues(); -}; -[OverrideBuiltins, Exposed=(Window,Worker)] -interface DOMStringMap { - getter DOMString (DOMString name); - setter creator void (DOMString name, DOMString value); - deleter void (DOMString name); -}; -interface DOMElementMap { - getter Element (DOMString name); - setter creator void (DOMString name, Element value); - deleter void (DOMString name); -}; -typedef (ArrayBuffer or CanvasProxy or MessagePort) Transferable; -callback FileCallback = void (File file); -enum DocumentReadyState { "loading", "interactive", "complete" }; - -[OverrideBuiltins] -partial /*sealed*/ interface Document { - // resource metadata management - [PutForwards=href, Unforgeable] readonly attribute Location? location; - attribute DOMString domain; - readonly attribute DOMString referrer; - attribute DOMString cookie; - readonly attribute DOMString lastModified; - readonly attribute DocumentReadyState readyState; - - // DOM tree accessors - getter object (DOMString name); - attribute DOMString title; - attribute DOMString dir; - attribute HTMLElement? body; - readonly attribute HTMLHeadElement? head; - [SameObject] readonly attribute HTMLCollection images; - [SameObject] readonly attribute HTMLCollection embeds; - [SameObject] readonly attribute HTMLCollection plugins; - [SameObject] readonly attribute HTMLCollection links; - [SameObject] readonly attribute HTMLCollection forms; - [SameObject] readonly attribute HTMLCollection scripts; - NodeList getElementsByName(DOMString elementName); - NodeList getItems(optional DOMString typeNames = ""); // microdata - [SameObject] readonly attribute DOMElementMap cssElementMap; - readonly attribute HTMLScriptElement? currentScript; - - // dynamic markup insertion - Document open(optional DOMString type = "text/html", optional DOMString replace = ""); - WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false); - void close(); - void write(DOMString... text); - void writeln(DOMString... text); - - // user interaction - readonly attribute WindowProxy? defaultView; - readonly attribute Element? activeElement; - boolean hasFocus(); - attribute DOMString designMode; - boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = ""); - boolean queryCommandEnabled(DOMString commandId); - boolean queryCommandIndeterm(DOMString commandId); - boolean queryCommandState(DOMString commandId); - boolean queryCommandSupported(DOMString commandId); - DOMString queryCommandValue(DOMString commandId); - readonly attribute HTMLCollection commands; - - // special event handler IDL attributes that only apply to Document objects - [LenientThis] attribute EventHandler onreadystatechange; - - // also has obsolete members -}; -Document implements GlobalEventHandlers; -partial interface XMLDocument { - boolean load(DOMString url); -}; -interface HTMLElement : Element { - // metadata attributes - attribute DOMString title; - attribute DOMString lang; - attribute boolean translate; - attribute DOMString dir; - [SameObject] readonly attribute DOMStringMap dataset; - - // microdata - attribute boolean itemScope; - [PutForwards=value] readonly attribute DOMSettableTokenList itemType; - attribute DOMString itemId; - [PutForwards=value] readonly attribute DOMSettableTokenList itemRef; - [PutForwards=value] readonly attribute DOMSettableTokenList itemProp; - readonly attribute HTMLPropertiesCollection properties; - attribute any itemValue; // acts as DOMString on setting - - // user interaction - attribute boolean hidden; - void click(); - attribute long tabIndex; - void focus(); - void blur(); - attribute DOMString accessKey; - readonly attribute DOMString accessKeyLabel; - attribute boolean draggable; - [PutForwards=value] readonly attribute DOMSettableTokenList dropzone; - attribute HTMLMenuElement? contextMenu; - attribute boolean spellcheck; - void forceSpellCheck(); - - // command API - readonly attribute DOMString? commandType; - readonly attribute DOMString? commandLabel; - readonly attribute DOMString? commandIcon; - readonly attribute boolean? commandHidden; - readonly attribute boolean? commandDisabled; - readonly attribute boolean? commandChecked; -}; -HTMLElement implements GlobalEventHandlers; -HTMLElement implements ElementContentEditable; - -interface HTMLUnknownElement : HTMLElement { }; -interface HTMLHtmlElement : HTMLElement { - // also has obsolete members -}; -interface HTMLHeadElement : HTMLElement {}; -interface HTMLTitleElement : HTMLElement { - attribute DOMString text; -}; -interface HTMLBaseElement : HTMLElement { - attribute DOMString href; - attribute DOMString target; -}; -interface HTMLLinkElement : HTMLElement { - attribute DOMString href; - attribute DOMString? crossOrigin; - attribute DOMString rel; - readonly attribute DOMTokenList relList; - attribute DOMString media; - attribute DOMString hreflang; - attribute DOMString type; - [PutForwards=value] readonly attribute DOMSettableTokenList sizes; - - // also has obsolete members -}; -HTMLLinkElement implements LinkStyle; -interface HTMLMetaElement : HTMLElement { - attribute DOMString name; - attribute DOMString httpEquiv; - attribute DOMString content; - - // also has obsolete members -}; -interface HTMLStyleElement : HTMLElement { - attribute DOMString media; - attribute DOMString type; - attribute boolean scoped; -}; -HTMLStyleElement implements LinkStyle; -interface HTMLBodyElement : HTMLElement { - - // also has obsolete members -}; -HTMLBodyElement implements WindowEventHandlers; -interface HTMLHeadingElement : HTMLElement { - // also has obsolete members -}; -interface HTMLParagraphElement : HTMLElement { - // also has obsolete members -}; -interface HTMLHRElement : HTMLElement { - // also has obsolete members -}; -interface HTMLPreElement : HTMLElement { - // also has obsolete members -}; -interface HTMLQuoteElement : HTMLElement { - attribute DOMString cite; -}; -interface HTMLOListElement : HTMLElement { - attribute boolean reversed; - attribute long start; - attribute DOMString type; - - // also has obsolete members -}; -interface HTMLUListElement : HTMLElement { - // also has obsolete members -}; -interface HTMLLIElement : HTMLElement { - attribute long value; - - // also has obsolete members -}; -interface HTMLDListElement : HTMLElement { - // also has obsolete members -}; -interface HTMLDivElement : HTMLElement { - // also has obsolete members -}; -interface HTMLAnchorElement : HTMLElement { - attribute DOMString target; - attribute DOMString download; - [PutForwards=value] attribute DOMSettableTokenList ping; - attribute DOMString rel; - readonly attribute DOMTokenList relList; - attribute DOMString hreflang; - attribute DOMString type; - - attribute DOMString text; - - // also has obsolete members -}; -HTMLAnchorElement implements URLUtils; -interface HTMLDataElement : HTMLElement { - attribute DOMString value; -}; -interface HTMLTimeElement : HTMLElement { - attribute DOMString dateTime; -}; -interface HTMLSpanElement : HTMLElement {}; -interface HTMLBRElement : HTMLElement { - // also has obsolete members -}; -interface HTMLModElement : HTMLElement { - attribute DOMString cite; - attribute DOMString dateTime; + [CEReactions] attribute USVString cite; + [CEReactions] attribute DOMString dateTime; }; +[HTMLConstructor] interface HTMLPictureElement : HTMLElement {}; -partial interface HTMLSourceElement { - attribute DOMString srcset; - attribute DOMString sizes; - attribute DOMString media; +[HTMLConstructor] +interface HTMLSourceElement : HTMLElement { + [CEReactions] attribute USVString src; + [CEReactions] attribute DOMString type; + [CEReactions] attribute USVString srcset; + [CEReactions] attribute DOMString sizes; + [CEReactions] attribute DOMString media; }; -[NamedConstructor=Image(optional unsigned long width, optional unsigned long height)] +[HTMLConstructor, NamedConstructor=Image(optional unsigned long width, optional unsigned long height)] interface HTMLImageElement : HTMLElement { - attribute DOMString alt; - attribute DOMString src; - attribute DOMString srcset; - attribute DOMString sizes; - attribute DOMString? crossOrigin; - attribute DOMString useMap; - attribute boolean isMap; - attribute unsigned long width; - attribute unsigned long height; + [CEReactions] attribute DOMString alt; + [CEReactions] attribute USVString src; + [CEReactions] attribute USVString srcset; + [CEReactions] attribute DOMString sizes; + [CEReactions] attribute DOMString? crossOrigin; + [CEReactions] attribute DOMString useMap; + [CEReactions] attribute boolean isMap; + [CEReactions] attribute unsigned long width; + [CEReactions] attribute unsigned long height; readonly attribute unsigned long naturalWidth; readonly attribute unsigned long naturalHeight; readonly attribute boolean complete; - readonly attribute DOMString currentSrc; - - // also has obsolete members + readonly attribute USVString currentSrc; + [CEReactions] attribute DOMString referrerPolicy; }; +[HTMLConstructor] interface HTMLIFrameElement : HTMLElement { - attribute DOMString src; - attribute DOMString srcdoc; - attribute DOMString name; - [PutForwards=value] readonly attribute DOMSettableTokenList sandbox; - attribute boolean seamless; - attribute boolean allowFullscreen; - attribute DOMString width; - attribute DOMString height; + [CEReactions] attribute USVString src; + [CEReactions] attribute DOMString srcdoc; + [CEReactions] attribute DOMString name; + [CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList sandbox; + [CEReactions] attribute boolean allowFullscreen; + [CEReactions] attribute boolean allowUserMedia; + [CEReactions] attribute DOMString width; + [CEReactions] attribute DOMString height; + [CEReactions] attribute DOMString referrerPolicy; readonly attribute Document? contentDocument; readonly attribute WindowProxy? contentWindow; Document? getSVGDocument(); - - // also has obsolete members }; +[HTMLConstructor] interface HTMLEmbedElement : HTMLElement { - attribute DOMString src; - attribute DOMString type; - attribute DOMString width; - attribute DOMString height; + [CEReactions] attribute USVString src; + [CEReactions] attribute DOMString type; + [CEReactions] attribute DOMString width; + [CEReactions] attribute DOMString height; Document? getSVGDocument(); legacycaller any (any... arguments); - - // also has obsolete members }; +[HTMLConstructor] interface HTMLObjectElement : HTMLElement { - attribute DOMString data; - attribute DOMString type; - attribute boolean typeMustMatch; - attribute DOMString name; - attribute DOMString useMap; + [CEReactions] attribute USVString data; + [CEReactions] attribute DOMString type; + [CEReactions] attribute boolean typeMustMatch; + [CEReactions] attribute DOMString name; + [CEReactions] attribute DOMString useMap; readonly attribute HTMLFormElement? form; - attribute DOMString width; - attribute DOMString height; + [CEReactions] attribute DOMString width; + [CEReactions] attribute DOMString height; readonly attribute Document? contentDocument; readonly attribute WindowProxy? contentWindow; Document? getSVGDocument(); @@ -2349,36 +304,30 @@ interface HTMLObjectElement : HTMLElement { void setCustomValidity(DOMString error); legacycaller any (any... arguments); - - // also has obsolete members }; +[HTMLConstructor] interface HTMLParamElement : HTMLElement { - attribute DOMString name; - attribute DOMString value; - - // also has obsolete members + [CEReactions] attribute DOMString name; + [CEReactions] attribute DOMString value; }; +[HTMLConstructor] interface HTMLVideoElement : HTMLMediaElement { - attribute unsigned long width; - attribute unsigned long height; + [CEReactions] attribute unsigned long width; + [CEReactions] attribute unsigned long height; readonly attribute unsigned long videoWidth; readonly attribute unsigned long videoHeight; - attribute DOMString poster; + [CEReactions] attribute USVString poster; + [CEReactions] attribute boolean playsInline; }; -[NamedConstructor=Audio(optional DOMString src)] +[HTMLConstructor, NamedConstructor=Audio(optional DOMString src)] interface HTMLAudioElement : HTMLMediaElement {}; -interface HTMLSourceElement : HTMLElement { - attribute DOMString src; - attribute DOMString type; - - // also has obsolete members -}; +[HTMLConstructor] interface HTMLTrackElement : HTMLElement { - attribute DOMString kind; - attribute DOMString src; - attribute DOMString srclang; - attribute DOMString label; - attribute boolean default; + [CEReactions] attribute DOMString kind; + [CEReactions] attribute USVString src; + [CEReactions] attribute DOMString srclang; + [CEReactions] attribute DOMString label; + [CEReactions] attribute boolean default; const unsigned short NONE = 0; const unsigned short LOADING = 1; @@ -2396,16 +345,16 @@ interface HTMLMediaElement : HTMLElement { readonly attribute MediaError? error; // network state - attribute DOMString src; + [CEReactions] attribute USVString src; attribute MediaProvider? srcObject; - readonly attribute DOMString currentSrc; - attribute DOMString? crossOrigin; + readonly attribute USVString currentSrc; + [CEReactions] attribute DOMString? crossOrigin; const unsigned short NETWORK_EMPTY = 0; const unsigned short NETWORK_IDLE = 1; const unsigned short NETWORK_LOADING = 2; const unsigned short NETWORK_NO_SOURCE = 3; readonly attribute unsigned short networkState; - attribute DOMString preload; + [CEReactions] attribute DOMString preload; readonly attribute TimeRanges buffered; void load(); CanPlayTypeResult canPlayType(DOMString type); @@ -2423,27 +372,23 @@ interface HTMLMediaElement : HTMLElement { attribute double currentTime; void fastSeek(double time); readonly attribute unrestricted double duration; - Date getStartDate(); + object getStartDate(); readonly attribute boolean paused; attribute double defaultPlaybackRate; attribute double playbackRate; readonly attribute TimeRanges played; readonly attribute TimeRanges seekable; readonly attribute boolean ended; - attribute boolean autoplay; - attribute boolean loop; - void play(); + [CEReactions] attribute boolean autoplay; + [CEReactions] attribute boolean loop; + Promise play(); void pause(); - // media controller - attribute DOMString mediaGroup; - attribute MediaController? controller; - // controls - attribute boolean controls; + [CEReactions] attribute boolean controls; attribute double volume; attribute boolean muted; - attribute boolean defaultMuted; + [CEReactions] attribute boolean defaultMuted; // tracks [SameObject] readonly attribute AudioTrackList audioTracks; @@ -2494,45 +439,6 @@ interface VideoTrack { readonly attribute DOMString language; attribute boolean selected; }; -enum MediaControllerPlaybackState { "waiting", "playing", "ended" }; -[Constructor] -interface MediaController : EventTarget { - readonly attribute unsigned short readyState; // uses HTMLMediaElement.readyState's values - - readonly attribute TimeRanges buffered; - readonly attribute TimeRanges seekable; - readonly attribute unrestricted double duration; - attribute double currentTime; - - readonly attribute boolean paused; - readonly attribute MediaControllerPlaybackState playbackState; - readonly attribute TimeRanges played; - void pause(); - void unpause(); - void play(); // calls play() on all media elements as well - - attribute double defaultPlaybackRate; - attribute double playbackRate; - - attribute double volume; - attribute boolean muted; - - attribute EventHandler onemptied; - attribute EventHandler onloadedmetadata; - attribute EventHandler onloadeddata; - attribute EventHandler oncanplay; - attribute EventHandler oncanplaythrough; - attribute EventHandler onplaying; - attribute EventHandler onended; - attribute EventHandler onwaiting; - - attribute EventHandler ondurationchange; - attribute EventHandler ontimeupdate; - attribute EventHandler onplay; - attribute EventHandler onpause; - attribute EventHandler onratechange; - attribute EventHandler onvolumechange; -}; interface TextTrackList : EventTarget { readonly attribute unsigned long length; getter TextTrack (unsigned long index); @@ -2589,159 +495,145 @@ interface TrackEvent : Event { }; dictionary TrackEventInit : EventInit { - (VideoTrack or AudioTrack or TextTrack)? track; + (VideoTrack or AudioTrack or TextTrack)? track = null; }; +[HTMLConstructor] interface HTMLMapElement : HTMLElement { - attribute DOMString name; - readonly attribute HTMLCollection areas; - readonly attribute HTMLCollection images; + [CEReactions] attribute DOMString name; + [SameObject] readonly attribute HTMLCollection areas; }; +[HTMLConstructor] interface HTMLAreaElement : HTMLElement { - attribute DOMString alt; - attribute DOMString coords; - attribute DOMString shape; - attribute DOMString target; - attribute DOMString download; - [PutForwards=value] attribute DOMSettableTokenList ping; - attribute DOMString rel; - readonly attribute DOMTokenList relList; - attribute DOMString hreflang; - attribute DOMString type; - - // also has obsolete members + [CEReactions] attribute DOMString alt; + [CEReactions] attribute DOMString coords; + [CEReactions] attribute DOMString shape; + [CEReactions] attribute DOMString target; + [CEReactions] attribute DOMString download; + [CEReactions] attribute USVString ping; + [CEReactions] attribute DOMString rel; + [CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList relList; + [CEReactions] attribute DOMString referrerPolicy; }; -HTMLAreaElement implements URLUtils; +HTMLAreaElement implements HTMLHyperlinkElementUtils; +[HTMLConstructor] interface HTMLTableElement : HTMLElement { - attribute HTMLTableCaptionElement? caption; - HTMLElement createCaption(); - void deleteCaption(); - attribute HTMLTableSectionElement? tHead; - HTMLElement createTHead(); - void deleteTHead(); - attribute HTMLTableSectionElement? tFoot; - HTMLElement createTFoot(); - void deleteTFoot(); - readonly attribute HTMLCollection tBodies; - HTMLElement createTBody(); - readonly attribute HTMLCollection rows; - HTMLElement insertRow(optional long index = -1); - void deleteRow(long index); - attribute boolean sortable; - void stopSorting(); + [CEReactions] attribute HTMLTableCaptionElement? caption; + HTMLTableCaptionElement createCaption(); + [CEReactions] void deleteCaption(); - // also has obsolete members -}; -interface HTMLTableCaptionElement : HTMLElement { - // also has obsolete members + [CEReactions] attribute HTMLTableSectionElement? tHead; + HTMLTableSectionElement createTHead(); + [CEReactions] void deleteTHead(); + + [CEReactions] attribute HTMLTableSectionElement? tFoot; + HTMLTableSectionElement createTFoot(); + [CEReactions] void deleteTFoot(); + + [SameObject] readonly attribute HTMLCollection tBodies; + HTMLTableSectionElement createTBody(); + + [SameObject] readonly attribute HTMLCollection rows; + HTMLTableRowElement insertRow(optional long index = -1); + [CEReactions] void deleteRow(long index); }; +[HTMLConstructor] +interface HTMLTableCaptionElement : HTMLElement {}; +[HTMLConstructor] interface HTMLTableColElement : HTMLElement { - attribute unsigned long span; - - // also has obsolete members + [CEReactions] attribute unsigned long span; }; +[HTMLConstructor] interface HTMLTableSectionElement : HTMLElement { - readonly attribute HTMLCollection rows; + [SameObject] readonly attribute HTMLCollection rows; HTMLElement insertRow(optional long index = -1); - void deleteRow(long index); - - // also has obsolete members + [CEReactions] void deleteRow(long index); }; +[HTMLConstructor] interface HTMLTableRowElement : HTMLElement { readonly attribute long rowIndex; readonly attribute long sectionRowIndex; - readonly attribute HTMLCollection cells; - HTMLElement insertCell(optional long index = -1); - void deleteCell(long index); - - // also has obsolete members -}; -interface HTMLTableDataCellElement : HTMLTableCellElement { - // also has obsolete members -}; -interface HTMLTableHeaderCellElement : HTMLTableCellElement { - attribute DOMString scope; - attribute DOMString abbr; - attribute DOMString sorted; - void sort(); + [SameObject] readonly attribute HTMLCollection cells; + [CEReactions] HTMLElement insertCell(optional long index = -1); + [CEReactions] void deleteCell(long index); }; +[HTMLConstructor] interface HTMLTableCellElement : HTMLElement { - attribute unsigned long colSpan; - attribute unsigned long rowSpan; - [PutForwards=value] readonly attribute DOMSettableTokenList headers; + [CEReactions] attribute unsigned long colSpan; + [CEReactions] attribute unsigned long rowSpan; + [CEReactions] attribute DOMString headers; readonly attribute long cellIndex; - // also has obsolete members + [CEReactions] attribute DOMString scope; // only conforming for th elements + [CEReactions] attribute DOMString abbr; // only conforming for th elements }; -[OverrideBuiltins] +[OverrideBuiltins, LegacyUnenumerableNamedProperties, HTMLConstructor] interface HTMLFormElement : HTMLElement { - attribute DOMString acceptCharset; - attribute DOMString action; - attribute DOMString autocomplete; - attribute DOMString enctype; - attribute DOMString encoding; - attribute DOMString method; - attribute DOMString name; - attribute boolean noValidate; - attribute DOMString target; + [CEReactions] attribute DOMString acceptCharset; + [CEReactions] attribute USVString action; + [CEReactions] attribute DOMString autocomplete; + [CEReactions] attribute DOMString enctype; + [CEReactions] attribute DOMString encoding; + [CEReactions] attribute DOMString method; + [CEReactions] attribute DOMString name; + [CEReactions] attribute boolean noValidate; + [CEReactions] attribute DOMString target; - readonly attribute HTMLFormControlsCollection elements; - readonly attribute long length; + [SameObject] readonly attribute HTMLFormControlsCollection elements; + readonly attribute unsigned long length; getter Element (unsigned long index); getter (RadioNodeList or Element) (DOMString name); void submit(); - void reset(); + [CEReactions] void reset(); boolean checkValidity(); boolean reportValidity(); - - void requestAutocomplete(); }; +[HTMLConstructor] interface HTMLLabelElement : HTMLElement { readonly attribute HTMLFormElement? form; - attribute DOMString htmlFor; + [CEReactions] attribute DOMString htmlFor; readonly attribute HTMLElement? control; }; +[HTMLConstructor] interface HTMLInputElement : HTMLElement { - attribute DOMString accept; - attribute DOMString alt; - attribute DOMString autocomplete; - attribute boolean autofocus; - attribute boolean defaultChecked; + [CEReactions] attribute DOMString accept; + [CEReactions] attribute DOMString alt; + [CEReactions] attribute DOMString autocomplete; + [CEReactions] attribute boolean autofocus; + [CEReactions] attribute boolean defaultChecked; attribute boolean checked; - attribute DOMString dirName; - attribute boolean disabled; + [CEReactions] attribute DOMString dirName; + [CEReactions] attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; - attribute DOMString formAction; - attribute DOMString formEnctype; - attribute DOMString formMethod; - attribute boolean formNoValidate; - attribute DOMString formTarget; - attribute unsigned long height; + [CEReactions] attribute USVString formAction; + [CEReactions] attribute DOMString formEnctype; + [CEReactions] attribute DOMString formMethod; + [CEReactions] attribute boolean formNoValidate; + [CEReactions] attribute DOMString formTarget; + [CEReactions] attribute unsigned long height; attribute boolean indeterminate; - attribute DOMString inputMode; + [CEReactions] attribute DOMString inputMode; readonly attribute HTMLElement? list; - attribute DOMString max; - attribute long maxLength; - attribute DOMString min; - attribute long minLength; - attribute boolean multiple; - attribute DOMString name; - attribute DOMString pattern; - attribute DOMString placeholder; - attribute boolean readOnly; - attribute boolean required; - attribute unsigned long size; - attribute DOMString src; - attribute DOMString step; - attribute DOMString type; - attribute DOMString defaultValue; - [TreatNullAs=EmptyString] attribute DOMString value; - attribute Date? valueAsDate; + [CEReactions] attribute DOMString max; + [CEReactions] attribute long maxLength; + [CEReactions] attribute DOMString min; + [CEReactions] attribute long minLength; + [CEReactions] attribute boolean multiple; + [CEReactions] attribute DOMString name; + [CEReactions] attribute DOMString pattern; + [CEReactions] attribute DOMString placeholder; + [CEReactions] attribute boolean readOnly; + [CEReactions] attribute boolean required; + [CEReactions] attribute unsigned long size; + [CEReactions] attribute USVString src; + [CEReactions] attribute DOMString step; + [CEReactions] attribute DOMString type; + [CEReactions] attribute DOMString defaultValue; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString value; + attribute object? valueAsDate; attribute unrestricted double valueAsNumber; - attribute double valueLow; - attribute double valueHigh; - attribute unsigned long width; + [CEReactions] attribute unsigned long width; void stepUp(optional long n = 1); void stepDown(optional long n = 1); @@ -2753,31 +645,30 @@ interface HTMLInputElement : HTMLElement { boolean reportValidity(); void setCustomValidity(DOMString error); - readonly attribute NodeList labels; + [SameObject] readonly attribute NodeList labels; void select(); - attribute unsigned long selectionStart; - attribute unsigned long selectionEnd; - attribute DOMString selectionDirection; + attribute unsigned long? selectionStart; + attribute unsigned long? selectionEnd; + attribute DOMString? selectionDirection; void setRangeText(DOMString replacement); void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); - - // also has obsolete members }; +[HTMLConstructor] interface HTMLButtonElement : HTMLElement { - attribute boolean autofocus; - attribute boolean disabled; + [CEReactions] attribute boolean autofocus; + [CEReactions] attribute boolean disabled; readonly attribute HTMLFormElement? form; - attribute DOMString formAction; - attribute DOMString formEnctype; - attribute DOMString formMethod; - attribute boolean formNoValidate; - attribute DOMString formTarget; - attribute DOMString name; - attribute DOMString type; - attribute DOMString value; - attribute HTMLMenuElement? menu; + [CEReactions] attribute USVString formAction; + [CEReactions] attribute DOMString formEnctype; + [CEReactions] attribute DOMString formMethod; + [CEReactions] attribute boolean formNoValidate; + [CEReactions] attribute DOMString formTarget; + [CEReactions] attribute DOMString name; + [CEReactions] attribute DOMString type; + [CEReactions] attribute DOMString value; + [CEReactions] attribute HTMLMenuElement? menu; readonly attribute boolean willValidate; readonly attribute ValidityState validity; @@ -2786,30 +677,31 @@ interface HTMLButtonElement : HTMLElement { boolean reportValidity(); void setCustomValidity(DOMString error); - readonly attribute NodeList labels; + [SameObject] readonly attribute NodeList labels; }; +[HTMLConstructor] interface HTMLSelectElement : HTMLElement { - attribute DOMString autocomplete; - attribute boolean autofocus; - attribute boolean disabled; + [CEReactions] attribute DOMString autocomplete; + [CEReactions] attribute boolean autofocus; + [CEReactions] attribute boolean disabled; readonly attribute HTMLFormElement? form; - attribute boolean multiple; - attribute DOMString name; - attribute boolean required; - attribute unsigned long size; + [CEReactions] attribute boolean multiple; + [CEReactions] attribute DOMString name; + [CEReactions] attribute boolean required; + [CEReactions] attribute unsigned long size; readonly attribute DOMString type; - readonly attribute HTMLOptionsCollection options; - attribute unsigned long length; + [SameObject] readonly attribute HTMLOptionsCollection options; + [CEReactions] attribute unsigned long length; getter Element? item(unsigned long index); HTMLOptionElement? namedItem(DOMString name); - void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); - void remove(); // ChildNode overload - void remove(long index); - setter creator void (unsigned long index, HTMLOptionElement? option); + [CEReactions] void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); + [CEReactions] void remove(); // ChildNode overload + [CEReactions] void remove(long index); + [CEReactions] setter void (unsigned long index, HTMLOptionElement? option); - readonly attribute HTMLCollection selectedOptions; + [SameObject] readonly attribute HTMLCollection selectedOptions; attribute long selectedIndex; attribute DOMString value; @@ -2820,47 +712,50 @@ interface HTMLSelectElement : HTMLElement { boolean reportValidity(); void setCustomValidity(DOMString error); - readonly attribute NodeList labels; + [SameObject] readonly attribute NodeList labels; }; +[HTMLConstructor] interface HTMLDataListElement : HTMLElement { - readonly attribute HTMLCollection options; + [SameObject] readonly attribute HTMLCollection options; }; +[HTMLConstructor] interface HTMLOptGroupElement : HTMLElement { - attribute boolean disabled; - attribute DOMString label; + [CEReactions] attribute boolean disabled; + [CEReactions] attribute DOMString label; }; -[NamedConstructor=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false)] +[HTMLConstructor, NamedConstructor=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false)] interface HTMLOptionElement : HTMLElement { - attribute boolean disabled; + [CEReactions] attribute boolean disabled; readonly attribute HTMLFormElement? form; - attribute DOMString label; - attribute boolean defaultSelected; + [CEReactions] attribute DOMString label; + [CEReactions] attribute boolean defaultSelected; attribute boolean selected; - attribute DOMString value; + [CEReactions] attribute DOMString value; - attribute DOMString text; + [CEReactions] attribute DOMString text; readonly attribute long index; }; +[HTMLConstructor] interface HTMLTextAreaElement : HTMLElement { - attribute DOMString autocomplete; - attribute boolean autofocus; - attribute unsigned long cols; - attribute DOMString dirName; - attribute boolean disabled; + [CEReactions] attribute DOMString autocomplete; + [CEReactions] attribute boolean autofocus; + [CEReactions] attribute unsigned long cols; + [CEReactions] attribute DOMString dirName; + [CEReactions] attribute boolean disabled; readonly attribute HTMLFormElement? form; - attribute DOMString inputMode; - attribute long maxLength; - attribute long minLength; - attribute DOMString name; - attribute DOMString placeholder; - attribute boolean readOnly; - attribute boolean required; - attribute unsigned long rows; - attribute DOMString wrap; + [CEReactions] attribute DOMString inputMode; + [CEReactions] attribute long maxLength; + [CEReactions] attribute long minLength; + [CEReactions] attribute DOMString name; + [CEReactions] attribute DOMString placeholder; + [CEReactions] attribute boolean readOnly; + [CEReactions] attribute boolean required; + [CEReactions] attribute unsigned long rows; + [CEReactions] attribute DOMString wrap; readonly attribute DOMString type; - attribute DOMString defaultValue; - [TreatNullAs=EmptyString] attribute DOMString value; + [CEReactions] attribute DOMString defaultValue; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString value; readonly attribute unsigned long textLength; readonly attribute boolean willValidate; @@ -2870,23 +765,24 @@ interface HTMLTextAreaElement : HTMLElement { boolean reportValidity(); void setCustomValidity(DOMString error); - readonly attribute NodeList labels; + [SameObject] readonly attribute NodeList labels; void select(); - attribute unsigned long selectionStart; - attribute unsigned long selectionEnd; - attribute DOMString selectionDirection; + attribute unsigned long? selectionStart; + attribute unsigned long? selectionEnd; + attribute DOMString? selectionDirection; void setRangeText(DOMString replacement); void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); }; +[HTMLConstructor] interface HTMLKeygenElement : HTMLElement { - attribute boolean autofocus; - attribute DOMString challenge; - attribute boolean disabled; + [CEReactions] attribute boolean autofocus; + [CEReactions] attribute DOMString challenge; + [CEReactions] attribute boolean disabled; readonly attribute HTMLFormElement? form; - attribute DOMString keytype; - attribute DOMString name; + [CEReactions] attribute DOMString keytype; + [CEReactions] attribute DOMString name; readonly attribute DOMString type; @@ -2897,16 +793,17 @@ interface HTMLKeygenElement : HTMLElement { boolean reportValidity(); void setCustomValidity(DOMString error); - readonly attribute NodeList labels; + [SameObject] readonly attribute NodeList labels; }; +[HTMLConstructor] interface HTMLOutputElement : HTMLElement { - [PutForwards=value] readonly attribute DOMSettableTokenList htmlFor; + [CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList htmlFor; readonly attribute HTMLFormElement? form; - attribute DOMString name; + [CEReactions] attribute DOMString name; readonly attribute DOMString type; - attribute DOMString defaultValue; - attribute DOMString value; + [CEReactions] attribute DOMString defaultValue; + [CEReactions] attribute DOMString value; readonly attribute boolean willValidate; readonly attribute ValidityState validity; @@ -2915,31 +812,34 @@ interface HTMLOutputElement : HTMLElement { boolean reportValidity(); void setCustomValidity(DOMString error); - readonly attribute NodeList labels; + [SameObject] readonly attribute NodeList labels; }; +[HTMLConstructor] interface HTMLProgressElement : HTMLElement { - attribute double value; - attribute double max; + [CEReactions] attribute double value; + [CEReactions] attribute double max; readonly attribute double position; - readonly attribute NodeList labels; + [SameObject] readonly attribute NodeList labels; }; +[HTMLConstructor] interface HTMLMeterElement : HTMLElement { - attribute double value; - attribute double min; - attribute double max; - attribute double low; - attribute double high; - attribute double optimum; - readonly attribute NodeList labels; + [CEReactions] attribute double value; + [CEReactions] attribute double min; + [CEReactions] attribute double max; + [CEReactions] attribute double low; + [CEReactions] attribute double high; + [CEReactions] attribute double optimum; + [SameObject] readonly attribute NodeList labels; }; +[HTMLConstructor] interface HTMLFieldSetElement : HTMLElement { - attribute boolean disabled; + [CEReactions] attribute boolean disabled; readonly attribute HTMLFormElement? form; - attribute DOMString name; + [CEReactions] attribute DOMString name; readonly attribute DOMString type; - readonly attribute HTMLFormControlsCollection elements; + [SameObject] readonly attribute HTMLCollection elements; readonly attribute boolean willValidate; [SameObject] readonly attribute ValidityState validity; @@ -2948,20 +848,9 @@ interface HTMLFieldSetElement : HTMLElement { boolean reportValidity(); void setCustomValidity(DOMString error); }; +[HTMLConstructor] interface HTMLLegendElement : HTMLElement { readonly attribute HTMLFormElement? form; - - // also has obsolete members -}; -enum AutocompleteErrorReason { "" /* empty string */, "cancel", "disabled", "invalid" }; - -[Constructor(DOMString type, optional AutocompleteErrorEventInit eventInitDict)] -interface AutocompleteErrorEvent : Event { - readonly attribute AutocompleteErrorReason reason; -}; - -dictionary AutocompleteErrorEventInit : EventInit { - AutocompleteErrorReason reason; }; enum SelectionMode { "select", @@ -2982,24 +871,24 @@ interface ValidityState { readonly attribute boolean customError; readonly attribute boolean valid; }; +[HTMLConstructor] interface HTMLDetailsElement : HTMLElement { - attribute boolean open; + [CEReactions] attribute boolean open; }; +[HTMLConstructor] interface HTMLMenuElement : HTMLElement { - attribute DOMString type; - attribute DOMString label; - - // also has obsolete members + [CEReactions] attribute DOMString type; + [CEReactions] attribute DOMString label; }; +[HTMLConstructor] interface HTMLMenuItemElement : HTMLElement { - attribute DOMString type; - attribute DOMString label; - attribute DOMString icon; - attribute boolean disabled; - attribute boolean checked; - attribute DOMString radiogroup; - attribute boolean default; - readonly attribute HTMLElement? command; + [CEReactions] attribute DOMString type; + [CEReactions] attribute DOMString label; + [CEReactions] attribute USVString icon; + [CEReactions] attribute boolean disabled; + [CEReactions] attribute boolean checked; + [CEReactions] attribute DOMString radiogroup; + [CEReactions] attribute boolean default; }; [Constructor(DOMString type, optional RelatedEventInit eventInitDict)] interface RelatedEvent : Event { @@ -3007,53 +896,60 @@ interface RelatedEvent : Event { }; dictionary RelatedEventInit : EventInit { - EventTarget? relatedTarget; + EventTarget? relatedTarget = null; }; +[HTMLConstructor] interface HTMLDialogElement : HTMLElement { - attribute boolean open; + [CEReactions] attribute boolean open; attribute DOMString returnValue; - void show(optional (MouseEvent or Element) anchor); - void showModal(optional (MouseEvent or Element) anchor); - void close(optional DOMString returnValue); + [CEReactions] void show(optional (MouseEvent or Element) anchor); + [CEReactions] void showModal(optional (MouseEvent or Element) anchor); + [CEReactions] void close(optional DOMString returnValue); }; +[HTMLConstructor] interface HTMLScriptElement : HTMLElement { - attribute DOMString src; - attribute DOMString type; - attribute DOMString charset; - attribute boolean async; - attribute boolean defer; - attribute DOMString? crossOrigin; - attribute DOMString text; - - // also has obsolete members + [CEReactions] attribute USVString src; + [CEReactions] attribute DOMString type; + [CEReactions] attribute DOMString charset; + [CEReactions] attribute boolean async; + [CEReactions] attribute boolean defer; + [CEReactions] attribute DOMString? crossOrigin; + [CEReactions] attribute DOMString text; + [CEReactions] attribute DOMString nonce; }; +[HTMLConstructor] interface HTMLTemplateElement : HTMLElement { readonly attribute DocumentFragment content; }; +[HTMLConstructor] +interface HTMLSlotElement : HTMLElement { + [CEReactions] attribute DOMString name; + sequence assignedNodes(optional AssignedNodesOptions options); +}; + +dictionary AssignedNodesOptions { + boolean flatten = false; +}; typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext; +[HTMLConstructor] interface HTMLCanvasElement : HTMLElement { - attribute unsigned long width; - attribute unsigned long height; + [CEReactions] attribute unsigned long width; + [CEReactions] attribute unsigned long height; RenderingContext? getContext(DOMString contextId, any... arguments); - boolean probablySupportsContext(DOMString contextId, any... arguments); - void setContext(RenderingContext context); - CanvasProxy transferControlToProxy(); + USVString toDataURL(optional DOMString type, optional any quality); + void toBlob(BlobCallback _callback, optional DOMString type, optional any quality); +}; - DOMString toDataURL(optional DOMString type, any... arguments); - void toBlob(FileCallback? _callback, optional DOMString type, any... arguments); -}; -[Exposed=(Window,Worker)] -interface CanvasProxy { - void setContext(RenderingContext context); -}; -// CanvasProxy implements Transferable; +callback BlobCallback = void (Blob? blob); typedef (HTMLImageElement or + SVGImageElement) HTMLOrSVGImageElement; + +typedef (HTMLOrSVGImageElement or HTMLVideoElement or HTMLCanvasElement or - CanvasRenderingContext2D or ImageBitmap) CanvasImageSource; enum CanvasFillRule { "nonzero", "evenodd" }; @@ -3062,69 +958,109 @@ dictionary CanvasRenderingContext2DSettings { boolean alpha = true; }; -[Constructor(), - Constructor(unsigned long width, unsigned long height), - Exposed=(Window,Worker)] -interface CanvasRenderingContext2D { +enum ImageSmoothingQuality { "low", "medium", "high" }; +interface CanvasRenderingContext2D { // back-reference to the canvas readonly attribute HTMLCanvasElement canvas; +}; +CanvasRenderingContext2D implements CanvasState; +CanvasRenderingContext2D implements CanvasTransform; +CanvasRenderingContext2D implements CanvasCompositing; +CanvasRenderingContext2D implements CanvasImageSmoothing; +CanvasRenderingContext2D implements CanvasFillStrokeStyles; +CanvasRenderingContext2D implements CanvasShadowStyles; +CanvasRenderingContext2D implements CanvasFilters; +CanvasRenderingContext2D implements CanvasRect; +CanvasRenderingContext2D implements CanvasDrawPath; +CanvasRenderingContext2D implements CanvasUserInterface; +CanvasRenderingContext2D implements CanvasText; +CanvasRenderingContext2D implements CanvasDrawImage; +CanvasRenderingContext2D implements CanvasHitRegion; +CanvasRenderingContext2D implements CanvasImageData; +CanvasRenderingContext2D implements CanvasPathDrawingStyles; +CanvasRenderingContext2D implements CanvasTextDrawingStyles; +CanvasRenderingContext2D implements CanvasPath; - // canvas dimensions - attribute unsigned long width; - attribute unsigned long height; - - // for contexts that aren't directly fixed to a specific canvas - void commit(); // push the image to the output bitmap - +[NoInterfaceObject] +interface CanvasState { // state void save(); // push state on state stack void restore(); // pop state stack and restore state +}; +[NoInterfaceObject] +interface CanvasTransform { // transformations (default transform is the identity matrix) - attribute SVGMatrix currentTransform; void scale(unrestricted double x, unrestricted double y); void rotate(unrestricted double angle); void translate(unrestricted double x, unrestricted double y); void transform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f); + + [NewObject] DOMMatrix getTransform(); void setTransform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f); + void setTransform(optional DOMMatrixInit transform); void resetTransform(); +}; + +[NoInterfaceObject] +interface CanvasCompositing { // compositing attribute unrestricted double globalAlpha; // (default 1.0) attribute DOMString globalCompositeOperation; // (default source-over) +}; +[NoInterfaceObject] +interface CanvasImageSmoothing { // image smoothing attribute boolean imageSmoothingEnabled; // (default true) + attribute ImageSmoothingQuality imageSmoothingQuality; // (default low) - // colours and styles (see also the CanvasDrawingStyles interface) +}; + +[NoInterfaceObject] +interface CanvasFillStrokeStyles { + // colors and styles (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces) attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black) attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black) CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1); CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1); - CanvasPattern createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition); + CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition); +}; + +[NoInterfaceObject] +interface CanvasShadowStyles { // shadows attribute unrestricted double shadowOffsetX; // (default 0) attribute unrestricted double shadowOffsetY; // (default 0) attribute unrestricted double shadowBlur; // (default 0) attribute DOMString shadowColor; // (default transparent black) +}; +[NoInterfaceObject] +interface CanvasFilters { + // filters + attribute DOMString filter; // (default "none") +}; + +[NoInterfaceObject] +interface CanvasRect { // rects void clearRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); void fillRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); void strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); +}; - // path API (see also CanvasPathMethods) +[NoInterfaceObject] +interface CanvasDrawPath { + // path API (see also CanvasPath) void beginPath(); void fill(optional CanvasFillRule fillRule = "nonzero"); void fill(Path2D path, optional CanvasFillRule fillRule = "nonzero"); void stroke(); void stroke(Path2D path); - void drawFocusIfNeeded(Element element); - void drawFocusIfNeeded(Path2D path, Element element); - void scrollPathIntoView(); - void scrollPathIntoView(Path2D path); void clip(optional CanvasFillRule fillRule = "nonzero"); void clip(Path2D path, optional CanvasFillRule fillRule = "nonzero"); void resetClip(); @@ -3132,22 +1068,42 @@ interface CanvasRenderingContext2D { boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero"); boolean isPointInStroke(unrestricted double x, unrestricted double y); boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y); +}; - // text (see also the CanvasDrawingStyles interface) +[NoInterfaceObject] +interface CanvasUserInterface { + void drawFocusIfNeeded(Element element); + void drawFocusIfNeeded(Path2D path, Element element); + void scrollPathIntoView(); + void scrollPathIntoView(Path2D path); +}; + +[NoInterfaceObject] +interface CanvasText { + // text (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces) void fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); void strokeText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); TextMetrics measureText(DOMString text); +}; +[NoInterfaceObject] +interface CanvasDrawImage { // drawing images void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy); void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); void drawImage(CanvasImageSource image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); +}; +[NoInterfaceObject] +interface CanvasHitRegion { // hit regions void addHitRegion(optional HitRegionOptions options); void removeHitRegion(DOMString id); void clearHitRegions(); +}; +[NoInterfaceObject] +interface CanvasImageData { // pixel manipulation ImageData createImageData(double sw, double sh); ImageData createImageData(ImageData imagedata); @@ -3155,31 +1111,38 @@ interface CanvasRenderingContext2D { void putImageData(ImageData imagedata, double dx, double dy); void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight); }; -CanvasRenderingContext2D implements CanvasDrawingStyles; -CanvasRenderingContext2D implements CanvasPathMethods; -[NoInterfaceObject, Exposed=(Window,Worker)] -interface CanvasDrawingStyles { +enum CanvasLineCap { "butt", "round", "square" }; +enum CanvasLineJoin { "round", "bevel", "miter"}; +enum CanvasTextAlign { "start", "end", "left", "right", "center" }; +enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" }; +enum CanvasDirection { "ltr", "rtl", "inherit" }; + +[NoInterfaceObject] +interface CanvasPathDrawingStyles { // line caps/joins attribute unrestricted double lineWidth; // (default 1) - attribute DOMString lineCap; // "butt", "round", "square" (default "butt") - attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") + attribute CanvasLineCap lineCap; // (default "butt") + attribute CanvasLineJoin lineJoin; // (default "miter") attribute unrestricted double miterLimit; // (default 10) // dashed lines void setLineDash(sequence segments); // default empty sequence getLineDash(); attribute unrestricted double lineDashOffset; +}; +[NoInterfaceObject] +interface CanvasTextDrawingStyles { // text attribute DOMString font; // (default 10px sans-serif) - attribute DOMString textAlign; // "start", "end", "left", "right", "center" (default: "start") - attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic") - attribute DOMString direction; // "ltr", "rtl", "inherit" (default: "inherit") + attribute CanvasTextAlign textAlign; // (default: "start") + attribute CanvasTextBaseline textBaseline; // (default: "alphabetic") + attribute CanvasDirection direction; // (default: "inherit") }; [NoInterfaceObject, Exposed=(Window,Worker)] -interface CanvasPathMethods { +interface CanvasPath { // shared path API methods void closePath(); void moveTo(unrestricted double x, unrestricted double y); @@ -3193,19 +1156,16 @@ interface CanvasPathMethods { void ellipse(unrestricted double x, unrestricted double y, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false); }; -[Exposed=(Window,Worker)] interface CanvasGradient { // opaque object void addColorStop(double offset, DOMString color); }; -[Exposed=(Window,Worker)] interface CanvasPattern { // opaque object - void setTransform(SVGMatrix transform); + void setTransform(optional DOMMatrixInit transform); }; -[Exposed=(Window,Worker)] interface TextMetrics { // x-direction readonly attribute double width; // advance width @@ -3246,36 +1206,44 @@ interface ImageData { readonly attribute Uint8ClampedArray data; }; -[Constructor(optional Element scope), Exposed=(Window,Worker)] -interface DrawingStyle { }; -DrawingStyle implements CanvasDrawingStyles; - [Constructor, Constructor(Path2D path), - Constructor(Path2D[] paths, optional CanvasFillRule fillRule = "nonzero"), + Constructor(sequence paths, optional CanvasFillRule fillRule = "nonzero"), Constructor(DOMString d), Exposed=(Window,Worker)] interface Path2D { - void addPath(Path2D path, optional SVGMatrix? transformation = null); - void addPathByStrokingPath(Path2D path, CanvasDrawingStyles styles, optional SVGMatrix? transformation = null); - void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); - void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); - void addText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path2D path, optional unrestricted double maxWidth); - void addPathByStrokingText(DOMString text, CanvasDrawingStyles styles, SVGMatrix? transformation, Path2D path, optional unrestricted double maxWidth); + void addPath(Path2D path, optional DOMMatrixInit transform); }; -Path2D implements CanvasPathMethods; +Path2D implements CanvasPath; partial interface MouseEvent { readonly attribute DOMString? region; }; partial dictionary MouseEventInit { - DOMString? region; + DOMString? region = null; }; partial interface Touch { readonly attribute DOMString? region; }; +interface ImageBitmapRenderingContext { + readonly attribute HTMLCanvasElement canvas; + void transferFromImageBitmap(ImageBitmap? bitmap); +}; + +dictionary ImageBitmapRenderingContextSettings { + boolean alpha = true; +}; +interface CustomElementRegistry { + [CEReactions] void define(DOMString name, Function constructor, optional ElementDefinitionOptions options); + any get(DOMString name); + Promise whenDefined(DOMString name); +}; + +dictionary ElementDefinitionOptions { + DOMString extends; +}; [NoInterfaceObject] interface ElementContentEditable { - attribute DOMString contentEditable; + [CEReactions] attribute DOMString contentEditable; readonly attribute boolean isContentEditable; }; interface DataTransfer { @@ -3287,7 +1255,7 @@ interface DataTransfer { void setDragImage(Element image, long x, long y); /* old interface */ - [SameObject] readonly attribute DOMString[] types; + readonly attribute FrozenArray types; DOMString getData(DOMString format); void setData(DOMString format, DOMString data); void clearData(optional DOMString format); @@ -3315,10 +1283,10 @@ interface DragEvent : MouseEvent { }; dictionary DragEventInit : MouseEventInit { - DataTransfer? dataTransfer; + DataTransfer? dataTransfer = null; }; -[PrimaryGlobal] -/*sealed*/ interface Window : EventTarget { +[PrimaryGlobal, LegacyUnenumerableNamedProperties] +interface Window : EventTarget { // the current browsing context [Unforgeable] readonly attribute WindowProxy window; [Replaceable] readonly attribute WindowProxy self; @@ -3326,6 +1294,7 @@ dictionary DragEventInit : MouseEventInit { attribute DOMString name; [PutForwards=href, Unforgeable] readonly attribute Location location; readonly attribute History history; + readonly attribute CustomElementRegistry customElements; [Replaceable] readonly attribute BarProp locationbar; [Replaceable] readonly attribute BarProp menubar; [Replaceable] readonly attribute BarProp personalbar; @@ -3346,13 +1315,14 @@ dictionary DragEventInit : MouseEventInit { attribute any opener; [Replaceable] readonly attribute WindowProxy parent; readonly attribute Element? frameElement; - WindowProxy open(optional DOMString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = "", optional boolean replace = false); - getter WindowProxy (unsigned long index); + WindowProxy? open(optional USVString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = ""); getter object (DOMString name); + // Since this is the global object, the IDL named getter adds a NamedPropertiesObject exotic + // object on the prototype chain. Indeed, this does not make the global object an exotic object. + // Indexed access is taken care of by the WindowProxy exotic object. // the user agent readonly attribute Navigator navigator; - [Replaceable, SameObject] readonly attribute External external; readonly attribute ApplicationCache applicationCache; // user prompts @@ -3361,62 +1331,73 @@ dictionary DragEventInit : MouseEventInit { boolean confirm(optional DOMString message = ""); DOMString? prompt(optional DOMString message = "", optional DOMString default = ""); void print(); - any showModalDialog(DOMString url, optional any argument); // deprecated - long requestAnimationFrame(FrameRequestCallback callback); - void cancelAnimationFrame(long handle); + unsigned long requestAnimationFrame(FrameRequestCallback callback); + void cancelAnimationFrame(unsigned long handle); - void postMessage(any message, DOMString targetOrigin, optional sequence transfer); - - // also has obsolete members + void postMessage(any message, USVString targetOrigin, optional sequence transfer = []); }; Window implements GlobalEventHandlers; Window implements WindowEventHandlers; + +callback FrameRequestCallback = void (DOMHighResTimeStamp time); interface BarProp { - attribute boolean visible; + readonly attribute boolean visible; }; +enum ScrollRestoration { "auto", "manual" }; + interface History { - readonly attribute long length; + readonly attribute unsigned long length; + attribute ScrollRestoration scrollRestoration; readonly attribute any state; - void go(optional long delta); + void go(optional long delta = 0); void back(); void forward(); - void pushState(any data, DOMString title, optional DOMString? url = null); - void replaceState(any data, DOMString title, optional DOMString? url = null); + void pushState(any data, DOMString title, optional USVString? url = null); + void replaceState(any data, DOMString title, optional USVString? url = null); }; -[Unforgeable] interface Location { - void assign(DOMString url); - void replace(DOMString url); - void reload(); +interface Location { + [Unforgeable] stringifier attribute USVString href; + [Unforgeable] readonly attribute USVString origin; + [Unforgeable] attribute USVString protocol; + [Unforgeable] attribute USVString host; + [Unforgeable] attribute USVString hostname; + [Unforgeable] attribute USVString port; + [Unforgeable] attribute USVString pathname; + [Unforgeable] attribute USVString search; + [Unforgeable] attribute USVString hash; - [SameObject] readonly attribute DOMString[] ancestorOrigins; + [Unforgeable] void assign(USVString url); + [Unforgeable] void replace(USVString url); + [Unforgeable] void reload(); + + [Unforgeable, SameObject] readonly attribute FrozenArray ancestorOrigins; }; -Location implements URLUtils; -[Constructor(DOMString type, optional PopStateEventInit eventInitDict), Exposed=(Window,Worker)] +[Constructor(DOMString type, optional PopStateEventInit eventInitDict)] interface PopStateEvent : Event { readonly attribute any state; }; dictionary PopStateEventInit : EventInit { - any state; + any state = null; }; -[Constructor(DOMString type, optional HashChangeEventInit eventInitDict), Exposed=(Window,Worker)] +[Constructor(DOMString type, optional HashChangeEventInit eventInitDict)] interface HashChangeEvent : Event { - readonly attribute DOMString oldURL; - readonly attribute DOMString newURL; + readonly attribute USVString oldURL; + readonly attribute USVString newURL; }; dictionary HashChangeEventInit : EventInit { - DOMString oldURL; - DOMString newURL; + USVString oldURL = ""; + USVString newURL = ""; }; -[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), Exposed=(Window,Worker)] +[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict)] interface PageTransitionEvent : Event { readonly attribute boolean persisted; }; dictionary PageTransitionEventInit : EventInit { - boolean persisted; + boolean persisted = false; }; interface BeforeUnloadEvent : Event { attribute DOMString returnValue; @@ -3455,24 +1436,34 @@ interface NavigatorOnLine { [Constructor(DOMString type, optional ErrorEventInit eventInitDict), Exposed=(Window,Worker)] interface ErrorEvent : Event { readonly attribute DOMString message; - readonly attribute DOMString filename; + readonly attribute USVString filename; readonly attribute unsigned long lineno; readonly attribute unsigned long colno; readonly attribute any error; }; dictionary ErrorEventInit : EventInit { - DOMString message; - DOMString filename; - unsigned long lineno; - unsigned long colno; - any error; + 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 promise; + readonly attribute any reason; +}; + +dictionary PromiseRejectionEventInit : EventInit { + required Promise 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 column, optional any error); +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); @@ -3480,8 +1471,6 @@ typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler; [NoInterfaceObject] interface GlobalEventHandlers { attribute EventHandler onabort; - attribute EventHandler onautocomplete; - attribute EventHandler onautocompleteerror; attribute EventHandler onblur; attribute EventHandler oncancel; attribute EventHandler oncanplay; @@ -3513,6 +1502,7 @@ interface GlobalEventHandlers { attribute EventHandler onload; attribute EventHandler onloadeddata; attribute EventHandler onloadedmetadata; + attribute EventHandler onloadend; attribute EventHandler onloadstart; attribute EventHandler onmousedown; [LenientThis] attribute EventHandler onmouseenter; @@ -3521,7 +1511,7 @@ interface GlobalEventHandlers { attribute EventHandler onmouseout; attribute EventHandler onmouseover; attribute EventHandler onmouseup; - attribute EventHandler onmousewheel; + attribute EventHandler onwheel; attribute EventHandler onpause; attribute EventHandler onplay; attribute EventHandler onplaying; @@ -3534,7 +1524,6 @@ interface GlobalEventHandlers { attribute EventHandler onseeking; attribute EventHandler onselect; attribute EventHandler onshow; - attribute EventHandler onsort; attribute EventHandler onstalled; attribute EventHandler onsubmit; attribute EventHandler onsuspend; @@ -3557,30 +1546,40 @@ interface WindowEventHandlers { attribute EventHandler onpagehide; attribute EventHandler onpageshow; attribute EventHandler onpopstate; + attribute EventHandler onrejectionhandled; attribute EventHandler onstorage; + attribute EventHandler onunhandledrejection; attribute EventHandler onunload; }; -[NoInterfaceObject, Exposed=(Window,Worker)] -interface WindowBase64 { - DOMString btoa(DOMString btoa); - DOMString atob(DOMString atob); -}; -Window implements WindowBase64; -[NoInterfaceObject, Exposed=(Window,Worker)] -interface WindowTimers { - long setTimeout(Function handler, optional long timeout = 0, any... arguments); - long setTimeout(DOMString handler, optional long timeout = 0, any... arguments); - void clearTimeout(optional long handle = 0); - long setInterval(Function handler, optional long timeout = 0, any... arguments); - long setInterval(DOMString handler, optional long timeout = 0, any... arguments); - void clearInterval(optional long handle = 0); -}; -Window implements WindowTimers; + [NoInterfaceObject] -interface WindowModal { - readonly attribute any dialogArguments; - attribute any returnValue; +interface DocumentAndElementEventHandlers { + attribute EventHandler oncopy; + attribute EventHandler oncut; + attribute EventHandler onpaste; }; +typedef (DOMString or Function) TimerHandler; + +[NoInterfaceObject, Exposed=(Window,Worker)] +interface WindowOrWorkerGlobalScope { + [Replaceable] readonly attribute USVString origin; + + // base64 utility methods + DOMString btoa(DOMString data); + DOMString 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 createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options); + Promise createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options); +}; +Window implements WindowOrWorkerGlobalScope; +WorkerGlobalScope implements WindowOrWorkerGlobalScope; interface Navigator { // objects implementing this interface also implement the interfaces given below }; @@ -3588,46 +1587,52 @@ Navigator implements NavigatorID; Navigator implements NavigatorLanguage; Navigator implements NavigatorOnLine; Navigator implements NavigatorContentUtils; -Navigator implements NavigatorStorageUtils; +Navigator implements NavigatorCookies; Navigator implements NavigatorPlugins; +Navigator implements NavigatorConcurrentHardware; [NoInterfaceObject, Exposed=(Window,Worker)] interface NavigatorID { readonly attribute DOMString appCodeName; // constant "Mozilla" - readonly attribute DOMString appName; + readonly attribute DOMString appName; // constant "Netscape" readonly attribute DOMString appVersion; readonly attribute DOMString platform; readonly attribute DOMString product; // constant "Gecko" - boolean taintEnabled(); // constant false + [Exposed=Window] readonly attribute DOMString productSub; readonly attribute DOMString userAgent; - readonly attribute DOMString vendorSub; + [Exposed=Window] readonly attribute DOMString vendor; + [Exposed=Window] readonly attribute DOMString vendorSub; // constant "" +}; +partial interface NavigatorID { + [Exposed=Window] boolean taintEnabled(); // constant false + [Exposed=Window] readonly attribute DOMString oscpu; }; [NoInterfaceObject, Exposed=(Window,Worker)] interface NavigatorLanguage { - readonly attribute DOMString? language; - readonly attribute DOMString[] languages; + readonly attribute DOMString language; + readonly attribute FrozenArray languages; }; [NoInterfaceObject] interface NavigatorContentUtils { // content handler registration - void registerProtocolHandler(DOMString scheme, DOMString url, DOMString title); - void registerContentHandler(DOMString mimeType, DOMString url, DOMString title); - DOMString isProtocolHandlerRegistered(DOMString scheme, DOMString url); - DOMString isContentHandlerRegistered(DOMString mimeType, DOMString url); - void unregisterProtocolHandler(DOMString scheme, DOMString url); - void unregisterContentHandler(DOMString mimeType, DOMString url); + void registerProtocolHandler(DOMString scheme, USVString url, DOMString title); + void registerContentHandler(DOMString mimeType, USVString url, DOMString title); + DOMString isProtocolHandlerRegistered(DOMString scheme, USVString url); + DOMString isContentHandlerRegistered(DOMString mimeType, USVString url); + void unregisterProtocolHandler(DOMString scheme, USVString url); + void unregisterContentHandler(DOMString mimeType, USVString url); }; [NoInterfaceObject] -interface NavigatorStorageUtils { +interface NavigatorCookies { readonly attribute boolean cookieEnabled; - void yieldForStorageUpdates(); }; [NoInterfaceObject] interface NavigatorPlugins { [SameObject] readonly attribute PluginArray plugins; [SameObject] readonly attribute MimeTypeArray mimeTypes; - readonly attribute boolean javaEnabled; + boolean javaEnabled(); }; +[LegacyUnenumerableNamedProperties] interface PluginArray { void refresh(optional boolean reload = false); readonly attribute unsigned long length; @@ -3635,12 +1640,14 @@ interface PluginArray { getter Plugin? namedItem(DOMString name); }; +[LegacyUnenumerableNamedProperties] interface MimeTypeArray { readonly attribute unsigned long length; getter MimeType? item(unsigned long index); getter MimeType? namedItem(DOMString name); }; +[LegacyUnenumerableNamedProperties] interface Plugin { readonly attribute DOMString name; readonly attribute DOMString description; @@ -3656,52 +1663,51 @@ interface MimeType { readonly attribute DOMString suffixes; // comma-separated readonly attribute Plugin enabledPlugin; }; -interface External { - void AddSearchProvider(DOMString engineURL); - unsigned long IsSearchProviderInstalled(DOMString engineURL); -}; [Exposed=(Window,Worker)] interface ImageBitmap { readonly attribute unsigned long width; readonly attribute unsigned long height; + void close(); }; -typedef (HTMLImageElement or - HTMLVideoElement or - HTMLCanvasElement or +typedef (CanvasImageSource or Blob or - ImageData or - CanvasRenderingContext2D or - ImageBitmap) ImageBitmapSource; + ImageData) ImageBitmapSource; -[NoInterfaceObject, Exposed=(Window,Worker)] -interface ImageBitmapFactories { - Promise createImageBitmap(ImageBitmapSource image); - Promise createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh); +enum ImageOrientation { "none", "flipY" }; +enum PremultiplyAlpha { "none", "premultiply", "default" }; +enum ColorSpaceConversion { "none", "default" }; +enum ResizeQuality { "pixelated", "low", "medium", "high" }; + +dictionary ImageBitmapOptions { + ImageOrientation imageOrientation = "none"; + PremultiplyAlpha premultiplyAlpha = "default"; + ColorSpaceConversion colorSpaceConversion = "default"; + [EnforceRange] unsigned long resizeWidth; + [EnforceRange] unsigned long resizeHeight; + ResizeQuality resizeQuality = "low"; }; -Window implements ImageBitmapFactories; -WorkerGlobalScope implements ImageBitmapFactories; [Constructor(DOMString type, optional MessageEventInit eventInitDict), Exposed=(Window,Worker)] interface MessageEvent : Event { readonly attribute any data; - readonly attribute DOMString origin; + readonly attribute USVString origin; readonly attribute DOMString lastEventId; readonly attribute (WindowProxy or MessagePort)? source; - readonly attribute MessagePort[]? ports; + readonly attribute FrozenArray ports; - void initMessageEvent(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, (WindowProxy or MessagePort) sourceArg, sequence? portsArg); + void initMessageEvent(DOMString type, boolean bubbles, boolean cancelable, any data, USVString origin, DOMString lastEventId, (WindowProxy or MessagePort)? source, sequence ports); }; dictionary MessageEventInit : EventInit { - any data; - DOMString origin; - DOMString lastEventId; - (WindowProxy or MessagePort)? source; - sequence ports; + any data = null; + USVString origin = ""; + DOMString lastEventId = ""; + (WindowProxy or MessagePort)? source = null; + sequence ports = []; }; -[Constructor(DOMString url, optional EventSourceInit eventSourceInitDict), Exposed=(Window,Worker)] +[Constructor(USVString url, optional EventSourceInit eventSourceInitDict), Exposed=(Window,Worker)] interface EventSource : EventTarget { - readonly attribute DOMString url; + readonly attribute USVString url; readonly attribute boolean withCredentials; // ready state @@ -3721,9 +1727,9 @@ dictionary EventSourceInit { boolean withCredentials = false; }; enum BinaryType { "blob", "arraybuffer" }; -[Constructor(DOMString url, optional (DOMString or DOMString[]) protocols), Exposed=(Window,Worker)] +[Constructor(USVString url, optional (DOMString or sequence) protocols = []), Exposed=(Window,Worker)] interface WebSocket : EventTarget { - readonly attribute DOMString url; + readonly attribute USVString url; // ready state const unsigned short CONNECTING = 0; @@ -3731,7 +1737,7 @@ interface WebSocket : EventTarget { const unsigned short CLOSING = 2; const unsigned short CLOSED = 3; readonly attribute unsigned short readyState; - readonly attribute unsigned long bufferedAmount; + readonly attribute unsigned long long bufferedAmount; // networking attribute EventHandler onopen; @@ -3753,13 +1759,13 @@ interface WebSocket : EventTarget { interface CloseEvent : Event { readonly attribute boolean wasClean; readonly attribute unsigned short code; - readonly attribute DOMString reason; + readonly attribute USVString reason; }; dictionary CloseEventInit : EventInit { - boolean wasClean; - unsigned short code; - DOMString reason; + boolean wasClean = false; + unsigned short code = 0; + USVString reason = ""; }; [Constructor, Exposed=(Window,Worker)] interface MessageChannel { @@ -3768,24 +1774,14 @@ interface MessageChannel { }; [Exposed=(Window,Worker)] interface MessagePort : EventTarget { - void postMessage(any message, optional sequence transfer); + void postMessage(any message, optional sequence transfer = []); void start(); void close(); // event handlers attribute EventHandler onmessage; }; -// MessagePort implements Transferable; -[Constructor, Exposed=(Window,Worker)] -interface PortCollection { - void add(MessagePort port); - void remove(MessagePort port); - void clear(); - void iterate(PortCollectionCallback callback); -}; - -callback PortCollectionCallback = void (MessagePort port); -[Constructor(DOMString channel), Exposed=(Window,Worker)] +[Constructor(DOMString name), Exposed=(Window,Worker)] interface BroadcastChannel : EventTarget { readonly attribute DOMString name; void postMessage(any message); @@ -3796,63 +1792,85 @@ interface BroadcastChannel : EventTarget { interface WorkerGlobalScope : EventTarget { readonly attribute WorkerGlobalScope self; readonly attribute WorkerLocation location; + readonly attribute WorkerNavigator navigator; + void importScripts(USVString... urls); - void close(); attribute OnErrorEventHandler onerror; attribute EventHandler onlanguagechange; attribute EventHandler onoffline; attribute EventHandler ononline; - - // also has additional members in a partial interface + attribute EventHandler onrejectionhandled; + attribute EventHandler onunhandledrejection; }; [Global=(Worker,DedicatedWorker),Exposed=DedicatedWorker] -/*sealed*/ interface DedicatedWorkerGlobalScope : WorkerGlobalScope { - void postMessage(any message, optional sequence transfer); +interface DedicatedWorkerGlobalScope : WorkerGlobalScope { + void postMessage(any message, optional sequence transfer = []); + + void close(); + attribute EventHandler onmessage; }; [Global=(Worker,SharedWorker),Exposed=SharedWorker] -/*sealed*/ interface SharedWorkerGlobalScope : WorkerGlobalScope { +interface SharedWorkerGlobalScope : WorkerGlobalScope { readonly attribute DOMString name; - readonly attribute ApplicationCache applicationCache; + readonly attribute ApplicationCache applicationCache; // deprecated + + void close(); + attribute EventHandler onconnect; }; [NoInterfaceObject, Exposed=(Window,Worker)] interface AbstractWorker { attribute EventHandler onerror; }; -[Constructor(DOMString scriptURL), Exposed=(Window,Worker)] +[Constructor(USVString scriptURL, optional WorkerOptions options), Exposed=(Window,Worker)] interface Worker : EventTarget { void terminate(); - void postMessage(any message, optional sequence transfer); + void postMessage(any message, optional sequence transfer = []); attribute EventHandler onmessage; }; + +dictionary WorkerOptions { + WorkerType type = "classic"; + RequestCredentials credentials = "omit"; // credentials is only used if type is "module" +}; + +enum WorkerType { "classic", "module" }; + Worker implements AbstractWorker; -[Constructor(DOMString scriptURL, optional DOMString name), Exposed=(Window,Worker)] +[Constructor(USVString scriptURL, optional DOMString name = "", optional WorkerOptions options), Exposed=(Window,Worker)] interface SharedWorker : EventTarget { readonly attribute MessagePort port; }; SharedWorker implements AbstractWorker; -[Exposed=Worker] -partial interface WorkerGlobalScope { // not obsolete - void importScripts(DOMString... urls); - readonly attribute WorkerNavigator navigator; +[NoInterfaceObject, Exposed=(Window,Worker)] +interface NavigatorConcurrentHardware { + readonly attribute unsigned long long hardwareConcurrency; }; -WorkerGlobalScope implements WindowTimers; -WorkerGlobalScope implements WindowBase64; [Exposed=Worker] interface WorkerNavigator {}; WorkerNavigator implements NavigatorID; WorkerNavigator implements NavigatorLanguage; WorkerNavigator implements NavigatorOnLine; +WorkerNavigator implements NavigatorConcurrentHardware; [Exposed=Worker] -interface WorkerLocation { }; -WorkerLocation implements URLUtilsReadOnly; +interface WorkerLocation { + stringifier readonly attribute USVString href; + readonly attribute USVString origin; + readonly attribute USVString protocol; + readonly attribute USVString host; + readonly attribute USVString hostname; + readonly attribute USVString port; + readonly attribute USVString pathname; + readonly attribute USVString search; + readonly attribute USVString hash; +}; interface Storage { readonly attribute unsigned long length; DOMString? key(unsigned long index); getter DOMString? getItem(DOMString key); - setter creator void setItem(DOMString key, DOMString value); + setter void setItem(DOMString key, DOMString value); deleter void removeItem(DOMString key); void clear(); }; @@ -3871,42 +1889,42 @@ interface StorageEvent : Event { readonly attribute DOMString? key; readonly attribute DOMString? oldValue; readonly attribute DOMString? newValue; - readonly attribute DOMString url; + readonly attribute USVString url; readonly attribute Storage? storageArea; }; dictionary StorageEventInit : EventInit { - DOMString? key; - DOMString? oldValue; - DOMString? newValue; - DOMString url; - Storage? storageArea; + DOMString? key = null; + DOMString? oldValue = null; + DOMString? newValue = null; + USVString url = ""; + Storage? storageArea = null; }; interface HTMLAppletElement : HTMLElement { - attribute DOMString align; - attribute DOMString alt; - attribute DOMString archive; - attribute DOMString code; - attribute DOMString codeBase; - attribute DOMString height; - attribute unsigned long hspace; - attribute DOMString name; - attribute DOMString _object; // the underscore is not part of the identifier - attribute unsigned long vspace; - attribute DOMString width; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString alt; + [CEReactions] attribute DOMString archive; + [CEReactions] attribute DOMString code; + [CEReactions] attribute USVString codeBase; + [CEReactions] attribute DOMString height; + [CEReactions] attribute unsigned long hspace; + [CEReactions] attribute DOMString name; + [CEReactions] attribute USVString _object; // the underscore is not part of the identifier + [CEReactions] attribute unsigned long vspace; + [CEReactions] attribute DOMString width; }; interface HTMLMarqueeElement : HTMLElement { - attribute DOMString behavior; - attribute DOMString bgColor; - attribute DOMString direction; - attribute DOMString height; - attribute unsigned long hspace; - attribute long loop; - attribute unsigned long scrollAmount; - attribute unsigned long scrollDelay; - attribute boolean trueSpeed; - attribute unsigned long vspace; - attribute DOMString width; + [CEReactions] attribute DOMString behavior; + [CEReactions] attribute DOMString bgColor; + [CEReactions] attribute DOMString direction; + [CEReactions] attribute DOMString height; + [CEReactions] attribute unsigned long hspace; + [CEReactions] attribute long loop; + [CEReactions] attribute unsigned long scrollAmount; + [CEReactions] attribute unsigned long scrollDelay; + [CEReactions] attribute boolean trueSpeed; + [CEReactions] attribute unsigned long vspace; + [CEReactions] attribute DOMString width; attribute EventHandler onbounce; attribute EventHandler onfinish; @@ -3916,221 +1934,228 @@ interface HTMLMarqueeElement : HTMLElement { void stop(); }; interface HTMLFrameSetElement : HTMLElement { - attribute DOMString cols; - attribute DOMString rows; + [CEReactions] attribute DOMString cols; + [CEReactions] attribute DOMString rows; }; HTMLFrameSetElement implements WindowEventHandlers; interface HTMLFrameElement : HTMLElement { - attribute DOMString name; - attribute DOMString scrolling; - attribute DOMString src; - attribute DOMString frameBorder; - attribute DOMString longDesc; - attribute boolean noResize; + [CEReactions] attribute DOMString name; + [CEReactions] attribute DOMString scrolling; + [CEReactions] attribute USVString src; + [CEReactions] attribute DOMString frameBorder; + [CEReactions] attribute USVString longDesc; + [CEReactions] attribute boolean noResize; readonly attribute Document? contentDocument; readonly attribute WindowProxy? contentWindow; - [TreatNullAs=EmptyString] attribute DOMString marginHeight; - [TreatNullAs=EmptyString] attribute DOMString marginWidth; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginHeight; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginWidth; }; partial interface HTMLAnchorElement { - attribute DOMString coords; - attribute DOMString charset; - attribute DOMString name; - attribute DOMString rev; - attribute DOMString shape; + [CEReactions] attribute DOMString coords; + [CEReactions] attribute DOMString charset; + [CEReactions] attribute DOMString name; + [CEReactions] attribute DOMString rev; + [CEReactions] attribute DOMString shape; }; partial interface HTMLAreaElement { - attribute boolean noHref; + [CEReactions] attribute boolean noHref; }; partial interface HTMLBodyElement { - [TreatNullAs=EmptyString] attribute DOMString text; - [TreatNullAs=EmptyString] attribute DOMString link; - [TreatNullAs=EmptyString] attribute DOMString vLink; - [TreatNullAs=EmptyString] attribute DOMString aLink; - [TreatNullAs=EmptyString] attribute DOMString bgColor; - attribute DOMString background; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString text; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString link; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString vLink; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString aLink; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; + [CEReactions] attribute DOMString background; }; partial interface HTMLBRElement { - attribute DOMString clear; + [CEReactions] attribute DOMString clear; }; partial interface HTMLTableCaptionElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLTableColElement { - attribute DOMString align; - attribute DOMString ch; - attribute DOMString chOff; - attribute DOMString vAlign; - attribute DOMString width; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString ch; + [CEReactions] attribute DOMString chOff; + [CEReactions] attribute DOMString vAlign; + [CEReactions] attribute DOMString width; }; +[HTMLConstructor] interface HTMLDirectoryElement : HTMLElement { - attribute boolean compact; + [CEReactions] attribute boolean compact; }; partial interface HTMLDivElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLDListElement { - attribute boolean compact; + [CEReactions] attribute boolean compact; }; partial interface HTMLEmbedElement { - attribute DOMString align; - attribute DOMString name; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString name; }; +[HTMLConstructor] interface HTMLFontElement : HTMLElement { - [TreatNullAs=EmptyString] attribute DOMString color; - attribute DOMString face; - attribute DOMString size; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString color; + [CEReactions] attribute DOMString face; + [CEReactions] attribute DOMString size; }; partial interface HTMLHeadingElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLHRElement { - attribute DOMString align; - attribute DOMString color; - attribute boolean noShade; - attribute DOMString size; - attribute DOMString width; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString color; + [CEReactions] attribute boolean noShade; + [CEReactions] attribute DOMString size; + [CEReactions] attribute DOMString width; }; partial interface HTMLHtmlElement { - attribute DOMString version; + [CEReactions] attribute DOMString version; }; partial interface HTMLIFrameElement { - attribute DOMString align; - attribute DOMString scrolling; - attribute DOMString frameBorder; - attribute DOMString longDesc; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString scrolling; + [CEReactions] attribute DOMString frameBorder; + [CEReactions] attribute USVString longDesc; - [TreatNullAs=EmptyString] attribute DOMString marginHeight; - [TreatNullAs=EmptyString] attribute DOMString marginWidth; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginHeight; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginWidth; }; partial interface HTMLImageElement { - attribute DOMString name; - attribute DOMString lowsrc; - attribute DOMString align; - attribute unsigned long hspace; - attribute unsigned long vspace; - attribute DOMString longDesc; + [CEReactions] attribute DOMString name; + [CEReactions] attribute USVString lowsrc; + [CEReactions] attribute DOMString align; + [CEReactions] attribute unsigned long hspace; + [CEReactions] attribute unsigned long vspace; + [CEReactions] attribute USVString longDesc; - [TreatNullAs=EmptyString] attribute DOMString border; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString border; }; partial interface HTMLInputElement { - attribute DOMString align; - attribute DOMString useMap; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString useMap; }; partial interface HTMLLegendElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLLIElement { - attribute DOMString type; + [CEReactions] attribute DOMString type; }; partial interface HTMLLinkElement { - attribute DOMString charset; - attribute DOMString rev; - attribute DOMString target; + [CEReactions] attribute DOMString charset; + [CEReactions] attribute DOMString rev; + [CEReactions] attribute DOMString target; }; partial interface HTMLMenuElement { - attribute boolean compact; + [CEReactions] attribute boolean compact; }; partial interface HTMLMetaElement { - attribute DOMString scheme; + [CEReactions] attribute DOMString scheme; }; partial interface HTMLObjectElement { - attribute DOMString align; - attribute DOMString archive; - attribute DOMString code; - attribute boolean declare; - attribute unsigned long hspace; - attribute DOMString standby; - attribute unsigned long vspace; - attribute DOMString codeBase; - attribute DOMString codeType; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString archive; + [CEReactions] attribute DOMString code; + [CEReactions] attribute boolean declare; + [CEReactions] attribute unsigned long hspace; + [CEReactions] attribute DOMString standby; + [CEReactions] attribute unsigned long vspace; + [CEReactions] attribute DOMString codeBase; + [CEReactions] attribute DOMString codeType; - [TreatNullAs=EmptyString] attribute DOMString border; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString border; }; partial interface HTMLOListElement { - attribute boolean compact; + [CEReactions] attribute boolean compact; }; partial interface HTMLParagraphElement { - attribute DOMString align; + [CEReactions] attribute DOMString align; }; partial interface HTMLParamElement { - attribute DOMString type; - attribute DOMString valueType; + [CEReactions] attribute DOMString type; + [CEReactions] attribute DOMString valueType; }; partial interface HTMLPreElement { - attribute long width; + [CEReactions] attribute long width; }; partial interface HTMLScriptElement { - attribute DOMString event; - attribute DOMString htmlFor; + [CEReactions] attribute DOMString event; + [CEReactions] attribute DOMString htmlFor; }; partial interface HTMLTableElement { - attribute DOMString align; - attribute DOMString border; - attribute DOMString frame; - attribute DOMString rules; - attribute DOMString summary; - attribute DOMString width; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString border; + [CEReactions] attribute DOMString frame; + [CEReactions] attribute DOMString rules; + [CEReactions] attribute DOMString summary; + [CEReactions] attribute DOMString width; - [TreatNullAs=EmptyString] attribute DOMString bgColor; - [TreatNullAs=EmptyString] attribute DOMString cellPadding; - [TreatNullAs=EmptyString] attribute DOMString cellSpacing; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString cellPadding; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString cellSpacing; }; partial interface HTMLTableSectionElement { - attribute DOMString align; - attribute DOMString ch; - attribute DOMString chOff; - attribute DOMString vAlign; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString ch; + [CEReactions] attribute DOMString chOff; + [CEReactions] attribute DOMString vAlign; }; partial interface HTMLTableCellElement { - attribute DOMString align; - attribute DOMString axis; - attribute DOMString height; - attribute DOMString width; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString axis; + [CEReactions] attribute DOMString height; + [CEReactions] attribute DOMString width; - attribute DOMString ch; - attribute DOMString chOff; - attribute boolean noWrap; - attribute DOMString vAlign; + [CEReactions] attribute DOMString ch; + [CEReactions] attribute DOMString chOff; + [CEReactions] attribute boolean noWrap; + [CEReactions] attribute DOMString vAlign; - [TreatNullAs=EmptyString] attribute DOMString bgColor; -}; -partial interface HTMLTableDataCellElement { - attribute DOMString abbr; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; }; partial interface HTMLTableRowElement { - attribute DOMString align; - attribute DOMString ch; - attribute DOMString chOff; - attribute DOMString vAlign; + [CEReactions] attribute DOMString align; + [CEReactions] attribute DOMString ch; + [CEReactions] attribute DOMString chOff; + [CEReactions] attribute DOMString vAlign; - [TreatNullAs=EmptyString] attribute DOMString bgColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; }; partial interface HTMLUListElement { - attribute boolean compact; - attribute DOMString type; + [CEReactions] attribute boolean compact; + [CEReactions] attribute DOMString type; }; partial interface Document { - [TreatNullAs=EmptyString] attribute DOMString fgColor; - [TreatNullAs=EmptyString] attribute DOMString linkColor; - [TreatNullAs=EmptyString] attribute DOMString vlinkColor; - [TreatNullAs=EmptyString] attribute DOMString alinkColor; - [TreatNullAs=EmptyString] attribute DOMString bgColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString fgColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString linkColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString vlinkColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString alinkColor; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; - readonly attribute HTMLCollection anchors; - readonly attribute HTMLCollection applets; + [SameObject] readonly attribute HTMLCollection anchors; + [SameObject] readonly attribute HTMLCollection applets; void clear(); void captureEvents(); void releaseEvents(); - readonly attribute HTMLAllCollection all; + [SameObject] readonly attribute HTMLAllCollection all; }; partial interface Window { void captureEvents(); void releaseEvents(); + + [Replaceable, SameObject] readonly attribute External external; }; +[NoInterfaceObject] +interface External { + void AddSearchProvider(); + void IsSearchProviderInstalled(); +}; +// Downloaded from http://html.spec.whatwg.org/ // Downloaded from https://raw.githubusercontent.com/whatwg/dom/master/dom.html [Constructor(DOMString type, optional EventInit eventInitDict), Exposed=(Window,Worker)] @@ -4138,6 +2163,7 @@ interface Event { readonly attribute DOMString type; readonly attribute EventTarget? target; readonly attribute EventTarget? currentTarget; + sequence composedPath(); const unsigned short NONE = 0; const unsigned short CAPTURING_PHASE = 1; @@ -4152,16 +2178,18 @@ interface Event { readonly attribute boolean cancelable; void preventDefault(); readonly attribute boolean defaultPrevented; + readonly attribute boolean composed; [Unforgeable] readonly attribute boolean isTrusted; readonly attribute DOMTimeStamp timeStamp; - void initEvent(DOMString type, boolean bubbles, boolean cancelable); + void initEvent(DOMString type, boolean bubbles, boolean cancelable); // historical }; dictionary EventInit { boolean bubbles = false; boolean cancelable = false; + boolean composed = false; }; [Constructor(DOMString type, optional CustomEventInit eventInitDict), Exposed=(Window,Worker)] @@ -4176,14 +2204,23 @@ dictionary CustomEventInit : EventInit { }; [Exposed=(Window,Worker)] interface EventTarget { - void addEventListener(DOMString type, EventListener? callback, optional boolean capture = false); - void removeEventListener(DOMString type, EventListener? callback, optional boolean capture = false); + void addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options); + void removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options); boolean dispatchEvent(Event event); }; callback interface EventListener { void handleEvent(Event event); }; + +dictionary EventListenerOptions { + boolean capture = false; +}; + +dictionary AddEventListenerOptions : EventListenerOptions { + boolean passive = false; + boolean once = false; +}; [NoInterfaceObject, Exposed=Window] interface NonElementParentNode { @@ -4191,6 +2228,12 @@ interface NonElementParentNode { }; Document implements NonElementParentNode; DocumentFragment implements NonElementParentNode; +[NoInterfaceObject, + Exposed=Window] +interface DocumentOrShadowRoot { +}; +Document implements DocumentOrShadowRoot; +ShadowRoot implements DocumentOrShadowRoot; [NoInterfaceObject, Exposed=Window] interface ParentNode { @@ -4199,11 +2242,9 @@ interface ParentNode { readonly attribute Element? lastElementChild; readonly attribute unsigned long childElementCount; - [Unscopeable] void prepend((Node or DOMString)... nodes); - [Unscopeable] void append((Node or DOMString)... nodes); + [CEReactions, Unscopable] void prepend((Node or DOMString)... nodes); + [CEReactions, Unscopable] void append((Node or DOMString)... nodes); - [Unscopeable] Element? query(DOMString relativeSelectors); - [NewObject, Unscopeable] Elements queryAll(DOMString relativeSelectors); Element? querySelector(DOMString selectors); [NewObject] NodeList querySelectorAll(DOMString selectors); }; @@ -4221,25 +2262,28 @@ CharacterData implements NonDocumentTypeChildNode; [NoInterfaceObject, Exposed=Window] interface ChildNode { - [Unscopeable] void before((Node or DOMString)... nodes); - [Unscopeable] void after((Node or DOMString)... nodes); - [Unscopeable] void replaceWith((Node or DOMString)... nodes); - [Unscopeable] void remove(); + [CEReactions, Unscopable] void before((Node or DOMString)... nodes); + [CEReactions, Unscopable] void after((Node or DOMString)... nodes); + [CEReactions, Unscopable] void replaceWith((Node or DOMString)... nodes); + [CEReactions, Unscopable] void remove(); }; DocumentType implements ChildNode; Element implements ChildNode; CharacterData implements ChildNode; -class Elements extends Array { - Element? query(DOMString relativeSelectors); - Elements queryAll(DOMString relativeSelectors); +[NoInterfaceObject, + Exposed=Window] +interface Slotable { + readonly attribute HTMLSlotElement? assignedSlot; }; +Element implements Slotable; +Text implements Slotable; [Exposed=Window] interface NodeList { getter Node? item(unsigned long index); readonly attribute unsigned long length; iterable; }; -[Exposed=Window] +[Exposed=Window, LegacyUnenumerableNamedProperties] interface HTMLCollection { readonly attribute unsigned long length; getter Element? item(unsigned long index); @@ -4247,7 +2291,7 @@ interface HTMLCollection { }; [Constructor(MutationCallback callback)] interface MutationObserver { - void observe(Node target, MutationObserverInit options); + void observe(Node target, optional MutationObserverInit options); void disconnect(); sequence takeRecords(); }; @@ -4266,7 +2310,7 @@ dictionary MutationObserverInit { [Exposed=Window] interface MutationRecord { readonly attribute DOMString type; - readonly attribute Node target; + [SameObject] readonly attribute Node target; [SameObject] readonly attribute NodeList addedNodes; [SameObject] readonly attribute NodeList removedNodes; readonly attribute Node? previousSibling; @@ -4278,9 +2322,9 @@ interface MutationRecord { [Exposed=Window] interface Node : EventTarget { const unsigned short ELEMENT_NODE = 1; - const unsigned short ATTRIBUTE_NODE = 2; // historical + const unsigned short ATTRIBUTE_NODE = 2; const unsigned short TEXT_NODE = 3; - const unsigned short CDATA_SECTION_NODE = 4; // historical + const unsigned short CDATA_SECTION_NODE = 4; const unsigned short ENTITY_REFERENCE_NODE = 5; // historical const unsigned short ENTITY_NODE = 6; // historical const unsigned short PROCESSING_INSTRUCTION_NODE = 7; @@ -4292,9 +2336,11 @@ interface Node : EventTarget { readonly attribute unsigned short nodeType; readonly attribute DOMString nodeName; - readonly attribute DOMString? baseURI; + readonly attribute USVString baseURI; + readonly attribute boolean isConnected; readonly attribute Document? ownerDocument; + Node getRootNode(optional GetRootNodeOptions options); readonly attribute Node? parentNode; readonly attribute Element? parentElement; boolean hasChildNodes(); @@ -4304,12 +2350,13 @@ interface Node : EventTarget { readonly attribute Node? previousSibling; readonly attribute Node? nextSibling; - attribute DOMString? nodeValue; - attribute DOMString? textContent; - void normalize(); + [CEReactions] attribute DOMString? nodeValue; + [CEReactions] attribute DOMString? textContent; + [CEReactions] void normalize(); - [NewObject] Node cloneNode(optional boolean deep = false); + [CEReactions, NewObject] Node cloneNode(optional boolean deep = false); boolean isEqualNode(Node? otherNode); + boolean isSameNode(Node? otherNode); // historical alias of === const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01; const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02; @@ -4324,41 +2371,47 @@ interface Node : EventTarget { DOMString? lookupNamespaceURI(DOMString? prefix); boolean isDefaultNamespace(DOMString? namespace); - Node insertBefore(Node node, Node? child); - Node appendChild(Node node); - Node replaceChild(Node node, Node child); - Node removeChild(Node child); + [CEReactions] Node insertBefore(Node node, Node? child); + [CEReactions] Node appendChild(Node node); + [CEReactions] Node replaceChild(Node node, Node child); + [CEReactions] Node removeChild(Node child); +}; + +dictionary GetRootNodeOptions { + boolean composed = false; }; [Constructor, Exposed=Window] interface Document : Node { [SameObject] readonly attribute DOMImplementation implementation; - readonly attribute DOMString URL; - readonly attribute DOMString documentURI; - readonly attribute DOMString origin; + readonly attribute USVString URL; + readonly attribute USVString documentURI; + readonly attribute USVString origin; readonly attribute DOMString compatMode; readonly attribute DOMString characterSet; - readonly attribute DOMString inputEncoding; // legacy alias of .characterSet + readonly attribute DOMString charset; // historical alias of .characterSet + readonly attribute DOMString inputEncoding; // historical alias of .characterSet readonly attribute DOMString contentType; readonly attribute DocumentType? doctype; readonly attribute Element? documentElement; - HTMLCollection getElementsByTagName(DOMString localName); + HTMLCollection getElementsByTagName(DOMString qualifiedName); HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName); HTMLCollection getElementsByClassName(DOMString classNames); - [NewObject] Element createElement(DOMString localName); - [NewObject] Element createElementNS(DOMString? namespace, DOMString qualifiedName); + [NewObject] Element createElement(DOMString localName, optional ElementCreationOptions options); + [NewObject] Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional ElementCreationOptions options); [NewObject] DocumentFragment createDocumentFragment(); [NewObject] Text createTextNode(DOMString data); + [NewObject] CDATASection createCDATASection(DOMString data); [NewObject] Comment createComment(DOMString data); [NewObject] ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data); - [NewObject] Node importNode(Node node, optional boolean deep = false); - Node adoptNode(Node node); + [CEReactions, NewObject] Node importNode(Node node, optional boolean deep = false); + [CEReactions] Node adoptNode(Node node); [NewObject] Attr createAttribute(DOMString localName); - [NewObject] Attr createAttributeNS(DOMString? namespace, DOMString name); + [NewObject] Attr createAttributeNS(DOMString? namespace, DOMString qualifiedName); [NewObject] Event createEvent(DOMString interface); @@ -4371,6 +2424,10 @@ interface Document : Node { [Exposed=Window] interface XMLDocument : Document {}; + +dictionary ElementCreationOptions { + DOMString is; +}; [Exposed=Window] interface DOMImplementation { [NewObject] DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId); @@ -4379,16 +2436,23 @@ interface DOMImplementation { boolean hasFeature(); // useless; always returns true }; -[Constructor, - Exposed=Window] -interface DocumentFragment : Node { -}; [Exposed=Window] interface DocumentType : Node { readonly attribute DOMString name; readonly attribute DOMString publicId; readonly attribute DOMString systemId; }; +[Constructor, + Exposed=Window] +interface DocumentFragment : Node { +}; +[Exposed=Window] +interface ShadowRoot : DocumentFragment { + readonly attribute ShadowRootMode mode; + readonly attribute Element host; +}; + +enum ShadowRootMode { "open", "closed" }; [Exposed=Window] interface Element : Node { readonly attribute DOMString? namespaceURI; @@ -4396,54 +2460,65 @@ interface Element : Node { readonly attribute DOMString localName; readonly attribute DOMString tagName; - attribute DOMString id; - attribute DOMString className; - [SameObject] readonly attribute DOMTokenList classList; + [CEReactions] attribute DOMString id; + [CEReactions] attribute DOMString className; + [CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList classList; + [CEReactions, Unscopable] attribute DOMString slot; boolean hasAttributes(); [SameObject] readonly attribute NamedNodeMap attributes; - DOMString? getAttribute(DOMString name); + sequence getAttributeNames(); + DOMString? getAttribute(DOMString qualifiedName); DOMString? getAttributeNS(DOMString? namespace, DOMString localName); - void setAttribute(DOMString name, DOMString value); - void setAttributeNS(DOMString? namespace, DOMString name, DOMString value); - void removeAttribute(DOMString name); - void removeAttributeNS(DOMString? namespace, DOMString localName); - boolean hasAttribute(DOMString name); + [CEReactions] void setAttribute(DOMString qualifiedName, DOMString value); + [CEReactions] void setAttributeNS(DOMString? namespace, DOMString qualifiedName, DOMString value); + [CEReactions] void removeAttribute(DOMString qualifiedName); + [CEReactions] void removeAttributeNS(DOMString? namespace, DOMString localName); + boolean hasAttribute(DOMString qualifiedName); boolean hasAttributeNS(DOMString? namespace, DOMString localName); - Attr? getAttributeNode(DOMString name); + Attr? getAttributeNode(DOMString qualifiedName); Attr? getAttributeNodeNS(DOMString? namespace, DOMString localName); - Attr? setAttributeNode(Attr attr); - Attr? setAttributeNodeNS(Attr attr); - Attr removeAttributeNode(Attr attr); + [CEReactions] Attr? setAttributeNode(Attr attr); + [CEReactions] Attr? setAttributeNodeNS(Attr attr); + [CEReactions] Attr removeAttributeNode(Attr attr); + + ShadowRoot attachShadow(ShadowRootInit init); + readonly attribute ShadowRoot? shadowRoot; Element? closest(DOMString selectors); boolean matches(DOMString selectors); + boolean webkitMatchesSelector(DOMString selectors); // historical alias of .matches - HTMLCollection getElementsByTagName(DOMString localName); + HTMLCollection getElementsByTagName(DOMString qualifiedName); HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName); HTMLCollection getElementsByClassName(DOMString classNames); + + [CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // historical + void insertAdjacentText(DOMString where, DOMString data); // historical }; -[Exposed=Window] + +dictionary ShadowRootInit { + required ShadowRootMode mode; +}; +[Exposed=Window, LegacyUnenumerableNamedProperties] interface NamedNodeMap { readonly attribute unsigned long length; getter Attr? item(unsigned long index); - getter Attr? getNamedItem(DOMString name); + getter Attr? getNamedItem(DOMString qualifiedName); Attr? getNamedItemNS(DOMString? namespace, DOMString localName); - Attr? setNamedItem(Attr attr); - Attr? setNamedItemNS(Attr attr); - Attr removeNamedItem(DOMString name); - Attr removeNamedItemNS(DOMString? namespace, DOMString localName); + [CEReactions] Attr? setNamedItem(Attr attr); + [CEReactions] Attr? setNamedItemNS(Attr attr); + [CEReactions] Attr removeNamedItem(DOMString qualifiedName); + [CEReactions] Attr removeNamedItemNS(DOMString? namespace, DOMString localName); }; [Exposed=Window] -interface Attr { +interface Attr : Node { readonly attribute DOMString? namespaceURI; readonly attribute DOMString? prefix; readonly attribute DOMString localName; readonly attribute DOMString name; - attribute DOMString value; - attribute DOMString nodeValue; // legacy alias of .value - attribute DOMString textContent; // legacy alias of .value + [CEReactions] attribute DOMString value; readonly attribute Element? ownerElement; @@ -4466,6 +2541,9 @@ interface Text : CharacterData { readonly attribute DOMString wholeText; }; [Exposed=Window] +interface CDATASection : Text { +}; +[Exposed=Window] interface ProcessingInstruction : CharacterData { readonly attribute DOMString target; }; @@ -4499,11 +2577,11 @@ interface Range { const unsigned short END_TO_START = 3; short compareBoundaryPoints(unsigned short how, Range sourceRange); - void deleteContents(); - [NewObject] DocumentFragment extractContents(); - [NewObject] DocumentFragment cloneContents(); - void insertNode(Node node); - void surroundContents(Node newParent); + [CEReactions] void deleteContents(); + [CEReactions, NewObject] DocumentFragment extractContents(); + [CEReactions, NewObject] DocumentFragment cloneContents(); + [CEReactions] void insertNode(Node node); + [CEReactions] void surroundContents(Node newParent); [NewObject] Range cloneRange(); void detach(); @@ -4553,9 +2631,9 @@ callback interface NodeFilter { // Constants for whatToShow const unsigned long SHOW_ALL = 0xFFFFFFFF; const unsigned long SHOW_ELEMENT = 0x1; - const unsigned long SHOW_ATTRIBUTE = 0x2; // historical + const unsigned long SHOW_ATTRIBUTE = 0x2; const unsigned long SHOW_TEXT = 0x4; - const unsigned long SHOW_CDATA_SECTION = 0x8; // historical + const unsigned long SHOW_CDATA_SECTION = 0x8; const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical const unsigned long SHOW_ENTITY = 0x20; // historical const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40; @@ -4571,21 +2649,21 @@ interface DOMTokenList { readonly attribute unsigned long length; getter DOMString? item(unsigned long index); boolean contains(DOMString token); - void add(DOMString... tokens); - void remove(DOMString... tokens); - boolean toggle(DOMString token, optional boolean force); - stringifier; + [CEReactions] void add(DOMString... tokens); + [CEReactions] void remove(DOMString... tokens); + [CEReactions] boolean toggle(DOMString token, optional boolean force); + [CEReactions] void replace(DOMString token, DOMString newToken); + boolean supports(DOMString token); + [CEReactions] stringifier attribute DOMString value; iterable; }; -interface DOMSettableTokenList : DOMTokenList { - attribute DOMString value; -}; [Constructor(DOMString type, optional EventInit eventInitDict), Exposed=(Window,Worker)] interface Event { readonly attribute DOMString type; readonly attribute EventTarget? target; readonly attribute EventTarget? currentTarget; + sequence composedPath(); const unsigned short NONE = 0; const unsigned short CAPTURING_PHASE = 1; @@ -4600,16 +2678,18 @@ interface Event { readonly attribute boolean cancelable; void preventDefault(); readonly attribute boolean defaultPrevented; + readonly attribute boolean composed; [Unforgeable] readonly attribute boolean isTrusted; readonly attribute DOMTimeStamp timeStamp; - void initEvent(DOMString type, boolean bubbles, boolean cancelable); + void initEvent(DOMString type, boolean bubbles, boolean cancelable); // historical }; dictionary EventInit { boolean bubbles = false; boolean cancelable = false; + boolean composed = false; }; [Constructor(DOMString type, optional CustomEventInit eventInitDict), @@ -4626,8 +2706,8 @@ dictionary CustomEventInit : EventInit { [Exposed=(Window,Worker)] interface EventTarget { - void addEventListener(DOMString type, EventListener? callback, optional boolean capture = false); - void removeEventListener(DOMString type, EventListener? callback, optional boolean capture = false); + void addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options); + void removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options); boolean dispatchEvent(Event event); }; @@ -4635,6 +2715,15 @@ callback interface EventListener { void handleEvent(Event event); }; +dictionary EventListenerOptions { + boolean capture = false; +}; + +dictionary AddEventListenerOptions : EventListenerOptions { + boolean passive = false; + boolean once = false; +}; + [NoInterfaceObject, Exposed=Window] interface NonElementParentNode { @@ -4643,6 +2732,13 @@ interface NonElementParentNode { Document implements NonElementParentNode; DocumentFragment implements NonElementParentNode; +[NoInterfaceObject, + Exposed=Window] +interface DocumentOrShadowRoot { +}; +Document implements DocumentOrShadowRoot; +ShadowRoot implements DocumentOrShadowRoot; + [NoInterfaceObject, Exposed=Window] interface ParentNode { @@ -4651,11 +2747,9 @@ interface ParentNode { readonly attribute Element? lastElementChild; readonly attribute unsigned long childElementCount; - [Unscopeable] void prepend((Node or DOMString)... nodes); - [Unscopeable] void append((Node or DOMString)... nodes); + [CEReactions, Unscopable] void prepend((Node or DOMString)... nodes); + [CEReactions, Unscopable] void append((Node or DOMString)... nodes); - [Unscopeable] Element? query(DOMString relativeSelectors); - [NewObject, Unscopeable] Elements queryAll(DOMString relativeSelectors); Element? querySelector(DOMString selectors); [NewObject] NodeList querySelectorAll(DOMString selectors); }; @@ -4675,19 +2769,22 @@ CharacterData implements NonDocumentTypeChildNode; [NoInterfaceObject, Exposed=Window] interface ChildNode { - [Unscopeable] void before((Node or DOMString)... nodes); - [Unscopeable] void after((Node or DOMString)... nodes); - [Unscopeable] void replaceWith((Node or DOMString)... nodes); - [Unscopeable] void remove(); + [CEReactions, Unscopable] void before((Node or DOMString)... nodes); + [CEReactions, Unscopable] void after((Node or DOMString)... nodes); + [CEReactions, Unscopable] void replaceWith((Node or DOMString)... nodes); + [CEReactions, Unscopable] void remove(); }; DocumentType implements ChildNode; Element implements ChildNode; CharacterData implements ChildNode; -class Elements extends Array { - Element? query(DOMString relativeSelectors); - Elements queryAll(DOMString relativeSelectors); +[NoInterfaceObject, + Exposed=Window] +interface Slotable { + readonly attribute HTMLSlotElement? assignedSlot; }; +Element implements Slotable; +Text implements Slotable; [Exposed=Window] interface NodeList { @@ -4696,7 +2793,7 @@ interface NodeList { iterable; }; -[Exposed=Window] +[Exposed=Window, LegacyUnenumerableNamedProperties] interface HTMLCollection { readonly attribute unsigned long length; getter Element? item(unsigned long index); @@ -4705,7 +2802,7 @@ interface HTMLCollection { [Constructor(MutationCallback callback)] interface MutationObserver { - void observe(Node target, MutationObserverInit options); + void observe(Node target, optional MutationObserverInit options); void disconnect(); sequence takeRecords(); }; @@ -4725,7 +2822,7 @@ dictionary MutationObserverInit { [Exposed=Window] interface MutationRecord { readonly attribute DOMString type; - readonly attribute Node target; + [SameObject] readonly attribute Node target; [SameObject] readonly attribute NodeList addedNodes; [SameObject] readonly attribute NodeList removedNodes; readonly attribute Node? previousSibling; @@ -4738,9 +2835,9 @@ interface MutationRecord { [Exposed=Window] interface Node : EventTarget { const unsigned short ELEMENT_NODE = 1; - const unsigned short ATTRIBUTE_NODE = 2; // historical + const unsigned short ATTRIBUTE_NODE = 2; const unsigned short TEXT_NODE = 3; - const unsigned short CDATA_SECTION_NODE = 4; // historical + const unsigned short CDATA_SECTION_NODE = 4; const unsigned short ENTITY_REFERENCE_NODE = 5; // historical const unsigned short ENTITY_NODE = 6; // historical const unsigned short PROCESSING_INSTRUCTION_NODE = 7; @@ -4752,9 +2849,11 @@ interface Node : EventTarget { readonly attribute unsigned short nodeType; readonly attribute DOMString nodeName; - readonly attribute DOMString? baseURI; + readonly attribute USVString baseURI; + readonly attribute boolean isConnected; readonly attribute Document? ownerDocument; + Node getRootNode(optional GetRootNodeOptions options); readonly attribute Node? parentNode; readonly attribute Element? parentElement; boolean hasChildNodes(); @@ -4764,12 +2863,13 @@ interface Node : EventTarget { readonly attribute Node? previousSibling; readonly attribute Node? nextSibling; - attribute DOMString? nodeValue; - attribute DOMString? textContent; - void normalize(); + [CEReactions] attribute DOMString? nodeValue; + [CEReactions] attribute DOMString? textContent; + [CEReactions] void normalize(); - [NewObject] Node cloneNode(optional boolean deep = false); + [CEReactions, NewObject] Node cloneNode(optional boolean deep = false); boolean isEqualNode(Node? otherNode); + boolean isSameNode(Node? otherNode); // historical alias of === const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01; const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02; @@ -4784,42 +2884,48 @@ interface Node : EventTarget { DOMString? lookupNamespaceURI(DOMString? prefix); boolean isDefaultNamespace(DOMString? namespace); - Node insertBefore(Node node, Node? child); - Node appendChild(Node node); - Node replaceChild(Node node, Node child); - Node removeChild(Node child); + [CEReactions] Node insertBefore(Node node, Node? child); + [CEReactions] Node appendChild(Node node); + [CEReactions] Node replaceChild(Node node, Node child); + [CEReactions] Node removeChild(Node child); +}; + +dictionary GetRootNodeOptions { + boolean composed = false; }; [Constructor, Exposed=Window] interface Document : Node { [SameObject] readonly attribute DOMImplementation implementation; - readonly attribute DOMString URL; - readonly attribute DOMString documentURI; - readonly attribute DOMString origin; + readonly attribute USVString URL; + readonly attribute USVString documentURI; + readonly attribute USVString origin; readonly attribute DOMString compatMode; readonly attribute DOMString characterSet; - readonly attribute DOMString inputEncoding; // legacy alias of .characterSet + readonly attribute DOMString charset; // historical alias of .characterSet + readonly attribute DOMString inputEncoding; // historical alias of .characterSet readonly attribute DOMString contentType; readonly attribute DocumentType? doctype; readonly attribute Element? documentElement; - HTMLCollection getElementsByTagName(DOMString localName); + HTMLCollection getElementsByTagName(DOMString qualifiedName); HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName); HTMLCollection getElementsByClassName(DOMString classNames); - [NewObject] Element createElement(DOMString localName); - [NewObject] Element createElementNS(DOMString? namespace, DOMString qualifiedName); + [NewObject] Element createElement(DOMString localName, optional ElementCreationOptions options); + [NewObject] Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional ElementCreationOptions options); [NewObject] DocumentFragment createDocumentFragment(); [NewObject] Text createTextNode(DOMString data); + [NewObject] CDATASection createCDATASection(DOMString data); [NewObject] Comment createComment(DOMString data); [NewObject] ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data); - [NewObject] Node importNode(Node node, optional boolean deep = false); - Node adoptNode(Node node); + [CEReactions, NewObject] Node importNode(Node node, optional boolean deep = false); + [CEReactions] Node adoptNode(Node node); [NewObject] Attr createAttribute(DOMString localName); - [NewObject] Attr createAttributeNS(DOMString? namespace, DOMString name); + [NewObject] Attr createAttributeNS(DOMString? namespace, DOMString qualifiedName); [NewObject] Event createEvent(DOMString interface); @@ -4833,6 +2939,10 @@ interface Document : Node { [Exposed=Window] interface XMLDocument : Document {}; +dictionary ElementCreationOptions { + DOMString is; +}; + [Exposed=Window] interface DOMImplementation { [NewObject] DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId); @@ -4842,11 +2952,6 @@ interface DOMImplementation { boolean hasFeature(); // useless; always returns true }; -[Constructor, - Exposed=Window] -interface DocumentFragment : Node { -}; - [Exposed=Window] interface DocumentType : Node { readonly attribute DOMString name; @@ -4854,6 +2959,19 @@ interface DocumentType : Node { readonly attribute DOMString systemId; }; +[Constructor, + Exposed=Window] +interface DocumentFragment : Node { +}; + +[Exposed=Window] +interface ShadowRoot : DocumentFragment { + readonly attribute ShadowRootMode mode; + readonly attribute Element host; +}; + +enum ShadowRootMode { "open", "closed" }; + [Exposed=Window] interface Element : Node { readonly attribute DOMString? namespaceURI; @@ -4861,55 +2979,67 @@ interface Element : Node { readonly attribute DOMString localName; readonly attribute DOMString tagName; - attribute DOMString id; - attribute DOMString className; - [SameObject] readonly attribute DOMTokenList classList; + [CEReactions] attribute DOMString id; + [CEReactions] attribute DOMString className; + [CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList classList; + [CEReactions, Unscopable] attribute DOMString slot; boolean hasAttributes(); [SameObject] readonly attribute NamedNodeMap attributes; - DOMString? getAttribute(DOMString name); + sequence getAttributeNames(); + DOMString? getAttribute(DOMString qualifiedName); DOMString? getAttributeNS(DOMString? namespace, DOMString localName); - void setAttribute(DOMString name, DOMString value); - void setAttributeNS(DOMString? namespace, DOMString name, DOMString value); - void removeAttribute(DOMString name); - void removeAttributeNS(DOMString? namespace, DOMString localName); - boolean hasAttribute(DOMString name); + [CEReactions] void setAttribute(DOMString qualifiedName, DOMString value); + [CEReactions] void setAttributeNS(DOMString? namespace, DOMString qualifiedName, DOMString value); + [CEReactions] void removeAttribute(DOMString qualifiedName); + [CEReactions] void removeAttributeNS(DOMString? namespace, DOMString localName); + boolean hasAttribute(DOMString qualifiedName); boolean hasAttributeNS(DOMString? namespace, DOMString localName); - Attr? getAttributeNode(DOMString name); + Attr? getAttributeNode(DOMString qualifiedName); Attr? getAttributeNodeNS(DOMString? namespace, DOMString localName); - Attr? setAttributeNode(Attr attr); - Attr? setAttributeNodeNS(Attr attr); - Attr removeAttributeNode(Attr attr); + [CEReactions] Attr? setAttributeNode(Attr attr); + [CEReactions] Attr? setAttributeNodeNS(Attr attr); + [CEReactions] Attr removeAttributeNode(Attr attr); + + ShadowRoot attachShadow(ShadowRootInit init); + readonly attribute ShadowRoot? shadowRoot; Element? closest(DOMString selectors); boolean matches(DOMString selectors); + boolean webkitMatchesSelector(DOMString selectors); // historical alias of .matches - HTMLCollection getElementsByTagName(DOMString localName); + HTMLCollection getElementsByTagName(DOMString qualifiedName); HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName); HTMLCollection getElementsByClassName(DOMString classNames); + + [CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // historical + void insertAdjacentText(DOMString where, DOMString data); // historical }; -[Exposed=Window] + +dictionary ShadowRootInit { + required ShadowRootMode mode; +}; + +[Exposed=Window, LegacyUnenumerableNamedProperties] interface NamedNodeMap { readonly attribute unsigned long length; getter Attr? item(unsigned long index); - getter Attr? getNamedItem(DOMString name); + getter Attr? getNamedItem(DOMString qualifiedName); Attr? getNamedItemNS(DOMString? namespace, DOMString localName); - Attr? setNamedItem(Attr attr); - Attr? setNamedItemNS(Attr attr); - Attr removeNamedItem(DOMString name); - Attr removeNamedItemNS(DOMString? namespace, DOMString localName); + [CEReactions] Attr? setNamedItem(Attr attr); + [CEReactions] Attr? setNamedItemNS(Attr attr); + [CEReactions] Attr removeNamedItem(DOMString qualifiedName); + [CEReactions] Attr removeNamedItemNS(DOMString? namespace, DOMString localName); }; [Exposed=Window] -interface Attr { +interface Attr : Node { readonly attribute DOMString? namespaceURI; readonly attribute DOMString? prefix; readonly attribute DOMString localName; readonly attribute DOMString name; - attribute DOMString value; - attribute DOMString nodeValue; // legacy alias of .value - attribute DOMString textContent; // legacy alias of .value + [CEReactions] attribute DOMString value; readonly attribute Element? ownerElement; @@ -4933,6 +3063,9 @@ interface Text : CharacterData { readonly attribute DOMString wholeText; }; [Exposed=Window] +interface CDATASection : Text { +}; +[Exposed=Window] interface ProcessingInstruction : CharacterData { readonly attribute DOMString target; }; @@ -4967,11 +3100,11 @@ interface Range { const unsigned short END_TO_START = 3; short compareBoundaryPoints(unsigned short how, Range sourceRange); - void deleteContents(); - [NewObject] DocumentFragment extractContents(); - [NewObject] DocumentFragment cloneContents(); - void insertNode(Node node); - void surroundContents(Node newParent); + [CEReactions] void deleteContents(); + [CEReactions, NewObject] DocumentFragment extractContents(); + [CEReactions, NewObject] DocumentFragment cloneContents(); + [CEReactions] void insertNode(Node node); + [CEReactions] void surroundContents(Node newParent); [NewObject] Range cloneRange(); void detach(); @@ -5023,9 +3156,9 @@ callback interface NodeFilter { // Constants for whatToShow const unsigned long SHOW_ALL = 0xFFFFFFFF; const unsigned long SHOW_ELEMENT = 0x1; - const unsigned long SHOW_ATTRIBUTE = 0x2; // historical + const unsigned long SHOW_ATTRIBUTE = 0x2; const unsigned long SHOW_TEXT = 0x4; - const unsigned long SHOW_CDATA_SECTION = 0x8; // historical + const unsigned long SHOW_CDATA_SECTION = 0x8; const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical const unsigned long SHOW_ENTITY = 0x20; // historical const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40; @@ -5042,68 +3175,15 @@ interface DOMTokenList { readonly attribute unsigned long length; getter DOMString? item(unsigned long index); boolean contains(DOMString token); - void add(DOMString... tokens); - void remove(DOMString... tokens); - boolean toggle(DOMString token, optional boolean force); - stringifier; + [CEReactions] void add(DOMString... tokens); + [CEReactions] void remove(DOMString... tokens); + [CEReactions] boolean toggle(DOMString token, optional boolean force); + [CEReactions] void replace(DOMString token, DOMString newToken); + boolean supports(DOMString token); + [CEReactions] stringifier attribute DOMString value; iterable; }; - -interface DOMSettableTokenList : DOMTokenList { - attribute DOMString value; -}; // Downloaded from https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html -interface Selection { - readonly attribute Node? anchorNode; - readonly attribute unsigned long anchorOffset; - readonly attribute Node? focusNode; - readonly attribute unsigned long focusOffset; - - readonly attribute boolean isCollapsed; - void collapse(Node node, unsigned long offset); - void collapseToStart(); - void collapseToEnd(); - - void extend(Node node, unsigned long offset); - - void selectAllChildren(Node node); - void deleteFromDocument(); - - readonly attribute unsigned long rangeCount; - Range getRangeAt(unsigned long index); - void addRange(Range range); - void removeRange(Range range); - void removeAllRanges(); - - stringifier; -}; -partial interface Document { - Selection getSelection(); -}; -partial interface Window { - Selection getSelection(); -}; -[Constructor(DOMString type, optional EditingBeforeInputEventInit eventInitDict)] -interface EditingBeforeInputEvent : Event { - readonly attribute DOMString command; - readonly attribute DOMString value; -}; - -dictionary EditingBeforeInputEventInit : EventInit { - DOMString command; - DOMString value; -}; - -[Constructor(DOMString type, optional EditingInputEventInit eventInitDict)] -interface EditingInputEvent : Event { - readonly attribute DOMString command; - readonly attribute DOMString value; -}; - -dictionary EditingInputEventInit : EventInit { - DOMString command; - DOMString value; -}; // Downloaded from http://www.w3.org/TR/animation-timing/ partial interface Window { long requestAnimationFrame(FrameRequestCallback callback); @@ -5546,52 +3626,68 @@ interface DOMMatrix : DOMMatrixReadOnly { enum ScrollBehavior { "auto", "instant", "smooth" }; dictionary ScrollOptions { - ScrollBehavior behavior = "auto"; + ScrollBehavior behavior = "auto"; +}; +dictionary ScrollToOptions : ScrollOptions { + unrestricted double left; + unrestricted double top; }; partial interface Window { - MediaQueryList matchMedia(DOMString query); - [SameObject] readonly attribute Screen screen; + [NewObject] MediaQueryList matchMedia(DOMString query); + [SameObject, Replaceable] readonly attribute Screen screen; - // browsing context - void moveTo(double x, double y); - void moveBy(double x, double y); - void resizeTo(double x, double y); - void resizeBy(double x, double y); + // browsing context + void moveTo(long x, long y); + void moveBy(long x, long y); + void resizeTo(long x, long y); + void resizeBy(long x, long y); - // viewport - readonly attribute double innerWidth; - readonly attribute double innerHeight; + // viewport + [Replaceable] readonly attribute long innerWidth; + [Replaceable] readonly attribute long innerHeight; - // viewport scrolling - readonly attribute double scrollX; - readonly attribute double pageXOffset; - readonly attribute double scrollY; - readonly attribute double pageYOffset; - void scroll(double x, double y, optional ScrollOptions options); - void scrollTo(double x, double y, optional ScrollOptions options); - void scrollBy(double x, double y, optional ScrollOptions options); + // viewport scrolling + [Replaceable] readonly attribute double scrollX; + [Replaceable] readonly attribute double pageXOffset; + [Replaceable] readonly attribute double scrollY; + [Replaceable] readonly attribute double pageYOffset; + void scroll(optional ScrollToOptions options); + void scroll(unrestricted double x, unrestricted double y); + void scrollTo(optional ScrollToOptions options); + void scrollTo(unrestricted double x, unrestricted double y); + void scrollBy(optional ScrollToOptions options); + void scrollBy(unrestricted double x, unrestricted double y); - // client - readonly attribute double screenX; - readonly attribute double screenY; - readonly attribute double outerWidth; - readonly attribute double outerHeight; - readonly attribute double devicePixelRatio; + // client + [Replaceable] readonly attribute long screenX; + [Replaceable] readonly attribute long screenY; + [Replaceable] readonly attribute long outerWidth; + [Replaceable] readonly attribute long outerHeight; + [Replaceable] readonly attribute double devicePixelRatio; }; -interface MediaQueryList { +interface MediaQueryList : EventTarget { + readonly attribute DOMString media; + readonly attribute boolean matches; + void addListener(EventListener? listener); + void removeListener(EventListener? listener); + attribute EventHandler onchange; +}; +[Constructor(DOMString type, optional MediaQueryListEventInit eventInitDict)] +interface MediaQueryListEvent : Event { readonly attribute DOMString media; readonly attribute boolean matches; - void addListener(MediaQueryListListener listener); - void removeListener(MediaQueryListListener listener); }; -callback MediaQueryListListener = void (MediaQueryList list); +dictionary MediaQueryListEventInit : EventInit { + DOMString media = ""; + boolean matches = false; +}; interface Screen { - readonly attribute double availWidth; - readonly attribute double availHeight; - readonly attribute double width; - readonly attribute double height; + readonly attribute long availWidth; + readonly attribute long availHeight; + readonly attribute long width; + readonly attribute long height; readonly attribute unsigned long colorDepth; readonly attribute unsigned long pixelDepth; }; @@ -5599,47 +3695,53 @@ partial interface Document { Element? elementFromPoint(double x, double y); sequence elementsFromPoint(double x, double y); CaretPosition? caretPositionFromPoint(double x, double y); + readonly attribute Element? scrollingElement; }; interface CaretPosition { readonly attribute Node offsetNode; readonly attribute unsigned long offset; - DOMRect? getClientRect(); + [NewObject] DOMRect? getClientRect(); }; -dictionary ScrollOptionsHorizontal : ScrollOptions { - double x; -}; -dictionary ScrollOptionsVertical : ScrollOptions { - double y; +enum ScrollLogicalPosition { "start", "center", "end", "nearest" }; +dictionary ScrollIntoViewOptions : ScrollOptions { + ScrollLogicalPosition block = "center"; + ScrollLogicalPosition inline = "center"; }; partial interface Element { - DOMRectList getClientRects(); - DOMRect getBoundingClientRect(); + sequence getClientRects(); + [NewObject] DOMRect getBoundingClientRect(); void scrollIntoView(); - void scrollIntoView(boolean top, optional ScrollOptions options); - attribute (double or ScrollOptionsVertical) scrollTop; - attribute (double or ScrollOptionsHorizontal) scrollLeft; - readonly attribute double scrollWidth; - readonly attribute double scrollHeight; - readonly attribute double clientTop; - readonly attribute double clientLeft; - readonly attribute double clientWidth; - readonly attribute double clientHeight; + void scrollIntoView((boolean or object) arg); + void scroll(optional ScrollToOptions options); + void scroll(unrestricted double x, unrestricted double y); + void scrollTo(optional ScrollToOptions options); + void scrollTo(unrestricted double x, unrestricted double y); + void scrollBy(optional ScrollToOptions options); + void scrollBy(unrestricted double x, unrestricted double y); + attribute unrestricted double scrollTop; + attribute unrestricted double scrollLeft; + readonly attribute long scrollWidth; + readonly attribute long scrollHeight; + readonly attribute long clientTop; + readonly attribute long clientLeft; + readonly attribute long clientWidth; + readonly attribute long clientHeight; }; partial interface HTMLElement { readonly attribute Element? offsetParent; - readonly attribute double offsetTop; - readonly attribute double offsetLeft; - readonly attribute double offsetWidth; - readonly attribute double offsetHeight; + readonly attribute long offsetTop; + readonly attribute long offsetLeft; + readonly attribute long offsetWidth; + readonly attribute long offsetHeight; }; partial interface HTMLImageElement { - readonly attribute double x; - readonly attribute double y; + readonly attribute long x; + readonly attribute long y; }; partial interface Range { - DOMRectList getClientRects(); - DOMRect getBoundingClientRect(); + sequence getClientRects(); + [NewObject] DOMRect getBoundingClientRect(); }; partial interface MouseEvent { readonly attribute double screenX; @@ -5663,7 +3765,7 @@ partial dictionary MouseEventInit { enum CSSBoxType { "margin", "border", "padding", "content" }; dictionary BoxQuadOptions { CSSBoxType box = "border"; - GeometryNode relativeTo; + GeometryNode relativeTo; // XXX default document (i.e. viewport) }; dictionary ConvertCoordinateOptions { @@ -5674,15 +3776,190 @@ dictionary ConvertCoordinateOptions { [NoInterfaceObject] interface GeometryUtils { sequence getBoxQuads(optional BoxQuadOptions options); - DOMQuad convertQuadFromNode(DOMQuad quad, GeometryNode from, optional ConvertCoordinateOptions options); + DOMQuad convertQuadFromNode(DOMQuadInit quad, GeometryNode from, optional ConvertCoordinateOptions options); DOMQuad convertRectFromNode(DOMRectReadOnly rect, GeometryNode from, optional ConvertCoordinateOptions options); - DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options); + DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options); // XXX z,w turns into 0 }; -Text implements GeometryUtils; +Text implements GeometryUtils; // like Range Element implements GeometryUtils; -PseudoElement implements GeometryUtils; +CSSPseudoElement implements GeometryUtils; Document implements GeometryUtils; -typedef (Text or Element or PseudoElement or Document) GeometryNode; +typedef (Text or Element or CSSPseudoElement or Document) GeometryNode; +enum ScrollBehavior { "auto", "instant", "smooth" }; + +dictionary ScrollOptions { + ScrollBehavior behavior = "auto"; +}; +dictionary ScrollToOptions : ScrollOptions { + unrestricted double left; + unrestricted double top; +}; + +partial interface Window { + [NewObject] MediaQueryList matchMedia(DOMString query); + [SameObject, Replaceable] readonly attribute Screen screen; + + // browsing context + void moveTo(long x, long y); + void moveBy(long x, long y); + void resizeTo(long x, long y); + void resizeBy(long x, long y); + + // viewport + [Replaceable] readonly attribute long innerWidth; + [Replaceable] readonly attribute long innerHeight; + + // viewport scrolling + [Replaceable] readonly attribute double scrollX; + [Replaceable] readonly attribute double pageXOffset; + [Replaceable] readonly attribute double scrollY; + [Replaceable] readonly attribute double pageYOffset; + void scroll(optional ScrollToOptions options); + void scroll(unrestricted double x, unrestricted double y); + void scrollTo(optional ScrollToOptions options); + void scrollTo(unrestricted double x, unrestricted double y); + void scrollBy(optional ScrollToOptions options); + void scrollBy(unrestricted double x, unrestricted double y); + + // client + [Replaceable] readonly attribute long screenX; + [Replaceable] readonly attribute long screenY; + [Replaceable] readonly attribute long outerWidth; + [Replaceable] readonly attribute long outerHeight; + [Replaceable] readonly attribute double devicePixelRatio; +}; + +interface MediaQueryList : EventTarget { + readonly attribute DOMString media; + readonly attribute boolean matches; + void addListener(EventListener? listener); + void removeListener(EventListener? listener); + attribute EventHandler onchange; +}; + +[Constructor(DOMString type, optional MediaQueryListEventInit eventInitDict)] +interface MediaQueryListEvent : Event { + readonly attribute DOMString media; + readonly attribute boolean matches; +}; + +dictionary MediaQueryListEventInit : EventInit { + DOMString media = ""; + boolean matches = false; +}; + +interface Screen { + readonly attribute long availWidth; + readonly attribute long availHeight; + readonly attribute long width; + readonly attribute long height; + readonly attribute unsigned long colorDepth; + readonly attribute unsigned long pixelDepth; +}; + +partial interface Document { + Element? elementFromPoint(double x, double y); + sequence elementsFromPoint(double x, double y); + CaretPosition? caretPositionFromPoint(double x, double y); + readonly attribute Element? scrollingElement; +}; + +interface CaretPosition { + readonly attribute Node offsetNode; + readonly attribute unsigned long offset; + [NewObject] DOMRect? getClientRect(); +}; + +enum ScrollLogicalPosition { "start", "center", "end", "nearest" }; +dictionary ScrollIntoViewOptions : ScrollOptions { + ScrollLogicalPosition block = "center"; + ScrollLogicalPosition inline = "center"; +}; + +partial interface Element { + sequence getClientRects(); + [NewObject] DOMRect getBoundingClientRect(); + void scrollIntoView(); + void scrollIntoView((boolean or object) arg); + void scroll(optional ScrollToOptions options); + void scroll(unrestricted double x, unrestricted double y); + void scrollTo(optional ScrollToOptions options); + void scrollTo(unrestricted double x, unrestricted double y); + void scrollBy(optional ScrollToOptions options); + void scrollBy(unrestricted double x, unrestricted double y); + attribute unrestricted double scrollTop; + attribute unrestricted double scrollLeft; + readonly attribute long scrollWidth; + readonly attribute long scrollHeight; + readonly attribute long clientTop; + readonly attribute long clientLeft; + readonly attribute long clientWidth; + readonly attribute long clientHeight; +}; + +partial interface HTMLElement { + readonly attribute Element? offsetParent; + readonly attribute long offsetTop; + readonly attribute long offsetLeft; + readonly attribute long offsetWidth; + readonly attribute long offsetHeight; +}; + +partial interface HTMLImageElement { + readonly attribute long x; + readonly attribute long y; +}; + +partial interface Range { + sequence getClientRects(); + [NewObject] DOMRect getBoundingClientRect(); +}; + +partial interface MouseEvent { + readonly attribute double screenX; + readonly attribute double screenY; + readonly attribute double pageX; + readonly attribute double pageY; + readonly attribute double clientX; + readonly attribute double clientY; + readonly attribute double x; + readonly attribute double y; + readonly attribute double offsetX; + readonly attribute double offsetY; +}; + +partial dictionary MouseEventInit { + double screenX = 0.0; + double screenY = 0.0; + double clientX = 0.0; + double clientY = 0.0; +}; + +enum CSSBoxType { "margin", "border", "padding", "content" }; +dictionary BoxQuadOptions { + CSSBoxType box = "border"; + GeometryNode relativeTo; // XXX default document (i.e. viewport) +}; + +dictionary ConvertCoordinateOptions { + CSSBoxType fromBox = "border"; + CSSBoxType toBox = "border"; +}; + +[NoInterfaceObject] +interface GeometryUtils { + sequence getBoxQuads(optional BoxQuadOptions options); + DOMQuad convertQuadFromNode(DOMQuadInit quad, GeometryNode from, optional ConvertCoordinateOptions options); + DOMQuad convertRectFromNode(DOMRectReadOnly rect, GeometryNode from, optional ConvertCoordinateOptions options); + DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options); // XXX z,w turns into 0 +}; + +Text implements GeometryUtils; // like Range +Element implements GeometryUtils; +CSSPseudoElement implements GeometryUtils; +Document implements GeometryUtils; + +typedef (Text or Element or CSSPseudoElement or Document) GeometryNode; diff --git a/libraries/idl/org.w3c.dom.parsing.idl b/libraries/idl/org.w3c.dom.parsing.idl index 4b6f53be4c2..043f71e42b8 100644 --- a/libraries/idl/org.w3c.dom.parsing.idl +++ b/libraries/idl/org.w3c.dom.parsing.idl @@ -11,11 +11,11 @@ interface XMLSerializer { DOMString serializeToString (Node root); }; partial interface Element { - [TreatNullAs=EmptyString] attribute DOMString innerHTML; - [TreatNullAs=EmptyString] attribute DOMString outerHTML; - void insertAdjacentHTML (DOMString position, DOMString text); + [CEReactions, TreatNullAs=EmptyString] attribute DOMString innerHTML; + [CEReactions, TreatNullAs=EmptyString] attribute DOMString outerHTML; + [CEReactions] void insertAdjacentHTML (DOMString position, DOMString text); }; partial interface Range { - [NewObject] DocumentFragment createContextualFragment (DOMString fragment); + [CEReactions, NewObject] DocumentFragment createContextualFragment (DOMString fragment); }; diff --git a/libraries/idl/org.w3c.dom.svg.idl b/libraries/idl/org.w3c.dom.svg.idl index 536a8700a0c..1282999f2b2 100644 --- a/libraries/idl/org.w3c.dom.svg.idl +++ b/libraries/idl/org.w3c.dom.svg.idl @@ -1,204 +1,49 @@ namespace org.w3c.dom.svg; -// Downloaded from http://web.archive.org/web/20150317051602/http://www.w3.org/TR/SVG11/single-page.html -interface SVGDocument : Document, - DocumentEvent { - readonly attribute DOMString title; - readonly attribute DOMString referrer; - readonly attribute DOMString domain; - readonly attribute DOMString URL; - readonly attribute SVGSVGElement rootElement; -}; -interface SVGSVGElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGLocatable, - SVGFitToViewBox, - SVGZoomAndPan, - DocumentEvent, - ViewCSS, - DocumentCSS { - - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; - attribute DOMString contentScriptType setraises(DOMException); - attribute DOMString contentStyleType setraises(DOMException); - readonly attribute SVGRect viewport; - readonly attribute float pixelUnitToMillimeterX; - readonly attribute float pixelUnitToMillimeterY; - readonly attribute float screenPixelToMillimeterX; - readonly attribute float screenPixelToMillimeterY; - readonly attribute boolean useCurrentView; - readonly attribute SVGViewSpec currentView; - attribute float currentScale; - readonly attribute SVGPoint currentTranslate; - - unsigned long suspendRedraw(in unsigned long maxWaitMilliseconds); - void unsuspendRedraw(in unsigned long suspendHandleID); - void unsuspendRedrawAll(); - void forceRedraw(); - void pauseAnimations(); - void unpauseAnimations(); - boolean animationsPaused(); - float getCurrentTime(); - void setCurrentTime(in float seconds); - NodeList getIntersectionList(in SVGRect rect, in SVGElement referenceElement); - NodeList getEnclosureList(in SVGRect rect, in SVGElement referenceElement); - boolean checkIntersection(in SVGElement element, in SVGRect rect); - boolean checkEnclosure(in SVGElement element, in SVGRect rect); - void deselectAll(); - SVGNumber createSVGNumber(); - SVGLength createSVGLength(); - SVGAngle createSVGAngle(); - SVGPoint createSVGPoint(); - SVGMatrix createSVGMatrix(); - SVGRect createSVGRect(); - SVGTransform createSVGTransform(); - SVGTransform createSVGTransformFromMatrix(in SVGMatrix matrix); - Element getElementById(in DOMString elementId); -}; -interface SVGGElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { -}; -interface SVGDefsElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { -}; -interface SVGDescElement : SVGElement, - SVGLangSpace, - SVGStylable { -}; -interface SVGTitleElement : SVGElement, - SVGLangSpace, - SVGStylable { -}; -interface SVGSymbolElement : SVGElement, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGFitToViewBox { -}; -interface SVGUseElement : SVGElement, - SVGURIReference, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; - readonly attribute SVGElementInstance instanceRoot; - readonly attribute SVGElementInstance animatedInstanceRoot; -}; -interface SVGElementInstance : EventTarget { - readonly attribute SVGElement correspondingElement; - readonly attribute SVGUseElement correspondingUseElement; - readonly attribute SVGElementInstance parentNode; - readonly attribute SVGElementInstanceList childNodes; - readonly attribute SVGElementInstance firstChild; - readonly attribute SVGElementInstance lastChild; - readonly attribute SVGElementInstance previousSibling; - readonly attribute SVGElementInstance nextSibling; -}; -interface SVGElementInstanceList { - - readonly attribute unsigned long length; - - SVGElementInstance item(in unsigned long index); -}; -interface SVGImageElement : SVGElement, - SVGURIReference, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; - readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio; -}; -interface SVGSwitchElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { -}; -interface GetSVGDocument { - SVGDocument getSVGDocument(); -}; +// Downloaded from https://www.w3.org/TR/SVG2/single-page.html interface SVGElement : Element { - attribute DOMString id setraises(DOMException); - attribute DOMString xmlbase setraises(DOMException); - readonly attribute SVGSVGElement ownerSVGElement; - readonly attribute SVGElement viewportElement; -}; -interface SVGAnimatedBoolean { - attribute boolean baseVal setraises(DOMException); - readonly attribute boolean animVal; -}; -interface SVGAnimatedString { - attribute DOMString baseVal setraises(DOMException); - readonly attribute DOMString animVal; -}; -interface SVGStringList { - readonly attribute unsigned long numberOfItems; + [SameObject] readonly attribute SVGAnimatedString className; - void clear() raises(DOMException); - DOMString initialize(in DOMString newItem) raises(DOMException); - DOMString getItem(in unsigned long index) raises(DOMException); - DOMString insertItemBefore(in DOMString newItem, in unsigned long index) raises(DOMException); - DOMString replaceItem(in DOMString newItem, in unsigned long index) raises(DOMException); - DOMString removeItem(in unsigned long index) raises(DOMException); - DOMString appendItem(in DOMString newItem) raises(DOMException); + [SameObject] readonly attribute DOMStringMap dataset; + + readonly attribute SVGSVGElement? ownerSVGElement; + readonly attribute SVGElement? viewportElement; + + attribute long tabIndex; + void focus(); + void blur(); }; -interface SVGAnimatedEnumeration { - attribute unsigned short baseVal setraises(DOMException); - readonly attribute unsigned short animVal; + +SVGElement implements GlobalEventHandlers; +SVGElement implements SVGElementInstance; +dictionary SVGBoundingBoxOptions { + boolean fill = true; + boolean stroke = false; + boolean markers = false; + boolean clipped = false; }; -interface SVGAnimatedInteger { - attribute long baseVal setraises(DOMException); - readonly attribute long animVal; + +interface SVGGraphicsElement : SVGElement { + [SameObject] readonly attribute SVGAnimatedTransformList transform; + + DOMRect getBBox(optional SVGBoundingBoxOptions options); + DOMMatrix? getCTM(); + DOMMatrix? getScreenCTM(); +}; + +SVGGraphicsElement implements SVGTests; +interface SVGGeometryElement : SVGGraphicsElement { + [SameObject] readonly attribute SVGAnimatedNumber pathLength; + + boolean isPointInFill(DOMPoint point); + boolean isPointInStroke(DOMPoint point); + float getTotalLength(); + DOMPoint getPointAtLength(float distance); }; interface SVGNumber { - attribute float value setraises(DOMException); -}; -interface SVGAnimatedNumber { - attribute float baseVal setraises(DOMException); - readonly attribute float animVal; -}; -interface SVGNumberList { - - readonly attribute unsigned long numberOfItems; - - void clear() raises(DOMException); - SVGNumber initialize(in SVGNumber newItem) raises(DOMException); - SVGNumber getItem(in unsigned long index) raises(DOMException); - SVGNumber insertItemBefore(in SVGNumber newItem, in unsigned long index) raises(DOMException); - SVGNumber replaceItem(in SVGNumber newItem, in unsigned long index) raises(DOMException); - SVGNumber removeItem(in unsigned long index) raises(DOMException); - SVGNumber appendItem(in SVGNumber newItem) raises(DOMException); -}; -interface SVGAnimatedNumberList { - readonly attribute SVGNumberList baseVal; - readonly attribute SVGNumberList animVal; + attribute float value; }; interface SVGLength { @@ -216,32 +61,12 @@ interface SVGLength { const unsigned short SVG_LENGTHTYPE_PC = 10; readonly attribute unsigned short unitType; - attribute float value setraises(DOMException); - attribute float valueInSpecifiedUnits setraises(DOMException); - attribute DOMString valueAsString setraises(DOMException); + attribute float value; + attribute float valueInSpecifiedUnits; + attribute DOMString valueAsString; - void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits) raises(DOMException); - void convertToSpecifiedUnits(in unsigned short unitType) raises(DOMException); -}; -interface SVGAnimatedLength { - readonly attribute SVGLength baseVal; - readonly attribute SVGLength animVal; -}; -interface SVGLengthList { - - readonly attribute unsigned long numberOfItems; - - void clear() raises(DOMException); - SVGLength initialize(in SVGLength newItem) raises(DOMException); - SVGLength getItem(in unsigned long index) raises(DOMException); - SVGLength insertItemBefore(in SVGLength newItem, in unsigned long index) raises(DOMException); - SVGLength replaceItem(in SVGLength newItem, in unsigned long index) raises(DOMException); - SVGLength removeItem(in unsigned long index) raises(DOMException); - SVGLength appendItem(in SVGLength newItem) raises(DOMException); -}; -interface SVGAnimatedLengthList { - readonly attribute SVGLengthList baseVal; - readonly attribute SVGLengthList animVal; + void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits); + void convertToSpecifiedUnits(unsigned short unitType); }; interface SVGAngle { @@ -253,92 +78,127 @@ interface SVGAngle { const unsigned short SVG_ANGLETYPE_GRAD = 4; readonly attribute unsigned short unitType; - attribute float value setraises(DOMException); - attribute float valueInSpecifiedUnits setraises(DOMException); - attribute DOMString valueAsString setraises(DOMException); + attribute float value; + attribute float valueInSpecifiedUnits; + attribute DOMString valueAsString; - void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits) raises(DOMException); - void convertToSpecifiedUnits(in unsigned short unitType) raises(DOMException); + void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits); + void convertToSpecifiedUnits(unsigned short unitType); +}; +interface SVGNameList { + + readonly attribute unsigned long length; + readonly attribute unsigned long numberOfItems; + + void clear(); + Type initialize(Type newItem); + getter Type getItem(unsigned long index); + Type insertItemBefore(Type newItem, unsigned long index); + Type replaceItem(Type newItem, unsigned long index); + Type removeItem(unsigned long index); + Type appendItem(Type newItem); + setter void (unsigned long index, Type newItem); +}; +interface SVGNumberList { + + readonly attribute unsigned long length; + readonly attribute unsigned long numberOfItems; + + void clear(); + SVGNumber initialize(SVGNumber newItem); + getter SVGNumber getItem(unsigned long index); + SVGNumber insertItemBefore(SVGNumber newItem, unsigned long index); + SVGNumber replaceItem(SVGNumber newItem, unsigned long index); + SVGNumber removeItem(unsigned long index); + SVGNumber appendItem(SVGNumber newItem); + setter void (unsigned long index, SVGNumber newItem); +}; +interface SVGLengthList { + + readonly attribute unsigned long length; + readonly attribute unsigned long numberOfItems; + + void clear(); + SVGLength initialize(SVGLength newItem); + getter SVGLength getItem(unsigned long index); + SVGLength insertItemBefore(SVGLength newItem, unsigned long index); + SVGLength replaceItem(SVGLength newItem, unsigned long index); + SVGLength removeItem(unsigned long index); + SVGLength appendItem(SVGLength newItem); + setter void (unsigned long index, SVGLength newItem); +}; +interface SVGAnimatedBoolean { + attribute boolean baseVal; + readonly attribute boolean animVal; +}; +interface SVGAnimatedEnumeration { + attribute unsigned short baseVal; + readonly attribute unsigned short animVal; +}; +interface SVGAnimatedInteger { + attribute long baseVal; + readonly attribute long animVal; +}; +interface SVGAnimatedNumber { + attribute float baseVal; + readonly attribute float animVal; +}; +interface SVGAnimatedLength { + [SameObject] readonly attribute SVGLength baseVal; + [SameObject] readonly attribute SVGLength animVal; }; interface SVGAnimatedAngle { - readonly attribute SVGAngle baseVal; - readonly attribute SVGAngle animVal; + [SameObject] readonly attribute SVGAngle baseVal; + [SameObject] readonly attribute SVGAngle animVal; }; -interface SVGColor : CSSValue { - - // Color Types - const unsigned short SVG_COLORTYPE_UNKNOWN = 0; - const unsigned short SVG_COLORTYPE_RGBCOLOR = 1; - const unsigned short SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2; - const unsigned short SVG_COLORTYPE_CURRENTCOLOR = 3; - - readonly attribute unsigned short colorType; - readonly attribute RGBColor rgbColor; - readonly attribute SVGICCColor iccColor; - - void setRGBColor(in DOMString rgbColor) raises(SVGException); - void setRGBColorICCColor(in DOMString rgbColor, in DOMString iccColor) raises(SVGException); - void setColor(in unsigned short colorType, in DOMString rgbColor, in DOMString iccColor) raises(SVGException); -}; -interface SVGICCColor { - attribute DOMString colorProfile setraises(DOMException); - readonly attribute SVGNumberList colors; -}; -interface SVGRect { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float width setraises(DOMException); - attribute float height setraises(DOMException); +interface SVGAnimatedString { + attribute DOMString baseVal; + readonly attribute DOMString animVal; }; interface SVGAnimatedRect { - readonly attribute SVGRect baseVal; - readonly attribute SVGRect animVal; + [SameObject] readonly attribute DOMRect baseVal; + [SameObject] readonly attribute DOMRectReadOnly animVal; }; +interface SVGAnimatedNumberList { + [SameObject] readonly attribute SVGNumberList baseVal; + [SameObject] readonly attribute SVGNumberList animVal; +}; +interface SVGAnimatedLengthList { + [SameObject] readonly attribute SVGLengthList baseVal; + [SameObject] readonly attribute SVGLengthList animVal; +}; +interface SVGStringList { + + readonly attribute unsigned long length; + readonly attribute unsigned long numberOfItems; + + void clear(); + DOMString initialize(DOMString newItem); + getter DOMString getItem(unsigned long index); + DOMString insertItemBefore(DOMString newItem, unsigned long index); + DOMString replaceItem(DOMString newItem, unsigned long index); + DOMString removeItem(unsigned long index); + DOMString appendItem(DOMString newItem); + setter void (unsigned long index, DOMString newItem); +}; +[NoInterfaceObject] interface SVGUnitTypes { // Unit Types const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0; const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1; const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2; }; -interface SVGStylable { - - //readonly attribute SVGAnimatedString className; - //readonly attribute CSSStyleDeclaration style; - - CSSValue getPresentationAttribute(in DOMString name); -}; -interface SVGLocatable { - - readonly attribute SVGElement nearestViewportElement; - readonly attribute SVGElement farthestViewportElement; - - SVGRect getBBox(); - SVGMatrix getCTM(); - SVGMatrix getScreenCTM(); - SVGMatrix getTransformToElement(in SVGElement element) raises(SVGException); -}; -interface SVGTransformable : SVGLocatable { - readonly attribute SVGAnimatedTransformList transform; -}; +[NoInterfaceObject] interface SVGTests { - - readonly attribute SVGStringList requiredFeatures; - readonly attribute SVGStringList requiredExtensions; - readonly attribute SVGStringList systemLanguage; - - boolean hasExtension(in DOMString extension); -}; -interface SVGLangSpace { - attribute DOMString xmllang setraises(DOMException); - attribute DOMString xmlspace setraises(DOMException); -}; -interface SVGExternalResourcesRequired { - readonly attribute SVGAnimatedBoolean externalResourcesRequired; + [SameObject] readonly attribute SVGStringList requiredExtensions; + [SameObject] readonly attribute SVGStringList systemLanguage; }; +[NoInterfaceObject] interface SVGFitToViewBox { - readonly attribute SVGAnimatedRect viewBox; - readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio; + [SameObject] readonly attribute SVGAnimatedRect viewBox; + [SameObject] readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio; }; +[NoInterfaceObject] interface SVGZoomAndPan { // Zoom and Pan Types @@ -346,78 +206,112 @@ interface SVGZoomAndPan { const unsigned short SVG_ZOOMANDPAN_DISABLE = 1; const unsigned short SVG_ZOOMANDPAN_MAGNIFY = 2; - attribute unsigned short zoomAndPan setraises(DOMException); -}; -interface SVGViewSpec : SVGZoomAndPan, - SVGFitToViewBox { - readonly attribute SVGTransformList transform; - readonly attribute SVGElement viewTarget; - readonly attribute DOMString viewBoxString; - readonly attribute DOMString preserveAspectRatioString; - readonly attribute DOMString transformString; - readonly attribute DOMString viewTargetString; + attribute unsigned short zoomAndPan; }; +[NoInterfaceObject] interface SVGURIReference { - readonly attribute SVGAnimatedString href; + [SameObject] readonly attribute SVGAnimatedString href; }; -interface SVGCSSRule : CSSRule { - const unsigned short COLOR_PROFILE_RULE = 7; +partial interface Document { + readonly attribute SVGSVGElement? rootElement; }; -interface SVGRenderingIntent { - // Rendering Intent Types - const unsigned short RENDERING_INTENT_UNKNOWN = 0; - const unsigned short RENDERING_INTENT_AUTO = 1; - const unsigned short RENDERING_INTENT_PERCEPTUAL = 2; - const unsigned short RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3; - const unsigned short RENDERING_INTENT_SATURATION = 4; - const unsigned short RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5; +// must only be implemented in certain implementations +partial interface Document { + readonly attribute DOMString title; + readonly attribute DOMString referrer; + readonly attribute DOMString domain; + readonly attribute Element? activeElement; }; -interface SVGStyleElement : SVGElement, - SVGLangSpace { - attribute DOMString type setraises(DOMException); - attribute DOMString media setraises(DOMException); - attribute DOMString title setraises(DOMException); -}; -interface SVGPoint { +interface SVGSVGElement : SVGGraphicsElement { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; + [SameObject] readonly attribute SVGAnimatedLength width; + [SameObject] readonly attribute SVGAnimatedLength height; - SVGPoint matrixTransform(in SVGMatrix matrix); + attribute float currentScale; + [SameObject] readonly attribute DOMPointReadOnly currentTranslate; + + NodeList getIntersectionList(DOMRectReadOnly rect, SVGElement? referenceElement); + NodeList getEnclosureList(DOMRectReadOnly rect, SVGElement? referenceElement); + boolean checkIntersection(SVGElement element, DOMRectReadOnly rect); + boolean checkEnclosure(SVGElement element, DOMRectReadOnly rect); + + void deselectAll(); + + SVGNumber createSVGNumber(); + SVGLength createSVGLength(); + SVGAngle createSVGAngle(); + DOMPoint createSVGPoint(); + DOMMatrix createSVGMatrix(); + DOMRect createSVGRect(); + SVGTransform createSVGTransform(); + SVGTransform createSVGTransformFromMatrix(DOMMatrixReadOnly matrix); + + Element getElementById(DOMString elementId); + + // Deprecated methods that have no effect when called, + // but which are kept for compatibility reasons. + unsigned long suspendRedraw(unsigned long maxWaitMilliseconds); + void unsuspendRedraw(unsigned long suspendHandleID); + void unsuspendRedrawAll(); + void forceRedraw(); }; -interface SVGPointList { - readonly attribute unsigned long numberOfItems; - - void clear() raises(DOMException); - SVGPoint initialize(in SVGPoint newItem) raises(DOMException); - SVGPoint getItem(in unsigned long index) raises(DOMException); - SVGPoint insertItemBefore(in SVGPoint newItem, in unsigned long index) raises(DOMException); - SVGPoint replaceItem(in SVGPoint newItem, in unsigned long index) raises(DOMException); - SVGPoint removeItem(in unsigned long index) raises(DOMException); - SVGPoint appendItem(in SVGPoint newItem) raises(DOMException); +SVGSVGElement implements SVGFitToViewBox; +SVGSVGElement implements SVGZoomAndPan; +SVGSVGElement implements WindowEventHandlers; +interface SVGGElement : SVGGraphicsElement { }; -interface SVGMatrix { - - attribute float a setraises(DOMException); - attribute float b setraises(DOMException); - attribute float c setraises(DOMException); - attribute float d setraises(DOMException); - attribute float e setraises(DOMException); - attribute float f setraises(DOMException); - - SVGMatrix multiply(in SVGMatrix secondMatrix); - SVGMatrix inverse() raises(SVGException); - SVGMatrix translate(in float x, in float y); - SVGMatrix scale(in float scaleFactor); - SVGMatrix scaleNonUniform(in float scaleFactorX, in float scaleFactorY); - SVGMatrix rotate(in float angle); - SVGMatrix rotateFromVector(in float x, in float y) raises(SVGException); - SVGMatrix flipX(); - SVGMatrix flipY(); - SVGMatrix skewX(in float angle); - SVGMatrix skewY(in float angle); +interface SVGUnknownElement : SVGGraphicsElement { }; +interface SVGDefsElement : SVGGraphicsElement { +}; +interface SVGDescElement : SVGElement { +}; +interface SVGMetadataElement : SVGElement { +}; +interface SVGTitleElement : SVGElement { +}; +interface SVGSymbolElement : SVGGraphicsElement { +}; + +SVGSymbolElement implements SVGFitToViewBox; +interface SVGUseElement : SVGGraphicsElement { + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; + [SameObject] readonly attribute SVGAnimatedLength width; + [SameObject] readonly attribute SVGAnimatedLength height; + [SameObject] readonly attribute SVGElement? instanceRoot; + [SameObject] readonly attribute SVGElement? animatedInstanceRoot; +}; + +SVGUseElement implements SVGURIReference; +interface SVGElementInstance : ShadowRoot { + +}; +[NoInterfaceObject] +interface SVGElementInstance { + [SameObject] readonly attribute SVGElement? correspondingElement; + [SameObject] readonly attribute SVGUseElement? correspondingUseElement; +}; +[Constructor (Animation source, Animatable newTarget) ] +interface ShadowAnimation : Animation { + [SameObject] readonly attribute Animation sourceAnimation; +}; +interface SVGSwitchElement : SVGGraphicsElement { +}; +[NoInterfaceObject] +interface GetSVGDocument { + Document getSVGDocument(); +}; +interface SVGStyleElement : SVGElement { + attribute DOMString type; + attribute DOMString media; + attribute DOMString title; +}; + +SVGStyleElement implements LinkStyle; interface SVGTransform { // Transform Types @@ -430,33 +324,37 @@ interface SVGTransform { const unsigned short SVG_TRANSFORM_SKEWY = 6; readonly attribute unsigned short type; - readonly attribute SVGMatrix matrix; + [SameObject] readonly attribute DOMMatrix matrix; readonly attribute float angle; - void setMatrix(in SVGMatrix matrix) raises(DOMException); - void setTranslate(in float tx, in float ty) raises(DOMException); - void setScale(in float sx, in float sy) raises(DOMException); - void setRotate(in float angle, in float cx, in float cy) raises(DOMException); - void setSkewX(in float angle) raises(DOMException); - void setSkewY(in float angle) raises(DOMException); + void setMatrix(DOMMatrixReadOnly matrix); + void setTranslate(float tx, float ty); + void setScale(float sx, float sy); + void setRotate(float angle, float cx, float cy); + void setSkewX(float angle); + void setSkewY(float angle); }; interface SVGTransformList { + readonly attribute unsigned long length; readonly attribute unsigned long numberOfItems; - void clear() raises(DOMException); - SVGTransform initialize(in SVGTransform newItem) raises(DOMException); - SVGTransform getItem(in unsigned long index) raises(DOMException); - SVGTransform insertItemBefore(in SVGTransform newItem, in unsigned long index) raises(DOMException); - SVGTransform replaceItem(in SVGTransform newItem, in unsigned long index) raises(DOMException); - SVGTransform removeItem(in unsigned long index) raises(DOMException); - SVGTransform appendItem(in SVGTransform newItem) raises(DOMException); - SVGTransform createSVGTransformFromMatrix(in SVGMatrix matrix); - SVGTransform consolidate() raises(DOMException); + void clear(); + SVGTransform initialize(SVGTransform newItem); + getter SVGTransform getItem(unsigned long index); + SVGTransform insertItemBefore(SVGTransform newItem, unsigned long index); + SVGTransform replaceItem(SVGTransform newItem, unsigned long index); + SVGTransform removeItem(unsigned long index); + SVGTransform appendItem(SVGTransform newItem); + setter void (unsigned long index, SVGTransform newItem); + + // Additional methods not common to other list interfaces. + SVGTransform createSVGTransformFromMatrix(DOMMatrixReadOnly matrix); + SVGTransform? consolidate(); }; interface SVGAnimatedTransformList { - readonly attribute SVGTransformList baseVal; - readonly attribute SVGTransformList animVal; + [SameObject] readonly attribute SVGTransformList baseVal; + [SameObject] readonly attribute SVGTransformList animVal; }; interface SVGPreserveAspectRatio { @@ -478,293 +376,103 @@ interface SVGPreserveAspectRatio { const unsigned short SVG_MEETORSLICE_MEET = 1; const unsigned short SVG_MEETORSLICE_SLICE = 2; - attribute unsigned short align setraises(DOMException); - attribute unsigned short meetOrSlice setraises(DOMException); + attribute unsigned short align; + attribute unsigned short meetOrSlice; }; interface SVGAnimatedPreserveAspectRatio { - readonly attribute SVGPreserveAspectRatio baseVal; - readonly attribute SVGPreserveAspectRatio animVal; + [SameObject] readonly attribute SVGPreserveAspectRatio baseVal; + [SameObject] readonly attribute SVGPreserveAspectRatio animVal; }; -interface SVGPathSeg { +interface SVGPathElement : SVGGeometryElement { - // Path Segment Types - const unsigned short PATHSEG_UNKNOWN = 0; - const unsigned short PATHSEG_CLOSEPATH = 1; - const unsigned short PATHSEG_MOVETO_ABS = 2; - const unsigned short PATHSEG_MOVETO_REL = 3; - const unsigned short PATHSEG_LINETO_ABS = 4; - const unsigned short PATHSEG_LINETO_REL = 5; - const unsigned short PATHSEG_CURVETO_CUBIC_ABS = 6; - const unsigned short PATHSEG_CURVETO_CUBIC_REL = 7; - const unsigned short PATHSEG_CURVETO_QUADRATIC_ABS = 8; - const unsigned short PATHSEG_CURVETO_QUADRATIC_REL = 9; - const unsigned short PATHSEG_ARC_ABS = 10; - const unsigned short PATHSEG_ARC_REL = 11; - const unsigned short PATHSEG_LINETO_HORIZONTAL_ABS = 12; - const unsigned short PATHSEG_LINETO_HORIZONTAL_REL = 13; - const unsigned short PATHSEG_LINETO_VERTICAL_ABS = 14; - const unsigned short PATHSEG_LINETO_VERTICAL_REL = 15; - const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16; - const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17; - const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18; - const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19; +}; +interface SVGRectElement : SVGGeometryElement { + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; + [SameObject] readonly attribute SVGAnimatedLength width; + [SameObject] readonly attribute SVGAnimatedLength height; + [SameObject] readonly attribute SVGAnimatedLength rx; + [SameObject] readonly attribute SVGAnimatedLength ry; +}; +interface SVGCircleElement : SVGGeometryElement { + [SameObject] readonly attribute SVGAnimatedLength cx; + [SameObject] readonly attribute SVGAnimatedLength cy; + [SameObject] readonly attribute SVGAnimatedLength r; +}; +interface SVGEllipseElement : SVGGeometryElement { + [SameObject] readonly attribute SVGAnimatedLength cx; + [SameObject] readonly attribute SVGAnimatedLength cy; + [SameObject] readonly attribute SVGAnimatedLength rx; + [SameObject] readonly attribute SVGAnimatedLength ry; +}; +interface SVGLineElement : SVGGeometryElement { + [SameObject] readonly attribute SVGAnimatedLength x1; + [SameObject] readonly attribute SVGAnimatedLength y1; + [SameObject] readonly attribute SVGAnimatedLength x2; + [SameObject] readonly attribute SVGAnimatedLength y2; +}; +interface SVGMeshElement : SVGGeometryElement {}; - readonly attribute unsigned short pathSegType; - readonly attribute DOMString pathSegTypeAsLetter; +SVGMeshElement implements SVGURIReference; +[NoInterfaceObject] +interface SVGAnimatedPoints { + [SameObject] readonly attribute SVGPointList points; + [SameObject] readonly attribute SVGPointList animatedPoints; }; -interface SVGPathSegClosePath : SVGPathSeg { -}; -interface SVGPathSegMovetoAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); -}; -interface SVGPathSegMovetoRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); -}; -interface SVGPathSegLinetoAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); -}; -interface SVGPathSegLinetoRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); -}; -interface SVGPathSegCurvetoCubicAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float x1 setraises(DOMException); - attribute float y1 setraises(DOMException); - attribute float x2 setraises(DOMException); - attribute float y2 setraises(DOMException); -}; -interface SVGPathSegCurvetoCubicRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float x1 setraises(DOMException); - attribute float y1 setraises(DOMException); - attribute float x2 setraises(DOMException); - attribute float y2 setraises(DOMException); -}; -interface SVGPathSegCurvetoQuadraticAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float x1 setraises(DOMException); - attribute float y1 setraises(DOMException); -}; -interface SVGPathSegCurvetoQuadraticRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float x1 setraises(DOMException); - attribute float y1 setraises(DOMException); -}; -interface SVGPathSegArcAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float r1 setraises(DOMException); - attribute float r2 setraises(DOMException); - attribute float angle setraises(DOMException); - attribute boolean largeArcFlag setraises(DOMException); - attribute boolean sweepFlag setraises(DOMException); -}; -interface SVGPathSegArcRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float r1 setraises(DOMException); - attribute float r2 setraises(DOMException); - attribute float angle setraises(DOMException); - attribute boolean largeArcFlag setraises(DOMException); - attribute boolean sweepFlag setraises(DOMException); -}; -interface SVGPathSegLinetoHorizontalAbs : SVGPathSeg { - attribute float x setraises(DOMException); -}; -interface SVGPathSegLinetoHorizontalRel : SVGPathSeg { - attribute float x setraises(DOMException); -}; -interface SVGPathSegLinetoVerticalAbs : SVGPathSeg { - attribute float y setraises(DOMException); -}; -interface SVGPathSegLinetoVerticalRel : SVGPathSeg { - attribute float y setraises(DOMException); -}; -interface SVGPathSegCurvetoCubicSmoothAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float x2 setraises(DOMException); - attribute float y2 setraises(DOMException); -}; -interface SVGPathSegCurvetoCubicSmoothRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float x2 setraises(DOMException); - attribute float y2 setraises(DOMException); -}; -interface SVGPathSegCurvetoQuadraticSmoothAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); -}; -interface SVGPathSegCurvetoQuadraticSmoothRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); -}; -interface SVGPathSegList { +interface SVGPointList { + readonly attribute unsigned long length; readonly attribute unsigned long numberOfItems; - void clear() raises(DOMException); - SVGPathSeg initialize(in SVGPathSeg newItem) raises(DOMException); - SVGPathSeg getItem(in unsigned long index) raises(DOMException); - SVGPathSeg insertItemBefore(in SVGPathSeg newItem, in unsigned long index) raises(DOMException); - SVGPathSeg replaceItem(in SVGPathSeg newItem, in unsigned long index) raises(DOMException); - SVGPathSeg removeItem(in unsigned long index) raises(DOMException); - SVGPathSeg appendItem(in SVGPathSeg newItem) raises(DOMException); + void clear(); + DOMPoint initialize(DOMPoint newItem); + getter DOMPoint getItem(unsigned long index); + DOMPoint insertItemBefore(DOMPoint newItem, unsigned long index); + DOMPoint replaceItem(DOMPoint newItem, unsigned long index); + DOMPoint removeItem(unsigned long index); + DOMPoint appendItem(DOMPoint newItem); + setter void (unsigned long index, DOMPoint newItem); }; -interface SVGAnimatedPathData { - readonly attribute SVGPathSegList pathSegList; - readonly attribute SVGPathSegList normalizedPathSegList; - readonly attribute SVGPathSegList animatedPathSegList; - readonly attribute SVGPathSegList animatedNormalizedPathSegList; +interface SVGPolylineElement : SVGGeometryElement { }; -interface SVGPathElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - SVGAnimatedPathData { - readonly attribute SVGAnimatedNumber pathLength; +SVGPolylineElement implements SVGAnimatedPoints; +interface SVGPolygonElement : SVGGeometryElement { +}; - float getTotalLength(); - SVGPoint getPointAtLength(in float distance); - unsigned long getPathSegAtLength(in float distance); - SVGPathSegClosePath createSVGPathSegClosePath(); - SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(in float x, in float y); - SVGPathSegMovetoRel createSVGPathSegMovetoRel(in float x, in float y); - SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(in float x, in float y); - SVGPathSegLinetoRel createSVGPathSegLinetoRel(in float x, in float y); - SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(in float x, in float y, in float x1, in float y1, in float x2, in float y2); - SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(in float x, in float y, in float x1, in float y1, in float x2, in float y2); - SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(in float x, in float y, in float x1, in float y1); - SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(in float x, in float y, in float x1, in float y1); - SVGPathSegArcAbs createSVGPathSegArcAbs(in float x, in float y, in float r1, in float r2, in float angle, in boolean largeArcFlag, in boolean sweepFlag); - SVGPathSegArcRel createSVGPathSegArcRel(in float x, in float y, in float r1, in float r2, in float angle, in boolean largeArcFlag, in boolean sweepFlag); - SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(in float x); - SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(in float x); - SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(in float y); - SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(in float y); - SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(in float x, in float y, in float x2, in float y2); - SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(in float x, in float y, in float x2, in float y2); - SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(in float x, in float y); - SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(in float x, in float y); -}; -interface SVGRectElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; - readonly attribute SVGAnimatedLength rx; - readonly attribute SVGAnimatedLength ry; -}; -interface SVGCircleElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength cx; - readonly attribute SVGAnimatedLength cy; - readonly attribute SVGAnimatedLength r; -}; -interface SVGEllipseElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength cx; - readonly attribute SVGAnimatedLength cy; - readonly attribute SVGAnimatedLength rx; - readonly attribute SVGAnimatedLength ry; -}; -interface SVGLineElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength x1; - readonly attribute SVGAnimatedLength y1; - readonly attribute SVGAnimatedLength x2; - readonly attribute SVGAnimatedLength y2; -}; -interface SVGAnimatedPoints { - readonly attribute SVGPointList points; - readonly attribute SVGPointList animatedPoints; -}; -interface SVGPolylineElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - SVGAnimatedPoints { -}; -interface SVGPolygonElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - SVGAnimatedPoints { -}; -interface SVGTextContentElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable { +SVGPolygonElement implements SVGAnimatedPoints; +interface SVGTextContentElement : SVGGraphicsElement { // lengthAdjust Types const unsigned short LENGTHADJUST_UNKNOWN = 0; const unsigned short LENGTHADJUST_SPACING = 1; const unsigned short LENGTHADJUST_SPACINGANDGLYPHS = 2; - readonly attribute SVGAnimatedLength textLength; - readonly attribute SVGAnimatedEnumeration lengthAdjust; + [SameObject] readonly attribute SVGAnimatedLength textLength; + [SameObject] readonly attribute SVGAnimatedEnumeration lengthAdjust; long getNumberOfChars(); float getComputedTextLength(); - float getSubStringLength(in unsigned long charnum, in unsigned long nchars) raises(DOMException); - SVGPoint getStartPositionOfChar(in unsigned long charnum) raises(DOMException); - SVGPoint getEndPositionOfChar(in unsigned long charnum) raises(DOMException); - SVGRect getExtentOfChar(in unsigned long charnum) raises(DOMException); - float getRotationOfChar(in unsigned long charnum) raises(DOMException); - long getCharNumAtPosition(in SVGPoint point); - void selectSubString(in unsigned long charnum, in unsigned long nchars) raises(DOMException); + float getSubStringLength(unsigned long charnum, unsigned long nchars); + DOMPoint getStartPositionOfChar(unsigned long charnum); + DOMPoint getEndPositionOfChar(unsigned long charnum); + DOMRect getExtentOfChar(unsigned long charnum); + float getRotationOfChar(unsigned long charnum); + long getCharNumAtPosition(DOMPoint point); + void selectSubString(unsigned long charnum, unsigned long nchars); }; interface SVGTextPositioningElement : SVGTextContentElement { - readonly attribute SVGAnimatedLengthList x; - readonly attribute SVGAnimatedLengthList y; - readonly attribute SVGAnimatedLengthList dx; - readonly attribute SVGAnimatedLengthList dy; - readonly attribute SVGAnimatedNumberList rotate; + [SameObject] readonly attribute SVGAnimatedLengthList x; + [SameObject] readonly attribute SVGAnimatedLengthList y; + [SameObject] readonly attribute SVGAnimatedLengthList dx; + [SameObject] readonly attribute SVGAnimatedLengthList dy; + [SameObject] readonly attribute SVGAnimatedNumberList rotate; }; -interface SVGTextElement : SVGTextPositioningElement, - SVGTransformable { +interface SVGTextElement : SVGTextPositioningElement { }; interface SVGTSpanElement : SVGTextPositioningElement { }; -interface SVGTRefElement : SVGTextPositioningElement, - SVGURIReference { -}; -interface SVGTextPathElement : SVGTextContentElement, - SVGURIReference { +interface SVGTextPathElement : SVGTextContentElement { // textPath Method Types const unsigned short TEXTPATH_METHODTYPE_UNKNOWN = 0; @@ -776,54 +484,29 @@ interface SVGTextPathElement : SVGTextContentElement, const unsigned short TEXTPATH_SPACINGTYPE_AUTO = 1; const unsigned short TEXTPATH_SPACINGTYPE_EXACT = 2; - readonly attribute SVGAnimatedLength startOffset; - readonly attribute SVGAnimatedEnumeration method; - readonly attribute SVGAnimatedEnumeration spacing; + [SameObject] readonly attribute SVGAnimatedLength startOffset; + [SameObject] readonly attribute SVGAnimatedEnumeration method; + [SameObject] readonly attribute SVGAnimatedEnumeration spacing; }; -interface SVGAltGlyphElement : SVGTextPositioningElement, - SVGURIReference { - attribute DOMString glyphRef setraises(DOMException); - attribute DOMString format setraises(DOMException); -}; -interface SVGAltGlyphDefElement : SVGElement { -}; -interface SVGAltGlyphItemElement : SVGElement { -}; -interface SVGGlyphRefElement : SVGElement, - SVGURIReference, - SVGStylable { - attribute DOMString glyphRef setraises(DOMException); - attribute DOMString format setraises(DOMException); - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float dx setraises(DOMException); - attribute float dy setraises(DOMException); -}; -interface SVGPaint : SVGColor { - // Paint Types - const unsigned short SVG_PAINTTYPE_UNKNOWN = 0; - const unsigned short SVG_PAINTTYPE_RGBCOLOR = 1; - const unsigned short SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2; - const unsigned short SVG_PAINTTYPE_NONE = 101; - const unsigned short SVG_PAINTTYPE_CURRENTCOLOR = 102; - const unsigned short SVG_PAINTTYPE_URI_NONE = 103; - const unsigned short SVG_PAINTTYPE_URI_CURRENTCOLOR = 104; - const unsigned short SVG_PAINTTYPE_URI_RGBCOLOR = 105; - const unsigned short SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106; - const unsigned short SVG_PAINTTYPE_URI = 107; - - readonly attribute unsigned short paintType; - readonly attribute DOMString uri; - - void setUri(in DOMString uri); - void setPaint(in unsigned short paintType, in DOMString uri, in DOMString rgbColor, in DOMString iccColor) raises(SVGException); +SVGTextPathElement implements SVGURIReference; +interface SVGImageElement : SVGGraphicsElement { + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; + [SameObject] readonly attribute SVGAnimatedLength width; + [SameObject] readonly attribute SVGAnimatedLength height; + [SameObject] readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio; + attribute DOMString? crossOrigin; }; -interface SVGMarkerElement : SVGElement, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGFitToViewBox { + +SVGImageElement implements SVGURIReference; +interface SVGForeignObjectElement : SVGGraphicsElement { + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; + [SameObject] readonly attribute SVGAnimatedLength width; + [SameObject] readonly attribute SVGAnimatedLength height; +}; +interface SVGMarkerElement : SVGElement { // Marker Unit Types const unsigned short SVG_MARKERUNITS_UNKNOWN = 0; @@ -835,35 +518,23 @@ interface SVGMarkerElement : SVGElement, const unsigned short SVG_MARKER_ORIENT_AUTO = 1; const unsigned short SVG_MARKER_ORIENT_ANGLE = 2; - readonly attribute SVGAnimatedLength refX; - readonly attribute SVGAnimatedLength refY; - readonly attribute SVGAnimatedEnumeration markerUnits; - readonly attribute SVGAnimatedLength markerWidth; - readonly attribute SVGAnimatedLength markerHeight; - readonly attribute SVGAnimatedEnumeration orientType; - readonly attribute SVGAnimatedAngle orientAngle; + [SameObject] readonly attribute SVGAnimatedLength refX; + [SameObject] readonly attribute SVGAnimatedLength refY; + [SameObject] readonly attribute SVGAnimatedEnumeration markerUnits; + [SameObject] readonly attribute SVGAnimatedLength markerWidth; + [SameObject] readonly attribute SVGAnimatedLength markerHeight; + [SameObject] readonly attribute SVGAnimatedEnumeration orientType; + [SameObject] readonly attribute SVGAnimatedAngle orientAngle; + attribute DOMString orient; - void setOrientToAuto() raises(DOMException); - void setOrientToAngle(in SVGAngle angle) raises(DOMException); + void setOrientToAuto(); + void setOrientToAngle(SVGAngle angle); }; -interface SVGColorProfileElement : SVGElement, - SVGURIReference, - SVGRenderingIntent { - attribute DOMString local; - attribute DOMString name; - attribute unsigned short renderingIntent; + +SVGMarkerElement implements SVGFitToViewBox; +interface SVGSolidcolorElement : SVGElement { }; -interface SVGColorProfileRule : SVGCSSRule, - SVGRenderingIntent { - attribute DOMString src setraises(DOMException); - attribute DOMString name setraises(DOMException); - attribute unsigned short renderingIntent setraises(DOMException); -}; -interface SVGGradientElement : SVGElement, - SVGURIReference, - SVGExternalResourcesRequired, - SVGStylable, - SVGUnitTypes { +interface SVGGradientElement : SVGElement { // Spread Method Types const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0; @@ -871,525 +542,125 @@ interface SVGGradientElement : SVGElement, const unsigned short SVG_SPREADMETHOD_REFLECT = 2; const unsigned short SVG_SPREADMETHOD_REPEAT = 3; - readonly attribute SVGAnimatedEnumeration gradientUnits; - readonly attribute SVGAnimatedTransformList gradientTransform; - readonly attribute SVGAnimatedEnumeration spreadMethod; + [SameObject] readonly attribute SVGAnimatedEnumeration gradientUnits; + [SameObject] readonly attribute SVGAnimatedTransformList gradientTransform; + [SameObject] readonly attribute SVGAnimatedEnumeration spreadMethod; }; + +SVGGradientElement implements SVGURIReference; +SVGGradientElement implements SVGUnitTypes; interface SVGLinearGradientElement : SVGGradientElement { - readonly attribute SVGAnimatedLength x1; - readonly attribute SVGAnimatedLength y1; - readonly attribute SVGAnimatedLength x2; - readonly attribute SVGAnimatedLength y2; + [SameObject] readonly attribute SVGAnimatedLength x1; + [SameObject] readonly attribute SVGAnimatedLength y1; + [SameObject] readonly attribute SVGAnimatedLength x2; + [SameObject] readonly attribute SVGAnimatedLength y2; }; interface SVGRadialGradientElement : SVGGradientElement { - readonly attribute SVGAnimatedLength cx; - readonly attribute SVGAnimatedLength cy; - readonly attribute SVGAnimatedLength r; - readonly attribute SVGAnimatedLength fx; - readonly attribute SVGAnimatedLength fy; + [SameObject] readonly attribute SVGAnimatedLength cx; + [SameObject] readonly attribute SVGAnimatedLength cy; + [SameObject] readonly attribute SVGAnimatedLength r; + [SameObject] readonly attribute SVGAnimatedLength fx; + [SameObject] readonly attribute SVGAnimatedLength fy; + [SameObject] readonly attribute SVGAnimatedLength fr; }; -interface SVGStopElement : SVGElement, - SVGStylable { - readonly attribute SVGAnimatedNumber offset; +interface SVGMeshGradientElement : SVGGradientElement { }; -interface SVGPatternElement : SVGElement, - SVGURIReference, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGFitToViewBox, - SVGUnitTypes { - readonly attribute SVGAnimatedEnumeration patternUnits; - readonly attribute SVGAnimatedEnumeration patternContentUnits; - readonly attribute SVGAnimatedTransformList patternTransform; - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; +interface SVGMeshrowElement : SVGElement { }; -interface SVGClipPathElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - SVGUnitTypes { - readonly attribute SVGAnimatedEnumeration clipPathUnits; +interface SVGMeshpatchElement : SVGElement { }; -interface SVGMaskElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGUnitTypes { - readonly attribute SVGAnimatedEnumeration maskUnits; - readonly attribute SVGAnimatedEnumeration maskContentUnits; - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; +interface SVGStopElement : SVGElement { + [SameObject] readonly attribute SVGAnimatedNumber offset; }; -interface SVGFilterElement : SVGElement, - SVGURIReference, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGUnitTypes { - - readonly attribute SVGAnimatedEnumeration filterUnits; - readonly attribute SVGAnimatedEnumeration primitiveUnits; - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; - readonly attribute SVGAnimatedInteger filterResX; - readonly attribute SVGAnimatedInteger filterResY; - - void setFilterRes(in unsigned long filterResX, in unsigned long filterResY) raises(DOMException); -}; -interface SVGFilterPrimitiveStandardAttributes : SVGStylable { - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; - readonly attribute SVGAnimatedString result; -}; -interface SVGFEBlendElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Blend Mode Types - const unsigned short SVG_FEBLEND_MODE_UNKNOWN = 0; - const unsigned short SVG_FEBLEND_MODE_NORMAL = 1; - const unsigned short SVG_FEBLEND_MODE_MULTIPLY = 2; - const unsigned short SVG_FEBLEND_MODE_SCREEN = 3; - const unsigned short SVG_FEBLEND_MODE_DARKEN = 4; - const unsigned short SVG_FEBLEND_MODE_LIGHTEN = 5; - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedString in2; - readonly attribute SVGAnimatedEnumeration mode; -}; -interface SVGFEColorMatrixElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Color Matrix Types - const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0; - const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX = 1; - const unsigned short SVG_FECOLORMATRIX_TYPE_SATURATE = 2; - const unsigned short SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3; - const unsigned short SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4; - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedEnumeration type; - readonly attribute SVGAnimatedNumberList values; -}; -interface SVGFEComponentTransferElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - readonly attribute SVGAnimatedString in1; -}; -interface SVGComponentTransferFunctionElement : SVGElement { - - // Component Transfer Types - const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0; - const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1; - const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2; - const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3; - const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4; - const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5; - - readonly attribute SVGAnimatedEnumeration type; - readonly attribute SVGAnimatedNumberList tableValues; - readonly attribute SVGAnimatedNumber slope; - readonly attribute SVGAnimatedNumber intercept; - readonly attribute SVGAnimatedNumber amplitude; - readonly attribute SVGAnimatedNumber exponent; - readonly attribute SVGAnimatedNumber offset; -}; -interface SVGFEFuncRElement : SVGComponentTransferFunctionElement { -}; -interface SVGFEFuncGElement : SVGComponentTransferFunctionElement { -}; -interface SVGFEFuncBElement : SVGComponentTransferFunctionElement { -}; -interface SVGFEFuncAElement : SVGComponentTransferFunctionElement { -}; -interface SVGFECompositeElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Composite Operators - const unsigned short SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0; - const unsigned short SVG_FECOMPOSITE_OPERATOR_OVER = 1; - const unsigned short SVG_FECOMPOSITE_OPERATOR_IN = 2; - const unsigned short SVG_FECOMPOSITE_OPERATOR_OUT = 3; - const unsigned short SVG_FECOMPOSITE_OPERATOR_ATOP = 4; - const unsigned short SVG_FECOMPOSITE_OPERATOR_XOR = 5; - const unsigned short SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6; - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedString in2; - readonly attribute SVGAnimatedEnumeration operator; - readonly attribute SVGAnimatedNumber k1; - readonly attribute SVGAnimatedNumber k2; - readonly attribute SVGAnimatedNumber k3; - readonly attribute SVGAnimatedNumber k4; -}; -interface SVGFEConvolveMatrixElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Edge Mode Values - const unsigned short SVG_EDGEMODE_UNKNOWN = 0; - const unsigned short SVG_EDGEMODE_DUPLICATE = 1; - const unsigned short SVG_EDGEMODE_WRAP = 2; - const unsigned short SVG_EDGEMODE_NONE = 3; - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedInteger orderX; - readonly attribute SVGAnimatedInteger orderY; - readonly attribute SVGAnimatedNumberList kernelMatrix; - readonly attribute SVGAnimatedNumber divisor; - readonly attribute SVGAnimatedNumber bias; - readonly attribute SVGAnimatedInteger targetX; - readonly attribute SVGAnimatedInteger targetY; - readonly attribute SVGAnimatedEnumeration edgeMode; - readonly attribute SVGAnimatedNumber kernelUnitLengthX; - readonly attribute SVGAnimatedNumber kernelUnitLengthY; - readonly attribute SVGAnimatedBoolean preserveAlpha; -}; -interface SVGFEDiffuseLightingElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedNumber surfaceScale; - readonly attribute SVGAnimatedNumber diffuseConstant; - readonly attribute SVGAnimatedNumber kernelUnitLengthX; - readonly attribute SVGAnimatedNumber kernelUnitLengthY; -}; -interface SVGFEDistantLightElement : SVGElement { - readonly attribute SVGAnimatedNumber azimuth; - readonly attribute SVGAnimatedNumber elevation; -}; -interface SVGFEPointLightElement : SVGElement { - readonly attribute SVGAnimatedNumber x; - readonly attribute SVGAnimatedNumber y; - readonly attribute SVGAnimatedNumber z; -}; -interface SVGFESpotLightElement : SVGElement { - readonly attribute SVGAnimatedNumber x; - readonly attribute SVGAnimatedNumber y; - readonly attribute SVGAnimatedNumber z; - readonly attribute SVGAnimatedNumber pointsAtX; - readonly attribute SVGAnimatedNumber pointsAtY; - readonly attribute SVGAnimatedNumber pointsAtZ; - readonly attribute SVGAnimatedNumber specularExponent; - readonly attribute SVGAnimatedNumber limitingConeAngle; -}; -interface SVGFEDisplacementMapElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Channel Selectors - const unsigned short SVG_CHANNEL_UNKNOWN = 0; - const unsigned short SVG_CHANNEL_R = 1; - const unsigned short SVG_CHANNEL_G = 2; - const unsigned short SVG_CHANNEL_B = 3; - const unsigned short SVG_CHANNEL_A = 4; - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedString in2; - readonly attribute SVGAnimatedNumber scale; - readonly attribute SVGAnimatedEnumeration xChannelSelector; - readonly attribute SVGAnimatedEnumeration yChannelSelector; -}; -interface SVGFEFloodElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { -}; -interface SVGFEGaussianBlurElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedNumber stdDeviationX; - readonly attribute SVGAnimatedNumber stdDeviationY; - - void setStdDeviation(in float stdDeviationX, in float stdDeviationY) raises(DOMException); -}; -interface SVGFEImageElement : SVGElement, - SVGURIReference, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGFilterPrimitiveStandardAttributes { - readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio; -}; -interface SVGFEMergeElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { -}; -interface SVGFEMergeNodeElement : SVGElement { - readonly attribute SVGAnimatedString in1; -}; -interface SVGFEMorphologyElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Morphology Operators - const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0; - const unsigned short SVG_MORPHOLOGY_OPERATOR_ERODE = 1; - const unsigned short SVG_MORPHOLOGY_OPERATOR_DILATE = 2; - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedEnumeration operator; - readonly attribute SVGAnimatedNumber radiusX; - readonly attribute SVGAnimatedNumber radiusY; -}; -interface SVGFEOffsetElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedNumber dx; - readonly attribute SVGAnimatedNumber dy; -}; -interface SVGFESpecularLightingElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedNumber surfaceScale; - readonly attribute SVGAnimatedNumber specularConstant; - readonly attribute SVGAnimatedNumber specularExponent; - readonly attribute SVGAnimatedNumber kernelUnitLengthX; - readonly attribute SVGAnimatedNumber kernelUnitLengthY; -}; -interface SVGFETileElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - readonly attribute SVGAnimatedString in1; -}; -interface SVGFETurbulenceElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Turbulence Types - const unsigned short SVG_TURBULENCE_TYPE_UNKNOWN = 0; - const unsigned short SVG_TURBULENCE_TYPE_FRACTALNOISE = 1; - const unsigned short SVG_TURBULENCE_TYPE_TURBULENCE = 2; - - // Stitch Options - const unsigned short SVG_STITCHTYPE_UNKNOWN = 0; - const unsigned short SVG_STITCHTYPE_STITCH = 1; - const unsigned short SVG_STITCHTYPE_NOSTITCH = 2; - - readonly attribute SVGAnimatedNumber baseFrequencyX; - readonly attribute SVGAnimatedNumber baseFrequencyY; - readonly attribute SVGAnimatedInteger numOctaves; - readonly attribute SVGAnimatedNumber seed; - readonly attribute SVGAnimatedEnumeration stitchTiles; - readonly attribute SVGAnimatedEnumeration type; -}; -interface SVGCursorElement : SVGElement, - SVGURIReference, - SVGTests, - SVGExternalResourcesRequired { - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; -}; -interface SVGAElement : SVGElement, - SVGURIReference, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedString target; -}; -interface SVGViewElement : SVGElement, - SVGExternalResourcesRequired, - SVGFitToViewBox, - SVGZoomAndPan { - readonly attribute SVGStringList viewTarget; -}; -interface SVGScriptElement : SVGElement, - SVGURIReference, - SVGExternalResourcesRequired { - attribute DOMString type setraises(DOMException); -}; -interface SVGZoomEvent : UIEvent { - readonly attribute SVGRect zoomRectScreen; - readonly attribute float previousScale; - readonly attribute SVGPoint previousTranslate; - readonly attribute float newScale; - readonly attribute SVGPoint newTranslate; -}; -interface ElementTimeControl { - void beginElement(); - void beginElementAt(in float offset); - void endElement(); - void endElementAt(in float offset); -}; -interface TimeEvent : Event { - - readonly attribute AbstractView view; - readonly attribute long detail; - - void initTimeEvent(in DOMString typeArg, in AbstractView viewArg, in long detailArg); -}; -interface SVGAnimationElement : SVGElement, - SVGTests, - SVGExternalResourcesRequired, - ElementTimeControl { - - readonly attribute SVGElement targetElement; - - float getStartTime() raises(DOMException); - float getCurrentTime(); - float getSimpleDuration() raises(DOMException); -}; -interface SVGAnimateElement : SVGAnimationElement, - SVGStylable { -}; -interface SVGSetElement : SVGAnimationElement { -}; -interface SVGAnimateMotionElement : SVGAnimationElement { -}; -interface SVGMPathElement : SVGElement, - SVGURIReference, - SVGExternalResourcesRequired { -}; -interface SVGAnimateColorElement : SVGAnimationElement, - SVGStylable { -}; -interface SVGAnimateTransformElement : SVGAnimationElement { -}; -interface SVGFontElement : SVGElement, - SVGExternalResourcesRequired, - SVGStylable { -}; -interface SVGGlyphElement : SVGElement, - SVGStylable { -}; -interface SVGMissingGlyphElement : SVGElement, - SVGStylable { -}; -interface SVGHKernElement : SVGElement { -}; -interface SVGVKernElement : SVGElement { -}; -interface SVGFontFaceElement : SVGElement { -}; -interface SVGFontFaceSrcElement : SVGElement { -}; -interface SVGFontFaceUriElement : SVGElement { -}; -interface SVGFontFaceFormatElement : SVGElement { -}; -interface SVGFontFaceNameElement : SVGElement { -}; -interface SVGMetadataElement : SVGElement { -}; -interface SVGForeignObjectElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; -}; -exception SVGException { - unsigned short code; +interface SVGPatternElement : SVGElement { + [SameObject] readonly attribute SVGAnimatedEnumeration patternUnits; + [SameObject] readonly attribute SVGAnimatedEnumeration patternContentUnits; + [SameObject] readonly attribute SVGAnimatedTransformList patternTransform; + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; + [SameObject] readonly attribute SVGAnimatedLength width; + [SameObject] readonly attribute SVGAnimatedLength height; }; -// SVGException code -const unsigned short SVG_WRONG_TYPE_ERR = 0; -const unsigned short SVG_INVALID_VALUE_ERR = 1; -const unsigned short SVG_MATRIX_NOT_INVERTABLE = 2; -module smil { - -interface ElementTimeControl { - void beginElement(); - void beginElementAt(in float offset); - void endElement(); - void endElementAt(in float offset); +SVGPatternElement implements SVGFitToViewBox; +SVGPatternElement implements SVGURIReference; +SVGPatternElement implements SVGUnitTypes; +interface SVGHatchElement : SVGElement { +}; +interface SVGHatchpathElement : SVGElement { +}; +interface SVGCursorElement : SVGElement { + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; }; -interface TimeEvent : Event { - - readonly attribute AbstractView view; - readonly attribute long detail; - - void initTimeEvent(in DOMString typeArg, in AbstractView viewArg, in long detailArg); +SVGCursorElement implements SVGURIReference; +interface SVGScriptElement : SVGElement { + attribute DOMString type; + attribute DOMString? crossOrigin; }; +SVGScriptElement implements SVGURIReference; +interface SVGAElement : SVGGraphicsElement { + [SameObject] readonly attribute SVGAnimatedString target; + [SameObject] readonly attribute SVGAnimatedString download; + [SameObject] readonly attribute SVGAnimatedString rel; + [SameObject] readonly attribute SVGAnimatedString relList; + [SameObject] readonly attribute SVGAnimatedString hreflang; + [SameObject] readonly attribute SVGAnimatedString type; }; -module svg { - -exception SVGException { - unsigned short code; -}; - -// SVGException code -const unsigned short SVG_WRONG_TYPE_ERR = 0; -const unsigned short SVG_INVALID_VALUE_ERR = 1; -const unsigned short SVG_MATRIX_NOT_INVERTABLE = 2; +SVGAElement implements SVGURIReference; +SVGAElement implements HTMLHyperlinkElementUtils; +interface SVGViewElement : SVGElement {}; +SVGViewElement implements SVGFitToViewBox; +SVGViewElement implements SVGZoomAndPan; interface SVGElement : Element { - attribute DOMString id setraises(DOMException); - attribute DOMString xmlbase setraises(DOMException); - readonly attribute SVGSVGElement ownerSVGElement; - readonly attribute SVGElement viewportElement; + + [SameObject] readonly attribute SVGAnimatedString className; + + [SameObject] readonly attribute DOMStringMap dataset; + + readonly attribute SVGSVGElement? ownerSVGElement; + readonly attribute SVGElement? viewportElement; + + attribute long tabIndex; + void focus(); + void blur(); }; -interface SVGAnimatedBoolean { - attribute boolean baseVal setraises(DOMException); - readonly attribute boolean animVal; +SVGElement implements GlobalEventHandlers; +SVGElement implements SVGElementInstance; + +dictionary SVGBoundingBoxOptions { + boolean fill = true; + boolean stroke = false; + boolean markers = false; + boolean clipped = false; }; -interface SVGAnimatedString { - attribute DOMString baseVal setraises(DOMException); - readonly attribute DOMString animVal; +interface SVGGraphicsElement : SVGElement { + [SameObject] readonly attribute SVGAnimatedTransformList transform; + + DOMRect getBBox(optional SVGBoundingBoxOptions options); + DOMMatrix? getCTM(); + DOMMatrix? getScreenCTM(); }; -interface SVGStringList { +SVGGraphicsElement implements SVGTests; - readonly attribute unsigned long numberOfItems; +interface SVGGeometryElement : SVGGraphicsElement { + [SameObject] readonly attribute SVGAnimatedNumber pathLength; - void clear() raises(DOMException); - DOMString initialize(in DOMString newItem) raises(DOMException); - DOMString getItem(in unsigned long index) raises(DOMException); - DOMString insertItemBefore(in DOMString newItem, in unsigned long index) raises(DOMException); - DOMString replaceItem(in DOMString newItem, in unsigned long index) raises(DOMException); - DOMString removeItem(in unsigned long index) raises(DOMException); - DOMString appendItem(in DOMString newItem) raises(DOMException); -}; - -interface SVGAnimatedEnumeration { - attribute unsigned short baseVal setraises(DOMException); - readonly attribute unsigned short animVal; -}; - -interface SVGAnimatedInteger { - attribute long baseVal setraises(DOMException); - readonly attribute long animVal; + boolean isPointInFill(DOMPoint point); + boolean isPointInStroke(DOMPoint point); + float getTotalLength(); + DOMPoint getPointAtLength(float distance); }; interface SVGNumber { - attribute float value setraises(DOMException); -}; - -interface SVGAnimatedNumber { - attribute float baseVal setraises(DOMException); - readonly attribute float animVal; -}; - -interface SVGNumberList { - - readonly attribute unsigned long numberOfItems; - - void clear() raises(DOMException); - SVGNumber initialize(in SVGNumber newItem) raises(DOMException); - SVGNumber getItem(in unsigned long index) raises(DOMException); - SVGNumber insertItemBefore(in SVGNumber newItem, in unsigned long index) raises(DOMException); - SVGNumber replaceItem(in SVGNumber newItem, in unsigned long index) raises(DOMException); - SVGNumber removeItem(in unsigned long index) raises(DOMException); - SVGNumber appendItem(in SVGNumber newItem) raises(DOMException); -}; - -interface SVGAnimatedNumberList { - readonly attribute SVGNumberList baseVal; - readonly attribute SVGNumberList animVal; + attribute float value; }; interface SVGLength { @@ -1408,35 +679,12 @@ interface SVGLength { const unsigned short SVG_LENGTHTYPE_PC = 10; readonly attribute unsigned short unitType; - attribute float value setraises(DOMException); - attribute float valueInSpecifiedUnits setraises(DOMException); - attribute DOMString valueAsString setraises(DOMException); + attribute float value; + attribute float valueInSpecifiedUnits; + attribute DOMString valueAsString; - void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits) raises(DOMException); - void convertToSpecifiedUnits(in unsigned short unitType) raises(DOMException); -}; - -interface SVGAnimatedLength { - readonly attribute SVGLength baseVal; - readonly attribute SVGLength animVal; -}; - -interface SVGLengthList { - - readonly attribute unsigned long numberOfItems; - - void clear() raises(DOMException); - SVGLength initialize(in SVGLength newItem) raises(DOMException); - SVGLength getItem(in unsigned long index) raises(DOMException); - SVGLength insertItemBefore(in SVGLength newItem, in unsigned long index) raises(DOMException); - SVGLength replaceItem(in SVGLength newItem, in unsigned long index) raises(DOMException); - SVGLength removeItem(in unsigned long index) raises(DOMException); - SVGLength appendItem(in SVGLength newItem) raises(DOMException); -}; - -interface SVGAnimatedLengthList { - readonly attribute SVGLengthList baseVal; - readonly attribute SVGLengthList animVal; + void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits); + void convertToSpecifiedUnits(unsigned short unitType); }; interface SVGAngle { @@ -1449,53 +697,110 @@ interface SVGAngle { const unsigned short SVG_ANGLETYPE_GRAD = 4; readonly attribute unsigned short unitType; - attribute float value setraises(DOMException); - attribute float valueInSpecifiedUnits setraises(DOMException); - attribute DOMString valueAsString setraises(DOMException); + attribute float value; + attribute float valueInSpecifiedUnits; + attribute DOMString valueAsString; - void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits) raises(DOMException); - void convertToSpecifiedUnits(in unsigned short unitType) raises(DOMException); + void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits); + void convertToSpecifiedUnits(unsigned short unitType); +}; + +interface SVGNumberList { + + readonly attribute unsigned long length; + readonly attribute unsigned long numberOfItems; + + void clear(); + SVGNumber initialize(SVGNumber newItem); + getter SVGNumber getItem(unsigned long index); + SVGNumber insertItemBefore(SVGNumber newItem, unsigned long index); + SVGNumber replaceItem(SVGNumber newItem, unsigned long index); + SVGNumber removeItem(unsigned long index); + SVGNumber appendItem(SVGNumber newItem); + setter void (unsigned long index, SVGNumber newItem); +}; + +interface SVGLengthList { + + readonly attribute unsigned long length; + readonly attribute unsigned long numberOfItems; + + void clear(); + SVGLength initialize(SVGLength newItem); + getter SVGLength getItem(unsigned long index); + SVGLength insertItemBefore(SVGLength newItem, unsigned long index); + SVGLength replaceItem(SVGLength newItem, unsigned long index); + SVGLength removeItem(unsigned long index); + SVGLength appendItem(SVGLength newItem); + setter void (unsigned long index, SVGLength newItem); +}; + +interface SVGAnimatedBoolean { + attribute boolean baseVal; + readonly attribute boolean animVal; +}; + +interface SVGAnimatedEnumeration { + attribute unsigned short baseVal; + readonly attribute unsigned short animVal; +}; + +interface SVGAnimatedInteger { + attribute long baseVal; + readonly attribute long animVal; +}; + +interface SVGAnimatedNumber { + attribute float baseVal; + readonly attribute float animVal; +}; + +interface SVGAnimatedLength { + [SameObject] readonly attribute SVGLength baseVal; + [SameObject] readonly attribute SVGLength animVal; }; interface SVGAnimatedAngle { - readonly attribute SVGAngle baseVal; - readonly attribute SVGAngle animVal; + [SameObject] readonly attribute SVGAngle baseVal; + [SameObject] readonly attribute SVGAngle animVal; }; -interface SVGColor : CSSValue { - - // Color Types - const unsigned short SVG_COLORTYPE_UNKNOWN = 0; - const unsigned short SVG_COLORTYPE_RGBCOLOR = 1; - const unsigned short SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2; - const unsigned short SVG_COLORTYPE_CURRENTCOLOR = 3; - - readonly attribute unsigned short colorType; - readonly attribute RGBColor rgbColor; - readonly attribute SVGICCColor iccColor; - - void setRGBColor(in DOMString rgbColor) raises(SVGException); - void setRGBColorICCColor(in DOMString rgbColor, in DOMString iccColor) raises(SVGException); - void setColor(in unsigned short colorType, in DOMString rgbColor, in DOMString iccColor) raises(SVGException); -}; - -interface SVGICCColor { - attribute DOMString colorProfile setraises(DOMException); - readonly attribute SVGNumberList colors; -}; - -interface SVGRect { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float width setraises(DOMException); - attribute float height setraises(DOMException); +interface SVGAnimatedString { + attribute DOMString baseVal; + readonly attribute DOMString animVal; }; interface SVGAnimatedRect { - readonly attribute SVGRect baseVal; - readonly attribute SVGRect animVal; + [SameObject] readonly attribute DOMRect baseVal; + [SameObject] readonly attribute DOMRectReadOnly animVal; }; +interface SVGAnimatedNumberList { + [SameObject] readonly attribute SVGNumberList baseVal; + [SameObject] readonly attribute SVGNumberList animVal; +}; + +interface SVGAnimatedLengthList { + [SameObject] readonly attribute SVGLengthList baseVal; + [SameObject] readonly attribute SVGLengthList animVal; +}; + +interface SVGStringList { + + readonly attribute unsigned long length; + readonly attribute unsigned long numberOfItems; + + void clear(); + DOMString initialize(DOMString newItem); + getter DOMString getItem(unsigned long index); + DOMString insertItemBefore(DOMString newItem, unsigned long index); + DOMString replaceItem(DOMString newItem, unsigned long index); + DOMString removeItem(unsigned long index); + DOMString appendItem(DOMString newItem); + setter void (unsigned long index, DOMString newItem); +}; + +[NoInterfaceObject] interface SVGUnitTypes { // Unit Types const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0; @@ -1503,52 +808,19 @@ interface SVGUnitTypes { const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2; }; -interface SVGStylable { - - //readonly attribute SVGAnimatedString className; - //readonly attribute CSSStyleDeclaration style; - - CSSValue getPresentationAttribute(in DOMString name); -}; - -interface SVGLocatable { - - readonly attribute SVGElement nearestViewportElement; - readonly attribute SVGElement farthestViewportElement; - - SVGRect getBBox(); - SVGMatrix getCTM(); - SVGMatrix getScreenCTM(); - SVGMatrix getTransformToElement(in SVGElement element) raises(SVGException); -}; - -interface SVGTransformable : SVGLocatable { - readonly attribute SVGAnimatedTransformList transform; -}; - +[NoInterfaceObject] interface SVGTests { - - readonly attribute SVGStringList requiredFeatures; - readonly attribute SVGStringList requiredExtensions; - readonly attribute SVGStringList systemLanguage; - - boolean hasExtension(in DOMString extension); -}; - -interface SVGLangSpace { - attribute DOMString xmllang setraises(DOMException); - attribute DOMString xmlspace setraises(DOMException); -}; - -interface SVGExternalResourcesRequired { - readonly attribute SVGAnimatedBoolean externalResourcesRequired; + [SameObject] readonly attribute SVGStringList requiredExtensions; + [SameObject] readonly attribute SVGStringList systemLanguage; }; +[NoInterfaceObject] interface SVGFitToViewBox { - readonly attribute SVGAnimatedRect viewBox; - readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio; + [SameObject] readonly attribute SVGAnimatedRect viewBox; + [SameObject] readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio; }; +[NoInterfaceObject] interface SVGZoomAndPan { // Zoom and Pan Types @@ -1556,240 +828,124 @@ interface SVGZoomAndPan { const unsigned short SVG_ZOOMANDPAN_DISABLE = 1; const unsigned short SVG_ZOOMANDPAN_MAGNIFY = 2; - attribute unsigned short zoomAndPan setraises(DOMException); -}; - -interface SVGViewSpec : SVGZoomAndPan, - SVGFitToViewBox { - readonly attribute SVGTransformList transform; - readonly attribute SVGElement viewTarget; - readonly attribute DOMString viewBoxString; - readonly attribute DOMString preserveAspectRatioString; - readonly attribute DOMString transformString; - readonly attribute DOMString viewTargetString; + attribute unsigned short zoomAndPan; }; +[NoInterfaceObject] interface SVGURIReference { - readonly attribute SVGAnimatedString href; + [SameObject] readonly attribute SVGAnimatedString href; }; -interface SVGCSSRule : CSSRule { - const unsigned short COLOR_PROFILE_RULE = 7; +partial interface Document { + readonly attribute SVGSVGElement? rootElement; }; -interface SVGRenderingIntent { - // Rendering Intent Types - const unsigned short RENDERING_INTENT_UNKNOWN = 0; - const unsigned short RENDERING_INTENT_AUTO = 1; - const unsigned short RENDERING_INTENT_PERCEPTUAL = 2; - const unsigned short RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3; - const unsigned short RENDERING_INTENT_SATURATION = 4; - const unsigned short RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5; -}; +interface SVGSVGElement : SVGGraphicsElement { -interface SVGDocument : Document, - DocumentEvent { - readonly attribute DOMString title; - readonly attribute DOMString referrer; - readonly attribute DOMString domain; - readonly attribute DOMString URL; - readonly attribute SVGSVGElement rootElement; -}; + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; + [SameObject] readonly attribute SVGAnimatedLength width; + [SameObject] readonly attribute SVGAnimatedLength height; -interface SVGSVGElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGLocatable, - SVGFitToViewBox, - SVGZoomAndPan, - DocumentEvent, - ViewCSS, - DocumentCSS { + attribute float currentScale; + [SameObject] readonly attribute DOMPointReadOnly currentTranslate; - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; - attribute DOMString contentScriptType setraises(DOMException); - attribute DOMString contentStyleType setraises(DOMException); - readonly attribute SVGRect viewport; - readonly attribute float pixelUnitToMillimeterX; - readonly attribute float pixelUnitToMillimeterY; - readonly attribute float screenPixelToMillimeterX; - readonly attribute float screenPixelToMillimeterY; - readonly attribute boolean useCurrentView; - readonly attribute SVGViewSpec currentView; - attribute float currentScale; - readonly attribute SVGPoint currentTranslate; + NodeList getIntersectionList(DOMRectReadOnly rect, SVGElement? referenceElement); + NodeList getEnclosureList(DOMRectReadOnly rect, SVGElement? referenceElement); + boolean checkIntersection(SVGElement element, DOMRectReadOnly rect); + boolean checkEnclosure(SVGElement element, DOMRectReadOnly rect); - unsigned long suspendRedraw(in unsigned long maxWaitMilliseconds); - void unsuspendRedraw(in unsigned long suspendHandleID); - void unsuspendRedrawAll(); - void forceRedraw(); - void pauseAnimations(); - void unpauseAnimations(); - boolean animationsPaused(); - float getCurrentTime(); - void setCurrentTime(in float seconds); - NodeList getIntersectionList(in SVGRect rect, in SVGElement referenceElement); - NodeList getEnclosureList(in SVGRect rect, in SVGElement referenceElement); - boolean checkIntersection(in SVGElement element, in SVGRect rect); - boolean checkEnclosure(in SVGElement element, in SVGRect rect); void deselectAll(); + SVGNumber createSVGNumber(); SVGLength createSVGLength(); SVGAngle createSVGAngle(); - SVGPoint createSVGPoint(); - SVGMatrix createSVGMatrix(); - SVGRect createSVGRect(); + DOMPoint createSVGPoint(); + DOMMatrix createSVGMatrix(); + DOMRect createSVGRect(); SVGTransform createSVGTransform(); - SVGTransform createSVGTransformFromMatrix(in SVGMatrix matrix); - Element getElementById(in DOMString elementId); + SVGTransform createSVGTransformFromMatrix(DOMMatrixReadOnly matrix); + + Element getElementById(DOMString elementId); + + // Deprecated methods that have no effect when called, + // but which are kept for compatibility reasons. + unsigned long suspendRedraw(unsigned long maxWaitMilliseconds); + void unsuspendRedraw(unsigned long suspendHandleID); + void unsuspendRedrawAll(); + void forceRedraw(); }; -interface SVGGElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { +SVGSVGElement implements SVGFitToViewBox; +SVGSVGElement implements SVGZoomAndPan; +SVGSVGElement implements WindowEventHandlers; + +interface SVGGElement : SVGGraphicsElement { }; -interface SVGDefsElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { +interface SVGUnknownElement : SVGGraphicsElement { }; -interface SVGDescElement : SVGElement, - SVGLangSpace, - SVGStylable { +interface SVGDefsElement : SVGGraphicsElement { }; -interface SVGTitleElement : SVGElement, - SVGLangSpace, - SVGStylable { +interface SVGDescElement : SVGElement { }; -interface SVGSymbolElement : SVGElement, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGFitToViewBox { +interface SVGMetadataElement : SVGElement { }; -interface SVGUseElement : SVGElement, - SVGURIReference, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; - readonly attribute SVGElementInstance instanceRoot; - readonly attribute SVGElementInstance animatedInstanceRoot; +interface SVGTitleElement : SVGElement { }; -interface SVGElementInstance : EventTarget { - readonly attribute SVGElement correspondingElement; - readonly attribute SVGUseElement correspondingUseElement; - readonly attribute SVGElementInstance parentNode; - readonly attribute SVGElementInstanceList childNodes; - readonly attribute SVGElementInstance firstChild; - readonly attribute SVGElementInstance lastChild; - readonly attribute SVGElementInstance previousSibling; - readonly attribute SVGElementInstance nextSibling; +interface SVGSymbolElement : SVGGraphicsElement { }; -interface SVGElementInstanceList { +SVGSymbolElement implements SVGFitToViewBox; - readonly attribute unsigned long length; - - SVGElementInstance item(in unsigned long index); +interface SVGUseElement : SVGGraphicsElement { + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; + [SameObject] readonly attribute SVGAnimatedLength width; + [SameObject] readonly attribute SVGAnimatedLength height; + [SameObject] readonly attribute SVGElement? instanceRoot; + [SameObject] readonly attribute SVGElement? animatedInstanceRoot; }; -interface SVGImageElement : SVGElement, - SVGURIReference, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; - readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio; +SVGUseElement implements SVGURIReference; + + +interface SVGElementInstance : ShadowRoot { + }; -interface SVGSwitchElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { +[NoInterfaceObject] +interface SVGElementInstance { + [SameObject] readonly attribute SVGElement? correspondingElement; + [SameObject] readonly attribute SVGUseElement? correspondingUseElement; }; + +[Constructor (Animation source, Animatable newTarget) ] +interface ShadowAnimation : Animation { + [SameObject] readonly attribute Animation sourceAnimation; +}; + +interface SVGSwitchElement : SVGGraphicsElement { +}; + +[NoInterfaceObject] interface GetSVGDocument { - SVGDocument getSVGDocument(); + Document getSVGDocument(); }; -interface SVGStyleElement : SVGElement, - SVGLangSpace { - attribute DOMString type setraises(DOMException); - attribute DOMString media setraises(DOMException); - attribute DOMString title setraises(DOMException); +interface SVGStyleElement : SVGElement { + attribute DOMString type; + attribute DOMString media; + attribute DOMString title; }; -interface SVGPoint { - - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - - SVGPoint matrixTransform(in SVGMatrix matrix); -}; - -interface SVGPointList { - - readonly attribute unsigned long numberOfItems; - - void clear() raises(DOMException); - SVGPoint initialize(in SVGPoint newItem) raises(DOMException); - SVGPoint getItem(in unsigned long index) raises(DOMException); - SVGPoint insertItemBefore(in SVGPoint newItem, in unsigned long index) raises(DOMException); - SVGPoint replaceItem(in SVGPoint newItem, in unsigned long index) raises(DOMException); - SVGPoint removeItem(in unsigned long index) raises(DOMException); - SVGPoint appendItem(in SVGPoint newItem) raises(DOMException); -}; - -interface SVGMatrix { - - attribute float a setraises(DOMException); - attribute float b setraises(DOMException); - attribute float c setraises(DOMException); - attribute float d setraises(DOMException); - attribute float e setraises(DOMException); - attribute float f setraises(DOMException); - - SVGMatrix multiply(in SVGMatrix secondMatrix); - SVGMatrix inverse() raises(SVGException); - SVGMatrix translate(in float x, in float y); - SVGMatrix scale(in float scaleFactor); - SVGMatrix scaleNonUniform(in float scaleFactorX, in float scaleFactorY); - SVGMatrix rotate(in float angle); - SVGMatrix rotateFromVector(in float x, in float y) raises(SVGException); - SVGMatrix flipX(); - SVGMatrix flipY(); - SVGMatrix skewX(in float angle); - SVGMatrix skewY(in float angle); -}; +SVGStyleElement implements LinkStyle; interface SVGTransform { @@ -1803,35 +959,39 @@ interface SVGTransform { const unsigned short SVG_TRANSFORM_SKEWY = 6; readonly attribute unsigned short type; - readonly attribute SVGMatrix matrix; + [SameObject] readonly attribute DOMMatrix matrix; readonly attribute float angle; - void setMatrix(in SVGMatrix matrix) raises(DOMException); - void setTranslate(in float tx, in float ty) raises(DOMException); - void setScale(in float sx, in float sy) raises(DOMException); - void setRotate(in float angle, in float cx, in float cy) raises(DOMException); - void setSkewX(in float angle) raises(DOMException); - void setSkewY(in float angle) raises(DOMException); + void setMatrix(DOMMatrixReadOnly matrix); + void setTranslate(float tx, float ty); + void setScale(float sx, float sy); + void setRotate(float angle, float cx, float cy); + void setSkewX(float angle); + void setSkewY(float angle); }; interface SVGTransformList { + readonly attribute unsigned long length; readonly attribute unsigned long numberOfItems; - void clear() raises(DOMException); - SVGTransform initialize(in SVGTransform newItem) raises(DOMException); - SVGTransform getItem(in unsigned long index) raises(DOMException); - SVGTransform insertItemBefore(in SVGTransform newItem, in unsigned long index) raises(DOMException); - SVGTransform replaceItem(in SVGTransform newItem, in unsigned long index) raises(DOMException); - SVGTransform removeItem(in unsigned long index) raises(DOMException); - SVGTransform appendItem(in SVGTransform newItem) raises(DOMException); - SVGTransform createSVGTransformFromMatrix(in SVGMatrix matrix); - SVGTransform consolidate() raises(DOMException); + void clear(); + SVGTransform initialize(SVGTransform newItem); + getter SVGTransform getItem(unsigned long index); + SVGTransform insertItemBefore(SVGTransform newItem, unsigned long index); + SVGTransform replaceItem(SVGTransform newItem, unsigned long index); + SVGTransform removeItem(unsigned long index); + SVGTransform appendItem(SVGTransform newItem); + setter void (unsigned long index, SVGTransform newItem); + + // Additional methods not common to other list interfaces. + SVGTransform createSVGTransformFromMatrix(DOMMatrixReadOnly matrix); + SVGTransform? consolidate(); }; interface SVGAnimatedTransformList { - readonly attribute SVGTransformList baseVal; - readonly attribute SVGTransformList animVal; + [SameObject] readonly attribute SVGTransformList baseVal; + [SameObject] readonly attribute SVGTransformList animVal; }; interface SVGPreserveAspectRatio { @@ -1854,330 +1014,119 @@ interface SVGPreserveAspectRatio { const unsigned short SVG_MEETORSLICE_MEET = 1; const unsigned short SVG_MEETORSLICE_SLICE = 2; - attribute unsigned short align setraises(DOMException); - attribute unsigned short meetOrSlice setraises(DOMException); + attribute unsigned short align; + attribute unsigned short meetOrSlice; }; interface SVGAnimatedPreserveAspectRatio { - readonly attribute SVGPreserveAspectRatio baseVal; - readonly attribute SVGPreserveAspectRatio animVal; + [SameObject] readonly attribute SVGPreserveAspectRatio baseVal; + [SameObject] readonly attribute SVGPreserveAspectRatio animVal; }; -interface SVGPathSeg { +interface SVGPathElement : SVGGeometryElement { - // Path Segment Types - const unsigned short PATHSEG_UNKNOWN = 0; - const unsigned short PATHSEG_CLOSEPATH = 1; - const unsigned short PATHSEG_MOVETO_ABS = 2; - const unsigned short PATHSEG_MOVETO_REL = 3; - const unsigned short PATHSEG_LINETO_ABS = 4; - const unsigned short PATHSEG_LINETO_REL = 5; - const unsigned short PATHSEG_CURVETO_CUBIC_ABS = 6; - const unsigned short PATHSEG_CURVETO_CUBIC_REL = 7; - const unsigned short PATHSEG_CURVETO_QUADRATIC_ABS = 8; - const unsigned short PATHSEG_CURVETO_QUADRATIC_REL = 9; - const unsigned short PATHSEG_ARC_ABS = 10; - const unsigned short PATHSEG_ARC_REL = 11; - const unsigned short PATHSEG_LINETO_HORIZONTAL_ABS = 12; - const unsigned short PATHSEG_LINETO_HORIZONTAL_REL = 13; - const unsigned short PATHSEG_LINETO_VERTICAL_ABS = 14; - const unsigned short PATHSEG_LINETO_VERTICAL_REL = 15; - const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16; - const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17; - const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18; - const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19; - - readonly attribute unsigned short pathSegType; - readonly attribute DOMString pathSegTypeAsLetter; }; -interface SVGPathSegClosePath : SVGPathSeg { +interface SVGRectElement : SVGGeometryElement { + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; + [SameObject] readonly attribute SVGAnimatedLength width; + [SameObject] readonly attribute SVGAnimatedLength height; + [SameObject] readonly attribute SVGAnimatedLength rx; + [SameObject] readonly attribute SVGAnimatedLength ry; }; -interface SVGPathSegMovetoAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); +interface SVGCircleElement : SVGGeometryElement { + [SameObject] readonly attribute SVGAnimatedLength cx; + [SameObject] readonly attribute SVGAnimatedLength cy; + [SameObject] readonly attribute SVGAnimatedLength r; }; -interface SVGPathSegMovetoRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); +interface SVGEllipseElement : SVGGeometryElement { + [SameObject] readonly attribute SVGAnimatedLength cx; + [SameObject] readonly attribute SVGAnimatedLength cy; + [SameObject] readonly attribute SVGAnimatedLength rx; + [SameObject] readonly attribute SVGAnimatedLength ry; }; -interface SVGPathSegLinetoAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); +interface SVGLineElement : SVGGeometryElement { + [SameObject] readonly attribute SVGAnimatedLength x1; + [SameObject] readonly attribute SVGAnimatedLength y1; + [SameObject] readonly attribute SVGAnimatedLength x2; + [SameObject] readonly attribute SVGAnimatedLength y2; }; -interface SVGPathSegLinetoRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); +interface SVGMeshElement : SVGGeometryElement {}; + +SVGMeshElement implements SVGURIReference; + +[NoInterfaceObject] +interface SVGAnimatedPoints { + [SameObject] readonly attribute SVGPointList points; + [SameObject] readonly attribute SVGPointList animatedPoints; }; -interface SVGPathSegCurvetoCubicAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float x1 setraises(DOMException); - attribute float y1 setraises(DOMException); - attribute float x2 setraises(DOMException); - attribute float y2 setraises(DOMException); -}; - -interface SVGPathSegCurvetoCubicRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float x1 setraises(DOMException); - attribute float y1 setraises(DOMException); - attribute float x2 setraises(DOMException); - attribute float y2 setraises(DOMException); -}; - -interface SVGPathSegCurvetoQuadraticAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float x1 setraises(DOMException); - attribute float y1 setraises(DOMException); -}; - -interface SVGPathSegCurvetoQuadraticRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float x1 setraises(DOMException); - attribute float y1 setraises(DOMException); -}; - -interface SVGPathSegArcAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float r1 setraises(DOMException); - attribute float r2 setraises(DOMException); - attribute float angle setraises(DOMException); - attribute boolean largeArcFlag setraises(DOMException); - attribute boolean sweepFlag setraises(DOMException); -}; - -interface SVGPathSegArcRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float r1 setraises(DOMException); - attribute float r2 setraises(DOMException); - attribute float angle setraises(DOMException); - attribute boolean largeArcFlag setraises(DOMException); - attribute boolean sweepFlag setraises(DOMException); -}; - -interface SVGPathSegLinetoHorizontalAbs : SVGPathSeg { - attribute float x setraises(DOMException); -}; - -interface SVGPathSegLinetoHorizontalRel : SVGPathSeg { - attribute float x setraises(DOMException); -}; - -interface SVGPathSegLinetoVerticalAbs : SVGPathSeg { - attribute float y setraises(DOMException); -}; - -interface SVGPathSegLinetoVerticalRel : SVGPathSeg { - attribute float y setraises(DOMException); -}; - -interface SVGPathSegCurvetoCubicSmoothAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float x2 setraises(DOMException); - attribute float y2 setraises(DOMException); -}; - -interface SVGPathSegCurvetoCubicSmoothRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float x2 setraises(DOMException); - attribute float y2 setraises(DOMException); -}; - -interface SVGPathSegCurvetoQuadraticSmoothAbs : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); -}; - -interface SVGPathSegCurvetoQuadraticSmoothRel : SVGPathSeg { - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); -}; - -interface SVGPathSegList { +interface SVGPointList { + readonly attribute unsigned long length; readonly attribute unsigned long numberOfItems; - void clear() raises(DOMException); - SVGPathSeg initialize(in SVGPathSeg newItem) raises(DOMException); - SVGPathSeg getItem(in unsigned long index) raises(DOMException); - SVGPathSeg insertItemBefore(in SVGPathSeg newItem, in unsigned long index) raises(DOMException); - SVGPathSeg replaceItem(in SVGPathSeg newItem, in unsigned long index) raises(DOMException); - SVGPathSeg removeItem(in unsigned long index) raises(DOMException); - SVGPathSeg appendItem(in SVGPathSeg newItem) raises(DOMException); + void clear(); + DOMPoint initialize(DOMPoint newItem); + getter DOMPoint getItem(unsigned long index); + DOMPoint insertItemBefore(DOMPoint newItem, unsigned long index); + DOMPoint replaceItem(DOMPoint newItem, unsigned long index); + DOMPoint removeItem(unsigned long index); + DOMPoint appendItem(DOMPoint newItem); + setter void (unsigned long index, DOMPoint newItem); }; -interface SVGAnimatedPathData { - readonly attribute SVGPathSegList pathSegList; - readonly attribute SVGPathSegList normalizedPathSegList; - readonly attribute SVGPathSegList animatedPathSegList; - readonly attribute SVGPathSegList animatedNormalizedPathSegList; +interface SVGPolylineElement : SVGGeometryElement { }; -interface SVGPathElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - SVGAnimatedPathData { +SVGPolylineElement implements SVGAnimatedPoints; - readonly attribute SVGAnimatedNumber pathLength; - - float getTotalLength(); - SVGPoint getPointAtLength(in float distance); - unsigned long getPathSegAtLength(in float distance); - SVGPathSegClosePath createSVGPathSegClosePath(); - SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(in float x, in float y); - SVGPathSegMovetoRel createSVGPathSegMovetoRel(in float x, in float y); - SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(in float x, in float y); - SVGPathSegLinetoRel createSVGPathSegLinetoRel(in float x, in float y); - SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(in float x, in float y, in float x1, in float y1, in float x2, in float y2); - SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(in float x, in float y, in float x1, in float y1, in float x2, in float y2); - SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(in float x, in float y, in float x1, in float y1); - SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(in float x, in float y, in float x1, in float y1); - SVGPathSegArcAbs createSVGPathSegArcAbs(in float x, in float y, in float r1, in float r2, in float angle, in boolean largeArcFlag, in boolean sweepFlag); - SVGPathSegArcRel createSVGPathSegArcRel(in float x, in float y, in float r1, in float r2, in float angle, in boolean largeArcFlag, in boolean sweepFlag); - SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(in float x); - SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(in float x); - SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(in float y); - SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(in float y); - SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(in float x, in float y, in float x2, in float y2); - SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(in float x, in float y, in float x2, in float y2); - SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(in float x, in float y); - SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(in float x, in float y); +interface SVGPolygonElement : SVGGeometryElement { }; -interface SVGRectElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; - readonly attribute SVGAnimatedLength rx; - readonly attribute SVGAnimatedLength ry; -}; +SVGPolygonElement implements SVGAnimatedPoints; -interface SVGCircleElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength cx; - readonly attribute SVGAnimatedLength cy; - readonly attribute SVGAnimatedLength r; -}; - -interface SVGEllipseElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength cx; - readonly attribute SVGAnimatedLength cy; - readonly attribute SVGAnimatedLength rx; - readonly attribute SVGAnimatedLength ry; -}; - -interface SVGLineElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength x1; - readonly attribute SVGAnimatedLength y1; - readonly attribute SVGAnimatedLength x2; - readonly attribute SVGAnimatedLength y2; -}; - -interface SVGAnimatedPoints { - readonly attribute SVGPointList points; - readonly attribute SVGPointList animatedPoints; -}; - -interface SVGPolylineElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - SVGAnimatedPoints { -}; - -interface SVGPolygonElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - SVGAnimatedPoints { -}; - -interface SVGTextContentElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable { +interface SVGTextContentElement : SVGGraphicsElement { // lengthAdjust Types const unsigned short LENGTHADJUST_UNKNOWN = 0; const unsigned short LENGTHADJUST_SPACING = 1; const unsigned short LENGTHADJUST_SPACINGANDGLYPHS = 2; - readonly attribute SVGAnimatedLength textLength; - readonly attribute SVGAnimatedEnumeration lengthAdjust; + [SameObject] readonly attribute SVGAnimatedLength textLength; + [SameObject] readonly attribute SVGAnimatedEnumeration lengthAdjust; long getNumberOfChars(); float getComputedTextLength(); - float getSubStringLength(in unsigned long charnum, in unsigned long nchars) raises(DOMException); - SVGPoint getStartPositionOfChar(in unsigned long charnum) raises(DOMException); - SVGPoint getEndPositionOfChar(in unsigned long charnum) raises(DOMException); - SVGRect getExtentOfChar(in unsigned long charnum) raises(DOMException); - float getRotationOfChar(in unsigned long charnum) raises(DOMException); - long getCharNumAtPosition(in SVGPoint point); - void selectSubString(in unsigned long charnum, in unsigned long nchars) raises(DOMException); + float getSubStringLength(unsigned long charnum, unsigned long nchars); + DOMPoint getStartPositionOfChar(unsigned long charnum); + DOMPoint getEndPositionOfChar(unsigned long charnum); + DOMRect getExtentOfChar(unsigned long charnum); + float getRotationOfChar(unsigned long charnum); + long getCharNumAtPosition(DOMPoint point); + void selectSubString(unsigned long charnum, unsigned long nchars); }; interface SVGTextPositioningElement : SVGTextContentElement { - readonly attribute SVGAnimatedLengthList x; - readonly attribute SVGAnimatedLengthList y; - readonly attribute SVGAnimatedLengthList dx; - readonly attribute SVGAnimatedLengthList dy; - readonly attribute SVGAnimatedNumberList rotate; + [SameObject] readonly attribute SVGAnimatedLengthList x; + [SameObject] readonly attribute SVGAnimatedLengthList y; + [SameObject] readonly attribute SVGAnimatedLengthList dx; + [SameObject] readonly attribute SVGAnimatedLengthList dy; + [SameObject] readonly attribute SVGAnimatedNumberList rotate; }; -interface SVGTextElement : SVGTextPositioningElement, - SVGTransformable { +interface SVGTextElement : SVGTextPositioningElement { }; interface SVGTSpanElement : SVGTextPositioningElement { }; -interface SVGTRefElement : SVGTextPositioningElement, - SVGURIReference { -}; - -interface SVGTextPathElement : SVGTextContentElement, - SVGURIReference { +interface SVGTextPathElement : SVGTextContentElement { // textPath Method Types const unsigned short TEXTPATH_METHODTYPE_UNKNOWN = 0; @@ -2189,60 +1138,32 @@ interface SVGTextPathElement : SVGTextContentElement, const unsigned short TEXTPATH_SPACINGTYPE_AUTO = 1; const unsigned short TEXTPATH_SPACINGTYPE_EXACT = 2; - readonly attribute SVGAnimatedLength startOffset; - readonly attribute SVGAnimatedEnumeration method; - readonly attribute SVGAnimatedEnumeration spacing; + [SameObject] readonly attribute SVGAnimatedLength startOffset; + [SameObject] readonly attribute SVGAnimatedEnumeration method; + [SameObject] readonly attribute SVGAnimatedEnumeration spacing; }; -interface SVGAltGlyphElement : SVGTextPositioningElement, - SVGURIReference { - attribute DOMString glyphRef setraises(DOMException); - attribute DOMString format setraises(DOMException); +SVGTextPathElement implements SVGURIReference; + +interface SVGImageElement : SVGGraphicsElement { + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; + [SameObject] readonly attribute SVGAnimatedLength width; + [SameObject] readonly attribute SVGAnimatedLength height; + [SameObject] readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio; + attribute DOMString? crossOrigin; }; -interface SVGAltGlyphDefElement : SVGElement { +SVGImageElement implements SVGURIReference; + +interface SVGForeignObjectElement : SVGGraphicsElement { + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; + [SameObject] readonly attribute SVGAnimatedLength width; + [SameObject] readonly attribute SVGAnimatedLength height; }; -interface SVGAltGlyphItemElement : SVGElement { -}; - -interface SVGGlyphRefElement : SVGElement, - SVGURIReference, - SVGStylable { - attribute DOMString glyphRef setraises(DOMException); - attribute DOMString format setraises(DOMException); - attribute float x setraises(DOMException); - attribute float y setraises(DOMException); - attribute float dx setraises(DOMException); - attribute float dy setraises(DOMException); -}; - -interface SVGPaint : SVGColor { - - // Paint Types - const unsigned short SVG_PAINTTYPE_UNKNOWN = 0; - const unsigned short SVG_PAINTTYPE_RGBCOLOR = 1; - const unsigned short SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2; - const unsigned short SVG_PAINTTYPE_NONE = 101; - const unsigned short SVG_PAINTTYPE_CURRENTCOLOR = 102; - const unsigned short SVG_PAINTTYPE_URI_NONE = 103; - const unsigned short SVG_PAINTTYPE_URI_CURRENTCOLOR = 104; - const unsigned short SVG_PAINTTYPE_URI_RGBCOLOR = 105; - const unsigned short SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106; - const unsigned short SVG_PAINTTYPE_URI = 107; - - readonly attribute unsigned short paintType; - readonly attribute DOMString uri; - - void setUri(in DOMString uri); - void setPaint(in unsigned short paintType, in DOMString uri, in DOMString rgbColor, in DOMString iccColor) raises(SVGException); -}; - -interface SVGMarkerElement : SVGElement, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGFitToViewBox { +interface SVGMarkerElement : SVGElement { // Marker Unit Types const unsigned short SVG_MARKERUNITS_UNKNOWN = 0; @@ -2254,38 +1175,25 @@ interface SVGMarkerElement : SVGElement, const unsigned short SVG_MARKER_ORIENT_AUTO = 1; const unsigned short SVG_MARKER_ORIENT_ANGLE = 2; - readonly attribute SVGAnimatedLength refX; - readonly attribute SVGAnimatedLength refY; - readonly attribute SVGAnimatedEnumeration markerUnits; - readonly attribute SVGAnimatedLength markerWidth; - readonly attribute SVGAnimatedLength markerHeight; - readonly attribute SVGAnimatedEnumeration orientType; - readonly attribute SVGAnimatedAngle orientAngle; + [SameObject] readonly attribute SVGAnimatedLength refX; + [SameObject] readonly attribute SVGAnimatedLength refY; + [SameObject] readonly attribute SVGAnimatedEnumeration markerUnits; + [SameObject] readonly attribute SVGAnimatedLength markerWidth; + [SameObject] readonly attribute SVGAnimatedLength markerHeight; + [SameObject] readonly attribute SVGAnimatedEnumeration orientType; + [SameObject] readonly attribute SVGAnimatedAngle orientAngle; + attribute DOMString orient; - void setOrientToAuto() raises(DOMException); - void setOrientToAngle(in SVGAngle angle) raises(DOMException); + void setOrientToAuto(); + void setOrientToAngle(SVGAngle angle); }; -interface SVGColorProfileElement : SVGElement, - SVGURIReference, - SVGRenderingIntent { - attribute DOMString local; - attribute DOMString name; - attribute unsigned short renderingIntent; +SVGMarkerElement implements SVGFitToViewBox; + +interface SVGSolidcolorElement : SVGElement { }; -interface SVGColorProfileRule : SVGCSSRule, - SVGRenderingIntent { - attribute DOMString src setraises(DOMException); - attribute DOMString name setraises(DOMException); - attribute unsigned short renderingIntent setraises(DOMException); -}; - -interface SVGGradientElement : SVGElement, - SVGURIReference, - SVGExternalResourcesRequired, - SVGStylable, - SVGUnitTypes { +interface SVGGradientElement : SVGElement { // Spread Method Types const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0; @@ -2293,466 +1201,91 @@ interface SVGGradientElement : SVGElement, const unsigned short SVG_SPREADMETHOD_REFLECT = 2; const unsigned short SVG_SPREADMETHOD_REPEAT = 3; - readonly attribute SVGAnimatedEnumeration gradientUnits; - readonly attribute SVGAnimatedTransformList gradientTransform; - readonly attribute SVGAnimatedEnumeration spreadMethod; + [SameObject] readonly attribute SVGAnimatedEnumeration gradientUnits; + [SameObject] readonly attribute SVGAnimatedTransformList gradientTransform; + [SameObject] readonly attribute SVGAnimatedEnumeration spreadMethod; }; +SVGGradientElement implements SVGURIReference; +SVGGradientElement implements SVGUnitTypes; + interface SVGLinearGradientElement : SVGGradientElement { - readonly attribute SVGAnimatedLength x1; - readonly attribute SVGAnimatedLength y1; - readonly attribute SVGAnimatedLength x2; - readonly attribute SVGAnimatedLength y2; + [SameObject] readonly attribute SVGAnimatedLength x1; + [SameObject] readonly attribute SVGAnimatedLength y1; + [SameObject] readonly attribute SVGAnimatedLength x2; + [SameObject] readonly attribute SVGAnimatedLength y2; }; interface SVGRadialGradientElement : SVGGradientElement { - readonly attribute SVGAnimatedLength cx; - readonly attribute SVGAnimatedLength cy; - readonly attribute SVGAnimatedLength r; - readonly attribute SVGAnimatedLength fx; - readonly attribute SVGAnimatedLength fy; + [SameObject] readonly attribute SVGAnimatedLength cx; + [SameObject] readonly attribute SVGAnimatedLength cy; + [SameObject] readonly attribute SVGAnimatedLength r; + [SameObject] readonly attribute SVGAnimatedLength fx; + [SameObject] readonly attribute SVGAnimatedLength fy; + [SameObject] readonly attribute SVGAnimatedLength fr; }; -interface SVGStopElement : SVGElement, - SVGStylable { - readonly attribute SVGAnimatedNumber offset; +interface SVGMeshGradientElement : SVGGradientElement { }; -interface SVGPatternElement : SVGElement, - SVGURIReference, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGFitToViewBox, - SVGUnitTypes { - readonly attribute SVGAnimatedEnumeration patternUnits; - readonly attribute SVGAnimatedEnumeration patternContentUnits; - readonly attribute SVGAnimatedTransformList patternTransform; - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; +interface SVGMeshrowElement : SVGElement { }; -interface SVGClipPathElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - SVGUnitTypes { - readonly attribute SVGAnimatedEnumeration clipPathUnits; +interface SVGMeshpatchElement : SVGElement { }; -interface SVGMaskElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGUnitTypes { - readonly attribute SVGAnimatedEnumeration maskUnits; - readonly attribute SVGAnimatedEnumeration maskContentUnits; - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; +interface SVGStopElement : SVGElement { + [SameObject] readonly attribute SVGAnimatedNumber offset; }; -interface SVGFilterElement : SVGElement, - SVGURIReference, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGUnitTypes { - - readonly attribute SVGAnimatedEnumeration filterUnits; - readonly attribute SVGAnimatedEnumeration primitiveUnits; - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; - readonly attribute SVGAnimatedInteger filterResX; - readonly attribute SVGAnimatedInteger filterResY; - - void setFilterRes(in unsigned long filterResX, in unsigned long filterResY) raises(DOMException); +interface SVGPatternElement : SVGElement { + [SameObject] readonly attribute SVGAnimatedEnumeration patternUnits; + [SameObject] readonly attribute SVGAnimatedEnumeration patternContentUnits; + [SameObject] readonly attribute SVGAnimatedTransformList patternTransform; + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; + [SameObject] readonly attribute SVGAnimatedLength width; + [SameObject] readonly attribute SVGAnimatedLength height; }; -interface SVGFilterPrimitiveStandardAttributes : SVGStylable { - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; - readonly attribute SVGAnimatedString result; +SVGPatternElement implements SVGFitToViewBox; +SVGPatternElement implements SVGURIReference; +SVGPatternElement implements SVGUnitTypes; + +interface SVGHatchElement : SVGElement { }; -interface SVGFEBlendElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Blend Mode Types - const unsigned short SVG_FEBLEND_MODE_UNKNOWN = 0; - const unsigned short SVG_FEBLEND_MODE_NORMAL = 1; - const unsigned short SVG_FEBLEND_MODE_MULTIPLY = 2; - const unsigned short SVG_FEBLEND_MODE_SCREEN = 3; - const unsigned short SVG_FEBLEND_MODE_DARKEN = 4; - const unsigned short SVG_FEBLEND_MODE_LIGHTEN = 5; - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedString in2; - readonly attribute SVGAnimatedEnumeration mode; +interface SVGHatchpathElement : SVGElement { }; -interface SVGFEColorMatrixElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Color Matrix Types - const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0; - const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX = 1; - const unsigned short SVG_FECOLORMATRIX_TYPE_SATURATE = 2; - const unsigned short SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3; - const unsigned short SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4; - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedEnumeration type; - readonly attribute SVGAnimatedNumberList values; +interface SVGCursorElement : SVGElement { + [SameObject] readonly attribute SVGAnimatedLength x; + [SameObject] readonly attribute SVGAnimatedLength y; }; -interface SVGFEComponentTransferElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - readonly attribute SVGAnimatedString in1; +SVGCursorElement implements SVGURIReference; + +interface SVGScriptElement : SVGElement { + attribute DOMString type; + attribute DOMString? crossOrigin; }; -interface SVGComponentTransferFunctionElement : SVGElement { +SVGScriptElement implements SVGURIReference; - // Component Transfer Types - const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0; - const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1; - const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2; - const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3; - const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4; - const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5; - - readonly attribute SVGAnimatedEnumeration type; - readonly attribute SVGAnimatedNumberList tableValues; - readonly attribute SVGAnimatedNumber slope; - readonly attribute SVGAnimatedNumber intercept; - readonly attribute SVGAnimatedNumber amplitude; - readonly attribute SVGAnimatedNumber exponent; - readonly attribute SVGAnimatedNumber offset; +interface SVGAElement : SVGGraphicsElement { + [SameObject] readonly attribute SVGAnimatedString target; + [SameObject] readonly attribute SVGAnimatedString download; + [SameObject] readonly attribute SVGAnimatedString rel; + [SameObject] readonly attribute SVGAnimatedString relList; + [SameObject] readonly attribute SVGAnimatedString hreflang; + [SameObject] readonly attribute SVGAnimatedString type; }; -interface SVGFEFuncRElement : SVGComponentTransferFunctionElement { -}; +SVGAElement implements SVGURIReference; +SVGAElement implements HTMLHyperlinkElementUtils; -interface SVGFEFuncGElement : SVGComponentTransferFunctionElement { -}; +interface SVGViewElement : SVGElement {}; -interface SVGFEFuncBElement : SVGComponentTransferFunctionElement { -}; - -interface SVGFEFuncAElement : SVGComponentTransferFunctionElement { -}; - -interface SVGFECompositeElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Composite Operators - const unsigned short SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0; - const unsigned short SVG_FECOMPOSITE_OPERATOR_OVER = 1; - const unsigned short SVG_FECOMPOSITE_OPERATOR_IN = 2; - const unsigned short SVG_FECOMPOSITE_OPERATOR_OUT = 3; - const unsigned short SVG_FECOMPOSITE_OPERATOR_ATOP = 4; - const unsigned short SVG_FECOMPOSITE_OPERATOR_XOR = 5; - const unsigned short SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6; - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedString in2; - readonly attribute SVGAnimatedEnumeration operator; - readonly attribute SVGAnimatedNumber k1; - readonly attribute SVGAnimatedNumber k2; - readonly attribute SVGAnimatedNumber k3; - readonly attribute SVGAnimatedNumber k4; -}; - -interface SVGFEConvolveMatrixElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Edge Mode Values - const unsigned short SVG_EDGEMODE_UNKNOWN = 0; - const unsigned short SVG_EDGEMODE_DUPLICATE = 1; - const unsigned short SVG_EDGEMODE_WRAP = 2; - const unsigned short SVG_EDGEMODE_NONE = 3; - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedInteger orderX; - readonly attribute SVGAnimatedInteger orderY; - readonly attribute SVGAnimatedNumberList kernelMatrix; - readonly attribute SVGAnimatedNumber divisor; - readonly attribute SVGAnimatedNumber bias; - readonly attribute SVGAnimatedInteger targetX; - readonly attribute SVGAnimatedInteger targetY; - readonly attribute SVGAnimatedEnumeration edgeMode; - readonly attribute SVGAnimatedNumber kernelUnitLengthX; - readonly attribute SVGAnimatedNumber kernelUnitLengthY; - readonly attribute SVGAnimatedBoolean preserveAlpha; -}; - -interface SVGFEDiffuseLightingElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedNumber surfaceScale; - readonly attribute SVGAnimatedNumber diffuseConstant; - readonly attribute SVGAnimatedNumber kernelUnitLengthX; - readonly attribute SVGAnimatedNumber kernelUnitLengthY; -}; - -interface SVGFEDistantLightElement : SVGElement { - readonly attribute SVGAnimatedNumber azimuth; - readonly attribute SVGAnimatedNumber elevation; -}; - -interface SVGFEPointLightElement : SVGElement { - readonly attribute SVGAnimatedNumber x; - readonly attribute SVGAnimatedNumber y; - readonly attribute SVGAnimatedNumber z; -}; - -interface SVGFESpotLightElement : SVGElement { - readonly attribute SVGAnimatedNumber x; - readonly attribute SVGAnimatedNumber y; - readonly attribute SVGAnimatedNumber z; - readonly attribute SVGAnimatedNumber pointsAtX; - readonly attribute SVGAnimatedNumber pointsAtY; - readonly attribute SVGAnimatedNumber pointsAtZ; - readonly attribute SVGAnimatedNumber specularExponent; - readonly attribute SVGAnimatedNumber limitingConeAngle; -}; - -interface SVGFEDisplacementMapElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Channel Selectors - const unsigned short SVG_CHANNEL_UNKNOWN = 0; - const unsigned short SVG_CHANNEL_R = 1; - const unsigned short SVG_CHANNEL_G = 2; - const unsigned short SVG_CHANNEL_B = 3; - const unsigned short SVG_CHANNEL_A = 4; - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedString in2; - readonly attribute SVGAnimatedNumber scale; - readonly attribute SVGAnimatedEnumeration xChannelSelector; - readonly attribute SVGAnimatedEnumeration yChannelSelector; -}; - -interface SVGFEFloodElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { -}; - -interface SVGFEGaussianBlurElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedNumber stdDeviationX; - readonly attribute SVGAnimatedNumber stdDeviationY; - - void setStdDeviation(in float stdDeviationX, in float stdDeviationY) raises(DOMException); -}; - -interface SVGFEImageElement : SVGElement, - SVGURIReference, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGFilterPrimitiveStandardAttributes { - readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio; -}; - -interface SVGFEMergeElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { -}; - -interface SVGFEMergeNodeElement : SVGElement { - readonly attribute SVGAnimatedString in1; -}; - -interface SVGFEMorphologyElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Morphology Operators - const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0; - const unsigned short SVG_MORPHOLOGY_OPERATOR_ERODE = 1; - const unsigned short SVG_MORPHOLOGY_OPERATOR_DILATE = 2; - - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedEnumeration operator; - readonly attribute SVGAnimatedNumber radiusX; - readonly attribute SVGAnimatedNumber radiusY; -}; - -interface SVGFEOffsetElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedNumber dx; - readonly attribute SVGAnimatedNumber dy; -}; - -interface SVGFESpecularLightingElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - readonly attribute SVGAnimatedString in1; - readonly attribute SVGAnimatedNumber surfaceScale; - readonly attribute SVGAnimatedNumber specularConstant; - readonly attribute SVGAnimatedNumber specularExponent; - readonly attribute SVGAnimatedNumber kernelUnitLengthX; - readonly attribute SVGAnimatedNumber kernelUnitLengthY; -}; - -interface SVGFETileElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - readonly attribute SVGAnimatedString in1; -}; - -interface SVGFETurbulenceElement : SVGElement, - SVGFilterPrimitiveStandardAttributes { - - // Turbulence Types - const unsigned short SVG_TURBULENCE_TYPE_UNKNOWN = 0; - const unsigned short SVG_TURBULENCE_TYPE_FRACTALNOISE = 1; - const unsigned short SVG_TURBULENCE_TYPE_TURBULENCE = 2; - - // Stitch Options - const unsigned short SVG_STITCHTYPE_UNKNOWN = 0; - const unsigned short SVG_STITCHTYPE_STITCH = 1; - const unsigned short SVG_STITCHTYPE_NOSTITCH = 2; - - readonly attribute SVGAnimatedNumber baseFrequencyX; - readonly attribute SVGAnimatedNumber baseFrequencyY; - readonly attribute SVGAnimatedInteger numOctaves; - readonly attribute SVGAnimatedNumber seed; - readonly attribute SVGAnimatedEnumeration stitchTiles; - readonly attribute SVGAnimatedEnumeration type; -}; - -interface SVGCursorElement : SVGElement, - SVGURIReference, - SVGTests, - SVGExternalResourcesRequired { - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; -}; - -interface SVGAElement : SVGElement, - SVGURIReference, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedString target; -}; - -interface SVGViewElement : SVGElement, - SVGExternalResourcesRequired, - SVGFitToViewBox, - SVGZoomAndPan { - readonly attribute SVGStringList viewTarget; -}; - -interface SVGScriptElement : SVGElement, - SVGURIReference, - SVGExternalResourcesRequired { - attribute DOMString type setraises(DOMException); -}; - -interface SVGZoomEvent : UIEvent { - readonly attribute SVGRect zoomRectScreen; - readonly attribute float previousScale; - readonly attribute SVGPoint previousTranslate; - readonly attribute float newScale; - readonly attribute SVGPoint newTranslate; -}; - -interface SVGAnimationElement : SVGElement, - SVGTests, - SVGExternalResourcesRequired, - ElementTimeControl { - - readonly attribute SVGElement targetElement; - - float getStartTime() raises(DOMException); - float getCurrentTime(); - float getSimpleDuration() raises(DOMException); -}; - -interface SVGAnimateElement : SVGAnimationElement, - SVGStylable { -}; - -interface SVGSetElement : SVGAnimationElement { -}; - -interface SVGAnimateMotionElement : SVGAnimationElement { -}; - -interface SVGMPathElement : SVGElement, - SVGURIReference, - SVGExternalResourcesRequired { -}; - -interface SVGAnimateColorElement : SVGAnimationElement, - SVGStylable { -}; - -interface SVGAnimateTransformElement : SVGAnimationElement { -}; - -interface SVGFontElement : SVGElement, - SVGExternalResourcesRequired, - SVGStylable { -}; - -interface SVGGlyphElement : SVGElement, - SVGStylable { -}; - -interface SVGMissingGlyphElement : SVGElement, - SVGStylable { -}; - -interface SVGHKernElement : SVGElement { -}; - -interface SVGVKernElement : SVGElement { -}; - -interface SVGFontFaceElement : SVGElement { -}; - -interface SVGFontFaceSrcElement : SVGElement { -}; - -interface SVGFontFaceUriElement : SVGElement { -}; - -interface SVGFontFaceFormatElement : SVGElement { -}; - -interface SVGFontFaceNameElement : SVGElement { -}; - -interface SVGMetadataElement : SVGElement { -}; - -interface SVGForeignObjectElement : SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable { - readonly attribute SVGAnimatedLength x; - readonly attribute SVGAnimatedLength y; - readonly attribute SVGAnimatedLength width; - readonly attribute SVGAnimatedLength height; -}; - -}; +SVGViewElement implements SVGFitToViewBox; +SVGViewElement implements SVGZoomAndPan; diff --git a/libraries/idl/org.w3c.dom.url.idl b/libraries/idl/org.w3c.dom.url.idl index 99497b80e0e..41035d7ec0d 100644 --- a/libraries/idl/org.w3c.dom.url.idl +++ b/libraries/idl/org.w3c.dom.url.idl @@ -2,19 +2,14 @@ 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)] +[Constructor(USVString url, optional USVString base), + Exposed=(Window,Worker)] interface URL { static USVString domainToASCII(USVString domain); static USVString domainToUnicode(USVString domain); -}; -URL implements URLUtils; -[NoInterfaceObject, - Exposed=(Window,Worker)] -interface URLUtils { stringifier attribute USVString href; readonly attribute USVString origin; - attribute USVString protocol; attribute USVString username; attribute USVString password; @@ -23,25 +18,11 @@ interface URLUtils { attribute USVString port; attribute USVString pathname; attribute USVString search; - attribute URLSearchParams searchParams; + readonly attribute URLSearchParams searchParams; attribute USVString hash; }; - -[NoInterfaceObject, +[Constructor(optional (USVString or URLSearchParams) init = ""), Exposed=(Window,Worker)] -interface URLUtilsReadOnly { - stringifier readonly attribute USVString href; - readonly attribute USVString origin; - - readonly attribute USVString protocol; - readonly attribute USVString host; - readonly attribute USVString hostname; - readonly attribute USVString port; - readonly attribute USVString pathname; - readonly attribute USVString search; - readonly attribute USVString hash; -}; -[Constructor(optional (USVString or URLSearchParams) init = ""), Exposed=(Window,Worker)] interface URLSearchParams { void append(USVString name, USVString value); void delete(USVString name); @@ -52,19 +33,14 @@ interface URLSearchParams { iterable; stringifier; }; -[Constructor(USVString url, optional USVString base), Exposed=(Window,Worker)] +[Constructor(USVString url, optional USVString base), + Exposed=(Window,Worker)] interface URL { static USVString domainToASCII(USVString domain); static USVString domainToUnicode(USVString domain); -}; -URL implements URLUtils; -[NoInterfaceObject, - Exposed=(Window,Worker)] -interface URLUtils { stringifier attribute USVString href; readonly attribute USVString origin; - attribute USVString protocol; attribute USVString username; attribute USVString password; @@ -73,25 +49,12 @@ interface URLUtils { attribute USVString port; attribute USVString pathname; attribute USVString search; - attribute URLSearchParams searchParams; + readonly attribute URLSearchParams searchParams; attribute USVString hash; }; -[NoInterfaceObject, +[Constructor(optional (USVString or URLSearchParams) init = ""), Exposed=(Window,Worker)] -interface URLUtilsReadOnly { - stringifier readonly attribute USVString href; - readonly attribute USVString origin; - - readonly attribute USVString protocol; - readonly attribute USVString host; - readonly attribute USVString hostname; - readonly attribute USVString port; - readonly attribute USVString pathname; - readonly attribute USVString search; - readonly attribute USVString hash; -}; -[Constructor(optional (USVString or URLSearchParams) init = ""), Exposed=(Window,Worker)] interface URLSearchParams { void append(USVString name, USVString value); void delete(USVString name); diff --git a/libraries/idl/org.w3c.fetch.idl b/libraries/idl/org.w3c.fetch.idl index c89b6de5bb1..d14aec5c36a 100644 --- a/libraries/idl/org.w3c.fetch.idl +++ b/libraries/idl/org.w3c.fetch.idl @@ -9,13 +9,12 @@ interface Headers { void append(ByteString name, ByteString value); void delete(ByteString name); ByteString? get(ByteString name); - sequence getAll(ByteString name); boolean has(ByteString name); void set(ByteString name, ByteString value); iterable; }; -typedef object JSON; typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) BodyInit; +typedef (BodyInit or ReadableStream) ResponseBodyInit; [NoInterfaceObject, Exposed=(Window,Worker)] interface Body { @@ -23,7 +22,7 @@ interface Body { [NewObject] Promise arrayBuffer(); [NewObject] Promise blob(); [NewObject] Promise formData(); - [NewObject] Promise json(); + [NewObject] Promise json(); [NewObject] Promise text(); }; typedef (Request or USVString) RequestInfo; @@ -35,12 +34,16 @@ interface Request { readonly attribute USVString url; [SameObject] readonly attribute Headers headers; - readonly attribute RequestContext context; - readonly attribute DOMString referrer; + 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(); }; @@ -49,25 +52,25 @@ Request implements Body; dictionary RequestInit { ByteString method; HeadersInit headers; - BodyInit body; + BodyInit? body; + USVString referrer; + ReferrerPolicy referrerPolicy; RequestMode mode; RequestCredentials credentials; RequestCache cache; - RequestRedirect redirect; // "manual" cannot be set + RequestRedirect redirect; + DOMString integrity; + boolean keepalive; + any window; // can only be set to null }; -enum RequestContext { - "", "audio", "beacon", "cspreport", "download", "embed", "eventsource", "favicon", - "fetch", "font", "form", "frame", "hyperlink", "iframe", "image", "imageset", "import", - "internal", "location", "manifest", "metarefresh", "object", "ping", "plugin", - "prefetch", "preload", "prerender", "script", "serviceworker", "sharedworker", - "subresource", "style", "track", "video", "worker", "xmlhttprequest", "xslt" -}; -enum RequestMode { "same-origin", "no-cors", "cors" }; +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 BodyInit body, optional ResponseInit init), +[Constructor(optional ResponseBodyInit? body = null, optional ResponseInit init), Exposed=(Window,Worker)] interface Response { [NewObject] static Response error(); @@ -76,10 +79,13 @@ interface Response { 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 trailer; [NewObject] Response clone(); }; @@ -91,12 +97,8 @@ dictionary ResponseInit { HeadersInit headers; }; -enum ResponseType { "basic", "cors", "default", "error", "opaque" }; -[NoInterfaceObject, - Exposed=(Window,Worker)] -interface GlobalFetch { +enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredirect" }; +partial interface WindowOrWorkerGlobalScope { [NewObject] Promise fetch(RequestInfo input, optional RequestInit init); }; -Window implements GlobalFetch; -WorkerGlobalScope implements GlobalFetch; diff --git a/libraries/idl/org.w3c.files.idl b/libraries/idl/org.w3c.files.idl index b3f51de2724..812386735b2 100644 --- a/libraries/idl/org.w3c.files.idl +++ b/libraries/idl/org.w3c.files.idl @@ -2,89 +2,183 @@ namespace org.w3c.files; // Downloaded from https://raw.githubusercontent.com/w3c/FileAPI/gh-pages/index.html -[Constructor, Constructor(sequence<(ArrayBuffer or ArrayBufferView or Blob or DOMString)> 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(); - - }; +[Constructor(optional sequence blobParts, optional BlobPropertyBag options), +Exposed=(Window,Worker)] +interface Blob { - dictionary BlobPropertyBag { - - DOMString type = ""; - - }; -[Constructor(sequence<(Blob or DOMString or ArrayBufferView or ArrayBuffer)> fileBits, [EnsureUTF16] DOMString fileName, optional FilePropertyBag options), Exposed=Window,Worker] interface File : 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 fileBits, + [EnsureUTF16] DOMString fileName, + optional FilePropertyBag options), +Exposed=(Window,Worker)] +interface File : Blob { readonly attribute DOMString name; readonly attribute long long lastModified; - }; -dictionary FilePropertyBag { - - DOMString type = ""; - 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 { +[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 readAsText(Blob blob, optional DOMString label); - void readAsDataURL(Blob blob); + // async read methods + void readAsArrayBuffer(Blob blob); + void readAsBinaryString(Blob blob); + void readAsText(Blob blob, optional DOMString label); + void readAsDataURL(Blob blob); - void abort(); + void abort(); - // states - const unsigned short EMPTY = 0; - const unsigned short LOADING = 1; - const unsigned short DONE = 2; + // states + const unsigned short EMPTY = 0; + const unsigned short LOADING = 1; + const unsigned short DONE = 2; - readonly attribute unsigned short readyState; + readonly attribute unsigned short readyState; - // File or Blob data - readonly attribute (DOMString or ArrayBuffer)? result; + // File or Blob data + readonly attribute (DOMString or ArrayBuffer)? result; - readonly attribute DOMError? error; + readonly attribute DOMError? error; - // event handler attributes - attribute EventHandler onloadstart; - attribute EventHandler onprogress; - attribute EventHandler onload; - attribute EventHandler onabort; - attribute EventHandler onerror; - attribute EventHandler onloadend; + // 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 { +interface FileReaderSync { + // Synchronously return strings - // Synchronously return strings - - ArrayBuffer readAsArrayBuffer(Blob blob); - DOMString readAsText(Blob blob, optional DOMString label); - DOMString readAsDataURL(Blob blob); - }; + 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 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 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); +}; + diff --git a/libraries/idl/org.w3c.fullscreen.idl b/libraries/idl/org.w3c.fullscreen.idl index 9d2d4585c8c..a1e2de4c96e 100644 --- a/libraries/idl/org.w3c.fullscreen.idl +++ b/libraries/idl/org.w3c.fullscreen.idl @@ -1,18 +1,22 @@ namespace org.w3c.fullscreen; -// Downloaded from https://raw.githubusercontent.com/whatwg/fullscreen/master/Overview.src.html +// Downloaded from https://raw.githubusercontent.com/whatwg/fullscreen/master/fullscreen.html partial interface Element { - void requestFullscreen(); + Promise requestFullscreen(); }; partial interface Document { - readonly attribute boolean fullscreenEnabled; - readonly attribute Element? fullscreenElement; + [LenientSetter] readonly attribute boolean fullscreenEnabled; + [LenientSetter] readonly attribute boolean fullscreen; // historical - void exitFullscreen(); + Promise exitFullscreen(); attribute EventHandler onfullscreenchange; attribute EventHandler onfullscreenerror; }; +partial interface DocumentOrShadowRoot { + [LenientSetter] readonly attribute Element? fullscreenElement; +}; + diff --git a/libraries/idl/org.w3c.notifications.idl b/libraries/idl/org.w3c.notifications.idl index c3c7594bfb5..15eb1d6da13 100644 --- a/libraries/idl/org.w3c.notifications.idl +++ b/libraries/idl/org.w3c.notifications.idl @@ -6,7 +6,9 @@ namespace org.w3c.notifications; Exposed=(Window,Worker)] interface Notification : EventTarget { static readonly attribute NotificationPermission permission; - [Exposed=Window] static void requestPermission(optional NotificationPermissionCallback callback); + [Exposed=Window] static Promise requestPermission(optional NotificationPermissionCallback deprecatedCallback); + + static readonly attribute unsigned long maxActions; attribute EventHandler onclick; attribute EventHandler onerror; @@ -16,14 +18,19 @@ interface Notification : EventTarget { 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; - // vibrate not exposed for now; see bug 23682 + [SameObject] readonly attribute FrozenArray 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 actions; void close(); }; @@ -33,14 +40,19 @@ dictionary NotificationOptions { 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 actions = []; }; enum NotificationPermission { @@ -49,13 +61,19 @@ enum NotificationPermission { "granted" }; -callback NotificationPermissionCallback = void (NotificationPermission permission); - enum NotificationDirection { "auto", "ltr", "rtl" }; + +dictionary NotificationAction { + required DOMString action; + required DOMString title; + USVString icon; +}; + +callback NotificationPermissionCallback = void (NotificationPermission permission); dictionary GetNotificationOptions { DOMString tag = ""; }; @@ -65,24 +83,29 @@ partial interface ServiceWorkerRegistration { Promise> getNotifications(optional GetNotificationOptions filter); }; -[Constructor(DOMString type, optional NotificationEventInit eventInitDict), +[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 void requestPermission(optional NotificationPermissionCallback callback); + [Exposed=Window] static Promise requestPermission(optional NotificationPermissionCallback deprecatedCallback); + + static readonly attribute unsigned long maxActions; attribute EventHandler onclick; attribute EventHandler onerror; @@ -92,14 +115,19 @@ interface Notification : EventTarget { 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; - // vibrate not exposed for now; see bug 23682 + [SameObject] readonly attribute FrozenArray 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 actions; void close(); }; @@ -109,14 +137,19 @@ dictionary NotificationOptions { 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 actions = []; }; enum NotificationPermission { @@ -125,14 +158,20 @@ enum NotificationPermission { "granted" }; -callback NotificationPermissionCallback = void (NotificationPermission permission); - enum NotificationDirection { "auto", "ltr", "rtl" }; +dictionary NotificationAction { + required DOMString action; + required DOMString title; + USVString icon; +}; + +callback NotificationPermissionCallback = void (NotificationPermission permission); + dictionary GetNotificationOptions { DOMString tag = ""; }; @@ -142,17 +181,20 @@ partial interface ServiceWorkerRegistration { Promise> getNotifications(optional GetNotificationOptions filter); }; -[Constructor(DOMString type, optional NotificationEventInit eventInitDict), +[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; }; diff --git a/libraries/idl/org.w3c.performance.idl b/libraries/idl/org.w3c.performance.idl index 6447bea5e43..b9d87e047ee 100644 --- a/libraries/idl/org.w3c.performance.idl +++ b/libraries/idl/org.w3c.performance.idl @@ -3,9 +3,20 @@ namespace org.w3c.performance; // Downloaded from http://www.w3.org/TR/hr-time/ typedef double DOMHighResTimeStamp; -partial interface Performance { - DOMHighResTimeStamp now(); +[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; diff --git a/libraries/idl/org.w3c.workers.idl b/libraries/idl/org.w3c.workers.idl index 17a958be5fa..865ba32a8fc 100644 --- a/libraries/idl/org.w3c.workers.idl +++ b/libraries/idl/org.w3c.workers.idl @@ -1,13 +1,12 @@ namespace org.w3c.workers; -// Downloaded from http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html -[Exposed=(Window,Worker)] +// Downloaded from https://w3c.github.io/ServiceWorker/ +[SecureContext, Exposed=(Window,Worker)] interface ServiceWorker : EventTarget { readonly attribute USVString scriptURL; readonly attribute ServiceWorkerState state; - readonly attribute DOMString id; - void postMessage(any message, optional sequence transfer); + void postMessage(any message, optional sequence transfer); // event attribute EventHandler onstatechange; @@ -21,46 +20,47 @@ enum ServiceWorkerState { "activated", "redundant" }; -[Exposed=(Window,Worker)] +[SecureContext, Exposed=(Window,Worker)] interface ServiceWorkerRegistration : EventTarget { - [Unforgeable, SameObject] readonly attribute ServiceWorker? installing; - [Unforgeable, SameObject] readonly attribute ServiceWorker? waiting; - [Unforgeable, SameObject] readonly attribute ServiceWorker? active; + readonly attribute ServiceWorker? installing; + readonly attribute ServiceWorker? waiting; + readonly attribute ServiceWorker? active; readonly attribute USVString scope; - void update(); + [NewObject] Promise update(); [NewObject] Promise unregister(); // event attribute EventHandler onupdatefound; }; partial interface Navigator { - [SameObject] readonly attribute ServiceWorkerContainer serviceWorker; + [SecureContext, SameObject] readonly attribute ServiceWorkerContainer serviceWorker; }; partial interface WorkerNavigator { - [SameObject] readonly attribute ServiceWorkerContainer serviceWorker; + [SecureContext, SameObject] readonly attribute ServiceWorkerContainer serviceWorker; }; -[Exposed=(Window,Worker)] +[SecureContext, Exposed=(Window,Worker)] interface ServiceWorkerContainer : EventTarget { - [Unforgeable, SameObject] readonly attribute ServiceWorker? controller; + readonly attribute ServiceWorker? controller; [SameObject] readonly attribute Promise ready; [NewObject] Promise register(USVString scriptURL, optional RegistrationOptions options); - [NewObject] Promise getRegistration(optional USVString clientURL = ""); - [NewObject] Promise?> getRegistrations(); + [NewObject] Promise getRegistration(optional USVString clientURL = ""); + [NewObject] Promise> getRegistrations(); + + void startMessages(); // events attribute EventHandler oncontrollerchange; - attribute EventHandler onerror; 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 { @@ -68,17 +68,14 @@ interface ServiceWorkerMessageEvent : Event { readonly attribute DOMString origin; readonly attribute DOMString lastEventId; [SameObject] readonly attribute (ServiceWorker or MessagePort)? source; - [SameObject] readonly attribute MessagePort[]? ports; - - void initServiceWorkerMessageEvent(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, (ServiceWorker or MessagePort) sourceArg, sequence? portsArg); + readonly attribute FrozenArray? ports; }; - dictionary ServiceWorkerMessageEventInit : EventInit { any data; DOMString origin; DOMString lastEventId; (ServiceWorker or MessagePort)? source; - sequence ports; + sequence? ports; }; [Global=(Worker,ServiceWorker), Exposed=ServiceWorker] interface ServiceWorkerGlobalScope : WorkerGlobalScope { @@ -92,18 +89,17 @@ interface ServiceWorkerGlobalScope : WorkerGlobalScope { 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 - - // close() method inherited from WorkerGlobalScope should not be accessible. }; [Exposed=ServiceWorker] interface Client { readonly attribute USVString url; readonly attribute FrameType frameType; readonly attribute DOMString id; - void postMessage(any message, optional sequence transfer); + void postMessage(any message, optional sequence transfer); }; [Exposed=ServiceWorker] @@ -111,6 +107,7 @@ interface WindowClient : Client { readonly attribute VisibilityState visibilityState; readonly attribute boolean focused; [NewObject] Promise focus(); + [NewObject] Promise navigate(USVString url); }; enum FrameType { @@ -122,8 +119,262 @@ enum FrameType { [Exposed=ServiceWorker] interface Clients { // The objects returned will be new instances every time - [NewObject] Promise?> matchAll(optional ClientQueryOptions options); - [NewObject] Promise openWindow(USVString url); + [NewObject] Promise get(DOMString id); + [NewObject] Promise> matchAll(optional ClientQueryOptions options); + [NewObject] Promise openWindow(USVString url); + [NewObject] Promise 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 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 scopes; + required sequence 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 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 r); +}; + +dictionary ForeignFetchEventInit : ExtendableEventInit { + required Request request; + USVString origin = "null"; +}; + +dictionary ForeignFetchResponse { + required Response response; + USVString origin; + sequence 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? ports; +}; +dictionary ExtendableMessageEventInit : ExtendableEventInit { + any data; + DOMString origin; + DOMString lastEventId; + (Client or ServiceWorker or MessagePort)? source; + sequence? 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 match(RequestInfo request, optional CacheQueryOptions options); + [NewObject] Promise> matchAll(optional RequestInfo request, optional CacheQueryOptions options); + [NewObject] Promise add(RequestInfo request); + [NewObject] Promise addAll(sequence requests); + [NewObject] Promise put(RequestInfo request, Response response); + [NewObject] Promise delete(RequestInfo request, optional CacheQueryOptions options); + [NewObject] Promise> 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 match(RequestInfo request, optional CacheQueryOptions options); + [NewObject] Promise has(DOMString cacheName); + [NewObject] Promise open(DOMString cacheName); + [NewObject] Promise delete(DOMString cacheName); + [NewObject] Promise> keys(); +}; +partial interface ServiceWorkerRegistration { + // e.g. define an API namespace + readonly attribute APISpaceType APISpace; + // e.g. define a method + Promise 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 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 update(); + [NewObject] Promise 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 ready; + + [NewObject] Promise register(USVString scriptURL, optional RegistrationOptions options); + + [NewObject] Promise getRegistration(optional USVString clientURL = ""); + [NewObject] Promise> 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? ports; +}; + +dictionary ServiceWorkerMessageEventInit : EventInit { + any data; + DOMString origin; + DOMString lastEventId; + (ServiceWorker or MessagePort)? source; + sequence? 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 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 transfer); +}; + +[Exposed=ServiceWorker] +interface WindowClient : Client { + readonly attribute VisibilityState visibilityState; + readonly attribute boolean focused; + [NewObject] Promise focus(); + [NewObject] Promise 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 get(DOMString id); + [NewObject] Promise> matchAll(optional ClientQueryOptions options); + [NewObject] Promise openWindow(USVString url); [NewObject] Promise claim(); }; @@ -138,6 +389,7 @@ enum ClientType { "sharedworker", "all" }; + [Constructor(DOMString type, optional ExtendableEventInit eventInitDict), Exposed=ServiceWorker] interface ExtendableEvent : Event { void waitUntil(Promise f); @@ -146,29 +398,58 @@ interface ExtendableEvent : Event { dictionary ExtendableEventInit : EventInit { // Defined for the forward compatibility across the derived events }; -[Constructor(DOMString type, optional FetchEventInit eventInitDict), Exposed=ServiceWorker] + +[Constructor(DOMString type, optional ExtendableEventInit eventInitDict), Exposed=ServiceWorker] +interface InstallEvent : ExtendableEvent { + void registerForeignFetch(ForeignFetchOptions options); +}; + +dictionary ForeignFetchOptions { + required sequence scopes; + required sequence origins; +}; + +[Constructor(DOMString type, FetchEventInit eventInitDict), Exposed=ServiceWorker] interface FetchEvent : ExtendableEvent { [SameObject] readonly attribute Request request; - [SameObject] readonly attribute Client client; + readonly attribute DOMString? clientId; readonly attribute boolean isReload; - void respondWith((Response or Promise) r); + void respondWith(Promise r); }; dictionary FetchEventInit : ExtendableEventInit { - Request request; - Client client; + 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 r); +}; + +dictionary ForeignFetchEventInit : ExtendableEventInit { + required Request request; + USVString origin = "null"; +}; + +dictionary ForeignFetchResponse { + required Response response; + USVString origin; + sequence 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; - [SameObject] readonly attribute MessagePort[]? ports; - - void initExtendableMessageEvent(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, (Client or ServiceWorker or MessagePort) sourceArg, sequence? portsArg); + readonly attribute FrozenArray? ports; }; dictionary ExtendableMessageEventInit : ExtendableEventInit { @@ -176,18 +457,21 @@ dictionary ExtendableMessageEventInit : ExtendableEventInit { DOMString origin; DOMString lastEventId; (Client or ServiceWorker or MessagePort)? source; - sequence ports; -}; -partial interface Window { - [SameObject] readonly attribute CacheStorage caches; + sequence? ports; }; -partial interface WorkerGlobalScope { - [SameObject] readonly attribute CacheStorage caches; +partial interface HTMLLinkElement { + [CEReactions] attribute USVString scope; + [CEReactions] attribute WorkerType workerType; }; -[Exposed=(Window,Worker)] + +partial interface WindowOrWorkerGlobalScope { + [SecureContext, SameObject] readonly attribute CacheStorage caches; +}; + +[SecureContext, Exposed=(Window,Worker)] interface Cache { - [NewObject] Promise match(RequestInfo request, optional CacheQueryOptions options); + [NewObject] Promise match(RequestInfo request, optional CacheQueryOptions options); [NewObject] Promise> matchAll(optional RequestInfo request, optional CacheQueryOptions options); [NewObject] Promise add(RequestInfo request); [NewObject] Promise addAll(sequence requests); @@ -209,25 +493,13 @@ dictionary CacheBatchOperation { Response response; CacheQueryOptions options; }; -[Exposed=(Window,Worker)] + +[SecureContext, Exposed=(Window,Worker)] interface CacheStorage { - [NewObject] Promise match(RequestInfo request, optional CacheQueryOptions options); + [NewObject] Promise match(RequestInfo request, optional CacheQueryOptions options); [NewObject] Promise has(DOMString cacheName); [NewObject] Promise open(DOMString cacheName); [NewObject] Promise delete(DOMString cacheName); [NewObject] Promise> keys(); }; -partial interface ServiceWorkerRegistration { - // e.g. define an API namespace - readonly attribute APISpaceType APISpace; - // e.g. define a method - Promise 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; -}; diff --git a/libraries/idl/org.w3c.xhr.idl b/libraries/idl/org.w3c.xhr.idl index 0a6c77aaac5..0ae1c9ac01f 100644 --- a/libraries/idl/org.w3c.xhr.idl +++ b/libraries/idl/org.w3c.xhr.idl @@ -2,7 +2,7 @@ namespace org.w3c.xhr; // Downloaded from https://raw.githubusercontent.com/whatwg/xhr/master/Overview.src.html -[Exposed=(Window,Worker)] +[Exposed=(Window,DedicatedWorker,SharedWorker)] interface XMLHttpRequestEventTarget : EventTarget { // event handlers attribute EventHandler onloadstart; @@ -14,7 +14,7 @@ interface XMLHttpRequestEventTarget : EventTarget { attribute EventHandler onloadend; }; -[Exposed=(Window,Worker)] +[Exposed=(Window,DedicatedWorker,SharedWorker)] interface XMLHttpRequestUpload : XMLHttpRequestEventTarget { }; @@ -28,7 +28,7 @@ enum XMLHttpRequestResponseType { }; [Constructor, - Exposed=(Window,Worker)] + Exposed=(Window,DedicatedWorker,SharedWorker)] interface XMLHttpRequest : XMLHttpRequestEventTarget { // event handler attribute EventHandler onreadystatechange; @@ -63,21 +63,23 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget { readonly attribute USVString responseText; [Exposed=Window] readonly attribute Document? responseXML; }; -typedef (Blob or USVString) FormDataEntryValue; +typedef (File or USVString) FormDataEntryValue; [Constructor(optional HTMLFormElement form), Exposed=(Window,Worker)] interface FormData { - void append(USVString name, FormDataEntryValue value); + void append(USVString name, USVString value); + void append(USVString name, Blob value, optional USVString filename); void delete(USVString name); FormDataEntryValue? get(USVString name); sequence getAll(USVString name); boolean has(USVString name); - void set(USVString name, FormDataEntryValue value); + void set(USVString name, USVString value); + void set(USVString name, Blob value, optional USVString filename); iterable; }; [Constructor(DOMString type, optional ProgressEventInit eventInitDict), - Exposed=(Window,Worker)] + Exposed=(Window,DedicatedWorker,SharedWorker)] interface ProgressEvent : Event { readonly attribute boolean lengthComputable; readonly attribute unsigned long long loaded;