Search completed in 1.21 seconds.
<plaintext>: The Plain Text element (Deprecated) - HTML: Hypertext Markup Language
the html plain
text element (<plain
text>) renders everything following the start tag as raw
text, ignoring any following html. there is no closing tag, since everything after it is considered raw
text. note: do not use this element. <plain
text> is deprecated since html 2, and not all browsers implemented it. browsers that did implement it didn't do so consistently. <plain
text> is obsolete in html5; browsers that accept it may instead treat it as a <pre> element that still interprets html within. if <plain
text> is the first element on the page (other than any non-displayed elements, like <head>), do not use html at all. instead serve a
text file with the
text/plain mime-type. ...
...escape any <, > and & characters, to prevent browsers inadvertently parsing content the element content as html. a monospaced font can be applied to any html element via a css font-family style with the monospace generic value. ...
...escape any <, > and & characters, to prevent browsers inadvertently parsing content the element content as html. a monospaced font can be applied to any html element via a css font-family style with the monospace generic value. ...
<textarea> - HTML: Hypertext Markup Language
the html <
textarea> element represents a multi-line plain-
text editing control, useful when you want to allow users to enter a sizeable amount of free-form
text, for example a comment on a review or feedback form. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the above example demonstrates a number of features of <
textarea>: an id attribute to allow the <
textarea> to be associated with a <label> element for accessibility purposes a name attribute to set the name of the associated data point submitted to the server when the form is submitted. rows and cols attributes to allow you to specify an exact size for ...
...ples and send us a pull request. the above example demonstrates a number of features of <
textarea>: an id attribute to allow the <
textarea> to be associated with a <label> element for accessibility purposes a name attribute to set the name of the associated data point submitted to the server when the form is submitted. rows and cols attributes to allow you to specify an exact size for the <
textarea> to take. setting these is a good idea for consistency, as browser defaults can differ. default content entered between the opening and closing tags. <
textarea> does not support the value attribute. the <
textarea> element also accepts several attributes common to form <input>s, such as autocomplete, autofocus, disabled, placeholder, readonly, and required. attributes this element include...
...t also accepts several attributes common to form <input>s, such as autocomplete, autofocus, disabled, placeholder, readonly, and required. attributes this element includes the global attributes. autocapitalize this is a non-standard attribute supported by webkit on ios (therefore nearly all browsers running on ios, including safari, firefox, and chrome), which controls whether and how the
text value should be automatically capitalized as it is entered/edited by the user. the non-deprecated values are available in ios 5 and later. possible values are: none: completely disables automatic capitalization. sentences: automatically capitalize the first letter of sentences. words: automatically capitalize the first letter of words. characters: automatically capitalize all characters...
...And 31 more matches
<input type="text"> - HTML: Hypertext Markup Language
<input> elements of type
text create basic single-line
text fields. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. value a domstring representing the
text contained in the
text field. events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, required and size idl attributes list, value methods select(), setrange
text() and setselectionrange(). value the value attribute is a domstring that contains the current value of the
text entered into the
text field. you can retrieve this using...
...tes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, required and size idl attributes list, value methods select(), setrange
text() and setselectionrange(). value the value attribute is a domstring that contains the current value of the
text entered into the
text field. you can retrieve this using the value property in javascript. let the
text = my
textinput.value; if no validation constraints are in place for the input (see validation for more details), the value may be an empty string (""). ...
...current value of the
text entered into the
text field. you can retrieve this using the value property in javascript. let the
text = my
textinput.value; if no validation constraints are in place for the input (see validation for more details), the value may be an empty string (""). ...
...And 19 more matches
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories none permitted content none, it is an empty element. ...
...responding role permitted aria roles no role permitted dom interface htmltrackelement attributes this element includes the global attributes. default this attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate. this may only be used on one track element per media element. ...
... captions closed captions provide a transcription and possibly a translation of audio. ...
...And 10 more matches
Text.wholeText - Web APIs
the
text.whole
text read-only property returns the full
text of all
text nodes logically adjacent to the node. the
text is concatenated in document order. this allows to specify any
text node and obtain all adjacent
text as a single string. ...
... the
text.whole
text read-only property returns the full
text of all
text nodes logically adjacent to the node. the
text is concatenated in document order. this allows to specify any
text node and obtain all adjacent
text as a single string. ...
... the
text.whole
text read-only property returns the full
text of all
text nodes logically adjacent to the node. the
text is concatenated in document order. this allows to specify any
text node and obtain all adjacent
text as a single string. ...
...And 9 more matches
WebGLRenderingContext.getExtension() - Web APIs
the webglrenderingcon
text.ge
textension() method enables a webgl extension. syntax gl.ge
textension(name); parameters name a string for the name of the webgl extension to enable. return value a webgl extension object, or null if name does not match (case-insensitive) to one of the strings in webglrenderingcon
text.getsupportedextensions. examples once a webgl extension is enabled, you are able to use the methods, properties or constants that this extension object provides. var canvas = document.getelementbyid('canvas'); gl = canvas.getcon
text('webgl'); gl.ge
textension('webgl_lose_con
text').losecon
text(); webgl extensions extensions for the webgl api are registered in the webgl extension registry. the current extensions are: angle_instanced_arrays ext_blend_minmax ext_color...
...vas'); gl = canvas.getcon
text('webgl'); gl.ge
textension('webgl_lose_con
text').losecon
text(); webgl extensions extensions for the webgl api are registered in the webgl extension registry. ...
...s.getcon
text('webgl'); gl.ge
textension('webgl_lose_con
text').losecon
text(); webgl extensions extensions for the webgl api are registered in the webgl extension registry. ...
...And 7 more matches
<i>: The Idiomatic Text element - HTML: Hypertext Markup Language
historically, these have been presented using italicized type, which is the original source of the <i> naming of this element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. ...
...g content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes this element only includes the global attributes. ...
... permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes this element only includes the global attributes. usage notes use the <i> element for
text that is set off from the normal prose for readability reasons. this would be a range of
text with different semantic meaning than the surrounding
text. ...
...And 7 more matches
contextmenu - HTML: Hypertext Markup Language
the con
textmenu attribute is obsolete and will be removed from all browsers the con
textmenu global attribute is the id of a <menu> to use as the con
textual menu for this element. a con
text menu is a menu that appears upon user interaction, such as a right-click. html5 now allows us to customize this menu. here are some implementation examples, including nested menus. example html <body con
textmenu="share"> <menu type="con
text" id="share"> <menu label="share"> <menuitem label="twitter" onclick="shareviatwitter()"></menuitem> <menuitem label="facebook" onclick="shareviafacebook()"></menuitem> </menu> </menu> <ol> <li> anywhere in the example you can share the page on twitter and facebook using the share menu from your con
text menu. </li> ...
...hare"> <menu type="con
text" id="share"> <menu label="share"> <menuitem label="twitter" onclick="shareviatwitter()"></menuitem> <menuitem label="facebook" onclick="shareviafacebook()"></menuitem> </menu> </menu> <ol> <li> anywhere in the example you can share the page on twitter and facebook using the share menu from your con
text menu. ...
..."shareviatwitter()"></menuitem> <menuitem label="facebook" onclick="shareviafacebook()"></menuitem> </menu> </menu> <ol> <li> anywhere in the example you can share the page on twitter and facebook using the share menu from your con
text menu. ...
...And 7 more matches
OfflineAudioContext.OfflineAudioContext() - Web APIs
either way, the individual parameters are the same. numberofchannels an integer specifying the number of channels the resulting audiobuffer should have. ...
...either way, the individual parameters are the same. numberofchannels an integer specifying the number of channels the resulting audiobuffer should have. ...
...either way, the individual parameters are the same. numberofchannels an integer specifying the number of channels the resulting audiobuffer should have. ...
...And 6 more matches
Text.splitText() - Web APIs
the
text.split
text() method breaks the
text node into two nodes at the specified offset, keeping both nodes in the tree as siblings. after the split, the current node contains all the content up to the specified offset point, and a newly created node of the same type contains the remaining
text. the newly created node is returned to the caller. if the original node had a parent, the new node is inserted as the next sibling of the original node. if the offset is equal to the length of the original node, the newly created node has no data. separated
text nodes can be concatenated using the node.normalize() method. syntax newnode =
textnode.split
text(offset) parameters offset the index immediately before which to break the
text node. ...
...node is inserted as the next sibling of the original node. if the offset is equal to the length of the original node, the newly created node has no data. separated
text nodes can be concatenated using the node.normalize() method. syntax newnode =
textnode.split
text(offset) parameters offset the index immediately before which to break the
text node. return value returns a newly created
text node that contains the
text after the specified offset point. ...
... newnode =
textnode.split
text(offset) parameters offset the index immediately before which to break the
text node. return value returns a newly created
text node that contains the
text after the specified offset point. exceptions thrown a domexception with a value of index_size_err is thrown if the specified offset is negative or is greater than the number of 16-bit units in the node's
text; a domexception with a value of no_modification_allowed_err is thrown if the node is read-only. example in this example, the
text of a <p> is split into two
text nodes, and a <u> is inserted between them. ...
...And 6 more matches
WebGLRenderingContext.getContextAttributes() - Web APIs
the webglrenderingcon
text.getcon
textattributes() method returns a webglcon
textattributes object that contains the actual con
text parameters. might return null, if the con
text is lost. syntax gl.getcon
textattributes(); return value a webglcon
textattributes object that contains the actual con
text parameters, or null if the con
text is lost. ...
...ibutes() method returns a webglcon
textattributes object that contains the actual con
text parameters. might return null, if the con
text is lost. syntax gl.getcon
textattributes(); return value a webglcon
textattributes object that contains the actual con
text parameters, or null if the con
text is lost. ...
...tual con
text parameters. might return null, if the con
text is lost. syntax gl.getcon
textattributes(); return value a webglcon
textattributes object that contains the actual con
text parameters, or null if the con
text is lost. ...
...And 5 more matches
CanvasRenderingContext2D.fillText() - Web APIs
the canvasrenderingcon
text2d method fill
text(), part of the canvas 2d api, draws a
text string at the specified coordinates, filling the string's characters with the current fillstyle. an optional parameter allows specifying a maximum width for the rendered
text, which the user agent will achieve by condensing the
text or by using a lower font size. this method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it. the
text is rendered using the font and
text layout configuration as defined by the font,
textalign,
textbaseline, and direction properties. to draw the outlines of the characters in a string, call the con
text's stroke
text() method. ...
... draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it. the
text is rendered using the font and
text layout configuration as defined by the font,
textalign,
textbaseline, and direction properties. to draw the outlines of the characters in a string, call the con
text's stroke
text() method. syntax canvasrenderingcon
text2d.fill
text(
text, x, y [, maxwidth]); parameters
text a domstring specifying the
text string to render into the con
text. the
text is rendered using the settings specified by font,
textalign,
textbaseline, and direction. x the x-axis coordinate of the point at which to begin drawing the
text, in pixels. y the y-axis coordinate of the point at which to begin drawing the
text, in pixels. m...
...xt a domstring specifying the
text string to render into the con
text. the
text is rendered using the settings specified by font,
textalign,
textbaseline, and direction. x the x-axis coordinate of the point at which to begin drawing the
text, in pixels. y the y-axis coordinate of the point at which to begin drawing the
text, in pixels. maxwidth optional the maximum number of pixels wide the
text may be once rendered. if not specified, there is no limit to the width of the
text. however, if this value is provided, the user agent will adjust the kerning, select a more horizontally condensed font (if one is available or can be generated without loss of quality), or scale down to a smaller font size in order to fit the
text in the specified width. return value undefined. examples drawin...
...And 4 more matches
WebGLRenderingContext.framebufferTexture2D() - Web APIs
the webglrenderingcon
text.framebuffer
texture2d() method of the webgl api attaches a
texture to a webglframebuffer. syntax void gl.framebuffer
texture2d(target, attachment,
textarget,
texture, level); parameters target a glenum specifying the binding point (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. when using a webgl 2 con
text, the following values are available additionally: gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the
texture. possible ...
...wing values are available additionally: gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the
texture. possible values: gl.color_attachment0: attaches the
texture to the framebuffer's color buffer. gl.depth_attachment: attaches the
texture to the framebuffer's depth buffer. gl.stencil_attachment: attaches the
texture to the framebuffer's stencil buffer. when using a webgl 2 con
text, the following values are available additionally: gl.depth_stencil_attachment: depth and stencil buffer. gl.color_attachment1 gl.color_attachment2 ...
...ext.color_attachment5_webgl ext.color_attachment6_webgl ext.color_attachment7_webgl ext.color_attachment8_webgl ext.color_attachment9_webgl ext.color_attachment10_webgl ext.color_attachment11_webgl ext.color_attachment12_webgl ext.color_attachment13_webgl ext.color_attachment14_webgl ext.color_attachment15_webgl when using the webgl_depth_
texture extension: gl.depth_stencil_attachment: depth and stencil buffer data storage.
textarget a glenum specifying the
texture target. possible values: gl.
texture_2d: a 2d image. gl.
texture_cube_map_positive_x: image for the positive x face of the cube. gl.
texture_cube_map_negative_x: image for the negative x face of the cube. gl.
texture_cube_map_positive_y: image for ...
...And 4 more matches
CanvasRenderingContext2D.strokeText() - Web APIs
the canvasrenderingcon
text2d method stroke
text(), part of the canvas 2d api, strokes — that is, draws the outlines of — the characters of a
text string at the specified coordinates. an optional parameter allows specifying a maximum width for the rendered
text, which the user agent will achieve by condensing the
text or by using a lower font size. this method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it. use the fill
text() method to fill the
text characters rather than having just their outlines drawn. syntax canvasrenderingcon
text2d.stroke
text(
text, x, y [, maxwidth]); parameters
text a domstring specifying the
text string to render into the con
text. ...
...aws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it. use the fill
text() method to fill the
text characters rather than having just their outlines drawn. syntax canvasrenderingcon
text2d.stroke
text(
text, x, y [, maxwidth]); parameters
text a domstring specifying the
text string to render into the con
text. the
text is rendered using the settings specified by font,
textalign,
textbaseline, and direction. x the x-axis coordinate of the point at which to begin drawing the
text. y the y-axis coordinate of the point at which to begin drawing the
text. maxwidth optional the maximum width the
text may be once rendered. if not specified, there is no limit to the width of the
text. however, if this value is p...
...o begin drawing the
text. maxwidth optional the maximum width the
text may be once rendered. if not specified, there is no limit to the width of the
text. however, if this value is provided, the user agent will adjust the kerning, select a more horizontally condensed font (if one is available or can be generated without loss of quality), or scale down to a smaller font size in order to fit the
text in the specified width. return value undefined. examples drawing
text outlines this example writes the words "hello world" using the stroke
text() method. html first, we need a canvas to draw into. this code creates a con
text 400 pixels wide and 150 pixels high. <canvas id="canvas" width="400" height="150"></canvas> javascript the javascript code for this example follows. const canv...
...And 3 more matches
CanvasRenderingContext2D.textAlign - Web APIs
the canvasrenderingcon
text2d.
textalign property of the canvas 2d api specifies the current
text alignment used when drawing
text. the alignment is relative to the x value of the fill
text() method. for example, if
textalign is "center", then the
text's left edge will be at x - (
textwidth / 2). syntax ctx.
textalign = "left" || "right" || "center" || "start" || "end"; options possible values: "left" the
text is left-aligned. "right" the
text is right-aligned. "center" the
text is centered. "start" the
text is aligned at the normal start of the line (left-aligned for left-to-right locales, right-aligned for right-to-left locales). "end" the
text is aligned at the normal end of the line (right-aligned for left-to-right locales, left-aligned for right-to-left locales). the defau...
..." the
text is right-aligned. "center" the
text is centered. "start" the
text is aligned at the normal start of the line (left-aligned for left-to-right locales, right-aligned for right-to-left locales). "end" the
text is aligned at the normal end of the line (right-aligned for left-to-right locales, left-aligned for right-to-left locales). the default value is "start". examples general
text alignment this example demonstrates the three "physical" values of the
textalign property: "left", "center", and "right". ...
...ligned for left-to-right locales, left-aligned for right-to-left locales). the default value is "start". examples general
text alignment this example demonstrates the three "physical" values of the
textalign property: "left", "center", and "right". ...
...And 3 more matches
<del>: The Deleted Text element - HTML: Hypertext Markup Language
content categories phrasing content or flow content. permitted content transparent. ...
... content categories phrasing content or flow content. permitted content transparent. ...
... content categories phrasing content or flow content. permitted content transparent. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. ...
...And 2 more matches
<mark>: The Mark Text element - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. ...
...ermitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes this element only includes the global attributes. usage notes typical use cases for <mark> include: when used in a quotation (<q>) or block quote (<blockquote>), it generally indicates
text which is of special interest but is not marked in the original source material, or material which needs special scrutiny even though the original author didn't think it was of particular importance. think of this like using a highlighter pen in a book to mark passages that you find of interest. otherwise, <mark> indicates a portion of the document's content which is likely to be relevant to the ...
...relevant to the user's current activity. this might be used, for example, to indicate the words that matched a search operation. don't use <mark> for syntax highlighting purposes; instead, use the <span> element with appropriate css applied to it. don't confuse <mark> with the <strong> element; <mark> is used to denote content which has a degree of relevance, while <strong> indicates spans of
text of importance. examples marking
text of interest in this first example, a <mark> element is used to mark some
text within a quote which is of particular interest to the user. <blockquote> it is a period of civil war. rebel spaceships, striking from a hidden base, have won their first victory against the evil galactic empire. during the battle, <mark>rebel spies managed to steal secre...
...And 2 more matches
CanvasRenderingContext2D.textBaseline - Web APIs
the canvasrenderingcon
text2d.
textbaseline property of the canvas 2d api specifies the current
text baseline used when drawing
text. syntax ctx.
textbaseline = "top" || "hanging" || "middle" || "alphabetic" || "ideographic" || "bottom"; options possible values: "top" the
text baseline is the top of the em square. "hanging" the
text baseline is the hanging baseline. (used by tibetan and other indic scripts.) "middle" the
text baseline is the middle of the em square. "alphabetic" the
text baseline is the normal alphabetic baseline. default value. "ideographic" the
text baseline is the ideographic baseline; this is the bottom of the body of the characters, if the main body of characters protrudes beneath the alphabetic baseline. (used by chinese, japanese, and korean scripts.) "b...
...ts.) "middle" the
text baseline is the middle of the em square. "alphabetic" the
text baseline is the normal alphabetic baseline. default value. "ideographic" the
text baseline is the ideographic baseline; this is the bottom of the body of the characters, if the main body of characters protrudes beneath the alphabetic baseline. (used by chinese, japanese, and korean scripts.) "bottom" the
text baseline is the bottom of the bounding box. this differs from the ideographic baseline in that the ideographic baseline doesn't consider descenders. the default value is "alphabetic". examples comparison of property values this example demonstrates the various
textbaseline property values. html <canvas id="canvas" width="550" height="500"></canvas> javascript const canvas = document.get...
...s differs from the ideographic baseline in that the ideographic baseline doesn't consider descenders. the default value is "alphabetic". examples comparison of property values this example demonstrates the various
textbaseline property values. ...
...es the various
textbaseline property values. html <canvas id="canvas" width="550" height="500"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); const baselines = ['top', 'hanging', 'middle', 'alphabetic', 'ideographic', 'bottom']; ctx.font = '36px serif'; ctx.strokestyle = 'red'; baselines.foreach(function (baseline, index) { ctx.
textbaseline = baseline; const y = 75 + index * 75; ctx.beginpath(); ctx.moveto(0, y + 0.5); ctx.lineto(550, y + 0.5); ctx.stroke(); ctx.fill
text('abcdefghijklmnop (' + baseline + ')', 0, y); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.
textbaseline' in that specification. living stan...
WebGL2RenderingContext.framebufferTextureLayer() - Web APIs
the webgl2renderingcon
text.framebuffer
texturelayer() method of the webgl 2 api attaches a single layer of a
texture to a framebuffer. this method is similar to webglrenderingcon
text.framebuffer
texture2d(), but only a given single layer of the
texture level is attached to the attachment point. syntax void gl.framebuffer
texturelayer(target, attachment,
texture, level, layer); parameters target a glenum specifying the binding point (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. gl.draw_framebuffer: equivalent to gl.framebuffer. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the
texture. possible value...
... (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. gl.draw_framebuffer: equivalent to gl.framebuffer. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the
texture. possible values: gl.color_attachment{0-15}: attaches the
texture to one of the framebuffer's color buffers. ...
..., alpha, depth and stencil buffers used to render an image. gl.draw_framebuffer: equivalent to gl.framebuffer. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the
texture. possible values: gl.color_attachment{0-15}: attaches the
texture to one of the framebuffer's color buffers. gl.depth_attachment: attaches the
texture to the framebuffer's depth buffer. gl.stencil_attachment: attaches the
texture to the framebuffer's stencil buffer. gl.depth_stencil_attachment: depth and stencil buffer.
texture a webgl
texture object whose image to attach. level a glint specifying the mipmap level of the
texture image to attach. layer a glint specifying the layer of the
texture image to attach. return value n...
... buffer. gl.stencil_attachment: attaches the
texture to the framebuffer's stencil buffer. gl.depth_stencil_attachment: depth and stencil buffer.
texture a webgl
texture object whose image to attach. level a glint specifying the mipmap level of the
texture image to attach. layer a glint specifying the layer of the
texture image to attach. return value none. examples gl.framebuffer
texturelayer(gl.framebuffer, gl.color_attachment0,
texture, 0, 8); specifications specification status comment webgl 2.0the definition of 'framebuffer
texturelayer' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glframebuffer
texturelayer' in that specification. standard man pa...
WebGLRenderingContext.bindTexture() - Web APIs
the webglrenderingcon
text.bind
texture() method of the webgl api binds a given webgl
texture to a target (binding point). syntax void gl.bind
texture(target,
texture); parameters target a glenum specifying the binding point (target). possible values: gl.
texture_2d: a two-dimensional
texture. gl.
texture_cube_map: a cube-mapped
texture. when using a webgl 2 con
text, the following values are available additionally: gl.
texture_3d: a three-dimensional
texture. gl.
texture_2d_array: a two-dimensional array
texture.
texture a webgl
texture object to bind. return value none. exceptions a gl.invalid_enum error is thrown if target is not gl.
texture_2d, gl.
texture_cube_map, gl.
texture_3d, or gl.
texture_2d_array. ...
...n
text, the following values are available additionally: gl.
texture_3d: a three-dimensional
texture. gl.
texture_2d_array: a two-dimensional array
texture.
texture a webgl
texture object to bind. return value none. exceptions a gl.invalid_enum error is thrown if target is not gl.
texture_2d, gl.
texture_cube_map, gl.
texture_3d, or gl.
texture_2d_array. examples binding a
texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcon
text('webgl'); var
texture = gl.create
texture(); gl.bind
texture(gl.
texture_2d,
texture); getting current bindings to check the current
texture binding, query the gl.
texture_binding_2d or gl.
texture_binding_cube_map constants. ...
..._cube_map, gl.
texture_3d, or gl.
texture_2d_array. examples binding a
texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcon
text('webgl'); var
texture = gl.create
texture(); gl.bind
texture(gl.
texture_2d,
texture); getting current bindings to check the current
texture binding, query the gl.
texture_binding_2d or gl.
texture_binding_cube_map constants. gl.getparameter(gl.
texture_binding_2d); specifications specification status comment webgl 1.0the definition of 'bind
texture' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glbind
texture' in that specification. standard man page of the (similar) opengl es 2.0 api. ...
...parameter(gl.
texture_binding_2d); specifications specification status comment webgl 1.0the definition of 'bind
texture' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glbind
texture' in that specification. standard man page of the (similar) opengl es 2.0 api. webgl 2.0the definition of 'bind
texture' in that specification. editor's draft updated definition for webgl 2. adds: gl.
texture_3d and gl.
texture_2d_array opengl es 3.0the definition of 'glbind
texture' in that specification. standard man page of the (similar) opengl es 3.0 api. ...
<bdo>: The Bidirectional Text Override element - HTML: Hypertext Markup Language
content categories flow content, phrasing content, palpable content. permitted content phrasing content. ...
... content categories flow content, phrasing content, palpable content. permitted content phrasing content. ...
...ed parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom interface htmlelement up to gecko 1.9.2 (firefox 4) inclusive, firefox implements the htmlspanelement interface for this element. attributes this element's attributes include the global attributes. ...
...ing role permitted aria roles any dom interface htmlelement up to gecko 1.9.2 (firefox 4) inclusive, firefox implements the htmlspanelement interface for this element. attributes this element's attributes include the global attributes. dir the direction in which
text should be rendered in this element's contents. possible values are: ltr: indicates that the
text should go in a left-to-right direction. rtl: indicates that the
text should go in a right-to-left direction. examples <!-- switch
text direction --> <p>this
text will go left to right.</p> <p><bdo dir="rtl">this
text will go right to left.</bdo></p> result notes the html 4 specification did not specify events for this element; they were added in xhtml. this is most likely an oversi...
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
whitespace inside this element is displayed as written. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories flow content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. ...
... must happen. in modern browser this hint is ignored and no visual effect results in its present; to achieve such an effect, use css white-space instead. example html <p>using css to change the font color is easy.</p> <pre> body { color: red; } </pre> result accessibility concerns it is important to provide an alternate description for any images or diagrams created using preformatted
text. the alternate description should clearly and concisely describe the image or diagram's content. people experiencing low vision conditions and browsing with the aid of assistive technology such as a screen reader may not understand what the preformatted
text characters are representing when they are read out in sequence. a combination of the <figure> and <figcaption> elements, supplemented by a...
... example <figure role="img" aria-labelledby="cow-caption"> <pre> ___________________________ < i'm an expert in my field. ...
... role="img" aria-labelledby="cow-caption"> <pre> ___________________________ < i'm an expert in my field. > --------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || </pre> <figcaption id="cow-caption"> a cow saying, "i'm an expert in my field." the cow is illustrated using preformatted
text characters. </figcaption> </figure> mdn understanding wcag, guideline 1.1 explanations h86: providing
text alternatives for ascii art, emoticons, and leetspeak | w3c techniques for wcag 2.0 specifications specification status comment html living standardthe definition of '<pre>' in that specification. living standard no significant change from html5 ...
WEBGL_lose_context.loseContext() - Web APIs
the webgl_lose_con
text.losecon
text() method is part of the webgl api and allows you to simulate losing the con
text of a webglrenderingcon
text con
text. it triggers the steps described in the webgl specification for handling con
text lost. the con
text will remain lost until webgl_lose_con
text.restorecon
text() is called. syntax gl.ge
textension('webgl_lose_con
text').losecon
text(); examples with this method, you can simulate the webglcon
textlost event: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcon
text('webgl'); canvas.addeventlistener('webglcon
textlost', function(e) { console.log(e); }, false); gl.ge
textension('webgl_lose_con
text').losecon
text(); // webglcon
textevent event with type "webglcon
textlost" is logged. specifications specification status ...
... recommendation initial definition. ...
...ment.getelementbyid('canvas'); var gl = canvas.getcon
text('webgl'); canvas.addeventlistener('webglcon
textlost', function(e) { console.log(e); }, false); gl.ge
textension('webgl_lose_con
text').losecon
text(); // webglcon
textevent event with type "webglcon
textlost" is logged. specifications specification status comment webgl_lose_con
textthe definition of 'webgl_lose_con
text.losecon
text' in that specification. recommendation initial definition. ...
WebGLRenderingContext.activeTexture() - Web APIs
the webglrenderingcon
text.active
texture() method of the webgl api specifies which
texture unit to make active. syntax void gl.active
texture(
texture); parameters
texture the
texture unit to make active. the value is a gl.
texturei where i is within the range from 0 to gl.max_combined_
texture_image_units - 1. return value none. exceptions if
texture is not one of gl.
texturei, where i is within the range from 0 to gl.max_combined_
texture_image_units - 1, a gl.invalid_enum error is thrown. examples the following call selects gl.
texture1 as the current
texture. subsequent calls that modify the
texture state will affect this
texture. ...
...ange from 0 to gl.max_combined_
texture_image_units - 1. return value none. exceptions if
texture is not one of gl.
texturei, where i is within the range from 0 to gl.max_combined_
texture_image_units - 1, a gl.invalid_enum error is thrown. examples the following call selects gl.
texture1 as the current
texture. subsequent calls that modify the
texture state will affect this
texture. gl.active
texture(gl.
texture1); the number of
texture units is implementation dependent, you can get this number with the help of the max_combined_
texture_image_units constant. it is, per specification, at least 8. gl.getparameter(gl.max_combined_
texture_image_units); to get the active
texture, query the active_
texture constant. ...
...at modify the
texture state will affect this
texture. gl.active
texture(gl.
texture1); the number of
texture units is implementation dependent, you can get this number with the help of the max_combined_
texture_image_units constant. it is, per specification, at least 8. gl.getparameter(gl.max_combined_
texture_image_units); to get the active
texture, query the active_
texture constant. gl.active
texture(gl.
texture0); gl.getparameter(gl.active_
texture); // returns "33984" (0x84c0, gl.
texture0 enum value) specifications specification status comment webgl 1.0the definition of 'active
texture' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glactive
texture' in that specification. standard man page of the open...
WebGLRenderingContext.isContextLost() - Web APIs
the webglrenderingcon
text.iscon
textlost() method returns a boolean indicating whether or not the webgl con
text has been lost and must be re-established before rendering can resume. syntax let islost = gl.iscon
textlost(); return value a boolean which is true if the con
text is lost, or false if not. usage notes there are several reasons why a webgl con
text may be lost, making it necessary to re-establish the con
text before resuming rendering. examples include: two or more pages are using the gpu, but together place too high a demand on the gpu, so the browser tells the two con
texts that they've lost the connection, then selects one of the two to restore access for. the user's computer has multiple graphics processors (such as a laptop with both mobile and desktop class gpus, the forme...
... together place too high a demand on the gpu, so the browser tells the two con
texts that they've lost the connection, then selects one of the two to restore access for. the user's computer has multiple graphics processors (such as a laptop with both mobile and desktop class gpus, the former used primarily when on battery power), and the user or system decides to switch gpus. in this case, all con
texts are lost, then restored after switching gpus. another page running in the user's browser performs an operation using the gpu that takes too long, causing hte browser to decide to reset the gpu in order to break the stall. this would cause every webgl con
text to be lost throughout the entire browser. the user updates their graphics driver on an operating system that allows graphics drivers to b...
...oo long, causing hte browser to decide to reset the gpu in order to break the stall. this would cause every webgl con
text to be lost throughout the entire browser. the user updates their graphics driver on an operating system that allows graphics drivers to be updated without restarting the system. examples for example, when checking for program linking success, you could also check if the con
text is not lost: gl.linkprogram(program); if (!gl.getprogramparameter(program, gl.link_status) && !gl.iscon
textlost()) { var info = gl.getprograminfolog(program); console.log('error linking program:\n' + info); } specifications specification status comment webgl 1.0the definition of 'webglrenderingcon
text.iscon
textlost' in that specification. recommendation initi...
Text.replaceWholeText() - Web APIs
the
text.replacewhole
text() method replaces the
text of the node and all of its logically adjacent
text nodes with the specified
text. the replaced nodes are removed, including the current node, unless it was the recipient of the replacement
text. a domexception with the value no_modification_err is thrown if one of the
text nodes being replaced is read only. this method returns the
text node which received the replacement
text, or null if the replacement
text is an empty string. the returned node is the current node unless the current node is read only, in which case the returned node is a newly created
text node of the same type which has been inserted at the location of the replacement. ...
...odes being replaced is read only. this method returns the
text node which received the replacement
text, or null if the replacement
text is an empty string. the returned node is the current node unless the current node is read only, in which case the returned node is a newly created
text node of the same type which has been inserted at the location of the replacement. syntax replacementnode =
textnode.replacewhole
text(content) example see the example for the
text.whole
text property. specifications specification status comment document object model (dom) level 3 core specificationthe definition of '
text' in that specification. obsolete initial definition. ...
<center>: The Centered Text element (obsolete) - HTML: Hypertext Markup Language
the obsolete html center element (<center>) is a block-level element that displays its block-level or inline contents centered horizontally within its containing element. the container is usually, but isn't required to be, <body>. this tag has been deprecated in html 4 (and xhtml 1) in favor of the css
text-align property, which can be applied to the <div> element or to an individual <p>. for centering blocks, use other css properties like margin-left and margin-right and set them to auto (or set margin to 0 auto). dom interface this element implements the htmlelement interface. implementation note: up to gecko 1.9.2 inclusive, firefox implements the htmlspanelement interface for this element. example 1 <center>this
text will be centered. <p>so will this paragraph.</p></center> ex...
...like margin-left and margin-right and set them to auto (or set margin to 0 auto). dom interface this element implements the htmlelement interface. implementation note: up to gecko 1.9.2 inclusive, firefox implements the htmlspanelement interface for this element. example 1 <center>this
text will be centered. <p>so will this paragraph.</p></center> example 2 (css alternative) <div style="
text-align:center">this
text will be centered. <p>so will this paragraph.</p></div> example 3 (css alternative) <p style="
text-align:center">this line will be centered.<br> and so will this line.</p> note applying
text-align:center to a <div> or <p> element centers the contents of those elements while leaving their overall dimensions unchanged. ...
<tt>: The Teletype Text element (obsolete) - HTML: Hypertext Markup Language
the obsolete html teletype
text element (<tt>) creates inline
text which is presented using the user agent's default monospace font face. this element was created for the purpose of rendering
text as it would be displayed on a fixed-width display such as a teletype,
text-only screen, or line printer. the terms non-proportional, monotype, and monospace are used interchangeably and have the same general meaning: they describe a typeface whose characters are all the same number of pixels wide. this element is obsolete, however. you should use the more semantically helpful <code>, <kbd>, <samp>, or <var> elements for inline
text that needs to be presented in monospace type, or the <pre> tag for content that should be presented as a separate block. if none of the semantic elements are appropr...
... permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. permitted aria roles any dom interface htmlelement attributes this element only includes the global attributes examples basic example this example uses <tt> to show
text entered into, and output by, a terminal application. <p>enter the following at the telnet command prompt: <code>set localecho</code><br /> the telnet client should display: <tt>local echo is on</tt></p> result overriding the default font you can override the browser's default font—if the browser permits you to do so, which it isn't required to do—using css: css tt { font-family: "...
CanvasRenderingContext2D.measureText() - Web APIs
the canvasrenderingcon
text2d.measure
text() method returns a
textmetrics object that contains information about the measured
text (such as its width, for example). syntax ctx.measure
text(
text); parameters
text the
text string to measure. return value a
textmetrics object. example given this <canvas> element: <canvas id="canvas"></canvas> ... you can get a
textmetrics object using the following code: const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); let
text = ctx.measure
text('hello world'); console.log(
text.width); // 56; specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.measure
text' in that specification. living standard ...
CanvasRenderingContext2D - Web APIs
the canvasrenderingcon
text2d interface, part of the canvas api, provides the 2d rendering con
text for the drawing surface of a <canvas> element. it is used for drawing shapes,
text, images, and other objects. see the interface's properties and methods in the sidebar and below. the canvas tutorial has more explanation, examples, and resources, as well. basic example to get a canvasrenderingcon
text2d instance, you must first have an html <canvas> element to work with: <canvas id="my-house" width="300" height="300"></canvas> to get the canvas' 2d rendering con
text, call getcon
text() on the <canvas> element, supplying '2d' as the argument: const canvas = document.getelementbyid('my-house'); const ctx = canvas.getcon
text('2d'); with the con
text in hand, you can draw anything you like. this...
...width ctx.linewidth = 10; // wall ctx.strokerect(75, 140, 150, 110); // door ctx.fillrect(130, 190, 40, 60); // roof ctx.beginpath(); ctx.moveto(50, 140); ctx.lineto(150, 60); ctx.lineto(250, 140); ctx.closepath(); ctx.stroke(); the resulting drawing looks like this: reference drawing rectangles there are three methods that immediately draw rectangles to the canvas. ...
...250, 140); ctx.closepath(); ctx.stroke(); the resulting drawing looks like this: reference drawing rectangles there are three methods that immediately draw rectangles to the canvas. canvasrenderingcon
text2d.clearrect() sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black, erasing any previously drawn content. canvasrenderingcon
text2d.fillrect() draws a filled rectangle at (x, y) position whose size is determined by width and height. canvasrenderingcon
text2d.strokerect() paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style. drawing
text the following methods draw
text. see also the
textmetrics object for
text properties. canvasrende...
...And 39 more matches
WebGLRenderingContext - Web APIs
the webglrenderingcon
text interface provides an interface to the opengl es 2.0 graphics rendering con
text for the drawing surface of an html <canvas> element. to get an access to a webgl con
text for 2d and/or 3d graphics rendering, call getcon
text() on a <canvas> element, supplying "webgl" as the argument: var canvas = document.getelementbyid('mycanvas'); var gl = canvas.getcon
text('webgl'); once you have the webgl rendering con
text for a canvas, you can render within it. the webgl tutorial has more information, examples, and resources on how to get started with webgl. if you require a webgl 2.0 con
text, see webgl2renderingcon
text; this supplies access to an implementation of opengl es 3.0 graphics. constants see the webgl constants page. ...
...nvas.getcon
text('webgl'); once you have the webgl rendering con
text for a canvas, you can render within it. the webgl tutorial has more information, examples, and resources on how to get started with webgl. if you require a webgl 2.0 con
text, see webgl2renderingcon
text; this supplies access to an implementation of opengl es 3.0 graphics. constants see the webgl constants page. the webgl con
text the following properties and methods provide general information and functionality to deal with the webgl con
text: webglrenderingcon
text.canvas a read-only back-reference to the htmlcanvaselement. might be null if it is not associated with a <canvas> element. ...
...access to an implementation of opengl es 3.0 graphics. constants see the webgl constants page. the webgl con
text the following properties and methods provide general information and functionality to deal with the webgl con
text: webglrenderingcon
text.canvas a read-only back-reference to the htmlcanvaselement. might be null if it is not associated with a <canvas> element. webglrenderingcon
text.commit() pushes frames back to the original htmlcanvaselement, if the con
text is not directly fixed to a specific canvas. webglrenderingcon
text.drawingbufferwidth the read-only width of the current drawing buffer. should match the width of the canvas element associated with this con
text. webglrenderingcon
text.drawingbufferheight the read-only height of the current drawing buffer. shoul...
...And 39 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
the sessions can be set using the searchsessions attribute or by calling the addsession method. ...
...the sessions can be set using the searchsessions attribute or by calling the addsession method. ...
...the sessions can be set using the searchsessions attribute or by calling the addsession method. ...
...And 37 more matches
Using textures in WebGL - Web APIs
« previousnext » now that our sample program has a rotating 3d cube, let's map a
texture onto it instead of having its faces be solid colors. this example uses the glmatrix library to perform its matrix and vertex math. you'll need to include it if you create your own project based on this code. our sample loads a copy from a cdn in our html's <head>. loading
textures the first thing to do is add code to load the
textures. in our case, we'll be using a single
texture, mapped onto all six sides of our rotating cube, but the same technique can be used for any number of
textures. ...
...clude it if you create your own project based on this code. our sample loads a copy from a cdn in our html's <head>. loading
textures the first thing to do is add code to load the
textures. in our case, we'll be using a single
texture, mapped onto all six sides of our rotating cube, but the same technique can be used for any number of
textures. note: it's important to note that the loading of
textures follows cross-domain rules; that is, you can only load
textures from sites for which your content has cors approval. see cross-domain
textures below for details. the code that loads the
texture looks like this: // // initialize a
texture and load an image. ...
...d for any number of
textures. note: it's important to note that the loading of
textures follows cross-domain rules; that is, you can only load
textures from sites for which your content has cors approval. see cross-domain
textures below for details. the code that loads the
texture looks like this: // // initialize a
texture and load an image. // when the image finished loading copy it into the
texture. // function load
texture(gl, url) { const
texture = gl.create
texture(); gl.bind
texture(gl.
texture_2d,
texture); // because images have to be download over the internet // they might take a moment until they are ready. // until then put a single pixel in the
texture so we can // use it immediately. ...
...And 37 more matches
Advanced text formatting - Learn web development
previous overview: introduction to html next there are many other elements in html for formatting
text, which we didn't get to in the html
text fundamentals article. the elements described in this article are less known, but still useful to know about (and this is still not a complete list by any means). here you'll learn about marking up quotations, description lists, computer code and other related
text, subscript and superscript, contact information, and more. prerequisites: basic html familiarity, as covered in getting started with html. html
text formatting, as covered in html
text fundamentals. ...
...the purpose of these lists is to mark up a set of items and their associated descriptions, such as terms and definitions, or questions and answers. ...
...you could try using your own terms and descriptions if you like. if you make a mistake, you can always reset it using the reset button. if you get really stuck, press the show solution button to see the answer. playable code <h2>live output</h2> <div class="output" style="min-height: 50px;"> </div> <h2>editable...
...And 36 more matches
textbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an input field where the user can enter
text. it is similar to the html input element. only one line of
text is displayed by default. the multiline attribute can be specified to display a field with multiple rows. more information is available in the xul tutorial. ...
...eference home [ examples | attributes | properties | methods | related ] an input field where the user can enter
text. it is similar to the html input element. only one line of
text is displayed by default. the multiline attribute can be specified to display a field with multiple rows. more information is available in the xul tutorial. ...
...butes cols, decimalplaces, disabled, empty
text, hidespinbuttons, increment, label, max, maxlength, min, multiline, newlines, onblur, onchange, onfocus, oninput, placeholder, preference, readonly, rows, searchbutton, size, spellcheck, tabindex, timeout, type, value, wrap, wraparound properties accessibletype, clickselectsall, decimalplaces, decimalsymbol, defaultvalue, disabled, editor, empty
text, increment, inputfield, label, max, maxlength, min, placeholder, readonly, searchbutton, selectionend, selectionstart, size, spinbuttons, tabindex,
textlength, timeout, type, value, valuenumber, wraparound methods decrease, increase, reset, select, setselectionrange style classes plain examples <vbox> <label control="your-name" value="enter your name:"/> <
textbox id="your-name" v...
...And 33 more matches
HTMLTextAreaElement - Web APIs
the html
textareaelement interface provides special properties and methods for manipulating the layout and presentation of <
textarea> elements. ...
...splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...And 33 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is created by setting the type attribute of the
textbox to autocomplete. it is used to create a
textbox with a popup containing a list of possible completions for what the user has started to type. toolkit applications (such as firefox) use a different autocomplete mechanism than the mozilla suite. the example below will create an autocomplete
textbox that will search the user's history. attributes accesskey, autocompletepopup, autocompletesearch, autocompletesearchparam, completedefaultindex, completeselectedindex,crop, disableautocomplete, disabled, disablekeynavigation, enablehistory, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputtooltipte...
...y. ...
...tes accesskey, autocompletepopup, autocompletesearch, autocompletesearchparam, completedefaultindex, completeselectedindex,crop, disableautocomplete, disabled, disablekeynavigation, enablehistory, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputtooltip
text, label, maxlength, maxrows, minresultsforpopup, nomatch, onchange, oninput, onsearchcomplete, on
textentered, on
textreverted, open, readonly,showcommentcolumn, showimagecolumn, size, tabindex, tabscrolling, timeout, type, value properties accessibletype, completedefaultindex, controller, crop, disableautocomplete, disablekeynavigation, disabled, editable, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputfield, label, maxlength, maxrows, minresultsforpopup, open, popup, popup...
...And 31 more matches
Web Video Text Tracks Format (WebVTT) - Web APIs
a webvtt file (.vtt) contains cues, which can be either a single line or multiple lines, as shown below: webvtt 00:01.000 --> 00:04.000 - never drink liquid nitrogen. 00:05.000 --> 00:09.000 - it will perforate your stomach. - you could die. ...
... a webvtt file (.vtt) contains cues, which can be either a single line or multiple lines, as shown below: webvtt 00:01.000 --> 00:04.000 - never drink liquid nitrogen. 00:05.000 --> 00:09.000 - it will perforate your stomach. - you could die. ...
... a webvtt file (.vtt) contains cues, which can be either a single line or multiple lines, as shown below: webvtt 00:01.000 --> 00:04.000 - never drink liquid nitrogen. 00:05.000 --> 00:09.000 - it will perforate your stomach. - you could die. ...
...And 30 more matches
nsITextInputProcessor
nsidomwindowutils has provided the methods which dispatched keyboard events and composition events almost directly. ...
...sn't dispatch some events if they are not necessary. this means that even when gecko changes the dom event behavior, it may not be necessary that the users of this interface need to be updated, i.e., the implementation of this class can be a cushion from the impact of gecko's change. ...
... gecko changes the dom event behavior, it may not be necessary that the users of this interface need to be updated, i.e., the implementation of this class can be a cushion from the impact of gecko's change. you can create an instance of this interface with the following code: var tip = components.classes["@mozilla.org/
text-input-processor;1"]. ...
...And 28 more matches
WebGL2RenderingContext - Web APIs
you will find this info noted on the webgl 1 reference pages. the webgl tutorial has more information, examples, and resources on how to get started with webgl. ...
...you will find this info noted on the webgl 1 reference pages. the webgl tutorial has more information, examples, and resources on how to get started with webgl. ...
...you will find this info noted on the webgl 1 reference pages. the webgl tutorial has more information, examples, and resources on how to get started with webgl. ...
...And 28 more matches
gettext
warning: this document pertains to the development of mozilla web sites and not to the development of gecko-based extensions or applications. plurals get
text lets you define and use singular and plural forms of a string. to take advantage of this functionality, you need to use a different keyword (i.e. different get
text function name) for string which are supposed to support plurals. for instance, in php the default keyword for regular messages is get
text() and _(). for messages with plural support, the default keyword is nget
text(). a definition of a string with plurals takes three arguments: the singular form of the english string, the plural form of the english string, and the number basing on which the function will return the correct (singular or plural) form of the stri...
...nd _(). for messages with plural support, the default keyword is nget
text(). a definition of a string with plurals takes three arguments: the singular form of the english string, the plural form of the english string, and the number basing on which the function will return the correct (singular or plural) form of the string. consider the following code snippet: <?php $num = 1; printf(nget
text("%d user likes this.", "%d users like this.", $num), $num); ?> depending on the value of the $num variable, this code will either use the singular ("user likes) or the plural ("users like") form of the string. notice that you need to pass the $num variable twice. first in the nget
text() call, where it will be used to determine which form of the string will be returned. in the above example, $num...
... will be used to determine which form of the string will be returned. in the above example, $num equals 1, so the string returned (for english) will be %d user likes this. the second time the $num variable is passed in the printf() call, which at this point of interpretation looks something like printf("%d user likes this.", $num);. the %d in the first argument (which is the string returned by get
text) will be replaced with the value of $num. for english, the above code will produce the following output: 1 user likes this. the string definition in the messages.po file will look like this: #: file.php:3 #, php-format msgid "%d user likes this." msgid_plural "%d users like this." msgstr[0] "" msgstr[1] "" depending on the localizer's target language and its rules for creating plural forms, ther...
...And 27 more matches
HTML elements reference - HTML: Hypertext Markup Language
of a page whose purpose is to provide navigation links, either within the current document or to other documents. common examples of navigation sections are menus, tables of contents, and indexes. <section> the html <section> element represents a standalone section — which doesn't have a more specific semantic element to represent it — contained within an html document.
text content use html
text content elements to organize blocks or sections of content placed between the opening <body> and closing </body> tags. important for accessibility and seo, these elements identify the purpose or structure of that content. element description <blockquote> the html <blockquote> element (or html block quotation element) indicates that the e...
... use html
text content elements to organize blocks or sections of content placed between the opening <body> and closing </body> tags. important for accessibility and seo, these elements identify the purpose or structure of that content. element description <blockquote> the html <blockquote> element (or html block quotation element) indicates that the enclosed
text is an extended quotation. usually, this is rendered visually by indentation (see notes for how to change it). a url for the source of the quotation may be given using the cite attribute, while a
text representation of the source can be given using the <cite> element. <dd> the html <dd> element provides the description, definition, or value for the preceding term (<dt>) in a descript...
...area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application. <ol> the html <ol> element represents an ordered list of items — typically rendered as a numbered list. <p> the html <p> element represents a paragraph. <pre> the html <pre> element represents preformatted
text which is to be presented exactly as written in the html file. <ul> the html <ul> element represents an unordered list of items, typically rendered as a bulleted list. inline
text semantics use the html inline
text semantic to define the meaning, structure, or style of a word, line, or any arbitrary piece of
text. element description <a> the h...
...And 27 more matches
TextEncoder.prototype.encodeInto() - Web APIs
the
textencoder.prototype.encodeinto() method takes a usvstring to encode and a destination uint8array to put resulting utf-8 encoded
text into, and returns a dictionary object indicating the progress of the encoding. this is potentially more performant than the older encode() method especially when the target buffer is a view into a wasm heap. syntax b1 = encoder.encodeinto(string, uint8array); parameters string is a usvstring containing the
text to encode. uint8array is a uint8array object instance to place the resulting utf-8 encoded
text into. return value a
textencoderencodeintoresult dictionary, which contains two members: read the number of utf-16 units of code from the source that has been converted over to utf-8. this may be less than string.length if uint8array di...
...itten the number of bytes modified in the destination uint8array. the bytes written are guaranteed to form complete utf-8 byte sequences. encode into a specific position encoder.encodeinto always puts its output at the start of the array. however, it is sometimes useful to make the output start at a particular index. the solution is typedarray.prototype.subarray(). observe. ...
...f the output allocation (typically within wasm heap) is expected to be short-lived, it makes sense to simply allocate s.length * 3 bytes for the output, in which case the first conversion attempt is guaranteed to convert the whole string. note that the s.length * 3 is rare because the string would have to be packed with some of the few characters that expant into 3 bytes. it is unlikely that long
text will exceed s.length * 2 bytes in length. thus, a more optimistic approach might be to allocate s.length * 2 + 5 bytes, and perform reallocation in the rare circumstance that the optimistic prediction was wrong. if the output is expected to be long-lived, it makes sense to compute minimum allocation rounduptobucketsize(s.length), the maximum allocation size s.length * 3, and to have a chosen (a...
...And 26 more matches
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
compressed image formats must be enabled by webgl extensions before using these methods. ...
... compressed image formats must be enabled by webgl extensions before using these methods. ...
... gl.compressedteximage3d(target, level, internalformat, width, height, depth, border, glsizei imagesize, glintptr offset); void gl.compressedteximage3d(target, level, internalformat, width, height, depth, border, arraybufferview srcdata, optional srcoffset, optional srclengthoverride); parameters target a glenum specifying the binding point (target) of the active
texture. possible values for compressedteximage2d: gl.
texture_2d: a two-dimensional
texture. gl.
texture_cube_map_positive_x: positive x face for a cube-mapped
texture. gl.
texture_cube_map_negative_x: negative x face for a cube-mapped
texture. gl.
texture_cube_map_positive_y: positive y face for a cube-mapped
texture. gl.
texture_cube_map_negative_y: negative y face for a cube-mapped
texture.
...And 23 more matches
text-transform - CSS: Cascading Style Sheets
the
text-transform css property specifies how to capitalize an element's
text. it can be used to make
text appear in all-uppercase or all-lowercase, or with each word capitalized. it also can help improve legibility for ruby. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the
text-transform property takes into account language-specific case mapping rules such as the following: in turkic languages, like turkish (tr), azerbaijani (az), crimean tatar (crh), volga tatar (tt), and bashkir (ba), there are two kinds of i, with and without the dot, and two case pairings: i/İ and ı/i. in german (de), the ß be...
......
...uppercase. in greek (el), vowels lose their accent when the whole word is in uppercase (ά/Α), except for the disjunctive eta (ή/Ή). also, diphthongs with an accent on the first vowel lose the accent and gain a diaeresis on the second vowel (άι/ΑΪ). in greek (el), the lowercase sigma character has two forms: σ and ς. ς is used only when sigma terminates a word. when applying
text-transform: lowercase to an uppercase sigma (Σ), the browser needs to choose the right lowercase form based on con
text. in irish (ga), certain prefixed letters remain in lowercase when the base initial is capitalized, so for example
text-transform: uppercase will change ar aon tslí to ar aon tslÍ and not, as one might expect, ar aon tslÍ (firefox only). in some cases, a hyphen is also remov...
...And 21 more matches
What text editors are available? - Learn web development
ideally, you'd try as many editors as you can and get a feel for what suits your workflow. ...
...ideally, you'd try as many editors as you can and get a feel for what suits your workflow. ...
...ideally, you'd try as many editors as you can and get a feel for what suits your workflow. ...
...And 20 more matches
IAccessibleEditableText
the substrings used with this interface are specified as follows: if startoffset is less than endoffset, the substring starts with the character at startoffset and ends with the character just before endoffset. ...
...the substrings used with this interface are specified as follows: if startoffset is less than endoffset, the substring starts with the character at startoffset and ends with the character just before endoffset. ...
...the substrings used with this interface are specified as follows: if startoffset is less than endoffset, the substring starts with the character at startoffset and ends with the character just before endoffset. ...
...And 20 more matches
WEBGL_compressed_texture_s3tc - Web APIs
ext.compressed_rgb_s3tc_dxt1_ext a dxt1-compressed image in an rgb image format. ...
... ext.compressed_rgb_s3tc_dxt1_ext a dxt1-compressed image in an rgb image format. ...
... ext.compressed_rgb_s3tc_dxt1_ext a dxt1-compressed image in an rgb image format. ...
...And 20 more matches
ContextMenus - Archive of obsolete content
con
text menus a con
text menu is a menu where the items on the menu are specific to the con
text in which the menu was opened. a typical usage is for the user to right-click on an element to display a menu of commands pertaining to what was clicked on. con
text menu events there are various ways in which a con
text menu can be opened. the most common is by clicking on an element with the right mouse button. on macintosh systems with only one mouse button, a con
text menu may be opened by either holding down the mouse button or by pressing the control key and clicking the mouse button. on windows, the con
text menu can also be opened by pressing the menu key on the keyboard (the key on many keyboards next to control with a menu image) or by pressing shift+f10. you should not assume that a ...
...th only one mouse button, a con
text menu may be opened by either holding down the mouse button or by pressing the control key and clicking the mouse button. on windows, the con
text menu can also be opened by pressing the menu key on the keyboard (the key on many keyboards next to control with a menu image) or by pressing shift+f10. you should not assume that a user has used the mouse to open a con
text menu. when using the mouse to open a con
text menu, the con
text is the element that was clicked. when using the keyboard, the con
text is the element in the window that is currently focused. although there are several ways to open a con
text menu, a single event may be used to listen for any of these situations; the 'con
textmenu' event is fired in any case. <hbox id="container" align="center" onc...
...enu. when using the mouse to open a con
text menu, the con
text is the element that was clicked. when using the keyboard, the con
text is the element in the window that is currently focused. although there are several ways to open a con
text menu, a single event may be used to listen for any of these situations; the 'con
textmenu' event is fired in any case. <hbox id="container" align="center" oncon
textmenu="..."> <label value="name:"/> <
textbox id="name"/> </hbox> in this example, an attempt to open a con
text menu anywhere inside the hbox will call the event listener attached using the oncon
textmenu attribute. as
textboxes have a con
text menu built in, the event will fire before an attempt to open the con
text menu. however, the event will also fire when the label is right-clicked for inst...
...And 19 more matches
Animating textures in WebGL - Web APIs
« previous in this demonstration, we build upon the previous example by replacing our static
textures with the frames of an mp4 video file that's playing. this is actually pretty easy to do and fun to watch, so let's get started. you can use similar code to use any sort of data (such as a <canvas>) as the source for your
textures. this example uses the glmatrix library to perform its matrix and vertex math. you'll need to include it if you create your own project based on this code. our sample loads a copy from a cdn in our html's <head>. ...
...ur
textures. this example uses the glmatrix library to perform its matrix and vertex math. you'll need to include it if you create your own project based on this code. our sample loads a copy from a cdn in our html's <head>. ...
...ment. we set it to autoplay, mute the sound, and loop the video. we then set up two events to make sure the video is playing and the time has been updated. we need both of these checks because it will produce an error if you upload a video to webgl that has no data available yet. checking for both of these events guarantees there is data available and it's safe to start uploading video to a webgl
texture. in the code above, we confirm whether we got both of those events; if so, we set a global variable, copyvideo, to true to indicate that it's safe to start copying the video to a
texture. and finally, we set the src attribute to start and call play to start loading and playing the video. the video must be loaded from a secure source in order to be used to provide
texture data to webgl. that ...
...And 19 more matches
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
ick a color. then we'll wrap things up with a brief discussion of how to use color wisely: how to select appropriate colors, keeping in mind the needs of people with differing visual capabilities. things that can have color at the element level, everything in html can have color applied to it. ...
...in terms of the kinds of things that are drawn in the elements, such as
text and borders and so forth. for each, we'll see a list of the css properties that apply color to them. at a fundamental level, the color property defines the foreground color of an html element's content and the background-color property defines the element's background color. these can be used on just about any element.
text whenever an element is rendered, these properties are used to determine the color of the
text, its background, and any decorations on the
text. color the color to use when drawing the
text and any
text decorations (such as the addition of under- or overlines, strike-through lines, and so forth. ...
...ment's background color. these can be used on just about any element.
text whenever an element is rendered, these properties are used to determine the color of the
text, its background, and any decorations on the
text. color the color to use when drawing the
text and any
text decorations (such as the addition of under- or overlines, strike-through lines, and so forth. background-color the
text's background color.
text-shadow configures a shadow effect to apply to
text. among the options for the shadow is the shadow's base color (which is then blurred and blended with the background based on the other parameters). see
text drop shadows in fundamental
text and font styling to learn more. ...
...And 19 more matches
Add a Context Menu Item - Archive of obsolete content
to follow this tutorial you'll need to have learned the basics of jpm. to add items and submenus to the firefox con
text menu, use the con
text-menu module. here's an add-on that adds a new con
text menu item. the item is displayed whenever something in the page is selected. ...
... to follow this tutorial you'll need to have learned the basics of jpm. to add items and submenus to the firefox con
text menu, use the con
text-menu module. here's an add-on that adds a new con
text menu item. the item is displayed whenever something in the page is selected. ...
... to follow this tutorial you'll need to have learned the basics of jpm. to add items and submenus to the firefox con
text menu, use the con
text-menu module. here's an add-on that adds a new con
text menu item. the item is displayed whenever something in the page is selected. ...
...And 18 more matches
nsIAccessibleText
accessible/public/nsiaccessible
text.idlscriptable please add a summary to this article. inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void addselection(in long startoffset, in long endoffset); nsiaccessible getattributerange(in long offset, out long rangestartoffset, out long rangeendoffset); obsolete since gecko 1.9.1 wchar getcharacteratoffset(in long offset); void getcharacterextents(in long offset, out long x, out long y, out long width, out long height, in unsigned long coordtype); long getoffsetatpoint(in long x, in long y, in unsigned long coordtype); void getrangeextents(in long startoffset, in long endoffset, out long x, out long y, out long width, out long height, in unsigned long coo...
... long y, out long width, out long height, in unsigned long coordtype); long getoffsetatpoint(in long x, in long y, in unsigned long coordtype); void getrangeextents(in long startoffset, in long endoffset, out long x, out long y, out long width, out long height, in unsigned long coordtype); void getselectionbounds(in long selectionnum, out long startoffset, out long endoffset); astring get
text(in long startoffset, in long endoffset); astring get
textafteroffset(in long offset, in nsaccessible
textboundary boundarytype, out long startoffset, out long endoffset); astring get
textatoffset(in long offset, in nsaccessible
textboundary boundarytype, out long startoffset, out long endoffset); nsipersistentproperties get
textattributes(in boolean includedefattrs, in long offset, out long rang...
...t
textafteroffset(in long offset, in nsaccessible
textboundary boundarytype, out long startoffset, out long endoffset); astring get
textatoffset(in long offset, in nsaccessible
textboundary boundarytype, out long startoffset, out long endoffset); nsipersistentproperties get
textattributes(in boolean includedefattrs, in long offset, out long rangestartoffset, out long rangeendoffset); astring get
textbeforeoffset(in long offset, in nsaccessible
textboundary boundarytype, out long startoffset, out long endoffset); void removeselection(in long selectionnum); void scrollsubstringto(in long startindex, in long endindex, in unsigned long scrolltype); void scrollsubstringtopoint(in long startindex, in long endindex, in unsigned long coordinatetype, in long x, in long y); void setselectionbo...
...And 18 more matches
BaseAudioContext - Web APIs
the baseaudiocon
text interface of the web audio api acts as a base definition for online and offline audio-processing graphs, as represented by audiocon
text and offlineaudiocon
text respectively. you wouldn't use baseaudiocon
text directly — you'd use its features via one of these two inheriting interfaces. a baseaudiocon
text can be a target of events, therefore it implements the eventtarget interface. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" hei...
...lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/baseaudiocon
text" target="_top"><rect x="151" y="1" width="160...
... mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/baseaudiocon
text" target="_top"><rect x="151" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="231" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">baseaudiocon
text</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties baseaudiocon
text.audioworklet read only secure con
text returns the audioworklet object, which can be used to create and manage aud...
...And 18 more matches
text-decoration - CSS: Cascading Style Sheets
the
text-decoration shorthand css property sets the appearance of decorative lines on
text. it is a shorthand for
text-decoration-line,
text-decoration-color,
text-decoration-style, and the newer
text-decoration-thickness property. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
text decorations are drawn across descendant
text elements. this means that if an element specifies a
text decoration, then a child element can't remove the decoration. ...
...ve example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
text decorations are drawn across descendant
text elements. this means that if an element specifies a
text decoration, then a child element can't remove the decoration. for example, in the markup <p>this
text has <em>some emphasized words</em> in it.</p>, the style rule p {
text-decoration: underline; } would cause the entire paragraph to be underlined. the style rule em {
text-decoration: none; } would not cause any change; the entire paragraph would still be underlined. however, the rule em {
text-decoration: overline; } would cause a second decoration to appear on "some emphasized words". constitu...
...: underline; } would cause the entire paragraph to be underlined. the style rule em {
text-decoration: none; } would not cause any change; the entire paragraph would still be underlined. however, the rule em {
text-decoration: overline; } would cause a second decoration to appear on "some emphasized words". constituent properties this property is a shorthand for the following css properties:
text-decoration-color
text-decoration-line
text-decoration-style
text-decoration-thickness syntax the
text-decoration property is specified as one or more space-separated values representing the various longhand
text-decoration properties. ...
...And 18 more matches
SVGTextContentElement - Web APIs
the svg
textcontentelement interface is implemented by elements that support rendering child
text content. it is inherited by various
text-related interfaces, such as svg
textelement, svgtspanelement, svgtrefelement, svgaltglyphelement and svg
textpathelement. ...
...splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...And 16 more matches
TextMetrics - Web APIs
the
textmetrics interface represents the dimensions of a piece of
text in the canvas; a
textmetrics() instance can be retrieved using the canvasrenderingcon
text2d.measure
text() method. properties
textmetrics.width read only is a double giving the calculated width of a segment of inline
text in css pixels. it takes into account the current font of the con
text.
textmetrics.actualboundingboxleft read only is a double giving the distance from the alignment point given by the canvasrenderingcon
text2d.
textalign property to the left side of the bounding rectangle of the given
text, in css pixels. the distance is measured parallel to the baseline. ...
...lated width of a segment of inline
text in css pixels. it takes into account the current font of the con
text.
textmetrics.actualboundingboxleft read only is a double giving the distance from the alignment point given by the canvasrenderingcon
text2d.
textalign property to the left side of the bounding rectangle of the given
text, in css pixels. the distance is measured parallel to the baseline.
textmetrics.actualboundingboxright read only is a double giving the distance from the alignment point given by the canvasrenderingcon
text2d.
textalign property to the right side of the bounding rectangle of the given
text, in css pixels. the distance is measured parallel to the baseline. ...
...the bounding rectangle of the given
text, in css pixels. the distance is measured parallel to the baseline.
textmetrics.actualboundingboxright read only is a double giving the distance from the alignment point given by the canvasrenderingcon
text2d.
textalign property to the right side of the bounding rectangle of the given
text, in css pixels. the distance is measured parallel to the baseline.
textmetrics.fontboundingboxascent read only is a double giving the distance from the horizontal line indicated by the canvasrenderingcon
text2d.
textbaseline attribute to the top of the highest bounding rectangle of all the fonts used to render the
text, in css pixels. ...
...And 16 more matches
ARIA: textbox role - Accessibility
the
textbox role is used to identify an element that allows the input of free-form
text. whenever possible, rather than using this role, use an <input> element with type="
text", for single-line input, or a <
textarea> element for multi-line input. description when an element has the
textbox role, the browser sends an accessible
textbox event to assistive technologies, which can then notify the user about it. the default is a single line input, in which return or enter submits the form; in this case, it is preferable to use an html <input> with type="
text". to create a multi-line
text box which supports line breaks, as in an html <
textarea>, set aria-multiline="true". including the html contenteditable attribute ensures the
text node is editable. ...
... which can then notify the user about it. the default is a single line input, in which return or enter submits the form; in this case, it is preferable to use an html <input> with type="
text". to create a multi-line
text box which supports line breaks, as in an html <
textarea>, set aria-multiline="true". including the html contenteditable attribute ensures the
text node is editable. ...
...turn or enter submits the form; in this case, it is preferable to use an html <input> with type="
text". to create a multi-line
text box which supports line breaks, as in an html <
textarea>, set aria-multiline="true". including the html contenteditable attribute ensures the
text node is editable. ...
...And 16 more matches
text-align - CSS: Cascading Style Sheets
the
text-align css property sets the horizontal alignment of a block element or table-cell box. this means it works like vertical-align but in the horizontal direction. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...y sets the horizontal alignment of a block element or table-cell box. this means it works like vertical-align but in the horizontal direction. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...tal alignment of a block element or table-cell box. this means it works like vertical-align but in the horizontal direction. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...And 16 more matches
HTML attribute reference - HTML: Hypertext Markup Language
e uri of a program that processes the information submitted via the form. align <applet>, <caption>, <col>, <colgroup>, <hr>, <iframe>, <img>, <table>, <tbody>, <td>, <tfoot> , <th>, <thead>, <tr> specifies the horizontal alignment of the element. allow <iframe> specifies a feature-policy for the iframe. alt <applet>, <area>, <img>, <input> alternative
text in case an image can't be displayed. async <script> executes the script asynchronously. autocapitalize global attribute sets whether input is automatically capitalized when entered by user autocomplete <form>, <input>, <select>, <
textarea> indicates whether controls in this form can by default have their values automatically completed by the browser. ...
... autoplay <audio>, <video> the audio or video should play as soon as possible. ...
...with css to style elements with common properties. code <applet> specifies the url of the applet's class file to be loaded and executed. codebase <applet> this attribute gives the absolute or relative url of the directory where applets' .class files referenced by the code attribute are stored. color <basefont>, <font>, <hr> this attribute sets the
text color using either a named color or a color specified in the hexadecimal #rrggbb format. note: this is a legacy attribute. please use the css color property instead. cols <
textarea> defines the number of columns in a
textarea. colspan <td>, <th> the colspan attribute defines the number of columns a cell should span. content <meta> a ...
...And 16 more matches
<input type="email"> - HTML: Hypertext Markup Language
nsure that it's either empty or a properly-formatted e-mail address (or list of addresses) before the form can be submitted. the :valid and :invalid css pseudo-classes are automatically applied as appropriate to visually denote whether the current value of the field is a valid e-mail address or not. on browsers that don't support inputs of type email, a email input falls back to being a standard
text input. value a domstring representing an e-mail address, or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, multiple, name,pattern, placeholder, readonly, required, size, and type idl attributes list and value methods select() value the <input> element's value attribute contain...
... value. maxlength the maximum number of characters (as utf-16 code units) the user can enter into the email input. this must be an integer value 0 or higher. if no maxlength is specified, or an invalid value is specified, the email input has no maximum length. this value must also be greater than or equal to the value of minlength. the input will fail constraint validation if the length of the
text value of the field is greater than maxlength utf-16 code units long. constraint validation is only applied when the value is changed by the user. minlength the minimum number of characters (as utf-16 code units) the user can enter into the email input. this must be an non-negative integer value smaller than or equal to the value specified by maxlength. if no minlength is specified, or an invali...
... changed by the user. minlength the minimum number of characters (as utf-16 code units) the user can enter into the email input. this must be an non-negative integer value smaller than or equal to the value specified by maxlength. if no minlength is specified, or an invalid value is specified, the email input has no minimum length. the input will fail constraint validation if the length of the
text entered into the field is fewer than minlength utf-16 code units long. constraint validation is only applied when the value is changed by the user. multiple a boolean attribute which, if present, indicates that the user can enter a list of multiple e-mail addresses, separated by commas and, optionally, whitespace characters. see allowing multiple e-mail addresses for an example, or html attrib...
...And 16 more matches
TextRange - Web APIs
ie only this property is ie specific. although it is well supported by ie, most other browsers no longer support this property. this property should only be used as one of the solutions when you need to be compatible with lower versions of ie, rather than relying on it completely in cross browser scripts. a
textrange object represents a fragment of
text in a document, similar to the standard defined range interface. this object is used to represent a specific piece of
text in the document. for example, when you hold down the mouse to select the content on the page, you create a typical
textrange. it is implemented in ie, then a
textrange object can be created by element.create
textrange() or document.selection.createrange(). note that this interface is not supported in non ie bro...
...e of
text in the document. for example, when you hold down the mouse to select the content on the page, you create a typical
textrange. it is implemented in ie, then a
textrange object can be created by element.create
textrange() or document.selection.createrange(). note that this interface is not supported in non ie browsers. alternative selection and range interfaces can be used. properties
textrange.boundingheightread only returns the height of the rectangle bound to the
textrange object.
textrange.boundingleftread only returns the distance between the left edge of the rectangle that binds the
textrange object and the left edge that completely contains the
textrange object. ...
...upported in non ie browsers. alternative selection and range interfaces can be used. properties
textrange.boundingheightread only returns the height of the rectangle bound to the
textrange object.
textrange.boundingleftread only returns the distance between the left edge of the rectangle that binds the
textrange object and the left edge that completely contains the
textrange object.
textrange.boundingtopread only returns the distance between the top edge of the rectangle that binds the
textrange object and the top edge that completely contains the
textrange object.
textrange.boundingwidthread only returns the width of the rectangle bound to the
textrange object. ...
...And 14 more matches
Compressed texture formats - Web APIs
the webgl api provides methods to use compressed
texture formats. these are useful to increase
texture detail while limiting the additional video memory necessary. by default, no compressed formats are available: a corresponding compressed
texture format extension must first be enabled. usage unless otherwise specified, this article applies to both webgl 1 and 2 con
texts. if supported,
textures can be stored in a compressed format in video memory. this allows for additional detail while limiting the added video memory necessary.
textures are uncompressed on the fly when being accessed by a shader. note that this advantage doesn't translate to network bandwidth: while the formats are better than uncompressed data, they are in general far worse than standard image formats such as png ...
...compressed format in video memory. this allows for additional detail while limiting the added video memory necessary.
textures are uncompressed on the fly when being accessed by a shader. note that this advantage doesn't translate to network bandwidth: while the formats are better than uncompressed data, they are in general far worse than standard image formats such as png and jpg. as compressed
textures require hardware support, therefore no specific formats are required by webgl; instead, a con
text can make different formats available, depending on hardware support. this site shows which formats are supported in the used browser. usage of compressed formats first requires activating the respective extension with webglrenderingcon
text.ge
textension(). if supported, it will return an extensio...
...ats available, depending on hardware support. this site shows which formats are supported in the used browser. usage of compressed formats first requires activating the respective extension with webglrenderingcon
text.ge
textension(). if supported, it will return an extension object with constants for the added formats and the formats will also be returned by calls to gl.getparameter(gl.compressed_
texture_formats). (e.g. ext.compressed_rgba_s3tc_dxt1_ext for the webgl_compressed_
texture_s3tc extension.) these can then be used with compressedteximage[23]d or compressedtexsubimage[23]d instead of teximage2d calls. note that webgl makes no functionality available to compress or decompress
textures: they must already be in a compressed format and can then be directly uploaded to video memory. all...
...And 14 more matches
Text labels and names - Accessibility
there are many situations in which a control, dialog, or other website feature should be given a descriptive name or label to allow users of assistive technologies to understand what its purpose is and to be able to understand and operate it correctly. there are a number of different types of problems in this category, found in different con
texts, and each has its own solution. ...
...as its own solution. the different problems and solutions are discussed in the sections below. use alt attribute to label area elements that have the href attribute in image maps, give each <area> element an alt attribute containing a name that describes what resources the areas links to. failure to do so makes an image map hard to use for users of assistive technology — they need alternative
text to be able to understand the purpose of an image. examples the following example show a simple image map (taken from h24: providing
text alternatives for the area elements of image maps): <img src="welcome.gif" usemap="#map1" alt="areas in the library. select an area for more information on that area." /> <map id="map1" name="map1"> <area shape="rect" coords="0,0,30,30" href="referen...
...alt="areas in the library. select an area for more information on that area." /> <map id="map1" name="map1"> <area shape="rect" coords="0,0,30,30" href="reference.html" alt="reference" /> <area shape="rect" coords="34,34,100,100" href="media.html" alt="audio visual lab" /> </map> see the <area> element reference page for a live interactive example. see also <area> h24: providing
text alternatives for the area elements of image maps dialogs should be labeled for any container whose contents act as a dialog box (for example, a modal dialog asking the user to make a choice or respond to an action being taken), give it a descriptive label or name, so that assistive technology users can easily discover what its purpose is. a dialog box is generally denoted by an aria role="dia...
...And 14 more matches
<input type="url"> - HTML: Hypertext Markup Language
the input value is automatically validated to ensure that it's either empty or a properly-formatted url before the form can be submitted. the :valid and :invalid css pseudo-classes are automatically applied as appropriate to visually denote whether the current value of the field is a valid url or not. on browsers that don't support inputs of type url, a url input falls back to being a standard
text input. value a domstring representing a url, or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, required and size idl attributes list, value, selectionend, selectiondirection methods select(), setrange
text() and setselectionrange(). value the <in...
...rent value. maxlength the maximum number of characters (as utf-16 code units) the user can enter into the url input. this must be an integer value 0 or higher. if no maxlength is specified, or an invalid value is specified, the url input has no maximum length. this value must also be greater than or equal to the value of minlength. the input will fail constraint validation if the length of the
text value of the field is greater than maxlength utf-16 code units long. constraint validation is only applied when the value is changed by the user. minlength the minimum number of characters (as utf-16 code units) the user can enter into the url input. this must be an non-negative integer value smaller than or equal to the value specified by maxlength. if no minlength is specified, or an invalid ...
...e is changed by the user. minlength the minimum number of characters (as utf-16 code units) the user can enter into the url input. this must be an non-negative integer value smaller than or equal to the value specified by maxlength. if no minlength is specified, or an invalid value is specified, the url input has no minimum length. the input will fail constraint validation if the length of the
text entered into the field is fewer than minlength utf-16 code units long. constraint validation is only applied when the value is changed by the user. pattern the pattern attribute, when specified, is a regular expression that the input's value must match in order for the value to pass constraint validation. it must be a valid javascript regular expression, as used by the regexp type, and as docum...
...And 14 more matches
EXT_texture_compression_bptc - Web APIs
ext.compressed_rgba_bptc_unorm_ext compresses 8-bit fixed-point data. ...
... ext.compressed_rgba_bptc_unorm_ext compresses 8-bit fixed-point data. ...
... ext.compressed_rgba_bptc_unorm_ext compresses 8-bit fixed-point data. ...
...And 13 more matches
OfflineAudioContext - Web APIs
the offlineaudiocon
text interface is an audiocon
text interface representing an audio-processing graph built from linked together audionodes. in contrast with a standard audiocon
text, an offlineaudiocon
text doesn't render the audio to the device hardware; instead, it generates it, as fast as it can, and outputs the result to an audiobuffer. ...
...lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audiocon
text" target="_top"><rect x="151" y="1" width="120" he...
...,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audiocon
text" target="_top"><rect x="151" y="1" width="120" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="211" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">audiocon
text</
text></a><polyline points="271,25 281,20 281,30 271,25" stroke="#d4dde4" fill="none"/><line x1="281" y1="25" x2="311" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/offlineaudiocon
text" target="_top"><rect x="311" y="1" width...
...And 13 more matches
WEBGL_compressed_texture_astc - Web APIs
methods this extension exposes one new methods. ext.getsupportedprofiles() returns an array of strings containing the names of the astc profiles supported by the implementation. ...
... methods this extension exposes one new methods. ext.getsupportedprofiles() returns an array of strings containing the names of the astc profiles supported by the implementation. ...
... methods this extension exposes one new methods. ext.getsupportedprofiles() returns an array of strings containing the names of the astc profiles supported by the implementation. ...
...And 13 more matches
WebGLRenderingContext.getParameter() - Web APIs
the webglrenderingcon
text.getparameter() method of the webgl api returns a value for the passed parameter name. syntax any gl.getparameter(pname); parameters pname a glenum specifying which parameter value to return. see below for possible values. return value depends on the parameter. parameter names webgl 1 you can query the following pname parameters when using a webglrenderingcon
text. ...
... for the passed parameter name. syntax any gl.getparameter(pname); parameters pname a glenum specifying which parameter value to return. see below for possible values. return value depends on the parameter. parameter names webgl 1 you can query the following pname parameters when using a webglrenderingcon
text. ...
...l.blend_equation glenum gl.blend_equation_alpha glenum gl.blend_equation_rgb glenum gl.blend_src_alpha glenum gl.blend_src_rgb glenum gl.blue_bits glint gl.color_clear_value float32array (with 4 values) gl.color_writemask sequence<glboolean> (with 4 values) gl.compressed_
texture_formats uint32array returns the compressed
texture formats. when using the webgl_compressed_
texture_s3tc extension: ext.compressed_rgb_s3tc_dxt1_ext ext.compressed_rgba_s3tc_dxt1_ext ext.compressed_rgba_s3tc_dxt3_ext ext.compressed_rgba_s3tc_dxt5_ext when using the webgl_compressed_
texture_s3tc_srgb extension: ext.compressed_srgb_s3t...
...And 13 more matches
:host-context() - CSS: Cascading Style Sheets
in other words, this allows a custom element, or anything within that custom element's shadow dom, to apply different styles based on its position within the outer dom or classes/attributes applied to ancestor elements. one typical use of this is with a descendant selector expression — for example h1 — to select only instances of the custom element that are inside an <h1>. ...
...on its position within the outer dom or classes/attributes applied to ancestor elements. one typical use of this is with a descendant selector expression — for example h1 — to select only instances of the custom element that are inside an <h1>. ...
...t that are inside an <h1>. another typical use would be to allow inner elements to react to classes or attributes on any anscestor elements - for example, applying a different
text color when a .dark-theme class is applied to <body>. note: this has no effect when used outside a shadow dom. ...
...And 13 more matches
text-size-adjust - CSS: Cascading Style Sheets
instead of laying out pages at the width of the device screen, they lay them out using a viewport that is much wider, usually 800 or 1000 pixels. ...
...instead of laying out pages at the width of the device screen, they lay them out using a viewport that is much wider, usually 800 or 1000 pixels. ...
...instead of laying out pages at the width of the device screen, they lay them out using a viewport that is much wider, usually 800 or 1000 pixels. ...
...And 13 more matches
Rich-Text Editing in Mozilla - Developer guides
note: this document is out-of-date; you are advised to consult the more up-to-date document available at making content editable. mozilla 1.3 introduces an implementation of microsoft® internet explorer's designmode feature. the rich-
text editing support in mozilla 1.3 supports the designmode feature which turns html documents into rich-
text editors. starting in firefox 3, mozilla also supports internet explorer's contenteditable attribute which allows any element to become editable or non-editable (the latter for when preventing change to fixed elements in an editable environment). setting up rich-
text editing rich-
text editing is initialized by setting the designmode property of a document to "on", such as the document inside an iframe. once designmode has been set to "on", the...
...the most basic keyboard commands such as copy and paste are available, all others need to be implemented by the website. ...
...the most basic keyboard commands such as copy and paste are available, all others need to be implemented by the website. similarly, setting contenteditable to "true" allows you to make individual elements of a document editable. ...
...And 13 more matches
textLength - SVG: Scalable Vector Graphics
the
textlength attribute, available on svg <
text> and <tspan> elements, lets you specify the width of the space into which the
text will draw. the user agent will ensure that the
text does not extend farther than that distance, using the method or methods specified by the lengthadjust attribute. by default, only the spacing between characters is adjusted, but the glyph size can also be adjusted if you change lengthadjust. by using
textlength, you can ensure that your svg
text displays at the same width regardless of conditions including web fonts failing to load (or not having loaded yet). ...
...thod or methods specified by the lengthadjust attribute. by default, only the spacing between characters is adjusted, but the glyph size can also be adjusted if you change lengthadjust. by using
textlength, you can ensure that your svg
text displays at the same width regardless of conditions including web fonts failing to load (or not having loaded yet). ...
...methods specified by the lengthadjust attribute. by default, only the spacing between characters is adjusted, but the glyph size can also be adjusted if you change lengthadjust. by using
textlength, you can ensure that your svg
text displays at the same width regardless of conditions including web fonts failing to load (or not having loaded yet). ...
...And 13 more matches
JS_PreventExtensions
obj js::handleobject object to be made non-extensible. result js::objectopresult & (out parameter) receives the result of the operation. ...
... obj js::handleobject object to be made non-extensible. result js::objectopresult & (out parameter) receives the result of the operation. ...
... obj js::handleobject object to be made non-extensible. result js::objectopresult & (out parameter) receives the result of the operation. ...
...And 12 more matches
WebGLRenderingContext.texImage2D() - Web APIs
the webglrenderingcon
text.teximage2d() method of the webgl api specifies a two-dimensional
texture image. syntax // webgl1: void gl.teximage2d(target, level, internalformat, width, height, border, format, type, arraybufferview? pixels); void gl.teximage2d(target, level, internalformat, format, type, imagedata? pixels); void gl.teximage2d(target, level, internalformat, format, type, htmlimageelement? pixels); void gl.teximage2d(target, level, internalformat, format, type, htmlcanvaselement? pixels); void gl.teximage2d(target, level, internalformat, format, type, htmlvideoelement? pixels); void gl.teximage2d(target, level, internalformat, format, type, imagebitmap? pixels); // webgl2: void gl.teximage2d(target, level, internalformat, width, height, border, format, type, glintptr offset); voi...
...et, level, internalformat, width, height, border, format, type, imagebitmap source); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, imagedata source); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, arraybufferview srcdata, srcoffset); parameters target a glenum specifying the binding point (target) of the active
texture. possible values: gl.
texture_2d: a two-dimensional
texture. gl.
texture_cube_map_positive_x: positive x face for a cube-mapped
texture. gl.
texture_cube_map_negative_x: negative x face for a cube-mapped
texture. gl.
texture_cube_map_positive_y: positive y face for a cube-mapped
texture. gl.
texture_cube_map_negative_y: negative y face for a cube-mapped
texture. gl.
texture_cube_map_po...
...wo-dimensional
texture. gl.
texture_cube_map_positive_x: positive x face for a cube-mapped
texture. gl.
texture_cube_map_negative_x: negative x face for a cube-mapped
texture. gl.
texture_cube_map_positive_y: positive y face for a cube-mapped
texture. gl.
texture_cube_map_negative_y: negative y face for a cube-mapped
texture. gl.
texture_cube_map_positive_z: positive z face for a cube-mapped
texture. gl.
texture_cube_map_negative_z: negative z face for a cube-mapped
texture. level a glint specifying the level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. internalformat a glenum specifying the color components in the
texture. possible values in both webgl1 and webgl2 format type channels bytes per pixel ...
...And 12 more matches
text-decoration-thickness - CSS: Cascading Style Sheets
from-font if the font file includes information about a preferred thickness, use that value. ...
... from-font if the font file includes information about a preferred thickness, use that value. ...
... from-font if the font file includes information about a preferred thickness, use that value. ...
...And 12 more matches
<input type="image"> - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. value none — the value attribute should not be specified. events none. supported common attributes alt, src, width, height, formaction, formenctype, formmethod, formnovalidate, formtarget idl attributes none. methods none. ...
...t be shown formaction the url to which to submit the data formenctype the encoding method to use when submitting the form data formmethod the http method to use when submitting the form formnovalidate a boolean which, if present, indicates that the form shouldn't be validated before submission formtarget a string indicating a browsing con
text from where to load the results of submitting the form height the height, in css pixels, at which to draw the image src the url from which to load the image width the width, in css pixels, at which to draw the image alt the alt attribute provides an alternate string to use as the button's label if the image cannot be shown (due to error, a user agent tha...
...lt attribute provides an alternate string to use as the button's label if the image cannot be shown (due to error, a user agent that cannot or is configured not to show images, or if the user is using a screen reading device). if provided, it must be a non-empty string appropriate as a label for the button. for example, if you have a graphical button that shows an image with an icon and/or image
text "login now", you should also set the alt attribute to something like login now. important: while the alt attribute is technically optional, you should always include one to maximize the usability of your content. functionally, the <input type="image"> alt attribute works just like the alt attribute on <img> elements. formaction a string indicating the url to which to submit the data. this t...
...And 12 more matches
Texts - SVG: Scalable Vector Graphics
« previousnext » when talking about
text in svg we have to differentiate two almost completely separate topics. the one is the inclusion and display of
text in an image, and the other are svg fonts. the latter may be described in a later section of the tutorial, while we will focus completely on the first part: bringing
text into an svg image. basics we have seen in the introducing example, that the
text element can be used to put arbitrary
text in svg documents: <
text x="10" y="10">hello world!</
text> the x and y attributes determine, where in the viewport the
text will appear. the attribute
text-anchor, which can have the values "start", "middle", "end" or "inherit", decides in which direction the
text flows from this point. the attribute dominant-baseline decides the ...
... arbitrary
text in svg documents: <
text x="10" y="10">hello world!</
text> the x and y attributes determine, where in the viewport the
text will appear. the attribute
text-anchor, which can have the values "start", "middle", "end" or "inherit", decides in which direction the
text flows from this point. the attribute dominant-baseline decides the vertical alignment. like with the shape elements
text can be colorized with the fill attribute and given a stroke with the stroke attribute. both may also refer to gradients or patterns, which makes simple coloring
text in svg very powerful compared to css 2.1. setting font properties an essential part of a
text is the font in which it is displayed. svg offers a set of attributes, many similar to their css counterparts, to enable font selection. e...
... properties an essential part of a
text is the font in which it is displayed. svg offers a set of attributes, many similar to their css counterparts, to enable font selection. each of the following properties can be set as an attribute or via a css declaration: font-family, font-style, font-weight, font-variant, font-stretch, font-size, font-size-adjust, kerning, letter-spacing, word-spacing and
text-decoration. other
text-related elements tspan this element is used to mark up sub-portions of a larger
text. it must be a child of a
text element or another tspan element. a typical usecase is to paint one word of a sentence bold red. ...
...And 12 more matches
Understanding WebAssembly text format - WebAssembly
to enable webassembly to be read and edited by humans, there is a
textual representation of the wasm binary format. this is an intermediate form designed to be exposed in
text editors, browser developer tools, etc. this article explains how that
text format works, in terms of the raw syntax, and how it is related to the underlying bytecode it represents — and the wrapper objects representing wasm in javascript. note: this is potentially overkill if you are a web developer who just wants to load a wasm module into a page and use it in your code (see using the webassembly javascript api), but it is more useful if for example, you want to write wasm modules to optimize the performance of your javascript library, or build your own webassembly compiler. s-expressions in both the binary and ...
...n javascript. note: this is potentially overkill if you are a web developer who just wants to load a wasm module into a page and use it in your code (see using the webassembly javascript api), but it is more useful if for example, you want to write wasm modules to optimize the performance of your javascript library, or build your own webassembly compiler. s-expressions in both the binary and
textual formats, the fundamental unit of code in webassembly is a module. in the
text format, a module is represented as one big s-expression. s-expressions are a very old and very simple
textual format for representing trees, and thus we can think of a module as a tree of nodes that describe the module’s structure and its code. unlike the abstract syntax tree of a programming language, though, w...
...esents a tree with the root node “module” and two child nodes, a "memory" node with the attribute "1" and a "func" node. we’ll see shortly what these nodes actually mean. the simplest module let's start with the simplest, shortest possible wasm module. (module) this module is totally empty, but is still a valid module. if we convert our module to binary now (see converting webassembly
text format to wasm), we’ll see just the 8 byte module header described in the binary format: 0000000: 0061 736d ; wasm_binary_magic 0000004: 0100 0000 ; wasm_binary_version adding functionality to your module ok, that’s not very interesting, let’s add some executable code to this module. all code in a webassembly module is grouped into functions, which have the fol...
...And 12 more matches
HTMLElement.innerText - Web APIs
the inner
text property of the htmlelement interface represents the "rendered"
text content of a node and its descendants. as a getter, it approximates the
text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard. note: inner
text is easily confused with node.
textcontent, but there are important differences between the two. basically, inner
text is aware of the rendered appearance of
text, while
textcontent is not. syntax const rendered
text = htmlelement.inner
text htmlelement.inner
text = string value a domstring representing the rendered
text content of an element. ...
... two. basically, inner
text is aware of the rendered appearance of
text, while
textcontent is not. syntax const rendered
text = htmlelement.inner
text htmlelement.inner
text = string value a domstring representing the rendered
text content of an element. if the element itself is not being rendered (e.g detached from the document or is hidden from view), the returned value is the same as the node.
textcontent property. example this example compares inner
text with node.
textcontent. note how inner
text is aware of things like <br> elements, and ignores hidden elements. ...
...f the element itself is not being rendered (e.g detached from the document or is hidden from view), the returned value is the same as the node.
textcontent property. example this example compares inner
text with node.
textcontent. note how inner
text is aware of things like <br> elements, and ignores hidden elements. ...
...And 11 more matches
text-decoration-color - CSS: Cascading Style Sheets
the
text-decoration-color css property sets the color of decorations added to
text by
text-decoration-line. the color applies to decorations, such as underlines, overlines, strikethroughs, and wavy lines like those used to mark misspellings, in the scope of the property's value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. css does not provide a direct mechanism for specifying a unique color for each line type. ...
...ample is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. css does not provide a direct mechanism for specifying a unique color for each line type. ...
...to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. css does not provide a direct mechanism for specifying a unique color for each line type. this effect can nevertheless be achieved by nesting elements, applying a different line type to each element (with the
text-decoration-line property), and specifying the line color (with
text-decoration-color) on a per-element basis. ...
...And 11 more matches
text-decoration-style - CSS: Cascading Style Sheets
as browsers can disable styling in some cases, the semantic meaning won't disappear in such a situation. ...
...as browsers can disable styling in some cases, the semantic meaning won't disappear in such a situation. ...
... style applies to all lines that are set with
text-decoration-line. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. if the specified decoration has a specific semantic meaning, like a line-through line meaning that some
text has been deleted, authors are encouraged to denote this meaning using an html tag, like <del> or <s>. as browsers can disable styling in some cases, the semantic meaning won't disappear in such a situation. when setting multiple line-decoration properties at once, it may be more convenient to use the
text-decoration shorthand property instead. ...
...And 11 more matches
text-emphasis-color - CSS: Cascading Style Sheets
if no color is present, it defaults to currentcolor. ...
...if no color is present, it defaults to currentcolor. ...
...if no color is present, it defaults to currentcolor. ...
...And 11 more matches
<tbody>: The Table Body element - HTML: Hypertext Markup Language
ributes this element includes the global attributes. deprecated attributes align this enumerated attribute specifies how horizontal alignment of each cell content will be handled. ...
...ign this enumerated attribute specifies how horizontal alignment of each cell content will be handled. ...
... bgcolor the background color of the table. ...
...And 11 more matches
JS_SetContextCallback
specifies a callback function that is automatically called whenever a jscon
text is created or destroyed. syntax void js_setcon
textcallback(jsruntime *rt, jscon
textcallback cxcallback, void *data); name type description rt jsruntime * pointer to a js runtime. cxcallback jscon
textcallback pointer to the callback function, described below. data void * any data passed as 3rd argument to the callback function. ...
...(jsruntime *rt, jscon
textcallback cxcallback, void *data); name type description rt jsruntime * pointer to a js runtime. cxcallback jscon
textcallback pointer to the callback function, described below. data void * any data passed as 3rd argument to the callback function. added in spidermonkey 31 callback syntax typedef bool (* jscon
textcallback)(jscon
text *cx, unsigned con
textop, void *data); name type description cx jscon
text * pointer to a jscon
text which the callback may use to call into jsapi functions. this is the con
text which was just created, or is about to be destroyed. ...
...tion. added in spidermonkey 31 callback syntax typedef bool (* jscon
textcallback)(jscon
text *cx, unsigned con
textop, void *data); name type description cx jscon
text * pointer to a jscon
text which the callback may use to call into jsapi functions. this is the con
text which was just created, or is about to be destroyed. for example, the callback my call js_getcon
textprivate(cx) in order to free up resources previously allocated by js_setcon
textprivate. con
textop unsigned see jscon
textop. for future compatibility the callback must do nothing and return true if any other value is passed. data void * data specified in js_setcon
textcallback. ...
...And 10 more matches
SVGTextPathElement - Web APIs
the svg
textpathelement interface corresponds to the <
textpath> element. ...
...ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...And 10 more matches
text-overflow - CSS: Cascading Style Sheets
the
text-overflow css property sets how hidden overflow content is signaled to users. it can be clipped, display an ellipsis ('…'), or display a custom string. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the
text-overflow property doesn't force an overflow to occur. to make
text overflow its container you have to set other css properties: overflow and white-space. for example: overflow: hidden; white-space: nowrap; the
text-overflow property only affects content that is overflowing a block container element in its inline progression direction (not
text overflowing at the bottom of a box, for example). synta...
...operty doesn't force an overflow to occur. to make
text overflow its container you have to set other css properties: overflow and white-space. for example: overflow: hidden; white-space: nowrap; the
text-overflow property only affects content that is overflowing a block container element in its inline progression direction (not
text overflowing at the bottom of a box, for example). syntax the
text-overflow property may be specified using one or two values. if one value is given, it specifies overflow behavior for the end of the line (the right end for left-to-right
text, the left end for right-to-left
text). if two values are given, the first specifies overflow behavior for the left end of the line, and the second specifies it for the right end of the line. each value is specified as one ...
... specifies overflow behavior for the left end of the line, and the second specifies it for the right end of the line. each value is specified as one of: one of the keyword values: clip, ellipsis, fade the function fade(), which is passed a <length> or a <percentage> to control the fade distance a <string>. values clip the default for this property. this keyword value will truncate the
text at the limit of the content area, therefore the truncation can happen in the middle of a character. to clip at the transition between characters you can specify
text-overflow as an empty string, if that is supported in your target browsers:
text-overflow: '';. ellipsis this keyword value will display an ellipsis ('…', u+2026 horizontal ellipsis) to represent clipped
text. the ellipsis is disp...
...And 10 more matches
<input type="search"> - HTML: Hypertext Markup Language
<input> elements of type search are
text fields designed for the user to enter search queries into. these are functionally identical to
text inputs, but may be styled differently by the user agent. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. value a domstring representing the value contained in the search field. events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, required, size. idl attributes value methods select(), setrange
text(), setselectionrange(). value the value attribute co...
... methods select(), setrange
text(), setselectionrange(). value the value attribute contains a domstring representing the value contained in the search field. you can retrieve this using the htmlinputelement.value property in javascript. searchterms = mysearch.value; if no validation constraints are in place for the input (see validation for more details), the value can be any
text string or an empty string (""). additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, search field inputs support the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum number of cha...
...alue. maxlength the maximum number of characters (as utf-16 code units) the user can enter into the search field. this must be an integer value 0 or higher. if no maxlength is specified, or an invalid value is specified, the search field has no maximum length. this value must also be greater than or equal to the value of minlength. the input will fail constraint validation if the length of the
text entered into the field is greater than maxlength utf-16 code units long. minlength the minimum number of characters (as utf-16 code units) the user can enter into the search field. this must be a non-negative integer value smaller than or equal to the value specified by maxlength. if no minlength is specified, or an invalid value is specified, the search input has no minimum length. the search...
...And 10 more matches
<menu> - HTML: Hypertext Markup Language
the html <menu> element represents a group of commands that a user can perform or activate. this includes both list menus, which might appear across the top of a screen, as well as con
text menus, such as those that might appear underneath a button after it has been clicked. content categories flow content. if the element's children include at least one <li> element: palpable content. permitted content if the element is in the list menu state: flow content, or alternatively, zero or more occurrences of <li>, <script>, and <template>. ...
...s been clicked. content categories flow content. if the element's children include at least one <li> element: palpable content. permitted content if the element is in the list menu state: flow content, or alternatively, zero or more occurrences of <li>, <script>, and <template>. (list menu is the default state, unless the parent element is a <menu> in the con
text menu state.) if the element is in the con
text menu state: zero or more occurrences, in any order, of <menu> (con
text menu state only), <menuitem>, <hr>, <script>, and <template>. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. implicit aria role list permitted aria rol...
... listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar or tree dom interface htmlmenuelement attributes this element includes the global attributes. label the name of the menu as shown to the user. used within nested menus, to provide a label through which the submenu can be accessed. must only be specified when the parent element is a <menu> in the con
text menu state. type this attribute indicates the kind of menu being declared, and can be one of two values. con
text : indicates the popup menu state, which represents a group of commands activated through another element. this might be as a button menu referenced by a menu attribute of a <button> element, or as con
text menu for an element with a con
textmenu attribute. this value is the defau...
...And 10 more matches
text-anchor - SVG: Scalable Vector Graphics
the
text-anchor attribute is used to align (start-, middle- or end-alignment) a string of pre-formatted
text or auto-wrapped
text where the wrapping area is determined from the inline-size property relative to a given point. it is not applicable to other types of auto-wrapped
text. for those cases you should use
text-align. for multi-line
text, the alignment takes place for each line. the
text-anchor attribute is applied to each individual
text chunk within a given <
text> element. ...
...e-formatted
text or auto-wrapped
text where the wrapping area is determined from the inline-size property relative to a given point. it is not applicable to other types of auto-wrapped
text. for those cases you should use
text-align. for multi-line
text, the alignment takes place for each line. the
text-anchor attribute is applied to each individual
text chunk within a given <
text> element. ...
...ext where the wrapping area is determined from the inline-size property relative to a given point. it is not applicable to other types of auto-wrapped
text. for those cases you should use
text-align. for multi-line
text, the alignment takes place for each line. the
text-anchor attribute is applied to each individual
text chunk within a given <
text> element. each
text chunk has an initial current
text position, which represents the point in the user coordinate system resulting from (depending on con
text) application of the x and y attributes on the <
text> element, any x or y attribute values on a <tspan>, <tref> or <altglyph> element assigned explicitly to the first rendered character in a
text chunk, or determination of the initial current
text position for a <
textpath> element. note: as a p...
...And 10 more matches
Handling different text directions - Learn web development
will introduce them now. prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to understand the importance of writing modes to modern css. ...
... the three possible values for the writing-mode property are: horizontal-tb: top-to-bottom block flow direction. sentences run horizontally. vertical-rl: right-to-left block flow direction. sentences run vertically. ...
... or vertically. the writing-mode property lets us switch from one writing mode to another. you don't need to be working in a language which uses a vertical writing mode to want to do this — you could also change the writing mode of parts of your layout for creative purposes. in the example below we have a heading displayed using writing-mode: vertical-rl. the
text now runs vertically. vertical
text is common in graphic design, and can be a way to add a more interesting look and feel to your web design. the three possible values for the writing-mode property are: horizontal-tb: top-to-bottom block flow direction. sentences run horizontally. vertical-rl: right-to-left block flow direction. sentences run vertically. vertical-lr: left-to-right block flow direction. sentences run vertica...
...And 9 more matches
nsIAccessibleEditableText
accessible/public/nsiaccessibleeditable
text.idlscriptable an interface for editing
text of an accessible object. the operations it supports includes setting
text attributes and
text contents while also replacing old
text of an object with new
text. it also includes and support basic operations such as, inserting
text, copying
text, cutting
text, pasting
text and deleting
text at the specified position. ...
.... the operations it supports includes setting
text attributes and
text contents while also replacing old
text of an object with new
text. it also includes and support basic operations such as, inserting
text, copying
text, cutting
text, pasting
text and deleting
text at the specified position. ...
...utes and
text contents while also replacing old
text of an object with new
text. it also includes and support basic operations such as, inserting
text, copying
text, cutting
text, pasting
text and deleting
text at the specified position. ...
...And 9 more matches
AudioContext - Web APIs
the audiocon
text interface represents an audio-processing graph built from audio modules linked together, each represented by an audionode. an audio con
text controls both the creation of the nodes it contains and the execution of the audio processing, or decoding. you need to create an audiocon
text before you do anything else, as everything happens inside a con
text. it's recommended to create one audiocon
text and reuse it instead of initializing a new one each time, and it's ok to use a single audiocon
text for several different audio source and pipeline concurrently. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute;...
...lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audiocon
text" target="_top"><rect x="151" y="1" width="120" he...
...dale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audiocon
text" target="_top"><rect x="151" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="211" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">audiocon
text</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor audiocon
text() creates and returns a new audiocon
text object. properties also inherits properties from its parent interface, baseaudi...
...And 9 more matches
Drawing text - Web APIs
« previousnext » after having seen how to apply styles and colors in the previous chapter, we will now have a look at how to draw
text onto the canvas. drawing
text the canvas rendering con
text provides two methods to render
text: fill
text(
text, x, y [, maxwidth]) fills a given
text at the given (x,y) position. optionally with a maximum width to draw. stroke
text(
text, x, y [, maxwidth]) strokes a given
text at the given (x,y) position. optionally with a maximum width to draw. a fill
text example the
text is filled using the current fillstyle. ...
...t: fill
text(
text, x, y [, maxwidth]) fills a given
text at the given (x,y) position. optionally with a maximum width to draw. stroke
text(
text, x, y [, maxwidth]) strokes a given
text at the given (x,y) position. optionally with a maximum width to draw. a fill
text example the
text is filled using the current fillstyle. function draw() { var ctx = document.getelementbyid('canvas').getcon
text('2d'); ctx.font = '48px serif'; ctx.fill
text('hello world', 10, 50); } <canvas id="canvas" width="300" height="100"></canvas> draw(); a stroke
text example the
text is filled using the current strokestyle. ...
...filled using the current fillstyle. function draw() { var ctx = document.getelementbyid('canvas').getcon
text('2d'); ctx.font = '48px serif'; ctx.fill
text('hello world', 10, 50); } <canvas id="canvas" width="300" height="100"></canvas> draw(); a stroke
text example the
text is filled using the current strokestyle. function draw() { var ctx = document.getelementbyid('canvas').getcon
text('2d'); ctx.font = '48px serif'; ctx.stroke
text('hello world', 10, 50); } <canvas id="canvas" width="300" height="100"></canvas> draw(); styling
text in the examples above we are already making use of the font property to make the
text a bit larger than the default size. ...
...And 9 more matches
EXT_texture_filter_anisotropic - Web APIs
the ext_
texture_filter_anisotropic extension is part of the webgl api and exposes two constants for anisotropic filtering (af). af improves the quality of mipmapped
texture access when viewing a
textured primitive at an oblique angle. using just mipmapping, these lookups have a tendency to average to grey. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is available to both, webgl1 and webgl2 con
texts. constants ext.max_
texture_max_anisotropy_ext this is the pname argument to the gl.getparameter() call, and it returns the maximum available anisotropy. ...
...ebgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is available to both, webgl1 and webgl2 con
texts. constants ext.max_
texture_max_anisotropy_ext this is the pname argument to the gl.getparameter() call, and it returns the maximum available anisotropy. ext.
texture_max_anisotropy_ext this is the pname argument to the gl.gettexparameter() and gl.texparameterf() / gl.texparameteri() calls and sets the desired maximum anisotropy for a
texture. ...
...oth, webgl1 and webgl2 con
texts. constants ext.max_
texture_max_anisotropy_ext this is the pname argument to the gl.getparameter() call, and it returns the maximum available anisotropy. ext.
texture_max_anisotropy_ext this is the pname argument to the gl.gettexparameter() and gl.texparameterf() / gl.texparameteri() calls and sets the desired maximum anisotropy for a
texture. ...
...And 9 more matches
SVGTextElement - Web APIs
the svg
textelement interface corresponds to the <
text> elements. ...
...ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...And 9 more matches
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
the webglrenderingcon
text.compressedtexsubimage2d() method of the webgl api specifies a two-dimensional sub-rectangle for a
texture image in a compressed format. compressed image formats must be enabled by webgl extensions before using this method or a webgl2renderingcon
text must be used. syntax // webgl 1: void gl.compressedtexsubimage2d(target, level, xoffset, yoffset, width, height, format, arraybufferview? pixels); // additionally available in webgl 2: void gl.compressedtexsubimage2d(target, level, xoffset, yoffset, width, height, format, imagesize, offset); void gl.compressedtexsubimage2d(target, level, xoffset, yoffset, width, height, format, arraybufferview srcdata, optional srcoffset, optional srclengthoverride); parameters target a glenum specifying the binding point (targ...
...ditionally available in webgl 2: void gl.compressedtexsubimage2d(target, level, xoffset, yoffset, width, height, format, imagesize, offset); void gl.compressedtexsubimage2d(target, level, xoffset, yoffset, width, height, format, arraybufferview srcdata, optional srcoffset, optional srclengthoverride); parameters target a glenum specifying the binding point (target) of the active compressed
texture. possible values: gl.
texture_2d: a two-dimensional
texture. gl.
texture_cube_map_positive_x: positive x face for a cube-mapped
texture. gl.
texture_cube_map_negative_x: negative x face for a cube-mapped
texture. gl.
texture_cube_map_positive_y: positive y face for a cube-mapped
texture. gl.
texture_cube_map_negative_y: negative y face for a cube-mapped
texture. gl.
texture_cube_map_po...
...wo-dimensional
texture. gl.
texture_cube_map_positive_x: positive x face for a cube-mapped
texture. gl.
texture_cube_map_negative_x: negative x face for a cube-mapped
texture. gl.
texture_cube_map_positive_y: positive y face for a cube-mapped
texture. gl.
texture_cube_map_negative_y: negative y face for a cube-mapped
texture. gl.
texture_cube_map_positive_z: positive z face for a cube-mapped
texture. gl.
texture_cube_map_negative_z: negative z face for a cube-mapped
texture. level a glint specifying the level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. xoffset a glint specifying the horizontal offset within the compressed
texture image. yoffset a glint specifying the vertical offset within the compressed
texture image. width a gls...
...And 9 more matches
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
the webglrenderingcon
text.getframebufferattachmentparameter() method of the webgl api returns information about a framebuffer's attachment. syntax any gl.getframebufferattachmentparameter(target, attachment, pname); parameters target a glenum specifying the binding point (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. when using a webgl 2 con
text, the following values are available additionally: gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the
texture. possible ...
...g a webgl 2 con
text, the following values are available additionally: gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the
texture. possible values: gl.color_attachment0:
texture attachment for the framebuffer's color buffer. gl.depth_attachment:
texture attachment for the framebuffer's depth buffer. gl.stencil_attachment:
texture attachment for the framebuffer's stencil buffer. gl.depth_stencil_attachment:
texture attachment for both, the depth and stencil buffer. ...
...nt point for the
texture. possible values: gl.color_attachment0:
texture attachment for the framebuffer's color buffer. gl.depth_attachment:
texture attachment for the framebuffer's depth buffer. gl.stencil_attachment:
texture attachment for the framebuffer's stencil buffer. gl.depth_stencil_attachment:
texture attachment for both, the depth and stencil buffer. ...
...And 9 more matches
The stacking context - CSS: Cascading Style Sheets
element with a position value absolute or relative and z-index value other than auto. ...
... element with a position value absolute or relative and z-index value other than auto. ...
... element with a position value absolute or relative and z-index value other than auto. ...
...And 9 more matches
CSS Text Decoration - CSS: Cascading Style Sheets
css
text decoration is a module of css that defines features relating to
text decoration, such as underlines,
text shadows, and emphasis marks. reference properties letter-spacing
text-align
text-decoration
text-decoration-color
text-decoration-line
text-decoration-offset
text-decoration-skip-ink
text-decoration-style
text-decoration-thickness
text-emphasis
text-emphasis-color
text-emphasis-position
text-emphasis-style
text-indent
text-rendering
text-shadow
text-transform white-space word-spacing guides none. ...
...s letter-spacing
text-align
text-decoration
text-decoration-color
text-decoration-line
text-decoration-offset
text-decoration-skip-ink
text-decoration-style
text-decoration-thickness
text-emphasis
text-emphasis-color
text-emphasis-position
text-emphasis-style
text-indent
text-rendering
text-shadow
text-transform white-space word-spacing guides none. ...
...tion
text-decoration-color
text-decoration-line
text-decoration-offset
text-decoration-skip-ink
text-decoration-style
text-decoration-thickness
text-emphasis
text-emphasis-color
text-emphasis-position
text-emphasis-style
text-indent
text-rendering
text-shadow
text-transform white-space word-spacing guides none. ...
...And 9 more matches
CanvasRenderingContext2D.createPattern() - Web APIs
syntax canvaspattern ctx.createpattern(image, repetition); parameters image a canvasimagesource to be used as the pattern's image. ...
... syntax canvaspattern ctx.createpattern(image, repetition); parameters image a canvasimagesource to be used as the pattern's image. ...
... syntax canvaspattern ctx.createpattern(image, repetition); parameters image a canvasimagesource to be used as the pattern's image. ...
...And 8 more matches
EXT_texture_compression_rgtc - Web APIs
the ext_
texture_compression_rgtc extension is part of the webgl api and exposes 4 rgtc compressed
texture formats. rgtc is a block-based
texture compression format suited for unsigned and signed red and red-green
textures (red-green
texture compression). webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: support depends on the system's graphics driver. there is no support on windows. this extension is available to both, webgl1 and webgl2 con
texts. constants the compressed
texture formats are exposed by 4 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d(). ext.compressed_red_rgtc1_ext each 4x4 block of texels consists o...
...each 4x4 block of texels consists of 64 bits of compressed unsigned red image data followed by 64 bits of compressed unsigned green image data. see also bc5 unsigned. ...
...f texels consists of 64 bits of compressed unsigned red image data followed by 64 bits of compressed unsigned green image data. see also bc5 unsigned. ext.compressed_signed_red_green_rgtc2_ext each 4x4 block of texels consists of 64 bits of compressed signed red image data followed by 64 bits of compressed signed green image data. ...
...And 8 more matches
Element.insertAdjacentText() - Web APIs
return value void. exceptions exception explanation syntaxerror the position specified is not a recognised value. ...
... return value void. exceptions exception explanation syntaxerror the position specified is not a recognised value. ...
...sition, element); parameters position a domstring representing the position relative to the element; must be one of the following strings: 'beforebegin': before the element itself. 'afterbegin': just inside the element, before its first child. 'beforeend': just inside the element, after its last child. 'afterend': after the element itself. element a domstring representing the
text to be inserted into the tree. return value void. exceptions exception explanation syntaxerror the position specified is not a recognised value. visualization of position names <!-- beforebegin --> <p> <!-- afterbegin --> foo <!-- beforeend --> </p> <!-- afterend --> note: the beforebegin and afterend positions work only if the node is in a tree and ...
...And 8 more matches
SVGTextPositioningElement - Web APIs
the svg
textpositioningelement interface is implemented by elements that support attributes that position individual
text glyphs. it is inherited by svg
textelement, svgtspanelement, svgtrefelement and svgaltglyphelement. ...
...splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...And 8 more matches
TextDecoder - Web APIs
the
textdecoder interface represents a decoder for a specific
text encoding, such as utf-8, iso-8859-2, koi8-r, gbk, etc. a decoder takes a stream of bytes as input and emits a stream of code points. examples representing
text with typed arrays this example shows how to decode a chinese/japanese character , as represented by five different typed arrays: uint8array, int8array, uint16array, int16array, and int32array. ...
... for a specific
text encoding, such as utf-8, iso-8859-2, koi8-r, gbk, etc. a decoder takes a stream of bytes as input and emits a stream of code points. examples representing
text with typed arrays this example shows how to decode a chinese/japanese character , as represented by five different typed arrays: uint8array, int8array, uint16array, int16array, and int32array. ...
...= new int8array([-16, -96, -82, -73]); let u16arr = new uint16array([41200, 47022]); let i16arr = new int16array([-24336, -18514]); let i32arr = new int32array([-1213292304]); console.log(utf8decoder.decode(u8arr)); console.log(utf8decoder.decode(i8arr)); console.log(utf8decoder.decode(u16arr)); console.log(utf8decoder.decode(i16arr)); console.log(utf8decoder.decode(i32arr)); handling non-utf8
text in this example, we decode the russian
text "Привет, мир!", which means "hello, world." in our
textdecoder() constructor, we specify the windows-1251 character encoding, which is appropriate for cyrillic script. let win1251decoder = new
textdecoder('windows-1251'); let bytes = new uint8array([207, 240, 232, 226, 229, 242, 44, 32, 236, 232, 240, 33]); console.log(win1251decoder.decode(b...
...And 8 more matches
WEBGL_compressed_texture_etc - Web APIs
ext.compressed_r11_eac one-channel (red) unsigned format compression. ...
... ext.compressed_r11_eac one-channel (red) unsigned format compression. ...
... ext.compressed_r11_eac one-channel (red) unsigned format compression. ...
...And 8 more matches
WebGLRenderingContext.getSupportedExtensions() - Web APIs
webgl extensions extensions for the webgl api are registered in the webgl extension registry. ...
... webgl extensions extensions for the webgl api are registered in the webgl extension registry. ...
...turns a list of all the supported webgl extensions. syntax gl.getsupportedextensions(); return value an array of strings with all the supported webgl extensions. examples var canvas = document.getelementbyid('canvas'); gl = canvas.getcon
text('webgl'); var extensions = gl.getsupportedextensions(); // array [ 'angle_instanced_arrays', 'ext_blend_minmax', ... ] see also the webglrenderingcon
text.ge
textension() method to get a specific extension object. webgl extensions extensions for the webgl api are registered in the webgl extension registry. ...
...And 8 more matches
-webkit-text-stroke - CSS: Cascading Style Sheets
the -webkit-
text-stroke css property specifies the width and color of strokes for
text characters. this is a shorthand property for the longhand properties -webkit-
text-stroke-width and -webkit-
text-stroke-color. /* width and color values */ -webkit-
text-stroke: 4px navy;
text-stroke: 4px navy; /* global values */ -webkit-
text-stroke: inherit; -webkit-
text-stroke: initial; -webkit-
text-stroke: unset;
text-stroke: inherit;
text-stroke: initial;
text-stroke: unset; constituent properties this property is a shorthand for the following css properties: -webkit-stroke-color -webkit-stroke-width syntax values <length> the width of the stroke. <color> the color of the stroke. ...
...webkit-
text-stroke: unset;
text-stroke: inherit;
text-stroke: initial;
text-stroke: unset; constituent properties this property is a shorthand for the following css properties: -webkit-stroke-color -webkit-stroke-width syntax values <length> the width of the stroke. <color> the color of the stroke. ...
...ext-stroke: inherit;
text-stroke: initial;
text-stroke: unset; constituent properties this property is a shorthand for the following css properties: -webkit-stroke-color -webkit-stroke-width syntax values <length> the width of the stroke. <color> the color of the stroke. ...
...And 8 more matches
Introduction to formatting contexts - CSS: Cascading Style Sheets
this article introduces the concept of formatting con
texts, of which there are several types, including block formatting con
texts, inline formatting con
texts, and flex formatting con
texts. the basics of how they behave and how you can make use of these behaviors are also introduced. everything on a page is part of a formatting con
text, or an area which has been defined to lay out content in a particular way. a block formatting con
text (bfc) will lay child elements out according to block layout rules, a flex formatting con
text will lay its children out as flex items, etc. each formatting con
text has specific rules about how layout behaves when in that con
text. ...
...this means that every element inside the <html> element's block is laid out according to normal flow following the rules for block and inline layout. ...
...lock formatting con
text (bfc) will lay child elements out according to block layout rules, a flex formatting con
text will lay its children out as flex items, etc. each formatting con
text has specific rules about how layout behaves when in that con
text. block formatting con
texts the outermost element in a document that uses block layout rules establishes the first, or initial block formatting con
text. this means that every element inside the <html> element's block is laid out according to normal flow following the rules for block and inline layout. elements participating in a bfc use the rules outlined by the css box model, which defines how an element's margins, borders, and padding interact with other blocks in the same con
text. ...
...And 8 more matches
text-decoration-line - CSS: Cascading Style Sheets
the
text-decoration-line css property sets the kind of decoration that is used on
text in an element, such as an underline or overline. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. when setting multiple line-decoration properties at once, it may be more convenient to use the
text-decoration shorthand property instead. ...
...e. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. when setting multiple line-decoration properties at once, it may be more convenient to use the
text-decoration shorthand property instead. ...
...teractive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. when setting multiple line-decoration properties at once, it may be more convenient to use the
text-decoration shorthand property instead. ...
...And 8 more matches
text-shadow - CSS: Cascading Style Sheets
the
text-shadow css property adds shadows to
text. it accepts a comma-separated list of shadows to be applied to the
text and any of its decorations. each shadow is described by some combination of x and y offsets from the element, blur radius, and color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...orations. each shadow is described by some combination of x and y offsets from the element, blur radius, and color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...e element, blur radius, and color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax /* offset-x | offset-y | blur-radius | color */
text-shadow: 1px 1px 2px black; /* color | offset-x | offset-y | blur-radius */
text-shadow: #fc0 1px 0 10px; /* offset-x | offset-y | color */
text-shadow: 5px 5px #558abb; /* color | offset-x | offset-y */
text-shadow: white 2px 5px; /* offset-x | offset-y /* use defaults for color and blur-radius */
text-shadow: 5px 10px; /* global values */
text-shadow: inherit;
text-shadow: initial;
text-shadow: unset; this property is specified as a comma-separated list of shadows. e...
...And 8 more matches
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
the html bidirectional isolate element (<bdi>) tells the browser's bidirectional algorithm to treat the
text it contains in isolation from its surrounding
text. it's particularly useful when a website dynamically inserts some
text and doesn't know the directionality of the
text being inserted. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. bidirectional
text is
text that may contain both sequences of characters that are arranged left-to-right (ltr) and sequences of characters that are arranged right-to-left (rtl), such as an arabic quotation embedded in an english string. browsers implement the unicode bidirection...
... some other characters (such as spaces and some punctuation) are treated as neutral and are assigned directionality based on that of their surrounding characters. usually, the bidirectional algorithm will do the right thing without the author having to provide any special markup but, occasionally, the algorithm needs help. that's where <bdi> comes in. ...
...are treated as neutral and are assigned directionality based on that of their surrounding characters. usually, the bidirectional algorithm will do the right thing without the author having to provide any special markup but, occasionally, the algorithm needs help. that's where <bdi> comes in. the <bdi> element is used to wrap a span of
text and instructs the bidirectional algorithm to treat this
text in isolation from its surroundings. this works in two ways: the directionality of
text embedded in <bdi> does not influence the directionality of the surrounding
text. the directionality of
text embedded in <bdi> is not influenced by the directionality of the surrounding
text. for example, consider some
text like: embedded-
text - 1st place if embedded-
text is ltr, this works fine. but if ...
...And 8 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
nt. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the above example shows usage of the <img> element: the src attribute is required, and contains the path to the image you want to embed. the alt attribute holds a
text description of the image, which isn't mandatory but is incredibly useful for accessibility — screen readers read this description out to their users so they know what the image means. alt
text is also displayed on the page if the image can't be loaded for some reason: for example, network errors, content blocking, or linkrot. there are many other attributes to achieve various purposes: ref...
...urrently on. the image is corrupted in some way that prevents it from being loaded. the image's metadata is corrupted in such a way that it's impossible to retrieve its dimensions, and no dimensions were specified in the <img> element's attributes. the image is in a format not supported by the user agent. attributes this element includes the global attributes. alt defines an alternative
text description of the image. note: browsers do not always display images. there are a number of situations in which a browser might not display images, such as: non-visual browsers (such as those used by people with visual impairments) the user chooses not to display images (saving bandwidth, privacy reasons) the image is invalid or an unsupported type in these cases, the browser may...
... note: browsers do not always display images. there are a number of situations in which a browser might not display images, such as: non-visual browsers (such as those used by people with visual impairments) the user chooses not to display images (saving bandwidth, privacy reasons) the image is invalid or an unsupported type in these cases, the browser may replace the image with the
text in the element's alt attribute. for these reasons and others, provide a useful value for alt whenever possible. omitting alt altogether indicates that the image is a key part of the content and no
textual equivalent is available. setting this attribute to an empty string (alt="") indicates that this image is not a key part of the content (it’s decoration or a tracking pixel), and that non-v...
...And 8 more matches
<input type="password"> - HTML: Hypertext Markup Language
this character will vary depending on the user agent and os. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...gin forms; see insecure passwords. value a domstring representing a password, or empty events change and input supported common attributes autocomplete, inputmode, maxlength, minlength, pattern, placeholder, readonly, required, and size idl attributes selectionstart, selectionend, selectiondirection, and value methods select(), setrange
text(), and setselectionrange() value the value attribute contains a domstring whose value is the current contents of the
text editing control being used to enter the password. if the user hasn't entered anything yet, this value is an empty string (""). if the required property is specified, then the password edit box must contain a value other than an empty string to be valid. if the pattern...
... maxlength the maximum number of characters (as utf-16 code units) the user can enter into the password field. this must be an integer value 0 or higher. if no maxlength is specified, or an invalid value is specified, the password field has no maximum length. this value must also be greater than or equal to the value of minlength. the input will fail constraint validation if the length of the
text entered into the field is greater than maxlength utf-16 code units long. minlength the minimum number of characters (as utf-16 code units) the user can enter into the password entry field. this must be an non-negative integer value smaller than or equal to the value specified by maxlength. if no minlength is specified, or an invalid value is specified, the password input has no minimum length. ...
...And 8 more matches
<input type="tel"> - HTML: Hypertext Markup Language
form can be submitted, because formats for telephone numbers vary so much around the world. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. despite the fact that inputs of type tel are functionally identical to standard
text inputs, they do serve useful purposes; the most quickly apparent of these is that mobile browsers — especially on mobile phones — may opt to present a custom keypad optimized for entering phone numbers. using a specific input type for telephone numbers also makes adding custom validation and handling of phone numbers more convenient. note: browsers that don't support type tel fall back to b...
... serve useful purposes; the most quickly apparent of these is that mobile browsers — especially on mobile phones — may opt to present a custom keypad optimized for entering phone numbers. using a specific input type for telephone numbers also makes adding custom validation and handling of phone numbers more convenient. ...
...ack to being a standard
text input. value a domstring representing a telephone number, or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, and size idl attributes list, selectionstart, selectionend, selectiondirection, and value methods select(), setrange
text(), setselectionrange() value the <input> element's value attribute contains a domstring that either represents a telephone number or is an empty string (""). additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, telephone number inputs support the following attributes: attribute description list th...
...And 8 more matches
<tr>: The Table Row element - HTML: Hypertext Markup Language
. there are also several deprecated attributes, which you should avoid but may need to know when reading older code. deprecated attributes the following attributes may still be implemented in browsers but are no longer part of the html specification and may be missing or may not work as expected. they should be avoided. ...
... char align each cell in the row on a specific character (such that each row in the column that is configured this way will horizontally align its cells on that character). ...
...tally within the cells in the row; this is shorthand for using align on every cell in the row individually. possible values are: left align the content of each cell at its left edge. center center the contents of each cell between their left and right edges. right align the content of each cell at its right edge. justify widen whitespaces within the
text of each cell so that the
text fills the full width of each cell (full justification). char align each cell in the row on a specific character (such that each row in the column that is configured this way will horizontally align its cells on that character). this uses the char and charoff to establish the alignment character (typically "." or "," when aligning numerical data) and the number of characters that should follow...
...And 8 more matches
<u>: The Unarticulated Annotation (Underline) element - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. see the usage notes section for further details on when it's appropriate to use <u> and when it isn't. ...
...And 8 more matches
text-rendering - SVG: Scalable Vector Graphics
the
text-rendering attribute provides hints to the renderer about what tradeoffs to make when rendering
text. note: as a presentation attribute,
text-rendering can be used as a css property. see the css
text-rendering property for more information. ...
... the
text-rendering attribute provides hints to the renderer about what tradeoffs to make when rendering
text. note: as a presentation attribute,
text-rendering can be used as a css property. see the css
text-rendering property for more information. ...
...eoffs to make when rendering
text. note: as a presentation attribute,
text-rendering can be used as a css property. see the css
text-rendering property for more information. ...
...And 8 more matches
Secure contexts - Web security
a secure con
text is a window or worker for which certain minimum standards of authentication and confidentiality are met. many web apis and features are accessible only in a secure con
text. the primary goal of secure con
texts is to prevent mitm attackers from accessing powerful apis that could further compromise the victim of an attack. why should some features be restricted? some apis on the web are very powerful, giving an attacker the ability to do the following and more: invade a user's privacy. get low-level access to a user's computer. get access to data such as user credentials. when is a con
text considered secure? a con
text is considered secure when it meets certain minimum standards of authentication and confidentiality defined in the secure con
texts specification. a...
...to do the following and more: invade a user's privacy. get low-level access to a user's computer. get access to data such as user credentials. when is a con
text considered secure? ...
...low-level access to a user's computer. get access to data such as user credentials. when is a con
text considered secure? ...
...And 8 more matches
Handling text — strings in JavaScript - Learn web development
previous overview: first steps next next, we'll turn our attention to strings — this is what pieces of
text are called in programming. in this article, we'll look at all the common things that you really ought to know about strings when learning javascript, such as creating strings, escaping quotes in strings, and joining strings together. prerequisites: basic computer literacy, a basic understanding of html and css, an understanding of what javascript is. objective: to gain familiarity with the basics of strings in javascript. the power of words words are very important to humans — they are a large part of how we communicate. ...
...es in strings, and joining strings together. prerequisites: basic computer literacy, a basic understanding of html and css, an understanding of what javascript is. objective: to gain familiarity with the basics of strings in javascript. the power of words words are very important to humans — they are a large part of how we communicate. ...
...e: to gain familiarity with the basics of strings in javascript. the power of words words are very important to humans — they are a large part of how we communicate. since the web is a largely
text-based medium designed to allow humans to communicate and share information, it is useful for us to have control over the words that appear on it. html provides structure and meaning to our
text, css allows us to precisely style it, and javascript contains a number of features for manipulating strings, creating custom welcome messages and prompts, showing the right
text labels when needed, sorting terms into the desired order, and much more. pretty much all of the programs we've shown you so far in the course have involved some string manipulation. strings — the basics strings are d...
...And 7 more matches
HTMLCanvasElement.getContext() - Web APIs
the htmlcanvaselement.getcon
text() method returns a drawing con
text on the canvas, or null if the con
text identifier is not supported. later calls to this method on the same canvas element return the same drawing con
text instance as was returned the last time the method was invoked with the same con
texttype argument. to get a different drawing con
text object you need to pass a different con
texttype or call the method on a different canvas element. syntax var ctx = canvas.getcon
text(con
texttype); var ctx = canvas.getcon
text(con
texttype, con
textattributes); parameters con
texttype is a domstring containing the con
text identifier defining the drawing con
text associated to the canvas. ...
...s a different con
texttype or call the method on a different canvas element. syntax var ctx = canvas.getcon
text(con
texttype); var ctx = canvas.getcon
text(con
texttype, con
textattributes); parameters con
texttype is a domstring containing the con
text identifier defining the drawing con
text associated to the canvas. possible values are: "2d", leading to the creation of a canvasrenderingcon
text2d object representing a two-dimensional rendering con
text. "webgl" (or "experimental-webgl") which will create a webglrenderingcon
text object representing a three-dimensional rendering con
text. this con
text is only available on browsers that implement webgl version 1 (opengl es 2.0). ...
...: "2d", leading to the creation of a canvasrenderingcon
text2d object representing a two-dimensional rendering con
text. "webgl" (or "experimental-webgl") which will create a webglrenderingcon
text object representing a three-dimensional rendering con
text. this con
text is only available on browsers that implement webgl version 1 (opengl es 2.0). "webgl2" which will create a webgl2renderingcon
text object representing a three-dimensional rendering con
text. this con
text is only available on browsers that implement webgl version 2 (opengl es 3.0). "bitmaprenderer" which will create an imagebitmaprenderingcon
text which only provides functionality to replace the content of the canvas with a given imagebitmap. note: the identifier "experimental-webgl" is used in new implementations of ...
...And 7 more matches
OfflineAudioContext.startRendering() - Web APIs
the complete event (of type offlineaudiocompletionevent) is raised when the rendering is finished, containing the resulting audiobuffer in its renderedbuffer property. browsers currently support two versions of the startrendering() method — an older event-based version and a newer promise-based version. the former will eventually be removed, but currently both mechanisms are provided for legacy reasons. ...
...r legacy reasons. syntax event-based version: offlineaudioctx.startrendering(); offlineaudioctx.oncomplete = function(e) { // e.renderedbuffer contains the output buffer } promise-based version: offlineaudioctx.startrendering().then(function(buffer) { // buffer contains the output buffer }); parameters none. returns void. example in this simple example, we declare both an audiocon
text and an offlineaudiocon
text object. we use the audiocon
text to load an audio track via xhr (audiocon
text.decodeaudiodata), then the offlineaudiocon
text to render the audio into an audiobuffersourcenode and play the track through. after the offline audio graph is set up, you need to render it to an audiobuffer using offlineaudiocon
text.startrendering. when the startrendering() promise resolves, re...
...then the offlineaudiocon
text to render the audio into an audiobuffersourcenode and play the track through. after the offline audio graph is set up, you need to render it to an audiobuffer using offlineaudiocon
text.startrendering. when the startrendering() promise resolves, rendering has completed and the output audiobuffer is returned out of the promise. at this point we create another audio con
text, create an audiobuffersourcenode inside it, and set its buffer to be equal to the promise audiobuffer. this is then played as part of a simple standard audio graph. ...
...And 7 more matches
Text - Web APIs
the
text interface represents the
textual content of element or attr. if an element has no markup within its content, it has a single child implementing
text that contains the element's
text. however, if the element contains markup, it is parsed into information items and
text nodes that form its children. new documents have a single
text node for each block of
text. over time, more
text nodes may be created as the document's content changes. the node.normalize() method merges adjacent
text objects back into a single node for each block of
text. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" ...
...lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/characterdata" target="_top"><rect x="266" y="1" width="130" heigh...
...And 7 more matches
WebGLRenderingContext.texParameter[fi]() - Web APIs
the webglrenderingcon
text.texparameter[fi]() methods of the webgl api set
texture parameters. syntax void gl.texparameterf(glenum target, glenum pname, glfloat param); void gl.texparameteri(glenum target, glenum pname, glint param); parameters target a glenum specifying the binding point (target). possible values: gl.
texture_2d: a two-dimensional
texture. gl.
texture_cube_map: a cube-mapped
texture. when using a webgl 2 con
text, the following values are available additionally: gl.
texture_3d: a three-dimensional
texture. gl.
texture_2d_array: a two-dimensional array
texture. the pname parameter is a glenum specifying the
texture parameter to set. the param parameter is a glfloat or glint specifying the value for the specified parameter pname. pn...
...lable additionally: gl.
texture_3d: a three-dimensional
texture. gl.
texture_2d_array: a two-dimensional array
texture. the pname parameter is a glenum specifying the
texture parameter to set. the param parameter is a glfloat or glint specifying the value for the specified parameter pname. pname description param available in webgl 1 gl.
texture_mag_filter
texture magnification filter gl.linear (default value), gl.nearest. gl.
texture_min_filter
texture minification filter gl.linear, gl.nearest, gl.nearest_mipmap_nearest, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear (default value), gl.linear_mipmap_linear. ...
... pname description param available in webgl 1 gl.
texture_mag_filter
texture magnification filter gl.linear (default value), gl.nearest. gl.
texture_min_filter
texture minification filter gl.linear, gl.nearest, gl.nearest_mipmap_nearest, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear (default value), gl.linear_mipmap_linear. gl.
texture_wrap_s wrapping function for
texture coordinate s gl.repeat (default value),gl.clamp_to_edge, gl.mirrored_repeat. gl.
texture_wrap_t wrapping function for
texture coordinate t gl.repeat (default value),gl.clamp_to_edge, gl.mirrored_repeat. ...
...And 7 more matches
WebGLRenderingContext.texSubImage2D() - Web APIs
the webglrenderingcon
text.texsubimage2d() method of the webgl api specifies a sub-rectangle of the current
texture. syntax // webgl 1: void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, arraybufferview? pixels); void gl.texsubimage2d(target, level, xoffset, yoffset, format, type, imagedata? pixels); void gl.texsubimage2d(target, level, xoffset, yoffset, format, type, htmlimageelement? pixels); void gl.texsubimage2d(target, level, xoffset, yoffset, format, type, htmlcanvaselement? pixels); void gl.texsubimage2d(target, level, xoffset, yoffset, format, type, htmlvideoelement? pixels); void gl.texsubimage2d(target, level, xoffset, yoffset, format, type, imagebitmap? pixels); // webgl 2: void gl.texsubimage2d(target, level, xoffset, yoffset, format, type, glint...
...image2d(target, level, xoffset, yoffset, width, height, format, type, imagebitmap source); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, imagedata source); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, arraybufferview srcdata, srcoffset); parameters target a glenum specifying the binding point (target) of the active
texture. possible values: gl.
texture_2d: a two-dimensional
texture. gl.
texture_cube_map_positive_x: positive x face for a cube-mapped
texture. gl.
texture_cube_map_negative_x: negative x face for a cube-mapped
texture. gl.
texture_cube_map_positive_y: positive y face for a cube-mapped
texture. gl.
texture_cube_map_negative_y: negative y face for a cube-mapped
texture. gl.
texture_cube_map_po...
...wo-dimensional
texture. gl.
texture_cube_map_positive_x: positive x face for a cube-mapped
texture. gl.
texture_cube_map_negative_x: negative x face for a cube-mapped
texture. gl.
texture_cube_map_positive_y: positive y face for a cube-mapped
texture. gl.
texture_cube_map_negative_y: negative y face for a cube-mapped
texture. gl.
texture_cube_map_positive_z: positive z face for a cube-mapped
texture. gl.
texture_cube_map_negative_z: negative z face for a cube-mapped
texture. level a glint specifying the level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. xoffset a glint specifying the lower left texel x coordinate of a width-wide by height-wide rectangular subregion of the
texture array. yoffset a glint specifying the lower left texel...
...And 7 more matches
XMLHttpRequest.responseText - Web APIs
you know the entire content has been received when the value of readystate becomes xmlhttprequest.done (4), and status becomes 200 ("ok"). ...
... you know the entire content has been received when the value of readystate becomes xmlhttprequest.done (4), and status becomes 200 ("ok"). ...
... you know the entire content has been received when the value of readystate becomes xmlhttprequest.done (4), and status becomes 200 ("ok"). ...
...And 7 more matches
text-emphasis - CSS: Cascading Style Sheets
the
text-emphasis css property applies emphasis marks to
text (except spaces and control characters). it is a shorthand for
text-emphasis-style and
text-emphasis-color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the
text-emphasis property is quite different from
text-decoration. the
text-decoration property does not inherit, and the decoration specified is applied across the whole element. however,
text-emphasis does inherit, which means it is possible to change emphasis marks for descendents. ...
... a pull request. the
text-emphasis property is quite different from
text-decoration. the
text-decoration property does not inherit, and the decoration specified is applied across the whole element. however,
text-emphasis does inherit, which means it is possible to change emphasis marks for descendents. the size of the emphasis symbol, like ruby symbols, is about 50% of the size of the font, and
text-emphasis may affect line height when the current leading is not enough for the marks.
text-emphasis doesn't reset the value of
text-emphasis-position. this is because if the style and the color of emphasis marks may vary in a
text, it is extremely unlikely that their position will. in the very rare cases when this is needed, the property
text-emphasis-position. constituent properties this pr...
...s not enough for the marks.
text-emphasis doesn't reset the value of
text-emphasis-position. this is because if the style and the color of emphasis marks may vary in a
text, it is extremely unlikely that their position will. in the very rare cases when this is needed, the property
text-emphasis-position. constituent properties this property is a shorthand for the following css properties:
text-emphasis-color
text-emphasis-style syntax /* initial value */
text-emphasis: none; /* no emphasis marks */ /* <string> value */
text-emphasis: 'x';
text-emphasis: '点';
text-emphasis: '\25b2';
text-emphasis: '*' #555;
text-emphasis: 'foo'; /* should not use. ...
...And 7 more matches
text-underline-position - CSS: Cascading Style Sheets
the
text-underline-position css property specifies the position of the underline which is set using the
text-decoration property's underline value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...ext-underline-position css property specifies the position of the underline which is set using the
text-decoration property's underline value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...erty specifies the position of the underline which is set using the
text-decoration property's underline value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...And 7 more matches
<a>: The Anchor element - HTML: Hypertext Markup Language
. when the link is followed, the browser will send post requests with the body ping to the urls. typically for tracking. referrerpolicy how much of the referrer to send when following the link. see referrer-policy for possible values and their effects. rel the relationship of the linked url as space-separated link types. ...
... much of the referrer to send when following the link. see referrer-policy for possible values and their effects. rel the relationship of the linked url as space-separated link types. target where to display the linked url, as the name for a browsing con
text (a tab, window, or <iframe>). the following keywords have special meanings for where to load the url: _self: the current browsing con
text. (default) _blank: usually a new tab, but users can configure browsers to open a new window instead. _parent: the parent browsing con
text of the current one. if no parent, behaves as _self. _top: the topmost browsing con
text (the "highest" con
text that’s an ancestor of the current one). if no ancestors, behaves as _self. note: when using target, add rel="noreferrer noopener" to avoi...
...button and moving it. ...
...And 7 more matches
<input type="date"> - HTML: Hypertext Markup Language
<input> elements of type="date" create input fields that let the user enter a date, either with a
textbox that validates the input or a special date picker interface. the resulting value includes the year, month, and day, but not the time. the time and datetime-local input types support time and date+time input. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the input ui generally varies from browser to browser; see browser compatibility for further details. in unsupported browsers, the control degrades gracefully to <input type="
text">. among browsers with custom interfaces for selecting dates are chrome and ope...
...o restrict the dates that can be chosen by the user. in the following example, we set a minimum date of 2017-04-01 and a maximum date of 2017-04-30: <form> <label for="party">choose your preferred party date: <input type="date" name="party" min="2017-04-01" max="2017-04-30"> </label> </form> the result is that only days in april 2017 can be selected — the month and year parts of the
textbox will be uneditable, and dates outside april 2017 can't be selected in tte picker widget. note: you should be able to use the step attribute to vary the number of days jumped each time the date is incremented (e.g. to only make saturdays selectable). however, this does not seem to be in any implementation at the time of writing. controlling input size <input type="date"> doesn't support fo...
...input type="date"> doesn't support form sizing attributes such as size. prefer css for sizing it. validation by default, <input type="date"> doesn't validate the entered value beyond its format. the interfaces generally don't let you enter anything that isn't a date — which is helpful — but you can leave the field empty or enter an invalid date in browsers where the input falls back to type
text (like the 32nd of april). if you use min and max to restrict the available dates (see setting maximum and minimum dates), supporting browsers will display an error if you try to submit a date that is out of bounds. however, you'll need to double-check the submitted results to ensure the value is within these dates, if the date picker isn't fully supported on the user's device. you can also use ...
...And 7 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
o the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the control's ui varies in general from browser to browser; at the moment support is patchy, with only chrome/opera and edge on desktop and most modern versions of mobile browsers having usable implementations. in other browsers, these degrade gracefully to simple <input type="
text"> controls. the control is intended to simply represent a local date and time, not necessarily the user's local date and time. in other words, an implementation should allow any valid combination of year, month, day, hour, and minute - even if such a combination is invalid in the user's local time zone (such as times within a daylight saving time spring-forward transition gap). some mobile brows...
...rently implement this correctly. because of the limited browser support for datetime-local, and the variations in how the inputs work, it may currently still be best to use a framework or library to present these, or to use a custom input of your own. another option is to use separate date and time inputs, each of which is more widely supported than datetime-local. some browsers may resort to a
text-only input element that validates that the results are legitimate date/time values before letting them be delivered to the server, as well, but you shouldn't rely on this behavior since you can't easily predict it. for those of you not using a supporting browser, the chrome/opera datetime-local control looks like the below screenshot. clicking the down arrow on the right hand side brings up a da...
...oo large, is of the wrong type, and so forth). handling browser support as mentioned above, the major problem with using date inputs at the time of writing is browser support — only chrome/opera and edge support it on desktop, and most modern browsers on mobile. ...
...And 7 more matches
Text formatting - JavaScript
it is a set of "elements" of 16-bit unsigned integer values (utf-16 code units). each element in the string occupies a position in the string. the first element is at index 0, the next at index 1, and so on. the length of a string is the number of elements in it. you can create strings using string literals or string objects. caution: if you edit this page, do not include any characters above u+ffff, until mdn bug 857438 is fixed ( https://bugzilla.mozilla.org/show_bug.cgi?id=857438 ). ...
...arcodeat, codepointat return the character or character code at the specified position in string. indexof, lastindexof return the position of specified substring in the string or last position of specified substring, respectively. startswith, endswith, includes returns whether or not the string starts, ends or contains a specified string. concat combines the
text of two strings and returns a new string. fromcharcode, fromcodepoint constructs a string from the specified sequence of unicode values. this is a method of the string class, not a string instance. split splits a string object into an array of strings by separating the string into substrings. slice extracts a section of a string and returns a new string. ...
... `) (grave accent) character instead of double or single quotes. template literals can contain place holders. these are indicated by the dollar sign and curly braces (${expression}). multi-lines any new line characters inserted in the source are part of the template literal. ...
...And 7 more matches
<text> - SVG: Scalable Vector Graphics
the svg <
text> element draws a graphics element consisting of
text. it's possible to apply a gradient, pattern, clipping path, mask, or filter to <
text>, like any other svg graphics element. if
text is included in svg not inside of a <
text> element, it is not rendered. this is different than being hidden by default, as setting the display property won't show the
text. ...
... included in svg not inside of a <
text> element, it is not rendered. this is different than being hidden by default, as setting the display property won't show the
text. ...
...t show the
text. html,body,svg { height:100% } <svg viewbox="0 0 240 80" xmlns="http://www.w3.org/2000/svg"> <style> .small { font: italic 13px sans-serif; } .heavy { font: bold 30px sans-serif; } /* note that the color of the
text is set with the * * fill property, the color property is for html only */ .rrrrr { font: italic 40px serif; fill: red; } </style> <
text x="20" y="35" class="small">my</
text> <
text x="40" y="35" class="heavy">cat</
text> <
text x="55" y="55" class="small">is</
text> <
text x="65" y="55" class="rrrrr">grumpy!</
text> </svg> attributes x the x coordinate of the starting point of the
text baseline. ...
...And 7 more matches
<textPath> - SVG: Scalable Vector Graphics
if the path attribute is set, href has no effect. ...
...if the path attribute is set, href has no effect. ...
...if the path attribute is set, href has no effect. ...
...And 7 more matches
mozbrowsercontextmenu
this event can be used to control what will appear in the menu. ...
...this event can be used to control what will appear in the menu. ...
...e coordinate that was clicked inside the browser <iframe>'s viewport. systemtargets an array containing one or more menusystem objects (see the menusystem object, below), containing details of the standard menu(s) that will be shown. for example, if the user clicked on an image nested in an <a> tag, two menus are available — one with information related to the image, and one for the link. ...
...And 6 more matches
Document.createTextNode() - Web APIs
creates a new
text node. this method can be used to escape html characters. syntax var
text = document.create
textnode(data);
text is a
text node. data is a string containing the data to be put in the
text node. ...
... creates a new
text node. this method can be used to escape html characters. syntax var
text = document.create
textnode(data);
text is a
text node. data is a string containing the data to be put in the
text node. ...
... creates a new
text node. this method can be used to escape html characters. syntax var
text = document.create
textnode(data);
text is a
text node. data is a string containing the data to be put in the
text node. ...
...And 6 more matches
EXT_shader_texture_lod - Web APIs
the ext_shader_
texture_lod extension is part of the webgl api and adds additional
texture functions to the opengl es shading language which provide the shader writer with explicit control of lod (level of detail). webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is only available to webgl1 con
texts. in webgl2, the functionality of this extension is available on the webgl2 con
text by default. it requires glsl #version 300 es. ...
...method. for more information, see also using extensions in the webgl tutorial. availability: this extension is only available to webgl1 con
texts. in webgl2, the functionality of this extension is available on the webgl2 con
text by default. it requires glsl #version 300 es. ...
...webgl tutorial. availability: this extension is only available to webgl1 con
texts. in webgl2, the functionality of this extension is available on the webgl2 con
text by default. it requires glsl #version 300 es. ...
...And 6 more matches
Node.textContent - Web APIs
the
textcontent property of the node interface represents the
text content of the node and its descendants. note:
textcontent and htmlelement.inner
text are easily confused, but the two properties are different in important ways. syntax let
text = somenode.
textcontent someothernode.
textcontent = string value a string or null description the value of
textcontent depends on the situation: if the node is a document or a doctype,
textcontent returns null. note: to get all of the
text and cdata data for the whole document, one could use document.documentelement.
textcontent. if the node is a cdata section, comment, processing instruction, or
text node,
textcontent returns the
text inside the node, i.e., the node.nodevalue. ...
...tent depends on the situation: if the node is a document or a doctype,
textcontent returns null. note: to get all of the
text and cdata data for the whole document, one could use document.documentelement.
textcontent. if the node is a cdata section, comment, processing instruction, or
text node,
textcontent returns the
text inside the node, i.e., the node.nodevalue. for other node types,
textcontent returns the concatenation of the
textcontent of every child node, excluding comments and processing instructions. (this is an empty string if the node has no children.) setting
textcontent on a node removes all of the node's children and replaces them with a single
text node with the given string value. ...
...he node, i.e., the node.nodevalue. for other node types,
textcontent returns the concatenation of the
textcontent of every child node, excluding comments and processing instructions. (this is an empty string if the node has no children.) setting
textcontent on a node removes all of the node's children and replaces them with a single
text node with the given string value. differences from inner
text don't get confused by the differences between node.
textcontent and htmlelement.inner
text. although the names seem similar, there are important differences:
textcontent gets the content of all elements, including <script> and <style> elements. in contrast, inner
text only shows “human-readable” elements. ...
...And 6 more matches
WEBGL_compressed_texture_s3tc_srgb - Web APIs
the webgl_compressed_
texture_s3tc_srgb extension is part of the webgl api and exposes four s3tc compressed
texture formats for the srgb colorspace. compressed
textures reduce the amount of memory needed to store a
texture on the gpu, allowing for higher resolution
textures or more of the same resolution
textures. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is available to both webgl1 and webgl2 con
texts. constants the compressed
texture formats are exposed by four constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d(). ext.compressed_srgb_s3tc_dxt1_ext a dxt1-compressed image in an srgb image format. ...
..._s3tc_dxt1_ext a dxt1-compressed image in an srgb image format. ext.compressed_srgb_alpha_s3tc_dxt1_ext a dxt1-compressed image in an srgb image format with a simple on/off alpha value. ext.compressed_srgb_alpha_s3tc_dxt3_ext a dxt3-compressed image in an srgba image format. ext.compressed_srgb_alpha_s3tc_dxt5_ext a dxt5-compressed image in an srgba image format. ...
...ssed image in an srgb image format. ext.compressed_srgb_alpha_s3tc_dxt1_ext a dxt1-compressed image in an srgb image format with a simple on/off alpha value. ext.compressed_srgb_alpha_s3tc_dxt3_ext a dxt3-compressed image in an srgba image format. ext.compressed_srgb_alpha_s3tc_dxt5_ext a dxt5-compressed image in an srgba image format. ...
...And 6 more matches
WebGL2RenderingContext.texSubImage3D() - Web APIs
the webgl2renderingcon
text.texsubimage3d() method of the webgl api specifies a sub-rectangle of the current
texture. syntax void gl.texsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, arraybufferview? srcdata, optional srcoffset); void gl.texsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, imagebitmap? pixels); void gl.texsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, imagedata? pixels); void gl.texsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, htmlimageelement? pixels); void gl.texsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, htmlcanvaselement? pixels); void gl.texsubimag...
... zoffse...
... type, htmlcanvaselement? pixels); void gl.texsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, htmlvideoelement? pixels); void gl.texsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, glintptr offset); parameters target a glenum specifying the binding point (target) of the active
texture. possible values: gl.
texture_3d: a three-dimensional
texture. gl.
texture_2d_array: a two-dimensional array
texture. level a glint specifying the level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. xoffset a glint specifying the x offset within the
texture image. yoffset a glint specifying the y offset within the
texture image. zoffset a glint specifying the z offse...
...And 6 more matches
WebGLRenderingContext.getTexParameter() - Web APIs
the webglrenderingcon
text.gettexparameter() method of the webgl api returns information about the given
texture. syntax any gl.gettexparameter(target, pname); parameters target a glenum specifying the binding point (target). possible values: gl.
texture_2d: a two-dimensional
texture. gl.
texture_cube_map: a cube-mapped
texture. when using a webgl 2 con
text, the following values are available additionally: gl.
texture_3d: a three-dimensional
texture. gl.
texture_2d_array: a two-dimensional array
texture. pname a glenum specifying the information to query. ...
...ure. when using a webgl 2 con
text, the following values are available additionally: gl.
texture_3d: a three-dimensional
texture. gl.
texture_2d_array: a two-dimensional array
texture. pname a glenum specifying the information to query. possible values: pname return type description possible return values available in a webgl 1 con
text gl.
texture_mag_filter glenum
texture magnification filter gl.linear (default value), gl.nearest. gl.
texture_min_filter glenum
texture minification filter gl.linear, gl.nearest, gl.nearest_mipmap_nearest, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear (default value), gl.linear_mipmap_linear. ...
... available in a webgl 1 con
text gl.
texture_mag_filter glenum
texture magnification filter gl.linear (default value), gl.nearest. gl.
texture_min_filter glenum
texture minification filter gl.linear, gl.nearest, gl.nearest_mipmap_nearest, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear (default value), gl.linear_mipmap_linear. gl.
texture_wrap_s glenum wrapping function for
texture coordinate s gl.repeat (default value), gl.clamp_to_edge, gl.mirrored_repeat. gl.
texture_wrap_t glenum wrapping function for
texture coordinate t gl.repeat (default value), gl.clamp_to_edge, gl.mirrored_repeat. ...
...And 6 more matches
text-decoration-skip - CSS: Cascading Style Sheets
the
text-decoration-skip css property sets what parts of an element’s content any
text decoration affecting the element must skip over. it controls all
text decoration lines drawn by the element and also any
text decoration lines drawn by its ancestors. note: most other browsers are converging on supporting the simpler
text-decoration-skip-ink property. ...
... the
text-decoration-skip css property sets what parts of an element’s content any
text decoration affecting the element must skip over. it controls all
text decoration lines drawn by the element and also any
text decoration lines drawn by its ancestors. note: most other browsers are converging on supporting the simpler
text-decoration-skip-ink property. ...
...coration-skip css property sets what parts of an element’s content any
text decoration affecting the element must skip over. it controls all
text decoration lines drawn by the element and also any
text decoration lines drawn by its ancestors. note: most other browsers are converging on supporting the simpler
text-decoration-skip-ink property. ...
...And 6 more matches
text-rendering - CSS: Cascading Style Sheets
the
text-rendering css property provides information to the rendering engine about what to optimize for when rendering
text. the browser makes trade-offs among speed, legibility, and geometric precision. /* keyword values */
text-rendering: auto;
text-rendering: optimizespeed;
text-rendering: optimizelegibility;
text-rendering: geometricprecision; /* global values */
text-rendering: inherit;
text-rendering: initial;
text-rendering: unset; note: the
text-rendering property is an svg property that is not defined in any css standard. however, gecko and webkit browsers let you apply this property to html and xml content on windows, macos, and linux. ...
...for differences in how this value is interpreted by the browser, see the compatibility table. ...
...it disables kerning and ligatures. ...
...And 6 more matches
<button>: The Button element - HTML: Hypertext Markup Language
there is no form owner. formenctype html5 if the button is a submit button (it's inside/associated with a <form> and doesn't have type="button"), specifies how to encode the form data that is submitted. possible values: application/x-www-form-urlencoded: the default if the attribute is not used. multipart/form-data: use to submit <input> elements with their type attributes set to file.
text/plain: specified as a debugging aid; shouldn’t be used for real form submission. if this attribute is specified, it overrides the enctype attribute of the button's form owner. formmethod html5 if the button is a submit button (it's inside/associated with a <form> and doesn't have type="button"), this attribute specifies the http method used to submit the form. possible values: post:...
... novalidate attribute of the button's form owner. this attribute is also available on <input type="image"> and <input type="submit"> elements. formtarget html5 if the button is a submit button, this attribute is a author-defined name or standardized, underscore-prefixed keyword indicating where to display the response from submitting the form. ...
...d name or standardized, underscore-prefixed keyword indicating where to display the response from submitting the form. this is the name of, or keyword for, a browsing con
text (a tab, window, or <iframe>). if this attribute is specified, it overrides the target attribute of the button's form owner. the following keywords have special meanings: _self: load the response into the same browsing con
text as the current one. this is the default if the attribute is not specified. _blank: load the response into a new unnamed browsing con
text — usually a new tab or window, depending on the user’s browser settings. _parent: load the response into the parent browsing con
text of the current one. if there is no parent, this option behaves the same way as _self. _top: load the response into the ...
...And 6 more matches
<input type="time"> - HTML: Hypertext Markup Language
elements of type time create input fields designed to let the user easily enter a time (hours and minutes, and optionally seconds). the control's user interface will vary from browser to browser. support is good in modern browsers, with safari being the sole major browser not yet implementing it; in safari, and any other browsers that don't support <time>, it degrades gracefully to <input type="
text">. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. appearance chrome and opera in chrome/opera the time control is simple, with slots to enter hours and minutes in 12 or 24-hour format depending on operating system lo...
...dds code to the time input to watch for the input event, which is triggered every time the contents of an input element change. when this happens, the contents of the <span> are replaced with the new value of the input element. var starttime = document.getelementbyid("starttime"); var valuespan = document.getelementbyid("value"); starttime.addeventlistener("input", function() { valuespan.inner
text = starttime.value; }, false); when a form including a time input is submitted, the value is encoded before being included in the form's data. the form's data entry for a time input will always be in the form name=hh%3amm, or name=hh%3amm%3ass if seconds are included (see using the step attribute). additional attributes in addition to the attributes common to all <input> elements, time inputs...
... support as mentioned above, safari and a few other, less common, browsers don't yet support time inputs natively. in general, otherwise, support is good — especially on mobile platforms, which tend to have very nice user interfaces for specifying a time value. ...
...And 6 more matches
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
attributes. deprecated attributes align deprecated since html4obsolete since html5 this enumerated attribute specifies how horizontal alignment of each cell content will be handled. possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the
textual content so that the content is justified in the cell char, aligning the
textual content on a special character with a minimal offset, defined by the char and charoff attributes unimplemented (see bug 2212). if this attribute is not set, the left value is assumed. note: do not use this attribute as it is obsolete (not supported) in the latest standard. to achieve the same effect as...
... bgcolor this attribute defines the background color of each cell of the column. it is one of the 6-digit hexadecimal code as defined in srgb, prefixed by a '#'. ...
... bgcolor this attribute defines the background color of each cell of the column. ...
...And 6 more matches
<thead>: The Table Head element - HTML: Hypertext Markup Language
includes the global attributes. deprecated attributes align in html 4, in html5 this enumerated attribute specifies how horizontal alignment of each cell content will be handled. possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the
textual content so that the content is justified in the cell char, aligning the
textual content on a special character with a minimal offset, defined by the char and charoff attributes unimplemented (see bug 2212). if this attribute is not set, the left value is assumed. note: do not use this attribute as it is obsolete (not supported) in the latest standard. to achieve the same effect as...
... bgcolor this attribute defines the background color of each cell of the column. it is one of the 6-digit hexadecimal code as defined in srgb, prefixed by a '#'. ...
... bgcolor this attribute defines the background color of each cell of the column. ...
...And 6 more matches
Object.preventExtensions() - JavaScript
the object.preven
textensions() method prevents new properties from ever being added to an object (i.e. prevents future extensions to the object). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax object.preven
textensions(obj) parameters obj the object which should be made non-extensible. return value the object being made non-extensible. description an object is extensible if new properties can be added to it. object.preven
textensions() marks an object as no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible. note that the prope...
... longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible. note that the properties of a non-extensible object, in general, may still be deleted. attempting to add new properties to a non-extensible object will fail, either silently or by throwing a typeerror (most commonly, but not exclusively, when in strict mode). object.preven
textensions() only prevents addition of own properties. properties can still be added to the object prototype. this method makes the [[prototype]] of the target immutable; any [[prototype]] re-assignment will throw a typeerror. this behavior is specific to the internal [[prototype]] property, other properties of the target object will remain mutable. there is no way to make an object extensible ag...
... be added to the object prototype. this method makes the [[prototype]] of the target immutable; any [[prototype]] re-assignment will throw a typeerror. this behavior is specific to the internal [[prototype]] property, other properties of the target object will remain mutable. there is no way to make an object extensible again once it has been made non-extensible. ...
...And 6 more matches
<mtext> - MathML
you can use #rgb, #rrggbb and html color names. mathsize the size of the content. see length for possible values. deprecated values are: small, normal and big. these will be removed in the future. ...
...you can use #rgb, #rrggbb and html color names. mathsize the size of the content. see length for possible values. deprecated values are: small, normal and big. these will be removed in the future. ...
...you can use #rgb, #rrggbb and html color names. mathsize the size of the content. see length for possible values. deprecated values are: small, normal and big. these will be removed in the future. mathvariant this attribute specifies the logical class of the identifier, which varies in typography. ...
...And 6 more matches
textbox.type - Archive of obsolete content
« xul reference home type type: one of the values below you can set the type attribute to one of the values below for a more specialized type of
textbox. don't set the type if you wish to use a regular
textbox. autocomplete a
textbox that supports autocomplete. for more information about autocomplete
textboxes, see the autocomplete documentation (xpfe [thunderbird/seamonkey]) (firefox) number a
textbox that only allows the user to enter numbers. in addition, arrow buttons appear next to the
textbox to let the user step through values. ...
...the command event will fire as the user modifies the value. a listener for the command event should update search results. ...
...the command event will fire as the user modifies the value. a listener for the command event should update search results. if the searchbutton attribute is set to true, the command event is only fired if the user presses the search button or presses the enter key. ...
...And 5 more matches
JS_ClearContextThread
obsolete since jsapi 8this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. transfer a jscon
text from one thread to another. syntax jsword js_clearcon
textthread(jscon
text *cx); jsword js_setcon
textthread(jscon
text *cx); name type description cx jscon
text * the con
text to transfer from one thread to another. there must not be any active or suspended requests using this con
text. ...
...ansfer a jscon
text from one thread to another. syntax jsword js_clearcon
textthread(jscon
text *cx); jsword js_setcon
textthread(jscon
text *cx); name type description cx jscon
text * the con
text to transfer from one thread to another. there must not be any active or suspended requests using this con
text. description an application that creates or uses a jscon
text in one thread, then uses or destroys it in another thread, must use js_clearcon
textthread and js_setcon
textthread to transfer the jscon
text safely from one thread to the other. the rules for using jscon
texts in multiple threads are: each jscon
text may only be used by one thread at a time. each request runs from start to finish on a single thread. ...
... uses a jscon
text in one thread, then uses or destroys it in another thread, must use js_clearcon
textthread and js_setcon
textthread to transfer the jscon
text safely from one thread to the other. the rules for using jscon
texts in multiple threads are: each jscon
text may only be used by one thread at a time. each request runs from start to finish on a single thread. before transferring a jscon
text from thread a to thread b, thread a must call js_clearcon
textthread. this is the last thing thread a does with the con
text. before thread b uses the jscon
text, it must call js_setcon
textthread. this is the first thing thread b does with the con
text, before beginning a request. ...
...And 5 more matches
JS_ContextIterator
obsolete since jsapi 52this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. cycles through the js con
texts associated with a particular jsruntime. syntax jscon
text * js_con
textiterator(jsruntime *rt, jscon
text **iterp); name type description rt jsruntime * the runtime to walk. iterp jscon
text * in-out parameter. on input, *iterp must be null or point to a con
text in rt. ...
...ed with a particular jsruntime. syntax jscon
text * js_con
textiterator(jsruntime *rt, jscon
text **iterp); name type description rt jsruntime * the runtime to walk. iterp jscon
text * in-out parameter. on input, *iterp must be null or point to a con
text in rt. on success, the value of *iterp is modified so that repeated calls cycle through all the con
texts in rt. description js_con
textiterator steps through the set of con
texts associated with the runtime rt. each call to js_con
textiterator returns the next con
text in the cycle. iterp must point to a variable of type jscon
text *. if *iterp is null, js_con
textiterator modifies it to point to the first jscon
text in the list. ...
...rough all the con
texts in rt. description js_con
textiterator steps through the set of con
texts associated with the runtime rt. each call to js_con
textiterator returns the next con
text in the cycle. iterp must point to a variable of type jscon
text *. if *iterp is null, js_con
textiterator modifies it to point to the first jscon
text in the list. otherwise *iterp must point to an existing con
text in rt, and js_con
textiterator modifies it to point to the next con
text in the list, if any, and null otherwise. js_con
textiterator returns the new value of *iterp. ...
...And 5 more matches
AudioContextOptions.sampleRate - Web APIs
the value must be compatible with audiobuffer.samplerate. ...
...the value must be compatible with audiobuffer.samplerate. ...
...the value must be compatible with audiobuffer.samplerate. ...
...And 5 more matches
BaseAudioContext.createBuffer() - Web APIs
note: createbuffer() used to be able to take compressed data and give back decoded samples, but this ability was removed from the spec, because all the decoding was done on the main thread, therefore createbuffer() was blocking other code execution. the asynchronous method decodeaudiodata() does the same thing — takes compressed audio, say, an mp3 file, and directly gives you back an audiobuffer that you can then set to play via in an audiobuffersourcenode. ...
...hread, therefore createbuffer() was blocking other code execution. the asynchronous method decodeaudiodata() does the same thing — takes compressed audio, say, an mp3 file, and directly gives you back an audiobuffer that you can then set to play via in an audiobuffersourcenode. for simple uses like playing an mp3, decodeaudiodata() is what you should be using. syntax var buffer = baseaudiocon
text.createbuffer(numofchannels, length, samplerate); parameters note: for an in-depth explanation of how audio buffers work, and what these parameters mean, read audio buffers: frames, samples and channels from our basic concepts guide. numofchannels an integer representing the number of channels this buffer should have. the default value is 1, and all user agents must support at least 32 cha...
...ns notsupportederror one or more of the options are negative or otherwise has an invalid value (such as numberofchannels being higher than supported, or a samplerate outside the nominal range). rangeerror there isn't enough memory available to allocate the buffer. ...
...And 5 more matches
CanvasRenderingContext2D.arcTo() - Web APIs
the arc is automatically connected to the path's latest point with a straight line, if necessary for the specified parameters. this method is commonly used for making rounded corners. note: be aware that you may get unexpected results when using a relatively large radius: the arc's connecting line will go in whatever direction it must to meet the specified radius. syntax void ctx.arcto(x1, y1, x2, y2, radius); parameters x1 the x-axis coordinate of the first control point. y1 the y-axis coordinate of the first control point. x2 the x-axis coordinate of the second control point. ...
... point to a first control point, and another from there to a second control point. without arcto(), these two segments would form a sharp corner: arcto() creates a circular arc that fits this corner and smooths is out. in other words, the arc is tangential to both segments. ...
...t specified by moveto(): (230, 20). it is shaped to fit control points at (90, 130) and (20, 20), and has a radius of 50. the lineto() method connects the arc to (20, 20) with a straight line. note that the arc's second control point and the point specified by lineto() are the same, which produces a totally smooth corner. ...
...And 5 more matches
CanvasRenderingContext2D.drawFocusIfNeeded() - Web APIs
the canvasrenderingcon
text2d.drawfocusifneeded() method of the canvas 2d api draws a focus ring around the current or given path, if the specified element is focused. syntax void ctx.drawfocusifneeded(element); void ctx.drawfocusifneeded(path, element); parameters element the element to check whether it is focused or not. path a path2d path to use. examples managing button focus this example draws two buttons on a canvas. the drawfocusifneeded() method is used to draw a focus ring when appropriate. ...
... or not. path a path2d path to use. examples managing button focus this example draws two buttons on a canvas. the drawfocusifneeded() method is used to draw a focus ring when appropriate. ...
...{ button1.focus(); } // focus button2, if appropriate drawbutton(button2, 20, 80); if (ctx.ispointinpath(x, y)) { button2.focus(); } } function drawbutton(el, x, y) { const active = document.activeelement === el; const width = 150; const height = 40; // button background ctx.fillstyle = active ? ...
...And 5 more matches
CanvasRenderingContext2D.putImageData() - Web APIs
if a dirty rectangle is provided, only the pixels from that rectangle are painted. this method is not affected by the canvas transformation matrix. note: image data can be retrieved from a canvas using the getimagedata() method. you can find more information about putimagedata() and general manipulation of canvas contents in the article pixel manipulation with canvas. syntax void ctx.putimagedata(imagedata, dx, dy); void ctx.putimagedata(imagedata, dx, dy, dirtyx, dirtyy, dirtywidth, dirtyheight); parameters imagedata an imagedata object containing the array of pixel values. ...
... optional height of the rectangle to be painted. defaults to the height of the image data. errors thrown notsupportederror thrown if any of the arguments is infinite. invalidstateerror thrown if the imagedata object's data has been detached. ...
...ny of the arguments is infinite. invalidstateerror thrown if the imagedata object's data has been detached. examples understanding putimagedata to understand what this algorithm does under the hood, here is an implementation on top of canvasrenderingcon
text2d.fillrect(). ...
...And 5 more matches
File.getAsText() - Web APIs
obsolete since gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. summary the getas
text method provides the file's data interpreted as
text using a given encoding. note: this method is obsolete; you should use the filereader method readas
text() instead. syntax var str = instanceoffile.getas
text(encoding); parameters encoding a string indicating the encoding to use for the returned data. if this string is empty, utf-8 is assumed. returns a string containing the file's data interpreted as
text in the specified encoding. example // fileinput is a htmlinputelement: <input type="file" id="myfileinput" multiple> var file...
...ing containing the file's data interpreted as
text in the specified encoding. ...
...ing the file's data interpreted as
text in the specified encoding. ...
...And 5 more matches
TextTrack: cuechange event - Web APIs
the cuechange event fires when a
texttrack has changed the currently displaying cues. the event is fired at both the
texttrack and at the htmltrackelement in which it's being presented, if any. ...
... the cuechange event fires when a
texttrack has changed the currently displaying cues. the event is fired at both the
texttrack and at the htmltrackelement in which it's being presented, if any. ...
...n a
texttrack has changed the currently displaying cues. the event is fired at both the
texttrack and at the htmltrackelement in which it's being presented, if any. ...
...And 5 more matches
TextTrack - Web APIs
the
texttrack interface—part of the api for handling webvtt (
text tracks on media presentations)—describes and controls the
text track associated with a particular <track> element. properties this interface also inherits properties from eventtarget.
texttrack.activecues read only a
texttrackcuelist object listing the currently active set of
text track cues. track cues are active if the current playback position of the media is between the cues' start and end times. thus, for displayed cues such as captions or subtitles, the active cues are currently being displayed.
texttrack.cues read only a
texttrackcuelist which contains all of the track's cues.
texttrack.id read only a domstring which identifies the track, if it has one. if it doesn't have an id, then this value is an e...
...of the media is between the cues' start and end times. thus, for displayed cues such as captions or subtitles, the active cues are currently being displayed.
texttrack.cues read only a
texttrackcuelist which contains all of the track's cues.
texttrack.id read only a domstring which identifies the track, if it has one. if it doesn't have an id, then this value is an empty string (""). if the
texttrack is associated with a <track> element, then the track's id matches the element's id.
texttrack.inbandmetadatatrackdispatchtype read only returns a domstring which indicates the track's in-band metadata track dispatch type. ...
...track.id read only a domstring which identifies the track, if it has one. if it doesn't have an id, then this value is an empty string (""). if the
texttrack is associated with a <track> element, then the track's id matches the element's id.
texttrack.inbandmetadatatrackdispatchtype read only returns a domstring which indicates the track's in-band metadata track dispatch type. needs details
texttrack.kind read only returns a domstring indicating what kind of
text track the
texttrack describes. the value must be one of those in the
texttrackkind enum. ...
...And 5 more matches
TextTrackList - Web APIs
onchange an event handler to be called when the change event occurs. ...
... onchange an event handler to be called when the change event occurs. ...
... onchange an event handler to be called when the change event occurs. ...
...And 5 more matches
WebGLRenderingContext.makeXRCompatible() - Web APIs
the webglrenderingcon
text method makexrcompatible() ensures that the rendering con
text described by the webglrenderingcon
text is ready to render the scene for the immersive webxr device on which it will be displayed. if necessary, the webgl layer may reconfigure the con
text to be ready to render to a different device than it originally was. this is useful if you have an application which can start out being presented on a standard 2d display but can then be transitioned to a 3d immersion system. syntax let makecompatpromise = webglrenderingcon
text.makexrcompatible(); parameters none. return value a promise which successfully resolves once the webgl con
text is ready to be used for rendering webxr content. exceptions this method doesn't throw traditional exceptions; instead, the promis...
...romise = webglrenderingcon
text.makexrcompatible(); parameters none. return value a promise which successfully resolves once the webgl con
text is ready to be used for rendering webxr content. exceptions this method doesn't throw traditional exceptions; instead, the promise rejects with one of the following errors as the value passed into the rejection handler: aborterror switching the con
text over to the webxr-compatible con
text failed. invalidstateerror the webgl con
text has been lost or there is no available webxr device. usage notes because makexrcompatible() may involve replacing the underlying webgl con
text with a new one that uses the new rendering hardware, the existing contents of the con
text may be lost and, therefore, would need to be re-rendered. this is why the webglc...
...ver to the webxr-compatible con
text failed. invalidstateerror the webgl con
text has been lost or there is no available webxr device. usage notes because makexrcompatible() may involve replacing the underlying webgl con
text with a new one that uses the new rendering hardware, the existing contents of the con
text may be lost and, therefore, would need to be re-rendered. this is why the webglcon
textlost and webglcon
textrestored events are used: the first gives you the opportunity to discard anything you won't need anymore, while the second gives you the opportunity to load resources and prepare to render the scene in its new con
text. while this method is available through the webglrenderingcon
text interface, it's actually defined by the webxr device api rather than by webgl. examples this...
...And 5 more matches
WebGLRenderingContext.vertexAttribPointer() - Web APIs
syntax void gl.vertexattribpointer(index, size, type, normalized, stride, offset); parameters index a gluint specifying the index of the vertex attribute that is to be modified. size a glint specifying the number of components per vertex attribute. must be 1, 2, 3, or 4. type a glenum specifying the data type of each component in the array. ...
... data type of each component in the array. possible values: gl.byte: signed 8-bit integer, with values in [-128, 127] gl.short: signed 16-bit integer, with values in [-32768, 32767] gl.unsigned_byte: unsigned 8-bit integer, with values in [0, 255] gl.unsigned_short: unsigned 16-bit integer, with values in [0, 65535] gl.float: 32-bit ieee floating point number when using a webgl 2 con
text, the following values are available additionally: gl.half_float: 16-bit ieee floating point number normalized a glboolean specifying whether integer data values should be normalized into a certain range when being cast to a float. for types gl.byte and gl.short, normalizes the values to [-1, 1] if true. for types gl.unsigned_byte and gl.unsigned_short, normalizes the va...
... the vertex attribute array. must be a multiple of the byte length of type. return value none. exceptions a gl.invalid_value error is thrown if offset is negative. a gl.invalid_operation error is thrown if stride and offset are not multiples of the size of the data type. a gl.invalid_operation error is thrown if no webglbuffer is bound to the array_buffer target. ...
...And 5 more matches
Adding 2D content to a WebGL context - Web APIs
the complete source code for this project is available on github. this project uses the glmatrix library to perform its matrix operations, so you will need to include that in your project. we're loading a copy from a cdn in our html's <head>. drawing the scene the most important thing to understand before we get started is that even though we're only rendering a square plane object in this example, we're still drawing in 3d space. ...
...der is a program, written using the opengl es shading language (glsl), that takes information about the vertices that make up a shape and generates the data needed to render the pixels onto the screen: namely, the positions of the pixels and their colors. there are two shader functions run when drawing webgl content: the vertex shader and the fragment shader. you write these in glsl and pass the
text of the code into webgl to be compiled for execution on the gpu. together, a set of vertex and fragment shaders is called a shader program. let's take a quick look at the two types of shader, with the example in mind of drawing a 2d shape into the webgl con
text. vertex shader each time a shape is rendered, the vertex shader is run for each vertex in the shape. its job is to transform the input ...
...l size, or any other factors. the vertex shader must perform the needed transforms on the vertex's position, make any other adjustments or calculations it needs to make on a per-vertex basis, then return the transformed vertex by saving it in a special variable provided by glsl, called gl_position. the vertex shader can, as needed, also do things like determine the coordinates within the face's
texture of the texel to apply to the vertex, apply the normals to determine the lighting factor to apply to the vertex, and so on. this information can then be stored in varyings or attributes as appropriate to be shared with the fragment shader. our vertex shader below receives vertex position values from an attribute we define called avertexposition. that position is then multiplied by two 4x4 matr...
...And 5 more matches
Block formatting context - Developer guides
floats (elements where float isn't none). absolutely positioned elements (elements where position is absolute or fixed). inline-blocks (elements with display: inline-block). table cells (elements with display: table-cell, which is the default for html table cells). table captions (elements with display: table-caption, which is the default for html table captions). ...
...e-flex) if they are neither flex nor grid nor table containers themselves. grid items (direct children of the element with display: grid or inline-grid) if they are neither flex nor grid nor table containers themselves. multicol containers (elements where column-count or column-width isn't auto, including elements with column-count: 1). column-span: all should always create a new formatting con
text, even when the column-span: all element isn't contained by a multicol container (spec change, chrome bug). formatting con
texts affect layout, but typically, we create a new block formatting con
text for the positioning and clearing floats rather than changing the layout, because an element that establishes a new block formatting con
text will: contain internal floats. exclude external floats.
...there's no floating children avaliable inside a flex/grid container, but exclude external floats and suppress margin collapsing still works. examples contain internal floats make float content and alongside content the same height. ...
...And 5 more matches
HTML attribute: rel - HTML: Hypertext Markup Language
url for the current document. link not allowed not allowed dns-prefetch tells the browser to preemptively perform dns resolution for the target resource's origin external resource not allowed not allowed external referenced document is not part of the same site as the current document. not allowed annotation annotation help link to con
text-sensitive help. link link link icon icon representing the current document. external resource not allowed not allowed license indicates that the main content of the current document is covered by the copyright license described by the referenced document. link link link manifest web app manifest link not allowed not allowed ...
...owed next indicates that the current document is a part of a series, and that the next document in the series is the referenced document. link link link nofollow indicates that the current document's original author or publisher does not endorse the referenced document. not allowed annotation annotation noopener creates a top-level browsing con
text that is not an auxiliary browsing con
text if the hyperlink would create either of those to begin with (i.e., has an appropriate target attribute value). not allowed annotation annotation noreferrer no referer header will be included. additionally, has the same effect as noopener. not allowed annotation annotation opener creates an auxiliary browsing conte...
...reate either of those to begin with (i.e., has an appropriate target attribute value). not allowed annotation annotation noreferrer no referer header will be included. additionally, has the same effect as noopener. not allowed annotation annotation opener creates an auxiliary browsing con
text if the hyperlink would otherwise create a top-level browsing con
text that is not anauxiliary browsing con
text (i.e., has "_blank" as target attribute value). not allowed annotation annotation pingback gives the address of the pingback server that handles pingbacks to the current document. external resource not allowed not allowed preconnect specifies that the user agent should preemptively connect to the target resource's ...
...And 5 more matches
<colgroup> - HTML: Hypertext Markup Language
ference when updating existing code and for historical interest only. align this enumerated attribute specifies how horizontal alignment of each column cell content will be handled. ...
...this enumerated attribute specifies how horizontal alignment of each column cell content will be handled. possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the
textual content so that the content is justified in the cell char, aligning the
textual content on a special character with a minimal offset, defined by the char and charoff attributes. if this attribute is not set, the left value is assumed. the descendant <col> elements may override this value using their own align attribute. note: do not try to set the
text-align property on a selector giving a <colgroup> element. because <td> elements are not descendant of the <co...
... if the table does use a colspan attribute, the effect can be achieved by combining adequate css attribute selectors like [colspan=n], though this is not trivial. bgcolor the background color of the table. it is a 6-digit hexadecimal rgb code, prefixed by a '#'. one of the predefined color kewords can also be used. ...
...And 5 more matches
<input type="button"> - HTML: Hypertext Markup Language
source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. note: while <input> elements of type button are still perfectly valid html, the newer <button> element is now the favored way to create buttons. given that a <button>’s label
text is inserted between the opening and closing tags, you can include html in the label, even images. value a domstring used as the button's label events click supported common attributes type, and value idl attributes value methods none value an <input type="button"> elements' value attribute contains a domstring that is used as t...
...ype="button"> elements have no default behavior (their cousins, <input type="submit"> and <input type="reset"> are used to submit and reset forms, respectively). to make buttons do anything, you have to write javascript code to do the work. ...
...addeventlistener() is then used to establish a function that will be run when click events occur on the button. ...
...And 5 more matches
<input type="submit"> - HTML: Hypertext Markup Language
n attribute, if any formenctype a string specifying the encoding type to use for the form data formmethod the http method (get or post) to use when submitting the form. formnovalidate a boolean which, if present, means the form's fields will not be subjected to constraint validation before submitting the data to the server formtarget the browsing con
text into which to load the response returned by the server after submitting the form formaction a string indicating the url to which to submit the data. this takes precedence over the action attribute on the <form> element that owns the <input>. this attribute is also available on <input type="image"> and <button> elements. formenctype a string that identifies the encoding method to use wh...
... attribute on the <form> element that owns the <input>. this attribute is also available on <input type="image"> and <button> elements. formenctype a string that identifies the encoding method to use when submitting the form data to the server. there are three permitted values: application/x-www-form-urlencoded this, the default value, sends the form data as a string after url encoding the
text using an algorithm such as encodeuri(). multipart/form-data uses the formdata api to manage the data, allowing for files to be submitted to the server. you must use this encoding type if your form includes any <input> elements of type file (<input type="file">).
text/plain plain
text; mostly useful only for debugging, so you can easily see the data that's to be submitted. if specified, the ...
...uld not be validated before submission to the server. this overrides the value of the novalidate attribute on the element's owning form. this attribute is also available on <input type="image"> and <button> elements. formtarget a string which specifies a name or keyword that indicates where to display the response received after submitting the form. the string must be the name of a browsing con
text (that is, a tab, window, or <iframe>. a value specified here overrides any target given by the target attribute on the <form> that owns this input. in addition to the actual names of tabs, windows, or inline frames, there are a few special keywords that can be used: _self loads the response into the same browsing con
text as the one that contains the form. this will replace the current docume...
...And 5 more matches
Global attributes - HTML: Hypertext Markup Language
the following global attributes also exist: xml:lang and xml:base — these are inherited from the xhtml specifications and deprecated, but kept for compatibility purposes. the multiple aria-* attributes, used for improving accessibility. ...
..., onsort, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting. list of global attributes accesskey provides a hint for generating a keyboard shortcut for the current element. this attribute consists of a space-separated list of characters. the browser should use the first one that exists on the computer keyboard layout. autocapitalize controls whether and how
text input is automatically capitalized as it is entered/edited by the user. it can have the following values: off or none, no autocapitalization is applied (all letters default to lowercase) on or sentences, the first letter of each sentence defaults to a capital letter; all other letters default to lowercase words, the first letter of each word defaults to a capital letter; all other letters...
...d document.getelementsbyclassname(). contenteditable an enumerated attribute indicating if the element should be editable by the user. if so, the browser modifies its widget to allow editing. the attribute must take one of the following values: true or the empty string, which indicates that the element must be editable; false, which indicates that the element must not be editable. con
textmenu the id of a <menu> to use as the con
textual menu for this element. data-* forms a class of attributes, called custom data attributes, that allow proprietary information to be exchanged between the html and its dom representation that may be used by scripts. all such custom data are available via the htmlelement interface of the element the attribute is set on. the htmlelement.dataset prop...
...And 5 more matches
Inline elements - HTML: Hypertext Markup Language
since this is a presentational characteristic it is nowadays specified by css in the flow layout. inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content. in this article, we'll examine html inline-level elements and how they differ from block-level elements. an inline element does not start on a new line and only takes up as much width as necessary. inline vs. block-level elements: a demonstration this is most easily demonstrated with a simple example. ...
...css that we'll be using: .highlight { background-color:#ee3; } inline let's look at the following example which demonstrates an inline element: <div>the following span is an <span class="highlight">inline element</span>; its background has been colored to display both the beginning and end of the inline element's influence.</div> in this example, the <div> block-level element contains some
text. ...
...using: .highlight { background-color:#ee3; } inline let's look at the following example which demonstrates an inline element: <div>the following span is an <span class="highlight">inline element</span>; its background has been colored to display both the beginning and end of the inline element's influence.</div> in this example, the <div> block-level element contains some
text. ...
...And 5 more matches
text-decoration - SVG: Scalable Vector Graphics
the
text-decoration attribute defines whether
text is decorated with an underline, overline and/or strike-through. it is a shorthand for the
text-decoration-line and
text-decoration-style properties. the fill and stroke of the
text decoration are given by the fill and stroke of the
text at the point where the
text decoration is declared. the paint order of the
text decoration, i.e. the fill and stroke, is determined by the value of the paint-order attribute at the point where the
text decoration is declared. note: as a presentation attribute,
text-decoration can be used as a css property. see the css
text-decoration property for more information. ...
...e fill and stroke, is determined by the value of the paint-order attribute at the point where the
text decoration is declared. note: as a presentation attribute,
text-decoration can be used as a css property. see the css
text-decoration property for more information. ...
...nd stroke, is determined by the value of the paint-order attribute at the point where the
text decoration is declared. note: as a presentation attribute,
text-decoration can be used as a css property. see the css
text-decoration property for more information. ...
...And 5 more matches
JS_NewContext
create a new jscon
text. syntax jscon
text * js_newcon
text(jsruntime *rt, size_t stackchunksize); name type description rt jsruntime * parent runtime for the new con
text. javascript objects, functions, strings, and numbers may be shared among the con
texts in a jsruntime, but they cannot be shared across jsruntimes. stackchunksize size_t the size, in bytes, of each "stack chunk". this is a memory management tuning parameter which most users should not adjust. 8192 is a good default value. description js_newcon
text creates a new jscon
text in the runtime rt. on success, it returns a pointer to the new con
text. otherwise it returns null. for more details about con
texts, see jscon
text. ...
...n bytes, of each "stack chunk". this is a memory management tuning parameter which most users should not adjust. 8192 is a good default value. description js_newcon
text creates a new jscon
text in the runtime rt. on success, it returns a pointer to the new con
text. otherwise it returns null. for more details about con
texts, see jscon
text. for sample code that creates and initializes a jscon
text, see jsapi user guide. the stackchunksize parameter does not control the javascript stack size. (the jsapi does not provide a way to adjust the stack depth limit.) passing a large number for stackchunksize is a mistake. ...
... initializes a jscon
text, see jsapi user guide. the stackchunksize parameter does not control the javascript stack size. (the jsapi does not provide a way to adjust the stack depth limit.) passing a large number for stackchunksize is a mistake. in a debug build, large chunk sizes can degrade performance dramatically. the usual value of 8192 is recommended. the application must call js_destroycon
text when it is done using the con
text. before a jsruntime may be destroyed, all the jscon
texts associated with it must be destroyed. the new jscon
text initially has no global object. the new jscon
text is associated with the calling thread. no other thread may use it or destroy it. ...
...And 4 more matches
AudioContext() - Web APIs
the audiocon
text() constructor creates a new audiocon
text object which represents an audio-processing graph, built from audio modules linked together, each represented by an audionode. syntax var audioctx = new audiocon
text(); var audioctx = new audiocon
text(options); parameters options optional an object based on the audiocon
textoptions dictionary that contains zero or more optional properties to configure the new con
text. available properties are as follows: latencyhint optional the type of playback that the con
text will be used for, as a value from the audiocon
textlatencycategory enum or a double-precision floating-point value indicating the preferred maximum latency of the con
text in seconds. the user agent may or may not choose to meet this request; check the value of audiocon...
...es to configure the new con
text. available properties are as follows: latencyhint optional the type of playback that the con
text will be used for, as a value from the audiocon
textlatencycategory enum or a double-precision floating-point value indicating the preferred maximum latency of the con
text in seconds. the user agent may or may not choose to meet this request; check the value of audiocon
text.baselatency to determine the true latency after creating the con
text. samplerate optional the samplerate to be used by the audiocon
text, specified in samples per second. the value may be any value supported by audiobuffer. if not specified, the preferred sample rate for the con
text's output device is used by default. return value the newly constructed audiocon
text instance. exceptions n...
.... samplerate optional the samplerate to be used by the audiocon
text, specified in samples per second. the value may be any value supported by audiobuffer. if not specified, the preferred sample rate for the con
text's output device is used by default. return value the newly constructed audiocon
text instance. exceptions notsupportederror the specified samplerate isn't supported by the con
text. usage notes the specification doesn't go into a lot of detail about things like how many audio con
texts a user agent should support, or minimum or maximum latency requirements (if any), so these details can vary from browser to browser. be sure to check the values if they matter to you. ...
...And 4 more matches
CanvasRenderingContext2D.addHitRegion() - Web APIs
canvas hit regions make hit detection easy. they let you route events to dom elements, and make it possible for users to explore the canvas without seeing it. syntax void ctx.addhitregion(options); options the options argument is optional. when provided, it is an object which can contain the following properties: path a path2d object describing the area of the hit region. if not provided, the current path is used. fillrule the algorithm by which to determine if a point is inside or outside the hit region. possible values: nonzero: the non-zero winding rule. default rule. evenodd: the even-odd winding rule. ...
...events, for example. parentid the id of the parent region for cursor fallback and navigation by accessibility tools. cursor the cursor to use when the mouse is over this region (defaults to inherit). inherits the cursor of the parent hit region, if any, or the canvas element's cursor. control an element (descendant of the canvas) to which events are to be routed. defaults to null. label a
text label for accessibility tools to use as a description of the region, if there is no control. defaults to null. role an aria role for accessibility tools to determine how to represent this region, if there is no control. defaults to null. examples using the addhitregion method this example demonstrates the addhitregion() method. html <canvas id="canvas"></canvas> javascript const canvas...
...egion, if there is no control. defaults to null. role an aria role for accessibility tools to determine how to represent this region, if there is no control. defaults to null. examples using the addhitregion method this example demonstrates the addhitregion() method. ...
...And 4 more matches
CanvasRenderingContext2D.miterLimit - Web APIs
the canvasrenderingcon
text2d.miterlimit property of the canvas 2d api sets the miter limit ratio. for more info about miters, see applying styles and color in the canvas tutorial. syntax ctx.miterlimit = value; options value a number specifying the miter limit ratio, in coordinate space units. zero, negative, infinity, and nan values are ignored. the default value is 10.0. examples using the miterlimit property see the chapter applying styles and color in the canvas tutorial for more information. ...
...gnored. the default value is 10.0. examples using the miterlimit property see the chapter applying styles and color in the canvas tutorial for more information. ...
... tutorial for more information. ...
...And 4 more matches
HTMLInputElement.setRangeText() - Web APIs
the htmlinputelement.setrange
text() method replaces a range of
text in an <input> or <
textarea> element with a new string. syntax element.setrange
text(replacement); element.setrange
text(replacement, start, end [, selectmode]); parameters replacement the string to insert. start optional the 0-based index of the first character to replace. defaults to the current selectionstart value (the start of the user's current selection). end optional the 0-based index of the character after the last character to replace. defaults to the current selectionend value (the end of the user's current selection). selectmode optional a string defining how the selection should be set after the
text has been replaced. possible values: "select" selects the newly inserted
text. "start"moves the se...
... end optional the 0-based index of the character after the last character to replace. defaults to the current selectionend value (the end of the user's current selection). selectmode optional a string defining how the selection should be set after the
text has been replaced. possible values: "select" selects the newly inserted
text. "start"moves the selection to just before the inserted
text. "end" moves the selection to just after the inserted
text. "preserve" attempts to preserve the selection. this is the default. ...
...ining how the selection should be set after the
text has been replaced. possible values: "select" selects the newly inserted
text. "start"moves the selection to just before the inserted
text. "end" moves the selection to just after the inserted
text. "preserve" attempts to preserve the selection. this is the default. example click the button in this example to replace part of the
text in the
text box. the newly inserted
text will be highlighted (selected) afterwards. ...
...And 4 more matches
OES_texture_half_float_linear - Web APIs
the oes_
texture_half_float_linear extension is part of the webgl api and allows linear filtering with half floating-point pixel types for
textures. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is available to both, webgl1 and webgl2 con
texts. linear filtering the oes_
texture_half_float extension alone does not allow linear filtering with half floating-point
textures. this extension enables this ability. ...
...ng extensions in the webgl tutorial. availability: this extension is available to both, webgl1 and webgl2 con
texts. linear filtering the oes_
texture_half_float extension alone does not allow linear filtering with half floating-point
textures. this extension enables this ability. with the help of this extension, you can now set the magnification or minification filter in the webglrenderingcon
text.texparameter() method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use half floating-point
textures. ...
...near filtering with half floating-point
textures. this extension enables this ability. with the help of this extension, you can now set the magnification or minification filter in the webglrenderingcon
text.texparameter() method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use half floating-point
textures. ...
...And 4 more matches
OVR_multiview2.framebufferTextureMultiviewOVR() - Web APIs
the ovr_multiview2.framebuffer
texturemultiviewovr() method of the webgl api attaches a multiview
texture to a webglframebuffer. syntax void ext.framebuffer
texturemultiviewovr(target, attachment,
texture, level, baseviewindex, numviews); parameters target a glenum specifying the binding point (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the
texture. ...
...age of color, alpha, depth and stencil buffers used to render an image. gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the
texture. possible values: gl.color_attachment0: attaches the
texture to the framebuffer's color buffer. gl.depth_attachment: attaches the
texture to the framebuffer's depth buffer. gl.stencil_attachment: attaches the
texture to the framebuffer's stencil buffer. gl.depth_stencil_attachment: depth and stencil buffer. gl.color_attachment1 gl.color_attachment2 gl.color_attachment3 gl.color_attachment4 gl.color_attachment5 gl.color_attachment6...
...must be 0. baseviewindex a glint specifying the base view index of the framebuffer object attachment. numviews a glsizei specifying the number of views of th...
...And 4 more matches
OffscreenCanvas.getContext() - Web APIs
the offscreencanvas.getcon
text() method returns a drawing con
text for an offscreen canvas, or null if the con
text identifier is not supported. note: this api is currently implemented for webgl1 and webgl2 con
texts only. see bug 801176 for canvas 2d api support from workers. syntax offscreen.getcon
text(con
texttype, con
textattributes); parameters con
texttype is a domstring containing the con
text identifier defining the drawing con
text associated to the canvas. possible values are: "2d" creates a canvasrenderingcon
text2d object representing a two-dimensional rendering con
text. "webgl" creates a webglrenderingcon
text object representing a three-dimensional rendering con
text. this con
text is only available on browsers that implement webgl version 1 (opengl es 2.0). "we...
... the drawing con
text associated to the canvas. possible values are: "2d" creates a canvasrenderingcon
text2d object representing a two-dimensional rendering con
text. "webgl" creates a webglrenderingcon
text object representing a three-dimensional rendering con
text. this con
text is only available on browsers that implement webgl version 1 (opengl es 2.0). "webgl2" creates a webgl2renderingcon
text object representing a three-dimensional rendering con
text. this con
text is only available on browsers that implement webgl version 2 (opengl es 3.0). "bitmaprenderer" creates a imagebitmaprenderingcon
text which only provides functionality to replace the content of the canvas with a given imagebitmap. note: the identifiers "experimental-webgl" or "experimental-webgl2" are also used ...
...o replace the content of the canvas with a given imagebitmap. note: the identifiers "experimental-webgl" or "experimental-webgl2" are also used in implementations of webgl. these implementations have not reached test suite conformance, or the graphic drivers situation on the platform is not yet stable. the khronos group certifies webgl implementations under certain conformance rules. con
textattributes you can use several con
text attributes when creating your rendering con
text, for example: offscreen.getcon
text("webgl", { antialias: false, depth: false }); 2d con
text attributes: alpha: boolean that indicates if the canvas contains an alpha channel. if set to false, the browser now knows that the backdrop is always opaque, which can speed ...
...And 4 more matches
TextTrack.mode - Web APIs
the
texttrack interface's mode property is a string specifying and controlling the
text track's mode: disabled, hidden, or showing. you can read this value to determine the current mode, and you can change this value to switch modes. safari additionally requires the default boolean attribute to be set to true when implementing your own video player controls in order for the subtitles cues to be shown. syntax var mode =
texttrack.mode;
texttrack.mode = "disabled" | "hidden" | "showing"; value a domstring which indicates the track's current mode. the
text track mode is one of the values listed below, under
text track mode constants. ...
...tionally requires the default boolean attribute to be set to true when implementing your own video player controls in order for the subtitles cues to be shown. syntax var mode =
texttrack.mode;
texttrack.mode = "disabled" | "hidden" | "showing"; value a domstring which indicates the track's current mode. the
text track mode is one of the values listed below, under
text track mode constants.
text track mode constants the
text track mode—sometimes identified using the idl enum
texttrackmode—must be one of the following values: disabled the
text track is currently disabled. while the track's presence is exposed in the dom, the user agent is otherwise ignoring it. no cues are active, no events are being fired, and the user agent won't attempt to obtain the track's cues. this is the ...
...
text track mode—sometimes identified using the idl enum
texttrackmode—must be one of the following values: disabled the
text track is currently disabled. while the track's presence is exposed in the dom, the user agent is otherwise ignoring it. no cues are active, no events are being fired, and the user agent won't attempt to obtain the track's cues. this is the default value, unless the
text track has the default boolean attribute is specified, in which case the default is showing. hidden the
text track is currently active but the cues aren't being displayed. if the user agent hasn't tried to obtain the track's cues yet, it will do so soon (thereby populating the track's
texttrack.cues property). the user agent is keeping a list of the active cues (in the track's activecues propert...
...And 4 more matches
WebGL2RenderingContext.texImage3D() - Web APIs
the webglrenderingcon
text.teximage3d() method of the webgl api specifies a three-dimensional
texture image. syntax void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, glintptr offset); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, htmlcanvaselement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, htmlimageelement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, htmlvideoelement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, imagebitmap source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format,...
...possible values: gl.alpha: discards the red, green and blue compon...
...mat, type, imagedata source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, arraybufferview? srcdata); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, arraybufferview srcdata, srcoffset); parameters target a glenum specifying the binding point (target) of the active
texture. possible values: gl.
texture_3d: a three-dimensional
texture. gl.
texture_2d_array: a two-dimensional array
texture. level a glint specifying the level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. internalformat a glint specifying the color components in the
texture. possible values: gl.alpha: discards the red, green and blue components and reads the alpha componen...
...And 4 more matches
WebGLRenderingContext.disable() - Web APIs
gl.dither deactivates dithering of color components before they get written to the color buffer. ...
... gl.dither deactivates dithering of color components before they get written to the color buffer. ...
...ties for this con
text. syntax void gl.disable(cap); parameters cap a glenum specifying which webgl capability to disable. possible values: constant description gl.blend deactivates blending of the computed fragment color values. see webglrenderingcon
text.blendfunc(). gl.cull_face deactivates culling of polygons. see webglrenderingcon
text.cullface(). gl.depth_test deactivates depth comparisons and updates to the depth buffer. see webglrenderingcon
text.depthfunc(). gl.dither deactivates dithering of color components before they get written to the color buffer. gl.polygon_offset_fill deactivates adding an offset to depth values of polygon's fragments. ...
...And 4 more matches
WebGLRenderingContext.enable() - Web APIs
gl.dither activates dithering of color components before they get written to the color buffer. ...
... gl.dither activates dithering of color components before they get written to the color buffer. ...
...pabilities for this con
text. syntax void gl.enable(cap); parameters cap a glenum specifying which webgl capability to enable. possible values: constant description gl.blend activates blending of the computed fragment color values. see webglrenderingcon
text.blendfunc(). gl.cull_face activates culling of polygons. see webglrenderingcon
text.cullface(). gl.depth_test activates depth comparisons and updates to the depth buffer. see webglrenderingcon
text.depthfunc(). gl.dither activates dithering of color components before they get written to the color buffer. gl.polygon_offset_fill activates adding an offset to depth values of polygon's fragments. ...
...And 4 more matches
-moz-context-properties - CSS: Cascading Style Sheets
the -moz-con
text-properties property can be used within privileged con
texts in firefox to share the values of specified properties of the element with a child svg image. if you reference an svg image in a webpage (such as with the <img> element or as a background image), the svg image can coordinate with the embedding element (its con
text) to have the image adopt property values set on the embedding element. to do this the embedding element needs to list the properties that are to be made available to the image by listing them as values of the -moz-con
text-properties property, and the image needs to opt in to using those properties by using values such as the con
text-fill value. ...
... stroke expose the stroke value set on the image to the embedded svg. ...
...ge adopt property values set on the embedding element. to do this the embedding element needs to list the properties that are to be made available to the image by listing them as values of the -moz-con
text-properties property, and the image needs to opt in to using those properties by using values such as the con
text-fill value. syntax /* keyword values */ -moz-con
text-properties: fill; -moz-con
text-properties: fill, stroke; /* global values */ -moz-con
text-properties: inherit; -moz-con
text-properties: initial; -moz-con
text-properties: unset; values fill expose the fill value set on the image to the embedded svg. stroke expose the stroke value set on the image to the embedded svg. fill-opacity expose the fill-opacity value set on the image to the embedded svg. stroke-opacity exp...
...And 4 more matches
text-justify - CSS: Cascading Style Sheets
the
text-justify css property sets what type of justification should be applied to
text when
text-align: justify; is set on an element.
text-justify: none;
text-justify: auto;
text-justify: inter-word;
text-justify: inter-character;
text-justify: distribute; /* deprecated value */ syntax the
text-justify property is specified as a single keyword chosen from the list of values below. values none the
text justification is turned off. this has the same effect as not setting
text-align at all, although it is useful if you need to turn justification on and off for some reason. ...
...low. values none the
text justification is turned off. this has the same effect as not setting
text-align at all, although it is useful if you need to turn justification on and off for some reason. auto the browser chooses the best type of justification for the current situation based on a balance between performance and quality, but also on what is most appropriate for the language of the
text (e.g., english, cjk languages, etc.). this is the default justification used if
text-justify is not set at all. inter-word the
text is justified by adding space between words (effectively varying word-spacing), which is most appropriate for languages that separate words using spaces, like english or korean. ...
... distribute exhibits the same behaviour as inter-character; this value is kept for backwards compatibility. ...
...And 4 more matches
The HTML autocomplete attribute - HTML: Hypertext Markup Language
autocomplete lets web developers specify what if any permission the user agent has to provide automated assistance in filling out form field values, as well as guidance to the browser as to the type of information expected in the field. the source of the suggested values is generally up to the browser; typically values come from past values entered by the user, but they may also come from pre-configured values. for instance, a browser might let the user save their name, address, phone number, and email addresses for autocomplete purposes. ...
...values come from past values entered by the user, but they may also come from pre-configured values. for instance, a browser might let the user save their name, address, phone number, and email addresses for autocomplete purposes. perhaps the browser offers the ability to save encrypted credit card information, for autocompletion following an authentication procedure. if an <input>, <select> or <
textarea> element has no autocomplete attribute, then browsers use the autocomplete attribute of the element's form owner, which is either the <form> element that the element is a descendant of, or the <form> whose id is specified by the form attribute of the element. for more information, see the autocomplete attribute in <form>. in order to provide autocompletion, user-agents might require <input...
...t has no autocomplete attribute, then browsers use the autocomplete attribute of the element's form owner, which is either the <form> element that the element is a descendant of, or the <form> whose id is specified by the form attribute of the element. for more information, see the autocomplete attribute in <form>. in order to provide autocompletion, user-agents might require <input>/<select>/<
textarea> elements to: have a name and/or id attribute be descendants of a <form> element the form to have a submit button values "off" the browser is not permitted to automatically enter or select a value for this field. it is possible that the document or application provides its own autocomplete feature, or that security concerns require that the field's value not be automatically enter...
...And 4 more matches
<col> - HTML: Hypertext Markup Language
ference when updating existing code and for historical interest only. align this enumerated attribute specifies how horizontal alignment of each column cell content will be handled. ...
...he cell justify, inserting spaces into the
textual content so that the content is justified in the cell if this attribute is not set, its value is inherited from the align of the <colgroup> element this <col> element belongs too. if there are none, the left value is assumed. note: to achieve the same effect as the left, center, right or justify values: do not try to set the
text-align property on a selector giving a <col> element. because <td> elements are not descendant of the <col> element, they won't inherit it. if the table doesn't use a colspan attribute, use the td:nth-child(an+b) css selector. set a to zero and b to the position of the column in the table, e.g. td:nth-child(2) {
text-align: right; } to right-align the second column. if the table does use a...
...ls in a column on. typical values for this include a period (.) when attempting to align numbers or monetary values. if align is not set to char, this attribute is ignored. charoff this attribute is used to indicate the number of characters to offset the column data from the alignment characters specified by the char attribute. ...
...And 4 more matches
<input type="color"> - HTML: Hypertext Markup Language
<input> elements of type color provide a user interface element that lets a user specify a color, either by using a visual color picker interface or by entering the color into a
text field in #rrggbb hexadecimal format. only simple colors (without alpha channel) are allowed though css colors has more formats, e.g. color names, functional notations and a hexadecimal format with an alpha channel. the element's presentation may vary substantially from one browser and/or platform to another—it might be a simple
textual input that automatically validates to ensure that the color information is entered in the proper format, or a platform-standard color picker, or some kind of custom color picker window. the source for this interactive example is stored in a github repository. if you'd like to...
...e value. this makes sense when you keep in mind that html and css are separate languages and specifications. in addition, colors with an alpha channel are not supported; specifying a color in 9-character hexadecimal notation (e.g. #009900aa) will also result in the color being set to #000000. note: any web browser that doesn't support an input of type color will naturally fall back to the type
text. because users can write colors in many different ways (such as rgb(255, 255, 0)), one way to work around this is to set a pattern attribute equal to either #[0-9a-f]{6} or #[0-9a-fa-f]{6} (preferably the latter because some users may not expect a different result with just a letter-case change) and set a placeholder attribute equal to a color representing the expected format of the user's input,...
...if the browser instead uses a color well, select() does nothing. you should be aware of this behavior so your code can respond appropriately in either case. colorwell.select(); appearance variations as previously mentioned, when a browser doesn't support a color picker ...
...And 4 more matches
<input type="month"> - HTML: Hypertext Markup Language
ase clone https://github.com/mdn/interactive-examples and send us a pull request. the control's ui varies in general from browser to browser; at the moment support is patchy, with only chrome/opera and edge on desktop — and most modern mobile browser versions — having usable implementations. in browsers that don't support month inputs, the control degrades gracefully to a simple <input type="
text">, although there may be automatic validation of the entered
text to ensure it's formatted as expected. for those of you using a browser that doesn't support month, the screenshot below shows what it looks like in chrome and opera. clicking the down arrow on the right hand side brings up a date picker that lets you select the month and year. the microsoft edge month control looks like this: ...
... type, and so forth). handling browser support as mentioned above, the major problem with using date inputs at the time of writing is that many major browsers don't yet implement them all; only chrome/opera and edge support it on desktop, and most modern browsers on mobile. ...
...for example: mmyyyy (072018) mm/yyyy (07/2018) mm-yyyy (07-2018) yyyy-mm (2018-07) month yyyy (july 2018) ... and so forth. one way around this is to put a pattern attribute on your month input. ...
...And 4 more matches
Features restricted to secure contexts - Web security
this reference lists the web platform features available only in secure con
texts — see secure con
texts for a definition and more details. current features available only in secure con
texts this section lists all the apis available only in secure con
texts, along with browser versions the limitation was introduced in, as appropriate. note: only the browsers that actually support secure con
texts are listed in this document. see here for information on secure con
texts support. api chrome/opera edge safari firefox async clipboard api 66 not supported not supported 63 background sync (see syncmanager, for example) 49 not supported not supported not supported cache-control: immutable not supported 15 ...
...torage api 55 not supported not supported 51 web authentication api 65 in preview (17) in development 60 web bluetooth 56 not supported not supported not supported web midi (see midiaccess, for example) 43 not supported not supported not supported web crypto api 60 79 not supported 75 secure con
text restrictions that vary by browser some browsers may decide to disable certain apis in non-secure con
texts or apply other restrictions/security measures, despite the spec not requiring them. this section lists any such differences existing in browsers. api chrome edge safari firefox application cache restricted to secure con
texts planned in chrome 70 depre...
...er restrictions/security measures, despite the spec not requiring them. this section lists any such differences existing in browsers. ...
...And 4 more matches
-ms-text-autospace - Archive of obsolete content
ideograph-parenthesis creates extra spacing between a normal (non-wide) parenthesis and an ideograph. ...
... ideograph-parenthesis creates extra spacing between a normal (non-wide) parenthesis and an ideograph. ...
... ideograph-parenthesis creates extra spacing between a normal (non-wide) parenthesis and an ideograph. ...
...And 3 more matches
Styling text - Learn web development
we round off the module by looking at applying custom fonts to your page, and styling lists and links. looking to become a front-end web developer? we have put together a course that includes all the essential information you need to work towards your goal. ...
...we round off the module by looking at applying custom fonts to your page, and styling lists and links. looking to become a front-end web developer? we have put together a course that includes all the essential information you need to work towards your goal. ...
...ss fundamentals, as discussed in introduction to css. note: if you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as jsbin, codepen or glitch. ...
...And 3 more matches
JS_DestroyContext
destroy a jscon
text. syntax void js_destroycon
text(jscon
text *cx); void js_destroycon
textnogc(jscon
text *cx); void js_destroycon
textmaybegc(jscon
text *cx); // obsolete since jsapi 14 name type description cx jscon
text * the con
text to destroy. description these functions destroy a con
text, cx. js_destroycon
text additionally performs garbage collection to reclaim any memory that was being used by cx's global object. js_destroycon
textnogc does not perform garbage collection. js_destroycon
textmaybegc may or may not perform garbage collection; the engine makes an educated guess as to whether enough memory would be reclaimed to justify the work. in a js_threadsafe build, it does not matter whether the calling thread is in a request on cx. however...
...ject. js_destroycon
textnogc does not perform garbage collection. js_destroycon
textmaybegc may or may not perform garbage collection; the engine makes an educated guess as to whether enough memory would be reclaimed to justify the work. in a js_threadsafe build, it does not matter whether the calling thread is in a request on cx. however, there must not be any suspended requests on cx. if js_setcon
textcallback has been called, this calls the callback. ...
...may not perform garbage collection; the engine makes an educated guess as to whether enough memory would be reclaimed to justify the work. in a js_threadsafe build, it does not matter whether the calling thread is in a request on cx. ...
...And 3 more matches
JS_GetContextPrivate
access a jscon
text field for application-specific data. syntax void * js_getcon
textprivate(jscon
text *cx); void js_setcon
textprivate(jscon
text *cx, void *data); void * js_getsecondcon
textprivate(jscon
text *cx); // added in spidermonkey 17 void js_setsecondcon
textprivate(jscon
text *cx, void *data); // added in spidermonkey 17 name type description cx jscon
text * any con
text. data void * (in js_setcon
textprivate or js_setsecondcon
textprivate) pointer to application-defined data to be associated with the con
text cx. description each jscon
text has two fields of type void * which the application may use for any purpose. they are especially useful for storing data needed by callbacks. ...
... description cx jscon
text * any con
text. data void * (in js_setcon
textprivate or js_setsecondcon
textprivate) pointer to application-defined data to be associated with the con
text cx. description each jscon
text has two fields of type void * which the application may use for any purpose. they are especially useful for storing data needed by callbacks. js_getcon
textprivate and js_getsecondcon
textprivate get this field and js_setcon
textprivate and js_setsecondcon
textprivate set it. the field is initially null. memory management for this private data is the application's responsibility. the javascript engine itself never uses it. ...
...or any purpose. they are especially useful for storing data needed by callbacks. js_getcon
textprivate and js_getsecondcon
textprivate get this field and js_setcon
textprivate and js_setsecondcon
textprivate set it. the field is initially null. memory management for this private data is the application's responsibility. the javascript engine itself never uses it. ...
...And 3 more matches
nsIFeedTextConstruct
toolkit/components/feeds/public/nsifeed
textconstruct.idlscriptable this interface represents rss or atom feed
text fields that may contain plain
text, html, or xhtml. some extension elements also include "type" parameters, and this interface could be used to represent those as well. 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8.1 (firefox 2 / thunderbird 2 / seamonkey 1.1) implemented by: @mozilla.org/feed-
textconstruct;1, but users usually don't need to create instances of this directly. various other feed-related interfaces, such as nsifeed, nsifeedentry, and nsifeedcontainer have attributes that return objects implementing nsifeed
textconstruct. method overview nsidomdocumentfragment createdocumentfragment(in ns...
...plemented by: @mozilla.org/feed-
textconstruct;1, but users usually don't need to create instances of this directly. various other feed-related interfaces, such as nsifeed, nsifeedentry, and nsifeedcontainer have attributes that return objects implementing nsifeed
textconstruct. method overview nsidomdocumentfragment createdocumentfragment(in nsidomelement element); astring plain
text(); attributes attribute type description base nsiuri if the
text construct contains html or xhtml, relative references in the content should be resolved against this base uri. lang astring the language of the
text (such as "en-us" for u.s. english).
text astring the actual
text content. this string may contain markup if the type ...
... nsidomdocumentfragment createdocumentfragment( in nsidomelement element ); parameters element the element in which to create the new document fragment. ...
...And 3 more matches
nsITextInputProcessorCallback
this interface has a "function" attribute. therefore, js-ime can implement this as a function. ...
...this interface has a "function" attribute. therefore, js-ime can implement this as a function. ...
...this interface has a "function" attribute. therefore, js-ime can implement this as a function. ...
...And 3 more matches
AudioContext.createJavaScriptNode() - Web APIs
see also scriptprocessornode. syntax var jsnode = audioctx.createjavascriptnode(buffersize, numinputchannels, numoutputchannels); parameters buffersize the buffer size must be in units of sample frames, i.e., one of: 256, 512, 1024, 2048, 4096, 8192, or 16384. it controls the frequency of callbacks asking for a buffer refill. smaller sizes allow for lower latency and higher for better overall quality. numinputchannels the number of input channels in the audio stream. ...
...r 16384. it controls the frequency of callbacks asking for a buffer refill. smaller sizes allow for lower latency and higher for better overall quality. numinputchannels the number of input channels in the audio stream. numoutputchannels the number of output channels in the audio stream. ...
...smaller sizes allow for lower latency and higher for better overall quality. numinputchannels the number of input channels in the audio stream. numoutputchannels the number of output channels in the audio stream. ...
...And 3 more matches
AudioContext.getOutputTimestamp() - Web APIs
the getoutputtimestamp() property of the audiocon
text interface returns a new audiotimestamp object containing two audio timestamp values relating to the current audio con
text. the two values are as follows: audiotimestamp.con
texttime: the time of the sample frame currently being rendered by the audio output device (i.e., output audio stream position), in the same units and origin as the con
text's audiocon
text.currenttime. basically, this is the time after the audio con
text was first created. audiotimestamp.performancetime: an estimation of the moment when the sample frame corresponding to the stored con
texttime value was rendered by the audio output device, in the same units and origin as performance.now(). ...
...igin as the con
text's audiocon
text.currenttime. basically, this is the time after the audio con
text was first created. audiotimestamp.performancetime: an estimation of the moment when the sample frame corresponding to the stored con
texttime value was rendered by the audio output device, in the same units and origin as performance.now(). this is the time after the document containing the audio con
text was first rendered. syntax var timestamp = audiocon
text.getoutputtimestamp() parameters none. returns an audiotimestamp object, which has the following properties. con
texttime: a point in the time coordinate system of the currenttime for the baseaudiocon
text; the time after the audio con
text was first created. performancetime: a point in the time coordinate system of a performance inte...
....getoutputtimestamp() parameters none. returns an audiotimestamp object, which has the following properties. con
texttime: a point in the time coordinate system of the currenttime for the baseaudiocon
text; the time after the audio con
text was first created. performancetime: a point in the time coordinate system of a performance interface; the time after the document containing the audio con
text was first rendered examples in the following code we start to play an audio file after a play button is clicked, and start off a requestanimationframe loop running, which constantly outputs the con
texttime and performancetime. you can see full code of this example at output-timestamp (see it live also). play.addeventlistener('click', () => { if(!audioctx) { audioctx = new window.audioc...
...And 3 more matches
BaseAudioContext.createPanner() - Web APIs
syntax baseaudioctx.createpanner(); returns a pannernode. example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation. ...
... syntax baseaudioctx.createpanner(); returns a pannernode. example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation. ...
...x) for setting position, etc. if it supports those, or older methods (like audiolistener.setorientation()) if it still supports those but not the new properties. ...
...And 3 more matches
BaseAudioContext.currentTime - Web APIs
console.log(audioctx.currenttime); reduced time precision to offer protection against timing attacks and fingerprinting, the precision of audioctx.currenttime might get rounded depending on browser settings. ...
... console.log(audioctx.currenttime); reduced time precision to offer protection against timing attacks and fingerprinting, the precision of audioctx.currenttime might get rounded depending on browser settings. ...
... console.log(audioctx.currenttime); reduced time precision to offer protection against timing attacks and fingerprinting, the precision of audioctx.currenttime might get rounded depending on browser settings. ...
...And 3 more matches
Body.text() - Web APIs
the
text() method of the body mixin takes a response stream and reads it to completion. it returns a promise that resolves with a usvstring object (
text). the response is always decoded using utf-8. syntax response.
text().then(function (
text) { // do something with the
text response }); parameters none. return value a promise that resolves with a usvstring. example in our fetch
text example (run fetch
text live), we have an <article> element and three links (stored in the mylinks array.) first, we loop through all of these and give each one an onclick event handler so that the getdata() function is run — with the link's data-page identifier passed to it as an argument — when one of the links is clicked. when getdata() is run, we create a new request using the request() construc...
... first, we loop through all of these and give each one an onclick event handler so that the getdata() function is run — with the link's data-page identifier passed to it as an argument — when one of the links is clicked. when getdata() is run, we create a new request using the request() constructor, then use it to fetch a specific .txt file. when the fetch is successful, we read a usvstring (
text) object out of the response using
text(), then set the innerhtml of the <article> element equal to the
text object. let myarticle = document.queryselector('article'); let mylinks = document.queryselectorall('ul a'); for(let i = 0; i <= mylinks.length-1; i++) { mylinks[i].onclick = function(e) { e.preventdefault(); let linkdata = e.target.getattribute('data-page'); getdata(linkdata...
... living standard ...
...And 3 more matches
CanvasRenderingContext2D.isPointInPath() - Web APIs
fillrule the algorithm by which to determine if a point is inside or outside the path. possible values: "nonzero": the non-zero winding rule. default rule. "evenodd": the even-odd winding rule. path a path2d path to check against. if unspecified, the current path is used. ...
... fillrule the algorithm by which to determine if a point is inside or outside the path. possible values: "nonzero": the non-zero winding rule. default rule. "evenodd": the even-odd winding rule. path a path2d path to check against. if unspecified, the current path is used. ...
... fillrule the algorithm by which to determine if a point is inside or outside the path. ...
...And 3 more matches
CanvasRenderingContext2D.setTransform() - Web APIs
note: see also the transform() method; instead of overriding the current transform matrix, it multiplies it with a given one. syntax ctx.settransform(a, b, c, d, e, f); ctx.settransform(matrix); the transformation matrix is described by: [acebdf001]\left[ \begin{array}{ccc} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{array} \right] parameters settransform() has two types of parameter that it can accept. ...
...trix to set (technically, a dommatrixinit object; any object will do as long as it contains the above components as properties). examples skewing a shape this example skews a rectangle both vertically (.2) and horizontally (.8). scaling and translation remain unchanged. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.settransform(1, .2, .8, 1, 0, 0); ctx.fillrect(0, 0, 100, 100); result retrieving and passing a dommatrix object in the following example, we have two <canvas> elements. we apply a transform to the first one's con
text using the first type of settransform() and draw a square on it, then retrieve the matrix from it using canvasrenderingcon
text2d.gettransform(). we then apply the ...
....fillrect(0, 0, 100, 100); result retrieving and passing a dommatrix object in the following example, we have two <canvas> elements. we apply a transform to the first one's con
text using the first type of settransform() and draw a square on it, then retrieve the matrix from it using canvasrenderingcon
text2d.gettransform(). we then apply the retrieved matrix directly to the second canvas con
text by passing the dommatrix object directly to settransform() (i.e. the second type), and draw a circle on it. ...
...And 3 more matches
Clipboard.writeText() - Web APIs
return value a promise which is resolved once the clipboard's contents have been updated. ...
... return value a promise which is resolved once the clipboard's contents have been updated. ...
... return value a promise which is resolved once the clipboard's contents have been updated. ...
...And 3 more matches
HTMLElement.contextMenu - Web APIs
the htmlelement.con
textmenu property refers to the con
text menu assigned to an element using the con
textmenu attribute. the menu itself is created using the <menu> element. ...
... the htmlelement.con
textmenu property refers to the con
text menu assigned to an element using the con
textmenu attribute. the menu itself is created using the <menu> element. ...
... the htmlelement.con
textmenu property refers to the con
text menu assigned to an element using the con
textmenu attribute. the menu itself is created using the <menu> element. ...
...And 3 more matches
HTMLMediaElement.textTracks - Web APIs
you can detect when tracks are added to and removed from an <audio> or <video> element using the addtrack and removetrack events. however, these events aren't sent directly to the media element itself. instead, they're sent to the track list object of the htmlmediaelement that corresponds to the type of track that was added to the element the returned list is live; that is, as tracks are added to and removed from the media element, the list's contents change dynamically. ...
...rectly to the media element itself. instead, they're sent to the track list object of the htmlmediaelement that corresponds to the type of track that was added to the element the returned list is live; that is, as tracks are added to and removed from the media element, the list's contents change dynamically. once you have a reference to the list, you can monitor it for changes to detect when new
text tracks are added or existing ones removed. see event handlers in
texttracklist to learn more about watching for changes to a media element's track list. syntax var
texttracks = mediaelement.
texttracks; value a
texttracklist object representing the list of
text tracks included in the media element. the list of tracks can be accessed using array notation, or using the object's gettrackbyid()...
...d. see event handlers in
texttracklist to learn more about watching for changes to a media element's track list. syntax var
texttracks = mediaelement.
texttracks; value a
texttracklist object representing the list of
text tracks included in the media element. the list of tracks can be accessed using array notation, or using the object's gettrackbyid() method. each track is represented by a
texttrack object which provides information about the track. examples we start with a <video> that has several <track> children <video controls poster="/images/sample.gif"> <source src="sample.mp4" type="video/mp4"> <source src="sample.ogv" type="video/ogv"> <track kind="captions" src="samplecaptions.vtt" srclang="en"> <track kind="descriptions" src="sampledescriptions.vtt" srclang="en"> ...
...And 3 more matches
ImageBitmapRenderingContext - Web APIs
ownership of the imagebitmap is transferred to the canvas. this was previously named transferimagebitmap(), but was renamed in a spec change. the old name is being kept as an alias to avoid code breakage. ...
...ownership of the imagebitmap is transferred to the canvas. this was previously named transferimagebitmap(), but was renamed in a spec change. the old name is being kept as an alias to avoid code breakage. ...
...ownership of the imagebitmap is transferred to the canvas. this was previously named transferimagebitmap(), but was renamed in a spec change. the old name is being kept as an alias to avoid code breakage. ...
...And 3 more matches
OES_texture_float_linear - Web APIs
the oes_
texture_float_linear extension is part of the webgl api and allows linear filtering with floating-point pixel types for
textures. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is available to both, webgl1 and webgl2 con
texts. linear filtering the oes_
texture_float extension alone does not allow linear filtering with floating-point
textures. this extension enables this ability. ...
...e also using extensions in the webgl tutorial. availability: this extension is available to both, webgl1 and webgl2 con
texts. linear filtering the oes_
texture_float extension alone does not allow linear filtering with floating-point
textures. this extension enables this ability. with the help of this extension, you can now set the magnification or minification filter in the webglrenderingcon
text.texparameter() method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use floating-point
textures. ...
...on alone does not allow linear filtering with floating-point
textures. this extension enables this ability. with the help of this extension, you can now set the magnification or minification filter in the webglrenderingcon
text.texparameter() method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use floating-point
textures. ...
...And 3 more matches
TextEncoder - Web APIs
textencoder takes a stream of code points as input and emits a stream of utf-8 bytes. note: there is a polyfill implementation to support non-utf-8
text encodings on github. example const encoder = new
textencoder() const view = encoder.encode('€') console.log(view); // uint8array(3) [226, 130, 172] constructor
textencoder() returns a newly constructed
textencoder that will generate a byte stream with utf-8 encoding. properties the
textencoder interface doesn't inherit any property.
textencoder.prototype.encodingread only always returns "utf-8". methods the
textencoder interface doesn't inherit any method.
textencoder.prototype.encode() takes a usvstring as input, and returns a uint8array containing utf-8 encoded
text. ...
...this is potentially more performant than the older encode() method. polyfill the below polyfill is compliant with the standard and therefore only supports utf-8. ...
...this is potentially more performant than the older encode() method. polyfill the below polyfill is compliant with the standard and therefore only supports utf-8. it is designed to work in ie5 "out of the box". however, in ie5-ie9, it will return a regular array instead of a typedarray. ...
...And 3 more matches
WebGLContextEvent - Web APIs
the webcon
textevent interface is part of the webgl api and is an interface for an event that is generated in response to a status change to the webgl rendering con
text. inheritance this interface inherits properties and methods from its parent interface, event. ...
...nline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/webglcon
textevent" target="_top"><rect x="116" y="1" width="170" height...
...aco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/webglcon
textevent" target="_top"><rect x="116" y="1" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="201" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">webglcon
textevent</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface inherits properties from its parent interface, event. ...
...And 3 more matches
WebGLTexture - Web APIs
the webgl
texture interface is part of the webgl api and represents an opaque
texture object providing storage and state for
texturing operations. description the webgl
texture object does not define any methods or properties of its own and its content is not directly accessible. ...
... the webgl
texture interface is part of the webgl api and represents an opaque
texture object providing storage and state for
texturing operations. description the webgl
texture object does not define any methods or properties of its own and its content is not directly accessible. ...
... the webgl
texture interface is part of the webgl api and represents an opaque
texture object providing storage and state for
texturing operations. description the webgl
texture object does not define any methods or properties of its own and its content is not directly accessible. ...
...And 3 more matches
Using the aria-valuetext attribute - Accessibility
the aria-value
text attribute is used to define the human readable
text alternative of aria-valuenow for a range widget such as progressbar, spinbutton or slider. authors should only set the aria-value
text attribute when the rendered value cannot be accurately represented as a number. for example, a slider may have rendered values of small, medium, and large. in this case, the values of aria-valuenow could range from 1 through 3, which indicate the position of each value in the value space, but thearia-value
text would be one of the strings: small, medium, or large. ...
...xample, a slider may have rendered values of small, medium, and large. in this case, the values of aria-valuenow could range from 1 through 3, which indicate the position of each value in the value space, but thearia-value
text would be one of the strings: small, medium, or large. value string representation of a number possible effects on user agents and assistive technology if the aria-value
text attribute is absent, assistive technologies will rely solely on the aria-valuenow attribute for the current value. if aria-value
text is specified, assistive technologies should render that value instead of the value of aria-valuenow. note: opinions may differ on how assistive technology should handle this technique. the information provided above is one of those opinions and therefore not normat...
...e technologies should render that value instead of the value of aria-valuenow. note: opinions may differ on how assistive technology should handle this technique. the information provided above is one of those opinions and therefore not normative. examples example 1: the snippet below shows a simple slider for selecting a day of the week. ...
...And 3 more matches
Stacking context example 1 - CSS: Cascading Style Sheets
without z-indexes, elements are stacked in order of occurrence. if div #2 is assigned a positive (non-zero and non-auto) z-index value, it is rendered above all the other divs. then if div #4 is also assigned a positive z-index greater than div #2's z-index, it is rendered above all the other divs including div #2. ...
...without z-indexes, elements are stacked in order of occurrence. if div #2 is assigned a positive (non-zero and non-auto) z-index value, it is rendered above all the other divs. then if div #4 is also assigned a positive z-index greater than div #2's z-index, it is rendered above all the other divs including div #2. ...
...without z-indexes, elements are stacked in order of occurrence. if div #2 is assigned a positive (non-zero and non-auto) z-index value, it is rendered above all the other divs. then if div #4 is also assigned a positive z-index greater than div #2's z-index, it is rendered above all the other divs including div #2. ...
...And 3 more matches
Inline formatting context - CSS: Cascading Style Sheets
the boxes in the horizontal writing mode run horizontally, and the vertical writing mode boxes run vertically. ...
...endering of a web page. inline boxes are laid out one after the other, in the direction sentences run in the writing mode in use: in a horizontal writing mode, boxes are laid out horizontally, starting on the left. in a vertical writing mode they would be laid out vertically starting at the top. in the example below, the two (<div>) elements with the black borders form a block formatting con
text, inside which each word participates in an inline formatting con
text. the boxes in the horizontal writing mode run horizontally, and the vertical writing mode boxes run vertically. boxes forming a line are contained by a rectangular area called a line box. this box will be large enough to contain all of the inline boxes in that line; when there is no more room in the inline direction another l...
... border on the <span> breaks at the wrapping point. margins, borders, and padding in the inline direction are respected. in the example below you can see how the margin, border, and padding on the inline <span> element are added. ...
...And 3 more matches
text-align-last - CSS: Cascading Style Sheets
the
text-align-last css property sets how the last line of a block or a line, right before a forced line break, is aligned. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... the
text-align-last css property sets how the last line of a block or a line, right before a forced line break, is aligned. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...
text-align-last css property sets how the last line of a block or a line, right before a forced line break, is aligned. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...And 3 more matches
text-combine-upright - CSS: Cascading Style Sheets
the
text-combine-upright css property sets the combination of characters into the space of a single character. if the combined
text is wider than 1em, the user agent must fit the contents within 1em. the resulting composition is treated as a single upright glyph for layout and decoration. this property only has an effect in vertical writing modes. this is used to produce an effect that is known as tate-chū-yoko (縦中横) in japanese, or as 直書橫向 in chinese. ...
...ngle character. if the combined
text is wider than 1em, the user agent must fit the contents within 1em. the resulting composition is treated as a single upright glyph for layout and decoration. this property only has an effect in vertical writing modes. this is used to produce an effect that is known as tate-chū-yoko (縦中横) in japanese, or as 直書橫向 in chinese. ...
...ned
text is wider than 1em, the user agent must fit the contents within 1em. the resulting composition is treated as a single upright glyph for layout and decoration. this property only has an effect in vertical writing modes. this is used to produce an effect that is known as tate-chū-yoko (縦中横) in japanese, or as 直書橫向 in chinese. ...
...And 3 more matches
text-indent - CSS: Cascading Style Sheets
the
text-indent css property sets the length of empty space (indentation) that is put before lines of
text in a block. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. horizontal spacing is with respect to the left (or right, for right-to-left layout) edge of the containing block-level element's content box. ...
... the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. horizontal spacing is with respect to the left (or right, for right-to-left layout) edge of the containing block-level element's content box. syntax /* <length> values */
text-indent: 3mm;
text-indent: 40px; /* <percentage> value relative to the containing block width */
text-indent: 15%; /* keyword values */
text-indent: 5em each-line;
text-indent: 5em hanging;
text-indent: 5em hanging each-line; /* global values */
text-indent: inherit;
text-indent: initial;
text-indent: unset; values <length> indentation is specified as an absolute <length>. negative val...
...ngth-percentage> = <length> | <percentage> examples simple indent html <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> css p {
text-indent: 5em; background: powderblue; } result percentage indent html <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> css p { ...
...And 3 more matches
HTML attribute: pattern - HTML: Hypertext Markup Language
the pattern attribute specifies a regular expression the form control's value should match. if a non-null value doesn't conform to the constraints set by the pattern value, the validitystate object's read-only patternmismatch property will be true. the pattern attribute is an attribute of the
text, tel, email, url, password, and search input types. the pattern attribute, when specified, is a regular expression which the input's value must match in order for the value to pass constraint validation. it must be a valid javascript regular expression, as used by the regexp type, and as documented in our guide on regular expressions; the 'u' flag is specified when compiling the regular expression, so that the pattern is treated as a sequence of unicode code points, instead of as ascii. ...
...in order for the value to pass constraint validation. it must be a valid javascript regular expression, as used by the regexp type, and as documented in our guide on regular expressions; the 'u' flag is specified when compiling the regular expression, so that the pattern is treated as a sequence of unicode code points, instead of as ascii. no forward slashes should be specified around the pattern
text. if the specified pattern is not specified or is invalid, no regular expression is applied and this attribute is ignored. tip: use the title attribute to specify
text that most browsers will display as a tooltip to explain what the requirements are to match the pattern. you should also include other explanatory
text nearby. some of the input types supporting the pattern attribute, notably t...
... types supporting the pattern attribute, notably the email and url input types, have expected value syntaxes that must be matched. if the pattern attribute isn't present, and the value doesn't match the expected syntax for that value type, the validitystate object's read-only typemismatch property will be true. usability when including a pattern, provide a description of the pattern in visible
text near the control. additionally, include a title attribute which gives a description of the pattern. user agents may use the title contents during constraint validation to tell the user that the pattern is not matched. some browsers show a tooltip with title contents, improving usability for sighted users. additionally, assistive technology may read the title aloud when the control gains focus, bu...
...And 3 more matches
HTML attribute: required - HTML: Hypertext Markup Language
if present on any of these input types and elements, the :required pseudo class will match. if the attribute is not included, the :optional pseudo class will match. ...
...if present on any of these input types and elements, the :required pseudo class will match. if the attribute is not included, the :optional pseudo class will match. ...
...at an element (any element) is required, but has no bearing on the optionality of the element. attribute interactions because a read-only field cannot have a value, required does not have any effect on inputs with the readonly attribute also specified. usability when including the required attribute, provide a visible indication near the control informing the user that the input, select or
textarea is required. in addition, target required form controls with the :required pseudo-class, styling them in a way to indicate they are required. this improves usability for sited user. assistive technology should inform the user that the form control in mandatory based on the required attribute, but adding aria-required="true" doesn't hurt, in case the browser / screen reader combination does no...
...And 3 more matches
<dfn>: The Definition element - HTML: Hypertext Markup Language
the <p> element, the <dt>/<dd> pairing, or the <section> element which is the nearest ancestor of the <dfn> is considered to be the definition of the term. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content, but no <dfn> element must be a descendant. ...
...ibute has special meaning, as noted below. usage notes there are some not-entirely-obvious aspects to using the <dfn> element. we examine those here. specifying the term being defined the term being defined is identified following these rules: if the <dfn> element has a title attribute, the value of the title attribute is considered to be the term being defined. ...
..., as noted below. usage notes there are some not-entirely-obvious aspects to using the <dfn> element. we examine those here. specifying the term being defined the term being defined is identified following these rules: if the <dfn> element has a title attribute, the value of the title attribute is considered to be the term being defined. the element must still have
text within it, but that
text may be an abbreviation (perhaps using <abbr>) or another form of the term. if the <dfn> contains a single child element and does not have any
text content of its own, and the child element is an <abbr> element with a title attribute itself, then the exact value of the <abbr> element's title is the term being defined. otherwise, the
text content of the <dfn> element is the term being defined. th...
...And 3 more matches
<em>: The Emphasis element - HTML: Hypertext Markup Language
the <em> element can be nested, with each level of nesting indicating a greater degree of emphasis. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. ...
... implicit aria role no corresponding role permitted aria roles any dom interface htmlelement up to gecko 1.9.2 (firefox 4) inclusive, firefox implements the htmlspanelement interface for this element. attributes this element only includes the global attributes. ...
... <i> vs. <em> new developers are often confused at seeing multiple elements that produce similar results. ...
...And 3 more matches
<input type="hidden"> - HTML: Hypertext Markup Language
onstraint validation; they have no real value to be constrained. examples let's look at how we might implement a simple version of the edit form we described earlier (see tracking edited content), using a hidden input to remember the id of the record being edited. ...
...f the edit form we described earlier (see tracking edited content), using a hidden input to remember the id of the record being edited. the edit form's html might look a little bit like this: <form> <div> <label for="title">post title:</label> <input type="
text" id="title" name="title" value="my excellent blog post"> </div> <div> <label for="content">post content:</label> <
textarea id="content" name="content" cols="60" rows="5"> this is the content of my excellent blog post. ...
...ted. the edit form's html might look a little bit like this: <form> <div> <label for="title">post title:</label> <input type="
text" id="title" name="title" value="my excellent blog post"> </div> <div> <label for="content">post content:</label> <
textarea id="content" name="content" cols="60" rows="5"> this is the content of my excellent blog post. ...
...And 3 more matches
Textures from code - Web APIs
« previousnext » this webgl example provides a simple demonstration of procedural
texturing with fragment shaders. that is, using code to generate
textures for use in shading webgl objects. drawing
textures with code
texturing a point sprite with calculations done per-pixel in the fragment shader. <p>
texture from code. ...
... « previousnext » this webgl example provides a simple demonstration of procedural
texturing with fragment shaders. that is, using code to generate
textures for use in shading webgl objects. drawing
textures with code
texturing a point sprite with calculations done per-pixel in the fragment shader. <p>
texture from code. ...
... procedural
texturing with fragment shaders. that is, using code to generate
textures for use in shading webgl objects. drawing
textures with code
texturing a point sprite with calculations done per-pixel in the fragment shader. <p>
texture from code. ...
...And 2 more matches
XMLHttpRequest.statusText - Web APIs
the read-only xmlhttprequest.status
text property returns a domstring containing the response's status message as returned by the http server. unlike xmlhttprequest.status which indicates a numerical status code, this property contains the
text of the response status, such as "ok" or "not found". if the request's readystate is in unsent or opened state, the value of status
text will be an empty string. if the server response doesn't explicitly specify a status
text, status
text will assume the default value "ok". ...
...rical status code, this property contains the
text of the response status, such as "ok" or "not found". if the request's readystate is in unsent or opened state, the value of status
text will be an empty string. if the server response doesn't explicitly specify a status
text, status
text will assume the default value "ok". ...
...uch as "ok" or "not found". if the request's readystate is in unsent or opened state, the value of status
text will be an empty string. if the server response doesn't explicitly specify a status
text, status
text will assume the default value "ok". ...
...And 2 more matches
-webkit-text-fill-color - CSS: Cascading Style Sheets
the -webkit-
text-fill-color css property specifies the fill color of characters of
text. if this property is not set, the value of the color property is used. /* <color> values */ -webkit-
text-fill-color: red; -webkit-
text-fill-color: #000000; -webkit-
text-fill-color: rgb(100, 200, 0); /* global values */ -webkit-
text-fill-color: inherit; -webkit-
text-fill-color: initial; -webkit-
text-fill-color: unset; syntax values <color> the foreground fill color of the element's
text content. formal definition initial valuecurrentcolorapplies toall elementsinheritedyescomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = r...
... non-standard unofficial documentation i...
... non-standard unofficial documentation initial definition ...
...And 2 more matches
-webkit-text-stroke-color - CSS: Cascading Style Sheets
the -webkit-
text-stroke-color css property specifies the stroke color of characters of
text. if this property is not set, the value of the color property is used. /* <color> values */ -webkit-
text-stroke-color: red; -webkit-
text-stroke-color: #e08ab4; -webkit-
text-stroke-color: rgb(200, 100, 0); /* global values */ -webkit-
text-stroke-color: inherit; -webkit-
text-stroke-color: initial; -webkit-
text-stroke-color: unset; syntax values <color> the color of the stroke. formal definition initial valuecurrentcolorapplies toall elementsinheritedyescomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>...
...#{3} , <alpha-value>? )<hsl()> = hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )<hsla()> = hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <hue>, <percentage>, <percentage>, <alpha-value>? ...
...ercentage>, <percentage>, <alpha-value>? )<hsla()> = hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <hue>, <percentage>, <percentage>, <alpha-value>? ...
...And 2 more matches
Stacking context example 3 - CSS: Cascading Style Sheets
« css « understanding css z-index stacking con
text example 3 this last example shows problems that arise when mixing several positioned elements in a multi-level html hierarchy and when z-indexes are assigned using class selectors. let's take as an example a three-level hierarchical menu made from several positioned divs. second-level and third-level divs appear when hovering or clicking on their parents. usually this kind of menu is script-generated either client-side or server-side, so style rules are assigned with a class selector instead of the id selector. if the three menu levels partially overlap, then managing stacking could become a problem. the first-level menu is only relatively positioned, so no stacking con
text is created. the second-level menu is absolutely positioned ...
... id selector. if the three menu levels partially overlap, then managing stacking could become a problem. the first-level menu is only relatively positioned, so no stacking con
text is created. the second-level menu is absolutely positioned inside the parent element. in order to put it above all first-level menus, a z-index is used. the problem is that for each second-level menu, a stacking con
text is created and each third-level menu belongs to the con
text of its parent. ...
... level #3 level #2 (z-index: 1) ... level #2 (z-index: 1) level #1 ... ...
...And 2 more matches
text-decoration-skip-ink - CSS: Cascading Style Sheets
the
text-decoration-skip-ink css property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
text-decoration-skip-ink is not part of the
text-decoration shorthand. ...
...derlines are drawn when they pass over glyph ascenders and descenders. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
text-decoration-skip-ink is not part of the
text-decoration shorthand. syntax /* single keyword */
text-decoration-skip-ink: none;
text-decoration-skip-ink: auto;
text-decoration-skip-ink: all; /* global keywords */
text-decoration-skip: inherit;
text-decoration-skip: initial;
text-decoration-skip: unset; values none underlines and overlines are drawn across the full length of the
text content, including parts that cross over glyph descenders and ascenders. auto the default — the browser...
...nese, japanese, or korean (cjk) fonts, where the auto behavior might not create interruptions. ...
...And 2 more matches
text-emphasis-position - CSS: Cascading Style Sheets
the
text-emphasis-position css property sets where emphasis marks are drawn. like ruby
text, if there isn't enough room for emphasis marks, the line height is increased. /* initial value */
text-emphasis-position: over right; /* keywords value */
text-emphasis-position: over left;
text-emphasis-position: under right;
text-emphasis-position: under left;
text-emphasis-position: left over;
text-emphasis-position: right under;
text-emphasis-position: left under; /* global values */
text-emphasis-position: inherit;
text-emphasis-position: initial;
text-emphasis-position: unset; syntax values over draw marks over the
text in horizontal writing mode. under draw marks under the
text in horizontal writing mode. right draws marks to the right of the
text in vertical writing mode. left...
... description the preferred position of emphasis marks depends on the language. in japanese for example, the preferred position is over right. in chinese, on the other hand, the preferred position is under right. ...
...s under right. the informative table below summarizes the preferred emphasis mark positions for chinese, mongolian and japanese: preferred emphasis mark and ruby position language preferred position illustration horizontal vertical japanese over right korean mongolian chinese under right note: the
text-emphasis-position cannot be set, and therefore are not reset either, using the
text-emphasis shorthand property. formal definition initial valueover rightapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ over | under ] && [ right | left ] examples preferring ruby over emphasis marks some editors prefer to hide emphasis marks when they confl...
...And 2 more matches
The Unicode Bidirectional Text Algorithm - Developer guides
the unicode® bidirectional algorithm (also known as the bidi algorithm) is part of the unicode
text standard that describes how the user agent should order characters while rendering unicode
text. understanding this algorithm in at least basic terms is helpful when you're striving to produce localization-ready web content or apps. in this guide, we'll take a look at the bidi algorithm and learn in general what it does and how it applies to your content, so that you'll be better prepared when using the features of html and css to which the algorithm applies while determining the order and directionality of
text during rendering. fundamentals (base direction, character types, etc) the algorithm character level directionality directional runs (what they are, how base direction ...
...l runs (what they are, how base direction applies) handling neutral characters overriding the algorithm content about using html and css to override the default behavior of the algorithm; include info about isolating ranges etc. overiding bidi using unicode control characters unicode provides a number of special control characters that make it possible to control directionality of ranges of
text. there are two sets of control characters; one set opens the override, and another restores the original directionality. you must always follow each opening character with an appropriate closing character. initial unicode bidi algorithm control characters character code point html entity markup equivalent description left-to-right isolate (lri) u+2066 &#x...
...directionality. you must always follow each opening character with an appropriate closing character. ...
...And 2 more matches
HTML attribute: readonly - HTML: Hypertext Markup Language
the boolean readonly attribute, when present, makes the element not mutable, meaning the user can not edit the control. if the readonly attribute is specified on an input element, because the user can not edit the input, the element does not participate in constraint validation. the readonly attribute is supported by
text, search, url, tel, email, password, date, month, week, time, datetime-local, and number<input> types and the <
textarea> form control elements. if present on any of these input types and elements, the :read-only pseudo class will match. if the attribute is not included, the :read-write pseudo class will match. the attribute is not supported or relevant to <select> or input types that are already not mutable, such as checkbox and radio or cannot, by definition, start with a...
...elevant to <select> or input types that are already not mutable, such as checkbox and radio or cannot, by definition, start with a value, such as the file input type. range and color, as both have default values. it is also not supported on hidden as it can not be expected that a user to fill out a form that is hidden. nor is it supported on any of the button types, including image. note: only
text controls can be made read-only, since for other controls (such as checkboxes and buttons) there is no useful distinction between being read-only and being disabled, so the readonly attribute does not apply. when an input has the readonly attribute, the :read-only pseudo-class also applies to it. conversely, inputs that support the readonly attribute but don't have the attribute set match the :r...
...only attribute is through a script. note: the required attribute is not permitted on inputs with the readonly attribute specified. usability browsers display the readonly attribute... constraint validation if the element is readonly, then the element's value can not be updated by the user, and does not participate in constraint validation. ...
...And 2 more matches
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
nt, attempting to retrieve the contents of the canvas isn't allowed. if the foreign content comes from an image obtained from either as htmlcanvaselement or imagebitmap, and the image source doesn't meet the same origin rules, attempts to read the canvas's contents are blocked. calling any of the following on a tainted canvas will result in an error: calling getimagedata() on the canvas's con
text calling toblob() on the <canvas> element itself calling todataurl() on the canvas attempting any of these when the canvas is tainted will cause a securityerror to be thrown. this protects users from having private data exposed by using images to pull information from remote web sites without permission. storing an image from a foreign origin in this example, we wish to permit images from a ...
... fired on the image element, which means the image data has been received. finally, the image's src attribute is set to the url of the image to download; this triggers the download to begin. ...
...element, which means the image data has been received. finally, the image's src attribute is set to the url of the image to download; this triggers the download to begin. ...
...And 2 more matches
<area> - HTML: Hypertext Markup Language
this element is used only within a <map> element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories flow content, phrasing content. permitted content none, it is an empty element. tag omission must have a start tag and must not have an end tag. permitted parents any element that accepts phrasing content. ...
...ement that accepts phrasing content. the <area> element must have an ancestor <map>, but it need not be a direct parent. implicit aria role link when href attribute is present, otherwise no corresponding role permitted aria roles no role permitted dom interface htmlareaelement attributes this element's attributes include the global attributes. alt a
text string alternative to display on browsers that do not display images. the
text should be phrased so that it presents the user with the same kind of choice as the image would offer when displayed without the alternative
text. this attribute is required only if the href attribute is used. coords a set of values specifying the coordinates of the hot-spot region. the number and meaning of the va...
..., which defines a rectangular region; circle, which defines a circular region; poly, which defines a polygon; and default, which indicates the entire region beyond any defined shapes. many browsers, notably internet explorer 4 and higher, support circ, polygon, and rectangle as valid values for shape, but these values are non-standard. target a keyword or author-defined name of the browsing con
text to display the linked resource. the following keywords have special meanings: _self (default): show the resource in the current browsing con
text. _blank: show the resource in a new, unnamed browsing con
text. _parent: show the resource in the parent browsing con
text of the current one, if the current page is inside a frame. if there is no parent, acts the same as _self. _top: show the r...
...And 2 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
is ready to be processed. canplay the browser can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content. canplaythrough the browser estimates it can play the media up to its end without stopping for content buffering. complete the rendering of an offlineaudiocon
text is terminated. durationchange the duration attribute has been updated. emptied the media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it. ended playback has stopped because the end of the media was reached. loadeddata the first frame of the med...
...eginner's tutorial. styling with css the <audio> element has no intrinsic visual output of its own unless the controls attribute is specified, in which case the browser's default controls are shown. the default controls have a display value of inline by default, and it is often a good idea set the value to block to improve control over positioning and layout, unless you want it to sit within a
text block or similar. you can style the default controls with properties that affect the block as a single unit, so for example you can give it a border and border-radius, padding, margin, etc. you can't however style the individual components inside the audio player (e.g. change the button size or icons, change the font, etc.), and the controls are different across the different browsers. to get a...
...ntrols are different across the different browsers. to get a consistent look and feel across browsers, you'll need to create custom controls; these can be marked up and styled in whatever way you want, and then javascript can be used along with the htmlmediaelement api to wire up their functionality. video player styling basics provides some useful styling techniques — it is written in the con
text of <video>, but much of it is equally applicable to <audio>. detecting addition and removal of tracks you can detect when tracks are added to and removed from an <audio> element using the addtrack and removetrack events. however, these events aren't sent directly to the <audio> element itself. instead, they're sent to the track list object within the <audio> element's htmlmediaelement that corr...
...And 2 more matches
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
attributes this element's attributes include the global attributes. height the height of the coordinate space in css pixels. defaults to 150. moz-opaque lets the canvas know whether or not translucency will be a factor. if the canvas knows there's no translucency, painting performance can be optimized. ...
... required </canvas> tag unlike the <img> element, the <canvas> element requires the closing tag (</canvas>). ...
... 472,907,776 pixels (i.e., 22,528 x 20,992) safari 32,767 pixels 32,767 pixels 268,435,456 pixels (i.e., 16,384 x 16,384) ie 8,192 pixels 8,192 pixels ? note: exceeding the maximum dimensions or area renders the canvas unusable — drawing commands will not work. examples html this code snippet adds a canvas element to your html document. ...
...And 2 more matches
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
the html inline frame element (<iframe>) represents a nested browsing con
text, embedding another html page into the current one. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. each embedded browsing con
text has its own session history and document. the browsing con
text that embeds the others is called the parent browsing con
text. the topmost browsing con
text — the one with no parent — is usually the browser window, represented by the window object. because each browsing con
text is a complete document environment, every <iframe> in a page requires increased memory and other computing resources. while theoreti...
...ther higher-priority page resources. loading indicates how the browser should load the iframe: eager: load the iframe immediately, regardless if it is outside the visible viewport (this is the default value). lazy: defer loading of the iframe until it reaches a calculated distance from the viewport, as defined by the browser. name a targetable name for the embedded browsing con
text. this can be used in the target attribute of the <a>, <form>, or <base> elements; the formtarget attribute of the <input> or <button> elements; or the windowname parameter in the window.open() method. referrerpolicy indicates which referrer to send when fetching the frame's resource: no-referrer: the referer header will not be sent. no-referrer-when-downgrade (default): the referer header...
...d, the resource is treated as being from a special origin that always fails the same-origin policy. allow-scripts: lets the resource run scripts (but not create popup windows). allow-storage-access-by-user-activation : lets the resource request access to the parent's storage capabilities with the storage access api. allow-top-navigation: lets the resource navigate the top-level browsing con
text (the one named _top). allow-top-navigation-by-user-activation: lets the resource navigate the top-level browsing con
text, but only if initiated by a user gesture. notes about sandboxing: when the embedded document has the same origin as the embedding page, it is strongly discouraged to use both allow-scripts and allow-same-origin, as that lets the embedded document remove the sandbox a...
...And 2 more matches
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
abbreviated description inside the cell and place the long content in the title attribute. align this enumerated attribute specifies how the cell content's horizontal alignment will be handled. possible values are: left: the content is aligned to the left of the cell. center: the content is centered in the cell. right: the content is aligned to the right of the cell. justify (with
text only): the content is stretched out inside the cell so that it covers its entire width. char (with
text only): the content is aligned to a character inside the <th> element with minimal offset. this character is defined by the char and charoff attributes unimplemented (see bug 2212). the default value when this attribute is not specified is left. note: to achieve the same effect as t...
...unimplemented in css3. axis this attribute contains a list of space-separated strings. each string is the id of a group of cells that this header applies to. ...
...unimplemented in css3. ...
...And 2 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
arts of the resource if that data has expired from the media buffer. other media may have a media timeline that doesn't start at 0 seconds, so setting currenttime to a time before that would fail. the getstartdate() method can be used to determine the beginning point of the media timeline's reference frame. disablepictureinpicture prevents the browser from suggesting a picture-in-picture con
text menu or to request picture-in-picture automatically in some cases. disableremoteplayback a boolean attribute used to disable the capability of remote playback in devices that are attached using wired (hdmi, dvi, etc.) and wireless technologies (miracast, chromecast, dlna, airplay, etc). in safari, you can use x-webkit-airplay="deny" as a fallback. duration read only a double-precision f...
... is ready to be processed. canplay the browser can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content. canplaythrough the browser estimates it can play the media up to its end without stopping for content buffering. complete the rendering of an offlineaudiocon
text is terminated. durationchange the duration attribute has been updated. emptied the media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it. ended playback has stopped because the end of the media was reached. loadeddata the first frame of the med...
...dded to the element: htmlmediaelement.audiotracks an audiotracklist containing all of the media element's audio tracks. you can add a listener for addtrack to this object to be alerted when new audio tracks are added to the element. htmlmediaelement.videotracks add an addtrack listener to this videotracklist object to be informed when video tracks are added to the element. htmlmediaelement.
texttracks add an addtrack event listener to this
texttracklist to be notified when new
text tracks are added to the element. for example, to detect when audio tracks are added to or removed from a <video> element, you can use code like this: var elem = document.queryselector("video"); elem.audiotracklist.onaddtrack = function(event) { trackeditor.addtrack(event.track); }; elem.audiotracklist.
...And 2 more matches
Converting WebAssembly text format to wasm - WebAssembly
webassembly has an s-expression-based
textual representation, an intermediate form designed to be exposed in
text editors, browser developer tools, etc. this article explains a little bit about how it works, and how to use available tools to convert
text format files to the .wasm assembly format. note:
text format files are usually saved with a .wat extension. historically, a .wast extension was also used, however that's now used for the scripting language used by the webassembly testsuite. ...
...s, browser developer tools, etc. this article explains a little bit about how it works, and how to use available tools to convert
text format files to the .wasm assembly format. note:
text format files are usually saved with a .wat extension. historically, a .wast extension was also used, however that's now used for the scripting language used by the webassembly testsuite. ...
..." "imported_func") (param i32)) (func (export "exported_func") i32.const 42 call $i ) ) the webassembly function exported_func is exported for use in our environment (e.g. the web app in which we are using our webassembly module). when it is called, it calls an imported javascript function called imported_func, which is run with the value (42) provided as a parameter. converting the
text .wat into a binary .wasm file let’s have a go at converting the above .wat
text representation example into .wasm assembly format. to start with, make a copy of the above listing inside a
text file; call it simple.wat. we need to assemble this
textual representation into the assembly language the browser actually reads before we can use it. to do this, we can use the wabt tool, which inclu...
...And 2 more matches
Reading textual data - Archive of obsolete content
files and network sockets contain bytes, not characters - to give these bytes a meaning, you need to know the character encoding. xxx: document nsiunicharstreamlistener (gecko 1.8) xxx: also document nsistreamlistener here? determining the character encoding of data if you have a network channel (nsichannel), you can try the contentcharset property of it. note that not all channels know the character encoding of the data. ...
...a if you have a network channel (nsichannel), you can try the contentcharset property of it. note that not all channels know the character encoding of the data. you can fallback to the default character encoding stored in preferences (intl.charset.default, a localized pref value) when reading from a file, the question is harder to answer. using the system character encoding may work (xxx insert
text how to get it), or again the default character encoding from preferences. converting read data if you read data from nsiscriptableinputstream as described on the file i/o code snippets page, you can convert it to utf-8 // sstream is nsiscriptableinputstream var str = sstream.read(4096); var utf8converter = components.classes["@mozilla.org/intl/utf8converterservice;1"]. getservice(component...
... reading lines there is no easy, general way to read a unicode line from a stream. for the limited use case of reading lines from a local file, the following code using nsiscriptableunicodeconverter works. this code wil...
...1"] .createinstance(components.interfaces.nsifileinputstream); fis.init(file, -1, -1, 0); var lis = fis.queryinterface(components.interfaces.nsilineinputstream); var linedata = {}; var cont; do { cont = lis.readline(linedata); var line = converter.converttounicode(linedata.value); // now you can do something with line } while (cont); fis.close(); see also writing
textual data joel on software: the absolute minimum every software developer absolutely, positively must know about unicode and character sets ...
statustext - Archive of obsolete content
« xul reference home status
text type: string used to set the
text that appears on the status bar when the user moves the mouse over the element. mozilla doesn't adjust the status bar automatically however. this attribute serves only as a place to keep the
text. in firefox, this
text is automatically placed in the statusbar for menuitems on the menu bar. ...
...he
text that appears on the status bar when the user moves the mouse over the element. mozilla doesn't adjust the status bar automatically however. this attribute serves only as a place to keep the
text. in firefox, this
text is automatically placed in the statusbar for menuitems on the menu bar. ...
... however. this attribute serves only as a place to keep the
text. in firefox, this
text is automatically placed in the statusbar for menuitems on the menu bar. ...
...essage(this)" onmouseout="clearstatusmessage()"/> <button label="ping" status
text="ping the server" onmouseover="setstatusmessage(this)" onmouseout="clearstatusmessage()"/> <statusbar> <statusbarpanel id="mystatuspanel" label="" flex="1"/> <spacer flex="1"/> </statusbar> <script> function setstatusmessage(obj){ document.getelementbyid('mystatuspanel').label = obj.getattribute('status
text'); } function clearstatusmessage(obj){ document.getelementbyid('mystatuspanel').label = ''; } </script> see also statusbar and statusbarpanel ...
Test your skills: HTML text basics - Learn web development
this aim of this skill test is to assess whether you've understood our html
text fundamentals article. note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks. if you get stuck, then ask us for help — see the assessment or further help section at the bottom of this page. html
text basics 1 in this task we want you to mark up the provided html using semantic heading and paragraph elements. try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online editor. ...
...et stuck, then ask us for help — see the assessment or further help section at the bottom of this page. html
text basics 1 in this task we want you to mark up the provided html using semantic heading and paragraph elements. try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online editor. html
text basics 2 in this task we want you to turn the first un-marked up list into an unordered list, and the second one into an ordered list. ...
...starting point for this task to work in your own editor or in an online editor. html
text basics 2 in this task we want you to turn the first un-marked up list into an unordered list, and the second one into an ordered list. try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online editor. html
text basics 3 in this task you are provided with a paragraph, and your aim is to use some inline elements to mark up a couple of appropriate words with strong importance, and a couple with emphasis. try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online editor. assessment or further help you can p...
... stuck and want to ask for help: put your work into an online shareable editor such as codepen, jsfiddle, or glitch. you can write the code yourself, or use the starting point files linked to in the above sections. write a post asking for assessment and/or help at the mdn discourse forum learning category. your post should include: a descriptive title such as "assessment wanted for html
text basics 1 skill test". details of what you have already tried, and what you would like us to do, e.g. if you are stuck and need help, or want an assessment. a link to the example you want assessed or need help with, in an online shareable editor (as mentioned in step 1 above). this is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their ...
JS_GetContextThread
obsolete since jsapi 8this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. returns the id of the associated thread for a con
text. syntax int js_getcon
textthread(jscon
text *cx); name type description cx jscon
text * the con
text to examine. description js_getcon
textthread returns the id of the thread currently associated with this con
text. ...
...s use is discouraged since it could be removed at any time. try to avoid using it. returns the id of the associated thread for a con
text. syntax int js_getcon
textthread(jscon
text *cx); name type description cx jscon
text * the con
text to examine. description js_getcon
textthread returns the id of the thread currently associated with this con
text. if the con
text is not currently associated with any thread, the return value is 0. see js_setcon
textthread. ...
...ociated thread for a con
text. syntax int js_getcon
textthread(jscon
text *cx); name type description cx jscon
text * the con
text to examine. description js_getcon
textthread returns the id of the thread currently associated with this con
text. if the con
text is not currently associated with any thread, the return value is 0. see js_setcon
textthread. js_getcon
textthread is available only if the engine is built with js_threadsafe. ...
...pe description cx jscon
text * the con
text to examine. description js_getcon
textthread returns the id of the thread currently associated with this con
text. if the con
text is not currently associated with any thread, the return value is 0. see js_setcon
textthread. js_getcon
textthread is available only if the engine is built with js_threadsafe. ...
IAccessibleHypertext
other-licenses/ia2/accessiblehyper
text.idlnot scriptable this interface exposes information about hyper
text in a document. 1.0 66 introduced gecko 1.9 inherits from: iaccessible
text last changed in gecko 1.9 (firefox 3) the iaccessiblehyper
text interface is the main interface to expose hyperlinks in a document, typically a
text document, that are used to reference other documents. a typical implementation is to implement this interface on the smallest
text object such as a paragraph of
text. method overview [propget] hresult hyperlink([in] long index, [out] iaccessiblehyperlink hyperlink ); [propget] hresult hyperlinkindex([in] long charindex, [out] long hyperlinkindex ); [propget] hresult nhyperlinks([out] long hyperlinkcount ); methods hyperlink() ...
...f bad [in] passed, [out] value is null. s_ok. hyperlinkindex() returns the index of the hyperlink that is associated with this character index. this is the case when a link spans the given character index. [propget] hresult hyperlinkindex( [in] long charindex, [out] long hyperlinkindex ); parameters charindex a 0 based index of the character for which to return the link index. if iaccessible
text is used to represent the
text containing the link, then the character index is only valid if it is greater than or equal to zero and lower than the number of characters in the
text. hyperlinkindex the 0 based index of the hyperlink that is associated with this character index, or -1 if charindex is not on a link. return value e_invalidarg if bad [in] passed, [out] value is null. s_false if there...
...returns 0 if there is no link. return value s_ok. ...
...index is not on a link. return value e_invalidarg if bad [in] passed, [out] value is null. s_false if there is nothing to return, [out] value is -1. s_ok. nhyperlinks() returns the number of links and link groups contained within this hyper
text paragraph. [propget] hresult nhyperlinks( [out] long hyperlinkcount ); parameters hyperlinkcount the number of links and link groups within this hyper
text paragraph. returns 0 if there is no link. return value s_ok. see also iaccessiblehyperlink ...
AudioContext.createMediaStreamTrackSource() - Web APIs
the createmediastreamtracksource() method of the audiocon
text interface creates and returns a mediastreamtrackaudiosourcenode which represents an audio source whose data comes from the specified mediastreamtrack. this differs from createmediastreamsource(), which creates a mediastreamaudiosourcenode whose audio comes from the audio track in a specified mediastream whose id is first, lexicographically (alphabetically). syntax var audioctx = new audiocon
text(); var track = audioctx.createmediastreamtracksource(track); parameters track the mediastreamtrack to use as the source of all audio data for the new node. return value a mediastreamtrackaudiosourcenode object which acts as a source for audio data found in the specified audio track. example in this example, getusermedia() i...
...temediastreamtracksource(track); parameters track the mediastreamtrack to use as the source of all audio data for the new node. return value a mediastreamtrackaudiosourcenode object which acts as a source for audio data found in the specified audio track. example in this example, getusermedia() is used to request access to the user's microphone. once that access is attained, an audio con
text is established and a mediastreamtrackaudiosourcenode is created using createmediastreamtracksource(), taking its audio from the first audio track in the stream returned by getusermedia(). then a biquadfilternode is created using createbiquadfilter(), and it's configured as desired to perform a lowshelf filter on the audio coming from the source. the output from the microphone is then routed into...
...streamtracksource(), taking its audio from the first audio track in the stream returned by getusermedia(). then a biquadfilternode is created using createbiquadfilter(), and it's configured as desired to perform a lowshelf filter on the audio coming from the source. ...
...e source. the output from the microphone is then routed into the new biquad filter, and the filter's output is in turn routed to the audio con
text's destination. ...
AudioContextOptions - Web APIs
the audiocon
textoptions dictionary is used to specify configuration options when constructing a new audiocon
text object to represent a graph of web audio nodes. it is only used when calling the audiocon
text() constructor. properties latencyhint optional the type of playback that the con
text will be used for, as a value from the audiocon
textlatencycategory enum or a double-precision floating-point value indicating the preferred maximum latency of the con
text in seconds. the user agent may or may not choose to meet this request; check the value of audiocon
text.baselatency to determine the true latency after creating the con
text. samplerate optional the samplerate to be used by the audiocon
text, specified in samples per second. the value may be any value supported by audiobuffer. if not s...
...y of the con
text in seconds. the user agent may or may not choose to meet this request; check the value of audiocon
text.baselatency to determine the true latency after creating the con
text. samplerate optional the samplerate to be used by the audiocon
text, specified in samples per second. the value may be any value supported by audiobuffer. if not specified, the preferred sample rate for the con
text's output device is used by default. ...
...ional the samplerate to be used by the audiocon
text, specified in samples per second. the value may be any value supported by audiobuffer. if not specified, the preferred sample rate for the con
text's output device is used by default. constants standard values for latencyhint the latencyhint property can be number specifying a preferred maximum latency in seconds or a string from the audiocon
textlatencycategory enumerated string, which selects a standard value for a given type of audio usage: value description "balanced" the user agent should balance audio output latency and power consumption when selecting a latency value. "interactive" the audio is involved in interactive elements, such as responding to user actions or needing to coincide with visual...
...latency that doesn't cause glitches in the audio. this is likely to require increased power consumption. this is the default value. "playback" the user agent should select a latency that will maximize playback time by minimizing power consumption at the expense of latency. useful for non-interactive playback, such as playing music. example this example instantiates an audio con
text for music playback (optimized for power consumption over latency), with the sample rate 48,000 hz. let musiccon
text = new audiocon
text({ latencyhint: "playback", samplerate: 48000 }); specifications specification status comment web audio apithe definition of 'audiocon
textoptions' in that specification. working draft initial definition. ...
BaseAudioContext.createBufferSource() - Web APIs
the createbuffersource() method of the baseaudiocon
text interface is used to create a new audiobuffersourcenode, which can be used to play audio data contained within an audiobuffer object. audiobuffers are created using baseaudiocon
text.createbuffer or returned by baseaudiocon
text.decodeaudiodata when it successfully decodes an audio track. syntax var source = baseaudiocon
text.createbuffersource(); returns an audiobuffersourcenode. example in this example, we create a two second buffer, fill it with white noise, and then play it via an audiobuffersourcenode. the comments should clearly explain what is going on. note: you can also run the code live, or view the source. ...
...des an audio track. syntax var source = baseaudiocon
text.createbuffersource(); returns an audiobuffersourcenode. example in this example, we create a two second buffer, fill it with white noise, and then play it via an audiobuffersourcenode. the comments should clearly explain what is going on. note: you can also run the code live, or view the source. ...
... var source = baseaudiocon
text.createbuffersource(); returns an audiobuffersourcenode. example in this example, we create a two second buffer, fill it with white noise, and then play it via an audiobuffersourcenode. the comments should clearly explain what is going on. note: you can also run the code live, or view the source. ...
...o run the code live, or view the source. ...
BaseAudioContext.createOscillator() - Web APIs
the createoscillator() method of the baseaudiocon
text interface creates an oscillatornode, a source representing a periodic waveform. it basically generates a constant tone. syntax var oscillatornode = audioctx.createoscillator(); returns an oscillatornode. example the following example shows basic usage of an audiocon
text to create an oscillator node. for applied examples/information, check out our violent theremin demo (see app.js for relevant code); also see our oscillatornode page for more information. ...
... generates a constant tone. syntax var oscillatornode = audioctx.createoscillator(); returns an oscillatornode. example the following example shows basic usage of an audiocon
text to create an oscillator node. for applied examples/information, check out our violent theremin demo (see app.js for relevant code); also see our oscillatornode page for more information. ...
... oscillatornode = audioctx.createoscillator(); returns an oscillatornode. example the following example shows basic usage of an audiocon
text to create an oscillator node. for applied examples/information, check out our violent theremin demo (see app.js for relevant code); also see our oscillatornode page for more information. ...
...eateoscillator(); returns an oscillatornode. example the following example shows basic usage of an audiocon
text to create an oscillator node. for applied examples/information, check out our violent theremin demo (see app.js for relevant code); also see our oscillatornode page for more information. // create web audio api con
text var audioctx = new (window.audiocon
text || window.webkitaudiocon
text)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(3000, audioctx.currenttime); // value in hertz oscillator.connect(audioctx.destination); oscillator.start(); specifications specification status comment web audio apithe definition of 'createoscillator' in that specification. wo...
BaseAudioContext.createScriptProcessor() - Web APIs
note: as of the august 29 2014 web audio api spec publication, this feature has been marked as deprecated, and was replaced by audioworklet (see audioworkletnode). syntax var scriptprocessor = audioctx.createscriptprocessor(buffersize, numberofinputchannels, numberofoutputchannels); parameters buffersize the buffer size in units of sample-frames. if specified, the buffersize must be one of the following values: 256, 512, 1024, 2048, 4096, 8192, 16384. ...
... defaults to 2. values of up to 32 are supported. important: webkit currently (version 31) requires that a valid buffersize be passed when calling this method. note: it is invalid for both numberofinputchannels and numberofoutputchannels to be zero. returns a scriptprocessornode. example the following example shows basic usage of a scriptprocessornode to take a track loaded via audiocon
text.decodeaudiodata(), process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the audiodestinationnode. for each channel and each sample frame, the scriptnode.onaudioprocess function takes the associated audioprocessingevent and uses it to loop through each channel of the input buffer, and each sample in each channel, and add a small amount of whi...
...e in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case. ...
... noise, before setting that result to be the output sample in each case. ...
BaseAudioContext.decodeAudioData() - Web APIs
the decodeaudiodata() method of the baseaudiocon
text interface is used to asynchronously decode audio file data contained in an arraybuffer. in this case the arraybuffer is loaded from xmlhttprequest and filereader. the decoded audiobuffer is resampled to the audiocon
text's sampling rate, then passed to a callback or promise. this is the preferred method of creating an audio source for web audio api from an audio track. this method only works on complete file data, not fragments of audio file data. ...
...ase the arraybuffer is loaded from xmlhttprequest and filereader. the decoded audiobuffer is resampled to the audiocon
text's sampling rate, then passed to a callback or promise. this is the preferred method of creating an audio source for web audio api from an audio track. this method only works on complete file data, not fragments of audio file data. syntax older callback syntax: baseaudiocon
text.decodeaudiodata(arraybuffer, successcallback, errorcallback); newer promise-based syntax: promise<decodeddata> baseaudiocon
text.decodeaudiodata(arraybuffer); parameters arraybuffer an arraybuffer containing the audio data to be decoded, usually grabbed from xmlhttprequest, windoworworkerglobalscope.fetch() or filereader. successcallback a callback function to be invoked when the decoding...
...example, the getdata() function uses xhr to load an audio track, setting the responsetype of the request to arraybuffer so that it returns an array buffer as its response that we then store in the audiodata variable . we then pass this buffer into a decodeaudiodata() function; the success callback takes the successfully decoded pcm data, puts it into an audiobuffersourcenode created using audiocon
text.createbuffersource(), connects the source to the audiocon
text.destination and sets it to loop. the buttons in the example simply run getdata() to load the track and start it playing, and stop it playing, respectively. when the stop() method is called on the source, the source is cleared out. note: you can run the example live (or view the source.) // define variables var audioctx = new (win...
...rsource(), connects the source to the audiocon
text.destination and sets it to loop. the buttons in the example simply run getdata() to load the track and start it playing, and stop it playing, respectively. when the stop() method is called on the source, the source is cleared out. note: you can run the example live (or view the source.) // define variables var audioctx = new (window.audiocon
text || window.webkitaudiocon
text)(); var source; var pre = document.queryselector('pre'); var myscript = document.queryselector('script'); var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); // use xhr to load an audio track, and // decodeaudiodata to decode it and stick it in a buffer. // then we put the buffer into the source function getdata() { source = au...
BaseAudioContext.destination - Web APIs
the destination property of the baseaudiocon
text interface returns an audiodestinationnode representing the final destination of all audio in the con
text. it often represents an actual audio-rendering device such as your device's speakers. syntax baseaudiocon
text.destination; value an audiodestinationnode. example note: for a full example implementation, see one of our web audio demos on the mdn github repo, like voice-change-o-matic. ...
...urns an audiodestinationnode representing the final destination of all audio in the con
text. it often represents an actual audio-rendering device such as your device's speakers. syntax baseaudiocon
text.destination; value an audiodestinationnode. example note: for a full example implementation, see one of our web audio demos on the mdn github repo, like voice-change-o-matic. ...
...onnode representing the final destination of all audio in the con
text. it often represents an actual audio-rendering device such as your device's speakers. syntax baseaudiocon
text.destination; value an audiodestinationnode. example note: for a full example implementation, see one of our web audio demos on the mdn github repo, like voice-change-o-matic. ...
... destination of all audio in the con
text. it often represents an actual audio-rendering device such as your device's speakers. syntax baseaudiocon
text.destination; value an audiodestinationnode. example note: for a full example implementation, see one of our web audio demos on the mdn github repo, like voice-change-o-matic. var audiocon
text = window.audiocon
text || window.webkitaudiocon
text; var audioctx = new audiocon
text(); // older webkit/blink browsers require a prefix var oscillatornode = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillatornode.connect(gainnode); gainnode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'destination' in that specification. working d...
CanvasRenderingContext2D.arc() - Web APIs
syntax void ctx.arc(x, y, radius, startangle, endangle [, anticlockwise]); the arc() method creates a circular arc centered at (x, y) with a radius of radius. the path starts at startangle, ends at endangle, and travels in the direction given by anticlockwise (defaulting to clockwise). parameters x the horizontal coordinate of the arc's center. y the vertical coordinate of the arc's center. radius the arc's radius. must be positive. startangle the angle at which the arc starts in radians, measured from the positive x-axis. endangle the angle at which the arc ends in radians, measured from the positive x-axis. ...
...les drawing a full circle this example draws a complete circle with the arc() method. html <canvas></canvas> javascript the arc is given an x-coordinate of 100, a y-coordinate of 75, and a radius of 50. to make a full circle, the arc begins at an angle of 0 radians (0°), and ends at an angle of 2π radians (360°). ...
...as = document.queryselector('canvas'); const ctx = canvas.getcon
text('2d'); ctx.beginpath(); ctx.arc(100, 75, 50, 0, 2 * math.pi); ctx.stroke(); result different shapes demonstrated this example draws various shapes to show what is possible with arc(). ...
... living standard ...
CanvasRenderingContext2D.bezierCurveTo() - Web APIs
it requires three points: the first two are control points and the third one is the end point. the starting point is the latest point in the current path, which can be changed using moveto() before creating the bézier curve. syntax void ctx.beziercurveto(cp1x, cp1y, cp2x, cp2y, x, y); parameters cp1x the x-axis coordinate of the first control point. cp1y the y-axis coordinate of the first control point. cp2x the x-axis coordinate of the second control point. cp2y the y-axis coordinate of the second control point. x the x-axis coordinate of the end point. y the y-axis coordinate of the end point. ...
... of the first control point. cp2x the x-axis coordinate of the second control point. cp2y the y-axis coordinate of the second control point. x the x-axis coordinate of the end point. y the y-axis coordinate of the end point. examples how beziercurveto works this example shows how a cubic bézier curve is drawn. ...
...point. cp2y the y-axis coordinate of the second control point. x the x-axis coordinate of the end point. y the y-axis coordinate of the end point. examples how beziercurveto works this example shows how a cubic bézier curve is drawn. ...
...are blue. a simple bézier curve this example draws a simple bézier curve using beziercurveto(). html <canvas id="canvas"></canvas> javascript the curve begins at the point specified by moveto(): (30, 30). the first control point is placed at (120, 160), and the second at (180, 10). the curve ends at (220, 140). const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.beginpath(); ctx.moveto(30, 30); ctx.beziercurveto(120,160, 180,10, 220,140); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.beziercurveto' in that specification. living standard ...
CanvasRenderingContext2D.clearRect() - Web APIs
note: be aware that clearrect() may cause unintended side effects if you're not using paths properly. make sure to call beginpath() before starting to draw new items after calling clearrect(). syntax void ctx.clearrect(x, y, width, height); the clearrect() method sets the pixels in a rectangular area to transparent black (rgba(0,0,0,0)). the rectangle's corner is at (x, y), and its size is specified by width and height. parameters x the x-axis coordinate of the rectangle's starting point. y the y-axis coordinate of the rectangle's starting point. width the rectangle's width. ...
... rectangle's height. positive values are down, and negative are up. examples erasing the whole canvas this code snippet erases the entire canvas. this is commonly required at the start of each frame in an animation. the dimensions of the cleared area are set to equal the <canvas> element's width and height attributes. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.clearrect(0, 0, canvas.width, canvas.height); erasing part of a canvas this example draws a blue triangle on top of a yellowish background. the clearrect() method then erases part of the canvas. html <canvas id="canvas"></canvas> javascript the cleared area is rectangular in shape, with its top-left corner at (10, 10). the cleared area has a width of 120 and a height of 100. co...
...f a canvas this example draws a blue triangle on top of a yellowish background. the clearrect() method then erases part of the canvas. html <canvas id="canvas"></canvas> javascript the cleared area is rectangular in shape, with its top-left corner at (10, 10). the cleared area has a width of 120 and a height of 100. ...
... living standard ...
CanvasRenderingContext2D.clip() - Web APIs
it replaces any previous clipping region. in the image below, the red outline represents a clipping region shaped like a star. only those parts of the checkerboard pattern that are within the clipping region get drawn. note: be aware that the clipping region is only constructed from shapes added to the path. it doesn't work with shape primitives drawn directly to the canvas, such as fillrect(). instead, you'd have to use rect() to add a rectangular shape to the path before calling clip(). ...
...le uses the clip() method to create a clipping region according to the shape of a circular arc. two rectangles are then drawn; only those parts within the clipping region are rendered. html <canvas id="canvas"></canvas> javascript the clipping region is a full circle, with its center at (100, 75), and a radius of 50. ...
... fillrule this example saves two rectangles to a path2d object, which is then made the current clipping region using the clip() method. the "evenodd" rule creates a hole where the clipping rectangles intersect; by default (with the "nonzero" rule), there would be no hole. ...
...con
text('2d'); // create clipping path let region = new path2d(); region.rect(80, 10, 20, 130); region.rect(40, 50, 100, 50); ctx.clip(region, "evenodd"); // draw stuff that gets clipped ctx.fillstyle = 'blue'; ctx.fillrect(0, 0, canvas.width, canvas.height); result specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.clip' in that specification. living standard ...
CanvasRenderingContext2D.createImageData() - Web APIs
all of the pixels in the new object are transparent black. syntax imagedata ctx.createimagedata(width, height); imagedata ctx.createimagedata(imagedata); parameters width the width to give the new imagedata object. a negative value flips the rectangle around the vertical axis. height the height to give the new imagedata object. a negative value flips the rectangle around the horizontal axis. imagedata an existing imagedata object from which to copy the width and height. the image itself is not copied. return value a new imagedata object with the specified width and height. ...
...ta object using the createimagedata() method. html <canvas id="canvas"></canvas> javascript the generated object is 100 pixels wide and 50 pixels tall, making 5,000 pixels in all. each pixel within an imagedata object consists of four array values, so the object's data property has a length of 4 × 5,000, or 20,000. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); const imagedata = ctx.createimagedata(100, 50); console.log(imagedata); // imagedata { width: 100, height: 50, data: uint8clampedarray[20000] } filling a blank imagedata object this example creates and fills a new imagedata object with purple pixels. html <canvas id="canvas"></canvas> javascript since each pixel consists of four values, the for loop iterates by multiples of four. ...
...ect this example creates and fills a new imagedata object with purple pixels. html <canvas id="canvas"></canvas> javascript since each pixel consists of four values, the for loop iterates by multiples of four. the array values associated with each pixel are r (red), g (green), b (blue), and a (alpha), in that order. ...
... living standard ...
CanvasRenderingContext2D.createLinearGradient() - Web APIs
this method returns a linear canvasgradient. to be applied to a shape, the gradient must first be assigned to the fillstyle or strokestyle properties. note: gradient coordinates are global, i.e., relative to the current coordinate space. when applied to a shape, the coordinates are not relative to the shape's coordinates. syntax canvasgradient ctx.createlineargradient(x0, y0, x1, y1); the createlineargradient() method is specified by four parameters defining the start and end points of the gradient line. parameters x0 the x-axis coordinate of the start point. y0 the y-axis coordinate of the start point. ...
...axis coordinate of the end point. return value canvasgradient a linear canvasgradient initialized with the specified line. examples filling a rectangle with a linear gradient this example initializes a linear gradient using the createlineargradient() method. three color stops between the gradient's start and end points are then created. ...
... linear gradient this example initializes a linear gradient using the createlineargradient() method. three color stops between the gradient's start and end points are then created. finally, the gradient is assigned to the canvas con
text, and is rendered to a filled rectangle. ...
... living standard ...
CanvasRenderingContext2D.createRadialGradient() - Web APIs
this method returns a canvasgradient. to be applied to a shape, the gradient must first be assigned to the fillstyle or strokestyle properties. note: gradient coordinates are global, i.e., relative to the current coordinate space. when applied to a shape, the coordinates are not relative to the shape's coordinates. syntax canvasgradient ctx.createradialgradient(x0, y0, r0, x1, y1, r1); the createradialgradient() method is specified by six parameters, three defining the gradient's start circle, and three defining the end circle. parameters x0 the x-axis coordinate of the start circle. ...
...e. must be non-negative and finite. return value canvasgradient a radial canvasgradient initialized with the two specified circles. examples filling a rectangle with a radial gradient this example initializes a radial gradient using the createradialgradient() method. three color stops between the gradient's two circles are then created. ...
... this example initializes a radial gradient using the createradialgradient() method. three color stops between the gradient's two circles are then created. finally, the gradient is assigned to the canvas con
text, and is rendered to a filled rectangle. ...
... living standard ...
CanvasRenderingContext2D.ellipse() - Web APIs
syntax void ctx.ellipse(x, y, radiusx, radiusy, rotation, startangle, endangle [, anticlockwise]); the ellipse() method creates an elliptical arc centered at (x, y) with the radii radiusx and radiusy. the path starts at startangle and ends at endangle, and travels in the direction given by anticlockwise (defaulting to clockwise). parameters x the x-axis (horizontal) coordinate of the ellipse's center. y the y-axis (vertical) coordinate of the ellipse's center. radiusx the ellipse's major-axis radius. must be non-negative. radiusy the ellipse's minor-axis radius. must be non-negative. ...
...lt value is false (clockwise). examples drawing a full ellipse this example draws an ellipse at an angle of π/4 radians (45°). to make a full ellipse, the arc begins at an angle of 0 radians (0°), and ends at an angle of 2π radians (360°). html <canvas id="canvas" width="200" height="200"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); // draw the ellipse ctx.beginpath(); ctx.ellipse(100, 100, 50, 75, math.pi / 4, 0, 2 * math.pi); ctx.stroke(); // draw the ellipse's line of reflection ctx.beginpath(); ctx.setlinedash([5, 5]); ctx.moveto(0, 200); ctx.lineto(200, 0); ctx.stroke(); result various elliptical arcs this example creates three elliptical paths with varying properties. html <canvas id="canvas"></canvas>...
..., 2 * math.pi); ctx.stroke(); // draw the ellipse's line of reflection ctx.beginpath(); ctx.setlinedash([5, 5]); ctx.moveto(0, 200); ctx.lineto(200, 0); ctx.stroke(); result various elliptical arcs this example creates three elliptical paths with varying properties. ...
... living standard ...
CanvasRenderingContext2D.fill() - Web APIs
the canvasrenderingcon
text2d.fill() method of the canvas 2d api fills the current or given path with the current fillstyle. syntax void ctx.fill([fillrule]); void ctx.fill(path [, fillrule]); parameters fillrule the algorithm by which to determine if a point is inside or outside the filling region. possible values: "nonzero": the non-zero winding rule. default rule. "evenodd": the even-odd winding rule. path a path2d path to fill. examples filling a rectangle this example fills a rectangle with the fill() method. ...
...inside or outside the filling region. possible values: "nonzero": the non-zero winding rule. default rule. "evenodd": the even-odd winding rule. path a path2d path to fill. examples filling a rectangle this example fills a rectangle with the fill() method. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.rect(10, 10, 150, 100); ctx.fill(); result specifying a path and a fillrule this example saves some intersecting lines to a path2d object. the fill() method is then used to render the object to the canvas. a hole is left unfilled in the object's center by using the "evenodd" rule; by default (with the "nonzero" rule), the hole would also be filled. html <canvas id="canvas"></ca...
...his example saves some intersecting lines to a path2d object. the fill() method is then used to render the object to the canvas. a hole is left unfilled in the object's center by using the "evenodd" rule; by default (with the "nonzero" rule), the hole would also be filled. ...
... living standard ...
CanvasRenderingContext2D.fillStyle - Web APIs
the canvasrenderingcon
text2d.fillstyle property of the canvas 2d api specifies the color, gradient, or pattern to use inside shapes. the default style is #000 (black). for more examples of fill and stroke styles, see applying styles and color in the canvas tutorial. syntax ctx.fillstyle = color; ctx.fillstyle = gradient; ctx.fillstyle = pattern; options color a domstring parsed as css <color> value. gradient a canvasgradient object (a linear or radial gradient). pattern a canvaspattern object (a repeating image). examples changing the fill color of a shape this example applies a blue fill color to a rectangle. ...
... color a domstring parsed as css <color> value. gradient a canvasgradient object (a linear or radial gradient). pattern a canvaspattern object (a repeating image). examples changing the fill color of a shape this example applies a blue fill color to a rectangle. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.fillstyle = 'blue'; ctx.fillrect(10, 10, 100, 100); result creating multiple fill colors using loops in this example, we use two for loops to draw a grid of rectangles, each having a different fill color. to achieve this, we use the two variables i and j to generate a unique rgb color for each square, and only modify the red and green values. (the blue channel has a fixed value.
...ifferent fill color. to achieve this, we use the two variables i and j to generate a unique rgb color for each square, and only modify the red and green values. (the blue channel has a fixed value.) by modifying the channels, you can generate all kinds of palettes. ...
... living standard ...
CanvasRenderingContext2D.globalAlpha - Web APIs
the canvasrenderingcon
text2d.globalalpha property of the canvas 2d api specifies the alpha (transparency) value that is applied to shapes and images before they are drawn onto the canvas. see also the chapter applying styles and color in the canvas tutorial. syntax ctx.globalalpha = value; options value a number between 0.0 (fully transparent) and 1.0 (fully opaque), inclusive. the default value is 1.0. values outside that range, including infinity and nan, will not be set, and globalalpha will retain its previous value. examples drawing translucent shapes this example uses the globalalpha property to draw two semi-transparent rectangles. ...
...ve. the default value is 1.0. values outside that range, including infinity and nan, will not be set, and globalalpha will retain its previous value. examples drawing translucent shapes this example uses the globalalpha property to draw two semi-transparent rectangles. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.globalalpha = 0.5; ctx.fillstyle = 'blue'; ctx.fillrect(10, 10, 100, 100); ctx.fillstyle = 'red'; ctx.fillrect(50, 50, 100, 100); result overlaying transparent shapes this example illustrates the effect of overlaying multiple transparent shapes on top of each other. we begin by drawing a solid background composed of four differently colored squares. next, we set the globalalph...
... increasing radii. with each new circle, the opacity of the previous circles underneath is effectively increased. if we were to increase the step count (and thus draw more circles), the background would eventually disappear completely from the center of the image. ...
... living standard ...
CanvasRenderingContext2D.isPointInStroke() - Web APIs
syntax ctx.ispointinstroke(x, y); ctx.ispointinstroke(path, x, y); parameters x the x-axis coordinate of the point to check. y the y-axis coordinate of the point to check. path a path2d path to check against. if unspecified, the current path is used. return value boolean a boolean, which is true if the point is inside the area contained by the stroking of a path, otherwise false. examples checking a point in the current path this example uses the ispointinstroke() method to check if a point is within the area of the current path's stroke. ...
...area contained by the stroking of a path, otherwise false. examples checking a point in the current path this example uses the ispointinstroke() method to check if a point is within the area of the current path's stroke. html <canvas id="canvas"></canvas> <p>in stroke: <code id="result">false</code></p> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); const result = document.getelementbyid('result'); ctx.rect(10, 10, 100, 100); ctx.stroke(); result.inner
text = ctx.ispointinstroke(50, 10); result checking a point in the specified path whenever you move the mouse, this example checks whether the cursor is in the stroke of an elliptical path2d path. if yes, the ellipse's stroke becomes green, otherwise it is red. html <canvas id="...
....inner
text = ctx.ispointinstroke(50, 10); result checking a point in the specified path whenever you move the mouse, this example checks whether the cursor is in the stroke of an elliptical path2d path. if yes, the ellipse's stroke becomes green, otherwise it is red. ...
... living standard ...
CanvasRenderingContext2D.lineCap - Web APIs
the canvasrenderingcon
text2d.linecap property of the canvas 2d api determines the shape used to draw the end points of lines. note: lines can be drawn with the stroke(), strokerect(), and stroke
text() methods. syntax ctx.linecap = "butt" || "round" || "square"; options "butt" the ends of lines are squared off at the endpoints. default value. "round" the ends of lines are rounded. "square" the ends of lines are squared off by adding a box with an equal width and half the height of the line's thickness. examples changing the shape of line caps this example rounds the end caps of a straight line. ...
...t value. "round" the ends of lines are rounded. "square" the ends of lines are squared off by adding a box with an equal width and half the height of the line's thickness. examples changing the shape of line caps this example rounds the end caps of a straight line. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.beginpath(); ctx.moveto(20, 20); ctx.linewidth = 15; ctx.linecap = 'round'; ctx.lineto(100, 100); ctx.stroke(); result comparison of line caps in this example three lines are drawn, each with a different value for the linecap property. two guides to see the exact differences between the three are added. each of these lines starts and ends exactly on these guides. the line on th...
...h the guides. the second is set to use the "round" option. this adds a semicircle to the end that has a radius half the width of the line. the line on the right uses the "square" option. this adds a box with an equal width and half the height of the line thickness. ...
... living standard ...
CanvasRenderingContext2D.lineDashOffset - Web APIs
the canvasrenderingcon
text2d.linedashoffset property of the canvas 2d api sets the line dash offset, or "phase." note: lines are drawn by calling the stroke() method. syntax ctx.linedashoffset = value; value a float specifying the amount of the line dash offset. the default value is 0.0. examples offsetting a line dash this example draws two dashed lines. the first has no dash offset. the second has a dash offset of 4. ...
...thod. syntax ctx.linedashoffset = value; value a float specifying the amount of the line dash offset. the default value is 0.0. examples offsetting a line dash this example draws two dashed lines. the first has no dash offset. the second has a dash offset of 4. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.setlinedash([4, 16]); // dashed line with no offset ctx.beginpath(); ctx.moveto(0, 50); ctx.lineto(300, 50); ctx.stroke(); // dashed line with offset of 4 ctx.beginpath(); ctx.strokestyle = 'red'; ctx.linedashoffset = 4; ctx.moveto(0, 100); ctx.lineto(300, 100); ctx.stroke(); result the line with a dash offset is drawn in red. marching ants the marching ants effect is an anim...
...lt the line with a dash offset is drawn in red. marching ants the marching ants effect is an animation technique often found in selection tools of computer graphics programs. it helps the user to distinguish the selection border from the image background by animating the border. ...
... living standard ...
CanvasRenderingContext2D.resetTransform() - Web APIs
the canvasrenderingcon
text2d.resettransform() method of the canvas 2d api resets the current transform to the identity matrix. syntax void ctx.resettransform(); examples resetting the matrix this example draws a rotated rectangle after modifying the matrix, and then resets the matrix using the resettransform() method. html <canvas id="canvas"></canvas> javascript the rotate() method rotates the transformation matrix by 45°. the fillrect() method draws a filled rectangle, adjusted according to that matrix. ...
...is example draws a rotated rectangle after modifying the matrix, and then resets the matrix using the resettransform() method. html <canvas id="canvas"></canvas> javascript the rotate() method rotates the transformation matrix by 45°. the fillrect() method draws a filled rectangle, adjusted according to that matrix. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); // draw a rotated rectangle ctx.rotate(45 * math.pi / 180); ctx.fillrect(60, 0, 100, 30); // reset transformation matrix to the identity matrix ctx.resettransform(); result continuing with a regular matrix whenever you're done drawing transformed shapes, you should call resettransform() before rendering anything else. in this example, the first two shapes are drawn with a skew tran...
...ular matrix whenever you're done drawing transformed shapes, you should call resettransform() before rendering anything else. in this example, the first two shapes are drawn with a skew transformation, and the last two are drawn with the identity (regular) transformation. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); // skewed rectangles ctx.transform(1, 0, 1.7, 1, 0, 0); ctx.fillstyle = 'gray'; ctx.fillrect(40, 40, 50, 20); ctx.fillrect(40, 90, 50, 20); // non-skewed rectangles ctx.resettransform(); ctx.fillstyle = 'red'; ctx.fillrect(40, 40, 50, 20); ctx.fillrect(40, 90, 50, 20); result the skewed rectangles are gray, and the non-skewed rectangles are red. polyfill you can also use the settra...
... living standard ...
CanvasRenderingContext2D.rotate() - Web APIs
the canvasrenderingcon
text2d.rotate() method of the canvas 2d api adds a rotation to the transformation matrix. syntax void ctx.rotate(angle); parameters angle the rotation angle, clockwise in radians. you can use degree * math.pi / 180 to calculate a radian from a degree. the rotation center point is always the canvas origin. to change the center point, you will need to move the canvas by using the translate() method. examples rotating a shape this example rotates a rectangle by 45°. note that the center of rotation is the top-left corner of the canvas, and not a location relative to any shape. ...
...hange the center point, you will need to move the canvas by using the translate() method. examples rotating a shape this example rotates a rectangle by 45°. note that the center of rotation is the top-left corner of the canvas, and not a location relative to any shape. ...
...s center coordinates in a negative direction. html <canvas id="canvas"></canvas> javascript the shape is a rectangle with its corner at (80, 60), a width of 140, a height of 30. its horizontal center is at (80 + 140 / 2), or 150. its vertical center is at (60 + 30 / 2), or 75. thus, the center point is at (150, 75). const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); // non-rotated rectangle ctx.fillstyle = 'gray'; ctx.fillrect(80, 60, 140, 30); // matrix transformation ctx.translate(150, 75); ctx.rotate(math.pi / 2); ctx.translate(-150, -75); // rotated rectangle ctx.fillstyle = 'red'; ctx.fillrect(80, 60, 140, 30); result the non-rotated rectangle is gray, and the rotated rectangle is red. specifications specification status ...
... living standard ...
CanvasRenderingContext2D.scale() - Web APIs
by default, one unit on the canvas is exactly one pixel. a scaling transformation modifies this behavior. for instance, a scaling factor of 0.5 results in a unit size of 0.5 pixels; shapes are thus drawn at half the normal size. similarly, a scaling factor of 2.0 increases the unit size so that one unit becomes two pixels; shapes are thus drawn at twice the normal size. syntax void ctx.scale(x, y); parameters x scaling factor in the horizontal direction. a negative value flips pixels across the vertical axis. a value of 1 results in no horizontal scaling. y scaling factor in the vertical direction. ...
...rectangle has a specified width of 8 and a height of 20. the transformation matrix scales it by 9x horizontally and by 3x vertically. thus, its final size is a width of 72 and a height of 60. notice that its position on the canvas also changes. since its specified corner is (10, 10), its rendered corner becomes (90, 30). const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); // scaled rectangle ctx.scale(9, 3); ctx.fillstyle = 'red'; ctx.fillrect(10, 10, 8, 20); // reset current transformation matrix to the identity matrix ctx.settransform(1, 0, 0, 1, 0, 0); // non-scaled rectangle ctx.fillstyle = 'gray'; ctx.fillrect(10, 10, 8, 20); result the scaled rectangle is red, and the non-scaled rectangle is gray. flipping things horizontally or vertically y...
...9, 3); ctx.fillstyle = 'red'; ctx.fillrect(10, 10, 8, 20); // reset current transformation matrix to the identity matrix ctx.settransform(1, 0, 0, 1, 0, 0); // non-scaled rectangle ctx.fillstyle = 'gray'; ctx.fillrect(10, 10, 8, 20); result the scaled rectangle is red, and the non-scaled rectangle is gray. flipping things horizontally or vertically you can use scale(-1, 1) to flip the con
text horizontally and scale(1, -1) to flip it vertically. in this example, the words "hello world!" are flipped horizontally. note that the call to fill
text() specifies a negative x coordinate. this is to adjust for the negative scaling factor: -280 * -1 becomes 280, and
text is drawn leftwards from that point. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid(...
...ip it vertically. in this example, the words "hello world!" are flipped horizontally. note that the call to fill
text() specifies a negative x coordinate. this is to adjust for the negative scaling factor: -280 * -1 becomes 280, and
text is drawn leftwards from that point. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.scale(-1, 1); ctx.font = '48px serif'; ctx.fill
text('hello world!', -280, 90); ctx.settransform(1, 0, 0, 1, 0, 0); result specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.scale' in that specification. living standard ...
CanvasRenderingContext2D.scrollPathIntoView() - Web APIs
the canvasrenderingcon
text2d.scrollpathintoview() method of the canvas 2d api scrolls the current or given path into view. it is similar to element.scrollintoview(). syntax void ctx.scrollpathintoview(); void ctx.scrollpathintoview(path); parameters path a path2d path to use. examples using the scrollpathintoview method this example demonstrates the scrollpathintoview() method. ...
...ew. it is similar to element.scrollintoview(). syntax void ctx.scrollpathintoview(); void ctx.scrollpathintoview(path); parameters path a path2d path to use. examples using the scrollpathintoview method this example demonstrates the scrollpathintoview() method. ...
...t(10, 10, 30, 30); ctx.scrollpathintoview(); edit the code below to see your changes update live in the canvas: playable code <canvas id="canvas" width="400" height="200" class="playable-canvas"> <input id="button" type="range" min="1" max="12"> </canvas> <div class="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="reset" type="button" value="reset" /> </div> <
textarea id="code" class="playable-code"> ctx.beginpath(); ctx.rect(10, 10, 30, 30); ctx.scrollpathintoview();</
textarea> var canvas = document.getelementbyid("canvas"); var ctx = canvas.getcon
text("2d"); var
textarea = document.getelementbyid("code"); var reset = document.getelementbyid("reset"); var edit = document.getelementbyid("edit"); var code =
textarea.value; function drawcanvas() { ctx.c...
...); ctx.rect(10, 10, 30, 30); ctx.scrollpathintoview();</
textarea> var canvas = document.getelementbyid("canvas"); var ctx = canvas.getcon
text("2d"); var
textarea = document.getelementbyid("code"); var reset = document.getelementbyid("reset"); var edit = document.getelementbyid("edit"); var code =
textarea.value; function drawcanvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(
textarea.value); } reset.addeventlistener("click", function() {
textarea.value = code; drawcanvas(); }); edit.addeventlistener("click", function() {
textarea.focus(); })
textarea.addeventlistener("input", drawcanvas); window.addeventlistener("load", drawcanvas); specifications specification status comment html living standardthe definition of 'canvasrenderingcont...
CanvasRenderingContext2D.setLineDash() - Web APIs
it uses an array of values that specify alternating lengths of lines and gaps which describe the pattern. note: to return to using solid lines, set the line dash list to an empty array. syntax ctx.setlinedash(segments); parameters segments an array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). if the number of elements in the array is odd, the elements of the array get copied and concatenated. for example, [5, 15, 25] will become [5, 15, 25, 5, 15, 25]. ...
...5, 25] will become [5, 15, 25, 5, 15, 25]. if the array is empty, the line dash list is cleared and line strokes return to being solid. return value undefined. examples basic example this example uses the setlinedash() method to draw a dashed line above a solid line. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); // dashed line ctx.beginpath(); ctx.setlinedash([5, 15]); ctx.moveto(0, 50); ctx.lineto(300, 50); ctx.stroke(); // solid line ctx.beginpath(); ctx.setlinedash([]); ctx.moveto(0, 100); ctx.lineto(300, 100); ctx.stroke(); result some common patterns this example illustrates a variety of common line dash patterns. html <canvas id="canvas"></canvas> javascript the drawdashedline()...
...</canvas> javascript the drawdashedline() function created below makes the drawing of multiple dashed lines simple. it receives a pattern array as its only parameter. ...
....getcon
text('2d'); let y = 15; drawdashedline([]); drawdashedline([1, 1]); drawdashedline([10, 10]); drawdashedline([20, 5]); drawdashedline([15, 3, 3, 3]); drawdashedline([20, 3, 3, 3, 3, 3, 3, 3]); drawdashedline([12, 3, 3]); // equals [12, 3, 3, 12, 3, 3] result specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.setlinedash' in that specification. living standard ...
CanvasRenderingContext2D.shadowColor - Web APIs
be aware that the shadow's rendered opacity will be affected by the opacity of the fillstyle color when filling, and of the strokestyle color when stroking. note: shadows are only drawn if the shadowcolor property is set to a non-transparent value. one of the shadowblur, shadowoffsetx, or shadowoffsety properties must be non-zero, as well. syntax ctx.shadowcolor = color; color a domstring parsed as a css <color> value. the default value is fully-transparent black. examples adding a shadow to shapes this example adds a shadow to two squares; the first one is filled, and the second one is stroked. ...
...ack. examples adding a shadow to shapes this example adds a shadow to two squares; the first one is filled, and the second one is stroked. the shadowcolor property sets the shadows' color, while shadowoffsetx and shadowoffsety set their position relative to the shapes. ...
...y level of its parent object (even when shadowcolor specifies a completely opaque value). this example strokes and fills a rectangle with translucent colors. html <canvas id="canvas"></canvas> javascript the resulting alpha value of the fill shadow is .8 * .2, or .16. the alpha of the stroke shadow is .8 * .6, or .48. ...
... living standard ...
CanvasRenderingContext2D.strokeRect() - Web APIs
this method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it. syntax void ctx.strokerect(x, y, width, height); the strokerect() method draws a stroked rectangle whose starting point is at (x, y) and whose size is specified by width and height. parameters x the x-axis coordinate of the rectangle's starting point. y the y-axis coordinate of the rectangle's starting point. width the rectangle's width. positive values are to the right, and negative to the left. height the rectangle's height. ...
...e's height. positive values are down, and negative are up. examples a simple stroked rectangle this example draws a rectangle with a green outline using the strokerect() method. html <canvas id="canvas"></canvas> javascript the rectangle's top-left corner is at (20, 10). it has a width of 160 and a height of 100. ...
...xample draws a rectangle with a green outline using the strokerect() method. html <canvas id="canvas"></canvas> javascript the rectangle's top-left corner is at (20, 10). it has a width of 160 and a height of 100. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.strokestyle = 'green'; ctx.strokerect(20, 10, 160, 100); result applying various con
text settings this example draws a rectangle with a drop shadow and thick, beveled outlines. ...
...const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.strokestyle = 'green'; ctx.strokerect(20, 10, 160, 100); result applying various con
text settings this example draws a rectangle with a drop shadow and thick, beveled outlines. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.shadowcolor = '#d53'; ctx.shadowblur = 20; ctx.linejoin = 'bevel'; ctx.linewidth = 15; ctx.strokestyle = '#38f'; ctx.strokerect(30, 30, 160, 90); result specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.strokerect' in that specification. living standard ...
CanvasRenderingContext2D.strokeStyle - Web APIs
the canvasrenderingcon
text2d.strokestyle property of the canvas 2d api specifies the color, gradient, or pattern to use for the strokes (outlines) around shapes. the default is #000 (black). for more examples of stroke and fill styles, see applying styles and color in the canvas tutorial. syntax ctx.strokestyle = color; ctx.strokestyle = gradient; ctx.strokestyle = pattern; options color a domstring parsed as css <color> value. gradient a canvasgradient object (a linear or radial gradient). pattern a canvaspattern object (a repeating image). examples changing the stroke color of a shape this example applies a blue stroke color to a rectangle. ...
... color a domstring parsed as css <color> value. gradient a canvasgradient object (a linear or radial gradient). pattern a canvaspattern object (a repeating image). examples changing the stroke color of a shape this example applies a blue stroke color to a rectangle. html <canvas id="canvas"></canvas> javascript var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcon
text('2d'); ctx.strokestyle = 'blue'; ctx.strokerect(10, 10, 100, 100); result creating multiple stroke colors using loops in this example, we use two for loops and the arc() method to draw a grid of circles, each having a different stroke color. to achieve this, we use the two variables i and j to generate a unique rgb color for each circle, and only modify the green and blue values. (the red ...
...mple, we use two for loops and the arc() method to draw a grid of circles, each having a different stroke color. to achieve this, we use the two variables i and j to generate a unique rgb color for each circle, and only modify the green and blue values. ...
... living standard ...
CanvasRenderingContext2D.translate() - Web APIs
syntax void ctx.translate(x, y); the translate() method adds a translation transformation to the current matrix by moving the canvas and its origin x units horizontally and y units vertically on the grid. parameters x distance to move in the horizontal direction. positive values are to the right, and negative to the left. y distance to move in the vertical direction. positive values are down, and negative are up. examples moving a shape this example draws a square that is moved from its default position by the translate() method. an unmoved square of the same size is then drawn for comparison. ...
...nd negative to the left. y distance to move in the vertical direction. positive values are down, and negative are up. examples moving a shape this example draws a square that is moved from its default position by the translate() method. an unmoved square of the same size is then drawn for comparison. ...
...om its default position by the translate() method. an unmoved square of the same size is then drawn for comparison. html <canvas id="canvas"></canvas> javascript the translate() method translates the con
text by 110 horizontally and 30 vertically. the first square is shifted by those amounts from its default position. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); // moved square ctx.translate(110, 30); ctx.fillstyle = 'red'; ctx.fillrect(0, 0, 80, 80); // reset current transformation matrix to the identity matrix ctx.settransform(1, 0, 0, 1, 0, 0); // unmoved square ctx.fillstyle = 'gray'; ctx.fillrect(0, 0, 80, 80); result the moved square is red, and the unmoved square is gray. specifications specification status comment ...
... living standard ...
Element: contextmenu event - Web APIs
the con
textmenu event fires when the user attempts to open a con
text menu. this event is typically triggered by clicking the right mouse button, or by pressing the con
text menu key. in the latter case, the con
text menu is displayed at the bottom left of the focused element, unless the element is a tree, in which case the con
text menu is displayed at the bottom left of the current row. any right-click event that is not disabled (by calling the event's preventdefault() method) will result in a con
textmenu event being fired at the targeted element. ...
...ess the element is a tree, in which case the con
text menu is displayed at the bottom left of the current row. any right-click event that is not disabled (by calling the event's preventdefault() method) will result in a con
textmenu event being fired at the targeted element. bubbles yes cancelable yes interface mouseevent event handler property oncon
textmenu examples in this example, the default action of the con
textmenu event is canceled using preventdefault() when the con
textmenu event is fired at the first paragraph. as a result, the first paragraph will do nothing when right-clicked, while the second paragraph will show the standard con
text menu offered by your browser. ...
...t event handler property oncon
textmenu examples in this example, the default action of the con
textmenu event is canceled using preventdefault() when the con
textmenu event is fired at the first paragraph. as a result, the first paragraph will do nothing when right-clicked, while the second paragraph will show the standard con
text menu offered by your browser. ...
...handler property oncon
textmenu examples in this example, the default action of the con
textmenu event is canceled using preventdefault() when the con
textmenu event is fired at the first paragraph. as a result, the first paragraph will do nothing when right-clicked, while the second paragraph will show the standard con
text menu offered by your browser. html <p id="nocon
textmenu">the con
text menu has been disabled on this paragraph.</p> <p>but it has not been disabled on this one.</p> javascript nocon
text = document.getelementbyid('nocon
textmenu'); nocon
text.addeventlistener('con
textmenu', e => { e.preventdefault(); }); result specifications specification status comment html living standardthe definition of 'con
textmenu' in that specification. ...
GlobalEventHandlers.oncontextmenu - Web APIs
the oncon
textmenu property of the globaleventhandlers mixin is an eventhandler that processes con
textmenu events. the con
textmenu event typically fires when the right mouse button is clicked on the window. unless the default behavior is prevented, the browser con
text menu will activate. syntax target.oncon
textmenu = functionref; value functionref is a function name or a function expression. the function receives an event object as its sole argument. only one oncon
textmenu handler can be assigned to an object at a time. you may prefer to use the eventtarget.addeventlistener() method instead, since it's more flexible. examples disabling con
text menus this snippet prevents con
text menus from opening in the window. the con
text menu typically appears upon a right click. html <p>try ope...
...ceives an event object as its sole argument. only one oncon
textmenu handler can be assigned to an object at a time. you may prefer to use the eventtarget.addeventlistener() method instead, since it's more flexible. examples disabling con
text menus this snippet prevents con
text menus from opening in the window. the con
text menu typically appears upon a right click. html <p>try opening the con
text menu. is it disabled?<p> javascript window.oncon
textmenu = (e) => { e.preventdefault(); } result pausing an animation this example pauses a spinning shape whenever you open the con
text menu. html <div class="shape">spinning</div> <p class="note" hidden>click to unpause.</p> css @keyframes spin { from { transform: rotate(0); } to { transform: rotate(1turn); } } .shap...
... living standard ...
... living standard ...
HTMLCanvasElement: webglcontextrestored event - Web APIs
the webglcon
textrestored event of the webgl api is fired if the user agent restores the drawing buffer for a webglrenderingcon
text object. once the con
text is restored, webgl resources such as
textures and buffers that were created before the con
text was lost are no longer valid. you need to reinitialize the state of your webgl application and recreate resources. ...
... fired if the user agent restores the drawing buffer for a webglrenderingcon
text object. once the con
text is restored, webgl resources such as
textures and buffers that were created before the con
text was lost are no longer valid. you need to reinitialize the state of your webgl application and recreate resources. ...
...n
text is restored, webgl resources such as
textures and buffers that were created before the con
text was lost are no longer valid. you need to reinitialize the state of your webgl application and recreate resources. bubbles yes cancelable yes interface webglcon
textevent event handler property none example with the help of the webgl_lose_con
text extension, you can simulate the webglcon
textrestored event: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcon
text('webgl'); canvas.addeventlistener('webglcon
textrestored', function(e) { console.log(e); }, false); gl.ge
textension('webgl_lose_con
text').restorecon
text(); // "webglcon
textrestored" event is logged. specifications specification status comment...
...estored event: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcon
text('webgl'); canvas.addeventlistener('webglcon
textrestored', function(e) { console.log(e); }, false); gl.ge
textension('webgl_lose_con
text').restorecon
text(); // "webglcon
textrestored" event is logged. specifications specification status comment webgl 1.0the definition of 'webglcon
textrestored' in that specification. recommendation initial definition. ...
OES_texture_half_float - Web APIs
the oes_
texture_half_float extension is part of the webgl api and adds
texture formats with 16- (aka half float) and 32-bit floating-point components. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is only available to webgl1 con
texts. in webgl2, the functionality of this extension is available on the webgl2 con
text by default. the constant in webgl2 is gl.half_float. constants ext.half_float_oes half floating-point type (16-bit). extended methods this extension extends webglrenderingcon
text.teximage2d() and webglrenderingcon
text.texsubimage2d(): the type parameter now accepts ext.half_float_oes. limitation: linear filtering linear filter...
...ailable on the webgl2 con
text by default. the constant in webgl2 is gl.half_float. constants ext.half_float_oes half floating-point type (16-bit). extended methods this extension extends webglrenderingcon
text.teximage2d() and webglrenderingcon
text.texsubimage2d(): the type parameter now accepts ext.half_float_oes. limitation: linear filtering linear filtering on half floating-point
textures is not allowed with this extension. if you set the magnification or minification filter in the webglrenderingcon
text.texparameter() method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use half floating-point
textures, the
texture will be marked as incomplete. ...
...on half floating-point
textures is not allowed with this extension. if you set the magnification or minification filter in the webglrenderingcon
text.texparameter() method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use half floating-point
textures, the
texture will be marked as incomplete. to use linear filtering on half floating-point
textures, enable the oes_
texture_half_float_linear extension in addition to this extension. half floating-point color buffers this extension implicitly enables the ext_color_buffer_half_float extension (if supported), which allows rendering to 16-bit floating point formats. ...
...tures, the
texture will be marked as incomplete. to use linear filtering on half floating-point
textures, enable the oes_
texture_half_float_linear extension in addition to this extension. half floating-point color buffers this extension implicitly enables the ext_color_buffer_half_float extension (if supported), which allows rendering to 16-bit floating point formats. examples var ext = gl.ge
textension('oes_
texture_half_float'); var
texture = gl.create
texture(); gl.bind
texture(gl.
texture_2d,
texture); gl.teximage2d(gl.
texture_2d, 0, gl.rgba, gl.rgba, ext.half_float_oes, image); specifications specification status comment oes_
texture_half_floatthe definition of 'oes_
texture_half_float' in that specification. recommendation initial definition. ...
PublicKeyCredential.getClientExtensionResults() - Web APIs
during the creation or fetching of a publickeycredential (respectively via navigator.credentials.create() and navigator.credentials.get()), it is possible to have "custom" processing by the client for different extensions which are respectively given by publickeycredentialcreationoptions.extensions and publickeycredentialrequestoptions.extensions. note: extensions are optional and different browsers may recognize different extensions. ...
...ctively given by publickeycredentialcreationoptions.extensions and publickeycredentialrequestoptions.extensions. note: extensions are optional and different browsers may recognize different extensions. all extensions are optional for the client to process them: if a browser does not know of a given extension, that will not cause any failure. note: this method may only be used in top-level con
texts and will not be available in an <iframe> for example. syntax maparraybuffer = publickeycredential.getclien
textensionresults() parameters none. return value an arraybuffer containing the result of the processing of the different extensions by the client. this object contains a map between the extensions' identifiers and their results from the processing. warning! as of march 2019, only a...
... recomm...
...) { var mybuffer = newcredentialinfo.getclien
textensionresults(); // mybuffer will contain the result of any of the processing of the "loc" and "uvi" extensions }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'getclien
textensionresults()' in that specification. recommendation initial definition. ...
Request.context - Web APIs
the deprecated con
text read-only property of the request interface contains the con
text of the request (e.g., audio, image, iframe). this defines what sort of resource is being fetched. this has been replaced by the destination property. the con
text of a request is only relevant in the serviceworker api; a service worker can make decisions based on whether the url is for an image, or an embeddable object such as a <video>, iframe, etc. note: you can find a full list of the different available con
texts including associated con
text frame types, csp directives, and platform feature examples in the fetch spec request con
text section. syntax var mycon
text = request.con
text; value a requestcon
text value. example in the following snippet, we create a new request using the request.request...
...le con
texts including associated con
text frame types, csp directives, and platform feature examples in the fetch spec request con
text section. syntax var mycon
text = request.con
text; value a requestcon
text value. ...
...platform feature examples in the fetch spec request con
text section. syntax var mycon
text = request.con
text; value a requestcon
text value. ...
...mples in the fetch spec request con
text section. syntax var mycon
text = request.con
text; value a requestcon
text value. ...
WEBGL_compressed_texture_atc - Web APIs
the webgl_compressed_
texture_atc extension is part of the webgl api and exposes 3 atc compressed
texture formats. atc is a proprietary compression algorithm for compressing
textures on handheld devices. compressed
textures reduce the amount of memory needed to store a
texture on the gpu, allowing for higher resolution
textures or more of the same resolution
textures. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: atc compression is typically available on mobile devices with adreno gpus, that are currently only built into qualcomm snapdragon devices. this extension is available to both, webgl1 and webgl2 con
texts. ...
...extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: atc compression is typically available on mobile devices with adreno gpus, that are currently only built into qualcomm snapdragon devices. this extension is available to both, webgl1 and webgl2 con
texts. constants the compressed
texture formats are exposed by 3 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d(). ext.compressed_rgb_atc_webgl compresses rgb
textures with no alpha channel. ext.compressed_rgba_atc_explicit_alpha_webgl compresses rgba
textures using explicit alpha encoding (useful when alpha transitions are sharp). ext.compressed_rgba_atc_interpolated_alpha_webg...
...osed by 3 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d(). ext.compressed_rgb_atc_webgl compresses rgb
textures with no alpha channel. ext.compressed_rgba_atc_explicit_alpha_webgl compresses rgba
textures using explicit alpha encoding (useful when alpha transitions are sharp). ext.compressed_rgba_atc_interpolated_alpha_webgl compresses rgba
textures using interpolated alpha encoding (useful when alpha transitions are gradient). ...
...ompressed_rgb_atc_webgl compresses rgb
textures with no alpha channel. ext.compressed_rgba_atc_explicit_alpha_webgl compresses rgba
textures using explicit alpha encoding (useful when alpha transitions are sharp). ext.compressed_rgba_atc_interpolated_alpha_webgl compresses rgba
textures using interpolated alpha encoding (useful when alpha transitions are gradient). examples var ext = gl.ge
textension('webgl_compressed_
texture_atc'); var
texture = gl.create
texture(); gl.bind
texture(gl.
texture_2d,
texture); gl.compressedteximage2d(gl.
texture_2d, 0, ext.compressed_rgb_atc_webgl, 512, 512, 0,
texturedata); specifications specification status comment webgl_compressed_
texture_atcthe definition of 'webgl_compressed_
texture_atc' in that specification. draft in...
WebGL2RenderingContext.copyTexSubImage3D() - Web APIs
the webgl2renderingcon
text.copytexsubimage3d() method of the webgl api copies pixels from the current webglframebuffer into an existing 3d
texture sub-image. syntax void gl.copytexsubimage3d(target, level, xoffset, yoffset, zoffset, x, y, width, height); parameters target a glenum specifying the binding point (target) of the active
texture. possible values: gl.
texture_3d: a three-dimensional
texture. gl.
texture_2d_array: a two-dimensional array
texture. level a glint specifying the level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. xoffset a glint specifying the x offset within the
texture image. yoffset a glint specifying the y offset within the
texture image. zoffset a glint specifying the z offset within the t...
... editor's draft initial definition. ...
... editor's draft initial definition. ...
... editor's draft initial definition. opengl es 3.0the definition of 'glcopytexsubimage3d' in that specification. ...
WebGL2RenderingContext.getSamplerParameter() - Web APIs
the webgl2renderingcon
text.getsamplerparameter() method of the webgl 2 api returns parameter information of a webglsampler object. syntax any gl.getsamplerparameter(sampler, pname); parameters sampler a webglsampler object. pname a glenum specifying which information to return. possible values: gl.
texture_compare_func: returns a glenum indicating the
texture comparison function. gl.
texture_compare_mode: returns a glenum indicating the
texture comparison mode. gl.
texture_mag_filter: returns a glenum indicating the
texture magnification filter. gl.
texture_max_lod: returns a glfloat indicating the maximum level-of-detail value. ...
...g which information to return. possible values: gl.
texture_compare_func: returns a glenum indicating the
texture comparison function. gl.
texture_compare_mode: returns a glenum indicating the
texture comparison mode. gl.
texture_mag_filter: returns a glenum indicating the
texture magnification filter. gl.
texture_max_lod: returns a glfloat indicating the maximum level-of-detail value. gl.
texture_min_filter: returns a glenum indicating the
texture minification filter gl.
texture_min_lod: returns a glfloat indicating the minimum level-of-detail value. gl.
texture_wrap_r: returns a glenum indicating the
texture wrapping function for the
texture coordinate r. ...
...exture magnification filter. gl.
texture_max_lod: returns a glfloat indicating the maximum level-of-detail value. gl.
texture_min_filter: returns a glenum indicating the
texture minification filter gl.
texture_min_lod: returns a glfloat indicating the minimum level-of-detail value. gl.
texture_wrap_r: returns a glenum indicating the
texture wrapping function for the
texture coordinate r. gl.
texture_wrap_s: returns a glenum indicating the
texture wrapping function for the
texture coordinate s. gl.
texture_wrap_t: returns a glenum indicating the
texture wrapping function for the
texture coordinate t. return value depends on the pname parameter, either a glenum or a glfloat. ...
... editor's draft initial definition. opengl es 3.0the definition of 'glgetsamplerparameter' in that specification. ...
WebGL2RenderingContext.samplerParameter[if]() - Web APIs
the webgl2renderingcon
text.samplerparameter[if]() methods of the webgl 2 api set webglsampler parameters. syntax void gl.samplerparameteri(sampler, pname, param); void gl.samplerparameterf(sampler, pname, param); parameters sampler a webglsampler object. pname a glenum specifying which parameter to set. possible values: gl.
texture_compare_func: a glenum specifying the
texture comparison function. gl.
texture_compare_mode: a glenum specifying the
texture comparison mode. gl.
texture_mag_filter: a glenum specifying the
texture magnification filter. gl.
texture_max_lod: a glfloat specifying the maximum level-of-detail value. ...
...er object. pname a glenum specifying which parameter to set. possible values: gl.
texture_compare_func: a glenum specifying the
texture comparison function. gl.
texture_compare_mode: a glenum specifying the
texture comparison mode. gl.
texture_mag_filter: a glenum specifying the
texture magnification filter. gl.
texture_max_lod: a glfloat specifying the maximum level-of-detail value. gl.
texture_min_filter: a glenum specifying the
texture minification filter gl.
texture_min_lod: a glfloat specifying the minimum level-of-detail value. gl.
texture_wrap_r: a glenum specifying the
texture wrapping function for the
texture coordinate r. ...
...ilter: a glenum specifying the
texture magnification filter. gl.
texture_max_lod: a glfloat specifying the maximum level-of-detail value. gl.
texture_min_filter: a glenum specifying the
texture minification filter gl.
texture_min_lod: a glfloat specifying the minimum level-of-detail value. gl.
texture_wrap_r: a glenum specifying the
texture wrapping function for the
texture coordinate r. gl.
texture_wrap_s: a glenum specifying the
texture wrapping function for the
texture coordinate s. gl.
texture_wrap_t: a glenum specifying the
texture wrapping function for the
texture coordinate t. param a glint (samplerparameteri) or a glfloat (samplerparameterf) specifying a value for pname. return value none. ...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
WebGLRenderingContext.bindBuffer() - Web APIs
gl.copy_write_buffer: buffer for copying from one buffer object to another. gl.transform_feedback_buffer: buffer for transform feedback operations. ...
... gl.copy_write_buffer: buffer for copying from one buffer object to another. gl.transform_feedback_buffer: buffer for transform feedback operations. ...
...bgl api binds a given webglbuffer to a target. syntax void gl.bindbuffer(target, buffer); parameters target a glenum specifying the binding point (target). possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates,
texture coordinate data, or vertex color data. gl.element_array_buffer: buffer used for element indices. when using a webgl 2 con
text, the following values are available additionally: gl.copy_read_buffer: buffer for copying from one buffer object to another. gl.copy_write_buffer: buffer for copying from one buffer object to another. gl.transform_feedback_buffer: buffer for transform feedback operations. gl.uniform_buffer: buffer used for storing uniform blocks. gl.pixel_pack_buffer: buffer used for pixel...
...ill throw an invalid_operation error and the current buffer binding will remain the same. a webglbuffer which has been marked for deletion with deletebuffer cannot be (re-)bound. an attempt to do so will generate an invalid_operation error, and the current binding will remain untouched. examples binding a buffer to a target var canvas = document.getelementbyid('canvas'); var gl = canvas.getcon
text('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); getting current bindings to check the current buffer bindings, query the array_buffer_binding and element_array_buffer_binding constants. gl.getparameter(gl.array_buffer_binding); gl.getparameter(gl.element_array_buffer_binding); specifications specification status comment webgl 1.0th...
WebGLRenderingContext.checkFramebufferStatus() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. ...
...t.checkframebufferstatus() method of the webgl api returns the completeness status of the webglframebuffer object. syntax glenum gl.checkframebufferstatus(target); parameters target a glenum specifying the binding point (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. when using a webgl 2 con
text, the following values are available additionally: gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. return value a glenum indicating the completeness status of the framebuffer or 0 if an error occurs. possible enum return values: ...
...ll framebuffer attachment points are framebuffer attachment complete. gl.framebuffer_incomplete_missing_attachment: there is no attachment. gl.framebuffer_incomplete_dimensions: height and width of the attachment are not the same. gl.framebuffer_unsupported: the format of the attachment is not supported or if depth and stencil attachments are not the same renderbuffer. when using a webgl 2 con
text, the following values can be returned additionally: gl.framebuffer_incomplete_multisample: the values of gl.renderbuffer_samples are different among attached renderbuffers, or are non-zero if the attached images are a mix of renderbuffers and
textures. when using the ovr_multiview2 extension, the following value can be returned additionally: ext.framebuffer_incomplete_view_targe...
...g the ovr_multiview2 extension, the following value can be returned additionally: ext.framebuffer_incomplete_view_targets_ovr: if baseviewindex is not the same for all framebuffer attachment points where the value of framebuffer_attachment_object_type is not none, the framebuffer is considered incomplete. examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcon
text('webgl'); var framebuffer = gl.createframebuffer(); // ... gl.checkframebufferstatus(gl.framebuffer); specifications specification status comment webgl 1.0the definition of 'checkframebufferstatus' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glcheckframebufferstatus' in that specification. stand...
WebGLRenderingContext.copyTexSubImage2D() - Web APIs
the webglrenderingcon
text.copytexsubimage2d() method of the webgl api copies pixels from the current webglframebuffer into an existing 2d
texture sub-image. syntax void gl.copytexsubimage2d(target, level, xoffset, yoffset, x, y, width, height); parameters target a glenum specifying the binding point (target) of the active
texture. possible values: gl.
texture_2d: a two-dimensional
texture. gl.
texture_cube_map_positive_x: positive x face for a cube-mapped
texture. gl.
texture_cube_map_negative_x: negative x face for a cube-mapped
texture. gl.
texture_cube_map_positive_y: positive y face for a cube-mapped
texture. gl.
texture_cube_map_negative_y: negative y face for a cube-mapped
texture. ...
... of the active
texture. possible values: gl.
texture_2d: a two-dimensional
texture. gl.
texture_cube_map_positive_x: positive x face for a cube-mapped
texture. gl.
texture_cube_map_negative_x: negative x face for a cube-mapped
texture. gl.
texture_cube_map_positive_y: positive y face for a cube-mapped
texture. gl.
texture_cube_map_negative_y: negative y face for a cube-mapped
texture. gl.
texture_cube_map_positive_z: positive z face for a cube-mapped
texture. gl.
texture_cube_map_negative_z: negative z face for a cube-mapped
texture. level a glint specifying the level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. xoffset a glint specifying the horizontal offset within the
texture image. yoffset a glint specifying the vertical offse...
...positive_z: positive z face for a cube-mapped
texture. gl.
texture_cube_map_negative_z: negative z face for a cube-mapped
texture. level a glint specifying the level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. xoffset a glint specifying the horizontal offset within the
texture image. yoffset a glint specifying the vertical offset within the
texture image. x a glint specifying the x coordinate of the lower left corner where to start copying. y a glint specifying the y coordinate of the lower left corner where to start copying. width a glsizei specifying the width of the
texture. height a glsizei specifying the height of the
texture. return value none. ...
... recommendation initial definition. opengl es 2.0the definition of 'glcopytexsubimage2d' in that specification. ...
WebGLRenderingContext.getBufferParameter() - Web APIs
gl.copy_write_buffer: buffer for copying from one buffer object to another. gl.transform_feedback_buffer: buffer for transform feedback operations. ...
... gl.copy_write_buffer: buffer for copying from one buffer object to another. gl.transform_feedback_buffer: buffer for transform feedback operations. ...
... api returns information about the buffer. syntax any gl.getbufferparameter(target, pname); parameters target a glenum specifying the target buffer object. possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates,
texture coordinate data, or vertex color data. gl.element_array_buffer: buffer used for element indices. when using a webgl 2 con
text, the following values are available additionally: gl.copy_read_buffer: buffer for copying from one buffer object to another. gl.copy_write_buffer: buffer for copying from one buffer object to another. gl.transform_feedback_buffer: buffer for transform feedback operations. gl.uniform_buffer: buffer used for storing uniform blocks. gl.pixel_pack_buffer: buffer used for pixel...
...k_buffer: buffer used for pixel transfer operations. pname a glenum specifying information to query. possible values: gl.buffer_size: returns a glint indicating the size of the buffer in bytes. gl.buffer_usage: returns a glenum indicating the usage pattern of the buffer. this is either: gl.static_draw, gl.dynamic_draw, gl.stream_draw. when using a webgl 2 con
text, the following values are available additionally: gl.static_read, gl.dynamic_read, gl.stream_read, gl.static_copy, gl.dynamic_copy, gl.stream_copy. return value depends on the requested information (as specified with pname). either a glint or a glenum. examples gl.getbufferparameter(gl.array_buffer, gl.buffer_size); specificat...
-webkit-text-stroke-width - CSS: Cascading Style Sheets
the -webkit-
text-stroke-width css property specifies the width of the stroke for
text. syntax /* keyword values */ -webkit-
text-stroke-width: thin; -webkit-
text-stroke-width: medium; -webkit-
text-stroke-width: thick; /* <length> values */ -webkit-
text-stroke-width: 2px; -webkit-
text-stroke-width: 0.1em; -webkit-
text-stroke-width: 1mm; -webkit-
text-stroke-width: 5pt; /* global values */ -webkit-
text-stroke-width: inherit; -webkit-
text-stroke-width: initial; -webkit-
text-stroke-width: unset; values <line-width> the width of the stroke. ...
... values */ -webkit-
text-stroke-width: inherit; -webkit-
text-stroke-width: initial; -webkit-
text-stroke-width: unset; values <line-width> the width of the stroke. ...
...; -webkit-
text-stroke-width: initial; -webkit-
text-stroke-width: unset; values <line-width> the width of the stroke. formal definition initial value0applies toall elementsinheritedyescomputed valueabsolute <length>animation typediscrete formal syntax <length> examples varying stroke widths css p { margin: 0; font-size: 4em; -webkit-
text-stroke-color: red; } #thin { -webkit-
text-stroke-width: thin; } #medium { -webkit-
text-stroke-width: 3px; } #thick { -webkit-
text-stroke-width: 1.5mm; } html <p id="thin">thin stroke</p> <p id="medium">medium stroke</p> <p id="thick">thick stroke</p> results specifications specification status comment compatibility standardthe definition of '-webkit-
text-stroke-width' in that specification. l...
...bkit-
text-stroke-width: 1.5mm; } html <p id="thin">thin stroke</p> <p id="medium">medium stroke</p> <p id="thick">thick stroke</p> results specifications specification status comment compatibility standardthe definition of '-webkit-
text-stroke-width' in that specification. living standard initial standardization safari css reference '-webkit-
text-stroke-width' in that document. non-standard unofficial documentation initial documentation ...
Stacking context example 2 - CSS: Cascading Style Sheets
« css « understanding css z-index stacking con
text example 2 this is a very simple example, but it is the key for understanding the concept of stacking con
text. there are the same four divs of the previous example, but now z-index properties are assigned on both levels of the hierarchy. you can see that div #2 (z-index: 2) is above div #3 (z-index: 1), because they both belong to the same stacking con
text (the root one), so z-index values rule how elements are stacked. what can be considered strange is that div #2 (z-index: 2) is above div #4 (z-index: 10), despite their z-index values. the reason is that they do not belong to the same stacking con
text. div #4 belongs to the stacking con
text created by div #3, and as explained previously div #3 (and all its content) is under div #2. ...
...ents are stacked. what can be considered strange is that div #2 (z-index: 2) is above div #4 (z-index: 10), despite their z-index values. the reason is that they do not belong to the same stacking con
text. div #4 belongs to the stacking con
text created by div #3, and as explained previously div #3 (and all its content) is under div #2. to better understand the situation, this is the stacking con
text hierarchy: root stacking con
text div #2 (z-index 2) div #3 (z-index 1) div #4 (z-index 10) note: it is worth remembering that in general the html hierarchy is different from the stacking con
text hierarchy. in the stacking con
text hierarchy, elements that do not create a stacking con
text are collapsed on their parent. example source code <!doctype html publi...
... note: it is worth remembering that in general the html hierarchy is different from the stacking con
text hierarchy. in the stacking con
text hierarchy, elements that do not create a stacking con
text are collapsed on their parent. ...
...ight: bold; } #div2 { z-index: 2; } #div3 { z-index: 1; } #div4 { z-index: 10; } #div1,#div3 { height: 80px; position: relative; border: 1px dashed #669966; background-color: #ccffcc; padding-left: 5px; } #div2 { opacity: 0.8; position: absolute; width: 150px; height: 200px; top: 20px; left: 170px; border: 1px dashed #990000; background-color: #ffdddd;
text-align: center; } #div4 { opacity: 0.8; position: absolute; width: 200px; height: 70px; top: 65px; left: 50px; border: 1px dashed #000099; background-color: #ddddff;
text-align: left; padding-left: 10px; } </style></head> <body> <br /> <div id="div1"><br /> <span class="bold">div #1</span><br /> position: relative; <div id="div2">...
text-underline-offset - CSS: Cascading Style Sheets
the
text-underline-offset css property sets the offset distance of an underline
text decoration line (applied using
text-decoration) from its original position.
text-underline-offset is not part of the
text-decoration shorthand. while an element can have multiple
text-decoration lines,
text-underline-offset only impacts underlining, and not other possible line decoration options such as overline or line-through. syntax /* single keyword */
text-underline-offset: auto; /* length */
text-underline-offset: 0.1em;
text-underline-offset: 3px; /* percentage */
text-underline-offset: 20%; /* global values */
text-underline-offset: inherit;
text-underline-offset: initial;
text-underline-offset: unset; the
text-underline-offset property is specified as a single value from the list below. valu...
...are child elements with different font sizes or vertical alignment. formal definition initial valueautoapplies toall elements. ...
...al definition initial valueautoapplies toall elements. it also applies to ::first-letter and ::first-line.inheritedyespercentagesrefer to the font size of the element itselfcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length> | <percentage> examples <p class="oneline">here's some
text with an offset wavy red underline!</p> <br> <p class="twolines">this
text has lines both above and below it. ...
...-letter and ::first-line.inheritedyespercentagesrefer to the font size of the element itselfcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length> | <percentage> examples <p class="oneline">here's some
text with an offset wavy red underline!</p> <br> <p class="twolines">this
text has lines both above and below it. only the bottom one is offset.</p> p {
text-decoration: underline wavy red;
text-underline-offset: 1em; } .twolines {
text-decoration-color: purple;
text-decoration-line: underline overline; } specifications specification status comment css
text decoration module level 4the definition of '
text-underline-offset' in that specification. working draft initial definition. ...
<body>: The Document Body element - HTML: Hypertext Markup Language
element of an <html> element. implicit aria role document permitted aria roles no role permitted dom interface htmlbodyelement the <body> element exposes the htmlbodyelement interface. you can access the <body> element through the document.body property. attributes this element includes the global attributes. alink color of
text for hyperlinks when selected. this method is non-conforming, use css color property in conjunction with the :active pseudo-class instead. background uri of a image to use as a background. this method is non-conforming, use css background property on the element instead. bgcolor background color for the document. this method is non-conforming, use css background-color property on the eleme...
...or the document. this method is non-conforming, use css background-color property on the element instead. bottommargin the margin of the bottom of the body. this method is non-conforming, use css margin-bottom property on the element instead. leftmargin the margin of the left of the body. this method is non-conforming, use css margin-left property on the element instead. link color of
text for unvisited hyper
text links. this method is non-conforming, use css color property in conjunction with the :link pseudo-class instead. onafterprint function to call after the user has printed the document. onbeforeprint function to call when the user requests printing of the document. onbeforeunload function to call when the document is about to be unloaded. onblur function to call when...
...ion to call when the document has been resized. onstorage function to call when the storage area has changed. onundo function to call when the user has moved backward in undo transaction history. onunload function to call when the document is going away. rightmargin the margin of the right of the body. this method is non-conforming, use css margin-right property on the element instead.
text foreground color of
text. this method is non-conforming, use css color property on the element instead. topmargin the margin of the top of the body. this method is non-conforming, use css margin-top property on the element instead. vlink color of
text for visited hyper
text links. this method is non-conforming, use css color property in conjunction with the :visited pseudo-class instead...
... of '<body>' in that specification. recommendation obsoleted the formerly deprecated attributes. defined the behavior of the non-conforming and never standardized topmargin, leftmargin, rightmargin and bottommargin. added the on* attributes. html 4.01 specificationthe definition of '<body>' in that specification. recommendation deprecated the alink, background, bgcolor, link,
text and vlink attributes. ...
<br>: The Line Break element - HTML: Hypertext Markup Language
note: do not use <br> to create margins between paragraphs; wrap them in <p> elements and use the css margin property to control their size. ...
...riting a poem or an address, where the division of lines is significant. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. as you can see from the above example, a <br> element is included at each point where we want the
text to break. the
text after the <br> begins again at the start of the next line of the
text block. note: do not use <br> to create margins between paragraphs; wrap them in <p> elements and use the css margin property to control their size. attributes this element's attributes include the global attributes. deprecated attributes clear indicates where to begin the next line after the break. ...
...se <br> to create margins between paragraphs; wrap them in <p> elements and use the css margin property to control their size. attributes this element's attributes include the global attributes. deprecated attributes clear indicates where to begin the next line after the break. styling with css the <br> element has a single, well-defined purpose — to create a line break in a block of
text. as such, it has no dimensions or visual output of its own, and there is very little you can do to style it. you can set a margin on <br> elements themselves to increase the spacing between the lines of
text in the block, but this is a bad practice — you should use the line-height property that was designed for that purpose. examples simple br in the following example we use <br> elements t...
... a bad practice — you should use the line-height property that was designed for that purpose. examples simple br in the following example we use <br> elements to create line breaks between the different lines of a postal address: mozilla<br> 331 e. evelyn avenue<br> mountain view, ca<br> 94041<br> usa<br> the result looks like so: accessibility concerns creating separate paragraphs of
text using <br> is not only bad practice, it is problematic for people who navigate with the aid of screen reading technology. screen readers may announce the presence of the element, but not any content contained within <br>s. this can be a confusing and frustrating experience for the person using the screen reader. use <p> elements, and use css properties like margin to control their spacing. tech...
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
e of a <form> element you want the <fieldset> to be part of, even if it is not inside the form. name the name associated with the group. note: the caption for the fieldset is given by the first <legend> element nested inside it. styling with css there are several special styling considerations for <fieldset>. its display value is block by default, and it establishes a block formatting con
text. if the <fieldset> is styled with an inline-level display value, it will behave as inline-block, otherwise it will behave as block. by default there is a 2px groove border surrounding the contents, and a small amount of default padding. the element has min-inline-size: min-content by default. if a <legend> is present, it is placed over the block-start border. the <legend> shrink-wraps, and also ...
...d with an inline-level display value, it will behave as inline-block, otherwise it will behave as block. by default there is a 2px groove border surrounding the contents, and a small amount of default padding. the element has min-inline-size: min-content by default. if a <legend> is present, it is placed over the block-start border. the <legend> shrink-wraps, and also establishes a formatting con
text. the display value is blockified. (for example, display: inline behaves as block.) there will be an anonymous box holding the contents of the <fieldset>, which inherits certain properties from the <fieldset>. if the <fieldset> is styled with display: grid or display: inline-grid, then the anonymous box will be a grid formatting con
text. if the <fieldset> is styled with display: flex or display: ...
...behaves as block.) there will be an anonymous box holding the contents of the <fieldset>, which inherits certain properties from the <fieldset>. if the <fieldset> is styled with display: grid or display: inline-grid, then the anonymous box will be a grid formatting con
text. if the <fieldset> is styled with display: flex or display: inline-flex, then the anonymous box will be a flex formatting con
text. otherwise, it establishes a block formatting con
text. you can feel free to style the <fieldset> and <legend> in any way you want to suit your page design. examples simple fieldset this example shows a really simple <fieldset> example, with a <legend>, and a single control inside it. <form action="#"> <fieldset> <legend>simple fieldset</legend> <input type="radio" id="radio"> <...
...radio"> <label for="radio">spirit of radio</label> </fieldset> </form> disabled fieldset this example shows a disabled <fieldset> with two controls inside it. note how both the controls are disabled due to being inside a disabled <fieldset>. <form action="#"> <fieldset disabled> <legend>disabled fieldset</legend> <div> <label for="name">name: </label> <input type="
text" id="name" value="chris"> </div> <div> <label for="pwd">archetype: </label> <input type="password" id="pwd" value="wookie"> </div> </fieldset> </form> technical summary content categories flow content, sectioning root, listed, form-associated element, palpable content. permitted content an optional <legend> element, followed by flow content. ...
<form> - HTML: Hypertext Markup Language
attribute on <input type=file> elements. accept-charset space-separated character encodings the server accepts. the browser uses them in the order in which they are listed. the default value means the same encoding as the page. (in previous versions of html, character encodings could also be delimited by commas.) autocapitalize a nonstandard attribute used by ios safari that controls how
textual form elements should be automatically capitalized. autocapitalize attributes on a form elements override it on <form>. possible values: none: no automatic capitalization. sentences (default): capitalize the first letter of each sentence. words: capitalize the first letter of each word. characters: capitalize all characters — that is, uppercase. autocomplete indicates whether ...
...sion. this value can be overridden by a formaction attribute on a <button>, <input type="submit">, or <input type="image"> element. enctype if the value of the method attribute is post, enctype is the mime type of the form submission. possible values: application/x-www-form-urlencoded: the default value. multipart/form-data: use this if the form contains <input> elements with type=file.
text/plain: introduced by html5 for debugging purposes. this value can be overridden by formenctype attributes on <button>, <input type="submit">, or <input type="image"> elements. method the http method to submit the form with. possible (case insensitive) values: post: the post method; form data sent as the request body. get: the get method; form data appended to the action url with a ?
...en submitted. if this attribute is not set (and therefore the form is validated), it can be overridden by a formnovalidate attribute on a <button>, <input type="submit">, or <input type="image"> element belonging to the form. target indicates where to display the response after submitting the form. in html 4, this is the name/keyword for a frame. ...
...ton>, <input type="submit">, or <input type="image"> element belonging to the form. target indicates where to display the response after submitting the form. in html 4, this is the name/keyword for a frame. in html5, it is a name/keyword for a browsing con
text (for example, tab, window, or iframe). the following keywords have special meanings: _self (default): load into the same browsing con
text as the current one. _blank: load into a new unnamed browsing con
text. _parent: load into the parent browsing con
text of the current one. if no parent, behaves the same as _self. _top: load into the top-level browsing con
text (i.e., the browsing con
text that is an ancestor of the current one and has no parent). if no parent, behaves the same as _self. this value can be overridden by a fo...
<isindex> - HTML: Hypertext Markup Language
action this attribute determined the server url to which the query was sent. ...
... action this attribute determined the server url to which the query was sent. ...
...ery. its support depended on both the browser and the server to react to the query. <isindex> is removed html standard. it was deprecated in html 4.01. the same behaviour can be achieved with an html form. all major browsers have now removed <isindex>. attributes like all other html elements, this element accepted the global attributes. prompt this attribute added its value as a prompt for
text field. action this attribute determined the server url to which the query was sent. example <head> <isindex prompt="search document..." action="/search"> </head> in past browsers, this would generate, at parse time, a dom tree equivalent to the following html: <form action="/search"> <hr> <label> search document... <input name="isindex"> </label> <hr> </form> history o...
.../label> <hr> </form> history on june 1992, dan connolly would prefer a different anchor type instead of isindex. on november 1992, indexes as links rather than documents started by dan connolly who is pushing the idea that indexes are more links than documents. in this thread, different type of solutions are proposed. the question of forms for making queries is mentioned in reference to dyna
text browser: "the browser displays toggle buttons,
text fields etc. the user fills in the fields, clicks ok, and the query results come up in the table of contents window." a thread about isindex in november 1992, kevin hoadley questioned the need for an isindex element and proposed to drop it. he proposed to have instead an input element (idea supported by steve putz). tim berners-lee explains the ...
<label> - HTML: Hypertext Markup Language
the html <label> element represents a caption for an item in a user interface. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. associating a <label> with an <input> element offers some major advantages: the label
text is not only visually associated with its corresponding
text input; it is programmatically associated with it too. this means that, for example, a screenreader will read out the label when the user is focused on the form input, making it easier for an assistive technology user to understand what data should be entered. you can click the associated label to focus/activate the input, as well as the i...
...tribute and a contained control element, as long as the for attribute points to the contained control element. styling with css there are no special styling considerations for <label> elements — structurally they are simple inline elements, and so can be styled in much the same way as a <span> or <a> element. you can apply styling to them in any way you want, as long as you don't cause the
text to become difficult to read. examples simple label example <label>click me <input type="
text"></label> using the "for" attribute <label for="username">click me</label> <input type="
text" id="username"> accessibility concerns interactive content don't place interactive elements such as anchors or buttons inside a label. doing so makes it difficult for people to activate the form input ...
.../label> do <label for="tac"> <input id="tac" type="checkbox" name="terms-and-conditions"> i agree to the terms and conditions </label> <p> <a href="terms-and-conditions.html">read our terms and conditions</a> </p> headings placing heading elements within a <label> interferes with many kinds of assistive technology, because headings are commonly used as a navigation aid. ...
...ny kinds of assistive technology, because headings are commonly used as a navigation aid. if the label's
text needs to be adjusted visually, use css classes applied to the <label> element instead. if a form, or a section of a form needs a title, use the <legend> element placed within a <fieldset>. don't <label for="your-name"> <h3>your name</h3> <input id="your-name" name="your-name" type="
text"> </label> do <label class="large-label" for="your-name"> your name <input id="your-name" name="your-name" type="
text"> </label> buttons an <input> element with a type="button" declaration and a valid value attribute does not need a label associated with it. doing so may actually interfere with how assistive technology parses the button input. the same applies for the <button> element. ...
<s> - HTML: Hypertext Markup Language
use the <s> element to represent things that are no longer relevant or no longer accurate. however, <s> is not appropriate when indicating document edits; for that, use the <del> and <ins> elements, as appropriate. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories phrasing content or flow content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. ...
...hrasing content. implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes this element only includes the global attributes. implementation note: up to gecko 1.9.2 inclusive, firefox implements the htmlspanelement interface for this element. examples <s>today's special: salmon</s> sold out<br> <span style="
text-decoration:line-through;">today's special: salmon</span> sold out accessibility concerns the presence of the s element is not announced by most screen reading technology in its default configuration. it can be made to be announced by using the css content property, along with the ::before and ::after pseudo-elements. s::before, s::after { clip-path: inset(100%); clip: rect(1px, 1px, 1p...
... screen reading technology in its default configuration. it can be made to be announced by using the css content property, along with the ::before and ::after pseudo-elements. s::before, s::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } s::before { content: " [start of stricken
text] "; } s::after { content: " [end of stricken
text] "; } some people who use screen readers deliberately disable announcing content that creates extra verbosity. because of this, it is important to not abuse this technique and only apply it in situations where not knowing content has been struck out would adversely affect understanding. short note on making your mark (more accessible) | th...
... living standard html5the definition of 's element' in that specification. ...
<strong>: The Strong Importance element - HTML: Hypertext Markup Language
a sentence that is of great importance to the whole page, or you could merely try to point out that some words are of greater importance compared to nearby content. typically this element is rendered by default using a bold font weight. however, it should not be used simply to apply bold styling; use the css font-weight property for that purpose. use the <b> element to draw attention to certain
text without indicating a higher level of importance. use the <em> element to mark
text that has stress emphasis. another accepted use for <strong> is to denote the labels of paragraphs which represent notes or warnings within the
text of a page. <b> vs. <strong> it is often confusing to new developers why there are so many ways to express the same thing on a rendered website. <b> and <strong> are ...
...fusing to new developers why there are so many ways to express the same thing on a rendered website. <b> and <strong> are perhaps one of the most common sources of confusion, causing developers to ask "should i use <b> or <strong>? don't they both do the same thing?" not exactly. ...
...communicating meaning is what semantics are all about. <em> vs. ...
...communicating meaning is what semantics are all about. <em> vs. ...
<sup>: The Superscript element - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. ...
...mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes this element only includes the global attributes. usage notes the <sup> element should only be used for typographical reasons—that is, to change the position of the
text to comply with typographical conventions or standards, rather than solely for presentation or appearance purposes. for example, to style the wordmark of a business or product which uses a raised baseline should be done using css (most likely vertical-align) rather than <sup>. this would be done using, for example, vertical-align: super or, to shift the baseline up 50%, vertical-align: 50%. appr...
...e languages when rendering certain abbreviations. for example, in french, the word "mademoiselle" can be abbreviated "mlle"); this is an acceptable use case. see superior lettering for examples. representing ordinal numbers, such as "4th" instead of "fourth." see ordinal numbers for examples. examples exponents exponents, or powers of a number, are among the most common uses of superscripted
text. for example: <p>one of the most common equations in all of physics is <var>e</var>=<var>m</var><var>c</var><sup>2</sup>.<p> the resulting output looks like this: superior lettering superior lettering is not technically the same thing as superscript. however, it is common to use <sup> to present superior lettering in html. among the most common uses of superior lettering is the presentation...
... common to use <sup> to present superior lettering in html. among the most common uses of superior lettering is the presentation of certain abbreviations in french: <p>robert a présenté son rapport à m<sup>lle</sup> bernard.</p> the resulting output: ordinal numbers ordinal numbers, such as "fourth" in english or "quinto" in spanish may be abbreviated using numerals and language-specific
text rendered in superscript: <p>the ordinal number "fifth" can be abbreviated in various languages as follows:</p> <ul> <li>english: 5<sup>th</sup></li> <li>french: 5<sup>ème</sup></li> </ul> the output: specifications specification status comment html living standardthe definition of '<sub> and <sup>' in that specification. living standard html5...
dir - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. it can have the following values: ltr, which means left to right and is to be used for languages that are written from the left to the right (like english); rtl, which means right to left and is to be used for languages that are written from the right to the left (like arabic); auto, which lets the user agent decide. ...
...element. usage notes: this attribute is mandatory for the <bdo> element where it has a different semantic meaning. this attribute is not inherited by the <bdi> element. if not set, its value is auto. this attribute can be overridden by the css properties direction and unicode-bidi, if a css page is active and the element supports these properties. as the directionality of the
text is semantically related to its content and not to its presentation, it is recommended that web developers use this attribute instead of the related css properties when possible. that way, the
text will display correctly even on a browser that doesn't support css or has the css deactivated. the auto value should be used for data with an unknown directionality, like data coming from user inpu...
...firefox uses ctrl/cmd + shift + x but does not update the dir attribute value. ...
... a browser that doesn't support css or has the css deactivated. the auto value should be used for data with an unknown directionality, like data coming from user input, eventually stored in a database. browsers might allow users to change the directionality of <input> and <
textarea>s in order to assist with authoring content. chrome and safari provide a directionality option in the con
textual menu of input fields while internet explorer and edge use the key combinations ctrl + left shift and ctrl + right shift. firefox uses ctrl/cmd + shift + x but does not update the dir attribute value. specifications specification status comment html living standardthe definition of 'dir' in that specification. living standard no change from latest snapshot, html...
Link types - HTML: Hypertext Markup Language
s not endorsed by the author of this one, for example if it has no control over it, if it is a bad example or if there is commercial relationship between the two (sold link). this link type may be used by some search engines that use popularity ranking techniques. <a>, <area>, <form> <link> noopener instructs the browser to open the link without granting the new browsing con
text access to the document that opened it — by not setting the window.opener property on the opened window (it returns null). this is especially useful when opening untrusted links, in order to ensure they cannot tamper with the originating document via the window.opener property (see about rel=noopener for more details), while still providing the referer http header (unless noreferrer i...
...erms of deciding whether to open a new window/tab. <a>, <area>, <form> <link> noreferrer prevents the browser, when navigating to another page, to send this page address, or any other value, as referrer via the referer: http header. (in firefox, before firefox 37, this worked only in links found in pages. links clicked in the ui, like "open in a new tab" via the con
textual menu, ignored this). <a>, <area>, <form> <link> opener reverts implicit rel="noopener" addition on links with target="_blank" (see related html spec discussion, webkit change, and firefox bug discussion). <a>, <area>, <form> <link> pingback defines an external resource uri to call if one wishes to make a comment or a citation about the webpage...
... <a>, <area>, <link>, <form> none. shortlink shortlink specification from wikipedia, the free encyclopedia: url shortening some websites create short links to make sharing links via instant messaging easier. <link> ??? sidebar obsolete since gecko 63 indicates that the hyperlink leads to a resource that would be better suited for a secondary browsing con
text, like a sidebar. browsers, that don't have such a con
text will ignore this keyword. while once part of the html specification, this has been removed from the spec and is only implemented by versions of firefox prior to firefox 63. <a>, <area>, <link> <form> stylesheet defines an external resource to be used as a stylesheet. if the type is not set, the browser should ass...
... if used in combination with the alternate keyword, it defines an alternative style sheet; in that case the title attribute must be present and not be the empty string. ...
HTML: Hypertext Markup Language
html (hyper
text markup language) is the most basic building block of the web. it defines the meaning and structure of web content. other technologies besides html are generally used to describe a web page's appearance/presentation (css) or functionality/behavior (javascript). "hyper
text" refers to links that connect web pages to one another, either within a single website or between websites. links are a fundamental aspect of the web. by uploading content to the internet and linking it to pages created by other people, you become an active participant in the world wide web. html uses "markup" to annotate
text, images, and other content for display in a web browser. html markup includes special "elements" such as <head>, <title>, <body>, <header>, <footer>, <article>, <section>, <p>, <div>, ...
... the name of an element inside a tag is case insensitive. that is, it can be written in uppercase, lowercase, or a mixture. for example, the <title> tag can be written as <title>, <title>, or in any other way. the articles below can help you learn more about html. ...
...put together a course that includes all the essential information you need to work towards your goal. get started beginner's tutorials our html learning area features multiple modules that teach html from the ground up — no previous knowledge required. introduction to html this module sets the stage, getting you used to important concepts and syntax such as looking at applying html to
text, how to create hyperlinks, and how to use html to structure a web page. multimedia and embedding this module explores how to use html to include multimedia in your web pages, including the different ways that images can be included, and how to embed video, audio, and even entire other webpages. html tables representing tabular data on a webpage in an understandable, accessible way can be a ch...
...ocuments. link elements that types can be set on include <a>, <area> and <link>. guide to media types and formats on the web the <audio> and <video> elements allow you to play audio and video media natively within your content without the need for external software support. html content categories html is comprised of several kinds of content, each of which is allowed to be used in certain con
texts and is disallowed in others. similarly, each has a set of other content categories they can contain and elements that can or can't be used in them. this is a guide to these categories. quirks mode and standards mode historical information on quirks mode and standards mode. related topics applying color to html elements using css this article covers most of the ways you use css to add col...
handler.preventExtensions() - JavaScript
the handler.preven
textensions() method is a trap for object.preven
textensions(). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax const p = new proxy(target, { preven
textensions: function(target) { } }); parameters the following parameter is passed to the preven
textensions() method. this is bound to the handler. target the target object. return value the preven
textensions() method must return a boolean value. description the handler.preven
textensions() method is a trap for object.preven
textensions(). ...
...) { } }); parameters the following parameter is passed to the preven
textensions() method. this is bound to the handler. target the target object. return value the preven
textensions() method must return a boolean value. description the handler.preven
textensions() method is a trap for object.preven
textensions(). interceptions this trap can intercept these operations: object.preven
textensions() reflect.preven
textensions() invariants if the following invariants are violated, the proxy will throw a typeerror: object.preven
textensions(proxy) only returns true if object.isextensible(proxy) is false. examples trapping of preven
textensions the following code traps object.preven
textensions(). ...
...ntercept these operations: object.preven
textensions() reflect.preven
textensions() invariants if the following invariants are violated, the proxy will throw a typeerror: object.preven
textensions(proxy) only returns true if object.isextensible(proxy) is false. examples trapping of preven
textensions the following code traps object.preven
textensions(). const p = new proxy({}, { preven
textensions: function(target) { console.log('called'); object.preven
textensions(target); return true; } }); console.log(object.preven
textensions(p)); // "called" // false the following code violates the invariant. ...
...ns the following code traps object.preven
textensions(). const p = new proxy({}, { preven
textensions: function(target) { console.log('called'); object.preven
textensions(target); return true; } }); console.log(object.preven
textensions(p)); // "called" // false the following code violates the invariant. const p = new proxy({}, { preven
textensions: function(target) { return true; } }); object.preven
textensions(p); // typeerror is thrown specifications specification ecmascript (ecma-262)the definition of '[[preven
textensions]]' in that specification. ...
Reflect.preventExtensions() - JavaScript
the static reflect.preven
textensions() method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object). it is similar to object.preven
textensions(), but with some differences. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax reflect.preven
textensions(target) parameters target the target object on which to prevent extensions. return value a boolean indicating whether or not the target was successfully set to prevent extensions. exceptions a typeerror, if target is not an object. ...
...ect, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax reflect.preven
textensions(target) parameters target the target object on which to prevent extensions. return value a boolean indicating whether or not the target was successfully set to prevent extensions. exceptions a typeerror, if target is not an object. description the reflect.preven
textensions() method allows you to prevent new properties from ever being added to an object (i.e., prevents future extensions to the object). it is similar to object.preven
textensions(). examples using reflect.preven
textensions() see also object.preven
textensions(). // objects are extensible by default. let empty = {} reflect.isextensible(empty) // === true // ...but that can be changed. reflec...
...) method allows you to prevent new properties from ever being added to an object (i.e., prevents future extensions to the object). it is similar to object.preven
textensions(). examples using reflect.preven
textensions() see also object.preven
textensions(). // objects are extensible by default. let empty = {} reflect.isextensible(empty) // === true // ...but that can be changed. reflect.preven
textensions(empty) reflect.isextensible(empty) // === false difference from object.preven
textensions() if the target argument to this method is not an object (a primitive), then it will cause a typeerror. ...
...lso object.preven
textensions(). // objects are extensible by default. let empty = {} reflect.isextensible(empty) // === true // ...but that can be changed. reflect.preven
textensions(empty) reflect.isextensible(empty) // === false difference from object.preven
textensions() if the target argument to this method is not an object (a primitive), then it will cause a typeerror. with object.preven
textensions(), a non-object target will be coerced to an object. reflect.preven
textensions(1) // typeerror: 1 is not an object object.preven
textensions(1) // 1 specifications specification ecmascript (ecma-262)the definition of 'reflect.preven
textensions' in that specification. ...
console/plain-text - Archive of obsolete content
all of its methods are inherited from console.jsm (resource://gre/modules/devtools/console.jsm). ...
...all of its methods are inherited from console.jsm (resource://gre/modules/devtools/console.jsm). ...
...all of its methods are inherited from console.jsm (resource://gre/modules/devtools/console.jsm). ...
.htaccess ( hypertext access ) - Archive of obsolete content
syntax highliting support for .htaccess files less. common application url redirects & rewrite: htaccess files are often used to redirect traffic to a web page to another or from traffic to a directory to another even between domains is possible. ...
...syntax highliting support for .htaccess files less. common application url redirects & rewrite: htaccess files are often used to redirect traffic to a web page to another or from traffic to a directory to another even between domains is possible. ...
...syntax highliting support for .htaccess files less. common application url redirects & rewrite: htaccess files are often used to redirect traffic to a web page to another or from traffic to a directory to another even between domains is possible. ...
Hypertext - MDN Web Docs Glossary: Definitions of Web-related terms
hyper
text is
text that contains links to other
texts, as opposed to a single linear flow like in a novel. the term was coined by ted nelson around 1965. ...
... hyper
text is
text that contains links to other
texts, as opposed to a single linear flow like in a novel. the term was coined by ted nelson around 1965. ...
... hyper
text is
text that contains links to other
texts, as opposed to a single linear flow like in a novel. the term was coined by ted nelson around 1965. ...
Test your skills: Advanced HTML text - Learn web development
the aim of this skill test is to assess whether you've understood our advanced
text formatting article. note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks. if you get stuck, then ask us for help — see the assessment or further help section at the bottom of this page. advanced html
text 1 in this task we want you to turn the provided animals and their definitions into a description list. try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online editor. ...
...en ask us for help — see the assessment or further help section at the bottom of this page. advanced html
text 1 in this task we want you to turn the provided animals and their definitions into a description list. try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online editor. advanced html
text 2 in this task we want you to add some semantics to the provided html as follows: turn the second paragraph into a block-level quote, and semantically indicate that the quote is taken from accessibility. semantically mark up "html" and "css" as acronyms, providing expansions as tooltips. semantically associate machine-readable dates with the dates in the
text. use subscript and superscript...
...d want to ask for help: put your work into an online shareable editor such as codepen, jsfiddle, or glitch. you can write the code yourself, or use the starting point files linked to in the above sections. write a post asking for assessment and/or help at the mdn discourse forum learning category. your post should include: a descriptive title such as "assessment wanted for advanced html
text 1 skill test". details of what you have already tried, and what you would like us to do, e.g. if you are stuck and need help, or want an assessment. a link to the example you want assessed or need help with, in an online shareable editor (as mentioned in step 1 above). this is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code. ...
ZoomText
happy testing! you may wish to read through the current issues on this page before reporting bugs. ...
...is not firefox). read the release notes if you're interested. these builds are pretty stable considering they're only alpha, i'm having very good luck with them. it doesn't do us any good to get bug reports on older stuff right now. our main focus is on the browser itself, so you you only need to install mailnews or address book if curious about the other apps. you will also need to install zoom
text 8.11.3. happy testing! you may wish to read through the current issues on this page before reporting bugs. send me email so that i'm aware that you're testing and let me know what bugs you're finding. my email address is aaronleventhal@moonset.net. issues for ai squared, from high to low priority docreader and appreader don't respect the structure of the document -- no support for columns. ...
...3. happy testing! you may wish to read through the current issues on this page before reporting bugs. send me email so that i'm aware that you're testing and let me know what bugs you're finding. my email address is aaronleventhal@moonset.net. issues for ai squared, from high to low priority docreader and appreader don't respect the structure of the document -- no support for columns. zoom
text text to speech doesn't always echo what it should -- need more details from testers. mozilla issues cannot tab into frames and iframes. cannot customize the sidebar with the keyboard only. comboboxes report incorrect bounds, causing zoom
text tracking to move to the wrong area of the screen. ...
AudioContext.close() - Web APIs
the close() method of the audiocon
text interface closes the audio con
text, releasing any system audio resources that it uses. closed con
texts cannot have new nodes created, but can decode audio data, create buffers, etc. this function does not automatically release all audiocon
text-created objects, unless other references have been released as well; however, it will forcibly release any system audio resources that might prevent additional audiocon
texts from being created and used, suspend the progression of audio time in the audio con
text, and stop processing audio data. the returned promise resolves when all audiocon
text-creation-blocking resources have been released. this method throws an invalid_state_err exception if called on an offlineaudiocon
text. syntax var audioctx = new audiocon...
...when the promise resolves, the example is reset to its beginning state. ...
...when the promise resolves, the example is reset to its beginning state. ...
AudioContext.createMediaStreamDestination() - Web APIs
the createmediastreamdestination() method of the audiocon
text interface is used to create a new mediastreamaudiodestinationnode object associated with a webrtc mediastream representing an audio stream, which may be stored in a local file or sent to another computer. the mediastream is created when the node is created and is accessible via the mediastreamaudiodestinationnode's stream attribute. this stream can be used in a similar way as a mediastream obtained via navigator.getusermedia — it can, for example, be sent to a remote peer using the rtcpeerconnection addstream() method. for more details about media stream destination nodes, check out the mediastreamaudiodestinationnode reference page. ...
...e mediastreamaudiodestinationnode's stream attribute. this stream can be used in a similar way as a mediastream obtained via navigator.getusermedia — it can, for example, be sent to a remote peer using the rtcpeerconnection addstream() method. for more details about media stream destination nodes, check out the mediastreamaudiodestinationnode reference page. syntax var audioctx = new audiocon
text(); var destination = audioctx.createmediastreamdestination(); returns a mediastreamaudiodestinationnode. examples in the following simple example, we create a mediastreamaudiodestinationnode, an oscillatornode and a mediarecorder (the example will therefore only work in firefox and chrome at this time.) the mediarecorder is set up to record information from the mediastreamdestinationnode. wh...
... html> <html> <head> <title>createmediastreamdestination() demo</title> </head> <body> <h1>createmediastreamdestination() demo</h1> <p>encoding a pure sine wave to an opus file </p> <button>make sine wave</button> <audio controls></audio> <script> var b = document.queryselector("button"); var clicked = false; var chunks = []; var ac = new audiocon
text(); var osc = ac.createoscillator(); var dest = ac.createmediastreamdestination(); var mediarecorder = new mediarecorder(dest.stream); osc.connect(dest); b.addeventlistener("click", function(e) { if (!clicked) { mediarecorder.start(); osc.start(0); e.target.innerhtml = "stop recording"; clicked = true; } else { ...
AudioContext.suspend() - Web APIs
the suspend() method of the audiocon
text interface suspends the progression of time in the audio con
text, temporarily halting audio hardware access and reducing cpu/battery usage in the process — this is useful if you want an application to power down the audio hardware when it will not be using an audio con
text for a while. this method will cause an invalid_state_err exception to be thrown if called on an offlineaudiocon
text. syntax var audioctx = new audiocon
text(); audioctx.suspend().then(function() { ... }); returns a promise that resolves with void. the promise is rejected if the con
text has already been closed. ...
...e using an audio con
text for a while. this method will cause an invalid_state_err exception to be thrown if called on an offlineaudiocon
text. syntax var audioctx = new audiocon
text(); audioctx.suspend().then(function() { ... }); returns a promise that resolves with void. the promise is rejected if the con
text has already been closed. example the following snippet is taken from our audiocon
text states demo (see it running live.) when the suspend/resume button is clicked, the audiocon
text.state is queried — if it is running, suspend() is called; if it is suspended, resume() is called. in each case, the
text label of the button is updated as appropriate once the promise resolves. susresbtn.onclick = function() { if(audioctx.state === 'running') { audioctx.suspend().then(function(...
... running live.) when the suspend/resume button is clicked, the audiocon
text.state is queried — if it is running, suspend() is called; if it is suspended, resume() is called. in each case, the
text label of the button is updated as appropriate once the promise resolves. susresbtn.onclick = function() { if(audioctx.state === 'running') { audioctx.suspend().then(function() { susresbtn.
textcontent = 'resume con
text'; }); } else if(audioctx.state === 'suspended') { audioctx.resume().then(function() { susresbtn.
textcontent = 'suspend con
text'; }); } } specifications specification status comment web audio apithe definition of 'close()' in that specification. working draft ...
BaseAudioContext.createBiquadFilter() - Web APIs
the createbiquadfilter() method of the baseaudiocon
text interface creates a biquadfilternode, which represents a second order filter configurable as several different common filter types. syntax baseaudiocon
text.createbiquadfilter(); returns a biquadfilternode. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
...nts a second order filter configurable as several different common filter types. syntax baseaudiocon
text.createbiquadfilter(); returns a biquadfilternode. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
...figurable as several different common filter types. syntax baseaudiocon
text.createbiquadfilter(); returns a biquadfilternode. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
BaseAudioContext.createChannelMerger() - Web APIs
returns a channelmergernode. example the following example shows how you could separate a stereo track (say, a piece of music), and process the left and right channel differently. ...
... returns a channelmergernode. example the following example shows how you could separate a stereo track (say, a piece of music), and process the left and right channel differently. ...
...e. example the following example shows how you could separate a stereo track (say, a piece of music), and process the left and right channel differently. to use them, you need to use the second and third parameters of the audionode.connect(audionode) method, which allow you to specify both the index of the channel to connect from and the index of the channel to connect to. ...
BaseAudioContext.createChannelSplitter() - Web APIs
returns a channelsplitternode. example the following simple example shows how you could separate a stereo track (say, a piece of music), and process the left and right channel differently. ...
... returns a channelsplitternode. example the following simple example shows how you could separate a stereo track (say, a piece of music), and process the left and right channel differently. ...
... example the following simple example shows how you could separate a stereo track (say, a piece of music), and process the left and right channel differently. to use them, you need to use the second and third parameters of the audionode.connect(audionode) method, which allow you to specify the index of the channel to connect from and the index of the channel to connect to. ...
BaseAudioContext.createConvolver() - Web APIs
the basic premise is that you create an audiobuffer containing a sound sample to be used as an ambience to shape the convolution (called the impulse response,) and apply that to the convolver. the example below uses a short sample of a concert hall crowd, so the reverb effect applied is really deep and echoey. ...
...the basic premise is that you create an audiobuffer containing a sound sample to be used as an ambience to shape the convolution (called the impulse response,) and apply that to the convolver. the example below uses a short sample of a concert hall crowd, so the reverb effect applied is really deep and echoey. ...
...taining a sound sample to be used as an ambience to shape the convolution (called the impulse response,) and apply that to the convolver. the example below uses a short sample of a concert hall crowd, so the reverb effect applied is really deep and echoey. for applied examples/information, check out our voice-change-o-matic demo (see app.js for relevant code). var audioctx = new (window.audiocon
text || window.webkitaudiocon
text)(); var convolver = audioctx.createconvolver(); ... // grab audio track via xhr for convolver node var soundsource, concerthallbuffer; ajaxrequest = new xmlhttprequest(); ajaxrequest.open('get', 'concert-crowd.ogg', true); ajaxrequest.responsetype = 'arraybuffer'; ajaxrequest.onload = function() { var audiodata = ajaxrequest.response; audioctx.decodeaudioda...
BaseAudioContext.createGain() - Web APIs
the creategain() method of the baseaudiocon
text interface creates a gainnode, which can be used to control the overall gain (or volume) of the audio graph. syntax var gainnode = audiocon
text.creategain(); return value a gainnode which takes as input one or more audio sources and outputs audio whose volume has been adjusted in gain (volume) to a level specified by the node's gainnode.gain a-rate parameter. example the following example shows basic usage of an audiocon
text to create a gainnode, which is then used to mute and unmute the audio when a mute button is clicked by changing the gain property value. the below snippet wouldn't work as is — for a complete working example, check out our voice-change-o-matic demo (view source.) <div> <button class="mute">mute button</button> <...
...e shows basic usage of an audiocon
text to create a gainnode, which is then used to mute and unmute the audio when a mute button is clicked by changing the gain property value. ...
...iocon
text to create a gainnode, which is then used to mute and unmute the audio when a mute button is clicked by changing the gain property value. ...
BaseAudioContext.createPeriodicWave() - Web APIs
parameters real an array of cosine terms (traditionally the a terms). imag an array of sine terms (traditionally the b terms). the real and imag arrays have to have the same length, otherwise an error is thrown. ...
... parameters real an array of cosine terms (traditionally the a terms). imag an array of sine terms (traditionally the b terms). the real and imag arrays have to have the same length, otherwise an error is thrown. ...
... to true, normalization is disabled for the periodic wave. the default is false. if normalized, the resulting wave will have a maximum absolute peak value of 1. example the following example illustrates simple usage of createperiodicwave(), to create a periodicwave object containing a simple sine wave. var real = new float32array(2); var imag = new float32array(2); var ac = new audiocon
text(); var osc = ac.createoscillator(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var wave = ac.createperiodicwave(real, imag, {disablenormalization: true}); osc.setperiodicwave(wave); osc.connect(ac.destination); osc.start(); osc.stop(2); this works because a sound that contains only a fundamental tone is by definition a sine wave here, we create a periodicwave with two values. the ...
BaseAudioContext.createStereoPanner() - Web APIs
example in our stereopannernode example (see source code) html we have a simple <audio> element along with a slider <input> to increase and decrease pan value. in the javascript we create a mediaelementaudiosourcenode and a stereopannernode, and connect the two together using the connect() method. ...
...nnernode, and connect the two together using the connect() method. we then use an oninput event handler to change the value of the stereopannernode.pan parameter and update the pan value display when the slider is moved. moving the slider left and right while the music is playing pans the music across to the left and right speakers of the output, respectively. ...
... together using the connect() method. we then use an oninput event handler to change the value of the stereopannernode.pan parameter and update the pan value display when the slider is moved. moving the slider left and right while the music is playing pans the music across to the left and right speakers of the output, respectively. ...
CanvasRenderingContext2D.beginPath() - Web APIs
the canvasrenderingcon
text2d.beginpath() method of the canvas 2d api starts a new path by emptying the list of sub-paths. call this method when you want to create a new path. note: to create a new sub-path, i.e., one matching the current canvas state, you can use canvasrenderingcon
text2d.moveto(). syntax void ctx.beginpath(); examples creating distinct paths this example creates two paths, each of which contains a single line. html <canvas id="canvas"></canvas> javascript the beginpath() method is called before beginning each line, so that they may be drawn with different colors. ...
...ringcon
text2d.moveto(). syntax void ctx.beginpath(); examples creating distinct paths this example creates two paths, each of which contains a single line. html <canvas id="canvas"></canvas> javascript the beginpath() method is called before beginning each line, so that they may be drawn with different colors. ...
...t ctx = canvas.getcon
text('2d'); // first path ctx.beginpath(); ctx.strokestyle = 'blue'; ctx.moveto(20, 20); ctx.lineto(200, 20); ctx.stroke(); // second path ctx.beginpath(); ctx.strokestyle = 'green'; ctx.moveto(20, 20); ctx.lineto(120, 120); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.beginpath' in that specification. living standard ...
CanvasRenderingContext2D.closePath() - Web APIs
if the shape has already been closed or has only one point, this function does nothing. this method doesn't draw anything to the canvas directly. you can render the path using the stroke() or fill() methods. syntax void ctx.closepath(); examples closing a triangle this example creates the first two (diagonal) sides of a triangle using the lineto() method. after that, the triangle's base is created with the closepath() method, which automatically connects the shape's first and last points. html <canvas id="canvas"></canvas> javascript the triangle's corners are at (20, 150), (120, 20), and (220, 150). ...
... first two (diagonal) sides of a triangle using the lineto() method. after that, the triangle's base is created with the closepath() method, which automatically connects the shape's first and last points. html <canvas id="canvas"></canvas> javascript the triangle's corners are at (20, 150), (120, 20), and (220, 150). const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.beginpath(); ctx.moveto(20, 140); // move pen to bottom-left corner ctx.lineto(120, 10); // line to top corner ctx.lineto(220, 140); // line to bottom-right corner ctx.closepath(); // line to bottom-left corner ctx.stroke(); result closing just one sub-path this example draws a smiley face consisting of three disconnected sub-paths. note: although closepath() is cal...
... this example draws a smiley face consisting of three disconnected sub-paths. note: although closepath() is called after all the arcs have been created, only the last arc (sub-path) gets closed. html <canvas id="canvas"></canvas> javascript the first two arcs create the face's eyes. the last arc creates the mouth. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.beginpath(); ctx.arc(240, 20, 40, 0, math.pi); ctx.moveto(100, 20); ctx.arc(60, 20, 40, 0, math.pi); ctx.moveto(215, 80); ctx.arc(150, 80, 65, 0, math.pi); ctx.closepath(); ctx.linewidth = 6; ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.closepath' in that specification. ...
CanvasRenderingContext2D.fillRect() - Web APIs
this method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it. syntax void ctx.fillrect(x, y, width, height); the fillrect() method draws a filled rectangle whose starting point is at (x, y) and whose size is specified by width and height. the fill style is determined by the current fillstyle attribute. parameters x the x-axis coordinate of the rectangle's starting point. y the y-axis coordinate of the rectangle's starting point. width the rectangle's width. positive values are to the right, and negative to the left. ...
...he rectangle's height. positive values are down, and negative are up. examples a simple filled rectangle this example draws a filled green rectangle using the fillrect() method. html <canvas id="canvas"></canvas> javascript the rectangle's top-left corner is at (20, 10). it has a width of 150 and a height of 100. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.fillstyle = 'green'; ctx.fillrect(20, 10, 150, 100); result filling the whole canvas this code snippet fills the entire canvas with a rectangle. this is often useful for creating a background, on top of which other things may then be drawn. to achieve this, the dimensions of the rectangle are set to equal the <canvas> element's width and height attributes. const canvas = documen...
... 150, 100); result filling the whole canvas this code snippet fills the entire canvas with a rectangle. this is often useful for creating a background, on top of which other things may then be drawn. to achieve this, the dimensions of the rectangle are set to equal the <canvas> element's width and height attributes. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.fillrect(0, 0, canvas.width, canvas.height); specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.fillrect' in that specification. living standard ...
CanvasRenderingContext2D.filter - Web APIs
it is similar to the css filter property and accepts the same values. syntax ctx.filter = "<filter-function1> [<filter-function2>] [<filter-functionn>]"; ctx.filter = "none"; values the filter property accepts a value of "none" or one or more of the following filter functions in a domstring. url() a css <url>. takes an iri pointing to an svg filter element, which may be embedded in an external xml file. blur() a css <length>. applies a gaussian blur to the drawing. ...
...f 100% leaves the drawing unchanged. sepia() a css <percentage>. converts the drawing to sepia. a value of 100% means completely sepia. a value of 0% leaves the drawing unchanged. none no filter is applied. initial value. examples to view these examples, make sure to use a browser that supports this feature; see the compatibility table below. applying a blur this example blurs a piece of
text using the filter property. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.filter = 'blur(4px)'; ctx.font = '48px serif'; ctx.fill
text('hello world', 50, 100); result applying multiple filters you can combine as many filters as you like. this example applies the contrast, sepia, and drop-shadow fi...
...ultiple filters you can combine as many filters as you like. this example applies the contrast, sepia, and drop-shadow filters to a photo of a gecko. html <canvas id="canvas"></canvas> <div style="display:none;"> <img id="source" src="https://udn.realityripple.com/samples/90/a34a525ace.jpg"> </div> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); const image = document.getelementbyid('source'); image.addeventlistener('load', e => { ctx.filter = 'contrast(1.4) sepia(1) drop-shadow(9px 9px 2px #e81)'; ctx.drawimage(image, 10, 10, 180, 120); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.filter' in that specification. living st...
CanvasRenderingContext2D.lineTo() - Web APIs
like other methods that modify the current path, this method does not directly render anything. to draw the path onto a canvas, you can use the fill() or stroke() methods. syntax ctx.lineto(x, y); parameters x the x-axis coordinate of the line's end point. y the y-axis coordinate of the line's end point. return value undefined. examples drawing a straight line this example draws a straight line using the lineto() method. html <canvas id="canvas"></canvas> javascript the line begins at (30, 50) and ends at (150, 100). ...
...e x-axis coordinate of the line's end point. y the y-axis coordinate of the line's end point. return value undefined. examples drawing a straight line this example draws a straight line using the lineto() method. html <canvas id="canvas"></canvas> javascript the line begins at (30, 50) and ends at (150, 100). const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.beginpath(); // start a new path ctx.moveto(30, 50); // move the pen to (30, 50) ctx.lineto(150, 100); // draw a line to (150, 100) ctx.stroke(); // render the path result drawing connected lines each call of lineto() (and similar methods) automatically adds to the current sub-path, which means that all the lines will all be stroked or filled together. this exa...
...render the path result drawing connected lines each call of lineto() (and similar methods) automatically adds to the current sub-path, which means that all the lines will all be stroked or filled together. this example draws a letter 'm' with a single contiguous line. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.moveto(90, 130); ctx.lineto(95, 25); ctx.lineto(150, 80); ctx.lineto(205, 25); ctx.lineto(210, 130); ctx.linewidth = 15; ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.lineto' in that specification. living standard ...
CanvasRenderingContext2D.lineWidth - Web APIs
the canvasrenderingcon
text2d.linewidth property of the canvas 2d api sets the thickness of lines. note: lines can be drawn with the stroke(), strokerect(), and stroke
text() methods. syntax ctx.linewidth = value; options value a number specifying the line width, in coordinate space units. zero, negative, infinity, and nan values are ignored. this value is 1.0 by default. examples changing line width this example draws a line and a rectangle, using a line width of 15 units. ...
... options value a number specifying the line width, in coordinate space units. zero, negative, infinity, and nan values are ignored. this value is 1.0 by default. examples changing line width this example draws a line and a rectangle, using a line width of 15 units. ...
...tcon
text('2d'); ctx.linewidth = 15; ctx.beginpath(); ctx.moveto(20, 20); ctx.lineto(130, 130); ctx.rect(40, 40, 70, 70); ctx.stroke(); result more examples for more examples and explanation about this property, see applying styles and color in the canvas tutorial. specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.linewidth' in that specification. living standard ...
CanvasRenderingContext2D.quadraticCurveTo() - Web APIs
it requires two points: the first one is a control point and the second one is the end point. the starting point is the latest point in the current path, which can be changed using moveto() before creating the quadratic bézier curve. syntax void ctx.quadraticcurveto(cpx, cpy, x, y); parameters cpx the x-axis coordinate of the control point. cpy the y-axis coordinate of the control point. x the x-axis coordinate of the end point. y the y-axis coordinate of the end point. examples how quadraticcurveto works this example shows how a quadratic bézier curve is drawn. ...
...xis coordinate of the control point. cpy the y-axis coordinate of the control point. x the x-axis coordinate of the end point. y the y-axis coordinate of the end point. examples how quadraticcurveto works this example shows how a quadratic bézier curve is drawn. ...
...tart and end points are blue. a simple quadratic curve this example draws a simple quadratic bézier curve using quadraticcurveto(). html <canvas id="canvas"></canvas> javascript the curve begins at the point specified by moveto(): (20, 110). the control point is placed at (230, 150). the curve ends at (250, 20). const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.beginpath(); ctx.moveto(20, 110); ctx.quadraticcurveto(230, 150, 250, 20); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcon
text2d.quadraticcurveto' in that specification. living standard ...
Clipboard.readText() - Web APIs
the clipboard interface's read
text() method returns a promise which resolves with a copy of the
textual contents of the system clipboard.. the "clipboard-read" permission of the permissions api must be granted before you can read data from the clipboard. syntax var promise = navigator.clipboard.read
text() parameters none. return value a promise that resolves with a domstring containing the
textual contents of the clipboard. returns an empty string if the clipboard is empty, does not contain
text, or does not include a
textual representation among the datatransfer objects representing the clipboard's contents. to read non-
text contents from the clipboard, use the read() method instead. you can write
text to the clipboard using write
text(). ...
... working draft initial definition. ...
...tring if the clipboard is empty, does not contain
text, or does not include a
textual representation among the datatransfer objects representing the clipboard's contents. to read non-
text contents from the clipboard, use the read() method instead. you can write
text to the clipboard using write
text(). example this example retrieves the
textual contents of the clipboard and inserts the returned
text into an element's contents. navigator.clipboard.read
text().then( clip
text => document.getelementbyid("outbox").inner
text = clip
text); specifications specification status comment clipboard api and eventsthe definition of 'read
text()' in that specification. working draft initial definition. ...
FileReaderSync.readAsText() - Web APIs
encoding the optional parameter specifies encoding to be used (e.g., iso-8859-1 or utf-8). if not present, the method will apply a detection algorithm for it. return value an domstring representing the input data. exceptions the following exceptions can be raised by this method: notfounderror is raised when the resource represented by the dom file or blob cannot be found, e.g. ...
...urce is unsafe for a use from the web (like it is a system file). notreadableerror is raised when the resource cannot be read due to a permission problem, like a concurrent lock. encodingerror is raised when the resource is a data url and exceed the limit length defined by each browser. specifications specification status comment file apithe definition of 'readas
text' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for...
...ion. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
HTMLCanvasElement: webglcontextcreationerror event - Web APIs
the webglcon
textcreationerror event of the webgl api is fired if the user agent is unable to create a webglrenderingcon
text con
text. this event has a webglcon
textevent.statusmessage property, which can contain a platform dependent string with more information about the failure. ...
... the webglcon
textcreationerror event of the webgl api is fired if the user agent is unable to create a webglrenderingcon
text con
text. this event has a webglcon
textevent.statusmessage property, which can contain a platform dependent string with more information about the failure. ...
...eringcon
text con
text. this event has a webglcon
textevent.statusmessage property, which can contain a platform dependent string with more information about the failure. bubbles yes cancelable yes interface webglcon
textevent event handler property none example var canvas = document.getelementbyid('canvas'); canvas.addeventlistener('webglcon
textcreationerror', function(e) { console.log(e.statusmessage || 'unknown error'); }, false); var gl = canvas.getcon
text('webgl'); // logs statusmessage or "unknown error" if unable to create webgl con
text specifications specification status comment webgl 1.0the definition of 'webglcon
textcreationerror' in that specification. recommendation initial definition. ...
HTMLElement.outerText - Web APIs
example see this stackoverflow answer. specification not part of any specification. ...
... example see this stackoverflow answer. specification not part of any specification. ...
... example see this stackoverflow answer. specification not part of any specification. ...
OfflineAudioContext: complete event - Web APIs
the complete event of the offlineaudiocon
text interface is fired when the rendering of an offline audio con
text is complete. ...
... the complete event of the offlineaudiocon
text interface is fired when the rendering of an offline audio con
text is complete. ...
...bles no cancelable no default action none interface offlineaudiocompletionevent event handler property offlineaudiocon
text.oncomplete examples when processing is complete, you might want to use the oncomplete handler the prompt the user that the audio can now be played, and enable the play button: let offlineaudioctx = new offlineaudiocon
text(); offlineaudioctx.addeventlistener('complete', () => { console.log('offline audio processing now complete'); showmodaldialog('song processed and ready to play'); playbtn.disabled = false; }) you can also set up the event handler using the offlineaudiocon
text.oncomplete property: let offlineaudioctx = new offlineaudiocon
text(); offlineaudioctx.oncomplete = function() { console.log('of...
Text.isElementContentWhitespace - Web APIs
note: you may simply replace it with /\s+/.test(
text.data), /\s+/.test(
text.nodevalue), or /\s+/.test(
text.
textcontent). putting any property that represents the
textual content of the
text node into test() should do the same work just like the three example above. the
text.iselementcontentwhitespace read-only property returns a boolean flag indicating whether or not the
text node's content consists solely of whitespace. syntax b =
textnode.iselementcontentwhitespace; example in the example below, we create a node with mixed display and whitespace characters and the attribute is false. ...
...e work just like the three example above. the
text.iselementcontentwhitespace read-only property returns a boolean flag indicating whether or not the
text node's content consists solely of whitespace. syntax b =
textnode.iselementcontentwhitespace; example in the example below, we create a node with mixed display and whitespace characters and the attribute is false. var tn = document.create
textnode("hello world"); tn.iselementcontentwhitespace; /* evaluates to false */ for a node that is all whitespace characters, the iselementcontentwhitespace evaluates to true. ...
...syntax b =
textnode.iselementcontentwhitespace; example in the example below, we create a node with mixed display and whitespace characters and the attribute is false. var tn = document.create
textnode("hello world"); tn.iselementcontentwhitespace; /* evaluates to false */ for a node that is all whitespace characters, the iselementcontentwhitespace evaluates to true. ...
TextDecoder() - Web APIs
the
textdecoder() constructor returns a newly created
textdecoder object for the encoding specified in parameter. if the value for utflabel is unknown, or is one of the two values leading to a 'replacement' decoding algorithm ( "iso-2022-cn" or "iso-2022-cn-ext"), a domexception with the "typeerror" value is thrown. syntax decoder = new
textdecoder(utflabel, options); parameters utflabeloptional is a domstring, defaulting to "utf-8", containing the label of the encoder. each label is associated with a specific encoding type: possible values of utflabel encoding "unicode-1-1-utf-8", "utf-8", "utf8" 'utf-8' "866", "cp866", "csibm866", "ibm866" 'ibm866' "csisolatin2", "iso-8859-2", "iso-ir-101", "iso8859-2", "iso88592", ...
...so-ir-149", "korean", "ks_c_5601-1987", "ks_c_5601-1989", "ksc5601", "ksc_5601", "windows-949" 'euc-kr' "csiso2022kr", "iso-2022-kr" 'iso-2022-kr' "utf-16be" 'utf-16be' "utf-16", "utf-16le" 'utf-16le' "x-user-defined" 'x-user-defined' "iso-2022-cn", "iso-2022-cn-ext" 'replacement' optionsoptional is a
textdecoderoptions dictionary with the property: fatal a boolean flag indicating if the
textdecoder.decode() method must throw a domexception with the "encodingerror" value when an coding error is found. it defaults to false. example var
textdecoder1 = new
textdecoder("iso-8859-2"); var
textdecoder2 = new
textdecoder(); var
textdecoder3 = new
textdecoder("csiso2022kr", {fatal: true}); // ...
...fatal a boolean flag indicating if the
textdecoder.decode() method must throw a domexception with the "encodingerror" value when an coding error is found. it defaults to false. example var
textdecoder1 = new
textdecoder("iso-8859-2"); var
textdecoder2 = new
textdecoder(); var
textdecoder3 = new
textdecoder("csiso2022kr", {fatal: true}); // allows encodingerror exception to be thrown. var
textdecoder4 = new
textdecoder("iso-2022-cn"); // throw a typeerror exception. specifications specification status comment encodingthe definition of '
textdecoder()' in that specification. living standard initial definition. ...
TextEncoder.prototype.encode() - Web APIs
the
textencoder.prototype.encode() method takes a usvstring as input, and returns a uint8array containing the
text given in parameters encoded with the specific method for that
textencoder object. syntax b1 = encoder.encode(string); parameters string is a usvstring containing the
text to encode. return value a uint8array object. ...
... living standard initial definition. ...
... syntax b1 = encoder.encode(string); parameters string is a usvstring containing the
text to encode. return value a uint8array object. examples <p class="source">this is a sample paragraph.</p> <p class="result">encoded result: </p> const sourcepara = document.queryselector('.source'); const resultpara = document.queryselector('.result'); const string = sourcepara.
textcontent; const
textencoder = new
textencoder(); let encoded =
textencoder.encode(string); resultpara.
textcontent += encoded; specifications specification status comment encodingthe definition of '
textencoder.prototype.encode()' in that specification. living standard initial definition. ...
TextTrackCue - Web APIs
texttrackcue is an abstract class which is used as the basis for the various derived cue types, such as vttcue; you will instead work with those derived types. these cues represent a string of
text that is presented for some duration of time during the performance of a
texttrack. the cue includes the start time (the time at which the
text will be displayed) and the end time (the time at which it will be removed from the display), as well as other information. properties this interface also inherits properties from eventtarget.
texttrackcue.track read only the
texttrack that this cue belongs to, or null if it doesn't belong to any.
texttrackcue.id a domstring that identifies the cue. ...
...start time (the time at which the
text will be displayed) and the end time (the time at which it will be removed from the display), as well as other information. properties this interface also inherits properties from eventtarget.
texttrackcue.track read only the
texttrack that this cue belongs to, or null if it doesn't belong to any.
texttrackcue.id a domstring that identifies the cue.
texttrackcue.starttime a double that represents the video time that the cue will start being displayed, in seconds.
texttrackcue.endtime a double that represents the video time that the cue will stop being displayed, in seconds.
texttrackcue.pauseonexit a boolean for whether the video will pause when this cue stops being displayed. ...
...d a domstring that identifies the cue.
texttrackcue.starttime a double that represents the video time that the cue will start being displayed, in seconds.
texttrackcue.endtime a double that represents the video time that the cue will stop being displayed, in seconds.
texttrackcue.pauseonexit a boolean for whether the video will pause when this cue stops being displayed. event handlers
texttrackcue.onenter the event handler for the enter event.
texttrackcue.onexit the event handler for the exit event. specifications specification status comment html living standardthe definition of '
texttrackcue' in that specification. living standard html5the definition of '
texttrackcue' in that specification. recommendation initial definition ...
TextTrackList.onaddtrack - Web APIs
the
texttracklist property onaddtrack is an event handler which is called when the addtrack event occurs, indicating that a new
text track has been added to the media element whose
text tracks the
texttracklist represents. the event is passed into the event handler in the form of a trackevent object, whose track property identifies the newly-added track. note: you can also add a handler for the addtrack event using addeventlistener(). syntax
texttracklist.onaddtrack = eventhandler; value set onaddtrack to a function that accepts as input a trackevent object which indicates in its track property which video track has been added to the media. ...
...this happens when tracks are added to the element when the media is first attached to the element; one addtrack event will occur for each video track in the media resource. ...
...one addtrack event will occur for each video track in the media resource. example this snippet establishes a handler for the addtrack event that calls a function, addtotracklist(), passing in the videotrack object representing the newly-added track. in this scenario, that function's role is to add the new track to a list of video tracks available to choose from. document.queryselector("video").
texttracks.onaddtrack = function(event) { addtotracklist(event.track); }; specifications specification status comment html living standardthe definition of '
texttracklist: onaddtrack' in that specification. living standard ...
TextTrackList.onremovetrack - Web APIs
the
texttracklist onremovetrack event handler is called when the removetrack event occurs, indicating that a
text track has been removed from the media element, and therefore also from the
texttracklist. the event is passed into the event handler in the form of a trackevent object, whose track property identifies the track that was removed from the media element's
texttracklist. note: you can also add a handler for the removetrack event using addeventlistener(). syntax
texttracklist.onremovetrack = eventhandler; value set onremovetrack to a function that accepts as input a trackevent object which indicates in its track property which
text track has been removed from the media element. ...
...
texttracklist. note: you can also add a handler for the removetrack event using addeventlistener(). syntax
texttracklist.onremovetrack = eventhandler; value set onremovetrack to a function that accepts as input a trackevent object which indicates in its track property which
text track has been removed from the media element. example this simple example just fetches the current number of
text tracks in the first media element whenever a track is removed from the media element. document.queryselectorall("video, audio")[0].
texttracks.onremovetrack = function(event) { mytrackcount = document.queryselectorall("video, audio")[0].
texttracks.length; }; the current number of
text tracks remaining in the media element is obtained from
texttracklist property length. specifications ...
...cument.queryselectorall("video, audio")[0].
texttracks.onremovetrack = function(event) { mytrackcount = document.queryselectorall("video, audio")[0].
texttracks.length; }; the current number of
text tracks remaining in the media element is obtained from
texttracklist property length. specifications specification status comment html living standardthe definition of '
texttracklist: onremovetrack' in that specification. living standard ...
WEBGL_compressed_texture_pvrtc - Web APIs
the webgl_compressed_
texture_pvrtc extension is part of the webgl api and exposes four pvrtc compressed
texture formats. compressed
textures reduce the amount of memory needed to store a
texture on the gpu, allowing for higher resolution
textures or more of the same resolution
textures. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: pvrtc is typically only available on mobile devices with powervr chipsets. it is used in all generations of the iphone, ipod touch and ipad and supported on certain android devices that use a powervr gpu. this extension is available to both, webgl1 and webgl2 con
texts. note: on ios devices, this extension is named webkit_webgl_compresse...
...o using extensions in the webgl tutorial. availability: pvrtc is typically only available on mobile devices with powervr chipsets. it is used in all generations of the iphone, ipod touch and ipad and supported on certain android devices that use a powervr gpu. this extension is available to both, webgl1 and webgl2 con
texts. note: on ios devices, this extension is named webkit_webgl_compressed_
texture_pvrtc. constants the compressed
texture formats are exposed by four constants and can be used in two functions: compressedteximage2d() (where the height and width parameters must be powers of 2) and compressedtexsubimage2d() (where the the height and width parameters must equal the current values of the existing
texture and the xoffset and yoffset parameters must be 0). ext.compressed_rg...
...g rgb compression in 4-bit mode. one block for each 4×4 pixels. ext.compressed_rgba_pvrtc_4bppv1_img rgba compression in 4-bit mode. one block for each 4×4 pixels. ext.compressed_rgb_pvrtc_2bppv1_img rgb compression in 2-bit mode. one block for each 8×4 pixels. ext.compressed_rgba_pvrtc_2bppv1_img rgba compression in 2-bit mode. one block for each 8×4 pixels. examples var ext = gl.ge
textension('webgl_compressed_
texture_pvrtc'); var
texture = gl.create
texture(); gl.bind
texture(gl.
texture_2d,
texture); gl.compressedteximage2d(gl.
texture_2d, 0, ext.compressed_rgb_pvrtc_4bppv1_img, 512, 512, 0,
texturedata); specifications specification status comment webgl_compressed_
texture_pvrtcthe definition of 'webgl_compressed_
texture_pvrtc' in that specification. ...
WEBGL_depth_texture - Web APIs
the webgl_depth_
texture extension is part of the webgl api and defines 2d depth and depth-stencil
textures. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is only available to webgl1 con
texts. in webgl2, the functionality of this extension is available on the webgl2 con
text by default. the constant in webgl2 is gl.unsigned_int_24_8. constants this extension adds a new constant: ext.unsigned_int_24_8_webgl unsigned integer type for 24-bit depth
texture data. extended methods this extension extends webglrenderingcon
text.teximage2d(): the format and internalformat parameters now accept gl.depth_component and gl.depth_stencil. the type paramet...
...ed methods this extension extends webglrenderingcon
text.teximage2d(): the format and internalformat parameters now accept gl.depth_component and gl.depth_stencil. the type parameter now accepts gl.unsigned_short, gl.unsigned_int, and ext.unsigned_int_24_8_webgl. the pixels parameter now accepts an arraybufferview of type uint16array and uint32array. this extension extends webglrenderingcon
text.framebuffer
texture2d(): the attachment parameter now accepts gl.depth_stencil_attachment. incorrectly stated as the target parameter in the specification, see https://www.khronos.org/bugzilla/show_bug.cgi?id=674. ...
...nt_24_8_webgl. the pixels parameter now accepts an arraybufferview of type uint16array and uint32array. this extension extends webglrenderingcon
text.framebuffer
texture2d(): the attachment parameter now accepts gl.depth_stencil_attachment. incorrectly stated as the target parameter in the specification, see https://www.khronos.org/bugzilla/show_bug.cgi?id=674. examples var ext = gl.ge
textension('webgl_depth_
texture'); gl.teximage2d(gl.
texture_2d, 0, gl.depth_component, 512, 512, 0, gl.depth_component, gl.unsigned_short, null); specifications specification status comment webgl_depth_
texturethe definition of 'webgl_depth_
texture' in that specification. recommendation initial definition. ...
WEBGL_lose_context - Web APIs
the webgl_lose_con
text extension is part of the webgl api and exposes functions to simulate losing and restoring a webglrenderingcon
text. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is available to both, webgl1 and webgl2 con
texts. methods webgl_lose_con
text.losecon
text() simulates losing the con
text. webgl_lose_con
text.restorecon
text() simulates restoring the con
text. ...
...nderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is available to both, webgl1 and webgl2 con
texts. methods webgl_lose_con
text.losecon
text() simulates losing the con
text. webgl_lose_con
text.restorecon
text() simulates restoring the con
text. examples with this extension, you can simulate the webglcon
textlost and webglcon
textrestored events: const canvas = document.getelementbyid('canvas'); const gl = canvas.getcon
text('webgl'); canvas.addeventlistener('webglcon
textlost', (event) => { console.log(event); }); gl.ge
textension('webgl_lose_con
text').losecon
text(); // webglcon
textevent event with type "webglcon
textlost" is logged. specifications specification status comment ...
...xtrestored events: const canvas = document.getelementbyid('canvas'); const gl = canvas.getcon
text('webgl'); canvas.addeventlistener('webglcon
textlost', (event) => { console.log(event); }); gl.ge
textension('webgl_lose_con
text').losecon
text(); // webglcon
textevent event with type "webglcon
textlost" is logged. specifications specification status comment webgl_lose_con
textthe definition of 'webgl_lose_con
text' in that specification. recommendation initial definition. ...
WebGL2RenderingContext.compressedTexSubImage3D() - Web APIs
the webgl2renderingcon
text.compressedtexsubimage3d() method of the webgl api specifies a three-dimensional sub-rectangle for a
texture image in a compressed format. syntax // read from the buffer bound to gl.pixel_unpack_buffer void gl.compressedtexsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imagesize, offset); void gl.compressedtexsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, arraybufferview srcdata, optional srcoffset, optional srclengthoverride); parameters target a glenum specifying the binding point (target) of the active
texture. possible values: gl.
texture_3d: a three-dimensional
texture. gl.
texture_2d_array: a two-dimensional array
texture. level a glint specifying the level of d...
...rs target a glenum specifying the binding point (target) of the active
texture. possible values: gl.
texture_3d: a three-dimensional
texture. gl.
texture_2d_array: a two-dimensional array
texture. level a glint specifying the level of detail. level 0 is the base image level and level n is the nth mipmap reduction level. xoffset a glint specifying the x offset within the compressed
texture image. yoffset a glint specifying the y offset within the compressed
texture image. zoffset a glint specifying the z offset within the compressed
texture image. width a glsizei specifying the width of the
texture. height a glsizei specifying the height of the
texture. depth a glsizei specifying the depth of the
texture. format a glenum specifying the compressed image format. possib...
...pha1_etc2 imagesize a glint specifying the number of bytes to read from the buffer bound to gl.pixel_unpack_buffer. offset a glint specifying the offset in bytes from which to read from the buffer bound to gl.pixel_unpack_buffer. srcdata an arraybufferview that be used as a data store for the compressed image data in memory. return value none. examples gl.compressedtexsubimage3d(gl.
texture_3d, 0, 0, 0, 512, 512, 512, gl.compressed_r11_eac,
texturedata); specifications specification status comment webgl 2.0the definition of 'compressedtexsubimage3d' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glcompressedtexsubimage3d' in that specification. standard man page of the (similar) o...
WebGL2RenderingContext.texStorage2D() - Web APIs
the webgl2renderingcon
text.texstorage2d() method of the webgl api specifies all levels of two-dimensional
texture storage. syntax void gl.texstorage2d(target, levels, internalformat, width, height); parameters target a glenum specifying the binding point (target) of the active
texture. possible values: gl.
texture_2d: a two-dimensional
texture. gl.
texture_cube_map: a cube-mapped
texture. levels a glint specifying the number of
texture levels. internalformat a glenum specifying the
texture store format. possible values: gl.r8 gl.r16f gl.r32f gl.r8ui gl.rg8 gl.rg16f gl.rg32f gl.rg8ui gl.rgb8 gl.srgb8 gl.rgb565 gl.r11f_g11f_b10f gl.rgb9_e5 gl.rgb16f gl.rgb32f gl.rgb8ui gl.rgba8 gl.srgb8_aplha8 gl.rgb5_a1 gl.rgba4 gl.rgba1...
...
texture store format. possible values: gl.r8 gl.r16f gl.r32f gl.r8ui gl.rg8 gl.rg16f gl.rg32f gl.rg8ui gl.rgb8 gl.srgb8 gl.rgb565 gl.r11f_g11f_b10f gl.rgb9_e5 gl.rgb16f gl.rgb32f gl.rgb8ui gl.rgba8 gl.srgb8_aplha8 gl.rgb5_a1 gl.rgba4 gl.rgba16f gl.rgba32f gl.rgba8ui unlike opengl 3.0, webgl 2 doesn't support the following etc2 and eac compressed
texture formats (see section 5.37 in the webgl 2 spec). you might be able to enable them via the webgl_compressed_
texture_etc extension, though. gl.compressed_r11_eac gl.compressed_signed_r11_eac gl.compressed_rg11_eac gl.compressed_signed_rg11_eac gl.compressed_rgb8_etc2 gl.compressed_rgba8_etc2_eac gl.compressed_srgb8_etc2 gl.compressed_srgb8_alpha8_etc2_eac gl.compressed_rgb8_p...
... extension, though. gl.compressed_r11_eac gl.compressed_signed_r11_eac gl.compressed_rg11_eac gl.compressed_signed_rg11_eac gl.compressed_rgb8_etc2 gl.compressed_rgba8_etc2_eac gl.compressed_srgb8_etc2 gl.compressed_srgb8_alpha8_etc2_eac gl.compressed_rgb8_punchthrough_alpha1_etc2 gl.compressed_srgb8_punchthrough_alpha1_etc2 width a glsizei specifying the width of the
texture. height a glsizei specifying the height of the
texture. return value none. examples gl.texstorage2d(gl.
texture_2d, 1, gl.rgb8, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage2d' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gltexstorage2d' in that...
WebGL2RenderingContext.texStorage3D() - Web APIs
the webgl2renderingcon
text.texstorage3d() method of the webgl api specifies all levels of a three-dimensional
texture or two-dimensional array
texture. syntax void gl.texstorage3d(target, levels, internalformat, width, height, depth); parameters target a glenum specifying the binding point (target) of the active
texture. possible values: gl.
texture_3d: a three-dimensional
texture. gl.
texture_2d_array: a two-dimensional array
texture. level a glint specifying the number of
texture levels. internalformat a glenum specifying the
texture store format. possible values: gl.r8 gl.r16f gl.r32f gl.r8ui gl.rg8 gl.rg16f gl.rg32f gl.rgui gl.rgb8 gl.srgb8 gl.rgb565 gl.r11f_g11f_b10f gl.rgb9_e5 gl.rgb16f gl.rgb32f gl.rgb8ui gl.rgba8 gl.s...
... editor's draft initial definition for webgl. ...
...essed_signed_r11_eac gl.compressed_rg11_eac gl.compressed_signed_rg11_eac gl.compressed_rgb8_etc2 gl.compressed_rgba8_etc2_eac gl.compressed_srgb8_etc2 gl.compressed_srgb8_alpha8_etc2_eac gl.compressed_rgb8_punchthrough_alpha1_etc2 gl.compressed_srgb8_punchthrough_alpha1_etc2 width a glsizei specifying the width of the
texture. height a glsizei specifying the height of the
texture. depth a glsizei specifying the depth of the
texture. return value none. examples gl.texstorage3d(gl.
texture_3d, 1, gl.rgb8, 256, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage3d' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gltexstorage3d' in t...
WebGLRenderingContext.bindFramebuffer() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. framebuffer a webglframebuffer object to bind. return value none. ...
...used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. framebuffer a webglframebuffer object to bind. return value none. ...
...d writing operations. gl.read_framebuffer: used as a source for reading operations. framebuffer a webglframebuffer object to bind. return value none. exceptions a gl.invalid_enum error is thrown if target is not gl.framebuffer, gl.draw_framebuffer, or gl.read_framebuffer. examples binding a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcon
text('webgl'); var framebuffer = gl.createframebuffer(); gl.bindframebuffer(gl.framebuffer, framebuffer); getting current bindings to check the current frame buffer binding, query the framebuffer_binding constant. gl.getparameter(gl.framebuffer_binding); specifications specification status comment webgl 1.0the definition of 'bindframebuffer' in that specification. re...
WebGLRenderingContext.blendEquationSeparate() - Web APIs
the webglrenderingcon
text.blendequationseparate() method of the webgl api is used to set the rgb blend equation and alpha blend equation separately. the blend equation determines how a new pixel is combined with a pixel already in the webglframebuffer. syntax void gl.blendequationseparate(modergb, modealpha); parameters modergb a glenum specifying how the red, green and blue components of source and destination colors are combined. must be either: gl.func_add: source + destination (default value), gl.func_subtract: source - destination, gl.func_reverse_subtract: destination - source, when using the ext_blend_minmax extension: ext.min_ext: minimum of source and destination, ext.max_ext: maximum of source and destination. ...
...nts of source and destination colors are combined. must be either: gl.func_add: source + destination (default value), gl.func_subtract: source - destination, gl.func_reverse_subtract: destination - source, when using the ext_blend_minmax extension: ext.min_ext: minimum of source and destination, ext.max_ext: maximum of source and destination. when using a webgl 2 con
text, the following values are available additionally: gl.min: minimum of source and destination, gl.max: maximum of source and destination. modealpha a glenum specifying how the alpha component (transparency) of source and destination colors are combined. must be either: gl.func_add: source + destination (default value), gl.func_subtract: source - destination, gl.func...
...cy) of source and destination colors are combined. must be either: gl.func_add: source + destination (default value), gl.func_subtract: source - destination, gl.func_reverse_subtract: destination - source, when using the ext_blend_minmax extension: ext.min_ext: minimum of source and destination, ext.max_ext: maximum of source and destination. when using a webgl 2 con
text, the following values are available additionally: gl.min: minimum of source and destination, gl.max: maximum of source and destination. return value none. exceptions if mode is not one of the three possible values, a gl.invalid_enum error is thrown. examples to set the blend equations, use: gl.blendequationseparate(gl.func_add, gl.func_subtract); to get the curren...
WebGLRenderingContext.bufferSubData() - Web APIs
the webglrenderingcon
text.buffersubdata() method of the webgl api updates a subset of a buffer object's data store. syntax // webgl1: void gl.buffersubdata(target, offset, arraybuffer srcdata); void gl.buffersubdata(target, offset, arraybufferview srcdata); // webgl2: void gl.buffersubdata(target, dstbyteoffset, arraybufferview srcdata, srcoffset, length); parameters target a glenum specifying the binding point (target). possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates,
texture coordinate data, or vertex color data. gl.element_array_buffer: buffer used for element indices. ...
...: void gl.buffersubdata(target, dstbyteoffset, arraybufferview srcdata, srcoffset, length); parameters target a glenum specifying the binding point (target). possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates,
texture coordinate data, or vertex color data. gl.element_array_buffer: buffer used for element indices. when using a webgl 2 con
text, the following values are available additionally: gl.copy_read_buffer: buffer for copying from one buffer object to another. gl.copy_write_buffer: buffer for copying from one buffer object to another. gl.transform_feedback_buffer: buffer for transform feedback operations. gl.uniform_buffer: buffer used for storing uniform blocks. gl.pixel_pack_buffer: buffer used for pixel...
... start reading the buffer. length optional a gluint defaulting to 0. return value none. exceptions a gl.invalid_value error is thrown if the data would be written past the end of the buffer or if data is null. a gl.invalid_enum error is thrown if target is not one of the allowed enums. examples using buffersubdata var canvas = document.getelementbyid('canvas'); var gl = canvas.getcon
text('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, 1024, gl.static_draw); gl.buffersubdata(gl.array_buffer, 512, data); specifications specification status comment webgl 1.0the definition of 'buffersubdata' in that specification. recommendation initial definition for webgl. opengl es 2.0the def...
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. ...
...renderbuffer object to a webglframebuffer object. syntax void gl.framebufferrenderbuffer(target, attachment, renderbuffertarget, renderbuffer); parameters target a glenum specifying the binding point (target) for the framebuffer. possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. when using a webgl 2 con
text, the following values are available additionally: gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the render buffer. possible values: gl.color_attachment0: color buffer.
...ng, and writing operations. gl.read_framebuffer: used as a source for reading operations. attachment a glenum specifying the attachment point for the render buffer. possible values: gl.color_attachment0: color buffer. gl.depth_attachment: depth buffer. gl.depth_stencil_attachment: depth and stencil buffer. gl.stencil_attachment: stencil buffer. ...
WebGLRenderingContext.generateMipmap() - Web APIs
the webglrenderingcon
text.generatemipmap() method of the webgl api generates a set of mipmaps for a webgl
texture object. mipmaps are used to create distance with objects. a higher-resolution mipmap is used for objects that are closer, and a lower-resolution mipmap is used for objects that are farther away. it starts with the resolution of the
texture image and halves the resolution until a 1x1 dimension
texture image is created. syntax void gl.generatemipmap(target); parameters target a glenum specifying the binding point (target) of the active
texture whose mipmaps will be generated. possible values: gl.
texture_2d: a two-dimensional
texture. gl.
texture_cube_map: a cube-mapped
texture. ...
...on of the
texture image and halves the resolution until a 1x1 dimension
texture image is created. syntax void gl.generatemipmap(target); parameters target a glenum specifying the binding point (target) of the active
texture whose mipmaps will be generated. possible values: gl.
texture_2d: a two-dimensional
texture. gl.
texture_cube_map: a cube-mapped
texture. when using a webgl 2 con
text, the following values are available additionally: gl.
texture_3d: a three-dimensional
texture. gl.
texture_2d_array: a two-dimensional array
texture. return value none. examples gl.generatemipmap(gl.
texture_2d); specifications specification status comment webgl 1.0the definition of 'generatemipmap' in that specification. recommendation in...
...finition of 'generatemipmap' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glgeneratemipmap' in that specification. standard man page of the (similar) opengl es 2.0 api. opengl es 3.0the definition of 'glgeneratemipmap' in that specification. standard man page of the (similar) opengl es 3.0 api. adds: gl.
texture_3d and gl.
texture_2d_array ...
WebGLRenderingContext.getActiveUniform() - Web APIs
index a gluint specifying the index of the uniform attribute to get. this value is an index 0 to n - 1 as returned by gl.getprogramparameter(program, gl.active_uniforms). return value a webglactiveinfo object describing the uniform. ...
... index a gluint specifying the index of the uniform attribute to get. this value is an index 0 to n - 1 as returned by gl.getprogramparameter(program, gl.active_uniforms). return value a webglactiveinfo object describing the uniform. ...
...forms). return value a webglactiveinfo object describing the uniform. ...
WebGLRenderingContext.pixelStorei() - Web APIs
syntax void gl.pixelstorei(pname, param); parameters pname a glenum specifying which parameter to set. see below for possible values. param a glint specifying a value to set the pname parameter to. see below for possible values. return value none. pixel storage parameters parameter name (for pname) description type default value allowed values (for param) specified in gl.pack_alignment packing of pixel data into memory glint 4 1, 2, 4, 8 opengl es 2.0 gl.unpack_alignment unpacking of pixel data from memory. ...
... true, false webgl gl.unpack_premultiply_alpha_webgl multiplies the alpha channel into the other color channels glboolean false true, false webgl gl.unpack_colorspace_conversion_webgl default color space conversion or no color space conversion. glenum gl.browser_default_webgl gl.browser_default_webgl, gl.none webgl when using a webgl 2 con
text, the following values are available additionally: constant description type default value allowed values (for param) specified in gl.pack_row_length number of pixels in a row. glint 0 0 to infinity opengl es 3.0 gl.pack_skip_pixels number of pixel locations skipped before the first pixel is written into memory. glint 0 0 to...
...0 gl.unpack_skip_rows number of rows of pixel locations skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_images number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 examples setting the pixel storage mode affects the webglrenderingcon
text.readpixels() operations, as well as unpacking of
textures with the webglrenderingcon
text.teximage2d() and webglrenderingcon
text.texsubimage2d() methods. var tex = gl.create
texture(); gl.bind
texture(gl.
texture_2d, tex); gl.pixelstorei(gl.pack_alignment, 4); to check the values for packing and unpacking of pixel data, you can query the same pixel storage parameters with webglrenderingcon
text.
WebGLRenderingContext.renderbufferStorage() - Web APIs
the webglrenderingcon
text.renderbufferstorage() method of the webgl api creates and initializes a renderbuffer object's data store. syntax void gl.renderbufferstorage(target, internalformat, width, height); parameters target a glenum specifying the target renderbuffer object. possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format. internalformat a glenum specifying the internal format of the renderbuffer. possible values: gl.rgba4: 4 red bits, 4 green bits, 4 blue bits 4 alpha bits. gl.rgb565: 5 red bits, 6 green bits, 5 blue bits. gl.rgb5_a1: 5 red bits, 5 green bits, 5 blue bits, 1 alpha bit. gl.depth_component16: 16 depth bits. gl.stencil_index8: 8 stencil bits. ...
... internalformat a glenum specifying the internal format of the renderbuffer. possible values: gl.rgba4: 4 red bits, 4 green bits, 4 blue bits 4 alpha bits. gl.rgb565: 5 red bits, 6 green bits, 5 blue bits. gl.rgb5_a1: 5 red bits, 5 green bits, 5 blue bits, 1 alpha bit. gl.depth_component16: 16 depth bits. gl.stencil_index8: 8 stencil bits. ...
... gl.depth_component24 gl.depth_component32f gl.depth24_stencil8 gl.depth32f_stencil8 when using the webgl_color_buffer_float extension: ext.rgba32f_ext: rgba 32-bit floating-point type. ext.rgb32f_ext: rgb 32-bit floating-point type. when using the ext_srgb extension: ext.srgb8_alpha8_ext: 8-bit srgb and alpha. when using a webgl 2 con
text and the ext_color_buffer_float extension: gl.r16f gl.rg16f gl.rgba16f gl.r32f gl.rg32f gl.rgba32f gl.r11f_g11f_b10f width a glsizei specifying the width of the renderbuffer in pixels. height a glsizei specifying the height of the renderbuffer in pixels. return value none. examples gl.renderbufferstorage(gl.renderbuffer, gl.rgba4, 256, 256); sp...
WebGLRenderingContext.uniformMatrix[234]fv() - Web APIs
the location is obtained using getuniformlocation(). ...
...the location is obtained using getuniformlocation(). ...
... of the webgl api specify matrix values for uniform variables. the three versions of this method (uniformmatrix2fv(), uniformmatrix3fv(), and uniformmatrix4fv()) take as the input value 2-component, 3-component, and 4-component square matrices, respectively. they are expected to have 4, 9 or 16 floats. syntax webglrenderingcon
text.uniformmatrix2fv(location, transpose, value); webglrenderingcon
text.uniformmatrix3fv(location, transpose, value); webglrenderingcon
text.uniformmatrix4fv(location, transpose, value); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify. the location is obtained using getuniformlocation(). transpose a glboolean specifying whether to transpose the matrix. must be false. value a float32array or seque...
text-emphasis-style - CSS: Cascading Style Sheets
the
text-emphasis-style css property sets the appearance of emphasis marks. it can also be set, and reset, using the
text-emphasis shorthand. /* initial value */
text-emphasis-style: none; /* no emphasis marks */ /* <string> values */
text-emphasis-style: 'x';
text-emphasis-style: '点';
text-emphasis-style: '\25b2';
text-emphasis-style: '*';
text-emphasis-style: 'foo'; /* should not be used. ...
...marks. it can also be set, and reset, using the
text-emphasis shorthand. /* initial value */
text-emphasis-style: none; /* no emphasis marks */ /* <string> values */
text-emphasis-style: 'x';
text-emphasis-style: '点';
text-emphasis-style: '\25b2';
text-emphasis-style: '*';
text-emphasis-style: 'foo'; /* should not be used. it may be computed to or rendered as 'f' only */ /* keyword values */
text-emphasis-style: filled;
text-emphasis-style: open;
text-emphasis-style: dot;
text-emphasis-style: circle;
text-emphasis-style: double-circle;
text-emphasis-style: triangle;
text-emphasis-style: filled sesame;
text-emphasis-style: open sesame; /* global values */
text-emphasis-style: inherit;
text-emphasis-style: initial;
text-emphasis-style: unset; syntax values none no emphasis marks. f...
.... authors should not specify more than one character in <string>. the ua may truncate or ignore strings consisting of more than one grapheme cluster. formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | [ [ filled | open ] | [ dot | circle | double-circle | triangle | sesame ] ] | <string> examples h2 {
text-emphasis-style: sesame; } specifications specification status comment css
text decoration module level 3the definition of '
text-emphasis' in that specification. candidate recommendation initial definition ...
text-orientation - CSS: Cascading Style Sheets
the
text-orientation css property sets the orientation of the
text characters in a line. it only affects
text in vertical mode (when writing-mode is not horizontal-tb). it is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...ot horizontal-tb). it is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax /* keyword values */
text-orientation: mixed;
text-orientation: upright;
text-orientation: sideways-right;
text-orientation: sideways;
text-orientation: use-glyph-orientation; /* global values */
text-orientation: inherit;
text-orientation: initial;
text-orientation: unset; the
text-orientation property is specified as a single keyword from the list below. values mixed rotates the characters of horizontal scripts ...
...svg properties glyph-orientation-vertical and glyph-orientation-horizontal. formal definition initial valuemixedapplies toall elements, except table row groups, rows, column groups, and columnsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax mixed | upright | sideways examples html <p>lorem ipsum dolet semper quisquam.</p> css p { writing-mode: vertical-rl;
text-orientation: upright; } result specifications specification status comment css writing modes module level 3the definition of '
text-orientation' in that specification. proposed recommendation initial definition. ...
HTML attribute: size - HTML: Hypertext Markup Language
the size attribute defines the width of the <input> and the height of the <select> element. for the input, if the type attribute is
text or password then it's the number of characters. this must be an integer value 0 or higher. if no size is specified, or an invalid value is specified, the input has no size declared, and the form control will be the default width based on the user agent. if css targets the element with properties impacting the width, css takes precedence. the size attribute has no impact on constraint validation. examples by adding size on some input types, the width of the input can be controlled. ...
...ent. if css targets the element with properties impacting the width, css takes precedence. the size attribute has no impact on constraint validation. examples by adding size on some input types, the width of the input can be controlled. adding size on a select changes the height, definining how many options are visible in the closed state. ...
... the size attribute has no impact on constraint validation. examples by adding size on some input types, the width of the input can be controlled. adding size on a select changes the height, definining how many options are visible in the closed state. ...
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
t accepts phrasing content implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes this element only supports the global attributes. the title attribute has a specific semantic meaning when used with the <abbr> element; it must contain a full human-readable description or expansion of the abbreviation. this
text is often presented by browsers as a tooltip when the mouse cursor is hovered over the element. each <abbr> element you use is independent from all others; providing a title for one does not automatically attach the same expansion
text to others with the same content
text. usage notes typical use cases it's certainly not required that all abbreviations be marked up using <abbr>. there are, tho...
...bbreviations be marked up using <abbr>. there are, though, a few cases where it's helpful to do so: when an abbreviation is used and you want to provide an expansion or definition outside the flow of the document's content, use <abbr> with an appropriate title. to define an abbreviation which may be unfamiliar to the reader, present the term using <abbr> and either a title attribute or inline
text providing the definition. when an abbreviation's presence in the
text needs to be semantically noted, the <abbr> element is useful. this can be used, in turn, for styling or scripting purposes. you can use <abbr> in concert with <dfn> to establish definitions for terms which are abbreviations or acronyms. see the example defining an abbreviation below. grammar considerations in languages wit...
...} result providing an expansion adding a title attribute lets you provide an expansion or definition for the abbreviation or acronym. html <p>ashok's joke made me <abbr title="laugh out loud">lol</abbr> big time.</p> result defining an abbreviation you can use <abbr> in tandem with <dfn> to more formally define an abbreviation, as shown here. ...
<address>: The Contact Address element - HTML: Hypertext Markup Language
ation for a person or people, or for an organization. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... content categories flow content, palpable content. ...
... specifications specification status comment html living standardthe definition of '<address>' in that specification. living standard html5the definition of '<address>' ...
<input type="checkbox"> - HTML: Hypertext Markup Language
t validation (offered to all <input>s). however, most of the validitystates will always be false. if the checkbox has the required attribute, but is not checked, then validitystate.valuemissing will be true. examples the following example is an extended version of the "multiple checkboxes" example we saw above — it has more standard options, plus an "other" checkbox that when checked causes a
text field to appear to enter a value for the "other" option. this is achieved with a simple block of javascript. the example also includes some css to improve the styling. html <form> <fieldset> <legend>choose your interests</legend> <div> <input type="checkbox" id="coding" name="interest" value="coding"> <label for="coding">coding</label> </div> <div> <input type=...
... <input type="checkbox" id="sports" name="interest" value="sports"> <label for="sports">sports</label> </div> <div> <input type="checkbox" id="cooking" name="interest" value="cooking"> <label for="cooking">cooking</label> </div> <div> <input type="checkbox" id="other" name="interest" value="other"> <label for="other">other</label> <input type="
text" id="othervalue" name="other"> </div> <div> <button type="submit">submit form</button> </div> </fieldset> </form> css html { font-family: sans-serif; } form { width: 600px; margin: 0 auto; } div { margin-bottom: 10px; } fieldset { background: cyan; border: 5px solid blue; } legend { padding: 10px; background: blue; color: cyan; } javascript var other...
...ype="submit">submit form</button> </div> </fieldset> </form> css html { font-family: sans-serif; } form { width: 600px; margin: 0 auto; } div { margin-bottom: 10px; } fieldset { background: cyan; border: 5px solid blue; } legend { padding: 10px; background: blue; color: cyan; } javascript var othercheckbox = document.queryselector('input[value="other"]'); var other
text = document.queryselector('input[id="othervalue"]'); other
text.style.visibility = 'hidden'; othercheckbox.addeventlistener('change', () => { if(othercheckbox.checked) { other
text.style.visibility = 'visible'; other
text.value = ''; } else { other
text.style.visibility = 'hidden'; } }); specifications specification status comment html living standard...
<input type="range"> - HTML: Hypertext Markup Language
<input> elements of type range let the user specify a numeric value which must be no less than a given value, and no more than another given value. the precise value, however, is not considered important. this is typically represented using a slider or dial control rather than a
text entry box like the number input type. because this kind of widget is imprecise, it shouldn't typically be used unless the control's exact value isn't important. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. if the user's browser doesn't support type range, it will fall back and treat it as a
text input. value a domstring ...
... of the major browsers. (see firefox bug 981916, chrome bug 341071). it also, perhaps, may still be under discussion. in the meantime, we can make the range vertical by rotating it using using css transforms, or, by targeting each browser engine with their own method, which includes setting the appearance to slider-vertical, by using a non-standard orient attribute in firefox, or by changing the
text direction for internet explorer and edge. consider this range control: <input type="range" id="volume" min="0" max="11" value="7" step="1"> screenshotlive sample this control is horizontal (at least on most if not all major browers; others might vary). standards according to the specification, making it vertical requires adding css to change the dimensions of the control so that it's tall...
...pe="range"] { -webkit-appearance: slider-vertical; } orient attribute in firefox only, there is a non-standard orient property. html use similar html as in the previous examples, we add the attribute with a value of vertical: <input type="range" min="0" max="11" value="7" step="1" orient="vertical"> writing-mode: bt-lr; the writing-mode property should generally not be used to alter
text direction for internationalization or localization purposes, but can be used for special effects. html we use the same html as in the previous examples: <input type="range" min="0" max="11" value="7" step="1"> css we target just the inputs with a type of range, changing the writing mode from the default to bt-lr, or bottom-to-top and left-to-right: input[type="range"] { writing-mode: bt...
<ins> - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories phrasing content or flow content. permitted content transparent. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. ...
...e and must be a valid date with an optional time string. if the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. for the format of the string without a time, see format of a valid date string. the format of the string if it includes both date and time is covered in format of a valid local date and time string. examples <ins>this
text has been inserted</ins> result accessibility concerns the presence of the <ins> element is not announced by most screen reading technology in its default configuration. it can be made to be announced by using the css content property, along with the ::before and ::after pseudo-elements. ins::before, ins::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; ov...
... content: " [insertion end] "; } some people who use screen readers deliberately disable announcing content that creates extra verbosity. because of this, it is important to not abuse this technique and only apply it in situations where not knowing content has been inserted would adversely affect understanding. short note on making your mark (more accessible) | the paciello group tweaking
text level styles | adrian roselli specifications specification status comment html living standardthe definition of '<ins>' in that specification. living standard html5the definition of '<ins>' in that specification. recommendation html 4.01 specificationthe definition of '<ins>' in that specification. recommendation ...
<kbd>: The Keyboard Input element - HTML: Hypertext Markup Language
by convention, the user agent defaults to rendering the contents of a <kbd> element using its default monospace font, although this is not mandated by the html standard. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. <kbd> may be nested in various combinations with the <samp> (sample output) element to represent various forms of input or output based on visual cues. ...
...ment represents an actual key or other unit of input as a portion of a larger input. see representing keystrokes within an input below. nesting a <kbd> element inside a <samp> element represents input that has been echoed back to the user by the system. see echoed input, below, for an example. nesting a <samp> element inside a <kbd> element, on the other hand, represents input which is based on
text presented by the system, such as the names of menus and menu items, or the names of buttons displayed on the screen. see the example under representing onscreen input options below. you can define a custom style to override the browser's default font selection for the <kbd> element, although the user's preferences may potentially override your css. examples basic example <p>use the command...
...side a <samp> element represents input that has been echoed back to the user by the system. <p>if a syntax error occurs, the tool will output the initial command you typed for your review:</p> <blockquote> <samp><kbd>custom-git ad my-new-file.cpp</kbd></samp> </blockquote> representing onscreen input options nesting a <samp> element inside a <kbd> element represents input which is based on
text presented by the system, such as the names of menus and menu items, or the names of buttons displayed on the screen. for example, you can explain how to choose the "new document" option in the "file" menu using html that looks like this: <p>to create a new file, choose the menu option <kbd><kbd><samp>file</samp></kbd>⇒<kbd><samp>new document</samp></kbd></kbd>.</p> <p>don't forget to click t...
<link>: The External Resource Link element - HTML: Hypertext Markup Language
ncern (especially for old ie versions). title the title attribute has special semantics on the <link> element. when used on a <link rel="stylesheet"> it defines a preferred or an alternate stylesheet. incorrectly using it may cause the stylesheet to be ignored. type this attribute is used to define the type of the content linked to. the value of the attribute should be a mime type such as
text/html,
text/css, and so on. the common use of this attribute is to define the type of stylesheet being referenced (such as
text/css), but given that css is the only stylesheet language used on the web, not only is it possible to omit the type attribute, but is actually now recommended practice. it is also used on rel="preload" link types, to make sure the browser only downloads file types that it ...
...on in advance in the link. for example, the browser might choose a different rendering of a link as a function of the methods specified; something that is searchable might get a different icon, or an outside link might render with an indication of leaving the current site. this attribute is not well understood nor supported, even by the defining browser, internet explorer 4. prefetch secure con
text this attribute identifies a resource that might be required by the next navigation and that the user agent should retrieve it. this allows the user agent to respond faster when the resource is requested in the future. target defines the frame or window name that has the defined linking relationship or that will show the rendering of any linked resource. obsolete attributes charset th...
...s. the user can choose which style sheet to use by choosing it from the view > page style menu. this provides a way for users to see multiple versions of a page. <link href="default.css" rel="stylesheet" title="default style"> <link href="fancy.css" rel="alternate stylesheet" title="fancy"> <link href="basic.css" rel="alternate stylesheet" title="basic"> providing icons for different usage con
texts you can include links to several different icons on the same page, and the browser will choose which one works best for its particular con
text using the rel and sizes values as hints. <!-- third-generation ipad with high-resolution retina display: --> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="favicon144.png"> <!-- iphone with high-resolution retina display: --> <link rel="...
<marquee>: The Marquee element (Obsolete) - HTML: Hypertext Markup Language
possible values are scroll, slide and alternate. if no value is specified, the default value is scroll. bgcolor sets the background color through color name or hexadecimal value. direction sets the direction of the scrolling within the marquee. possible values are left, right, up and down. if no value is specified, the default value is left. height sets the height in pixels or percentage value. ...
...or attribute is set to alternate. onfinish fires when the marquee has finished the amount of scrolling that is set by the loop attribute. it can only fire when the loop attribute is set to some number that is greater than 0. onstart fires when the marquee starts scrolling. methods start() starts scrolling of the marquee. stop() stops scrolling of the marquee. ...
...shed the amount of scrolling that is set by the loop attribute. it can only fire when the loop attribute is set to some number that is greater than 0. onstart fires when the marquee starts scrolling. methods start() starts scrolling of the marquee. stop() stops scrolling of the marquee. examples <marquee>this
text will scroll from right to left</marquee> <marquee direction="up">this
text will scroll from bottom to top</marquee> <marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid"> <marquee behavior="alternate"> this
text will bounce </marquee> </marquee> specifications specification status comment html living standardthe definition of '<marquee>' in that specification. living standard make it o...
<menuitem> - HTML: Hypertext Markup Language
commands can also optionally include a checkbox or be grouped to share radio buttons. (menu items for indirect commands gain checkboxes or radio buttons when defined against elements <input type="checkbox"> and <input type="radio">.) content categories none. ...
...also includes the attributes checked, disabled, icon, label, radiogroup or type. default this boolean attribute indicates use of the same command as the menu's subject element (such as a button or input). disabled boolean attribute which indicates that the command is not available in the current state. note that disabled is distinct from hidden; the disabled attribute is appropriate in any con
text where a change in circumstances might render the command relevant. icon image url, used to provide a picture to represent the command. label the name of the command as shown to the user. required when a command attribute is not present. radiogroup this attribute specifies the name of a group of commands to be toggled as radio buttons when selected. may only be used where the type attribute ...
...bute indicates the kind of command, and can be one of three values. command: a regular command with an associated action. this is the missing value default. checkbox: represents a command that can be toggled between two different states. radio: represent one selection from a group of commands that can be toggled as radio buttons. example html content <!-- a <div> element with a con
text menu --> <div con
textmenu="popup-menu"> right-click to see the adjusted con
text menu </div> <menu type="con
text" id="popup-menu"> <menuitem type="checkbox" checked>checkbox</menuitem> <hr> <menuitem type="command" label="this command does nothing" icon="https://developer.cdn.mozilla.net/static/img/favicon144.png"> commands don't render their contents. </menuitem> <menuitem type="...
<option>: The HTML Option element - HTML: Hypertext Markup Language
ent. as such, <option> can represent menu items in popups and other lists of items in an html document. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories none. permitted content
text, possibly with escaped characters (like é). tag omission the start tag is mandatory. the end tag is optional if this element is immediately followed by another <option> element or an <optgroup>, or if the parent element has no more content. permitted parents a <select>, an <optgroup> or a <datalist> element. implicit aria role option permitted a...
...ttributes this element includes the global attributes. disabled if this boolean attribute is set, this option is not checkable. often browsers grey out such control and it won't receive any browsing event, like mouse clicks or focus-related ones. if this attribute is not set, the element can still be disabled if one of its ancestors is a disabled <optgroup> element. label this attribute is
text for the label indicating the meaning of the option. if the label attribute isn't defined, its value is that of the element
text content. selected if present, this boolean attribute indicates that the option is initially selected. if the <option> element is the descendant of a <select> element whose multiple attribute is not set, only one single <option> of this <select> element may have the sel...
...t the option is initially selected. if the <option> element is the descendant of a <select> element whose multiple attribute is not set, only one single <option> of this <select> element may have the selected attribute. value the content of this attribute represents the value to be submitted with the form, should this option be selected. if this attribute is omitted, the value is taken from the
text content of the option element. examples see <select> for examples. specifications specification status comment html living standardthe definition of '<option>' in that specification. living standard html5the definition of '<option>' in that specification. recommendation html 4.01 specificationthe definition of '<option>' in that spe...
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
{{embedinteractiveexample("pages/tabbed/rb.html", "tabbed-standard")}} the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. content categories none. permitted content as a child of a <ruby> element. ...
...ted parents a <ruby> element. permitted aria roles any dom interface htmlelement attributes this element only includes the global attributes. usage notes ruby annotations are for showing pronunciation of east asian characters, like using japanese furigana or taiwanese bopomofo characters. the <rb> element is used to separate out each segment of the ruby base
text. even though <rb> is not an empty element, it is common to just include the opening tag of each element in the source code, so that the ruby markup is less complex and easier to read. the browser can then fill in the full element in the rendered version. you need to include one <rt> element for each base segment/<rb> element that you want to annotate. examples in this example, we provide an ...
...lement in the rendered version. you need to include one <rt> element for each base segment/<rb> element that you want to annotate. examples in this example, we provide an annotation for the original character equivalent of "kanji": <ruby> <rb>漢<rb>字 <rp>(</rp><rt>kan<rt>ji<rp>)</rp> </ruby> note how we've included two <rb> elements, to delimit the two separate parts of the ruby base
text. the annotation on the other hand is delimited by two <rt> elements. note that we could also write this example with the two base
text parts annotated completely separately. in this case we don't need to include <rb> elements: <ruby> 漢 <rp>(</rp><rt>kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp> </ruby> <ruby> <rb>漢<rb>字 <rp>(</rp><rt>kan<rt>ji<rp>)</rp> </ruby> body { ...
<script>: The Script element - HTML: Hypertext Markup Language
the html <script> element is used to embed executable code or data; this is typically used to embed or refer to javascript code. the <script> element can also be used with other languages, such as webgl's glsl shader programming language and json. content categories metadata content, flow content, phrasing content. permitted content dynamic script such as
text/javascript. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts metadata content, or any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlscriptelement attributes this element includes the global attri...
...identifies the scripting language in use. unlike the type attribute, however, this attribute’s possible values were never standardized. the type attribute should be used instead. notes scripts without async , defer or type="module" attributes, as well as inline scripts, are fetched and executed immediately, before the browser continues to parse the page. the script should be served with the
text/javascript mime type, but browsers are lenient and only block them if the script is served with an image type (image/*); a video type (video/*); an audio (audio/*) type; or
text/csv. if the script is blocked, an error is sent to the element, if not a load event is sent. examples basic usage these examples show how to import (an external) script using the <script> element. <script src="javascr...
...lso use the <script> element to embed data in html with server-side rendering by specifying a valid non-javascript mime type in the type attribute. <!-- generated by the server --> <script id="data" type="application/json">{"userid":1234,"username":"john doe","membersince":"2000-01-01t00:00:00.000z"}</script> <!-- static --> <script> const userinfo = json.parse(document.getelementbyid("data").
text); console.log("user information: %o", userinfo); </script> specifications specification status comments html living standardthe definition of '<script>' in that specification. living standard removed the charset attribute html5the definition of '<script>' in that specification. recommendation html 4.01 specificationthe definition of ...
Index - Archive of obsolete content
s. perhaps your target audience is people that are using older hardware, for example, and can't upgrade to the latest and greatest browsers. or for "reasons," your company is required to use very old software and you need to build web content that runs on that software. or perhaps you're just curious about the history of an obsolete feature or api, and how it worked. 2 .htaccess ( hyper
text access ) 301 redirect, cache control, custom error pages, htaccess, permanent redirect, redirect file accessing : htaccess files can be opened using any
text editor, like windows notepad, vin, sublime
text editor or any other. syntax highliting support for .htaccess files less. 3 2015 mdn fellowship program 2015, archive, fellowship no summary! 4 api ...
...ry! 40 high-level apis add-on sdk no summary! 41 addon-page add-on sdk, add-ons, extensions, obsolete, reference create a page that does not contain navigational elements. 42 base64 add-on sdk no summary! 43 clipboard add-on sdk interact with the system clipboard, setting and getting its contents. 44 con
text-menu add-on sdk, add-ons, extensions, firefox, sdk adds items, submenus, and menu separators to the page's con
text menu. 45 hotkeys add-on sdk assign hotkey combinations to functions in your add-on. 46 indexed-db add-on sdk exposes the indexeddb api to add-ons. 47 l10n add-on sdk localize strings appearing in the add-on's ja...
...ctions in your add-on. 46 indexed-db add-on sdk exposes the indexeddb api to add-ons. 47 l10n add-on sdk localize strings appearing in the add-on's javascript code. 48 notifications add-on sdk, notifications display transient, toaster-style desktop messages to the user. 49 page-mod add-on sdk run scripts in the con
text of web pages whose url matches a given pattern. 50 page-worker add-on sdk create a permanent, invisible page and access its dom. 51 panel add-on sdk, add-ons, extensions creates transient dialogs to implement part of an add-on's user interface. 52 passwords add-on sdk interact with firefox's password manager to add, retrieve and remov...
...And 84 more matches
ARIA Test Cases - Accessibility
ders if people are willing to step up and provide test results for them. tested ua/at combinations: dragon 10 with firefox 3 and ie 8 beta 2 jaws 9 & 10 with firefox 3 jaws 9 & 10 with ie beta 2 nvda 0.6p2 with firefox 3 orca with firefox 3 window-eyes 7 with ie 8 beta 2 and firefox 3 voiceover (leopard) with safari 4.0.2 zoom (leopard) with safari 4.0.2, firefox 3.x and opera 9.x zoom
text 9.1 with firefox 3 and ie 8 beta 2 test case structure test cases are organized as follows: test case links test details expected at behavior markup notes results table at firefox ie opera safari jaws 9 - - - - jaws 10 - 1. pass 2. fail - - voiceover (leopard) ...
... at firefox ie opera safari jaws 9 - - - - jaws 10 - 1. pass 2. fail - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - - - - zoom (leopard) pass n/a pass pass zoom
text - - - - orca - - - - table legend - no info/test yet n/a not applicable (not supported technically) pass expected behaviour met fail expected behaviour notmet 1. 2. reference to link example note regarding dojo/dijit test files the main pur...
... alertdialog alert dialog yui alert dialog (3rd button in this page) expected at behavior: at should speak the fact that this is an ...
...And 60 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
olor through which the background can be seen to some extent, a fourth channel is added to the color: the alpha channel. the alpha channel specifies how opaque the color is. 19 apple safari glossary, navigation, webmechanics safari is a web browser developed by apple and bundled with both macos and ios. it's based on the open source webkit engine. 20 application con
text codingscripting, glossary an application con
text is a top-level browsing con
text that has a manifest applied to it. 21 argument codingscripting, glossary, javascript an argument is a value (primitive or object) passed as input to a function. 22 arpanet glossary, infrastructure the arpanet (advanced research projects agency network) was an early ...
... bandwidth is the measure of how much information can pass through a data connection in a given amount of time. it is usually measured in multiples of bits-per-second (bps), for example megabits-per-second (mbps) or gigabits-per-second (gbps). 27 base64 advanced, base64, javascript, typed arrays, uri, url, unicode problem, atob(), btoa() base64 is a group of similar binary-to-
text encoding schemes that represent binary data in an ascii string format by translating it into a radix-64 representation. the term base64 originates from a specific mime content transfer encoding. 28 baseline css, glossary, svg, alignment, typography the baseline is a term used in european and west asian typography meaning an imaginary line upon which the characters of a font r...
...from a specific mime content transfer encoding. 28 baseline css, glossary, svg, alignment, typography the baseline is a term used in european and west asian typography meaning an imaginary line upon which the characters of a font rest. 29 bidi accessibility, glossary bidi (bidirectional) refers to a document containing both right-to-left and left-to-right
text. even when both directionalities occur in the same paragraph, the
text in each language must appear in its proper directionality. 30 bigint bigint, glossary, javascript, reference, arbitrary precision format in javascript, bigint is a numeric data type that can represent integers in the arbitrary precision format. in other programming languages different numeric types can exi...
...And 58 more matches
source-editor.jsm
s(); void settopindex(number atopindex); content management operations number getcharcount(); string getindentationstring(); string getlinedelimiter(); number getlinecount(); number getlineend(number alineindex, boolean aincludedelimiter); number getlinestart(number alineindex); string getmode(); string get
text([optional] number astart, [optional] number aend); string getselected
text(); void setmode(string amode); void set
text(string a
text, [optional] number astart, [optional] number aend); selection operations void dropselection(); number getcaretoffset(); object getcaretposition(); object getselection(); void setcaretoffse...
...in addition, when this value changes, the "dirtychanged" event is sent. editorelement element the element containing the editor. when using the default orion editor, this is a xul <xul:iframe> element. read on...
...in addition, when this value changes, the "dirtychanged" event is sent. ...
...And 55 more matches
WebGL constants - Web APIs
the webgl api provides several constants that are passed into or returned by functions. all constants are of type glenum. standard webgl constants are installed on the webglrenderingcon
text and webgl2renderingcon
text objects, so that you use them as gl.constant_name: var canvas = document.getelementbyid('mycanvas'); var gl = canvas.getcon
text('webgl'); gl.getparameter(gl.line_width); some constants are also provided by webgl extensions. a list is provided below. var debuginfo = gl.ge
textension('webgl_debug_renderer_info'); var vendor = gl.getparameter(debuginfo.unmasked_vendor_webgl); the webgl tutorial has more information, examples, and resources on how to get started with webgl. table of contents standard webgl 1 constants standard webgl 2 constants webgl extension constants ...
... constant name value description depth_buffer_bit 0x00000100 passed to clear to clear the current depth buffer. stencil_buffer_bit 0x00000400 passed to clear to clear the current stencil buffer. ...
...rameter(debuginfo.unmasked_vendor_webgl); the webgl tutorial has more information, examples, and resources on how to get started with webgl. table of contents standard webgl 1 constants standard webgl 2 constants webgl extension constants standard webgl 1 constants these constants are defined on the webglrenderingcon
text interface. clearing buffers constants passed to webglrenderingcon
text.clear() to clear buffer masks. constant name value description depth_buffer_bit 0x00000100 passed to clear to clear the current depth buffer. stencil_buffer_bit 0x00000400 passed to clear to clear the current stencil buffer. color_buffer_bit 0x00004000 passed to clear to clear the current color buffer. rendering primitives c...
...And 50 more matches
filter - CSS: Cascading Style Sheets
e value of radius defines the value of the standard deviation to the gaussian function, or how many pixels on the screen blend into each other, so a larger value will create more blur. the lacuna value for interpolation is 0. the parameter is specified as a css length, but does not accept percentage values. ...
... gaussian function, or how many pixels on the screen blend into each other, so a larger value will create more blur. the lacuna value for interpolation is 0. the parameter is specified as a css length, but does not accept percentage values. ...
...ch other, so a larger value will create more blur. the lacuna value for interpolation is 0. the parameter is specified as a css length, but does not accept percentage values. ...
...And 49 more matches
JXON - Archive of obsolete content
if you have already have a dom tree from using xmlhttprequest, skip to the next paragraph. note: if you are using an instance of xmlhttprequest in order to retr...
...og> first, create a dom tree like the previous example as described in the how to create a dom tree article. if you have already have a dom tree from using xmlhttprequest, skip to the next paragraph. note: if you are using an instance of xmlhttprequest in order to retrieve your xml file, please use the yourrequest.responsexml property to get a parsed xml document. don't use yourrequest.response
text! the algorithms proposed here (see: #1, #2, #3, #4) will consider only the following types of nodes and their attributes: document (only as function argument), documentfragment (only as function argument), element,
text (never as function argument), cdatasection (never as function argument), attr (never as function argument). this is a good and standardized compromise for a javascript ...
...bjects' local property names set using javascript must always have some kind of capitalization (that is, at least one capital letter somewhere in their names), as you can see below. the following algorithms are somewhat based on the parker convention, version 0.4, which prescribes the transformation of tags names into object properties names and the recognition of the typeof of all the collected
text content of each tag (plain
text parsing); but with some differences (so, one can say that we follow a our convention). moreover, all algorithms are equally lossless for the contemplated nodes. we consider the third algorithm as the most representative and practical jxon parsing algorithm. now let's serialize doc — the dom tree — to a javascript object tree (you can read more about working w...
...And 46 more matches
Index - Archive of obsolete content
at detail but to define what they are in simple terms. i selected items for this group because they seemed to be either shrouded in mystery, misused as concepts or terms, or underestimated according to their role in xul and cross-platform development. in contrast to the mozilla jargon file, this article describes items of specific interest to the web or content developer looking to establish a con
text for understanding mozilla's new technologies -- and in particular mozilla's xml-based user interface language, xul. 4 accessibility/xul accessibility reference accessibility, xul this table is designed to show how to expose
text properly for various xul element types. sections in bold are to draw attention to pieces that are often overlooked for visual layouts. underlined tex...
...s with a lower flexgroup are flexed first. when those elements have reached their maximum sizes, the elements with the next higher flexgroup are flexed. this process continues until there are no more elements remaining. the same process occurs when decreasing the size, except in the other direction. ...
... 67 commandupdater xul attributes, xul reference no summary! 68 completedefaultindex xul attributes, xul reference no summary! 69 completeselectedindex no summary! 70 container xul attributes, xul reference no summary! 71 containment xul attributes, xul reference no summary! 72 contentcon
textmenu xul attributes, xul reference no summary! 73 contenttooltip xul attributes, xul reference no summary! 74 con
text xul attributes, xul reference no summary! 75 con
textmenu xul attributes, xul reference no summary! 76 control xul attributes, xul reference no summary! 77 crop xul attribute...
...And 45 more matches
SVG documentation index - SVG: Scalable Vector Graphics
eedscompattable, needsexample, svg, svg attribute no summary! 22 alignment-baseline svg, svg attribute the alignment-baseline attribute specifies how an object is aligned with respect to its parent. this property specifies which baseline of this element is to be aligned with the corresponding baseline of the parent. for example, this allows alphabetic baselines in roman
text to stay aligned across font size changes. it defaults to the baseline with the same name as the computed value of the alignment-baseline property. 23 alphabetic deprecated, svg, svg attribute the alphabetic attribute defines the lower baseline of a font. it has the same syntax and semantics as the baseline descriptor within an @font-face. 24 amplitude needscomp...
...describes the minimum svg language profile that the author believes is necessary to correctly render the content. the attribute does not specify any processing restrictions; it can be considered metadata. 32 baseline-shift needsexample, svg, svg attribute the baseline-shift attribute allows repositioning of the dominant-baseline relative to the dominant-baseline of the parent
text content element. the shifted object might be a sub- or superscript. 33 bbox deprecated, svg, svg attribute the bbox attribute defines the maximal bounding box of a font. 34 begin needscompattable, svg, svg attribute the begin attribute defines when an animation should begin or when an element should be discarded. 35 bias filters, needsexamp...
...ribute the descent attribute defines the maximum unaccented depth of the font. 57 diffuseconstant filters, svg, svg attribute the diffuseconstant attribute represents the kd value in the phong lighting model. in svg, this can be any non-negative number. 58 direction svg, svg attribute the direction attribute specifies the inline-base direction of a <
text> or <tspan> element. it defines the start and end points of a line of
text as used by the
text-anchor and inline-size properties. it also may affect the direction in which characters are positioned if the unicode-bidi property's value is either embed or bidi-override. 59 display svg, svg attribute the display attribute lets you control the rendering of graphical or container ...
...And 45 more matches
nsIContentPrefService2
e. domain parameters many methods of this interface accept a "domain" parameter. domains may be specified either exactly, like "example.com", or as full urls, like "http://example.com/foo/bar". in the latter case the api extracts the full domain from the url, so if you specify "http://foo.bar.example.com/baz", the domain is taken to be "foo.bar.example.com", not "example.com". ...
...face accept a "domain" parameter. domains may be specified either exactly, like "example.com", or as full urls, like "http://example.com/foo/bar". in the latter case the api extracts the full domain from the url, so if you specify "http://foo.bar.example.com/baz", the domain is taken to be "foo.bar.example.com", not "example.com". private-browsing con
text parameters many methods also accept a "con
text" parameter. ...
... to be "foo.bar.example.com", not "example.com". private-browsing con
text parameters many methods also accept a "con
text" parameter. this parameter relates to private browsing and determines the kind of storage that a method uses, either the usual permanent storage or temporary storage set() aside for private browsing sessions. pass null to unconditionally use permanent storage. pass an nsiloadcon
text to use storage appropriate to the con
text's useprivatebrowsing attribute: if useprivatebrowsing is true, temporary private-browsing storage is used, and otherwise permanent storage is used. a con
text can be obtained from the window or channel whose content pertains to the preferences being modified or retrieved. callbacks the methods of callback objects are always called asynchronously. see nsico...
...And 44 more matches
WebGL best practices - Web APIs
minate webgl errors your application should run without generating any webgl errors (as returned by geterror). every webgl error is reported in the web console as a javascript warning with a descriptive message. after too many errors (32 in firefox), webgl stops generating descriptive messages, which really hinders debugging. ...
...enerates are out_of_memory and con
text_lost. know your limits (and extensions) the availability of most webgl extensions depends on the client system. when using webgl extensions, if possible, try to make them optional by gracefully adapting to the case there they are not supported. ...
...han your clients' systems! don't assume you can use thirty
texture samplers per shader just because it works on your machine! ...
...And 44 more matches
Index
ls.evalinsandbox add-ons, developing mozilla, extensions, javascript, xpcom:language bindings, xpconnect the evalinsandbox() function enables you to evaluate javascript code inside a sandbox you've previously created using the components.utils.sandbox constructor. 35 components.utils.evalinwindow this function enables code running in a more-privileged javascript con
text to evaluate a string in a less-privileged javascript con
text. the result is structured cloned back to the original con
text, unless it is native (for example, if it returns a dom node, this is not structured cloned, because the original con
text will see that through an xraywrapper already), so it's guaranteed to behave predictably. this is useful for privileged code, such as add-on code, to acc...
...this macro is meant for critical errors; like assertions, ns_errors should not be reachable. 148 ns_if_addref xpcom, xpcom_macros macro 149 ns_if_release xpcom, xpcom_macros macro 150 ns_release xpcom, xpcom_macros macro 151 ns_...
...this macro is meant for critical errors; like assertions, ns_errors should not be reachable. 148 ns_if_addref xpcom, xpcom_macros macro 149 ns_if_release xpcom, xpcom_macros macro 150 ns_release xpcom, xpcom_macros macro 151 ns_warning xpcom, x...
...And 43 more matches
Getting started with HTML - Learn web development
pical html page is structured, and other important basic language features. along the way, there will be an opportunity to play with html too! prerequisites: basic computer literacy, basic software installed, and basic knowledge of working with files. objective: to gain basic familiarity with html, and practice writing a few html elements. what is html? html (hyper
text markup language) is not a programming language. it is a markup language that tells web browsers how to structure the web pages you visit. it can be as complicated or as simple as the web developer wants it to be. html consists of a series of elements, which you use to enclose, wrap, or mark up different parts of content to make it appear or act in a certain way. the enclosing tags can make conten...
...b pages you visit. it can be as complicated or as simple as the web developer wants it to be. html consists of a series of elements, which you use to enclose, wrap, or mark up different parts of content to make it appear or act in a certain way. the enclosing tags can make content into a hyperlink to connect to another page, italicize words, and so on. for example, consider the following line of
text: my cat is very grumpy if we wanted the
text to stand by itself, we could specify that it is a paragraph by enclosing it in a paragraph (<p>) element: <p>my cat is very grumpy</p> note: tags in html are case-insensitive. this means they can be written in uppercase or lowercase. for example, a <title> tag could be written as <title>, <title>, <title>, <title>, etc., and it will work. however...
... of an html element let's further explore our paragraph element from the previous section: the anatomy of our element is: the opening tag: this consists of the name of the element (in this example, p for paragraph), wrapped in opening and closing angle brackets. this opening tag marks where the element begins or starts to take effect. in this example, it precedes the start of the paragraph
text. the content: this is the content of the element. in this example, it is the paragraph
text. the closing tag: this is the same as the opening tag, except that it includes a forward slash before the element name. this marks where the element ends. failing to include a closing tag is a common beginner error that can produce peculiar results. the element is the opening tag, followed by content, ...
...And 41 more matches
Index
3 js::autoidarray jsapi reference, reference, référence(2), spidermonkey js::autoidarray takes the ownership of jsidarray, and frees it in destructor by calling js_destroyidarray. 24 js::autosaveexceptionstate jsapi reference, reference, référence(2), spidermonkey js::autosaveexceptionstate saves and later restores the current exception state of a given jscon
text. 25 js::autovaluearray jsapi reference, reference, référence(2), spidermonkey js::autovaluearray<n> holds a rooted array of js::value. this is typically used for local variables being passed to function which requires js::handlevaluearray or a pointer to js::value array. 26 js::autovectorrooter jsapi reference, reference, référence(2), spidermonkey js...
...ion that you wish to use as if it were enclosed by a newly-created global object. 31 js::compile jsapi reference, reference, référence(2), spidermonkey js::compile compiles a script, srcbuf, chars, bytes, or file, for execution. 32 js::compilefunction jsapi reference, reference, référence(2), spidermonkey js::compilefunction compiles a function from a
text string chars, bytes, or srcbuf. 33 js::compileoffthread jsapi reference, reference, référence(2), spidermonkey js::compileoffthread compiles a script, chars for execution. 34 js::compileoptions jsapi reference, reference, référence(2), spidermonkey some methods of js::owningcompileoptions and js::compileoptions return the instance itself to allow meth...
...on as a constructor, fun. 36 js::createerror jsapi reference, reference, référence(2), spidermonkey js::createerror creates an error object with specified properties. 37 js::currentglobalornull jsapi reference, reference, référence(2), spidermonkey js::currentglobalornull() returns the global object for whatever function is currently running on the con
text. in other words, it returns the global object on the current scope chain. 38 js::deflatestringtoutf8buffer jsapi reference, refere, spidermonkey js::deflatestringtoutf8buffer encodes src as utf8. the caller must either ensure dst has enough space to encode the entire string, or pass the length of the buffer as dstlenp. in which case, the function will encode characters from t...
...And 41 more matches
Encrypt Decrypt_MAC_Using Token
of the mozilla public * license, v. 2.0. if a copy of the mpl was not distributed with this * file, you can obtain one at http://mozilla.org/mpl/2.0/. ...
...\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key. ...
...true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11con
text *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11con
text *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : digestop()\n"); } return rv; } /* * finalize macing. */ secstatus macfinal(pk11con
text *ctx, unsigned char *mac, unsigned int *maclen, unsigned int maxlen) { secstatus rv = pk11_digest...
...And 37 more matches
requiredFeatures - SVG: Scalable Vector Graphics
an svg feature from script, there is the (also deprecated) domimplementation.hasfeature() method. ...
...feature from script, there is the (also deprecated) domimplementation.hasfeature() method. ...
...eature() method. ...
...And 36 more matches
panel - Archive of obsolete content
g your add-on approved on amo. instead, keep the script in a separate file and load it using contentscriptfile. this makes your code easier to maintain, secure, debug and review. getting user input note: this example uses the action button api, which is only available from firefox 29 onwards. the following add-on adds a button which displays a panel when clicked. ...
...d load it using contentscriptfile. this makes your code easier to maintain, secure, debug and review. getting user input note: this example uses the action button api, which is only available from firefox 29 onwards. the following add-on adds a button which displays a panel when clicked. the panel just contains a <
textarea> element: when the user presses the return key, the contents of the <
textarea> is sent to the main add-on code. ...
...action button api, which is only available from firefox 29 onwards. the following add-on adds a button which displays a panel when clicked. the panel just contains a <
textarea> element: when the user presses the return key, the contents of the <
textarea> is sent to the main add-on code. ...
...And 35 more matches
Index - Learn web development
l cover general best practices (which are demonstrated throughout the html, css, and javascript topics), cross browser testing, and some tips on enforcing accessibility from the start. we'll cover accessibility in special detail. 3 accessible multimedia accessibility, article, audio, beginner, codingscripting, html, images, javascript, learn, multimedia, video, captions, subtitles,
text tracks this chapter has provided a summary of accessibility concerns for multimedia content, along with some practical solutions. 4 assessment: accessibility troubleshooting accessibility, assessment, beginner, css, codingscripting, html, javascript, learn, wai-aria in the assessment for this module, we present to you a simple site with a number of accessibility issues ...
...u design your site. 28 what is a domain name? beginner, domain names, infrastructure, intro, needsactivelearning, web domain names are a key part of the internet infrastructure. they provide a human-readable address for any web server available on the internet. 29 what is a url? beginner, infrastructure, needsactivelearning, url, resources, urls with hyper
text and http, url is one of the key concepts of the web. it is the mechanism used by browsers to retrieve any published resource on the web. 30 what is a web server? beginner, infrastructure, needsschema the term web server can refer to hardware or software, or both of them working together. 31 what is accessibility? accessibility, beginner, intro, needsactivelearn...
...ferent functionalities. in fact, you'll sometimes see these terms misused in news reports and elsewhere, so getting them mixed up is understandable! 33 what software do i need to build a website? beginner, needsactivelearning, webmechanics you can download most of the programs you need for web development for free. we'll provide a few links in this article. 34 what
text editors are available? beginner, composing, guide, tools,
text editor a website consists mostly of
text files, so for a fun, pleasant development experience you should choose your
text editor wisely. 35 front-end web developer beginner, css, front-end, html, javascript, learn, tools, web standards welcome to our front-end web developer learning pathway! 36 ...
...And 35 more matches
nsIDOMWindowUtils
void removesheet(in nsiuri sheeturi, in unsigned long type); void resumetimeouts(); void sendcompositionevent(in astring atype); obsolete since gecko 9 void sendcompositionevent(in astring atype, in astring adata, in astring alocale); obsolete since gecko 38.0 void sendcontentcommandevent(in astring atype, [optiona...
... void removesheet(in nsiuri sheeturi, in unsigned long type); void resumetimeouts(); void sendcompositionevent(in astring atype); obsolete since gecko 9 void sendcompositionevent(in astring atype, in astring adata, in astring alocale); obsolete since gecko 38.0 void sendcontentcommandevent(in astring atype, [optional] in nsitransf...
...ned long aoffset, in unsigned long alength, in boolean areverse); obsolete since gecko 31.0 boolean sendselectionsetevent(in unsigned long aoffset, in unsigned long alength, [optional] in unsigned long aadditionalflags); void sendsimplegestureevent(in astring atype, in float ax, in float ay, in unsigned long adirection, in double adelta, in long amodifiers); void send
textevent(in astring acompositionstring, in long afirstclauselength, in unsigned long afirstclauseattr, in long asecondclauselength, in unsigned long asecondclauseattr, in long athirdclauselength, in unsigned long athirdclauseattr, in long acaretstart, in long acaretlength); obsolete since gecko 26 boolean sendtouchevent(in astring atype, [array, size_is(count)] in pruint32 aidentifiers, [arr...
...And 35 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
lla does not support <layer> as i will discuss later. browsers, like internet explorer 4, that were built before the conception of w3c standards inherited many quirks. in this article, i will describe mozilla's quirks mode, which provides strong backwards html compatibility with internet explorer and other legacy browsers. i'll also cover nonstandard technologies, such as xmlhttprequest and rich
text editing, that mozilla does support because no w3c equivalent existed at the time. they include: html 4.01, xhtml 1.0 and xhtml 1.1 cascade style sheets (css): css level 1, css level 2.1 and parts of css level 3 document object model (dom): dom level 1, dom level 2 and parts of dom level 3 mathematical markup language: mathml version 2.0 extensible markup language (xml): xml 1.0, namespaces...
...3c web standards body has defined. you can reference entities through their numerical or character reference. for example, you can reference the non-breaking space character with   or with its equivalent character reference . some older browsers, such as internet explorer, had such quirks as allowing you to use entities by replacing the ; (semi-colon) character at the end with regular
text content:   foo    foo internet explorer will render the above   as white spaces, even though that is against the w3c specification. the browser will not parse a   if it is directly followed by more characters, for example:  12345 this code does not work in mozilla, since it goes against the w3c web standards. always use the correct form ( ) to avoid browser disc...
... node of the element. nextsibling returns the node immediately following the current one. nodename returns the name of the current node as a string. nodetype returns the type of the current node. ...
...And 32 more matches
A first splash into JavaScript - Learn web development
} .lastresult { color: white; padding: 3px; } </style> </head> <body> <h1>number guessing game</h1> <p>we have selected a random number between 1 and 100. see if you can guess it in 10 turns or fewer. ...
...stresult = document.queryselector('.lastresult'); const loworhi = document.queryselector('.loworhi'); const guesssubmit = document.queryselector('.guesssubmit'); const guessfield = document.queryselector('.guessfield'); let guesscount = 1; let resetbutton; function checkguess() { let userguess = number(guessfield.value); if (guesscount === 1) { guesses.
textcontent = 'previous guesses: '; } guesses.
textcontent += userguess + ' '; if (userguess === randomnumber) { lastresult.
textcontent = 'congratulations! you got it right!'; lastresult.style.backgroundcolor = 'green'; loworhi.
textcontent = ''; setgameover(); } else if (guesscount === 10) { lastresult.
textcontent = '!!!game over!!!'; ...
...vious guesses: '; } guesses.
textcontent += userguess + ' '; if (userguess === randomnumber) { lastresult.
textcontent = 'congratulations! ...
...And 32 more matches
Images in HTML - Learn web development
fortunately, it wasn't too long before the ability to embed images (and other more interesting types of content) inside web pages was added. there are other types of multimedia to consider, but it is logical to start with the humble <img> element, used to embed a simple image in a webpage. in this article we'll look at how to use it in depth, including the basics, annotating it with captions using <figure>, and detailing how it relates to css background images. ...
...files, familiarity with html fundamentals (as covered in getting started with html.) objective: to learn how to embed simple images in html, annotate them with captions, and how html images relate to css background images. how do we put an image on a webpage? in order to put a simple image on a webpage, we use the <img> element. this is an empty element (meaning that it has no
text content or closing tag) that requires a minimum of one attribute to be useful — src (sometimes spoken as its full title, source). the src attribute contains a path pointing to the image you want to embed in the page, which can be a relative or absolute url, in the same way as href attribute values in <a> elements. note: you should read a quick primer on urls and paths to refresh your memory o...
...ld give us the following result: note: elements like <img> and <video> are sometimes referred to as replaced elements. this is because the element's content and size are defined by an external resource (like an image or video file), not by the contents of the element itself. note: you can find the finished example from this section running on github (see the source code too.) alternative
text the next attribute we'll look at is alt. its value is supposed to be a
textual description of the image, for use in situations where the image cannot be seen/displayed or takes a long time to render because of a slow internet connection. for example, our above code could be modified like so: <img src="images/dinosaur.jpg" alt="the head and torso of a dinosaur skeleton; it has a l...
...And 31 more matches
Looping code - Learn web development
canvas { display: block; } body { margin: 0; } button { position: absolute; top: 5px; left: 5px; } </style> </head> <body> <button>update</button> <canvas></canvas> <script> const btn = document.queryselector('button'); const canvas = document.queryselector('canvas'); const ctx = canvas.getcon
text('2d'); let width = document.documentelement.clientwidth; let height = document.documentelement.clientheight; canvas.width = width; canvas.height = height; function random(number) { return math.floor(math.random()*number); } function draw() { ctx.clearrect(0,0,width,height); for (let i = 0; i < 100; i++) { ctx.beginpath(); ctx.fills...
... some curly braces that contain a block of code — this code will be run each time the loop iterates. let's look at a real example so we can visualize what these do more clearly. ...
... this shows a loop is used to iterate over the items in an array and do something with each of them — a very common pattern in javascript. here: the counter variable (sometimes known as an initializer or an iteration variable), i, starts at 0 (let i = 0). the...
...And 31 more matches
Menu - Archive of obsolete content
note: this page documents the jetpack prototype, which has since been replaced by the add-on sdk. please see the wiki page and online documentation for more information on how to use the add-on sdk. jetpack's menu api allows features to access and modify the browser's built-in menus. features can also create new menus and attach them almost anywhere, chrome or content, as popup menus or con
text menus. two namespaces are associated with this api: jetpack.menu, which provides access to the browser's menus, and jetpack.menu, the constructor for making new menus. the api is fairly comprehensive, so you may want to start by reading through some examples. because it is still under development, the api currently lives in the future and must be imported before it is used: jetpack.future.import...
...jetpack.menu(properties) creates a menu with specific properties. parameters properties an object defining any of the properties below. the items property may be used to define an array of menuitems. properties property type description beforehide function a function invoked just before the menu is hidden. ...
...ecific properties. parameters properties an object defining any of the properties below. the items property may be used to define an array of menuitems. properties property type description beforehide function a function invoked just before the menu is hidden. if the menu is a con
text menu, it is called as beforehide(menu, con
text) and otherwise as beforehide(menu). menu is the menu object to which beforehide is attached. con
text is an object describing the con
text in which the menu was shown. beforeshow function a function invoked just before the menu is shown. if the menu is a con
text menu, it is called as beforeshow(menu, con
text) and otherwise as beforeshow(menu). menu is the menu object to...
...And 30 more matches
Using XMLHttpRequest - Web APIs
ween the web site and a server. examples of both common and more obscure use cases for xmlhttprequest are included. to send an http request, create an xmlhttprequest object, open a url, and send the request. after the transaction completes, the object will contain useful information such as the response body and the http status of the result. function reqlistener () { console.log(this.response
text); } var oreq = new xmlhttprequest(); oreq.addeventlistener("load", reqlistener); oreq.open("get", "http://www.example.org/example.txt"); oreq.send(); types of requests a request made via xmlhttprequest can fetch the data in one of two ways, asynchronously or synchronously. the type of request is dictated by the optional async argument (the third argument) that is set on the xmlhttprequest.open...
..." because when it was created the main format that was originally used for asynchronous data exchange were xml handling responses there are several types of response attributes defined by the living standard specification for the xmlhttprequest() constructor. these tell the client making the xmlhttprequest important information about the status of the response. some cases where dealing with non-
text response types may involve some manipulation and analysis are outlined in the following sections. analyzing and manipulating the responsexml property if you use xmlhttprequest to get the content of a remote xml document, the responsexml property will be a dom object containing a parsed xml document. this could prove difficult to manipulate and analyze. there are four primary ways of analyzing t...
...ument beforehand. you might want to remove line breaks, if you use regexp to scan with regard to line breaks. however, this method is a "last resort" since if the xml code changes slightly, the method will likely fail. note: xmlhttprequest can now interpret html for you using the responsexml property. read the article about html in xmlhttprequest to learn how to do this. processing a response
text property containing an html document if you use xmlhttprequest to get the content of a remote html webpage, the response
text property is a string containing the raw html. this could prove difficult to manipulate and analyze. there are three primary ways to analyze and parse this raw html string: use the xmlhttprequest.responsexml property as covered in the article html in xmlhttprequest. inj...
...And 30 more matches
<color> - CSS: Cascading Style Sheets
urrentcolor keyword represents the value of an element's color property. this lets you use the color value on properties that do not receive it by default. if currentcolor is used as the value of the color property, it instead takes its value from the inherited value of the color property. currentcolor example html <div style="color:blue; border: 1px dashed currentcolor;"> the color of this
text is blue. <div style="background:currentcolor; height:9px;"></div> this block is surrounded by a blue border. </div> result rgb colors the rgb color model defines a given color according to its red, green, and blue components. an optional alpha component represents the color's transparency. syntax rgb colors can be expressed through both hexadecimal (prefixed with #) and functional (rgb...
...parated values in the functional notation. system colors in forced colors mode (detectable with the forced-colors media query), most colors are restricted into a user- and browser-defined palette. these system colors are exposed by the following keywords, which can be used to ensure that the rest of the page integrates well with the restricted palette. ...
..., which can be used to ensure that the rest of the page integrates well with the restricted palette. these values may also be used in other con
texts, but are not widely supported by browsers. the keywords in the following list are defined by the css color module level 4 specification. note that these keywords are case insensitive, but are listed here with mixed case for readability. ...
...And 30 more matches
JavaScript Daemons Management - Archive of obsolete content
er = oowner }; this.task = ftask; if (isfinite(nrate) && nrate > 0) { this.rate = math.floor(nrate); } if (nlen > 0) { this.length = math.floor(nlen); } if (fonstart) { this.onstart = fonstart; } if (finit) { this.onstop = finit; finit.call(oowner, this.index, this.length, this.backw); } } /* create the daemon.blank() constructor and the global daemon.con
text object */ daemon.blank = function () {}; daemon.con
text = daemon.blank.prototype; /* make love with the gc :-) */ daemon.blank.prototype = /* important! */ daemon.prototype; daemon.con
text.constructor = object; /* these properties can be manually reconfigured after the creation of the daemon */ daemon.prototype.owner = daemon.con
text; daemon.prototype.task = null; daemon.prot...
...nse, version 3 or later. ...
...|*| \*/ "use strict"; /************************************** * the safe-daemon sub-system * **************************************/ /* the "daemon.safe" constructor */ daemon.safe = function () { daemon.apply(this, arguments); }; /* create the daemon.safe.blank() constructor and the daemon.safe.con
text object */ daemon.safe.blank = function () {}; daemon.safe.con
text = daemon.safe.prototype; daemon.to_be_defined = daemon.safe.blank.prototype; /* make love with the gc :-) */ daemon.safe.blank.prototype = /* important! */ daemon.safe.prototype = /* important! */ new daemon.blank(); daemon.safe.prototype.constructor = daemon.safe; daemon.to_be_defined.constructor = daemon.safe.con
text.constructor = object; /* system required daemon.safe global object m...
...And 29 more matches
Making decisions in your code — conditionals - Learn web development
best to stay in with a cup ...
.../p> const select = document.queryselector('select'); const para = document.queryselector('p'); select.addeventlistener('change', setweather); function setweather() { const choice = select.value; if (choice === 'sunny') { para.
textcontent = 'it is nice and sunny outside today. ...
...tweather() { const choice = select.value; if (choice === 'sunny') { para.
textcontent = 'it is nice and sunny outside today. ...
...And 29 more matches
Following the Android Toasts Tutorial from a JNI Perspective
il before you send it triggers a "draft saved" toast to let you know that you can continue editing later. toasts automatically disappear after a timeout. toasts do not have to be created with jni; they are exposed by the nativewindow feature on firefox for android, see toast documentation. java code let's start with the following java code, which invokes a toast and says "hello, firefox!". con
text con
text = getapplicationcon
text(); charsequence
text = "hello, firefox!"; int duration = toast.length_short; toast toast = toast.make
text(con
text,
text, duration); toast.show(); nativewindow code as mentioned earlier, toasts are a very popular feature, so mozilla developers chose to bring it to the privileged javascript scope via the nativewindow object. the java code example above can be done...
...ject. the java code example above can be done with privileged javascript from firefox for android with the following code: window.nativewindow.toast.show("hello, firefox!", "short"); converting java to jni.jsm the first step is to look at the java code and see all the different types, methods, constructors, and fields that are being used. in the toast code we have the following: types - con
text, charsequence, int, toast, and void methods - make
text, show fields - length_short no constructors are used. declare the types we will start by declaring the types needed. in jni, there is the all-important property called sig. when something is declared, we are stating the sig and the name. the sig's will be represented as javascript strings in jni.jsm, and the sig's of the types are as fo...
...f the types go right next to each other without any spacing. the arguments are within the parenthesis, and the return type is immediately following. more on this later. so let us now declare the types for our toast example. we see we have three classes and two basic types (int and void). the class signature is looked up on the android documentation. ...
...And 29 more matches
HTTP Index - HTTP
it was designed for communication between web browsers and web servers, but it can also be used for other purposes. http follows a classical client-server model, with a client opening a connection to make a request, then waiting until it receives a response. ...
..., like http, sessions consist of three phases: 3 an overview of http html, http, overview, webmechanics, l10n:priority http isthe foundation of any data exchange on the web and it is a client-server protocol, which means requests are initiated by the recipient, usually the web browser. a complete document is reconstructed from the different sub-documents fetched, for instance
text, layout description, images, videos, scripts, and more 4 basics of http guide, http, overview http is a pretty extensible protocol. it relies on a few basic concepts like the notion of resources and uris, a simple structure of messages, and a client-server structure for the communication flow. on top of these basic concepts, numerous extensions have appeared over the years, a...
...estion among website owners is whether to choose non-www or www urls. this page provides some advice on what's best. 6 data urls base64, guide, http, intermediate, url data urls, urls prefixed with the data: scheme, allow content creators to embed small files inline in documents. 7 evolution of http guide, http, needsupdate, needsupdate(http/3) http (hyper
text transfer protocol) is the underlying protocol of the world wide web. http has evolved from an early protocol to exchange files in a semi-trusted laboratory environment, to the modern maze of the internet, now carrying images, videos in high resolution and 3d. 8 identifying resources on the web domain, http, path, scheme, syntax, uri, url, url syntax, web, fragment, port, query, res...
...And 29 more matches
Style System Overview - Archive of obsolete content
a rule is a selector and a declaration block. a declaration block is a group of declarations. a declaration is a property and a value. ...
... the declara...
...ed with that declaration, and the declaration, and is the most important implementation of nsistylerule. the declarations (properties & values) are stored in data structs (nscss*). the data format of the structs and selectors is mostly clear from the code and not worth going into (although the implementation of :not() is confusing). ...
...And 28 more matches
CSS property compatibility table for form controls - Learn web development
none; } compatibility tables global behaviors some behaviors are common to many browsers at a global level: border, background, border-radius, height using one of these properties can partially or fully turn off the native look & feel of widgets on some browsers. be careful when you use them. line-height this property is supported inconsistently across browsers and you should avoid it.
text-decoration this property is not supported by opera on form widgets.
text-overflow opera, safari, and ie9 do not support this property on form widgets.
text-shadow opera does not support
text-shadow on form widgets and ie9 does not support it at all.
text fields see the
text, search, and password input types. property n t note css box model width ...
...in yes yes padding partial[1][2] yes webkit browsers (mostly on mac osx and ios) use the native look & feel for the search fields. therefore, it's required to use -webkit-appearance:none to be able to apply this property to search fields. on windows 7, internet explorer 9 does not apply the border unless background:none is applied. ...
...o use -webkit-appearance:none to be able to apply this property to search fields. on windows 7, internet explorer 9 does not apply the border unless background:none is applied.
text and font color[1] yes yes if the border-color property is not set, some webkit based browsers will apply the color property to the border as well as the font on <
textarea>s. ...
...And 28 more matches
Creating localizable web applications
d. listed below are good practices and recommendations that should be followed in order to make your content easily localizable. note: most of the code snippets used in the examples below come from an early version of the getpersonas.com website. in some cases, the code snippets were slightly changed to better illustrate the recommendations or for clarity. cheatsheet don't hardcode english
text, formats (numbers, dates, addresses, etc.), word order or sentence structure. don't put
text or numbers in images. don't forget about right-to-left locales. take advantage of printf() (or equivalents) and use variables in the english strings. write semantic code (e.g. don't use
text and <img/> for decorations; instead, use css). document your code so that localizers know what they're transla...
... app logic detect the locale correctly be smart about detecting the user's locale correctly. you can use one or more of the following techniques: http accept-language headers, the ua string, ip geolocation. ...
... app logic detect the locale correctly be smart about detecting the user's locale correctly. you can use one or more of the following techniques: http accept-language headers, the ua string, ip geolocation. ...
...And 28 more matches
MathML Torture Test
<mo>=</mo> <mrow> <mo>{</mo> <mtable> <mtr> <mtd columnalign="center"> <mrow> <mn>1</mn> <mo>/</mo> <mn>3</mn> </mrow> </mtd> <mtd columnalign="left"> <mrow> <m
text>if </m
text> <mn>0</mn> <mo>≤</mo> <mi>x</mi> <mo>≤</mo> <mn>1</mn> <mo>;</mo> </mrow> </mtd> </mtr> <mtr> <mtd columnalign="center"> <mrow> <mn>2</mn>...
...mo>;</mo> </mrow> </mtd> </mtr> <mtr> <mtd columnalign="center"> <mrow> <mn>2</mn> <mo>/</mo> <mn>3</mn> </mrow> </mtd> <mtd columnalign="center"> <mrow> <m
text>if </m
text> <mn>3</mn> <mo>≤</mo> <mi>x</mi> <mo>≤</mo> <mn>4</mn> <mo>;</mo> </mrow> </mtd> </mtr> <mtr> <mtd columnalign="center"> <mn>0</mn> </mtd> ...
... <mo>≤</mo> <mi>x</mi> <mo>≤</mo> <mn>4</mn> <mo>;</mo> </mrow> </mtd> </mtr> <mtr> <mtd columnalign="center"> <mn>0</mn> </mtd> <mtd columnalign="left"> <m
text>elsewhere.</m
text> </mtd> </mtr> </mtable> </mrow> </mrow> </math> </td></tr> <tr> <td>19</td> <td><img src="https://udn.realityripple.com/samples/bf/4ccasc768c.png" width="101" height="44" alt="texbook, 18.23-18.24" /></td> <td> <math display="block"> <mover> <mrow> <mi>x</mi> ...
...And 26 more matches
WebIDL bindings
ngs.conf for whatever non-webidl interfaces your new interface has as arguments or return values. implement a wrapobject override on mozilla::dom::myinterface that just calls through to mozilla::dom::myinterface_binding::wrap. note that if your c++ type is implementing multiple distinct web idl interfaces, you need to choose which mozilla::dom::myinterface_binding::wrap to call here. see audiocon
text::wrapobject, for example. expose whatever methods the interface needs on mozilla::dom::myinterface. these can be inline, virtual, have any calling convention, and so forth, as long as they have the right argument types and return types. you can see an example of what the function declarations should look like by running mach webidl-example myinterface. this will produce two files in dom/binding...
...ctions of webidl operations (methods) a webidl operation is turned into a method call on the underlying c++ object. the return type and argument types are determined as described below. in addition to those, all methods that are allowed to throw will get an errorresult& argument appended to their argument list. non-static methods that use certain webidl types like any or object will get a jscon
text* argument prepended to the argument list. static methods will be passed a const globalobject& for the relevant global and can get a jscon
text* by calling con
text() on it. the name of the c++ method is simply the name of the webidl operation with the first letter converted to uppercase. webidl overloads are turned into c++ overloads: they simply call c++ methods with the same name and different ...
...a readonly attribute only has a getter and no setter. the getter's name is the name o...
...And 26 more matches
Architecture - Accessibility
introduction the implementation of
text and embedded objects in mozilla is clever but confusing. here is a bit of history and an explanation. mozilla exposes a document containment hierarchy with
text and embedded objects. sometimes the embedded object is really just another
text container with more embedded objects. however in accessibility hierarchies such as atk and iaccessible2,
text is not exposed in leaf nodes as it is in a w3c dom. the
text is actually exposed via a special
text interface in the parent of the
text nodes. it is concatenated together with all its sibling
text nodes, and embedded objects between the
text nodes are exposed as the unicoded embedded object character '\xfffc'. one reason for this is that there are fewer nodes to pass across process, and that improves p...
... it is in a w3c dom. the
text is actually exposed via a special
text interface in the parent of the
text nodes. it is concatenated together with all its sibling
text nodes, and embedded objects between the
text nodes are exposed as the unicoded embedded object character '\xfffc'. one reason for this is that there are fewer nodes to pass across process, and that improves performance. node types
text content (role_
text) objects are implemented by ns
textaccessible. their
text is actually exposed in their parent nshyper
textaccessible via nsiaccessible
text. when the hierarchy is finally exposed to atk they are stripped out. they are in the nsiaccessible hierarchy to make it easy for nshyper
textaccessible to piece its final
text representation together. they are kept in iaccessible2 for backward ...
... by ns
textaccessible. their
text is actually exposed in their parent nshyper
textaccessible via nsiaccessible
text. when the hierarchy is finally exposed to atk they are stripped out. they are in the nsiaccessible hierarchy to make it easy for nshyper
textaccessible to piece its final
text representation together. they are kept in iaccessible2 for backward compatibility with msaa clients that expect
text in leaf nodes. html (role_whitespace) objects are implemented by nshtmlbraccessible. they end up getting exposed as '\n' in their parent nshyper
textaccessible. when the hierarchy is finally exposed to atk they are stripped out as leaf nodes, but the \n remains in the containing
text. ...
...And 26 more matches
HTML: A good basis for accessibility - Learn web development
this article looks in detail at how html can be used to ensure maximum accessibility. prerequisites: basic computer literacy, a basic understanding of html (see introduction to html), and an understanding of what accessibility is. objective: to gain familiarity with the features of html that have accessibility benefits and how to use them appropriately in your web documents. ...
... sometimes you are not in the position to get rid of lousy markup — your pages might be generated by some kind of server-side framework over which you don't have full control, or you might have third party content on your page (such as ad banners) over which you have no control. the goal isn't "all or nothing." however, — every improvement you can make will help the cause of accessibility.
text content one of the best accessibility aids a screen reader user can have is an excellent content structure with headings, paragraphs, lists, etc. an excellent semantic example might look something like the following: <h1>my heading</h1> <p>this is the first section of my document.</p> <p>i'll add another paragraph here too.</p> <ol> <li>here is</li> <li>a list for</li> <li>you to read<...
...another paragraph here too.</p> <ol> <li>here is</li> <li>a list for</li> <li>you to read</li> </ol> <h2>my subheading</h2> <p>this is the first subsection of my document. i'd love people to be able to find this content!</p> <h2>my 2nd subheading</h2> <p>this is the second subsection of my content. i think is more interesting than the last one.</p> we've prepared a version with longer
text for you to try out with a screen reader (see good-semantics.html). if you try navigating through this, you'll see that this is pretty easy to navigate: the screen reader reads each header out as you progress through the content, notifying you what a heading is, what is a paragraph, etc. it stops after each element, letting you go at whatever pace is comfortable for you. you can jump to the n...
...And 25 more matches
HTML: A good basis for accessibility - Learn web development
this article looks in detail at how html can be used to ensure maximum accessibility. prerequisites: basic computer literacy, a basic understanding of html (see introduction to html), and an understanding of what accessibility is. objective: to gain familiarity with the features of html that have accessibility benefits and how to use them appropriately in your web documents. ...
... sometimes you are not in the position to get rid of lousy markup — your pages might be generated by some kind of server-side framework over which you don't have full control, or you might have third party content on your page (such as ad banners) over which you have no control. the goal isn't "all or nothing." however, — every improvement you can make will help the cause of accessibility.
text content one of the best accessibility aids a screen reader user can have is an excellent content structure with headings, paragraphs, lists, etc. an excellent semantic example might look something like the following: <h1>my heading</h1> <p>this is the first section of my document.</p> <p>i'll add another paragraph here too.</p> <ol> <li>here is</li> <li>a list for</li> <li>you to read<...
...another paragraph here too.</p> <ol> <li>here is</li> <li>a list for</li> <li>you to read</li> </ol> <h2>my subheading</h2> <p>this is the first subsection of my document. i'd love people to be able to find this content!</p> <h2>my 2nd subheading</h2> <p>this is the second subsection of my content. i think is more interesting than the last one.</p> we've prepared a version with longer
text for you to try out with a screen reader (see good-semantics.html). if you try navigating through this, you'll see that this is pretty easy to navigate: the screen reader reads each header out as you progress through the content, notifying you what a heading is, what is a paragraph, etc. it stops after each element, letting you go at whatever pace is comfortable for you. you can jump to the n...
...And 25 more matches
Mozilla Style System Documentation
see also the style techtalk for more complete although less detailed documentation. style con
text management a style con
text (class nsstylecon
text, currently also interface nsistylecon
text although the interface should go away when all of the style systems can be moved back into the layout dll) represents the style data for a css formatting object. in the layout system, these formatting objects are described as frames (interface nsiframe), although a pair of frames represents table formatting objects. the css specification describes formatting objects that correspond to elements in the content model and formatting objects that correspond to pseudo-elements. ...
...ese formatting objects are described as frames (interface nsiframe), although a pair of frames represents table formatting objects. the css specification describes formatting objects that correspond to elements in the content model and formatting objects that correspond to pseudo-elements. ...
...siframe), although a pair of frames represents table formatting objects. the css specification describes formatting objects that correspond to elements in the content model and formatting objects that correspond to pseudo-elements. (mozilla has a bunch of its pseudo-elements that are not in the css specification.) we also create style con
texts for some things that are not css formatting objects:
text nodes and placeholder frames. ...
...And 25 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
ates a rotating cube around which the user can move freely using a vr headset, keyboard, and/or mouse. this will help to solidify your understanding of how the geometry of 3d graphics and vr work, as well as to help ensure you understand the way the functions and data that are used during xr rendering work together. screenshot of this example in action the core of this example—the spinning,
textured, lighted cube—is taken from our webgl tutorial series; namely, the penultimate article in the series, covering lighting in webgl. while reading this article and the accompanying source code, it's helpful to keep in mind that the display for a 3d headset is a single screen, divided in half. the left half of the screen is seen only by the left eye, while the right half is only seen by the ri...
...nd down. if false, only xr device changes to the view are permitted. enableforcepolyfill if this boolean is true, the example will attempt to use the webxr polyfill even if the browser actually has support for webxr. if false, the polyfill is only used if the browser doesn't implement navigator.xr. session_type the type of xr session to create: inline for an inline session presented in the con
text of the document and immersive-vr to present the scene to an immersive vr headset. mouse_speed a multiplier used to scale the inputs from the mouse used for pitch and yaw control. move_distance the distance to move in response to any of the keys used to move the viewer through the scene. note: this example always displays what it renders on the screen, even if using immersive-vr mode. this ...
... const viewerstartposition = vec3.fromvalues(0, 0, -10); const viewerstartorientation = vec3.fromvalues(0, 0, 1.0); const cubeorientation = vec3.create(); const cubematrix = mat4.create(); const mousematrix = mat4.create(); cons...
...And 25 more matches
Application Translation with Mercurial
te consisting of browser, mail and chat client and more. lightning and cal-* denote branches of lightning, the calendar add-on for thunderbird. the localization of lightning now happens on thunderbird's tb-* branches, the cal-* branches have been retired. in this example, we assume firefox for desktop shall be localized and that the localization branch is aurora. scroll to the fx_aurora
text. ...
... browser, mail and chat client and more. lightning and cal-* denote branches of lightning, the calendar add-on for thunderbird. the localization of lightning now happens on thunderbird's tb-* branches, the cal-* branches have been retired. in this example, we assume firefox for desktop shall be localized and that the localization branch is aurora. scroll to the fx_aurora
text. read the
text next to it. ...
... required tools build pre-requisites first, get the required programs to compile mozilla applications like firefox and thunderbird from build instructions. this is only necessary once. ...
...And 24 more matches
EncDecMAC using token object - sample 3
form is subject to the terms of the mozilla public * license, v. 2.0. if a copy of the mpl was not distributed with this * file, you can obtain one at http://mozilla.org/mpl/2.0/. ...
...te(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11con
text *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11con
text *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : digestop()\n"); } return rv; } ...
...(rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11con
text *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : digestop()\n"); } return rv; } /* * finalize macing */ secstatus macfinal(pk11con
text *ctx, unsigned char *mac, unsigned int *maclen, unsigned int maxlen) { secstatus rv = pk11_digestfinal(ctx, mac, maclen, maxlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestfinal()\n"); } return secsuccess; } /* * compute mac */ secstatus computemac(pk11con
text *ctxmac, unsigned char *p
text, unsigned int p
textlen, unsigned char *mac, unsigned int *maclen, unsig...
...And 24 more matches
Using the clipboard
this component implements the interface nsiclipboardhelper, which has a function copystring that can be used to copy a string. ...
... data to put on the clipboard. the second is the clipboard object. the third is an object which is used to transfer the data from the first object to the clipboard. the clipboard model in mozilla requires you to perform the following steps to copy data: create an xpcom wrapper for the data which you want to put on the clipboard. this is needed because you can put anything on the clipboard from
text to images. create a transferring object. this object can be the component @mozilla.org/widget/transferable;1 which implements the interface nsitransferable. initialize the transferring object with the nsiloadcon
text obtained from the window that is the source of the clipboard data. this ensures that if the copied data comes from a window in private browsing mode, the clipboard will be cleared w...
... tell the transferring object about the type of data being copied. tell the transferring object about the data to copy. create a clipboard object which refers to the system clipboard. tell the clipboard object to copy the data using the transferring object. ...
...And 24 more matches
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
the presence of whitespace in the dom can cause layout problems and make manipulation of the content tree difficult in unexpected ways, depending on where it is located. this article explores when difficulties can occur, and looks at what can be done to mitigate resulting problems. what is whitespace? whitespace is any string of
text composed only of spaces, tabs or line breaks (to be precise, crlf sequences, carriage returns or line feeds). these characters allow you to format your code in a way that will make it easily readable by yourself and other people. in fact, much of our source code is full of these whitespace characters, and we only tend to get rid of it in a production build step to reduce code download sizes. html largely ignores whitespace? in the case of html, whitespace is ...
... impact the layout of your page. creating space around and inside elements is the job of css. what does happen to whitespace? they don't just disappear, however. any whitespace characters that are outside of html elements in the original document are represented in the dom. this is needed internally so that the editor can preserve formatting of documents. this means that: there will be some
text nodes that contain only whitespace, and some
text nodes will have whitespace at the beginning or end. take the following document, for example: <!doctype html> <html> <head> <title>my document</title> </head> <body> <h1>header</h1> <p> paragraph </p> </body> </html> the dom tree for this looks like so: conserving whitespace characters in the dom is useful in many ways, but th...
...ome solutions, later on. how does css process whitespace? most whitespace characters are ignored, not all of them are. in the earlier example one of the spaces between "hello" and "world!" still exists when the page is rendered in a browser. there are rules in the browser engine that decide which whitespace characters are useful and which aren’t — these are specified at least in part in css
text module level 3, and especially the parts about the css white-space property and whitespace processing details, but we also offer an easier explanation below. let’s take another really simple example. to make it easier, we’ve illustrated all spaces with ◦, all tabs with ⇥ , and all line breaks with ⏎: this example: <h1>◦◦◦hello◦⏎ ⇥⇥⇥⇥<span>◦world!</span>⇥◦◦</...
...And 24 more matches
Useful string methods - Learn web development
prerequisites: basic computer literacy, a basic understanding of html and css, an understanding of what javascript is. ...
...all on the left return the result on the right? hint: in this case it is probably more useful to test whether the method call isn't equal to a certain result. ...
...appy christmas to all the family', 'you\'re all i want for christmas', 'get well soon']; for (let i = 0; i < greetings.length; i++) { let input = greetings[i]; // your conditional test needs to go inside the parentheses // in the line below, replacing what's currently there if (greetings[i]) { let listitem = document.createelement('li'); listitem.
textcontent = input; list.appendchild(listitem); } } </
textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y-label { margin: 0;
text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; backgrou...
...And 23 more matches
Encrypt Decrypt MAC Keys As Session Objects
of the mozilla public * license, v. 2.0. if a copy of the mpl was not distributed with this * file, you can obtain one at http://mozilla.org/mpl/2.0/. ...
....\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11con
text *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11con
text *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, ...
...ute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11con
text *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : digestop()\n"); } return rv; } /* * finalize macing */ secstatus macfinal(pk11con
text *ctx, unsigned char *mac, unsigned int *maclen, unsigned int maxlen) { secstatus rv = pk11_digestfinal(ctx, mac, maclen, maxlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestfinal()\n"); } return secsuccess; } /* * compute mac */ secstatus computemac(pk11con
text *ctxmac, unsigned char *p
text, unsigned int p
textlen, ...
...And 23 more matches
Encrypt and decrypt MAC using token
of the mozilla public * license, v. 2.0. if a copy of the mpl was not distributed with this * file, you can obtain one at http://mozilla.org/mpl/2.0/. ...
....\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11con
text *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11con
text *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, ...
...ute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11con
text *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : digestop()\n"); } return rv; } /* * finalize macing */ secstatus macfinal(pk11con
text *ctx, unsigned char *mac, unsigned int *maclen, unsigned int maxlen) { secstatus rv = pk11_digestfinal(ctx, mac, maclen, maxlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestfinal()\n"); } return secsuccess; } /* * compute mac */ secstatus computemac(pk11con
text *ctxmac, unsigned char *p
text, unsigned int p
textlen, ...
...And 23 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
rates how to encrypt and mac a file. ...
....\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11con
text *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11con
text *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, ...
...ute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11con
text *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : digestop()\n"); } return rv; } /* * finalize macing */ secstatus macfinal(pk11con
text *ctx, unsigned char *mac, unsigned int *maclen, unsigned int maxlen) { secstatus rv = pk11_digestfinal(ctx, mac, maclen, maxlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestfinal()\n"); } return secsuccess; } /* * compute mac */ secstatus computemac(pk11con
text *ctxmac, unsigned char *p
text, unsigned int p
textlen, ...
...And 23 more matches
nss tech note5
*/ /* turn the secitem into a key object */ pk11symkey* symkey = pk11_importsymkey(slot, ciphermech, pk11_originunwrap, cka_encrypt, &keyitem, null); if generating the key - see section generate a symmetric key <big>prepare the parameter for crypto con
text. iv is relevant only when using cbc mode of encryption. if not using cbc mode, just pass a null iv parm to pk11_paramfromiv function secitem ivitem; ivitem.data = /* ptr to an array of iv bytes */ ivitem.len = /* length of the array of iv bytes */ secitem *secparam = pk11_paramfromiv(ciphermech, &ivitem);</big> <big>now encrypt and decrypt using the key and parameter setup in ab...
...ryption. if not using cbc mode, just pass a null iv parm to pk11_paramfromiv function secitem ivitem; ivitem.data = /* ptr to an array of iv bytes */ ivitem.len = /* length of the array of iv bytes */ secitem *secparam = pk11_paramfromiv(ciphermech, &ivitem);</big> <big>now encrypt and decrypt using the key and parameter setup in above steps</big> create encryption con
text pk11con
text* enccon
text = pk11_createcon
textbysymkey(ciphermech, cka_encrypt or cka_decrypt, symkey, secparam); do the operation. if encrypting, outbuf len must be atleast (inbuflen + blocksize). if decrypti...
... cka_encrypt or cka_decrypt, symkey, secparam); do the operation. if encrypting, outbuf len must be atleast (inbuflen + blocksize). if decrypting, outbuflen must be atleast inbuflen. ...
...And 23 more matches
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
ar body = document.getelementsbytagname("body")[0]; // creates a <table> element and a <tbody> element var tbl = document.createelement("table"); var tblbody = document.createelement("tbody"); // creating all cells for (var i = 0; i < 2; i++) { // creates a table row var row = document.createelement("tr"); for (var j = 0; j < 2; j++) { // create a <td> element and a
text node, make the
text // node the contents of the <td>, and put the <td> at // the end of the table row var cell = document.createelement("td"); var cell
text = document.create
textnode("cell in row "+i+", column "+j); cell.appendchild(cell
text); row.appendchild(cell); } // add the row to the end of the table body tblbody.appendchild(row); } // pu...
...ndchild(cell
text); row.appendchild(cell); } // add the row to the end of the table body tblbody.appendchild(row); } // put the <tbody> in the <table> tbl.appendchild(tblbody); // appends <table> into <body> body.appendchild(tbl); // sets the border attribute of tbl to 2; tbl.setattribute("border", "2"); } note the order in which we created the elements and the
text node: first we created the <table> element. next, we created the <tbody> element, which is a child of the <table> element. next, we used a loop to create the <tr> elements, which are children of the <tbody> element. for each <tr> element, we used a loop to create the <td> elements, which are children of <tr> elements. ...
...ted the elements and the
text node: first we created the <table> element. next, we created the <tbody> element, which is a child of the <table> element. next, we used a loop to create the <tr> elements, which are children of the <tbody> element. for each <tr> element, we used a loop to create the <td> elements, which are children of <tr> elements. for each <td> element, we then created the
text node with the table cell's
text. ...
...And 23 more matches
Border-image generator - CSS: Cascading Style Sheets
id="border5"/> <img class="image" src="https://udn.realityripple.com/samples/fb/c0b285d3da.svg" data-stateid="border6"/> </div> </div> <div id="load-actions" class="group section"> <div id="toggle-gallery" data-action="hide"> </div> <div id="load-image" class="button"> upload image </div> <input id="remote-url" type="
text" placeholder="load an image from url"/> <div id="load-remote" class="button"> </div> </div> <div id="general-controls" class="group section"> <div class="name"> control box </div> <div class="separator"></div> <div class="property"> <div class="name">scale</div> <div class="ui-input-slider" data-topic...
...l:first-child { margin-left: 0; } /* all browsers except ie6 and lower */ /* * ui component */ .ui-input-slider { height: 20px; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider * { float: left; height: 100%; line-height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px;
text-align: center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px;
text-align: right;
text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; }...
... right;
text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0;
text-align: right;
text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px;
text-align: center; } .ui-input-slider-btn-set:hover { background-color: #379b4a; cursor: pointer; } /*************************************************************************************/ /***************...
...And 23 more matches
Accessibility API cross-reference
they also define a list of possible object states, such as focused, read-only, checked, etc. an interesting problem is that mozilla, safari/khtml, opera, staroffice and other apps are cross-platform, but there is currently no cross-platform accessibility api. ...
...echanisms used by current generation api's are also not cross-platform, although communication for some cross-platform accessibility api of the future could be done through sockets. these tables describe how various accessibility apis define possible roles of an object, and states. all accessibility apis to date define a list of possible object roles, or general types, such as button, menu item,
text, etc. they also define a list of possible object states, such as focused, read-only, checked, etc. this table is the start of a cross-reference, so we can spot the differences and similarities in the apis. aria is a standard developed as part of the web accessibility initiative, which uses markup syntax quite familiar to users of html, xml, sgml and others. the roles it specifies have already in...
...in tagged pdf n/a n/a expressed with aria-labelledby if visible on screen or aria-label otherwise <caption> (for tables), <figcaption> (for figures), and <label> with a for attribute (for input elements) a <toc> or <l> may contain a <caption> as its first item <caption> or <lbl> a cell in a table cell n/a table_ce...
...And 22 more matches
L20n Javascript API
l20n javascript api var ctx = l20n.getcon
text(); ctx.linkresource('./locales/strings.l20n'); ctx.requestlocales(); when you freeze the con
text by calling requestlocales, the resource files will be retrieved, parsed and compiled. you can listen to the ready event (emitted by the con
text instance when all the resources have been compiled) and use ctx.getsync and ctx.getentitysync to get translations synchronously. alternatively, you can register callbacks to execute when the con
text is ready (or when globals change and translations need to be updated) with ctx.localize. ...
...e when all the resources have been compiled) and use ctx.getsync and ctx.getentitysync to get translations synchronously. alternatively, you can register callbacks to execute when the con
text is ready (or when globals change and translations need to be updated) with ctx.localize. ctx.localize(['hello', 'new'], function(l10n) { var node = document.queryselector('[data-l10n-id=hello]'); node.
textcontent = l10n.entities.hello.value; node.classlist.remove('hidden'); }); ctx.registerlocales(defaultlocale: string?, availablelocales: array<string>?) register the default locale of the con
text instance, as well as all other locales available to the con
text instance before the language negotiation. locales are referenced by their bcp 47 language codes. ctx.registerlocales('en-us', ['ar', ...
...cales(defaultlocale: string?, availablelocales: array<string>?) register the default locale of the con
text instance, as well as all other locales available to the con
text instance before the language negotiation. locales are referenced by their bcp 47 language codes. ctx.registerlocales('en-us', ['ar', 'es-ar', 'es-es', 'en-us', 'fr', 'pl']); defaultlocale is the original language of the con
text instance and will be used as the last fallback locale if other locales are registered. if it is undefined, or if registerlocales hasn't been called at all, the con
text instance will create a special locale called i-default to be used as the default. availablelocales is an array of all locales available to the con
text instance. this array (with defaultlocale appended to it if it is not already pr...
...And 22 more matches
Drawing graphics - Learn web development
as, and further resources to allow you to learn more. prerequisites: javascript basics (see first steps, building blocks, javascript objects), the basics of client-side apis objective: to learn the basics of drawing on <canvas> elements using javascript. graphics on the web as we talked about in our html multimedia and embedding module, the web was originally just
text, which was very boring, so images were introduced — first via the <img> element and later via css properties such as background-image, and svg. this however was still not enough. while you could use css and javascript to animate (and otherwise manipulate) svg vector images — as they are represented by markup — there was still no way to do the same for bitmap images, and the tools available...
...vas. <canvas width="320" height="240"> <p>your browser doesn't support canvas. boo hoo!</p> </canvas> of course, the above message is really unhelpful! in a real example you'd want to relate the fallback content to the canvas content. for example, if you were rendering a constantly updating graph of stock prices, the fallback content could be a static image of the latest stock graph, with alt
text saying what the prices are in
text. creating and sizing our canvas let's start by creating our own canvas that we draw future experiments on to. first make a local copy of our 0_canvas_start.html file, and open it in your
text editor. add the following code into it, just below the opening <body> tag: <canvas class="mycanvas"> <p>add suitable fallback here.</p> </canvas> we h...
...tyle> the scrollbars should now be gone. note: you should generally set the size of the image using html attributes or dom properties, as explained above. you could use css, but the trouble then is that the sizing is done after the canvas has rendered, and just like any other image (the rendered canvas is just an image), the image could become pixellated/distorted. getting the canvas con
text and final setup we need to do one final thing before we can consider our canvas template finished. to draw onto the canvas we need to get a special reference to the drawing area called a con
text. this is done using the htmlcanvaselement.getcon
text() method, which for basic usage takes a single string as a parameter representing the type of con
text you want to retrieve. in this case we want a 2d...
...And 21 more matches
Enc Dec MAC Output Public Key as CSR
his * file, you can obtain one at http://mozilla.org/mpl/2.0/. ...
... int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_false, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11con
text *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11con
text *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, ...
...ute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11con
text *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : digestop()\n"); } return rv; } /* * finalize macing */ secstatus macfinal(pk11con
text *ctx, unsigned char *mac, unsigned int *maclen, unsigned int maxlen) { secstatus rv = pk11_digestfinal(ctx, mac, maclen, maxlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestfinal()\n"); } return secsuccess; } /* * compute mac */ secstatus computemac(pk11con
text *ctxmac, unsigned char *p
text, unsigned int p
textlen, ...
...And 21 more matches
JSAPI User Guide
rebuilt package. build it from source instead. your program will be easier to debug. c++ code accesses spidermonkey via the jsapi, by including the header "jsapi.h". an overview of jsapi functionality follows. for more details, see the jsapi reference. the spidermonkey universe in order to run any javascript code in spidermonkey, an application must have three key elements: a jsruntime, a jscon
text, and a global object. this section describes what these things are. the next section explains how to set them up, using jsapi functions. runtimes. a jsruntime, or runtime, is the space in which the javascript variables, objects, scripts, and con
texts used by your application are allocated. every jscon
text and every object in an application lives within a jsruntime. they cannot travel to other ru...
...up, using jsapi functions. runtimes. a jsruntime, or runtime, is the space in which the javascript variables, objects, scripts, and con
texts used by your application are allocated. every jscon
text and every object in an application lives within a jsruntime. they cannot travel to other runtimes or be shared across runtimes. you will need at least one jsruntime per thread that uses the jsapi. con
texts. a jscon
text, or con
text, is like a little machine that can do many things involving javascript code and objects. ...
... global objects. lastly, the global object contains all the classes, functions, and variables that are available for javascript code to use. ...
...And 21 more matches
Cognitive accessibility - Accessibility
ple may be conflicting. one way to handle this is to focus on cognitive skills. ...
...ills. ...
...tes must be perceivable, operable, understandable, and robust. to this end, they define 17 specific guidelines, of which six are especially relevant for cognitive accessibility. all of the following guidelines help more than just people with cognitive disabilities. for example, being able to extend the expiration time on an application requiring an authentication code sent to a mobile device via
text message helps with the following scenarios: people with attention or anxiety disorders. people who have a poor short-term memory, or who are multitasking. people who are less technologically literate. people who have poor wireless reception. people who have motor control issues. adaptability guideline 1.3 states "content should be adaptable." create content that can be presented in diff...
...And 21 more matches
Extensions - Archive of obsolete content
her extensions may be adding their own items into the same menus. because of this, the new item might not appear at the end of the menu but before a menuitem added by another extension, depending on the order in which the overlays are applied. as you cannot predict this order, you should not rely on any menuitems being in particular positions in the presence of other extensions. ...
...the same menus. because of this, the new item might not appear at the end of the menu but before a menuitem added by another extension, depending on the order in which the overlays are applied. as you cannot predict this order, you should not rely on any menuitems being in particular positions in the presence of other extensions. modifying the con
text menu an extension may wish to modify the con
text menu associated with the browser area. ...
...added by another extension, depending on the order in which the overlays are applied. as you cannot predict this order, you should not rely on any menuitems being in particular positions in the presence of other extensions. modifying the con
text menu an extension may wish to modify the con
text menu associated with the browser area. normally, this menu displays menu items specific to what was con
text clicked or focused. for instance, opening a con
text menu for a link displays items to open the link in a new window or tab and to save or bookmark the link. an extension may modify the con
text menu to show additional items that either appear always, or appear only when certain content is selected. in firefox, the browser area that displays web pages has only one con
text menu. instead of having s...
...And 20 more matches
Fetching data from the server - Learn web development
nt to update any part of the page, for example, to display a new set of products or load a new page, you've got to load the entire page again. this is extremely wasteful and results in a poor user experience, especially as pages get larger and more complex. enter ajax this led to the creation of technologies that allow web pages to request small chunks of data (such as html, xml, json, or plain
text) and display them only when needed, helping to solve the problem described above. this is achieved by using apis like xmlhttprequest or — more recently — the fetch api. these technologies allow web pages to directly handle making http requests for specific resources available on a server and formatting the resulting data as needed before it is displayed. note: in the early days, this gener...
...when they are first requested, meaning that on subsequent visits they use the local versions instead of downloading fresh copies when the page is first loaded. the content is only reloaded from the server when it has been updated. a basic ajax request let's look at how such a request is handled, using both xmlhttprequest and fetch. for these examples, we'll request data out of a few different
text files and use them to populate a content area. this series of files will act as our fake database; in a real application, we'd be more likely to use a server-side language like php, python, or node to request our data from a database. here, however, we want to keep it simple and concentrate on the client-side part of this. xmlhttprequest xmlhttprequest (which is frequently abbreviated to xhr) ...
... database. here, however, we want to keep it simple and concentrate on the client-side part of this. xmlhttprequest xmlhttprequest (which is frequently abbreviated to xhr) is a fairly old technology now — it was invented by microsoft in the late '90s, and has been standardized across browsers for quite a long time. to begin this example, make a local copy of ajax-start.html and the four
text files — verse1.txt, verse2.txt, verse3.txt, and verse4.txt — in a new directory on your computer. in this example, we will load a different verse of the poem (which you may well recognize) via xhr when it's selected in the drop-down menu. just inside the <script> element, add the following code. this stores a reference to the <select> and <pre> elements in constants and defines an oncha...
...And 20 more matches
nsIXPCScriptable
boolean to pr_true before making the call. implementations may skip writing to *_retval unless they want to return pr_false. js/src/xpconnect/idl/nsixpcscriptable.idlnot scriptable please add a summary to this article. ...
... js/src/xpconnect/idl/nsixpcscriptable.idlnot scriptable please add a summary to this article. ...
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void precreate(in nsisupports nativeobj, in jscon
textptr cx, in jsobjectptr globalobj, out jsobjectptr parentobj); void create(in nsixpconnectwrappednative wrapper, in jscon
textptr cx, in jsobjectptr obj); void postcreate(in nsixpconnectwrappednative wrapper, in jscon
textptr cx, in jsobjectptr obj); prbool addproperty(in nsixpconnectwrappednative wrapper, in jscon
textptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp); prbool delproperty(in nsixpconnectwrappednative wrapper, in jscon
textptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp); prbool getproperty(in nsixpconnectwrappednative wrapper, in jscon
textptr cx, in jsobjectptr obj, in jsval id, i...
...And 20 more matches
Box-shadow generator - CSS: Cascading Style Sheets
al, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .slidergroup * { float: left; height: 100%; line-height: 100%; } /* slider */ .ui-slider { height: 10px; width: 200px; margin: 4px 10px; display: block; border: 1px solid #999; border-radius: 3px; background: #eee; } .ui-slider:hover { cursor: pointer; } .ui-slider-name { width: 90px; padding: 0 10px 0 0;
text-align: right;
text-transform: lowercase; } .ui-slider-pointer { width: 13px; height: 13px; background-color: #eee; border: 1px solid #2c9fc9; border-radius: 3px; position: relative; top: -3px; left: 0%; } .ui-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 3px; color: #fff; font-weight: bold;
text-align: center; } .ui-slider-btn-set:hover { background-co...
...-color: #eee; border: 1px solid #2c9fc9; border-radius: 3px; position: relative; top: -3px; left: 0%; } .ui-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 3px; color: #fff; font-weight: bold;
text-align: center; } .ui-slider-btn-set:hover { background-color: #379b4a; cursor: pointer; } .ui-slider-input > input { margin: 0 10px; padding: 0; width: 50px;
text-align: center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } /* * ui button */ /* checkbox */ .ui-checkbox {
text-align: center; font-size: 16px; font-family: "segoe ui", arial, helvetica, sans-serif; line-height: 1.5em; color: #fff; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ui-check...
...x > input { display: none; } .ui-checkbox > label { font-size: 12px; padding: 0.333em 1.666em 0.5em; height: 1em; line-height: 1em; background-color: #888; background-image: url("https://mdn.mozillademos.org/files/5683/disabled.png"); background-position: center center; background-repeat: no-repeat; color: #fff; border-radius: 3px; font-weight: bold; float: left; } .ui-checkbox .
text { padding-left: 34px; background-position: center left 10px; } .ui-checkbox .left { padding-right: 34px; padding-left: 1.666em; background-position: center right 10px; } .ui-checkbox > label:hover { cursor: pointer; } .ui-checkbox > input:checked + label { background-image: url("https://mdn.mozillademos.org/files/5681/checked.png"); background-color: #379b4a; } /* * box shadow genera...
...And 20 more matches
Display a Popup - Archive of obsolete content
anel module. a panel's content is defined using html. you can run content scripts in the panel: although the script running in the panel can't directly access your main add-on code, you can exchange messages between the panel script and the add-on code. in this tutorial we'll create an add-on that adds an action button to the toolbar that displays a panel when clicked. ...
...pts in the panel: although the script running in the panel can't directly access your main add-on code, you can exchange messages between the panel script and the add-on code. in this tutorial we'll create an add-on that adds an action button to the toolbar that displays a panel when clicked. the panel just contains a <
textarea> element: when the user presses the return key, the contents of the <
textarea> is sent to the main add-on code. ...
...olbar that displays a panel when clicked. the panel just contains a <
textarea> element: when the user presses the return key, the contents of the <
textarea> is sent to the main add-on code. the main add-on code logs the message to the console. ...
...And 19 more matches
XUL accessibility guidelines - Archive of obsolete content
should be logical, generally left to right, top to bottom. navigation order may vary depending on the nature of the application or the reading direction of the language. ensure that tab order is logical and all interactive elements can be accessed simply without the use of a mouse. you should be able to perform all functionality either directly in the application or through menu items or the con
text menu. trees provide alternative functionality for inaccessible operations. the column picker and column headers in xul trees are not keyboard accessible, consistent with the standard tree behavior on most contemporary operating systems. it is therefore necessary to provide a keyboard accessible alternative for accessing this functionality. the firefox "bookmarks manager" provides an example ...
..., they are not operable with a keyboard. in the bookmark manager this functionality is available under the view menu which is accessible to a keyboard user. toolbarbuttons by default, toolbar buttons cannot receive focus with a keyboard. the recommended way of fixing this is that all functionality associated with a toolbar be duplicated elsewhere in the application, such as in a menu item or con
text menu. in cases where duplication of functionality is not possible (such as a window without a menu bar), toolbar buttons can be made focusable by adding the special css rule -moz-user-focus: normal. (firefox's "print preview" window uses this fallback technique.) this should only be used as a last resort, and it should be consistent throughout a window (that is either all toolbar buttons are tabb...
... learn more keyboard shortcuts and accesskeys mozilla keyboard planning faq and cross reference. an excellent guide for determining unused key combinations and cross platform issues. mozilla keyboard shortcuts. a full list of keyboard shortcuts for the various mozilla applications. mozilla's accesskey faq. a short reference for using the accesskey attribute. ...
...And 19 more matches
CSS and JavaScript accessibility best practices - Learn web development
ed heading elements to markup the content. by the same token, a heading loses its visual purpose if you style it so it doesn't look like a heading. the rule of thumb is that you can update the styling of a page feature to fit in your design, but don't change it so much that it no longer looks or behaves as expected. the following sections summarize the main html features to consider. ...
...eading loses its visual purpose if you style it so it doesn't look like a heading. the rule of thumb is that you can update the styling of a page feature to fit in your design, but don't change it so much that it no longer looks or behaves as expected. the following sections summarize the main html features to consider. "standard"
text content structure headings, paragraphs, lists — the core
text content of your page: <h1>heading</h1> <p>paragraph</p> <ul> <li>my list</li> <li>has two items.</li> </ul> some typical css might look like this: h1 { font-size: 5rem; } p, li { line-height: 1.5; font-size: 1.6rem; } you should: select sensible font sizes, line heights, letter spacing, etc. to make your
text logical, legible, and comfortable to read. make sure your headings ...
...h1>heading</h1> <p>paragraph</p> <ul> <li>my list</li> <li>has two items.</li> </ul> some typical css might look like this: h1 { font-size: 5rem; } p, li { line-height: 1.5; font-size: 1.6rem; } you should: select sensible font sizes, line heights, letter spacing, etc. to make your
text logical, legible, and comfortable to read. make sure your headings stand out from your body
text, typically big and bold like the default styling. your lists should look like lists. ...
...And 19 more matches
Styling links - Learn web development
objective: to learn how to style link states, and how to use links effectively in common ui features like navigation menus. let's look at some links we looked at how links are implemented in your html according to best practices in creating hyperlinks. ...
...yling links, it is important to understand how to make use of pseudo-classes to style link states effectively, and how to style links for use in common varied interface features such as navigation menus and tabs. we'll look at all these topics in this article. prerequisites: basic computer literacy, html basics (study introduction to html), css basics (study introduction to css), css
text and font fundamentals. objective: to learn how to style link states, and how to use links effectively in common ui features like navigation menus. let's look at some links we looked at how links are implemented in your html according to best practices in creating hyperlinks. in this article we'll build on this knowledge, showing you best practices for styling links. link stat...
...ed to by a keyboard user using the tab key or similar, or programmatically focused using htmlelement.focus()) — this is styled using the :focus pseudo class. active: a link when it is being activated (e.g. clicked on), styled using the :active pseudo class. default styles the following example illustrates what a link will behave like by default (the css is simply enlarging and centering the
text to make it stand out more.) <p><a href="#">a simple link</a></p> p { font-size: 2rem;
text-align: center; } note: all the links in the examples in this page are fake links — a # (hash, or pound sign) is put in place of the real url. this is because if the real links were included, clicking on them would break the examples (you'd end up with an error, or a page loaded in the embedded ...
...And 19 more matches
Arrays - Learn web development
at is created and given a value of 0 at the top of the code. inside the loop (below // number 4) we want you to add a line that adds the current item price to that total in each iteration of the loop, so that at the end of the code the correct total is printed onto the invoice. you might need an assignment operator to do this. we want you to change the line just below // number 5 so that the item
text variable is made equal to "current item name — $current item price", for example "shoes — $23.99" in each case, so the correct information for each item is printed on the invoice. this is just simple string concatenation, which should be familiar to you. playable code <h2>live output</h2> <div class="output" style="min-height: 150px;"> <ul> </ul> <p></p> </div> <h2>editable code</h2...
... case, so the correct information for each item is printed on the invoice. this is just simple string concatenation, which should be familiar to you. ...
...ht: 150px;"> <ul> </ul> <p></p> </div> <h2>editable code</h2> <p class="a11y-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <
textarea id="code" class="playable-code" style="height: 410px;width: 95%"> const list = document.queryselector('.output ul'); const totalbox = document.queryselector('.output p'); let total = 0; list.innerhtml = ''; totalbox.
textcontent = ''; // number 1 'underpants:6.99' 'socks:5.99' 't-shirt:14.99' 'trousers:31.99' 'shoes:23.99'; for (let i = 0; i <= 0; i++) { // number 2 // number 3 // number 4 // number 5 let item
text = 0; const listitem = document.createelement('li'); listitem.
textcontent = item
text; list.appendchild(lis...
...And 19 more matches
nsIPromptService
its methods should be used in privileged code instead of dom window.alert, window.confirm, and other similar functions. inherits from: nsisupports last changed in gecko 1.7.5 you can define access keys (or keyboard shortcuts) for buttons by including an ampersand ("&") in front of the character that should be the access key for that button. if you need to include an ampersand in the button's
text, use two of them, like this: "&&". note: some of these interface methods use out and inout parameters. in c++, out parameters are pointers. for javascript, they are extra work, as you can't use an out parameter directly. you need to wrap them in a temporary object, which can be either empty or have a value property set to the out parameter type. for more information on out parameters and javasc...
... and javascript refer to working with out parameters. implemented by: @mozilla.org/embedcomp/prompt-service;1. ...
...rompt-service;1. ...
...And 19 more matches
Perceivable - Accessibility
essibility guidelines (wcag) 2.0 and 2.1. perceivable states that users must be able to perceive it in some way, using one or more of their senses. note: to read the w3c definitions for perceivable and its guidelines and success criteria, see principle 1: perceivable - information and user interface components must be presentable to users in ways they can perceive. guideline 1.1 — providing
text alternatives for non-
text content the key here is that
text can be converted to other forms that people with disabilities can use. for example, it can be spoken by a screenreader, converted to large print, or represented on a braille display. non-
text content refers to multimedia such as images, audio, and video. success criteria how to conform to the criteria practical resource...
...ontent the key here is that
text can be converted to other forms that people with disabilities can use. for example, it can be spoken by a screenreader, converted to large print, or represented on a braille display. non-
text content refers to multimedia such as images, audio, and video. success criteria how to conform to the criteria practical resource 1.1.1 provide
text equivalents (a) all images that convey meaningful content should be given suitable alternative
text.
text alternatives. complex images or charts should have an accessible alternative provided, either on the same page or via a link. use a regular link instead of a longdesc attribute. ...
...a how to conform to the criteria practical resource 1.1.1 provide
text equivalents (a) all images that convey meaningful content should be given suitable alternative
text.
text alternatives. complex images or charts should have an accessible alternative provided, either on the same page or via a link. use a regular link instead of a longdesc attribute. a
text description may work, or an accessible data table (see html table advanced features and accessibility). see other
text alternative mechanisms for the argument against longdesc. ...
...And 19 more matches
Extra lives - Game development
should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson13.html. we can make the game enjoyable for longer by adding lives. in this article we'll implement a lives system, so that the player can continue playing until they have lost three lives, not just one. ...
...completing this lesson at gamedev-phaser-content-kit/demos/lesson13.html. we can make the game enjoyable for longer by adding lives. in this article we'll implement a lives system, so that the player can continue playing until they have lost three lives, not just one. ...
...on13.html. we can make the game enjoyable for longer by adding lives. in this article we'll implement a lives system, so that the player can continue playing until they have lost three lives, not just one. ...
...And 18 more matches
Drag Operations - Web APIs
the following describes the steps that occur during a drag and drop operation. the drag operations described in this document use the datatransfer interface. this document does not use the datatransferitem interface nor the datatransferitemlist interface. the draggable attribute in a web page, there are certain cases where a default drag behavior is used. these include
text selections, images, and links. when an image or link is dragged, the url of the image or link is set as the drag data, and a drag begins. for other elements, they must be part of a selection for a default drag to occur. to see this in effect, select an area of a webpage, and then click and hold the mouse and drag the selection. an os-specific rendering of the selection will appear and follow the mouse pointer as the dra...
... other elements are draggable by default. to make other html elements draggable, three things must be done: set the draggable="true" on the element that you wish to make draggable. add a listener for the dragstart event. set the drag data in the above listener. here is an example which allows a section of content to be dragged. <p draggable="true" ondragstart="event.datatransfer.setdata('
text/plain', 'this
text may be dragged')"> this
text <strong>may</strong> be dragged. </p> the draggable attribute is set to "true", so this element becomes draggable. if this attribute were omitted or set to "false", the element would not be dragged, and instead the
text would be selected. the draggable attribute may be used on any element, including images and links. however, for these last two...
...ribute were omitted or set to "false", the element would not be dragged, and instead the
text would be selected. the draggable attribute may be used on any element, including images and links. however, for these last two, the default value is true, so you would only use the draggable attribute with a value of false to disable dragging of these elements. note: when an element is made draggable,
text or other elements within it can no longer be selected in the normal way by clicking and dragging with the mouse. instead, the user must hold down the alt key to select
text with the mouse, or use the keyboard. starting a drag operation in this example, a listener is added for the dragstart event by using the ondragstart attribute. <p draggable="true" ondragstart="event.datatransfer.setdata('t...
...And 18 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
eb page using screen reader commands or browser commands, and the two pieces of software must remain in sync. some screen readers can even show information on a refreshable braille display. screen magnifiers will zoom to the focus, keeping it on the screen at all times, or even allow the user to enter a special low vision document reading mode, with a variety of features such as ticker mode where
text is streamed on a single line. finally, voice dictation software needs to know what's in the current document or ui in order to implement "say what you see" kinds of features. on microsoft windows, these kinds of assistive technology acquire this necessary information via a combination of hacks, msaa and proprietary doms. msaa is supposed to be the "right way" for accessibility aids to get inform...
...ion works with pretty much all applications. msaa provides information in several different ways: a com interface (iaccessible) that allows applications to expose the tree of data nodes that make up each window in the user interface currently being interacted with and custom interface extensions via interfaces via queryinterface and queryservice. this can provide assistive technology with con
textual information specific to your object model. for example, gecko support isimpledomnode to provide information about the dom node for an accessible object. a set of system messages that confer accessibility-related events such as focus changes, changes to document content and state changes in ui objects like checkboxes. to really learn about msaa, you need to download the entire msaa sdk. wit...
...a proprietary solution? msaa is by no means perfect, but it is the only thing that will make your custom ui elements work with most assistive technologies. try to be careful that at vendors do not lock you into a prioprietary solution that will work with only their products. related myth: msaa is not supported by at vendors reality: it's a standard, and it is supported by jaws, window-eyes, zoom
text, dragon and supernova/hal. there's currently nothing better. myth: msaa has no documentation reality: you're reading useful documentation right here. the docs on msdn are useful as well. mostly myth: msaa is too expensive to implement reality: *too* expensive is relative, and depends on how important accessibility is for your project. this document's deciding which msaa features to support se...
...And 18 more matches
Gecko info for Windows accessibility vendors
ocus changes must be tracked through msaa events, rather than dom events. xul: extensible user-interface language the xml-based language used by firefox and mozilla to develop the ui. similar to html in that it can be combined with css and javascript to make powerful applications. contains more desktop-style widgets than html and follows a box layout model, rather than being
text-flow based. ajax: asynchronous javascript and xml ajax is a method of building interactive web applications that process user requests, user actions immediately in real time, unlike an http request, during which users must wait for a whole page to reload or for a new page to load. data is therefore stored and retrieved dynamically much faster. roles, states and ev...
... by removing redundant words. for example, we may say event_alert instead of the full event_system_alert. msaa tree vs. dom tree - what's the relation? the msaa tree and the dom tree are parallel structures, although the msaa tree is a subset of the dom tree. queryservice() can be used to switch between the interfaces (iaccessible, isimpledomdocument, isimpledomnode and isimpledom
text). if there is no msaa node for a dom node, or vice-versa, queryservice() will return null. anything that is focusable or conveys important information about the structure of the document is exposed in the msaa tree of iaccessibles. windows applications based on the gecko layout engine gecko is a rendering engine that mozilla, netscape and other new browsers use. gecko can render a vari...
...tecture that we are adding accessibility to, in order to support basic accessibility in all applications that are based on it. embedded clients (support msaa) embedded clients use gecko only in the content window, at the moment for html and generic xml only. they typically use standard windows controls for their user interface -- the area outside of the client content window, plus the con
text menu. mfcembed testing client: this is a very simple package, great for testing basic html accessibility with your products and the gecko rendering engine. k-meleon: a light, ultra-fast and more advanced (fully configurable) gecko-based web browser available on the windows platform xul-based clients (support msaa) xul-based clients make full use of the gecko arch...
...And 17 more matches
ARIA annotations - Accessibility
abel. role="insertion" and role="deletion" — semantically denote html elements whose contents represent an insertion to or deletion from the overall document. these are semantically equivalent to the html <ins> and <del> elements. note that these aren’t part of the new aria annotations features, but they are of central relevance. role="mark" — semantically denotes html elements containing
text that is marked/highlighted for reference purposes. this is semantically equivalent to the html <mark> element. role="suggestion" — semantically denotes a single proposed change to an editable document. this should be used on an element that wraps a single insertion and deletion (see role="insertion" and role="deletion" above). role="comment" — semantically denotes a comment/reaction to some...
...ous comment. to provide a semantic association between the document content being annotated and the annotation, an aria-details attribute can be set on the annotated content that contains the id of the annotated element. aria-details has been updated so that it can support multiple ids — this makes sense, for example you can easily envisage having multiple comments relating to the same bit of
text. aria annotation roles and objects are currently exposed in: firefox from version 75 onwards, on windows and linux (on macos, we are first waiting for apple to define what safari will expose as apple-dialect attributes to voiceover, and will then follow suit.) chrome from version 81 onwards, currently behind the #enable-accessibility-expose-aria-annotations flag (go to chrome://flags to enab...
...’t be able to use any of these yet, as screenreader support is currently not there. for the moment, you can see the annotations data being exposed with tools like firefox accessibility inspector. the annotations should just work once screenreader support is added. associating annotated elements with their details there are a number of different ways in which you can associate ui features with
text labels or descriptions for accessibility purposes. it is useful to know when to use each. you’ll see examples of most of these later on in the article, but briefly: aria-label="" can be set on an element to provide a brief descriptive label when it isn't appropriate to have the label actually appearing in the ui, for example a search input in a horizontal nav bar. aria-labelledby="" can be ...
...And 17 more matches
Color picker tool - CSS: Cascading Style Sheets
picker { width: 2px; height: 100%; border: 1px solid #777; background-color: #fff; position: relative; top: -1px; } /* input hsv and rgb */ .ui-color-picker .info { width: 200px; margin: 5px; float: left; } .ui-color-picker .info * { float: left; } .ui-color-picker .input { width: 64px; margin: 5px 2px; float: left; } .ui-color-picker .input .name { height: 20px; width: 30px;
text-align: center; font-size: 14px; line-height: 18px; float: left; } .ui-color-picker .input input { width: 30px; height: 18px; margin: 0; padding: 0; border: 1px solid #ddd;
text-align: center; float: right; -moz-user-select:
text; -webkit-user-select:
text; -ms-user-select:
text; } .ui-color-picker .input[data-topic="lightness"] { display: none; } .ui-color-picker[data-mode='hsl'...
...lor-picker .switch_mode:hover { background-color: #ccc; cursor: pointer; } /* * ui component */ .ui-input-slider { height: 20px; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider * { float: left; height: 100%; line-height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px;
text-align: center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px;
text-align: right;
text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; }...
... right;
text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0;
text-align: right;
text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px;
text-align: center; } .ui-input-slider-btn-set:hover { background-color: #379b4a; cursor: pointer; } /* * color picker tool */ body { max-width: 1000px; margin: 0 auto; font-family: "segoe ui", aria...
...And 17 more matches
Event reference
css transition has begun running (fired before any delay starts). ...
... reset the reset button is pressed submit the submit button is pressed printing events event name fired when beforeprint the print dialog is opened afterprint the print dialog is closed
text composition events event name fired when compositionstart the composition of a passage of
text is prepared (similar to keydown for a keyboard input, but works with other inputs such as speech recognition). compositionupdate a character is added to a passage of
text being composed. compositionend the composition of a passage of
text has been completed or canceled. view events event name fired when fullscreenchange an element wa...
...ressed position (fired continuously). keyup any key is released mouse events event name fired when auxclick a pointing device button (any non-primary button) has been pressed and released on an element. click a pointing device button (any button; soon to be primary button only) has been pressed and released on an element. con
textmenu the right button of the mouse is clicked (before the con
text menu is displayed). dblclick a pointing device button is clicked twice on an element. mousedown a pointing device button is pressed on an element. mouseenter a pointing device is moved onto the element that has the listener attached. mouseleave a pointing device is moved off the ele...
...And 17 more matches
Adding captions and subtitles to HTML5 video - Developer guides
rt. captions versus subtitles captions and subtitles are not the same thing: they have significantly different audiences, and convey different information, and it is recommended that you read up on the differences if you are not sure what they are. they are however implemented in the same way technically, so the material in this article will apply to both. for this article we will refer to the
text tracks displayed as subtitles, as their content is aimed at hearing people who have difficulty understanding the language of the film, rather than deaf or hard-of-hearing people. the <track> element html5 allows us to specify subtitles for a video using the <track> element. the various attributes of this element allow us to specify such things as the type of content that we're adding, the langu...
...nt is aimed at hearing people who have difficulty understanding the language of the film, rather than deaf or hard-of-hearing people. the <track> element html5 allows us to specify subtitles for a video using the <track> element. the various attributes of this element allow us to specify such things as the type of content that we're adding, the language it's in, and of course a reference to the
text file that contains the actual subtitle information. webvtt the files that contain the actual subtitle data are simple
text files that follow a specified format, in this case the web video
text tracks (webvtt) format. the webvtt specification is still being worked on, but major parts of it are stable so we can use it today. video providers (such as the blender foundation) provide captions and s...
...these can be easily converted to webvtt using an online converter such as srt2vtt. ...
...And 17 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
pplications like firefox and thunderbird, and extensions for them, but other web browsers based on firefox or the gecko engine, and even web-based content also used xul. for example, there is the mozilla amazon browser, which helps with shopping at amazon, and the presentation method in xul, a tool for writing and displaying presentations to try out the code samples in this chapter, save them as
text files with .xul extensions and drag and drop them into the firefox browser window. fixme: explain how setting this option and use next listings if we want to run firefox displaying none of its gui and only the contents of a certain xul file, we can launch firefox and set the option: -chrome file_url.xul another way, as shown in listing 1, is to use the window.opendialog() method, which can be ...
...width: 10em;"/> listing 7: setting the size of a button using css markup hidden and collapsed the hidden and collapsed attributes act as switches to turn off the display of elements. setting hidden="true" disables display of that element. this has the same effect as setting display: none in css. you would use this to set a hidden or absent state, for example items that aren't displayed in con
textual menus. setting collapsed="true" sets an element's height and width to 0, but the element is treated as being present. this is equivalent to setting visibility: collapse in css. use this to "roll up" sidebars that aren't currently in use. disabled while not appropriate for all elements, you can use the disabled attribute to temporarily disable input to an element that is normally operable by...
... disabled="false" in xul can have unintended consequences. this is because there may be cases where a script or css rule will be written in such a way that they treat the value as true unconditionally if any value has been set. so when changing the attribute’s value using a dom function for example, do not use setattribute('disabled', false) — instead, use removeattribute('disabled'). tooltip
text use the tooltip
text attribute to display a brief explanatory tooltip above the element. the
text entered as the value for this attribute is what gets displayed as the tooltip. persist the persist attribute is an easy way to record and store a xul element’s state after it has been changed by a user operation. enter the names of the other attributes whose values you want to store as a space-de...
...And 16 more matches
Appendix D: Loading Scripts - Archive of obsolete content
his module only exists on firefox 4 and other gecko 2-based platforms, the services in question will have to be manually loaded on other platforms. <script> tags xul script tags are traditionally the primary means of loading scripts for extension developers. these tags are generally inserted into xul overlay files or other xul documents, after which they are automatically loaded into the con
text of the xul window in question and executed immediately and synchronously. advantages familiarity: these tags are very similar to the html script tags familiar to most web developers. simplicity: the simple, declarative nature of these tags make them easy to find and understand at a glance. speed: script tags may or may not be loaded from pre-compiled bytecode in the fastload cache (gecko 1.
...g based sandboxes. examples the following code will execute a simple script in a sandbox with the privilege level of the current content page. the globals of the current content window will be available in the scripts global scope. in stack traces, the script will appear to have been loaded from the file "zz-9://plural/zed/alpha", line 42. // use the current content window as the execution con
text. ...
...bals of the current content window will be available in the scripts global scope. in stack traces, the script will appear to have been loaded from the file "zz-9://plural/zed/alpha", line 42. // use the current content window as the execution con
text. // to make properties defined by scripts executing on the page // available to your sandbox script, use content.wrappedjsobject // instead. let con
text = content; // create the sandbox let sandbox = components.utils.sandbox(con
text, { // make properties of the con
text object available via the // script's global scope sandboxprototype: con
text, // wrap objects retrieved from the sandbox in xpcnativewrappers. // this is the default action. wantxrays: true }); // the script that will be executed: let script = string(); //...
...And 16 more matches
Using the Editor from XUL - Archive of obsolete content
ind this element with document.getelementbyid("content-frame"), and to style it from css. editoronload() is called. it does some getting of window.arguments (which is a way callers can pass parameters to new windows -- we use this to get the url to be loaded), then it calls editorstartup(), where the real work happens. it passes two parameters; the first indicates whether we want a plain
text or html editor (pass
text or html here), and the second is the <iframe> element on which we wish to create the editor. we could either pass document.getelementbyid("content-frame") or window._content here. the important stuff in editorstartup() begins where we get or create an editorshell. the <editor> tag actually creates an nseditorboxobject behind the scenes. the nseditorboxobject create...
...t creates an nseditorshell, and holds the owning reference to it. through the magic of xbl, the xul bindings, and the nsieditorboxobject interface, you can get a javascript reference to the editorshell from the editor element with element.editorshell. we thus have an editorshell to play with. ...
...ote about editor initialization is that we pass into the editor's init() method an nsicontent* that corresponds to the root of the content tree that the editor is allowed to work with. when initializing the editor from the nseditorshell, we pass null here (which tells the editor that it can edit everything under the <body> of the document). this parameter is more important when the editor is in a
text widget, where it points to the the subtree of the parent document that corresponds to widget content. editor teardown window destruction, and hence editor teardown is initiated in two ways, listed below. in both cases, the editorcanclose() method is the javascript is called, which causes the nseditorshell to display a dialog asking the user if they want to save the document, throw away their...
...And 16 more matches
Basic native form controls - Learn web development
ailable in all browsers since the early days of the web. prerequisites: basic computer literacy, and a basic understanding of html. objective: to understand in detail the original set of native form widgets available in browsers for collecting data, and how to implement them using html. you've already met some form elements, including <form>, <fieldset>, <legend>, <
textarea>, <label>, <button>, and <input>. this article covers: the common input types button, checkbox, file, hidden, image, password, radio, reset, submit, and
text. some of the attributes that are common to all form controls. note: the features discussed in this article are supported in all browsers, which is not the case for all form controls. we cover newer form controls added in html5 in ...
...f the attributes that are common to all form controls. note: the features discussed in this article are supported in all browsers, which is not the case for all form controls. we cover newer form controls added in html5 in the next two articles. if you want a more advanced reference, you should consult our html forms element reference, and in particular our extensive <input> types reference. ...
...at are common to all form controls. note: the features discussed in this article are supported in all browsers, which is not the case for all form controls. we cover newer form controls added in html5 in the next two articles. if you want a more advanced reference, you should consult our html forms element reference, and in particular our extensive <input> types reference. ...
...And 16 more matches
Applying styles and colors - Web APIs
« previousnext » in the chapter about drawing shapes, we used only the default line and fill styles. here we will explore the canvas options we have at our disposal to make our drawings a little more attractive. you will learn how to add different colors, line styles, gradients, patterns and shadows to your drawings. colors up until now we have only seen methods of the drawing con
text. if we want to apply colors to a shape, there are two important properties we can use: fillstyle and strokestyle. fillstyle = color sets the style used when filling shapes. strokestyle = color sets the style for shapes' outlines. color is a string representing a css <color>, a gradient object, or a pattern object. we'll look at gradient and pattern objects later. by default, the stroke an...
... we use the two variables i and j to generate a unique rgb color for each square, and only modify the red and green values. the blue channel has a fixed value. by modifying the channels, you can generate all kinds of palettes. by increasing the steps, you can achieve something that looks like the color palettes photoshop uses. ...
... <canvas id="canvas" width="150" height="150"></canvas> draw(); the result looks like this: screenshotlive sample a strokestyle example this example is similar to the one above, but uses the strokestyle property to change the colors of the shapes' outlines. we use the arc() method to draw circles instead of squares. ...
...And 16 more matches
Node - Web APIs
those object types to be used similarly and often interchangeably. as an abstract class, there is no such thing as a plain node object. all objects that implement node functionality are based on one of its subclasses. most notable are document, element, and documentfragment. in addition, every kind of dom node is represented by an interface based on node. these include attr, characterdata (which
text, comment, and cdatasection are all based on), processinginstruction, documenttype, notation, entity, and entityreference. in some cases, a particular feature of the base node interface may not apply to one of its child interfaces; in that case, the inheriting node may return null or throw an exception, depending on circumstances. for example, attempting to add children to a node type that cannot...
...lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties in addition to the properties below, node inherits properties from its parent, eventtarget. node.baseuriread only returns a domstring represe...
...And 16 more matches
Closures - JavaScript
to do this are particularly common on the web. much of the code written in front-end javascript is event-based. you define some behavior, and then attach it to an event that is triggered by the user (such as a click or a keypress). the code is attached as a callback (a single function that is executed in response to the event). ...
...suppose we want to add buttons to a page to adjust the
text size. one way of doing this is to specify the font-size of the body element (in pixels), and then set the size of the other elements on the page (such as headers) using the relative em unit: body { font-family: helvetica, arial, sans-serif; font-size: 12px; } h1 { font-size: 1.5em; } h2 { font-size: 1.2em; } such interactive
text size buttons can change the font-size property of the body element, and the adjustments are picked up by other elements on the page thanks to the relative units. here's the javascript: function makesizer(size) { return function() { document.body.style.fontsize = size + 'px'; }; } var size12 = makesizer(12); var size14 = makesizer(14); var size16 = makesizer(16); size12, size14, and s...
...ty of the body element, and the adjustments are picked up by other elements on the page thanks to the relative units. here's the javascript: function makesizer(size) { return function() { document.body.style.fontsize = size + 'px'; }; } var size12 = makesizer(12); var size14 = makesizer(14); var size16 = makesizer(16); size12, size14, and size16 are now functions that resize the body
text to 12, 14, and 16 pixels, respectively. you can attach them to buttons (in this case hyperlinks) as demonstrated in the following code example. document.getelementbyid('size-12').onclick = size12; document.getelementbyid('size-14').onclick = size14; document.getelementbyid('size-16').onclick = size16; <a href="#" id="size-12">12</a> <a href="#" id="size-14">14</a> <a href="#" id="size-16">16</...
...And 16 more matches
Canvas code snippets - Archive of obsolete content
s topic page. code usable from web content getting the number of pixels of a certain color in a canvas the following function will return the number of pixels in a canvas that have the rgb color of r, g and b. this can be very useful to compare for example if a user has painted over another area as explained in this blog post. ...
... + 1] === g && pixels.data[i + 2] === b) { amount++; } } return amount; }; getting the color of a pixel in a canvas this following snippet returns an object with the rgba values of the pixel at position x and y of the canvas. this can be used to determine if the mouse cursor is inside a certain shape or not. ...
...f the canvas. this can be used to determine if the mouse cursor is inside a certain shape or not. function getpixelcolour(canvas, x, y) { var cx = canvas.getcon
text('2d'); var pixel = cx.getimagedata(x, y, 1, 1); return { r: pixel.data[0], g: pixel.data[1], b: pixel.data[2], a: pixel.data[3] }; } chaining methods this class provides jquery-style chained access to 2d con
text methods and properties. ...
...And 15 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
e: for a similar tutorial that applies to seamonkey 2, firefox, thunderbird and sunbird, see: custom toolbar button earlier versions and other mozilla applications also support extensions, but some parts of this tutorial are not appropriate for them. required tools you will need two tools. ...
...rial that applies to seamonkey 2, firefox, thunderbird and sunbird, see: custom toolbar button earlier versions and other mozilla applications also support extensions, but some parts of this tutorial are not appropriate for them. required tools you will need two tools. your operating system normally provides them: a way to create and work with files and directories a
text editor for plain
text files character encoding some
text editors have a setting for character encoding. if your language uses only plain latin (ascii) characters, set your
text editor to use any encoding except unicode. if your language uses accents or other non-latin characters, set your
text editor to save files using the utf-8 encoding. to check your
text editor, create a plain
text file named test.txt. in the fil...
...optional tools you can optionally use any image editor to customize the images. you can optionally use a jar tool or zip tool to package your button as a cross-platform installable (xpi) for other people to install and use. ...
...And 15 more matches
Custom toolbar button - Archive of obsolete content
add the button. note: there is a similar tutorial for seamonkey 1.x on the page: custom toolbar button:seamonkey earlier versions and other mozilla applications also support extensions, but some parts of this tutorial are not appropriate for them. required tools you will need two tools. ...
...e: there is a similar tutorial for seamonkey 1.x on the page: custom toolbar button:seamonkey earlier versions and other mozilla applications also support extensions, but some parts of this tutorial are not appropriate for them. required tools you will need two tools. your operating system normally provides them: a way to create and work with files and directories a
text editor for plain
text files character encoding some
text editors have a setting for character encoding. if your language uses only plain latin (ascii) characters, set your
text editor to use any encoding except unicode. if your language uses accents or other non-latin characters, set your
text editor to save files using the utf-8 encoding. to check your
text editor, create a plain
text file named test.txt. in th...
... optional tools you can optionally use any image editor to customize the images. you can optionally use a jar tool or zip tool to package your button as a cross-platform installable (xpi) for other people to install and use. ...
...And 15 more matches
Focus and Selection - Archive of obsolete content
only one element per window has the focus at a time. the user can change the focus by clicking an element with the mouse or by pressing the tab key. when the tab key is pressed, the next element is given the focus. ...
...only one element per window has the focus at a time. the user can change the focus by clicking an element with the mouse or by pressing the tab key. when the tab key is pressed, the next element is given the focus. ...
...="button 3" tabindex="3"/> the focus event the focus event is used to respond when the focus is given to an element. the blur event is used to respond when the focus is removed from an element. you can respond to focus changes by adding an onfocus or onblur attribute on an element. they work just like their html counterparts. ...
...And 15 more matches
UI pseudo-classes - Learn web development
client-side form validation — but for now we'll keep things simple with regards to form validation, so it doesn't confuse things. styling inputs based on whether they are required or not one of the most basic concepts with regards to client-side form validation is whether a form input is required (it has to be filled in before the form can be submitted) or optional. ...
...n before the form can be submitted) or optional. <input>, <select>, and <
textarea> elements have a required attribute available which, when set, means that you have to fill in that control before the form will successfully submit. ...
...ble which, when set, means that you have to fill in that control before the form will successfully submit. for example: <form> <fieldset> <legend>feedback form</legend> <div> <label for="fname">first name: </label> <input id="fname" name="fname" type="
text" required> </div> <div> <label for="lname">last name: </label> <input id="lname" name="lname" type="
text" required> </div> <div> <label for="email">email address (include if you want a response): </label> <input id="email" name="email" type="email"> </div> <div><button>submit</button></div> </fieldset> </form> here, the first name and last name are required, but the email address is optional. you can match these two states using the :required and :optional pseudo-clas...
...And 15 more matches
Introduction to web APIs - Learn web development
rowsers — the most popular ones are canvas and webgl, which allow you to programmatically update the pixel data contained in an html <canvas> element to create 2d and 3d scenes. for example, you might draw shapes such as rectangles or circles, import an image onto the canvas, and apply a filter to it such as sepia or grayscale using the canvas api, or create a complex 3d scene with lighting and
textures using webgl. such apis are often combined with apis for creating animation loops (such as window.requestanimationframe()) and others to make constantly updating scenes like cartoons and games. audio and video apis like htmlmediaelement, the web audio api, and webrtc allow you to do really interesting things with multimedia such as creating custom ui controls for playing audio and video, disp...
...ing webgl. such apis are often combined with apis for creating animation loops (such as window.requestanimationframe()) and others to make constantly updating scenes like cartoons and games. audio and video apis like htmlmediaelement, the web audio api, and webrtc allow you to do really interesting things with multimedia such as creating custom ui controls for playing audio and video, displaying
text tracks like captions and subtitles along with your videos, grabbing video from your web camera to be manipulated via a canvas (see above) or displayed on someone else's computer in a web conference, or adding effects to audio tracks (such as gain, distortion, panning, etc). device apis are basically apis for manipulating and retrieving data from modern device hardware in a way that is useful for...
...properties), and the functionality the api makes available (contained in object methods). note: if you are not already familiar with how objects work, you should go back and work through our javascript objects module before continuing. let's return to the example of the web audio api — this is a fairly complex api, which consists of a number of objects. the most obvious ones are: audiocon
text, which represents an audio graph that can be used to manipulate audio playing inside the browser, and has a number of methods and properties available to manipulate that audio. mediaelementaudiosourcenode, which represents an <audio> element containing sound you want to play and manipulate inside the audio con
text. audiodestinationnode, which represents the destination of the audio, i.e. the de...
...And 15 more matches
What is JavaScript? - Learn web development
ors and fonts, and laying out our content in multiple columns. javascript is a scripting language that enables you to create dynamically updating content, control multimedia, animate images, and pretty much everything else. (okay, not everything, but it is amazing what you can achieve with a few lines of javascript code.) the three layers build on top of one another nicely. ...
...g what you can achieve with a few lines of javascript code.) the three layers build on top of one another nicely. let's take a simple
text label as an example. ...
... few lines of javascript code.) the three layers build on top of one another nicely. let's take a simple
text label as an example. ...
...And 15 more matches
How to embed the JavaScript engine
ect. */ static jsclass global_class = { "global", jsclass_global_flags, js_propertystub, js_deletepropertystub, js_propertystub, js_strictpropertystub, js_enumeratestub, js_resolvestub, js_convertstub, }; int main(int argc, const char *argv[]) { jsruntime *rt = js_newruntime(8l * 1024 * 1024, js_use_helper_threads); if (!rt) return 1; jscon
text *cx = js_newcon
text(rt, 8192); if (!cx) return 1; { // scope for our various stack objects (jsautorequest, rootedobject), so they all go // out of scope before we js_destroycon
text. jsautorequest ar(cx); // in practice, you would want to exit this any // time you're spinning the event loop js::rootedobject global(cx, js_newglobalobj...
...*/ static jsclass global_class = { "global", jsclass_global_flags, js_propertystub, js_deletepropertystub, js_propertystub, js_strict...
... jsautorequest ar(cx); // in practice, you would want to exit this any // time you're spinning the event loop js::rootedobject global(cx, js_newglobalobj...
...And 15 more matches
JSAPI reference
times that roughly, but not really, corresponded to firefox releases. in the fall of 2012, the spidermonkey team decided to align releases with those of firefox. the reference applies this versioning scheme retroactively starting with firefox 5. firefox 4 is the last release that has a corresponding spidermonkey release with the old scheme, where the jsapi has the version 1.8.5. ...
...th firefox 5. firefox 4 is the last release that has a corresponding spidermonkey release with the old scheme, where the jsapi has the version 1.8.5. ...
...with the old scheme, where the jsapi has the version 1.8.5. ...
...And 15 more matches
Recommended Drag Types - Web APIs
the html drag and drop api supports dragging various types of data, including plain
text, urls, html code, files, etc. the document describes best practices for common draggable data types. caution: all methods and properties in this document with a moz prefix, such as mozsetdataat(), will only work with gecko-based browsers. dragging
text for dragging
text, use the
text/plain type. the second data parameter should be the dragged string. for example: event.datatransfer.setdata("
text/plain", "this is
text to drag"); dragging
text in
textboxes and selections on web pages is done automatically by the browser, so you do not need to handle it yourself. ...
...ecko-based browsers. dragging
text for dragging
text, use the
text/plain type. the second data parameter should be the dragged string. for example: event.datatransfer.setdata("
text/plain", "this is
text to drag"); dragging
text in
textboxes and selections on web pages is done automatically by the browser, so you do not need to handle it yourself. it is recommended to always add data of the
text/plain type as a fallback for applications or drop targets that do not support other types, unless there is no logical
text alternative. always add this
text/plain type last, as it is the least specific and shouldn’t be preferred. note: in older code, you may find
text/unicode or the
text types. these are equivalent to
text/plain, and will store and retrieve plain
text data. dragging links dr...
...targets that do not support other types, unless there is no logical
text alternative. always add this
text/plain type last, as it is the least specific and shouldn’t be preferred. note: in older code, you may find
text/unicode or the
text types. these are equivalent to
text/plain, and will store and retrieve plain
text data. dragging links dragged hyperlinks should include data of two types:
text/uri-list, and
text/plain. both types should use the link’s url for their data. for example: var dt = event.datatransfer; dt.setdata("
text/uri-list", "https://www.mozilla.org"); dt.setdata("
text/plain", "https://www.mozilla.org"); as usual, set the
text/plain type last, as a fallback for the
text/uri-list type. note: the url type is uri-list with an i, not an l. to drag multiple links, sepa...
...And 15 more matches
Using the Web Audio API - Web APIs
support for most features of the web audio api. there are a lot of features of the api, so for more exact information, you'll have to check the browser compatibility tables at the bottom of each reference page. audio graphs everything within the web audio api is based around the concept of an audio graph, which is made up of nodes. the web audio api handles audio operations inside an audio con
text, and has been designed to allow modular routing. basic audio operations are performed with audio nodes, which are linked together to form an audio routing graph. you have input nodes, which are the source of the sounds you are manipulating, modification nodes that change those sounds as desired, and output nodes (destinations), which allow you to save or hear those sounds. several audio sources ...
...ns are performed with audio nodes, which are linked together to form an audio routing graph. you have input nodes, which are the source of the sounds you are manipulating, modification nodes that change those sounds as desired, and output nodes (destinations), which allow you to save or hear those sounds. several audio sources with different channel layouts are supported, even within a single con
text. ...
...odes, which are the source of the sounds you are manipulating, modification nodes that change those sounds as desired, and output nodes (destinations), which allow you to save or hear those sounds. several audio sources with different channel layouts are supported, even within a single con
text. because of this modular design, you can create complex audio functions with dynamic effects. audio con
text to be able to do anything with the web audio api, we need to create an instance of the audio con
text. ...
...And 15 more matches
MIME types (IANA media types) - HTTP
es will not work correctly, and downloaded files may be mishandled. structure of a mime type the simplest mime type consists of a type and a subtype; these are each strings which, when concatenated with a slash (/) between them, comprise a mime type. no whitespace is allowed in a mime type: type/subtype the type represents the general category into which the data type falls, such as video or
text. the subtype identifies the exact kind of data of the specified type the mime type represents. for example, for the mime type
text, the subtype might be plain (plain
text), html (html source code), or calendar (for icalendar/.ics) files. each type has its own set of possible subtypes, and a mime type always has both a type and a subtype, never just one or the other. an optional parameter can be...
...me type
text, the subtype might be plain (plain
text), html (html source code), or calendar (for icalendar/.ics) files. each type has its own set of possible subtypes, and a mime type always has both a type and a subtype, never just one or the other. an optional parameter can be added to provide additional details: type/subtype;parameter=value for example, for any mime type whose main type is
text, the optional charset parameter can be used to specify the character set used for the characters in the data. if no charset is specified, the default is ascii (us-ascii) unless overridden by the user agent's settings. to specify a utf-8
text file, the mime type
text/plain;charset=utf-8 is used. mime types are case-insensitive but are traditionally written in lowercase, with the exception of para...
...a multipart type is one which represents a document that's comprised of multiple component parts, each of which may have its own individual mime type; or, a multipart type may encapsulate multiple files being sent together in one transaction. for example, multipart mime types are used when attaching multiple files to an email. ...
...And 15 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
event handler to the menu item that will open the window (listing 4). fixme: listing 4: event handler clock handler create the window that displays the clock (listing 5) and its controller (listing 6). we’ve already covered the dialog element in chapter 3. in this case, we only want to display an ok button, so we set the buttons attribute to accept. within the window are a label element and
textbox element, wrapped in a hbox element so that they are arranged horizontally. listing 5: content for clock.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/"?> <dialog id="clockdialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="clock" buttons="accept" onload="initclock();"> <script type="application/javascript" src="chrome://h...
...ent for clock.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/"?> <dialog id="clockdialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="clock" buttons="accept" onload="initclock();"> <script type="application/javascript" src="chrome://helloworld/content/clock.js"/> <hbox align="center"> <label value="current time:" /> <
textbox id="currenttime" /> </hbox> </dialog> listing 6: content for clock.js function initclock() { showcurrenttime(); window.setinterval(showcurrenttime, 1000); } function showcurrenttime() { var
textbox = document.getelementbyid("currenttime");
textbox.value = new date().tolocaletimestring();
textbox.select(); } operations check perform an operations check to make sure that your ...
... to register the chrome’s local package; helloworld is the package name, and locale/ and locale/fr-fr/ are the relative paths to the folders containing the source files; en-us and fr-fr indicate that those locale packages are for english and french, respectively. listing 7: additional content for chrome.manifest locale helloworld en-us locale/ locale helloworld fr-fr locale/fr-fr/ replacing
text with entity references in xul to make the extension support multiple languages, you will need to separate out all the hard-coded display
text in clock.xul and move it to a dtd file. the dtd file is located inside the locale package, and the correct file is picked automatically to match the user’s language preferences. edit clock.xul to match listing 8. add the doctype declaration that referenc...
...And 14 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
n idea of what kinds of functions embedded xpcom can handle, take a look at the api reference and the interface definitions from xpidl in the actual source code. note: interface definition language (idl) is a language for giving standard definitions of objects, methods, and so forth. the xpidl (cross-platform idl) used by mozilla is a partial extension to the corba idl. you can perform a full-
text search of the firefox source code in mozilla cross-reference using character strings, filenames, etc as search keys. if you’re having trouble with any of the details of the interface, it is helpful to search on the source code for usage examples within firefox. note: to look at the firefox 3 source code, choose "firefox 3" in the starting points list. for firefox 3.5 choose "mozilla 1.9.1." ...
...s is unneeded when the code is part of an extension, and will result in rejection if submitted to addons.mozilla.org. permit by dialog try adding the contents of listing 2 to test.xul, before the line var ioservice = …, and re-open it in firefox. you should now see the confirmation dialog shown in figure 1. pressing the "permit" button grants universalxpconnect permission in this execution con
text, making it possible to run xpconnect temporarily. an xpconnect-wrapped nsiioservice message should appear. if you check “apply these privileges in the future”, all local files will be able to run xpconnect without confirmation in the future. this is extremely dangerous, and you should never check this option. editing prefs.js opening test.xul will produce the dialog shown in figure 1. this...
...ocolhandler('file') .queryinterface(components.interfaces.nsifileprotocolhandler); var file = filehandler.getfilefromurlspec(url); var path = file.path; alert(path); // "c:\temp\temp.txt" binary file i/o use streams, as in java, for file i/o in xpcom. opening binary files listing 13 shows how to get a files contents as a bytestring (where 1 byte = an array of 8 bits). save a
text file containing only the ascii characters "xul" and put in the path to that file. running this code should produce the output "58 55 4c" so you can check your results. note: here, we assume that the file is named temp.txt and is saved in the temp folder on the c: drive. listing 13: reading the contents of a binary file file.initwithpath('c:\\temp\\temp.txt'); var filestream = components.classe...
...And 14 more matches
jspage - Archive of obsolete content
)?[b]:b):[];}var $time=date.now||function(){return +new date;};function $try(){for(var b=0,a=arguments.length;b<a; b++){try{return arguments[b]();}catch(c){}}return null;}function $type(a){if(a==undefined){return false;}if(a.$family){return(a.$family.name=="number"&&!isfinite(a))?false:a.$family.name; }if(a.nodename){switch(a.nodetype){case 1:return"element";case 3:return(/\s/).test(a.nodevalue)?"
textnode":"whitespace";}}else{if(typeof a.length=="number"){if(a.callee){return"arguments"; }else{if(a.item){return"collection";}}}}return typeof a;}function $unlink(c){var b;switch($type(c)){case"object":b={};for(var e in c){b[e]=$unlink(c[e]); }break;case"hash":b=new hash(c);break;case"array":b=[];for(var d=0,a=c.length;d<a;d++){b[d]=$unlink(c[d]);}break;default:return c;}return b;}var browser=$merg...
... navigator.plugins["shockwave flash"].description; },function(){return new activexobject("shockwaveflash.shockwaveflash").getvariable("$version");})||"0 r0").match(/\d+/g);return{version:parseint(a[0]||0+"."+a[1],10)||0,build:parseint(a[2],10)||0}; })();function $exec(b){if(!b){return b;}if(window.execscript){window.execscript(b);}else{var a=document.createelement("script");a.setattribute("type","
text/javascript"); a[(browser.engine.webkit&&browser.engine.version<420)?"inner
text":"
text"]=b;document.head.appendchild(a);document.head.removechild(a);}return b;}native.uid=1; var $uid=(browser.engine.trident)?function(a){return(a.uid||(a.uid=[native.uid++]))[0];}:function(a){return a.uid||(a.uid=native.uid++);};var window=new native({name:"window",legacy:(browser.engine.trident)?null:window.window,...
...ter:function(a,b){if(!a){return this;}return new elements(array.filter(this,(typeof a=="string")?function(c){return c.match(a); }:a,b));}});document.implement({newelement:function(a,b){if(browser.engine.trident&&b){["name","type","checked"].each(function(c){if(!b[c]){return;}a+=" "+c+'="'+b[c]+'"'; if(c!="checked"){delete b[c];}});a="<"+a+">";}return document.id(this.createelement(a)).set(b);},new
textnode:function(a){return this.create
textnode(a); },getdocument:function(){return this;},getwindow:function(){return this.window;},id:(function(){var a={string:function(d,c,b){d=b.getelementbyid(d);return(d)?a.element(d,c):null; },element:function(b,e){$uid(b);if(!e&&!b.$family&&!(/^object|embed$/i).test(b.tagname)){var c=element.prototype;for(var d in c){b[d]=c[d];}}return b;},object:function(c,d,b...
...And 14 more matches
Localization - Archive of obsolete content
xul and xml provide entities which are a convenient way of allowing localization. entities many applications are built such that translating the interface into a different language is as simple as possible. usually, a table of strings is created for each language. instead of hard-coding
text directly into an application, each piece of
text is only a reference into the string table. xml provides entities which can be used for a similar purpose. you should already be familiar with entities if you have written html. the codes < and > are examples of entities which can be used to place less than and greater than signs into the
text. xml has a syntax which allows you to declare custom entities. you can use these so that the entity is replaced with its value, which can be a string o...
...s entities which can be used for a similar purpose. you should already be familiar with entities if you have written html. the codes < and > are examples of entities which can be used to place less than and greater than signs into the
text. xml has a syntax which allows you to declare custom entities. you can use these so that the entity is replaced with its value, which can be a string of
text. entities may be used whenever
text occurs, including the values of attributes. the example below demonstrates the use of an entity in a button. <button label="&findlabel;"/> the
text that will appear on the label will be the value that the entity &findlabel; has. a file is created which contains the entity declarations for each supported language. in english, the &findlabel; entity will proba...
... dtd files entities are declared in document type definition (dtd) files. files of this type are normally used to declare the syntax and semantics of a particular xml file, but they also let you declare entities. in the mozilla chrome system, you will find dtd files located in the locales subdirectory. you would normally have one dtd file (with an extension .dtd) per xul file. ...
...And 14 more matches
Handling common accessibility problems - Learn web development
omation tools for finding accessibility issues. prerequisites: familiarity with the core html, css, and javascript languages; an idea of the high level principles of cross browser testing. objective: to be able to diagnose common accessibility problems, and use appropriate tools and techniques to fix them. what is accessibility? when we say accessibility in the con
text of web technology, most people immediately think of making sure websites/apps are usable by people with disabilities, for example: visually impaired people using screen readers or magnification/zoom to access
text people with motor function impairments using the keyboard (or other non-mouse features) to activate website functionality. people with hearing impairments relying on captions/subti...
...logy, most people immediately think of making sure websites/apps are usable by people with disabilities, for example: visually impaired people using screen readers or magnification/zoom to access
text people with motor function impairments using the keyboard (or other non-mouse features) to activate website functionality. people with hearing impairments relying on captions/subtitles or other
text alternatives for audio/video content. however, it is wrong to say that accessibility is just about disabilities. really, the aim of accessibility is to make your websites/apps usable by as many people in as many con
texts as possible, not just those users using high-powered desktop computers. some examples might include: users on mobile devices. users on alternative browsing devices such as ...
... but it is also a legal requirement in many parts of the world to make web content accessible to people with disabilities. read accessibility guidelines and the law for more information. html semantic html (where the elements are used for their correct purpose) is accessible right out of the box — such content is readable by sighted viewers (provided you don't do anything silly like make the
text way too small or hide it using css), but will also be usable by assistive technologies like screen readers (apps that literally read out a web page to their user), and confer other advantages too. semantic structure the most important quick win in semantic html is to use a structure of headings and paragraphs for your content; this is because screen reader users tend to use the headings of a do...
...And 14 more matches
OS.File for the main thread
o import os.file into your chrome code, add the following line at the start of your script: components.utils.import("resource://gre/modules/osfile.jsm") promises before using os.file from the main thread, you need some understanding of the promise library. see the promise object documentation for details. also, os.file plays very nicely with task.jsm. ...
...ad, you need some understanding of the promise library. see the promise object documentation for details. also, os.file plays very nicely with task.jsm. example: read the contents of a file as
text the following snippet opens a file "file.txt" and read its contents as a string, using the default encoding (utf-8). the content is read asynchronously. the result is a promise. let decoder = new
textdecoder(); // this decoder can be reused for several reads let promise = os.file.read("file.txt"); // read the complete file as an array promise = promise.then( function onsuccess(array) { return decoder.decode(array); // convert this array to a
text } ); this example requires firefox 18 or a more recent version. example: write a string to a file the following snippet w...
... // this decoder can be reused for several reads let promise = os.file.read("file.txt"); // read the complete file as an array promise = promise.then( function onsuccess(array) { return decoder.decode(array); // convert this array to a
text } ); this example requires firefox 18 or a more recent version. example: write a string to a file the following snippet writes the
text "this is some
text" to a string "file.txt", using the default encoding (utf-8). ...
...And 14 more matches
Index
sks for side effects). when using the asn.1 parser(s), a template definition is passed to the parser, which will analyze the asn.1 data stream accordingly. the templates are usually closely aligned to definitions found in rfc documents. a data block described as der is usually in asn.1 format. you must know which data you are expecting, and use the correct template for parsing, based on the con
text of your software's interaction. data described as pem is a base64 encoded presentation of der, usually wrapped between human readable begin/end lines. nss prefers the binary presentation, but is often capable to use base64 or ascii presentations, especially when importing data from files. a recent development adds support for loading external pem files that contain private keys, in a software lib...
... have an implementation to work with network proxies. if you must support proxies in your application, you are able to register your own implementation of an http request callback interface, and nss can use your application code that supports proxies. when using hashing, encryption, and decryption functions, it is possible to stream data (as opposed to operating on a large buffer). create a con
text handle while providing all the parameters required for the operation, then call an “update” function multiple times to pass subsets of the input to nss. the data will be processed and either returned directly or sent to a callback function registered in the con
text. when done, you call a finalization function that will flush out any pending data and free the resources. this line is a place...
... the default is the current directory. the nss database files must reside in the same directory. -i crl-import-file specify the file which contains the crl to import -f password-file specify a file that will automatically supply the password to include in a certificate or to access a certificate database. this is a plain-
text file containing one password. be sure to prevent unauthorized access to this file. -l algorithm-name specify a specific signature algorithm. list of possible algorithms: md2 | md4 | md5 | sha1 | sha256 | sha384 | sha512 -n nickname specify the nickname of a certificate or key to list, create, add to a database, modify, or validate. ...
...And 14 more matches
Drawing shapes with canvas - Web APIs
ner of the rectangle. width and height provide the rectangle's size. below is the draw() function from the previous page, but now it is making use of these three functions. rectangular shape example <html> <body onload="draw();"> <canvas id="canvas" width="150" height="150"></canvas> </body> </html> function draw() { var canvas = document.getelementbyid('canvas'); if (canvas.getcon
text) { var ctx = canvas.getcon
text('2d'); ctx.fillrect(25, 25, 100, 100); ctx.clearrect(45, 45, 60, 60); ctx.strokerect(50, 50, 50, 50); } } this example's output is shown below. screenshotlive sample the fillrect() function draws a large black square 100 pixels on each side. the clearrect() function then erases a 60x60 pixel square from the center, and then strokerect() is call...
...sed automatically, so you don't have to call closepath(). this is not the case when you call stroke(). drawing a triangle for example, the code for drawing a triangle would look something like this: <html> <body onload="draw();"> <canvas id="canvas" width="100" height="100"></canvas> </body> </html> function draw() { var canvas = document.getelementbyid('canvas'); if (canvas.getcon
text) { var ctx = canvas.getcon
text('2d'); ctx.beginpath(); ctx.moveto(75, 50); ctx.lineto(100, 75); ctx.lineto(100, 25); ctx.fill(); } } the result looks like this: screenshotlive sample moving the pen one very useful function, which doesn't actually draw anything but becomes part of the path list described above, is the moveto() function. you can probably best think o...
...also use moveto() to draw unconnected paths. take a look at the smiley face below. to try this for yourself, you can use the code snippet below. just paste it into the draw() function we saw earlier. ...
...And 14 more matches
Using Web Workers - Web APIs
javascript code that created it by posting messages to an event handler specified by that code (and vice versa). this article provides a detailed introduction to using web workers. web workers api a worker is an object created using a constructor (e.g. worker()) that runs a named javascript file — this file contains the code that will run in the worker thread; workers run in another global con
text that is different from the current window. thus, using the window shortcut to get the current global scope (instead of self) within a worker will return an error. the worker con
text is represented by a dedicatedworkerglobalscope object in the case of dedicated workers (standard workers that are utilized by a single script; shared workers use sharedworkerglobalscope). a dedicated worker is only a...
... to run some code whenever a message is received, with the message itself being available in the message event's data attribute. here we simply multiply together the two numbers then use postmessage() again, to post the result back to the main thread. back in the main thread, we use onmessage again, to respond to the message sent back from the worker: myworker.onmessage = function(e) { result.
textcontent = e.data; console.log('message received from worker'); } here we grab the message event data and set it as the
textcontent of the result paragraph, so the user can see the result of the calculation. note: notice that onmessage and postmessage() need to be hung off the worker object when used in the main script thread, but not when used in the worker. this is because, inside the worker,...
...nt script files: multiplying two numbers, or squaring a number. both scripts use the same worker to do the actual calculation required. here we'll concentrate on the differences between dedicated and shared workers. note that in this example we have two html pages, each with javascript applied that uses the same single worker file. note: if sharedworker can be accessed from several browsing con
texts, all those browsing con
texts must share the exact same origin (same protocol, host, and port). note: in firefox, shared workers cannot be shared between documents loaded in private and non-private windows (bug 1177621). spawning a shared worker spawning a new shared worker is pretty much the same as with a dedicated worker, but with a different constructor name (see index.html and index2.h...
...And 14 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
height: 100%; margin: 0 0 0 -2px; border: 1px solid #777; background-color: #fff; position: relative; top: -1px; } /* input hsv and rgb */ .ui-color-picker .info { width: 200px; margin: 5px; float: left; } .ui-color-picker .info * { float: left; } .ui-color-picker .input { width: 64px; margin: 5px 2px; float: left; } .ui-color-picker .input .name { height: 20px; width: 30px;
text-align: center; font-size: 14px; line-height: 18px; float: left; } .ui-color-picker .input input { width: 30px; height: 18px; margin: 0; padding: 0; border: 1px solid #ddd;
text-align: center; float: right; -moz-user-select:
text; -webkit-user-select:
text; -ms-user-select:
text; } .ui-color-picker .input[data-topic="lightness"] { display: none; } .ui-color-picker[data-mode='hsl'...
... all 0.5s; } .ui-color-picker .switch_mode:hover { background-color: #ccc; cursor: pointer; } /* * ui component */ .ui-input-slider { height: 20px; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider * { float: left; height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px;
text-align: center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px;
text-align: right;
text-transform: lowercase; line-height: inherit; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("arrows.png") center left no-repeat; } .ui-input-slide...
... { width: 90px; padding: 0px 10px 0px 0px;
text-align: right;
text-transform: lowercase; line-height: inherit; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0;
text-align: right;
text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px;
text-align: center; } .ui-input-slider-btn-set:hover { background-color: #379b4a; cursor: pointer; } /* * ui slider */ .ui-slider { height: 20px; margin: 10px 0; font-family: "segoe ui", arial, helve...
...And 14 more matches
Document - Web APIs
lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/document" target="_top"><rect x="266" y="1" width="80" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/document" target="_top"><rect x="266" y="1" width="80" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="306" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">document</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} the document interface describes the common properties and methods for any kind of document. depending on the document's type (e.g. html, xml, svg, …), a ...
...And 13 more matches
Web Audio API - Web APIs
the web audio api provides a powerful and versatile system for controlling audio on the web, allowing developers to choose audio sources, add effects to audio, create audio visualizations, apply spatial effects (such as panning) and much more. web audio concepts and usage the web audio api involves handling audio operations inside an audio con
text, and has been designed to allow modular routing. basic audio operations are performed with audio nodes, which are linked together to form an audio routing graph. several sources — with different types of channel layout — are supported even within a single con
text. this modular design provides the flexibility to create complex audio functions with dynamic effects. audio nodes are linked into chains and simple webs by their inputs and outputs. ...
...icated wave. outputs of these nodes could be linked to inputs of others, which mix or modify these streams of sound samples into different streams. a common modification is multiplying the samples by a value to make them louder or quieter (as is the case with gainnode). ...
...the case with gainnode). once the sound has been sufficiently processed for the intended effect, it can be linked to the input of a destination (audiocon
text.destination), which sends the sound to the speakers or headphones. this last connection is only necessary if the user is supposed to hear the audio. a simple, typical workflow for web audio would look something like this: create audio con
text inside the con
text, create sources — such as <audio>, oscillator, stream create effects nodes, such as reverb, biquad filter, panner, compressor choose final destination of audio, for example your system speakers connect the sources up to the effects, and the effects to the destination. timing is controlled with high precision and low latency, allowing developers to write code that resp...
...And 13 more matches
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
st modern browsers, its implementation varies widely. in older browsers, even the keyword none does not have the same effect on all form elements across different browsers, and some do not support it at all. the differences are smaller in the newest browsers. ...
...rm elements across different browsers, and some do not support it at all. the differences are smaller in the newest browsers. ...
... selects the appropriate special styling based on the element. acts as none on elements with no special styling. menulist-button div { color: black; -moz-appearance: menulist-button; -webkit-appearance: menulist-button; } <div>lorem</div> firefox chrome safari edge the element is styled as a button that would indicate a menulist can be opened. ...
...And 13 more matches
font-variant-ligatures - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... values normal this keyword leads to the activation...
... values normal this keyword leads to the activation of the usual ligatures and cont...
...And 13 more matches
<switch> - SVG: Scalable Vector Graphics
other direct children will be bypassed and therefore not rendered. if a child element is a container element, like <g>, then its subtree is also processed/rendered or bypassed/not rendered. the display and visibility properties have no effect on <switch> element processing. in particular, setting display:none on a child has no effect on the true/false testing for <switch> processing. ...
... visibility properties have no effect on <switch> element processing. in particular, setting display:none on a child has no effect on the true/false testing for <switch> processing. usage con
text categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elements<a>, <foreignobject>, <g>, <image>, <svg>, <switch>, <
text>, <use> attributes global attributes conditional processing attributes core attributes graphical event attributes presentation attributes class style externalresourcesrequired transform dom interface this element implements the svgswitchelement interface. svg <switch> example this example demonstrates showing different
text content depending on the browser's language settings. th...
...rface. svg <switch> example this example demonstrates showing different
text content depending on the browser's language settings. the switch element will display the first of its child elements whose systemlanguage attribute matches the user's language, or the fallback element with no systemlanguage attribute if none of them match. ...
...And 13 more matches
The Box Model - Archive of obsolete content
e in different types of operating systems, screen sizes and resolutions. the xul box model is a significant improvement over the html layout model, which is mostly vertical. with xul you can define vertically oriented as well as horizontally oriented interfaces, providing greater flexibility in interface design. any xul interface can be broken down into the following basic components: boxes
text images alignment and flexibility widths and heights margins and paddings menus, toolbar buttons, and even the most complex elements in xul are composed of these simple ingredients. complex elements are created from simpler ones through xbl, which will be covered later on. once you grasp this simple idea, you'll be able to use the dom inspector and css to mold xul elements and layouts with g...
...nd flexibility can't be mixed in some cases. if you add flexibility to one of the buttons, the packing will no longer be useful, but the alignment still makes a difference. it also wouldn't make sense to use flexibility or packing in the hbox if it didn't have any available horizontal space; the container element needs to either be flexible itself, or have a fixed width larger than its contents.
text there are 2 xul elements that are typically used for displaying
text: label and description. their behavior is nearly identical, but they are meant to be used in different situations. the label element should be used mainly for
text in xul forms, such as the ones you see in the firefox options / preferences window. here's a typical usage of the label element: <label control="xulschoolhello-g...
...are 2 xul elements that are typically used for displaying
text: label and description. their behavior is nearly identical, but they are meant to be used in different situations. the label element should be used mainly for
text in xul forms, such as the ones you see in the firefox options / preferences window. here's a typical usage of the label element: <label control="xulschoolhello-greeting-
textbox" value="&xulschoolhello.typegreeting.label;" /> <
textbox id="xulschoolhello-greeting-
textbox" /> the label says something like "type a greeting message", and the
textbox next to it allows the user to type the message. the control attribute links the label to the
textbox. if the user clicks on the label, the
textbox will be focused. also, if the user has a screen reader, the label will be ...
...And 12 more matches
tooltip - Archive of obsolete content
more information is available in the xul tutorial. ...
...more information is available in the xul tutorial. ...
...if the box direction is reversed, the cropping is reversed. ...
...And 12 more matches
Using the W3C DOM - Archive of obsolete content
basic method for referencing elements in an html page is document.getelementbyid(). all modern browsers support it. the method returns a reference to the uniquely identified element, which can then be used to script the element. for example, the following short sample dynamically sets the left margin of a <div> element with an id of "inset" to half an inch: // in the html: <div id="inset">sample
text</div> document.getelementbyid("inset").style.marginleft = ".5in"; note: internet explorer 5 through 7 have a flawed implementation of getelementbyid(), which returns the first element with a matching name or id (id versus name when using getelementbyid, msdn: getelementbyid method). ie-specific ways to access elements w3c web standards replacements id_attribute_value do...
...ing to the integer value. css 1 and css 2.x specifications require that non-zero values must be specified with a length unit; otherwise, the css declaration will be ignored. mozilla-based browsers, msie 6+, opera 7+ and other w3c standards-compliant browsers enforce such handling of parsing error. css 1 forward-compatible parsing css 2.1 rules for handling parsing errors changing an element's
text using the dom the
text of an element is available as the
textcontent or inner
text property (some browsers support both). the
textcontent property was introduced in the w3c dom 3 core, inner
text has been an ie method since ie 4 and has been standardised in html5. both properties can be read or set. reading the property returns the
text of an element with all the element content removed. setting...
...content or inner
text property (some browsers support both). the
textcontent property was introduced in the w3c dom 3 core, inner
text has been an ie method since ie 4 and has been standardised in html5. both properties can be read or set. reading the property returns the
text of an element with all the element content removed. setting the property replaces all the element's content with a single
text node with the assigned
text. the following examples show how to modify the
text of a span element that already exists in the html file. ...
...And 12 more matches
Examples - Archive of obsolete content
l extension and will generate an error when parsed. --> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us"> <head> <title>problem 1 - < in xhtml</title> <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> <script type="
text/javascript"> var i = 0; while (++i > 10) { // ... } </script> </head> <body> <h1>problem 1 - < in xhtml</h1> <p> this document is not well formed due to the use of a raw <. </p> </body> </html> back to the article problem 2 <!-- this file should have a .xhtml extension --> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xh...
...blem 2 <!-- this file should have a .xhtml extension --> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us"> <head> <title>problem 2 - comments in xhtml</title> <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> <style type="
text/css"> <!-- body {background-color: blue; color: yellow; } --> </style> <script type="
text/javascript"> <!-- var i = 0; var sum = 0; for (i = 0; i < 10; ++i) { sum += i; } alert('sum = ' + sum); // --> </script> </head> <body> <h1>problem 2 - comments in xhtml</h1> <p> this document is valid xhtml 1.0 strict served as <code>application/xhtml+x...
...extension and will generate an error when parsed. --> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us"> <head> <title>problem 3 - comments in xml</title> <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> <script type="
text/javascript"> var i; var sum = 0; for (i = 10; i > 0; --i) { sum += i; } </script> </head> <body> <h1>problem 3 - comments in xhtml</h1> <p> this document is not well formed xhtml due to the double dash contained in the comment. </p> </body> </html> back to the article examples for "using css rules in inline style within comments" example 1 <!-- this file sh...
...And 12 more matches
Positioning - Learn web development
of our parent element, and we are as tall as our child content. our total width and height is our content + padding + border width/height.</p> <p>we are separated by our margins. ...
...<p>we are separated by our margins. because of margin collapsing, we are separated by the width of one of our margins, not both.</p> <p>inline elements <span>like this one</span> and <span>this one</span> sit on the same line as one another, and adjacent
text nodes, if there is space on the same line. ...
...of our parent element, and we are as tall as our child content. our total width and height is our content + padding + border width/height.</p> <p>we are separated by our margins. ...
...And 12 more matches
Adding vector graphics to the Web - Learn web development
e and a rectangle: <svg version="1.1" baseprofile="full" width="300" height="200" xmlns="http://www.w3.org/2000/svg"> <rect width="100%" height="100%" fill="black" /> <circle cx="150" cy="100" r="90" fill="blue" /> </svg> this creates the following output: from the example above, you may get the impression that svg is easy to handcode. yes, you can handcode simple svg in a
text editor, but for a complex image this quickly starts to get very difficult. for creating svg images, most people use a vector graphics editor like inkscape or illustrator. these packages allow you to create a variety of illustrations using various graphics tools, and create approximations of photos (for example inkscape's trace bitmap feature.) svg has some additional advantages besides those des...
... complex image this quickly starts to get very difficult. for creating svg images, most people use a vector graphics editor like inkscape or illustrator. these packages allow you to create a variety of illustrations using various graphics tools, and create approximations of photos (for example inkscape's trace bitmap feature.) svg has some additional advantages besides those described so far:
text in vector images remains accessible (which also benefits your seo). svgs lend themselves well to styling/scripting, because each component of the image is an element that can be styled via css or scripted via javascript. so why would anyone want to use raster graphics over svg? well, svg does have some disadvantages: svg can get complicated very quickly, meaning that file sizes can grow; co...
... element, you just need to reference it in the src attribute as you'd expect. you will need a height or a width attribute (or both if your svg has no inherent aspect ratio). if you have not already done so, please read images in html. <img src="equilateral.svg" alt="triangle with all three sides equal" height="87" width="100" /> pros quick, familiar image syntax with built-in
text equivalent available in the alt attribute. you can make the image into a hyperlink easily by nesting the <img> inside an <a> element. the svg file can be cached by the browser, resulting in faster loading times for any page that uses the image loaded in the future. cons you cannot manipulate the image with javascript. if you want to control the svg content with css, you must include inlin...
...And 12 more matches
Mozilla’s UAAG evaluation report
applicable document under construction guideline 1. support input and output device-independence. checkpoint title status notes/plans 1.1 full keyboard access. (p1) vg we have some remaining bugs, and some keyboard usability issues, but in general mozilla now has keyboard equivalents for almost everything. most browsers do not allow the user to select
text with the keyboard alone. we intend to do this with a caret browsing feature. 1.2 activate event handlers. (p1) p onmouseover, onmousedown, onmouseup, onmousemove, onclick, ondbclick: no keyboard support onfocus and onblur: cannot be activated with pointer 1.3 provide
text messages. (p1) c status line and alert boxes used to convey messages and alerts g...
... and alerts guideline 2. ensure user access to all content. checkpoint title status notes/plans checkpoint title status notes/plans 2.1 render content according to specification. (p1) vg renders html, css, and a number of graphic image formats. does not contradict current specifications for html and css rendering. ...
...ge formats. does not contradict current specifications for html and css rendering. 2.2 provide
text view. (p1) c also known as view source. 2.3 render conditional content. (p1) vg alt for img: rendered when images turned off. see meta bug 41924 for open issues with the alt attribute. title for *any* element: rendered as tooltip longdesc for img element: in con
text menu - properties content of object element: ? alt for area element: ? alt for input element: ? acronym element: supported abbr element: supported abbr attribute for td/th: not supported summary for table: supported title for frame: ? longdesc for frame: not supported, see bug 3658 noframe for frame: must use user style sheets to render this. a ui for this ...
...And 12 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
> -e <encryptfilename> -o <opfilename>\n"); exit(-1); } } /* * sign the contents of input file using private key and * return result as secitem */ secstatus signdata(const char *infilename, seckeyprivatekey *pk, secitem *res) { secstatus rv = secfailure; unsigned int nb; unsigned char ibuf[4096]; prfiledesc *infile = null; sgncon
text *sgn = null; /* open the input file for reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for reading.\n", infilename); rv = secfailure; goto cleanup; } /* sign using private key */ sgn = sgn_newcon
text(sec_oid_pkcs1_md5_with_rsa_encryption, pk); ...
... infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for reading.\n", infilename); rv = secfailure; goto cleanup; } /* sign using private key */ sgn = sgn_newcon
text(sec_oid_pkcs1_md5_with_rsa_encryption, pk); if (!sgn) { pr_fprintf(pr_stderr, "unable to create con
text for signing\n"); rv = secfailure; goto cleanup; } rv = sgn_begin(sgn); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_begin\n"); goto cleanup; } while ((nb = pr_read(infile, ibuf, sizeof(ibuf))) > 0) { rv = sgn_update(sgn, ibuf, nb); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem ...
..., nb); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_update\n"); goto cleanup; } } rv = sgn_end(sgn, res); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_end\n"); goto cleanup; } cleanup: if (infile) { pr_close(infile); } if (sgn) { sgn_destroycon
text(sgn, pr_true); } return rv; } /* * verify the signature using public key */ secstatus verifydata(const char *infilename, seckeypublickey *pk, secitem *sigitem, secupwdata *pwdata) { unsigned int nb; unsigned char ibuf[4096]; secstatus rv = secfailure; vfycon
text *vfy = null; prfiledesc *infile = null; /* open the input ...
...And 12 more matches
Background Tasks API - Web APIs
this functionality. html content in order to be oriented about what we're trying to accomplish, let's have a look at the html. this establishes a box (id "container") that's used to present the progress of an operation (because you never know how long decoding "quantum filament tachyon emissions" will take, after all) as well as a second main box (with the id "logbox"), which is used to display
textual output. <p> demonstration of using <a href="/docs/web/api/background_tasks_api"> cooperatively scheduled background tasks</a> using the <code>requestidlecallback()</code> method. </p> <div class="container"> <div class="label">decoding quantum filament tachyon emissions...</div> <progress id="progress" value="0"></progress> <div class="button" id="startbutton"> start </div>...
...1px solid black; border-radius: 6px 6px 0 0; } #log { font: 12px "courier", monospace; padding: 6px; overflow: auto; overflow-y: scroll; width: 388px; height: 460px; } .container { width: 400px; padding: 6px; border-radius: 6px; border: 1px solid black; box-shadow: 4px 4px 2px black; display: block; overflow: auto; } .label { display: inline-block; } .counter {
text-align: right; padding-top: 4px; float: right; } .button { padding-top: 2px; padding-bottom: 4px; width: 100px; display: inline-block; float: left; border: 1px solid black; cursor: pointer;
text-align: center; margin-top: 0; color: white; background-color: darkgreen; } #progress { width: 100%; padding-top: 6px; } javascript content now that the document structure...
... totaltaskcountelem is the <span> we use to insert the total number of tasks created into the status display in the progress box. currenttasknumberelem is the element used to display the number of tasks processed so far. progressbarelem is the <progress> element showing the percentage of the tasks processed so far. startbuttonelem is the start button. logelem is the <div> we'll insert logged
text messages into. let logfragment = null; let statusrefreshscheduled = false; finally, we set up a couple of variables for other items: logfragment will be used to store a documentfragment that's generated by our logging functions to create content to append to the log when the next animation frame is rendered. statusrefreshscheduled is used to track whether or not we've already scheduled an...
...And 12 more matches
Basic usage of canvas - Web APIs
the <canvas> element <canvas id="tutorial" width="150" height="150"></canvas> at first sight a <canvas> looks like the <img> element, with the only clear difference being that it doesn't have the src and alt attributes. indeed, the <canvas> element has only two attributes, width and height. these are both optional and can also be set using dom properties. ...
...d chapter of this tutorial. when no styling rules are applied to the canvas it will initially be fully transparent. fallback content the <canvas> element differs from an <img> tag in that, like for <video>, <audio>, or <picture> elements, it is easy to define some fallback content, to be displayed in older browsers not supporting it, like versions of internet explorer earlier than version 9 or
textual browsers. you should always provide fallback content to be displayed by those browsers. providing fallback content is very straightforward: just insert the alternate content inside the <canvas> element. browsers that don't support <canvas> will ignore the container and render the fallback content inside it. browsers that do support <canvas> will ignore the content inside the container, and ju...
...isplayed by those browsers. providing fallback content is very straightforward: just insert the alternate content inside the <canvas> element. browsers that don't support <canvas> will ignore the container and render the fallback content inside it. browsers that do support <canvas> will ignore the content inside the container, and just render the canvas normally. for example, we could provide a
text description of the canvas content or provide a static image of the dynamically rendered content. this can look something like this: <canvas id="stockgraph" width="150" height="150"> current stock price: $3.15 + 0.15 </canvas> <canvas id="clock" width="150" height="150"> <img src="images/clock.png" width="150" height="150" alt=""/> </canvas> telling the user to use a different browser that...
...And 12 more matches
Window - Web APIs
domparser domparser can parse xml or html source stored in a string into a dom document. domparser is specifie...
... domparser domparser can parse xml or html source stored in a string into a dom document. domparser is specified in dom parsing and serialization. image used for creating an htmlimageelement. option used for creat...
...on: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/window" target="_top"><rect x="1" y="1" width="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">window</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructors see also the dom interfaces. domparser domparser can parse xml or html source stored in a string into a dom document. domparser is specified in dom parsing and serialization. image used for creating an htmlimageelement. option used for creating an htmloptionelement. staticrange read only retu...
...And 12 more matches
Accessibility documentation index - Accessibility
ment object model, needscontent, property, widget, aria-activedescendant this article describes the aria-activedescendant property. 18 using the aria-describedby attribute aria, accessibility, attribute the aria-describedby attribute is used to indicate the ids of the elements that describe the object. it is used to establish a relationship between widgets or groups and
text that described them. this is very similar to aria-labelledby: a label describes the essence of an object, while a description provides more information that the user might need. 19 using the aria-hidden attribute aria, accessibility, attribute, codingscripting, html, javascript, needscontent, role(2), agent, alert, user, useragent this technique demonstrates how to use the ar...
...ired field has not been filled in.the attribute should be programmatically set as a result of a validation process. 21 using the aria-label attribute aria, accessibility, codingscripting, html, needscontent, reference, référence(2), agent, aria-label, user, useragent the aria-label attribute is used to define a string that labels the current element. ...
...grammatically set as a result of a validation process. 21 using the aria-label attribute aria, accessibility, codingscripting, html, needscontent, reference, référence(2), agent, aria-label, user, useragent the aria-label attribute is used to define a string that labels the current element. use it in cases where a
text label is not visible on the screen. if there is visible
text labeling the element, use aria-labelledby instead. 22 using the aria-labelledby attribute aria, accessibility, broken link the aria-labelledby attribute establishes relationships between objects and their label(s), and its value should be one or more element ids, which refer to elements that have the
text needed for labeling. list multiple element ids in a space delimited fas...
...And 12 more matches
Mozilla CSS extensions - CSS: Cascading Style Sheets
o-classes will only work in mozilla applications such as firefox, and are not on a standards track. some of them apply only to xul elements. ...
...-column-fill [prefixed version still accepted] -moz-column-gap [prefixed version still accepted] -moz-column-width [prefixed version still accepted] -moz-column-rule [prefixed version still accepted] -moz-column-rule-width [prefixed version still accepted] -moz-column-rule-style [prefixed version still accepted] -moz-column-rule-color [prefixed version still accepted] -moz-con
text-properties f–m filter [applying to more than svg] -moz-font-feature-settings [prefixed version still accepted] -moz-font-language-override [prefixed version still accepted] -moz-hyphens [prefixed version still accepted] -moz-margin-end [superseded by the standard version margin-inline-end] -moz-margin-start [superseded by the standard version margin-inline-start] mask...
...outline-widthobsolete since gecko 1.9.2 p -moz-padding-end [superseded by the standard version padding-inline-start] -moz-padding-start [superseded by the standard version padding-inline-end] -moz-perspective [prefixed version still accepted] -moz-perspective-origin [prefixed version still accepted] pointer-events [applying to more than svg] t–u -moz-tab-size -moz-
text-align-lastobsolete since gecko 53 -moz-
text-decoration-colorobsolete since gecko 39 -moz-
text-decoration-lineobsolete since gecko 39 -moz-
text-decoration-styleobsolete since gecko 39 -moz-
text-size-adjust -moz-transform [prefixed version still accepted] -moz-transform-origin [prefixed version still accepted] -moz-transform-style [prefixed version still accepted] -moz-transition ...
...And 12 more matches
clip-path - CSS: Cascading Style Sheets
cified for the element creating the svg viewport, the reference box is positioned at the origin of the coordinate system established by the viewbox attribute and the dimension of the size of the reference box is set to the width and height values of the viewbox attribute. none no clipping path is created. note: a computed value other than none results in the creation of a new stacking con
text the same way that css opacity does for values other than 1. formal definition initial valuenoneapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednopercentagesrefer to reference box when specified, otherwise border-boxcomputed valueas specified, but with <url> values made absoluteanimation typeyes, as specified for <bas...
...class="cell"> <span>html</span> <div class="container"> <p class="none"> i love<br><em>clipping</em> </p> </div> </div> <div class="cell"> <span>svg</span> <div class="container viewbox"> <svg viewbox="0 0 192 192"> <g class="none"> <rect x="24" y="24" width="144" height="144" /> <
text x="96" y="91">i love</
text> <
text x="96" y="109" class="em">clipping</
text> </g> </svg> </div> </div> </div> <div class="note">clip-path: url(#mypath)<br><br> assuming the following clippath definition: <pre> <svg> <clippath id="mypath" clippathunits="objectboundingbox"> <path d="m0.5,1 c 0.5,1,0,0.7...
...v class="cell"> <span>html</span> <div class="container"> <p class="svg"> i love<br><em>clipping</em> </p> </div> </div> <div class="cell"> <span>svg</span> <div class="container viewbox"> <svg viewbox="0 0 192 192"> <g class="svg"> <rect x="24" y="24" width="144" height="144" /> <
text x="96" y="91">i love</
text> <
text x="96" y="109" class="em">clipping</
text> </g> </svg> </div> </div> </div> <div class="note">clip-path: path('m15,45 a30,30,0,0,1,75,45 a30,30,0,0,1,135,45 q135,90,75,130 q15,90,15,45 z') </div> <div class="row"> <div class="cell"> <span>html</span> <div class="container"> ...
...And 12 more matches
user-select - CSS: Cascading Style Sheets
the user-select css property controls whether the user can select
text. this doesn't have any effect on content loaded as chrome, except in
textboxes. ...
... the user-select css property controls whether the user can select
text. this doesn't have any effect on content loaded as chrome, except in
textboxes. ...
... controls whether the user can select
text. this doesn't have any effect on content loaded as chrome, except in
textboxes. ...
...And 12 more matches
side - SVG: Scalable Vector Graphics
the side attribute determines the side of a path the
text is placed on (relative to the path direction). ...
... the side attribute determines the side of a path the
text is placed on (relative to the path direction). ...
... the side attribute determines the side of a path the
text is placed on (relative to the path direction). ...
...And 12 more matches
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
sn't begin to approach the seamlessness and usability of good application user interfaces. recently, however, modern browsers and enriched web standards have begun to make new navigational and presentational models possible. one such model is inner-browsing, which is our name for a model in which all navigation occurs within a single page, as in a typical application interface. the single-page con
text and abstraction of data from the presentation can give your web applications new continuity, precision and control. this model is also interesting because is optimized to access con
textual data instead reloading full web pages. this article discusses the concept of inner-browsing and possible approaches for its implementation. it also provides two implementation examples using the model. the firs...
...ction. this sample was made using iframes to illustrate a possible implementation. an implementation can also use other transport technologies such as soap-based remote procedure calls, xmlhttprequest interfaces, or dom 3 load. the second example shows a tabbed menu that dynamically loads news headlines into the current web page. this implementation uses xmlhttprequest. extending traditional hyper
text navigation the hyper
text approach to developing web pages, in which developers format
text layouts into pages and link those pages to related content, is analogous to a book or a magazine: readers view pages, go to other pages for more information, and view resources listed as references on that page. html and web standards have evolved and now offer flexible and fine-grained control to layout as...
...nologies have also evolved, supporting and connecting different resources to different browsers. despite all the evolution, we still see the underpinnings of the original model in modern web sites. we still connect through a set of links that mostly drive us to a new page, and we still occasionally lose track of where we are. also, on the server side, the server often has to rebuild all of the con
text of the user interface with each new request. of course, this traditional approach is useful and easy to implement, which is why it is still so widely used. but the real showcase for new browser features and web standards like html 4.0 and dom level 2, and xml are models like inner-browsing, where these technologies can begin to be used in the way that they were envisioned. many of the new web tec...
...And 11 more matches
Layout System Overview - Archive of obsolete content
o the element are hard-coded, but in the more general case where the display type is needed, the layout system must determine that display type by using the style system. a content element is passed to the style system and a request is made to resolve the style for that element. this causes the style system to apply all style rules that correspond to the element and results in a resolved style con
text - the style data specific to that element. the layout module looks at the 'display' field of the style con
text to determine what kind of frame to create (block, inline, table, etc.). the style con
text is associated with the frame via a reference because it is needed for many other computations during the formatting of the frames. once a frame is created for a content element, it must be formatted...
...me. this is pretty straight-forward, but is complicated somewhat by the notion of incrementalism. one of the goals of the layout system's design is to create parts of the presentation as they become available, rather than waiting for the entire document to be read, parsed, and then presented. this is a major benefit for large documents because the user does not have to wait for the 200th page of
text to be read in before the first page can be displayed - they can start reading something right away. so really, this sequence of operations resolve style, create frame, layout frame, gets repeated many times as the content becomes available. in the normal in-flow case this is quite natural because the sequential addition of new content results in sequential addition of new frames, and because ever...
...t is critical to avoid either the problem of not updating impacted elements, thus presenting an invalid presentation, or updating too much of the presentation and thus doing too much work, potentially causing performance problems. one very special case of dynamic content manipulation is the html editor. layout is used to implement both a full-blown wysiwyg html editor, and a single and multi-line
text entry control. in both cases, the content is manipulated by the user (via the dom) and the resulting visual impacts must be shown as quickly as possible, without disconcerting flicker or other artifacts that might bother the user. consider a
text entry field: the user types
text into a form on the web. as the user types a new character it is inserted into the content model. this causes layout to ...
...And 11 more matches
Input Controls - Archive of obsolete content
« previousnext » xul has elements that are similar to the html form controls. looking for a guide to using input controls and forms on the web? ...
... « previousnext » xul has elements that are similar to the html form controls. looking for a guide to using input controls and forms on the web? ...
... « previousnext » xul has elements that are similar to the html form controls. looking for a guide to using input controls and forms on the web? ...
...And 11 more matches
description - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is used to create a block of
text. the
text can be set either with the value attribute or by placing
text inside the open and close description tags. the value attribute is used to set
text that appears in a single line. if
text appears as a child of the description, it will wrap to multiple lines. it may contain arbitrary markup, which can be styled as needed. more information is available in the xul tutorial. ...
...ppears as a child of the description, it will wrap to multiple lines. it may contain arbitrary markup, which can be styled as needed. more information is available in the xul tutorial. ...
...ain arbitrary markup, which can be styled as needed. more information is available in the xul tutorial. attributes crop, disabled, tabindex value properties accessibletype, crop, disabled, tabindex, value style classes header, indent, monospace, plain, small-margin examples this is a long section of
text that will word wrap when displayed <description> this is a long section of
text that will word wrap when displayed. ...
...And 11 more matches
Writing JavaScript for XHTML - Archive of obsolete content
the receiving browser considers the content to be html, and does not utilise its xml parser. there are a number of reasons for this. partially it is because, prior to version 9, internet explorer was incapable of handling xhtml sent with the official xhtml media type at all. ...
...rience that javascript, authored carefully for html, can break when placed with an xml environment. this article shows some of the reasons alongside with strategies to remedy the problems. it will encourage web authors to use more xml features and make their javascript interoperable with real xhtml applications. (note that xhtml documents which behave correctly in both application/xhtml+xml and
text/html environments are sometimes known as 'polyglot' documents.) to test the following examples locally, use firefox's extension switch. just write an ordinary (x)html file and save it once as test.html and once as test.xhtml. problem: nothing works after switching the mime type suddenly no inline script works anymore. even the plain old alert() method is gone. the code looks something like thi...
... are sometimes known as 'polyglot' documents.) to test the following examples locally, use firefox's extension switch. just write an ordinary (x)html file and save it once as test.html and once as test.xhtml. problem: nothing works after switching the mime type suddenly no inline script works anymore. even the plain old alert() method is gone. the code looks something like this: <script type="
text/javascript"> //<!-- window.alert("hello world!"); //--> </script> solution: the cdata trick this problem usually arises, when inline scripts are included in comments. this was common practice in html, to hide the scripts from browsers not capable of js. in the age of xml comments are what they were intended: comments. before processing the file, all comments will be stripped from the...
...And 11 more matches
Accessible multimedia - Learn web development
previous overview: accessibility next another category of content that can create accessibility problems is multimedia — video, audio, and image content need to be given proper
textual alternatives so they can be understood by assistive technologies and their users. this article shows how. prerequisites: basic computer literacy, a basic understanding of html, css, and javascript, an understanding of what accessibility is. objective: to understand the accessibility issues behind multimedia, and how to overcome them. ...
...basic computer literacy, a basic understanding of html, css, and javascript, an understanding of what accessibility is. objective: to understand the accessibility issues behind multimedia, and how to overcome them. multimedia and accessibility so far in this module we have looked at a variety of content and what needs to be done to ensure its accessibility, ranging from simple
text content to data tables, images, native controls such as form elements and buttons, and even more complex markup structures (with wai-aria attributes). this article on the other hand looks at another general class of content that arguably isn't as easy to ensure accessibility for — multimedia. images, videos, <canvas> elements, flash movies, etc., aren't as easily understood by screenreaders or...
...ly isn't as easy to ensure accessibility for — multimedia. images, videos, <canvas> elements, flash movies, etc., aren't as easily understood by screenreaders or navigated by the keyboard, and we need to give them a helping hand. but don't despair — here we will help you navigate through the techniques available for making multimedia more accessible. simple images we already covered simple
text alternatives for html images in our html: a good basis for accessibility article — you can refer back to there for the full details. in short, you should ensure that where possible visual content has an alternative
text available for screenreaders to pick up and read to their users. for example: <img src="dinosaur.png" alt="a red tyrannosaurus rex: a two legged dinosaur standing upright ...
...And 11 more matches
Advanced form styling - Learn web development
prerequisites: basic computer literacy, and a basic understanding of html and css. ...
...e most helpful value, and probably the only one you'll use, is none. this stops any control you apply it to from using system-level styling, as much as possible, and lets you build up the styles yourself using css. ...
... helpful value, and probably the only one you'll use, is none. this stops any control you apply it to from using system-level styling, as much as possible, and lets you build up the styles yourself using css. ...
...And 11 more matches
Your first form - Learn web development
the module), or used on the client-side to immediately update the interface in some way (for example, add another item to a list, or show or hide a ui feature). a web form's html is made up of one or more form controls (sometimes called widgets), plus some additional elements to help structure the overall form — they are often referred to as html forms. the controls can be single or multi-line
text fields, dropdown boxes, buttons, checkboxes, or radio buttons, and are mostly created using the <input> element, although there are some other elements to learn about too. form controls can also be programmed to enforce specific formats or values to be entered (form validation), and paired with
text labels that describe their purpose to both sighted and blind users. designing your form before ...
...ticles: smashing magazine has some good articles about forms ux, including an older but still relevant extensive guide to web form usability article. uxmatters is also a very thoughtful resource with good advice from basic best practices to complex concerns such as multi-page forms. in this article, we'll build a simple contact form. let's make a rough sketch. our form will contain three
text fields and one button. we are asking the user for their name, their e-mail and the message they want to send. hitting the button will send their data to a web server. active learning: implementing our form html ok, let's have a go at creating the html for our form. we will use the following html elements: <form>, <label>, <input>, <
textarea>, and <button>. before you go any further, make a loc...
...es: the action attribute defines the location (url) where the form's collected data should be sent when it is submitted. the method attribute defines which http method to send the data with (usually get or post). note: we'll look at how those attributes work in our sending form data article later on. for now, add the above <form> element into your html <body>. the <label>, <input>, and <
textarea> elements our contact form is not complex: the data entry portion contains three
text fields, each with a corresponding <label>: the input field for the name is a single-line
text field. the input field for the e-mail is an input of type email: a single-line
text field that accepts only e-mail addresses. the input field for the message is a <
textarea>; a multiline
text field. in terms...
...And 11 more matches
HTML basics - Learn web development
for example, content could be structured within a set of paragraphs, a list of bulleted points, or using images and data tables. as the title suggests, this article will give you a basic understanding of html and its functions. so what is html? html is not a programming language; it is a markup language that defines the structure of your content. html consists of a series of elements, which you use to enclose, or wrap, different parts of the content to make it appear a certain way, or act a certain way. ...
... the paragraph begins. the closing tag: this is the same as the opening tag, except that it includes a forward slash before the element name. this states where the element ends — in this case where the paragraph ends. failing to add a closing tag is one of the standard beginner errors and can lead to strange results. the content: this is the content of the element, which in this case, is just
text. the element: the opening tag, the closing tag and the content together comprise the element. elements can also have attributes that look like the following: attributes contain extra information about the element that you don't want to appear in the actual content. here, class is the attribute name and editor-note is the attribute value. the class attribute allows you to give the element a ...
...ng to your page's viewers. this includes things like keywords and a page description that you want to appear in search results, css to style our content, character set declarations and more. <meta charset="utf-8"> — this element sets the character set your document should use to utf-8 which includes most characters from the vast majority of written languages. essentially, it can now handle any
textual content you might put on it. there is no reason not to set this and it can help avoid some problems later on. <title></title> — the <title> element. this sets the title of your page, which is the title that appears in the browser tab the page is loaded in. it is also used to describe the page when you bookmark/favourite it. <body></body> — the <body> element. this contains all the conten...
...And 11 more matches
Accessible Toolkit Checklist
document order. tab order must wrap, not have invisible items in tab order dynamically added items must not corrupt the tab cycle or make it disorderly tab cycle must be identical backwards and forwards the f6 and shift+f6 key combinations should cycle through panes in a window making focus visible on any widget, and focus must always be visible shift+f10 or con
text menu key should work like right click on focused item, and con
text menu should show just under and to the right of the current focus. on mac os x, ctrl+space is used to bring up the con
text menu. most widgets (like checkboxes) can have a label outside of themselves, which should focus the widget when clicked on, or when its mnemonic is pressed. the system should require these labels to be c...
...the msaa support needs to know what label goes with what widget. msaa support: expose window with role_dialog, unless it's already the standard dialog window class #32770. if you don't, some screen readers won't automatically read the dialog when it receives focus. ...
... iaccessible. get_accchild: get the child of an iaccessible. get_accname: get the "name" of the iaccessible, for example the name of a button, checkbox or menu item. this is one reason why a label must be created together with each widget, rather than separately. get_accvalue: get the "value" of the iaccessible, for example a number in a slider, a url for a link, the
text a user entered in a field. get_accrole: get an enumerated value representing what this iaccessible is used for, for example. is it a link, static
text, editable
text, a checkbox, or a table cell, etc. get_accstate: a 32 bit field representing possible on/off states, such as focused, focusable, selected, selectable, visible, protected (for passwords), checked, etc. ge...
...And 11 more matches
Localization content best practices
common mistakes. note: if you're a localizer and you want to contribute to the localization of mozilla products, you might want to read our localization quick start guide for information on localizing mozilla code. note on localizers mozilla localizers are volunteers with very diverse technical skills: some of them rely exclusively on translation tools, others prefer to work directly with
text editors and don't have problems working with vcs systems. it's important to consider this when adding strings, and especially localization comments for strings that contain references, or obscure technical details. localization files choose good key ids the ids (names) chosen for your keys, regardless of the file format, should always be descriptive of the string, and its role in the interfac...
... ids that highlight this relation: neweventbtn.label = add event neweventbtn.accesskey = a neweventbtn.tooltip = add a new event don't duplicate ids if you're adding new strings, check that you're not duplicating an existing id. depending on the parser logic, one of these two translations will be ignored. add localization notes localizers usually work on the localizable files without the con
text of the source files including the localized strings; it is important to add comments to the localizable files themselves, too. these comments are generally referred to as localization notes. don't forget to add a localization note when: part of the string is not supposed to be localized (for example, the name of an html attribute in a warning). string includes variables: always explain what ...
...ocalization note when: part of the string is not supposed to be localized (for example, the name of an html attribute in a warning). string includes variables: always explain what will be the value of these variables at run-time. english could be ambiguous. for example: bookmark. is this a noun or a verb? using meaningful ids could also help in these cases. strings are used in a specific con
text. for example accessibility (a11y) strings: in this case space is less important than clarity, since these strings are not displayed in the ui but used by tools like screen readers. there is an established format for localization comments: it's important to follow the format as closely as possible, since there are a number of automated tools that parse these comments for easier access and use by...
...And 11 more matches
Python binding for NSS
tion protocol. in other words they can be iterated over, indexed by position, or used as slices. nss/nspr objects whose collection elements can be referenced by name support associative indexing. nss/nspr objects which have "get" and "set" api function calls are exposed as python properties. all nss/nspr python objects can print their current value by evaluting the python object in a string con
text or by using the python str() function. support threading. the python global interpreter lock (gil) is released prior to calling nss/nspr c functions and reaquired after the nss/nspr c function returns. this allows other python threads to execute during the time a nss/nspr function is progress in another thread. also, any "global" values which are set in python-nss are actually thread-local. exam...
...ne default (keyword) parameters freeing the python programmer from having to specify all parameters yet allowing them to be overriden when necessary. error codes are never returned from methods/functions. python-nss follows the existing python exception mechanism. any error reported by nss/nspr is converted into a python exception and raised. the exact error code, error description, and often con
textual error information will be present in the exception object. enumerated constants used in the nss/nspr api's are available in the python module under the exact same name as they appear in the c header files of nss/nspr. convenience functions are provided to translate between the numeric value of an enumerated constant and it's string representation and visa versa. python-nss internally suppor...
...presentation and visa versa. python-nss internally supports utf-8. strings may be python str objects or python unicode objects. if a python unicode object is passed to a nss/nspr function it will be encoded as utf-8 first before being passed to nss/nspr. python-nss tries to be flexible when generating a print representation of complex objects. for simplicity you can receive a block of formatted
text but if you need more control, such as when building gui elments you can access a list of "lines", each line is paired with an indentation level value. the (indent,
text) pairs allow you to insert the item into a gui tree structure or simply change the indentation formatting. deprecated elements of the python-nss api are marked with python deprecation warnings as well as being documented in the n...
...And 11 more matches
JS_DefineProperty
create a new property on an object. ...
... create a new property on an object. ...
...eobject obj, const char *name, js::handlevalue value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineproperty(jscon
text *cx, js::handleobject obj, const char *name, js::handleobject value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineproperty(jscon
text *cx, js::handleobject obj, const char *name, js::handlestring value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineproperty(jscon
text *cx, js::handleobject obj, const char *name, int32_t value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_definepropert...
...And 11 more matches
nsIHTMLEditor
tioncontainer(); void ignorespuriousdragevent(in boolean aignorespuriousdragevent); void increasefontsize(); void indent(in astring aindent); void insertelementatselection(in nsidomelement aelement, in boolean adeleteselection); void insertfromdrop(in nsidomevent aevent); void inserthtml(in astring ainputstring); void inserthtmlwithcon
text(in astring ainputstring, in astring acon
textstr, in astring ainfostr, in astring aflavor, in nsidomdocument asourcedoc, in nsidomnode adestinationnode, in long adestinationoffset, in boolean adeleteselection); void insertlinkaroundselection(in nsidomelement aanchorelement); boolean isanonymouselement(in nsidomelement aelement); void makeorchangelist(in astring alisttype...
...node the parent node of the created anonymous element. aanonclass contents of the _moz_anonclass attribute. aiscreatedhidden a boolean specifying if the class "hidden" is to be added to the created anonymous element. return value a dom element. createelementwithdefaults() return a new element with default attribute values. this does not rely on the selection, and is not sensitive to con
text. used primarily to supply new element for various insert element dialogs (image, link, table, and horizontalrule are the only returned elements as of 9/12/18); namedanchor was removed in firefox 63. nsidomelement createelementwithdefaults( in astring atagname ); parameters atagname the html tagname. special input value for links: use "href" to get a link node (an "a" tag with the "href"...
...orizontalrule are the only returned elements as of 9/12/18); namedanchor was removed in firefox 63. nsidomelement createelementwithdefaults( in astring atagname ); parameters atagname the html tagname. special input value for links: use "href" to get a link node (an "a" tag with the "href" attribute set) return value the new element created. decreasefontsize() decrease font size for
text in selection by 1 html unit all existing
text is scanned for existing <font size> attributes so they will be decreased instead of inserting new <font> tag. void decreasefontsize(); parameters none. dodrag() transfers the relevant data (as appropriate) to a transferable so it can later be dropped. void dodrag( in nsidomevent aevent ); parameters aevent getalignment() returns wh...
...And 11 more matches
Using the CSS Painting API - Web APIs
r: css paint worklet in an external script file, we employ the registerpaint() function to name our css paint worklet. it takes two parameters. the first is the name we give the worklet — this is the name we will use in our css as the parameter of the paint() function when we want to apply this styling to an element. ...
...ment. the second parameter is the class that does all the magic, defining the con
text options and what to paint to the two-dimensional canvas that will be our image. registerpaint('headerhighlight', class { /* define if alphatransparency is allowed alpha is set to true by default. if set to false, all colours used on the canvas will be fully opaque */ static get con
textoptions() { return { alpha: true }; } /* ctx is the 2d drawing con
text a subset of the html5 canvas api. ...
...n the canvas will be fully opaque */ static get con
textoptions() { return { alpha: true }; } /* ctx is the 2d drawing con
text a subset of the html5 canvas api. */ paint(ctx) { ctx.fillstyle = 'hsla(55, 90%, 60%, 1.0)'; ctx.fillrect(0, 15, 200, 20); /* order: x, y, w, h */ } }); in this class example we have defined a single con
text option with the con
textoptions() function: we returned a simple object stating alpha transparency is allowed. we have then used the paint() function to paint to our canvas. a paint() function can take three arguments. ...
...And 11 more matches
HTMLTrackElement - Web APIs
the htmltrackelement interface represents an html <track> element within the dom. this element can be used as a child of either <audio> or <video> to specify a
text track containing information such as closed captions or subtitles. ...
...splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...And 11 more matches
In depth: Microtasks and the JavaScript runtime environment - Web APIs
meout() and setinterval()), the javascript environment provided by web browsers has gradually advanced to include powerful features that enable scheduling of tasks, multi-threaded application development, and so forth. to understand where queuemicrotask() comes into play here, it's helpful to understand how the javascript runtime operates when scheduling and running code. javascript execution con
texts note: the details here are generally not important to most javascript programmers. this information is provided as a basis for why microtasks are useful and how they function; if you don't care, you can skip this and come back later if you find that you need to. when a fragment of javascript code runs, it runs inside an execution con
text. there are three types of code that create a new execu...
...: the details here are generally not important to most javascript programmers. this information is provided as a basis for why microtasks are useful and how they function; if you don't care, you can skip this and come back later if you find that you need to. when a fragment of javascript code runs, it runs inside an execution con
text. ...
...generally not important to most javascript programmers. this information is provided as a basis for why microtasks are useful and how they function; if you don't care, you can skip this and come back later if you find that you need to. when a fragment of javascript code runs, it runs inside an execution con
text. there are three types of code that create a new execution con
text: the global con
text is the execution con
text created to run the main body of your code; that is, any code that exists outside of a javascript function. each function is run within its own execution con
text. this is frequently referred to as a "local con
text." using the ill-advised eval() function also creates a new execution con
text. each con
text is, in essence, a level of scope within your code. as one of these...
...And 11 more matches
Using the Web Speech API - Web APIs
the web speech api provides two distinct areas of functionality — speech recognition, and speech synthesis (also known as
text to speech, or tts) — which open up interesting new possibilities for accessibility, and control mechanisms. this article provides a simple introduction to both areas, along with demos. speech recognition speech recognition involves receiving speech through a device's microphone, which is then checked by a speech recognition service against a list of grammar (basically, the vocabulary you want to have recognised in a particular app.) when a word or phrase is successfully recognised, it is returned as a result (or list of results) as a
text string, and further actions can be initiated as a result. the web speech api has a main controller interface for this...
...the speechrecognitionevent.results property returns a speechrecognitionresultlist object containing speechrecognitionresult objects. it has a getter so it can be accessed ...
...d speech the last two handlers are there to handle cases where speech was recognised that wasn't in the defined grammar, or an error occured. ...
...And 11 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
integer in the idl. examples example 1: basic syntax the following example demonstrates setinterval()'s basic syntax. var intervalid = window.setinterval(mycallback, 500, 'parameter 1', 'parameter 2'); function mycallback(a, b) { // your code here // parameters are purely optional. ...
...'blue' : 'red'; // oelem.style.color == 'red' ? 'blue' : 'red' is a conditional or ternary operator. ...
... console.log(b); } example 2: alternating two colors the following example calls the flash
text() function once a second until the stop button is pressed. <!doctype html> <html> <head> <meta charset="utf-8" /> <title>setinterval/clearinterval example</title> <script> var nintervid; function changecolor() { nintervid = setinterval(flash
text, 1000); } function flash
text() { var oelem = document.getelementbyid('my_box'); oelem.style.color = oelem.style.color == 'red' ? 'blue' : 'red'; // oelem.style.color == 'red' ? 'blue' : 'red' is a conditional or ternary operator. } function stop
textcolor() { clearinterval(nintervid); } </script> </head> <body onload="changecolor();"> <div id="my_box"> <p>hello world</p> </div> ...
...And 11 more matches
Audio and video manipulation - Developer guides
back: function() { if (this.video.paused || this.video.ended) { return; } this.computeframe(); var self = this; settimeout(function () { self.timercallback(); }, 16); // roughly 60 frames per second }, doload: function() { this.video = document.getelementbyid("my-video"); this.c1 = document.getelementbyid("my-canvas"); this.ctx1 = this.c1.getcon
text("2d"); var self = this; this.video.addeventlistener("play", function() { self.width = self.video.width; self.height = self.video.height; self.timercallback(); }, false); }, computeframe: function() { this.ctx1.drawimage(this.video, 0, 0, this.width, this.height); var frame = this.ctx1.getimagedata(0, 0, this.width, this.height); var l = frame.data.l...
...settimeout() when running on browsers that support it. note: due to potential security issues if your video is on a different domain than your code, you'll need to enable cors (cross origin resource sharing) on your video server. video and webgl webgl is a powerful api that uses canvas to draw hardware-accelerated 3d or 2d scenes. you can combine webgl and the <video> element to create video
textures, which means you can put video inside 3d scenes. note: you can find the source code of this demo on github (see it live also). playback rate we can also adjust the rate that audio and video plays at using an attribute of the <audio> and <video> element called playbackrate. playbackrate is a number that represents a multiple to be applied to the rate of playback, for example 0.5 represe...
... code <video id="my-video" controls="true" width="480" height="270"> <source src="https://udn.realityripple.com/samples/5b/8cd6da9c65.webm" type="video/webm"> <source src="https://udn.realityripple.com/samples/6f/08625b424a.m4v" type="video/mp4"> </video> <div class="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="reset" type="button" value="reset" /> </div> <
textarea id="code" class="playable-code"> var myvideo = document.getelementbyid('my-video'); myvideo.playbackrate = 2;</
textarea> var
textarea = document.getelementbyid('code'); var reset = document.getelementbyid('reset'); var edit = document.getelementbyid('edit'); var code =
textarea.value; function setplaybackrate() { eval(
textarea.value); } reset.addeventlistener('click', function() { tex...
...And 11 more matches
Tabbed browser - Archive of obsolete content
here you should find a set of useful code snippets to help you work with firefox's tabbed browser. the comments normally mark where you should be inserting your own code. each snippet normally includes some code to run at initialization, these are best run using a load listener. these snippets assume they are run in the con
text of a browser window. if you need to work with tabs from a non-browser window, you need to obtain a reference to one first, see working with windows in chrome code for details. multiple meanings for the word 'browser' the word 'browser' is used several ways. of course the entire application firefox is called "a browser". within the firefox browser are tabs and inside each tab is a browser, both in the common sense of a web page browser and the xul sense of a b...
...ow with the window pre-defined variable. however, if your code is executed from its own window (for example, a settings/options dialog), you can use nsiwindowmediator to get a browser's window. next, get the <tabbrowser/> element. you can get it with win.gbrowser, where win is the browser's window from the previous step. you can use simply gbrowser instead of window.gbrowser if running in the con
text of a browser.xul overlay. finally, use gbrowser.browsers.length to get the number of browsers and gbrowser.getbrowseratindex() to get a <browser/> element. for example: var num = gbrowser.browsers.length; for (var i = 0; i < num; i++) { var b = gbrowser.getbrowseratindex(i); try { dump(b.currenturi.spec); // dump urls of all open tabs to console } catch(e) { components.utils.repor...
...ser that fires the http-on-modify-request notification see the observer notifications page for information on http-on-* notifications. note that some http requests aren't associated with a tab; for example, rss feed updates, extension manager requests, xhr requests from xpcom components, etc. in those cases, the following code returns null. warning: this code should be updated to use nsiloadcon
text instead of getinterface(components.interfaces.nsidomwindow). updated example is in section below this observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { subject.queryinterface(components.interfaces.nsihttpchannel); var url = subject.uri.spec; /* url being requested. you might want this for something else */ var browser = this.getbrowserfromchannel(s...
...And 10 more matches
Documentation for BiDi Mozilla - Archive of obsolete content
this is preliminary documentation of the changes introduced to mozilla as part of the bidi support contributed by ibm (a.k.a. ibmbidi), written by simon montagu and posted to the mozilla-layout mailing list. while it was published in 2001 and might not be totally accurate, it does help understanding the internals of the bidi code. overview of bidi processing bidi
text is reordered according to the unicode bidi algorithm (uba). the implementation is based on ibm's international components for unicode (icu), which was chosen after comparing and testing the available open-source implementations. as far as we could discover, icu is the only one which is 100% compatible with uba, including support for explicit directional controls (lro, rlo, etc, and their html equivalents). bidi process...
...le open-source implementations. as far as we could discover, icu is the only one which is 100% compatible with uba, including support for explicit directional controls (lro, rlo, etc, and their html equivalents). bidi processing for a given html document will only take place if one of the following is true: the page includes a hebrew or arabic character or a hindi digit. this is determined in ns
textfragment::setto the page includes a element with the attribute dir=rtl, either explicitly (nsgenerichtmlelement::mapcommonattributesinto), or as a consequence of a style rule (mapdeclaration
textinto in nscssstylerule.cpp) all these cases use nsdocument::enablebidi to set the flag mbidienabled. in a bidi-enabled document, the following things happen: during a reflow, nsbidipresutils::resolve is c...
...explicitly (nsgenerichtmlelement::mapcommonattributesinto), or as a consequence of a style rule (mapdeclaration
textinto in nscssstylerule.cpp) all these cases use nsdocument::enablebidi to set the flag mbidienabled. in a bidi-enabled document, the following things happen: during a reflow, nsbidipresutils::resolve is called. this method uses the uba to determine the directional properties of the
text and reorder frames if necessary. if necessary,
text frames are split so that every frame has the same directionality. framemanager::setframeproperty is used to set the following flags and pointers (for terminology see the specification of the uba): embeddinglevel: the embedding level of the frame
textclass: the
text class of the frame. baselevel: the base level (direction) of the paragraph.next...
...And 10 more matches
Element Positioning - Archive of obsolete content
by the layout style of its container. for example, the position of a button in a horizontal box is to the right of the previous button, if any. the size of an element is determined by two factors, the size that the element wants to be and the size you specify. the size that an element wants to be is determined by what is in the element. for example, a button's width is determined by the amount of
text inside the button. an element will generally be as large as it needs to be to hold its contents, and no larger. some elements, such as
textboxes have a default size, which will be used. a box will be large enough to hold the elements inside the box. a horizontal box with three buttons in it will be as wide as the three buttons, plus a small amount of padding. in the image, the first two butto...
... as large as it needs to be to hold its contents, and no larger. some elements, such as
textboxes have a default size, which will be used. a box will be large enough to hold the elements inside the box. a horizontal box with three buttons in it will be as wide as the three buttons, plus a small amount of padding. in the image, the first two buttons have been given a suitable size to hold their
text. the third button is larger because it contains more content. the width of the box containing the buttons is the total width of the buttons plus the padding between them. the height of the buttons is a suitable size to hold the
text. width and height attributes you may need to have more control over the size of an element in a window. there are a number of features that allow you to control the...
...grow larger than that maximum size. if a box has a minimum width or height, the children cannot shrink smaller than that minimum size. examples of setting widths and heights <button label="1" style="width: 100px;"/> <button label="2" style="width: 100em; height: 10px;"/> <button label="3" flex="1" style="min-width: 50px;"/> <button label="4" flex="1" style="min-height: 2ex; max-width: 100px"/> <
textbox flex="1" style="max-width: 10em;"/> <description style="max-width: 50px">this is some boring but simple wrapping
text.</description> example 1 the first button will be displayed with a width of 100 pixels (px means pixels). you need to add the unit or the width will be ignored. example 2 the second button will be displayed with a height of ten pixels and a width of 100 ems (an em is t...
...And 10 more matches
Client-side form validation - Learn web development
features of html5 form controls is the ability to validate most user data without relying on javascript. this is done by using validation attributes on form elements. we've seen many of these earlier in the course, but to recap: required: specifies whether a form field needs to be filled in before the form can be submitted. minlength and maxlength: specifies the minimum and maximum length of
textual data (strings) min and max: specifies the minimum and maximum values of numerical input types type: specifies whether the data needs to be a number, an email address, or some other specific preset type. pattern: specifies a regular expression that defines a pattern the entered data needs to follow. if the data entered in a form field follows all of the rules specified by the above attrib...
...match, rangeoverflow or rangeunderflow, stepmismatch, toolong or tooshort, typemismatch, valuemissing, or a customerror. built-in form validation examples in this section, we'll test out some of the attributes that we discussed above. simple start file let's start with a simple example: an input that allows you to choose whether you prefer a banana or a cherry. this example involves a simple
text <input> with an associated <label> and a submit <button>. find the source code on github at fruit-start.html and a live example below. <form> <label for="choose">would you prefer a banana or cherry?</label> <input id="choose" name="i_like"> <button>submit</button> </form> input:invalid { border: 2px dashed red; } input:valid { border: 2px solid black; } to begin, make a copy of fr...
...ccessibility guidelines. also, only require users to input data you actually need: for example, why do you really need to know someone's gender or title? validating against a regular expression another useful validation feature is the pattern attribute, which expects a regular expression as its value. a regular expression (regex) is a pattern that can be used to match character combinations in
text strings, so regexs are ideal for form validation and serve a variety of other uses in javascript. regexs are quite complex, and we don't intend to teach you them exhaustively in this article. below are some examples to give you a basic idea of how they work. a — matches one character that is a (not b, not aa, and so on). abc — matches a, followed by b, followed by c. ab?c—matches a, o...
...And 10 more matches
How to structure a web form - Learn web development
orm even if it is not nested inside it. let's move forward and cover the structural elements you'll find nested in a form. the <fieldset> and <legend> elements the <fieldset> element is a convenient way to create groups of widgets that share the same purpose, for styling and semantic purposes. you can label a <fieldset> by including a <legend> element just below the opening <fieldset> tag. the
text content of the <legend> formally describes the purpose of the <fieldset> it is included inside. many assistive technologies will use the <legend> element as if it is a part of the label of each control inside the corresponding <fieldset> element. for example, some screen readers such as jaws and nvda will speak the legend's content before speaking the label of each control. here is a little exa...
... is the formal way to define a label for an html form widget. this is the most important element if you want to build accessible forms — when implemented properly, screenreaders will speak a form element's label along with any related instructions, as well as it being useful for sighted users. take this example, which we saw in the previous article: <label for="name">name:</label> <input type="
text" id="name" name="user_name"> with the <label> associated correctly with the <input> via its for attribute (which contains the <input> element's id attribute), a screenreader will read out something like "name, edit
text". there is another way to associate a form control with a label — nest the form control within the <label>, implicitly associating it. <label for="name"> name: <input type=...
... id="name" name="user_name"> with the <label> associated correctly with the <input> via its for attribute (which contains the <input> element's id attribute), a screenreader will read out something like "name, edit
text". there is another way to associate a form control with a label — nest the form control within the <label>, implicitly associating it. ...
...And 10 more matches
Silly story generator - Learn web development
ch as variables, numbers, operators, strings, and arrays. starting point to get this assessment started, you should: go and grab the html file for the example, save a local copy of it as index.html in a new directory somewhere on your computer, and do the assessment locally to begin with. this also has the css to style the example contained within it. go to the page containing the raw
text and keep this open in a separate browser tab somewhere. you'll need it later. alternatively, you could use a site like jsbin or glitch to do your assessment. you could paste the html, css and javascript into one of these online editors. if the online editor you are using doesn't have a separate javascript panel, feel free to put it inline in a <script> element inside the html page. note: if y...
...ml, css and javascript into one of these online editors. if the online editor you are using doesn't have a separate javascript panel, feel free to put it inline in a <script> element inside the html page. note: if you get stuck, then ask us for help — see the assessment or further help section at the bottom of this page. project brief you have been provided with some raw html/css and a few
text strings and javascript functions; you need to write the necessary javascript to turn this into a working program, which does the following: generates a silly story when the "generate random story" button is pressed. replaces the default name "bob" in the story with a custom name, only if a custom name is entered into the "enter custom name"
text field before the generate button is pressed. c...
... the source code!) steps to complete the following sections describe what you need to do. basic setup: create a new file called main.js, in the same directory as your index.html file. apply the external javascript file to your html by inserting a <script> element into your html referencing main.js. put it just before the closing </body> tag. ...
...And 10 more matches
Software accessibility: Where are we today?
nts has been microsoft, first with ms dos, followed by variants of microsoft windows. these operating systems were not designed with the needs of people with disabilities in mind. many, including those who were blind or physically disabled, were unable to use applications which were written for microsoft operating systems. these applications assumed that computer users could: read and react to
text and images displayed on the screen. type on a standard keyboard. select
text, pictures, and other information using a mouse react to sounds played. this tends to be somewhat less of a limitation in that most software doesn't rely exclusively on audio to relay feedback. if a person was unable to do one of the above-listed tasks, they found themselves unable to use many popular computer appl...
...ou add all these groups of people together, that's a lot of potential users! in answer to this problem, many small accessibility hardware and software vendors created products and software which helped people who could not perform one of the four basic tasks to use common computer applications. ...
... of potential users! in answer to this problem, many small accessibility hardware and software vendors created products and software which helped people who could not perform one of the four basic tasks to use common computer applications. ...
...And 10 more matches
Debugging Frame Reflow
the previous and the next frame in flow and a count number. when the frame's reflow is finished the following information is displayed : reflow metric (desired) width, height max. element width maximum width frame status overflow area getting the log make sure that your build is a debug build (in short you need ac_add_options --enable-debug in your .mozconfig file). create a
text file (for instance reflow_rules.txt). enter this line in the
text file * 1 this should look like: point the gecko_display_reflow_rules_file environment variable to the path of the reflow_rules.txt file. run the debug build, saving stdout to a file. on mac this is accomplished with: $ env dyld_library_path="`pwd`/obj-ff-dbg/dist/nightlydebug.app/contents/ma...
...ff-dbg/dist/nightlydebug.app/contents/macos" \ ./obj-ff-dbg/dist/nightlydebug.app/contents/macos/firefox-bin > logfile.txt after loading your testcase, the log file will contain the promised information. ...
...dy> <table width="100"> <tbody> <tr> <td>foo</td> </tr> </tbody> </table> </body> </html> will create the following log: vp 00b97c30 r=0 a=9180,4470 c=9180,4470 cnt=856 scroll 00b97ee0 r=0 a=9180,4470 c=9180,4470 cnt=857 scroll 00b97ee0 r=0 a=9180,4470 c=9180,4470 cnt=858 canvas 00b97c6c r=0 a=9180,uc c=9180,4470 cnt=859 area 02d7afe4 r=0 a=9180,uc c=9180,uc cnt=860
text 02d7b150 r=0 a=9180,uc c=uc,uc cnt=861
text 02d7b150 d=0,0 block 02d7b210 r=0 a=9180,uc c=8940,uc cnt=862 block 02d7b210 d=8940,0 area 02d7afe4 d=9180,120 canvas 00b97c6c d=9180,4470 scroll 00b97ee0 d=9180,4470 scroll 00b97ee0 d=9180,4470 vp 00b97c30 d=9180,4470 vp 00b97c30 r=1 a=9180,4470 c=9180,4470 cnt=863 scroll 00b97ee0 r=1 a=9180,4470 c=9180,4470 cnt=864 scroll 00b97ee0...
...And 10 more matches
sample2
\nusage: %s %s \n\n", progname, "-d -d <dbdirpath> -b <headerfilename> -e <encryptfilename> -o <opfilename>\n"); exit(-1); } } /* * sign the contents of input file using private key and * return result as secitem */ secstatus signdata(const char *infilename, seckeyprivatekey *pk, secitem *res) { secstatus rv = secfailure; unsigned int nb; unsigned char ibuf[4096]; prfiledesc *infile = null; sgncon
text *sgn = null; /* open the input file for reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for reading.\n", infilename); rv = secfailure; goto cleanup; } /* sign using private key */ sgn = sgn_newcon
text(sec_oid_pkcs1_md5_with_rsa_encryption, pk); if (!sgn) { pr_fprintf(pr_stderr, "unable to create con
text for signing\n"); rv = secfa...
...le sgn_begin\n"); goto cleanup; } while ((nb = pr_read(infile, ibuf, sizeof(ibuf))) > 0) { rv = sgn_update(sgn, ibuf, nb); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_update\n"); goto cleanup; } } rv = sgn_end(sgn, res); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_end\n"); goto cleanup; } cleanup: if (infile) { pr_close(infile); } if (sgn) { sgn_destroycon
text(sgn, pr_true); } return rv; } /* * verify the signature using public key */ secstatus verifydata(const char *infilename, seckeypublickey *pk, secitem *sigitem, secupwdata *pwdata) { unsigned int nb; unsigned char ibuf[4096]; secstatus rv = secfailure; vfycon
text *vfy = null; prfiledesc *infile = null; /* open the input file for reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) {...
...publickey *pk, secitem *sigitem, secupwdata *pwdata) { unsigned int nb; unsigned char ibuf[4096]; secstatus rv = secfailure; vfycon
text *vfy = null; prfiledesc *infile = null; /* open the input file for reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for reading.\n", infilename); rv = secfailure; goto cleanup; } vfy = vfy_createcon
text(pk, sigitem, sec_oid_pkcs1_md5_with_rsa_encryption, pwdata); if (!vfy) { pr_fprintf(pr_stderr, "unable to create con
text for verifying signature\n"); rv = secfailure; goto cleanup; } rv = vfy_begin(vfy); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while vfy_begin\n"); goto cleanup; } while ((nb = pr_read(infile, ibuf, sizeof(ibuf))) > 0) { rv = vfy_update(vfy, ibuf, nb); if (rv != secs...
...And 10 more matches
NSS functions
4 and later cert_filtercertlistforusercerts mxr 3.6 and later cert_findcertbydercert mxr 3.2 and later cert_findcertbyissuerandsn mxr 3.2 and later cert_findcertbynickname mxr 3.2 and later cert_findcertbynicknameoremailaddr mxr 3.2 and later cert_findcertbysubjectkeyid mxr 3.7 and later cert_findcer
textension mxr 3.4 and later cert_findcertissuer mxr 3.3 and later cert_findkeyusageextension mxr 3.4 and later cert_findsmimeprofile mxr 3.2 and later cert_findsubjectkeyidextension mxr 3.7 and later cert_findusercertbyusage mxr 3.4 and later cert_findusercertsbyusage mxr 3.4 and later cert_finish...
...rt_formatname mxr 3.2 and later cert_freedistnames mxr 3.2 and later cert_freenicknames mxr 3.2 and later cert_getavatag mxr 3.2 and later cert_getcertchainfromcert mxr 3.4 and later cert_getcertemailaddress mxr 3.2 and later cert_getcertificatenames mxr 3.10 and later cert_getcertificatereques
textensions mxr 3.10 and later cert_getcertissuerandsn mxr 3.2 and later cert_getcertnicknames mxr 3.2 and later cert_getcerttrust mxr 3.2 and later cert_getcertuid mxr 3.2 and later cert_getclassicocspdisabledpolicy mxr 3.12 and later cert_getclassicocspenabledhardfailurepolicy mxr 3.12 and later ...
...rtlistnode mxr 3.6 and later cert_rfc1485_escapeandquote mxr 3.2 and later cert_savesmimeprofile mxr 3.2 and later cert_setsloptime mxr 3.2 and later cert_setocspfailuremode mxr 3.11.7 and later cert_setocsptimeout mxr 3.12 and later cert_setusepkixforvalidation mxr 3.12 and later cert_startcer
textensions mxr 3.5 and later cert_startcertificaterequestattributes mxr 3.10 and later cert_startcrlentryextensions mxr 3.10 and later cert_startcrlextensions mxr 3.10 and later cert_uncachecrl mxr 3.10 and later cert_verifycertname mxr 3.2 and later cert_verifycacertforusage mxr 3.6 and later cer...
...And 10 more matches
Gecko events
rted: yes event_menupopup_end a pop-up menu has been closed. is supported: yes event_capture_start a window has received mouse capture. is supported: no event_capture_end a window has lost mouse capture. is supported: no event_movesize_start a window is being moved or resized. ...
...menu has been closed. is supported: yes event_capture_start a window has received mouse capture. is supported: no event_capture_end a window has lost mouse capture. is supported: no event_movesize_start a window is being moved or resized. ...
...re_start a window has received mouse capture. is supported: no event_capture_end a window has lost mouse capture. is supported: no event_movesize_start a window is being moved or resized. ...
...And 10 more matches
nsIAccessibleEvent
n displayed. event_menupopup_end 0x001b 0x0018 a pop-up menu has been closed. event_capture_start 0x001c 0x0019 a window has received mouse capture. event_capture_end 0x001d 0x001a a window has lost mouse capture. event_movesize_start 0x001e 0x001b a window is being moved or resized. event_movesize_end 0x001f 0x001c the movement or resizing of a window has finished. event_con
texthelp_start 0x0020 0x001d a window has entered con
text-sensitive help mode. event_con
texthelp_end 0x0021 0x001e a window has exited con
text-sensitive help mode. event_dragdrop_start 0x0022 0x001f an application is about to enter drag-and-drop mode. event_dragdrop_end 0x0023 0x0020 an application is about to exit drag-and-drop mode. event_dialog_start 0x0024 0x0021 a dialog box has...
...ed. event_document_load_stopped 0x002d 0x0029 the loading of the document was interrupted. event_document_attributes_changed 0x002e 0x002a the document wide attributes of the document object have changed. event_document_content_changed 0x002f 0x002b the contents of the document have changed. ...
...d 0x0029 the loading of the document was interrupted. event_document_attributes_changed 0x002e 0x002a the document wide attributes of the document object have changed. event_document_content_changed 0x002f 0x002b the contents of the document have changed. event_property_changed 0x0030 0x002c event_selection_changed 0x0031 0x002d event_
text_attribute_changed 0x0032 0x002e a
text object's attributes changed. also see event_object_attribute_changed. event_
text_caret_moved 0x0033 0x002f the caret has moved to a new position. event_
text_changed 0x0034 0x0030 this event indicates general
text changes. that is, changes to
text that is exposed through the iaccessible
text and iaccessibleeditable
text interfaces. event_
text_inserted 0x0035 0x0031
text was inserted. e...
...And 10 more matches
nsIAutoCompleteInput
toolkit/components/autocomplete/public/nsiautocompleteinput.idlscriptable this interface monitors the input in a
text field and displays an autocomplete panel at the appropriate time. ...
.../nsiautocompleteinput.idlscriptable this interface monitors the input in a
text field and displays an autocomplete panel at the appropriate time. ...
...s interface monitors the input in a
text field and displays an autocomplete panel at the appropriate time. inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview acstring getsearchat(in unsigned long index); void onsearchbegin(); void onsearchcomplete(); boolean on
textentered(); boolean on
textreverted(); void select
textrange(in long startindex, in long endindex); attributes attribute type description completedefaultindex boolean if a search result has its defaultindex set, this will optionally try to complete the
text in the
textbox to the entire
text of the result at the default index as the user types. th...
...And 10 more matches
nsIWebSocketListener
netwerk/protocol/websocket/nsiwebsocketlistener.idlscriptable implement this interface to receive websocket traffic events asynchronously after calling nsiwebsocketchannel.asyncopen(). ...
...ace to receive websocket traffic events asynchronously after calling nsiwebsocketchannel.asyncopen(). ...
...cketchannel.asyncopen(). 1.0 66 introduced gecko 8.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void onacknowledge(in nsisupports acon
text, in pruint32 asize); void onbinarymessageavailable(in nsisupports acon
text, in acstring amsg); void onmessageavailable(in nsisupports acon
text, in autf8string amsg); void onserverclose(in nsisupports acon
text, in unsigned short acode, in autf8string areason); void onstart(in nsisupports acon
text); void onstop(in nsisupports acon
text, in nsresult astatuscode); methods onacknowledge() called to acknowledge a message sent via nsiwebsocketchannel.sendmsg() or nsiwebsocketchannel.sendbinarymsg(). void onackno...
...And 10 more matches
Accessibility Inspector - Firefox Developer Tools
ection, or their geographic location or locale. you can find more extensive information in the accessibility section of mdn web docs. here we are mainly talking about exposing information to people with visual disabilities — this is done via the accessibility apis available inside web browsers, which expose information on what roles the different elements on your page play (e.g., are they just
text, or are they buttons, links, form elements, etc.?). semantic dom elements have roles assigned to them by default that hint at what their purpose is. sometimes, however, you need to use some non-semantic markup (e.g., <div>s) to build a complex custom control, and the control won't have a default role that reflects its purpose. in such a situation, you can use wai-aria role attributes to provide ...
...cally using it. when first implemented, the accessibility engine had to be explicitly turned on. starting in firefox 79, it is automatically enabled when you do one of the following: choose accessibility in the tools > web developer menu. select the accessibility tab in the developer tools toolbox. right-click in the main browser window, and choose inspect accessibility properties in the con
text menu. right-click an item in the html pane of the page inspector, and choose show accessibility properties in the con
text menu. once activated, the accessibility engine remains running until you close the developer tools toolbox. if you don't wish to allow the accessibility features to be automatically enabled, you can use the configuration editor (also known as about:config) to define the pr...
...reveal the children, so you can move deeper into the hierarchy. each item has two properties listed: role — the role this item has on the page (e.g., pushbutton, or footer). this can be either a default role provided by the browser, or a role given to it via a wai-aria role attribute. name — the name this item has on the page. the name depends on the element; for example, the name of most
text elements is simply their
textcontent, whereas form elements' names are the contents of their associated <label>. on the right-hand side, you can see further information about the currently selected item. the listed properties are as follows: name — the item's name, as described above. role — the item's role, as described above. actions — a list of actions that can be performed on the...
...And 10 more matches
AbstractRange - Web APIs
a collapsed range is one whose start position and end posit...
...a collapsed range is one whose start position and end position are the same, resulting in a zero-character-long range. endcontainer read only the dom node in wh...
...a collapsed range is one whose start position and end position are the same, resulting in a zero-character-long range. endcontainer read only the dom node in which the end of the range, as specified by the endoffset property...
...And 10 more matches
DocumentOrShadowRoot.activeElement - Web APIs
if so, you can get more detail by using the object's selectionstart and selectionend properties. other times the focused element might be a <select> element (menu) or an <input> element, of type "button", "checkbox", or "radio". ...
...if so, you can get more detail by using the object's selectionstart and selectionend properties. other times the focused element might be a <select> element (menu) or an <input> element, of type "button", "checkbox", or "radio". ...
... element, of type "button", "checkbox", or "radio". typically a user can press the tab key to move the focus around the page among focusable elements, and use the space bar to activate one (that is, to press a button or toggle a radio button). which elements are focusable varies depending on the platform and the browser's current configuration. for example, on macos systems, elements that aren't
text input elements are not typically focusable by default. note: focus (which element is receiving user input events) is not the same thing as selection (the currently highlighted part of the document). you can get the current selection using window.getselection(). syntax element = documentorshadowroot.activeelement value the element which currently has focus, <body> or null if there is no foc...
...And 10 more matches
Element - Web APIs
lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...it implements the properties of par...
...And 10 more matches
Timing element visibility with the Intersection Observer API - Web APIs
article, we'll build a mock blog which has a number of ads interspersed among the contents of the page, then use the intersection observer api to track how much time each ad is visible to the user. when an ad exceeds one minute of visible time, it will be replaced with a new one. although many aspects of this example will not match real world usage (in particular, the articles all have the same
text and aren't loaded from a database, and there are just a handful of simple
text-only ads that are selected from an array), this should provide enough understanding of the api to quickly learn how to apply the intersection observer api to your own site. there's a good reason why the notion of tracking visibility of ads is being used in this example. it turns out that one of the most common uses of...
...the rows are sized the same way as the columns: the first one is automatically sized and the one uses the remaining space, but at least enough space to provide room for all elements within it. the wrapper's width is fixed at 700px so that it will fit in the available space when presented inline on mdn below. the header the header is fairly simple, since for this example all it contains is some
text. its style looks like this: header { grid-column: 1 / -1; grid-row: 1; background-color: aliceblue; } grid-row is set to 1, since we want the header to be placed in the top row of the site's grid. more interesting is our use of grid-column here; here we specify that we want the column to start in the first column and ends in the first column past the last grid line—in other words, the h...
... other pages on the site. none of them work in our example here, but they exist to help with the presentation of a blog-like experience. the sidebar is represented using an <aside> element, and is styled as follows: aside { grid-column: 1; grid-row: 2; background-color: cornsilk; padding: 5px 10px; } aside ul { padding-left: 0; } aside ul li { list-style: none; } aside ul li a {
text-decoration: none; } the most important thing to note here is that the grid-column is set to 1, to place the sidebar on the left-hand side of the screen. if you change this to -1, it will appear on the right (although some other elements will need some adjustments made to their margins to get the spacing just right). the grid-row is set to 2, to place it alongside the site body. the content body...
...And 10 more matches
Capabilities, constraints, and settings - Web APIs
sing are shown in the boxes on the right. ...
...l of that, you'll see the video itself.</p> <p>click the "start" button to begin.</p> <h3>constrainable properties available:</h3> <ul id="supportedconstraints"> </ul> <div id="startbutton" class="button"> start </div> <div class="wrapper"> <div class="trackrow"> <div class="leftside"> <h3>requested video constraints:</h3> <
textarea id="videoconstrainteditor" cols=32 rows=8></
textarea> </div> <div class="rightside"> <h3>actual video settings:</h3> <
textarea id="videosettings
text" cols=32 rows=8 disabled></
textarea> </div> </div> <div class="trackrow"> <div class="leftside"> <h3>requested audio constraints:</h3> <
textarea id="audioconstrainteditor" cols=32 rows=8></
textarea> </div> <div class="rightside"> <h3>actual ...
...ass="rightside"> <h3>actual video settings:</h3> <
textarea id="videosettings
text" cols=32 rows=8 disabled></
textarea> </div> </div> <div class="trackrow"> <div class="leftside"> <h3>requested audio constraints:</h3> <
textarea id="audioconstrainteditor" cols=32 rows=8></
textarea> </div> <div class="rightside"> <h3>actual audio settings:</h3> <
textarea id="audiosettings
text" cols=32 rows=8 disabled></
textarea> </div> </div> <div class="button" id="applybutton"> apply constraints </div> </div> <video id="video" autoplay></video> <div class="button" id="stopbutton"> stop video </div> <div id="log"> </div> css content body { font: 14px "open sans", "arial", sans-serif; } video { margin-top: 20px; border: 1px solid b...
...And 10 more matches
OVR_multiview2 - Web APIs
api and adds support for rendering into multiple views simultaneously. this especially useful for virtual reality (vr) and webxr. for more information, see also: multiview on webxr three.js multiview demo multiview in babylon.js optimizing virtual reality: understanding multiview multiview webgl rendering for oculus browser 6.0+ webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: support depends on the system's graphics driver (windows+angle and android are supported; windows+gl, mac, linux are not supported). this extension is only available to webgl 2 con
texts as it needs glsl 3.00 and
texture arrays. currently, there is no way to use multiview to render to a ...
... also using extensions in the webgl tutorial. availability: support depends on the system's graphics driver (windows+angle and android are supported; windows+gl, mac, linux are not supported). this extension is only available to webgl 2 con
texts as it needs glsl 3.00 and
texture arrays. currently, there is no way to use multiview to render to a multisampled backbuffer, so you should create con
texts with antialias: false. however, the oculus browser (6+) also supports multisampling using the oculus_multiview extension. see also this webgl issue. constants this extension exposes 4 constants that can be used in getparameter() or getframebufferattachmentparameter(). framebuffer_attachment_
texture_num_views_ovr number of views of the framebuffer object attachment. framebuffer_attachment...
... with antialias: false. however, the oculus browser (6+) also supports multisampling using the oculus_multiview extension. see also this webgl issue. constants this extension exposes 4 constants that can be used in getparameter() or getframebufferattachmentparameter(). framebuffer_attachment_
texture_num_views_ovr number of views of the framebuffer object attachment. framebuffer_attachment_
texture_base_view_index_ovr base view index of the framebuffer object attachment. max_views_ovr the maximum number of views. most vr headsets have two views, but there are prototypes of headset with ultra-wide fov using 4 views which is currently the maximum number of views supported by multiview. framebuffer_incomplete_view_targets_ovr if baseviewindex is not the same for all framebuffer attachm...
...And 10 more matches
vertical-align - CSS: Cascading Style Sheets
the vertical-align css property sets vertical alignment of an inline, inline-block or table-cell box. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...ple is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. the vertical-align property can be used in two con
texts: to vertically align an inline element's box inside its containing line box. ...
...al-align:middle" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> bottom:<img style="vertical-align:bottom" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> super:<img style="vertical-align:super" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> sub:<img style="vertical-align:sub" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> </p> <p>
text-top:<img style="vertical-align:
text-top" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/>
text-bottom:<img style="vertical-align:
text-bottom" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> 0.2em:<img style="vertical-align:0.2em" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> -1em:<img style="vertical-align:-1em" src="https://udn.realityripple.com...
...And 10 more matches
Lexical grammar - JavaScript
this page describes javascript's lexical grammar. the source
text of ecmascript scripts gets scanned from left to right and is converted into a sequence of input elements which are tokens, control characters, line terminators, comments or white space. ecmascript also defines certain keywords and literals and has rules for automatic insertion of semicolons to end statements. control characters control characters have no visual representation but are used to control the interpretation of the
text. unicode format-control characters code point name abbreviation description u+200c zero width non-joiner <zwnj> placed between characters to prevent being connected into ligatures in certain languages (wikipedia). u+200d zero width joiner <zwj>...
...vent being connected into ligatures in certain languages (wikipedia). u+200d zero width joiner <zwj> placed between characters that would not normally be connected in order to cause the characters to be rendered using their connected form in certain languages (wikipedia). u+feff byte order mark <bom> used at the start of the script to mark it as unicode and the
text's byte order (wikipedia). white space white space characters improve the readability of source
text and separate tokens from each other. these characters are usually unnecessary for the functionality of the code. minification tools are often used to remove whitespace in order to reduce the amount of data that needs to be transferred. white space characters code point name ...
... \f u+0020 space <sp> normal space u+00a0 no-break space <nbsp> normal space, but no point at which a line may break others other unicode space characters <usp> spaces in unicode on wikipedia line terminators in addition to white space characters, line terminator characters are used to improve the readability of the source
text. however, in some cases, line terminators can influence the execution of javascript code as there are a few places where they are forbidden. line terminators also affect the process of automatic semicolon insertion. line terminators are matched by the \s class in regular expressions. only the following unicode code points are treated as line terminators in ecmascript, other line breaking charact...
...And 10 more matches
<feMorphology> - SVG: Scalable Vector Graphics
the <femorphology> svg filter primitive is used to erode or dilate the input image. its usefulness lies especially in fattening or thinning effects. usage con
text categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes in operator radius dom interface this element implements the svgfemorphologyelement interface. examples filtering svg content svg <svg xmlns="http://www.w3.org/2000/svg" width="300" height="180"> <filter id="erode"> <femorphology operator="erode" radius="1"/> </filter> <filter id="dilate"> <femorphology operator="dilate" radius="2"/> </filter> <te...
...es in operator radius dom interface this element implements the svgfemorphologyelement interface. ...
...in operator radius dom interface this element implements the svgfemorphologyelement interface. ...
...And 10 more matches
Introduction to using XPath in JavaScript - XPath
es xpath expressions against an xml based document (including html documents), and returns a xpathresult object, which can be a single node or a set of nodes. the existing documentation for this method is located at document.evaluate, but it is rather sparse for our needs at the moment; a more comprehensive examination will be given below. var xpathresult = document.evaluate( xpathexpression, con
textnode, namespaceresolver, resulttype, result ); parameters the evaluate function takes a total of five parameters: xpathexpression: a string containing the xpath expression to be evaluated. con
textnode: a node in the document against which the xpathexpression should be evaluated, including any and all of its child nodes. the document node is the most commonly used. namespaceresolver: a func...
...s. specifying null will create a new xpathresult object. return value returns xpathresult, which is an xpathresult object of the type specified in the resulttype parameter. the xpathresult interface is defined here. implementing a default namespace resolver we create a namespace resolver using the creatensresolver method of the document object. ...
... xpathresult object. return value returns xpathresult, which is an xpathresult object of the type specified in the resulttype parameter. the xpathresult interface is defined here. implementing a default namespace resolver we create a namespace resolver using the creatensresolver method of the document object. ...
...And 10 more matches
Storing annotations - Archive of obsolete content
first, import the simple-storage module with a declaration like: var simplestorage = require('sdk/simple-storage'); in the module scope, initialize an array which will contain the stored annotations: if (!simplestorage.storage.annotations) simplestorage.storage.annotations = []; now we'll add a function to the module scope which deals with a new annotation. ...
...an array which will contain the stored annotations: if (!simplestorage.storage.annotations) simplestorage.storage.annotations = []; now we'll add a function to the module scope which deals with a new annotation. ...
...estorage.storage.annotations) simplestorage.storage.annotations = []; now we'll add a function to the module scope which deals with a new annotation. ...
...And 9 more matches
CSS3 - Archive of obsolete content
3 formally defines the syntax of the content of the html style global attribute. css fonts module level 3 candidate recommendation since september 20th, 2018 amends the css2.1 font matching algorithm to be closer to what is really implemented. adds: support for downloadable fonts via the css @font-face at-rule. the control of the con
textual inter-glyph spacing via the css font-kerning property. the choice of language-specific glyphs via the css font-language-override property. the choice of glyphs with specific opentype features via the css font-feature-settings property. the control of the aspect ratio to use when fallback fonts are selected via the css font-size-adjust property. the choice of alternative fon...
... the css content property. at risk: due to insufficient browser support, standardization of the icon property and the icon value may be postponed to css4. support for the css outline-offset property giving more control on the position of the outline. support for the css resize property allowing web authors to control if and how elements should be resized. ...
...risk: due to insufficient browser support, standardization of the icon property and the icon value may be postponed to css4. support for the css outline-offset property giving more control on the position of the outline. support for the css resize property allowing web authors to control if and how elements should be resized. support for the css
text-overflow property defining how
text overflows, if needed. ...
...And 9 more matches
Reading from Files - Archive of obsolete content
eam guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes). there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading
textual data, writing
textual data, list of file-related error codes. reading data from a file involves getting a reference to a file and then creating an input stream to read from it. an input stream provides a means of reading bytes, strings or other values from the file. while there is only one method to create an input stream, it provides a number of options to control exactly how reading is perfo...
...eading data from a file involves getting a reference to a file and then creating an input stream to read from it. an input stream provides a means of reading bytes, strings or other values from the file. while there is only one method to create an input stream, it provides a number of options to control exactly how reading is performed. for instance, there are options to read a file as if it were
text or a binary file. using the former will cause characters in the stream to be interpreted with a particular character encoding. in addition, lines may be read by reading the file up until a linefeed character is detected. a binary stream would be used to read bytes or numbers encoded within the file. to create an input stream, first get a reference to a nsifile, and then use nsiscriptableio.newinp...
... linefeed character is detected. a binary stream would be used to read bytes or numbers encoded within the file. to create an input stream, first get a reference to a nsifile, and then use nsiscriptableio.newinputstream() to open a stream for reading from it. to learn more about file objects, see files and streams. var file = io.getfile("home", "sample.txt"); var stream = io.newinputstream(file, "
text"); this example first retrieves a file object using nsiscriptableio.getfile(). in this case, the file 'sample.txt' within the user's home directory is retrieved. next, nsiscriptableio.newinputstream() is called to create a new input stream for reading from the file. this method will open the file and return a stream. naturally, if the file does not exist, an error will occur. you may wish to use...
...And 9 more matches
Popup Menus - Archive of obsolete content
appear. plain popups the plain popup is a popup window which appears when the user presses the left mouse button on an element. they are much like the menus on the menu bar, except that they can be placed anywhere and can contain any content. a good example is the drop down menu that appears when you click on the little down arrows next to the back and forward buttons in a browser window. con
text popups the con
text popup is a popup window which appears when the user presses the con
text menu button, which is usually the right mouse button. the exact way that a con
text menu is opened varies on each platform. on the macintosh for example, the user can either press the control key and click the mouse button, or hold the mouse button down for a moment. also note that it is possible to open co...
... tooltips a tooltip popup window will appear when the user hovers over an element with the mouse. this type of popup is usually used to provide a description of a button in more detail than can be provided on the button itself. all three types of popups differ in the way that the user invokes them. ...
... it should appear. we do this because we only want the popup to appear when the user clicks in a certain area of a window. typically, this will be a specific button or a box. to associate the popup with an element, you add one of three attributes to the element. the attribute you add depends on which type of popup you want to create. for plain popups, add a popup attribute to the element. ...
...And 9 more matches
XUL controls - Archive of obsolete content
to select a color. <colorpicker color="#ff0000"/> colorpicker reference <colorpicker type="button"> a specialized type of color picker which shows only a button. pressing the button displays a color picker popup window. <colorpicker type="button" color="#cc0080"/> colorpicker reference <datepicker> a set of
textboxes which may be used to allow the entry of a date. <datepicker value="2007/03/26"/> datepicker reference <datepicker type="grid"> a datepicker which displays a calendar grid for selecting a date. <datepicker type="grid" value="2007/02/20"/> datepicker reference <datepicker type="popup" > a datepicker whi...
...ed to allow the entry of a date. <datepicker value="2007/03/26"/> datepicker reference <datepicker type="grid"> a datepicker which displays a calendar grid for selecting a date. <datepicker type="grid" value="2007/02/20"/> datepicker reference <datepicker type="popup" > a datepicker which displays a set of
textboxes for date entry, but also has a button for displaying a popup calendar grid. <datepicker type="popup" value="2008/08/24"/> datepicker reference <description> the description element is used for descriptive
text. <description> select a time for the event to start </description> more information about the description element. ...
...element. groupbox reference related elements: caption <filefield> allows the user to select a file. <filefield/> filefield reference <image> an image specified by a url. <image src="start.png"/> more information about the image element. image reference <label> adds a
text label to a nearby control. <label control="volume" value="volume:"/> more information about the label element. label reference <listbox> the listbox is used to select an item from a list of labelled items. <listbox> <listitem label="chocolate"/> <listitem label="jelly beans"/> </listbox> more information about the listbox elem...
...And 9 more matches
label - Archive of obsolete content
ontrol element. if the user clicks the label, it will move the focus to the associated control, specified with the control attribute. more information is available in the xul tutorial. attributes accesskey, control, crop, disabled, href, value properties accesskey, accessibletype, control, crop, disabled, value style classes header, indent, monospace, plain, small-margin,
text-link examples <label value="email address" control="email"/> <
textbox id="email"/> attributes accesskey type: character this should be set to a character that is used as a shortcut key. this should be one of the characters that appears in the label attribute for the element. control type: id this attribute specifies the id of the element with which the label is as...
... be one of the characters that appears in the label attribute for the element. control type: id this attribute specifies the id of the element with which the label is associated. when the user clicks on the label, the associated element is given focus. ...
...s attribute specifies the id of the element with which the label is associated. when the user clicks on the label, the associated element is given focus. crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left ...
...And 9 more matches
listcell - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a single cell of a listbox. by default it only contains
text but iconic and checkbox listcells are also available. attributes crop, disabled, image, label, type properties disabled style classes listcell-iconic, examples (example needed) attributes crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. ...
... examples (example needed) attributes crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. ...
...s given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left the
text will be cropped on its left side. right the
text will be cropped on its right side. ...
...And 9 more matches
menulist - Archive of obsolete content
m label="option 4" value="4"/> </menupopup> </menulist> attributes accesskey type: character this should be set to a character that is used as a shortcut key. this should be one of the characters that appears in the label attribute for the element. ...
...uld be set to a character that is used as a shortcut key. this should be one of the characters that appears in the label attribute for the element. crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left ...
...tion is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left the
text will be cropped on its left side. right the
text will be cropped on its right side. center the
text will be cropped in the middle, showing both the start and end of the
text normally. none the
text will be not be cropped using an ellipsis. however, the
text will simply be cut off if it is too large. the si...
...And 9 more matches
tree - Archive of obsolete content
eeitem> <treerow> <treecell label="2a"/> <treecell label="ba"/> </treerow> </treeitem> </treechildren> </treeitem> </treechildren> </tree> attributes disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
... use the getrowcount method. seltype type: one of the values below used to indicate whether multiple selection is allowed. single only one row may be selected at a time. (default in listbox and richlistbox.) multiple multiple rows may be selected at once. (default in tree.) for trees, you can also use the following values: cell individual cells can be selected
text rows are selected; however, the selection highlight appears only over the
text of the primary column. for richlistbox, this is new in firefox 3.5. statedatasource type: uri chrome xul may specify an rdf datasource to use to store tree state information. this is used to hold which tree items are open and which items are collapsed. this information will be remembered for the next ti...
...e cell currently being edited, or -1 if there is no cell currently being edited. enablecolumndrag type: boolean when set to true, the user may drag the column headers around to change the order in which they are displayed. firstordinalcolumn type: treecol element a reference to the first treecol element, which or may not be the first column displayed in the tree. inputfield type:
textbox element read-only property that holds the
textbox that is used for editing. seltype type: string gets and sets the value of the seltype attribute. selstyle type: string if set to the value primary, only the label of the primary column will be highlighted when an item in the tree is selected. otherwise, the entire row will be highlighted. to see the diffe...
...And 9 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
also since you know which engine you're targeting, you're free to confidently use advanced built in controls such as xml processing via e4x, xpath, and xslt. let's take a tour through some of the top features of jaxer through code examples. jaxer – server-side ajax via the firefox browser engine on the server altho...
...e server-side, creating a unified “same language” development platform. where once you would need to master not only javascript for the client-side but also some flavor of a server-side web language, jaxer puts all the rich capability of a server-side language into javascript. this accounts for added simplicity and promotes rapid development methodologies. managing con
text to take advantage of all the operating con
texts of jaxer, you'll need to specify how your scripts should behave using the runat attribute of the script tag (or by setting a runat property on a javascript function object). the common values for this attribute are explained below, though there are more than just these. runat=”client” – code contained in this ...
......
...And 9 more matches
Other form controls - Learn web development
previous overview: forms next we now look at the functionality of non-<input> form elements in detail, from other control types such as drop-down lists and multi-line
text fields, to other useful form features such as the <output> element (which we saw in action in the previous article), and progress bars. prerequisites: basic computer literacy, and a basic understanding of html. objective: to understand the non-<input> form features, and how to implement them using html. ...
...l types such as drop-down lists and multi-line
text fields, to other useful form features such as the <output> element (which we saw in action in the previous article), and progress bars. prerequisites: basic computer literacy, and a basic understanding of html. objective: to understand the non-<input> form features, and how to implement them using html. multi-line
text fields a multi-line
text field is specified using a <
textarea> element, rather than using the <input> element. <
textarea cols="30" rows="8"></
textarea> this renders like so: the main difference between a <
textarea> and a regular single line
text field is that users are allowed to include hard line breaks (i.e. ...
...ti-line
text fields a multi-line
text field is specified using a <
textarea> element, rather than using the <input> element. <
textarea cols="30" rows="8"></
textarea> this renders like so: the main difference between a <
textarea> and a regular single line
text field is that users are allowed to include hard line breaks (i.e. pressing return) that will be included when the data is submitted. <
textarea> also takes a closing tag, and any default
text you want it to contain should be put between the opening and closing tags. in contrast, the <input> is an empty element with no closing tag — any default value is put inside the value attribute. ...
...And 9 more matches
Client-side storage - Learn web development
your previous code: // stop the form from submitting when a button is pressed form.addeventlistener('submit', function(e) { e.preventdefault(); }); now we need to add an event listener, the handler function of which will run when the "say hello" button is clicked. the comments explain in detail what each bit does, but in essence here we are taking the name the user has entered into the
text input box and saving it in web storage using setitem(), then running a function called namedisplaycheck() that will handle updating the actual website
text. add this to the bottom of your code: // run function when the 'say hello' button is clicked submitbtn.addeventlistener('click', function() { // store the entered name in web storage localstorage.setitem('name', nameinput.value); // r...
...f the form. if it is false, we display a generic greeting and do the opposite. ...
...ng and do the opposite. ...
...And 9 more matches
Working with JSON - Learn web development
it is commonly used for transmitting data in web applications (e.g., sending some data from the server to the client, so it can be displayed on a web page, or vice versa). you'll come across it quite often, so in this article we give you all you need to work with json using javascript, including parsing json so you can access data within it, and creating json. ...
...data within it, and creating json. prerequisites: basic computer literacy, a basic understanding of html and css, familiarity with javascript basics (see first steps and building blocks) and oojs basics (see introduction to objects). objective: to understand how to work with data stored in json, and create your own json objects. no, really, what is json? json is a
text-based data format following javascript object syntax, which was popularized by douglas crockford. even though it closely resembles javascript object literal syntax, it can be used independently from javascript, and many programming environments feature the ability to read (parse) and generate json. json exists as a string — useful when you want to transmit data across a network. it needs to be...
...the data. this is not a big issue — javascript provides a global json object that has methods available for converting between the two. note: converting a string to a native object is called deserialization, while converting a native object to a string so it can be transmitted across the network is called serialization. a json object can be stored in its own file, which is basically just a
text file with an extension of .json, and a mime type of application/json. json structure as described above, a json is a string whose format very much resembles javascript object literal format. you can include the same basic data types inside json as you can in a standard javascript object — strings, numbers, arrays, booleans, and other object literals. this allows you to construct a data hierar...
...And 9 more matches
Client-Server Overview - Learn web development
here is no real code in the discussion because we haven't yet chosen a web framework to use to write our code! this discussion is however still very relevant, because the described behaviour must be implemented by your server-side code, irrespective of which programming language or web framework you select. web servers and http (a primer) web browsers communicate with web servers using the hyper
text transfer protocol (http). when you click a link on a web page, submit a form, or run a search, the browser sends an http request to the server. this request includes: a url identifying the target server and resource (e.g. an html file, a particular data point on the server, or a tool to run). a method that defines the required action (for example, to get a file or to save or update some data...
...atic and dynamic websites (discussed in the following sections) use exactly the same communication protocol/patterns. get request/response example you can make a simple get request by clicking on a link or searching on a site (like a search engine homepage). for example, the http request that is sent when you perform a search on mdn for the term "client server overview" will look a lot like the
text shown below (it will not be identical because parts of the message depend on your browser/setup). the format of http messages is defined in a "web standard" (rfc7230). you don't need to know this level of detail, but at least now you know where this all came from! the request each line of the request contains information about it. the first part is called the header, and contains useful info...
... body): get https://developer.mozilla.org/search?q=client+server+overview&topic=apps&topic=html&topic=css&topic=js&topic=api&topic=webdev http/1.1 host: developer.mozilla.org connection: keep-alive pragma: no-cache cache-control: no-cache upgrade-insecure-requests: 1 user-agent: mozilla/5.0 (windows nt 10.0; wow64) applewebkit/537.36 (khtml, like gecko) chrome/52.0.2743.116 safari/537.36 accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 referer: https://developer.mozilla.org/ accept-encoding: gzip, deflate, sdch, br accept-charset: iso-8859-1,utf-8;q=0.7,*;q=0.7 accept-language: en-us,en;q=0.8,es;q=0.6 cookie: sessionid=6ynxs23n521lu21b1t136rhbv7ezngie; csrftoken=zipujsazv6pcgcbjscj1zu6pqzbfmuat; dwf_section_edit=false; dwf_sg_task_completion=false; _gat=1; _g...
...And 9 more matches
NSS Sample Code sample2
. */ #include "nss.h" #include "pk11pub.h" /* example key & iv */ unsigned char gkey[] = {0xe8, 0xa7, 0x7c, 0xe2, 0x05, 0x63, 0x6a, 0x31}; unsigned char giv[] = {0xe4, 0xbb, 0x3b, 0xd3, 0xc3, 0x71, 0x2e, 0x58}; int main(int argc, char **argv) { ck_mechanism_type ciphermech; pk11slotinfo* slot = null; pk11symkey* symkey = null; secitem* secparam = null; pk11con
text* enccon
text = null; secitem keyitem, ivitem; secstatus rv, rv1, rv2; unsigned char data[1024], buf1[1024], buf2[1024]; int i, result_len, tmp1_outlen, tmp2_outlen; /* initialize nss * if your application code has already initialized nss, you can skip it * here. * this code uses the simplest of the init functions, which does not ...
...(stderr, "clear data: %s\n", data); /* ========================= start section ============================= */ /* if using the the same key and iv over and over, stuff before this */ /* section and after this section needs to be done only once */ /* encrypt data into buf1. ...
...data: %s\n", data); /* ========================= start section ============================= */ /* if using the the same key and iv over and over, stuff before this */ /* section and after this section needs to be done only once */ /* encrypt data into buf1. ...
...And 9 more matches
Hacking Tips
/js ./foo.js […] spidermonkey unwinder is disabled by default, to enable it type: enable unwinder .* spidermonkey (gdb) b js::math_cos (gdb) run […] #0 js::math_cos (cx=0x14f2640, argc=1, vp=0x7fffffff6a88) at js/src/jsmath.cpp:338 338 callargs args = callargsfromvp(argc, vp); (gdb) enable unwinder .* spidermonkey (gdb) backtrace 10 #0 0x0000000000f89979 in js::math_cos(jscon
text*, unsigned int, js::value*) (cx=0x14f2640, argc=1, vp=0x7fffffff6a88) at js/src/jsmath.cpp:338 #1 0x0000000000ca9c6e in js::calljsnative(jscon
text*, bool (*)(jscon
text*, unsigned int, js::value*), js::callargs const&) (cx=0x14f2640, native=0xf89960 , args=...) at js/src/jscntxtinlines.h:235 #2 0x0000000000c87625 in js::invoke(jscon
text*, js::callargs const&, js::maybeconstruct) (cx=0x14f2640, a...
...:calljsnative(jscon
text*, bool (*)(jscon
text*, unsigned int, js::value*), js::callargs const&) (cx=0x14f2640, native=0xf89960 , args=...) at js/src/jscntxtinlines.h:235 #2 0x0000000000c87625 in js::invoke(jscon
text*, js::callargs const&, js::maybeconstruct) (cx=0x14f2640, args=..., construct=js::no_construct) at js/src/vm/interpreter.cpp:476 #3 0x000000000069bdcf in js::jit::docallfallback(jscon
text*, js::jit::baselineframe*, js::jit::iccall_fallback*, uint32_t, js::value*, js::mutablehandlevalue) (cx=0x14f2640, frame=0x7fffffff6ad8, stub_=0x1798838, argc=1, vp=0x7fffffff6a88, res=jsval_void) at js/src/jit/baselineic.cpp:6113 #4 0x00007ffff7f41395 in <<jitframe_exit>> () #5 0x00007ffff7f42223 in <<jitframe_baselinestub>> () #6 0x00007ffff7f4423d in <<jitframe_baselinejs>> () #7 0x00007ff...
...therefore, the jit frames do not appear until you settle on the next breakpoint. to work-around this issue you can use the recording feature of gdb, to step one instruction, and settle back to where you came fr...
...And 9 more matches
mozITXTToHTMLConv
the mozitxttohtmlconv interface is used to convert
text into html format. its primary use is in converting user-entered
text into properly-formatted html. netwerk/streamconv/public/mozitxttohtmlconv.idlscriptable please add a summary to this article. ...
... constant type description kentitie...
... constant type description kentities unsigned lo...
...And 9 more matches
Activity Manager examples
"].getservice(nsiam); let process = components.classes["@mozilla.org/activity-process;1"].createinstance(nsiap); // assuming folder is an instance of nsimsgfolder interface // localization is omitted, initiator is not provided process.init("processing folder: " + folder.prettiestname, null); // note that we don't define a custom icon, default process icon // will be used process.con
texttype = "account"; // group this activity by account process.con
textobj = folder.server; // account in question gactivitymanager.addactivity(process); // step 2: showing some progress let percent = 50; process.setprogress(percent, "junk processing 25 of 50 messages", 25, 50); // step 3: removing the process and adding an event using process' attributes process.state = components.interfaces...
... // step 1: create a nsiactivitycancelhandler implementation function cancelju...
... // step 1: create a nsiactivitycancelhandler implementation function canceljunkprocess() { // user...
...And 9 more matches
Examine and edit HTML - Firefox Developer Tools
s that element in the page. the breadcrumbs bar has its own keyboard shortcuts. searching the page inspector's search box matches all markup in the current document and in any frames. to start searching the markup, click in the search box to expand it or press ctrl + f , or cmd + f on a mac. there are three types of searches that are performed automatically depending on what you enter, a full
text search, a css selector search, and an xpath search. full
text search the full
text search will always be executed, independently of what you enter. that allows you to find css selectors and xpath expressions occurring within the
text. css selector search you can search elements by entering a css selector. as you type, an autocomplete popup shows any class or id attributes that match the curr...
...ess up and down to cycle through suggestions, tab to choose the current suggestion, then enter to select the first node with that attribute. to cycle through matches, press enter. you can cycle backwards through matches using shift + enter. xpath search it is also possible to search via xpaths. this allows you to search for specific elements without the conflict of matching words within the
text. for example, //a matches all <a> elements but not the letter "a" within the
text content. furthermore it allows for some more advanced searches like finding elements that start with a specific
text, for example. html tree the rest of the pane shows you the page's html as a tree (this ui is also called the markup view). just to the left of each node is an arrow: click the arrow to expand the ...
...efore and ::after you can inspect pseudo-elements added using ::before and ::after: custom element definition when you open the inspector on a page that includes custom elements, you can view the class definition for the custom element in the debugger: inspect the element click on the word custom the source for the element's class will be displayed in the debugger. ...
...And 9 more matches
Web Console remoting - Firefox Developer Tools
esponse). the prefs argument is an array of preferences you want to get their values for, by name. private browsing the browser console can be used while the user has private windows open. each page error, console api message and network request is annotated with a private flag. private messages are cleared whenever the last private window is closed. the console actor provides the lastprivatecon
textexited notification: { "from": "conn0.console19", "type": "lastprivatecon
textexited" } this notification is sent only when your client is attached to the global console actor, it does not make sense for tab console actors. this notification has been introduced in firefox 24. send http requests starting with firefox 25 you can send an http request using the console actor: { "to": "co...
...ame as the request object in the above example request packet. page errors page errors come from the nsiconsoleservice. each allowed page error is an nsiscripterror object. the pageerror packet is: { "from": "conn0.console9", "type": "pageerror", "pageerror": { "errormessage": "referenceerror: foo is not defined", "sourcename": "http://localhost/~mihai/mozilla/test.js", "line
text": "", "linenumber": 6, "columnnumber": 0, "category": "content javascript", "timestamp": 1347294508210, "error": false, "warning": false, "exception": true, "strict": false, "private": false, } } the packet is similar to nsiscripterror - for simplicity. we only removed several unneeded properties and changed how flags work. the private flag tells if the er...
...294508210, "error": false, "warning": false, "exception": true, "strict": false, "private": false, } } the packet is similar to nsiscripterror - for simplicity. we only removed several unneeded properties and changed how flags work. the private flag tells if the error comes from a private window/tab (added in firefox 24). starting with firefox 24 the errormessage and line
text properties can be long string actor grips if the string is very long. console api messages the window.console api calls send internal messages throughout gecko which allow us to do whatever we want for each call. the web console actor sends these messages to the remote debugging client. we use the objectactor from dbg-script-actors.js without a threadactor, to avoid slowing down the page scrip...
...And 9 more matches
HTMLCanvasElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 9 more matches
HTMLFormElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 9 more matches
HTMLImageElement.alt - Web APIs
it will be read aloud or sent to the touch device, for example, to support visually impaired users. ...
...it will be read aloud or sent to the touch device, for example, to support visually impaired users. ...
... assistive technologies to help differently-abled users make full use of your content. it will be read aloud or sent to the touch device, for example, to support visually impaired users. think of it like this: when choosing alt strings for your images, imagine what you would say when reading the page to someone over the phone without mentioning that there's an image on the page. the alternate
text is displayed in the space the image would occupy and should be able to take the place of the image without altering the meaning of the page. syntax htmlimageelement.alt = alt
text; let alt
text = htmlimageelement.alt; value a domstring which contains the alternate
text to display when the image is not loaded or for use by assistive devices. the alt attribute is officially mandatory; it's meant...
...And 9 more matches
HTMLInputElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 9 more matches
The HTML DOM API - Web APIs
the html dom api is made up of the interfaces that define the functionality of each of the elements in html, as well as any supporting types and interfaces they rely upon. the functional areas included in the html dom api include: access to and control of html elements via the dom. access to and manipulation of form data. interacting with the contents of 2d images and the con
text of an html <canvas>, for example to draw on top of them. management of media connected to the html media elements (<audio> and <video>). dragging and dropping of content on webpages. access to the browser navigation history supporting and connective interfaces for other apis such as web components, web storage, web workers, websocket, and server-sent events. html dom concepts and usage in this article, w...
...umentation for those apis. structure of an html document the document object model (dom) is an architecture that describes the structure of a document; each document is represented by an instance of the interface document. a document, in turn, consists of a hierarchical tree of nodes, in which a node is a fundamental record representing a single object within the document (such as an element or
text node). nodes may be strictly organizational, providing a means for grouping other nodes together or for providing a point at which a hierarchy can be constructed; other nodes may represent visible components of a document. each node is based on the node interface, which provides properties for getting information about the node as well as methods for creating, deleting, and organizing nodes with...
...t instance represents a single element in a document created using either html or an xml vocabulary such as svg. for example, consider a document with two elements, one of which has two more elements nested inside it: while the document interface is defined as part of the dom specification, the html specification significantly enhances it to add information specific to using the dom in the con
text of a web browser, as well as to using it to represent html documents specifically. among the things added to document by the html standard are: support for accessing various information provided by the http headers when loading the page, such as the location from which the document was loaded, cookies, modification date, referring site, and so forth. access to lists of elements in the docume...
...And 9 more matches
Key Values - Web APIs
"eraseeof" erase to end of field. deletes all characters from the current cursor position to the end of the current field. vk_ereof (0xf9) gdk_key_3270_exselect (0xfd1b) "exsel" [4] the exsel (extend selection) key. vk_exsel (0xf8) gdk_key_3270_exselect (0xfd1b) "insert" the insert key, ins. toggles between inserting and overwriting
text. vk_insert (0x2d) gdk_key_insert (0xff63) gdk_key_kp_insert (0xff9e) qt::key_insert (0x01000006) keycode_insert (124) "paste" paste from the clipboard. appcommand_paste gdk_key_paste (0x1008ff6d) qt::key_paste (0x010000e2) "redo" redo the last action. appcommand_redo gdk_key_redo (0xff66) "undo" undo the last...
...nput method sequence conversion. vk_accept (0x1e) keycode_dpad_center (23) "again" the again key. redoes or repeats a previous action. gdk_key_redo (0xff66) "attn" [4] the attn (attention) key. vk_oem_attn (0xf0) gdk_key_3270_attn (0xfd0e) "cancel" [1] the cancel key. gdk_key_cancel (0xff69) "con
textmenu" [3] shows the con
text menu. typically found between the windows (or os) key and the control key on the right side of the keyboard. vk_apps (0x5d) kvk_pc_con
textmenu (0x6e) gdk_key_menu (0xff67) qt::key_menu (0x01000055) keycode_menu (82) "escape" [2] the esc (escape) key. typically used as an exit, cancel, or "escape this operation" button. historically, the es...
...t (169) [1] in google chrome 52, the cancel key incorrectly returns the key code "pause". this is fixed in chrome 53. (see chrome bug 612749 for details.) [2] in internet explorer (tested on release 9 and 11) and firefox 36 and earlier, the esc key returns "esc" instead of "escape". [3] internet explorer (tested on release 9 and 11) and firefox 36 and earlier report "apps" instead of "con
textmenu" for the con
text menu key. [4] the attn key generates the key code "unidentified" on internet explorer (tested on release 9 and 11). firefox and google chrome report the same, unless the japanese keyboard layout is in effect, in which case it generates "kanamode" instead. [5] the finish key gemerates the key code "unidentified" on internet explorer (tested on release 9 and 11). firefox repo...
...And 9 more matches
Advanced techniques: Creating and sequencing audio - Web APIs
using are: name of voice technique associated web audio api feature "sweep" oscillator, periodic wave oscillatornode, periodicwave "pulse" multiple oscillators oscillatornode "noise" random noise buffer, biquad filter audiobuffer, audiobuffersourcenode, biquadfilternode "dial up" loading a sound sample to play audiocon
text.decodeaudiodata(), audiobuffersourcenode note: this instrument was not created to sound good, it was created to provide demonstration code and represents a very simplified version of such an instrument. the sounds are based on a dial-up modem. if you are unaware of how one sounds you can listen to one here. creating an audio con
text as you should be used to by now, each web audio api a...
...ffersourcenode note: this instrument was not created to sound good, it was created to provide demonstration code and represents a very simplified version of such an instrument. the sounds are based on a dial-up modem. if you are unaware of how one sounds you can listen to one here. creating an audio con
text as you should be used to by now, each web audio api app starts with an audio con
text: // for cross browser compatibility const audiocon
text = window.audiocon
text || window.webkitaudiocon
text; const audioctx = new audiocon
text(); the "sweep" — oscillators, periodic waves, and envelopes for what we will call the "sweep" sound, that first noise you hear when you dial up, we're going to create an oscillator to generate the sound. the oscillatornode comes with basic waveforms ou...
...sound, that first noise you hear when you dial up, we're going to create an oscillator to generate the sound. the oscillatornode comes with basic waveforms out of the box — sine, square, triangle or sawtooth. however, instead of using the standard waves that come by default, we're going to create our own using the periodicwave interface and values set in a wavetable. ...
...And 9 more matches
Web APIs
a angle_instanced_arrays abortcontroller abortsignal absoluteorientationsensor abstractrange abstractworker accelerometer addresserrors aescbcparams aesctrparams aesgcmparams aeskeygenparams ambientlightsensor analysernode animation animationeffect animationevent animationplaybackevent animationtimeline arraybufferview attr audiobuffer audiobuffersourcenode audioconfiguration audiocon
text audiocon
textlatencycategory audiocon
textoptions audiodestinationnode audiolistener audionode audionodeoptions audioparam audioparamdescriptor audioparammap audioprocessingevent audioscheduledsourcenode audiotrack audiotracklist audioworklet audioworkletglobalscope audioworkletnode audioworkletnodeoptions audioworkletprocessor authenticatorassertionresponse authenticatorattestationresponse a...
...n
textoptions audiodestinationnode audiolistener audionode audionodeoptions audioparam audioparamdescriptor audioparammap audioprocessingevent audioscheduledsourcenode audiotrack audiotracklist audioworklet audioworkletglobalscope audioworkletnode audioworkletnodeoptions audioworkletprocessor authenticatorassertionresponse authenticatorattestationresponse authenticatorresponse b baseaudiocon
text basiccardrequest basiccardresponse batterymanager beforeinstallpromptevent beforeunloadevent biquadfilternode blob blobbuilder blobevent bluetooth bluetoothadvertisingdata bluetoothcharacteristicproperties bluetoothdevice bluetoothremotegattcharacteristic bluetoothremotegattdescriptor bluetoothremotegattserver bluetoothremotegattservice body broadcastchannel budgetse...
...ricvalue cssomstring csspagerule csspositionvalue cssprimitivevalue csspseudoelement cssrule cssrulelist cssstyledeclaration cssstylerule cssstylesheet cssstylevalue csssupportsrule cssunitvalue cssunparsedvalue cssvalue cssvaluelist cssvariablereferencevalue cache cachestorage canvascapturemediastreamtrack canvasgradient canvasimagesource canvaspattern canvasrenderingcon
text2d caretposition channelmergernode channelsplitternode characterdata childnode client clients clipboard clipboardevent clipboarditem closeevent comment compositionevent constantsourcenode constrainboolean constraindomstring constraindouble constrainulong contentindex contentindexevent convolvernode countqueuingstrategy crashreportbody credential credentialscontainer crypto crypto...
...And 9 more matches
Border-radius generator - CSS: Cascading Style Sheets
* all browsers except ie6 and lower */ /* * ui component */ .ui-input-slider-container { height: 20px; margin: 10px 0; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider-container * { float: left; height: 100%; line-height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px;
text-align: center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px;
text-align: right;
text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; }...
... right;
text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0;
text-align: right;
text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px;
text-align: center; } .ui-input-slider-btn-set:hover { background-color: #379b4a; cursor: pointer; } /* * ui component */ /* checkbox */ .ui-checkbox {
text-align: center; font-size: 16px; font-fami...
...x > input { display: none; } .ui-checkbox > label { font-size: 12px; padding: 0.333em 1.666em 0.5em; height: 1em; line-height: 1em; background-color: #888; background-image: url("https://mdn.mozillademos.org/files/5683/disabled.png"); background-position: center center; background-repeat: no-repeat; color: #fff; border-radius: 3px; font-weight: bold; float: left; } .ui-checkbox .
text { padding-left: 34px; background-position: center left 10px; } .ui-checkbox .left { padding-right: 34px; padding-left: 1.666em; background-position: center right 10px; } .ui-checkbox > label:hover { cursor: pointer; } .ui-checkbox > input:checked + label { background-image: url("https://mdn.mozillademos.org/files/5681/checked.png"); background-color: #379b4a; } body { max-width: 1000...
...And 9 more matches
fill - SVG: Scalable Vector Graphics
for animation five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set>. ...
... for animation five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set>. ...
...xt it's a presentation attribute that defines the color (or any svg paint servers like gradients or patterns) used to paint the element; for animation it defines the final state of the animation. as a presentation attribute, it can be applied to any element but it only has an effect on the following eleven elements: <altglyph>, <circle>, <ellipse>, <path>, <polygon>, <polyline>, <rect>, <
text>, <
textpath>, <tref>, and <tspan>. for animation five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set>. html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <!-- simple color fill --> <circle cx="50" cy="50" r="40" fill="pink" /> <!-- fill circle with a gradient --> <defs> <radialgradie...
...And 9 more matches
x - SVG: Scalable Vector Graphics
for <altglyph>, x defines the x-axi...
...etry property meaning this attribute can also be used as a css property for rectangles. svg for <svg>, x defines the x coordinate of the uper left corner of its viewport. value <length> | <percentage> default value 0 animatable yes note: starting with svg2, x is a geometry property meaning this attribute can also be used as a css property for <svg>.
text for <
text>, if it contain a single value, x defines the x coordinate on where the content
text position must be placed. the content
text position is usualy a point on the baseline of the first line of
text. the exact content
text position is influenced by some properties like
text-anchor, or direction. if there are multiple values, x defines the x coordinate of each individual glyph from the te...
...ning glyphes are placed in the continuity of the last positioned glyph. if there are more values than glyphes, extra values are ignored. ...
...And 9 more matches
y - SVG: Scalable Vector Graphics
for <altglyph>, y defines the y-axi...
...metry property meaning this attribute can also be used as a css property for rectangles. svg for <svg>, y defines the y coordinate of the uper left corner of its viewport. value <length> | <percentage> default value 0 animatable yes note: starting with svg2, y is a geometry property meaning this attribute can also be used as a css property for <svg>.
text for <
text>, if it contain a single value, y defines the y coordinate on where the content
text position must be placed. the content
text position is usualy a point on the baseline of the first line of
text. the exact content
text position is influenced by some properties like
text-anchor, or direction. if there are multiple values, y defines the y coordinate of each individual glyph from the te...
...ning glyphes are placed in the continuity of the last positioned glyph. if there are more values than glyphes, extra values are ignored. ...
...And 9 more matches
<feComposite> - SVG: Scalable Vector Graphics
performs the combination of two input images pixel-wise in image space using one of the porter-duff compositing operations: over, in, atop, out, xor, and lighter. additionally, a component-wise arithmetic operation (with the result clamped between [0..1]) can be applied. ...
...<fespecularlighting> filters with
texture data. if the arithmetic operation is chosen, each result pixel is computed using the following formula: result = k1*i1*i2 + k2*i1 + k3*i2 + k4 where: i1 and i2 indicate the corresponding pixel channel values of the input image, which map to in and in2 respectively k1, k2, k3 and k4 indicate the values of the attributes with the same name usage con
text categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes » presentation attributes » filter primitive attributes » class style specific attributes in in2 operator k1 k2 k3 k4 dom interface this element implements the svgfecompositeelement interface. example svg ...
...ranslate(900,25)" xlink:href="#twobluetriangles"/> </g> </defs> <rect fill="none" stroke="blue" x="1" y="1" width="1098" height="648"/> <g font-family="verdana" font-size="40" shape-rendering="crispedges"> <desc>render the examples using the filters that draw on top of an opaque white surface, thus obliterating the background.</desc> <g enable-background="new"> <
text x="15" y="75">opacity 1.0</
text> <
text x="15" y="115" font-size="27">(with feflood)</
text> <
text x="15" y="200">opacity 0.5</
text> <
text x="15" y="240" font-size="27">(with feflood)</
text> <use xlink:href="#bluetriangles"/> <g transform="translate(275,25)"> <use xlink:href="#red100" filter="url(#overflood)" /> <use xlink:href="#red50" filter="url(#ove...
...And 9 more matches
Rosetta - Archive of obsolete content
ossible, extensible collection of compilers to native ecmascript. |*| |*| november 12, 2014 |*| |*| https://developer.mozilla.org/add-ons/code_snippets/rosetta |*| https://developer.mozilla.org/user:fusionchess |*| |*| this framework is released under the gnu public license, version 3 or later. |*| http://www.gnu.org/licenses/gpl-3.0.html |*| |*| syntax: |*| |*| rosetta.appendcompiler([ "
text/x-csrc", "
text/x-c" ], yourcompiler); |*| \*/ var rosetta = new (function () { function createscript (oscript, oxhr200) { var smimetype = oscript.getattribute("type").tolowercase(), obaton = document.createcomment(" the previous code has been automatically translated from \"" + smimetype + "\" to \"
text/ecmascript\". "); if (!odicts.hasownproperty(smimetype)) { ale...
...+ smimetype + "\": script ignored."); return; } var ocompiled = document.createelement("script"); oscript.parentnode.insertbefore(obaton, oscript); oscript.parentnode.removechild(oscript); for (var aattrs = oscript.attributes, nattr = 0; nattr < aattrs.length; nattr++) { ocompiled.setattribute(aattrs[nattr].name, aattrs[nattr].value); } ocompiled.type = "
text\/ecmascript"; if (oxhr200) { ocompiled.src = "data:
text\/javascript," + encodeuricomponent(odicts[smimetype](oxhr200.response
text)); } ocompiled.
text = oxhr200 ? "" : odicts[smimetype](oscript.
text); obaton.parentnode.insertbefore(ocompiled, obaton); } function reqerror (oerror) { throw new urierror("the script " + oerror.target.src + " is not accessible."); } function ...
....test(oscript.getattribute("type").tolowercase())) { oscript.hasattribute("src") ? ...
...And 8 more matches
Writing to Files - Archive of obsolete content
eam guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes). ...
...bject (nsiscriptableio), which was not available in any released version of the platform (pending some fixes). ...
...to create an input stream, first get a reference to a nsifile, and then use nsiscriptableio.newoutputstream() to open a stream for writing to it. to learn more about file objects, see files and streams. ...
...And 8 more matches
XBL Attribute Inheritance - Archive of obsolete content
be inherited. inherited attributes xbl allows us to build composite widgets while hiding their actual implementation. however, with the features mentioned so far, the anonymous content is always created in the same way. it would be useful to add attributes to the bound elements that modify the inner elements. for example: xul: <searchbox/> xbl: <binding id="searchbinding"> <content> <xul:
textbox/> <xul:button label="search"/> </content> </binding> in the example, the label attribute has been placed directly on the button element. the problem with this is that the label would be the same every time the binding was used. in this case, it would be preferable if the attribute could be specified on the searchbox instead. xbl provides an inherits attribute which can be used to inheri...
...t would be preferable if the attribute could be specified on the searchbox instead. xbl provides an inherits attribute which can be used to inherit attributes from the bound element. it should be placed on the element that should inherit an attribute from the outer element, in this case the button. its value should be set to a comma-separated list of attribute names that are to be inherited. <xul:
textbox xbl:inherits="flex"/> <xul:button xbl:inherits="label"/> when the content is generated, the
textbox grabs the flex attribute from the searchbox and the button grabs the label attribute from the searchbox. this allows both the flexibility of the
textbox and the label of the button to be different for each use of the binding. in addition, changing the value of the attributes on the searchbox wi...
...you can add the inherits attribute to as many elements as you wish, to inherit any number of attributes. note how the inherits attribute has been placed in the xbl namespace, by prefixing it with 'xbl:'. the namespace should be declared somewhere earlier, usually on the bindings element. ...
...And 8 more matches
menu - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element, much like a button, that is placed on a menubar. when the user clicks the menu element, the child menupopup of the menu will be displayed. this element is also used to create submenus. more information is available in the xul tutorial. ...
...if this value is set, it overrides an assigned key set in the key attribute. this attribute does not apply to menus directly on the menubar. accesskey type: character this should be set to a character that is used as a shortcut key. this should ...
...if this value is set, it overrides an assigned key set in the key attribute. this attribute does not apply to menus directly on the menubar. accesskey type: character this should be set to a character that is used as a shortcut key. this should be one of the characters that ap...
...And 8 more matches
menuseparator - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] used to create a separator between menu items. typically drawn as a thin line. more information is available in the xul tutorial. ...
...if this value is set, it overrides an assigned key set in the key attribute. this attribute does not apply to menus directly on the menubar. accesskey type: character this should be set to a character that is used as a shortcut key. this should...
...if this value is set, it overrides an assigned key set in the key attribute. this attribute does not apply to menus directly on the menubar. accesskey type: character this should be set to a character that is used as a shortcut key. this should be one of the characters that a...
...And 8 more matches
treecol - Archive of obsolete content
e: url("chrome://global/skin/checkbox/cbox-check.gif"); } for example: create a css file. copy and paste the code above and link the css file to your xul file. reload the page to see the checkbox. if you want, you can also style the tree using css. ...
...code above and link the css file to your xul file. reload the page to see the checkbox. if you want, you can also style the tree using css. attributes crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left ...
...tion is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left the
text will be cropped on its left side. right the
text will be cropped on its right side. center the
text will be cropped in the middle, showing both the start and end of the
text normally. none the
text will be not be cropped using an ellipsis. however, the
text will simply be cut off if it is too large. the si...
...And 8 more matches
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
xhtml™ 1.0 the extensible hyper
text markup language (second edition) defines xhtml to be a reformulation of html 4 as an xml 1.0 application. if you're writing xhtml (as opposed to regular html) you should understand the fundamental differences between html 4 and xhtml. xhtml is xml, not html one of the primary misunderstandings about xhtml is that it is just another version of html. this misunderstanding is compounded by the fact that, prior to version 9, microsoft® internet explorer only supports xhtml if it is served with mime media type
text/html rather than the recommended application/xhtml+xml. when an xhtml page is served with mime type
text/html it is treated by all browsers as if it were nothing more than html. ...
......
... contained within comments (<!—— ... ——>) can be ignored. problems with inline style and script inline style and script tags can cause several different problems in xhtml when it is treated as xml rather than html. javascript contains characters which can not exist in xhtml javascript typically contains characters which can not exist in xhtml outside of cdata sections. <script type="
text/javascript"> var i = 0; while (++i < 10) { // ... } </script> note that this example is not well formed xhtml since the use of raw < is only allowed as a part of markup in xhtml or xml. use of comments inside inline style and script authors who are familiar with html commonly enclose the contents of inline style and script tags in comments in order to hide the contents of the tag...
...And 8 more matches
Mobile accessibility - Learn web development
t different. you can do a two-finger swipe up from the bottom of the lock screen. if you've set a passcode or pattern for unlocking your device, you will then be taken to the relevant entry screen to enter it. you can also explore by touch to find the unlock button at the bottom middle of the screen, and then double-tap. global and local menus talkback allows you to access global and local con
text menus, wherever you have navigated to on the device. the former provides global options relating to the device as a whole, and the latter provides options relating just to the current app/screen you are in. to get to these menus: access the global menu by quickly swiping down, and then right. access the local menu by quickly swiping up, and then right. swipe left and right to cycle between ...
...e current app/screen you are in. to get to these menus: access the global menu by quickly swiping down, and then right. access the local menu by quickly swiping up, and then right. swipe left and right to cycle between the different options. once you've selected the option you want, double-click to choose that option. for details on all the options available under the global and local con
text menus, see use global and local con
text menus. browsing web pages you can use the local con
text menu while in a web browser to find options to navigate web pages using just the headings, form controls, or links, or navigate line by line, etc. for example, with talkback turned on: open your web browser. activate the url bar. enter a web page that has a bunch of headings on it, such as the ...
... hold your finger down on the virtual keyboard until you get the character you want, and then release your finger to type it. repeat for each character. once you've finished, find the enter key and press it. ...
...And 8 more matches
Styling tables - Learn web development
local copy of the sample markup, download both images (noise and leopardskin), and put the three resulting files in a working directory somewhere on your local computer. next, create a new file called style.css and save it in the same directory as your other files. ...
...der and footer later on — it looks really odd and disjointed when you don't have a border round the whole outside of the table and end up with gaps. we've set some padding on the <th> and <td> elements — this gives the data items some space to breathe, making the table look a lot more legible. at this point, our table already looks a lot better: some simple typography now we'll get our
text sorted out a bit. first of all, we've found a font on google fonts that is suitable for a table about punk bands. you can go there and find a different one if you like; you'll just have to replace our provided <link> element and custom font-family declaration with the ones google fonts gives you. first, add the following <link> element into your html head, just above your existing <link> elemen...
...a table about punk bands. you can go there and find a different one if you like; you'll just have to replace our provided <link> element and custom font-family declaration with the ones google fonts gives you. ...
...And 8 more matches
Graceful asynchronous programming with Promises - Learn web development
e values passed into the fulfilment handler would contain three response objects, one for each of the fetch() operations that have completed. however, we don't want to do this. our code doesn't care when the fetch() operations are done. instead, what we want is the loaded data. ...
...senting the images, and a usable
text string. we can write a function that does this; add the following inside your <script> element: function fetchanddecode(url, type) { return fetch(url).then(response => { if(!response.ok) { throw new error(`http error! status: ${response.status}`); } else { if(type === 'blob') { return response.blob(); } else if(type === '
text') { return response.
text(); } } }) .catch(e => { console.log(`there has been a problem with your fetch operation for resource "${url}": ` + e.message); }); } this looks a bit complex, so let's run through it step by step: first of all, we define the function, passing it a url and a string representing the type of resource it is fetching. inside the functio...
...s was always the blob() method in the previous example. however, two things are different here: first of all, the second promise we return is different depending on what the type value is. inside the executor function, we include a simple if ... else if statement to return a different promise depending on what type of file we need to decode (in this case we've got a choice of blob or
text, but it would be easy to extend this to deal with other types as well). second, we have added the return keyword before the fetch() call. the effect this has is to run the entire chain and then run the final result (i.e. the promise returned by blob() or
text()) as the return value of the function we've just defined. in effect, the return statements pass the results back up the chain to the ...
...And 8 more matches
Manipulating documents - Learn web development
he user's preferred language, a media stream from the user's webcam, etc. the document (represented by the dom in browsers) is the actual page loaded into the window, and is represented in javascript by the document object. you can use this object to return and manipulate information on the html and css that comprises the document, for example get a reference to an element in the dom, change its
text content, apply new styles to it, create new elements and add them to the current element as children, or even delete it altogether. in this article we'll focus mostly on manipulating the document, but we'll show a few other useful bits besides. the document object model the document currently loaded in each one of your browser tabs is represented by a document object model. this is a "tree st...
...nding upright like a human, with small arms, and a large head with lots of sharp teeth."> <p>here we will add a link to the <a href="https://www.mozilla.org/">mozilla homepage</a></p> </section> </body> </html> the dom on the other hand looks like this: note: this dom tree diagram was created using ian hickson's live dom viewer. you can see here that each element and bit of
text in the document has its own entry in the tree — each one is called a node. you will also encounter various terms used to describe the type of node, and their position in the tree in relation to one another: element node: an element, as it exists in the dom. root node: the top node in the tree, which in the case of html is always the html node (other markup vocabularies like svg and custom x...
...the above example, and it is also a descendant. img is not a child of body, as it is two levels below it in the tree, but it is a descendant of body. parent node: a node which has another node inside it. for example, body is the parent node of section in the above example. sibling nodes: nodes that sit on the same level in the dom tree. for example, img and p are siblings in the above example.
text node: a node containing a
text string. it is useful to familiarize yourself with this terminology before working with the dom, as a number of the code terms you'll come across make use of them. you may have also come across them if you have studied css (e.g. descendant selector, child selector). active learning: basic dom manipulation to start learning about dom manipulation, let's begin with...
...And 8 more matches
Starting our Svelte Todo list app - Learn web development
ate a new folder — src/components. note: you can put your components anywhere inside the src folder, but the components folder is a recognized convention to follow, allowing you to find your components easily. ...
...representation of our app, so you can see what it will look like. ...
... --> <ul role="list" class="todo-list stack-large" aria-labelledby="list-heading"> <!-- todo-1 (editing mode) --> <li class="todo"> <div class="stack-small"> <form class="stack-small"> <div class="form-group"> <label for="todo-1" class="todo-label"> new name for 'create a svelte starter app' </label> <input type="
text" id="todo-1" autocomplete="off" class="todo-
text" /> </div> <div class="btn-group"> <button class="btn todo-cancel" type="button"> cancel <span class="visually-hidden">renaming create a svelte starter app</span> </button> <button class="btn btn__primary todo-edit" type="submit"> save <s...
...And 8 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
trokes. moreover, if you press the escape or enter key, nothing happens. and if you click on cancel or save, the focus disappears again. for a user working with the keyboard, this behavior will be confusing at best. we'd also like to add some usability features, like disabling the save button when required fields are empty, giving focus to certain html elements or auto-selecting contents when a
text input receives focus. to implement all these features we'll need programmatic access to dom nodes to run functions like focus() and select(). we will also have to use addeventlistener() and removeeventlistener() to run specific tasks when the control receives focus. the problem is that all these dom nodes are dynamically created by svelte at runtime. so we'll have to wait for them to be created...
...we are also taking care of the escape key with on:keydown={e => e.key ===...
...we are also taking care of the escape key with on:keydown={e => e.key === 'escape' && oncancel()}. whenever the escape key is pressed we run oncancel(), which just clears up the name variable. ...
...And 8 more matches
Handling common HTML and CSS problems - Learn web development
g options. to show you an example of how such plugins generally work: install atom (if you haven't got an up-to-date version already installed) — download it from the atom page linked above. go to atom's preferences... dialog (e.g. by choosing atom > preferences... on mac, or file > preferences... on windows/linux) and choose the install option in the left hand menu. in the search packages
text field, type "lint" and press enter/return to search for linting-related packages. you should see a package called lint at the top of the list. install this first (using the install button), as other linters rely on it to work. after that, install the linter-csslint plugin for linting css, and the linter-tidy plugin for linting html. after the packages have finished installing, try loading up an...
...ling, try loading up an html file and a css file: you'll see any issues highlighted with green (for warnings) and red (for errors) circles next to the line numbers, and a separate panel at the bottom provides line numbers, error messages, and sometimes suggested values or other fixes. other popular editors have similar linting packages available. for example, see: sublimelinter for sublime
text notepad++ linter vscode linters browser developer tools the developer tools built into most browsers also feature useful tools for hunting down errors, mainly for css. note: html errors don't tend to show up so easily in dev tools, as the browser will try to correct badly-formed markup automatically; the w3c validator is the best way to find html errors — see validation above. as an ex...
...ain areas we'll look at are lack of support for modern features, and layout issues. older browsers not supporting modern features this is a common problem, especially when you need to support old browsers (such as old ie versions) or you are using features that are implemented using css prefixes. in general, most core html and css functionality (such as basic html elements, css basic colors and
text styling) works across most browsers you'll want to support; more problems are uncovered when you start wanting to use newer features such as flexbox, or html5 video/audio, or even more nascent, css grids or -webkit-background-clip:
text. once you've identified a list of potential problem technologies you will be using, it is a good idea to research what browsers they are supported in, and what r...
...And 8 more matches
Command line crash course - Learn web development
nter into it, how to chain commands together, and how to add your own command line interface (cli) tools. prerequisites: familiarity with the core html, css, and javascript languages. objective: to understand what the terminal/command line is, what basic commands you should learn, and how to install new command line tools. welcome to the terminal the terminal is a
text interface for executing
text-based programs. if you're running any tooling for web development there's a near-guaranteed chance that you'll have to pop open the command line and run some commands to use your chosen tools (you'll often see such tools referred to as cli tools — command line interface tools). a large number of tools can be used by typing commands into the command line; many come ...
... let's move forward and look a...
... let's move forward and look at using a few of these tools ...
...And 8 more matches
The Firefox codebase: CSS Guidelines
is: margin: 0px; use expanded syntax it is often harder to understand what the shorthand is doing and the shorthand can also hide some unwanted default values. it is good to privilege expanded syntax to make your intentions explicit. do this: border-color: red; not this: border: red; put multiple selectors on different lines do this: h1, h2, h3 { font-family: sans-serif;
text-align: center; } not this: h1, h2, h3 { font-family: sans-serif;
text-align: center; } naming standards for class names lower-case-with-dashes is the most common. but camelcase is also used sometimes. try to follow the style of existing or related code. other tips assume ="true" in attribute selectors. example: use option[checked], not option[checked="true"]. avoid id...
...some css could be written cleanly without the css variable(s) and then think of how the css variable could improve that css. using variables use the variable according to its naming do this: xul|tab:hover { background-color: var(--in-content-box-background-hover); } not this: #certificateerrordebuginformation { background-color: var(--in-content-box-background-hover); } localization
text direction for margins, padding and borders, use inline-start/inline-end rather than left/right. example: use margin-inline-start: 3px; instead of margin-left: 3px. for rtl-aware positioning (left/right), use inset-inline-start/inset-inline-end. for rtl-aware float layouts, float: inline-start|inline-end can be used instead of float: left|right. the rtl-aware equivalents of border-{top/bot...
... is esthetics related, then it is likely theme css. when importing your stylesheets, it's best to import the content css before the theme css, that way the theme values get to override the content values (which is probably what you want), and you're going to want them both after the global values, so your imports will look like this: <?xml-stylesheet href="chrome://global/skin/global.css" type="
text/css"?> <?xml-stylesheet href="chrome://browser/content/path/module.css" type="
text/css"?> <?xml-stylesheet href="chrome://browser/skin/path/module.css" type="
text/css"?> [1] -moz-appearance is tricky. generally, when specifying -moz-appearance: foo; you're giving hints as to how something should act, however -moz-appearance: none; is probably saying 'ignore browser preconceptions - i want a bla...
...And 8 more matches
Eclipse CDT
g the workspace preferences, selecting "c/c++ > indexer", and reenabling "automatically update the index". however, you may find this too disruptive, since re-indexing will then happen very frequently and code assistance can be broken while the index is rebuilding. the alternative is to leave that option disabled and update the index manually as necessary. to update the index manually, use the con
text menu in the project explorer tab on the left side of the window. to rebuild for changes in an individual directory (for example, to take account of some changes that you yourself made) select "index > freshen all files" on that directory. to rebuild the entire index (for example when you pull from mozilla-central) select "index > rebuild" on the project root. usage tips below are some of the mo...
...(keyboard shortcuts), the bindings given below are the defaults. you can change the key bindings by opening the workspace preferences (eclipse > preferences, or window > preferences) and selecting "general > keys". you can set the scheme to "emacs" or "microsoft visual studio" if that's your thing, or change individual key bindings. when changing individual key bindings, note that bindings are con
text sensitive and that any changes you make may be ignored if they conflict with existing bindings, or if they are overridden by a binding for a more specific con
text. for example, changing the find next command to cmd-g/ctrl-g is not sufficient. for that to work you also either need to find the existing bindings for that key combination (using the bindings column to sort by key combination helps wit...
...ext. for example, changing the find next command to cmd-g/ctrl-g is not sufficient. for that to work you also either need to find the existing bindings for that key combination (using the bindings column to sort by key combination helps with this) and remove them, or else you need to make your binding very specific by setting the "when" field to "c/c++ editor" instead of the more general "editing
text". opening files you can quickly open a file by name using cmd-shift-r/ctrl-shift-r. although eclipse doesn't do fuzzy matching when you type a file name, it does allow you to use wildcards. to quickly switch between a source file and its header file, use ctrl-tab. to quickly switch to a recently viewed document use cmd-f6/ctrl-f6. if you want to change this awkward key binding, the command yo...
...And 8 more matches
How to implement a custom autocomplete search component
the xul
textbox element supports an autocomplete mechanism that is used to create a
textbox with a popup containing a list of possible completions for what the user has started to type. there are actually two autocomplete mechanisms: an older mechanism that is part of the "xpfe" codebase and is used in older applications such as thunderbird and seamonkey. a newer and slightly simplified mechanism that is used in "toolkit" applications such as firefox and xulrunner. thunderbird 2.x and seamonkey 1.1.x support the toolkit interfaces, although they do not use the same autocomplete widget. ...
...sms: an older mechanism that is part of the "xpfe" codebase and is used in older applications such as thunderbird and seamonkey. a newer and slightly simplified mechanism that is used in "toolkit" applications such as firefox and xulrunner. thunderbird 2.x and seamonkey 1.1.x support the toolkit interfaces, although they do not use the same autocomplete widget. to use autocomplete with a xul
textbox, all you need to do is set some attributes: <
textbox type="autocomplete" autocompletesearch="history"/> the type="autocomplete" turns on the autocomplete mechanism and the autocompletesearch="history" sets the source for the autocomplete. there are more options and features, see xul:
textbox_(firefox_autocomplete) for more details. the toolkit mechanism has built-in support for several autocom...
...viderautocompletesearch ]); then register your xpcom component. ...
...And 8 more matches
Basics
some basic mathml constructions. it is tailored to display correctly with just the symbol font. you can view its source. however, mathml documents tend to be verbose and you might get lost trying to locate a mathml fragment with the usual view source. this demo has been made to illustrate the following aspects. you can right-click on any math fragment of interest throughout this document. the con
text menu won't show up. rather, the math fragment will zoom, and if you right-click a second time, you will see the mathml wysiwyg markup of the fragment, and if you right-click again a third time, the fragment will revert to its initial state. this tri-state mode is aimed at limiting conflicts with other agents that compete for the mouse. with mathml, one can build sets such as (go on, right-click a...
... d x = 1 y 2 , form rather complicated expressions lim n → n ( 1 + 1 n ) n − e n , k = ∂ 2 z ∂ x 2 ∂ 2 z ∂ y 2 - ( ∂ 2 z ∂ x ∂ y ) 2 ( 1 + ( ∂ z ∂ x ) 2 + ( ∂ z ∂ y ) 2 ) 2 , write vector equations y = a x + b , etc. notice how the mathematics appear in the main flow of
text and respond as you resize the window. you can also make displayed equations, such as the following ones: x → maps to y = f n ( x ) = ( 1 + 1 x n ) n ∫ a b f ( x ) d x = b - a 6 [ f ( a ) + 4 f ( a + b 2 ) + f ( b ) ] - ( b - a ) 5 4 ! 5 ! f ( 4 ) ( η ) , a ≤ η ≤ b | x | = { - x if x < 0 x otherwise ...
...same baseline, other alignments are possible): i-th row [ a11 a12 a13 ... a1n : : : ... : ai1 ai2 ai3 ... ain : : : : an1 an2 an3 ... a n n ] [ x1 x2 x3 : xn ] in mozilla, mathml runs inside the main browser. so it responds to other browser operations such as the zoom (try view ->
text zoom), and you can do links a 2 + b 2 = c 2 , apply stylistic effects a 2 + b 2 = c 2 , or use color a 2 + b 2 = c 2 in very strange ways p(x) q(x) = a0 + a1x + a2 x2 + ... + an-1 xn-1 b0 + b1x + b2 x2 + ... + bn-1 xn-1 . you can also do other weird and risky things which are not portable, bongo warns, such as mixing mathml with other markups...
...And 8 more matches
nsIEditorIMESupport
editor/idl/nsieditorimesupport.idlscriptable please add a summary to this article. ...
...read only. methods native code only!begi...
...read only. methods native code only!begincomposition obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete. although it may still work in som...
...And 8 more matches
nsIWebBrowserPersist
read only. ...
...read only. persistflags ...
...ormally they wouldn't be. persist_state_ready 1 persister is ready to save data. persist_state_saving 2 persister is saving data. persist_state_finished 3 persister has finished saving data. encode_flags_selection_only 1 output only the current selection as opposed to the whole document. encode_flags_formatted 2 for plain
text output. convert html to plain
text that looks like the html. implies wrap (except inside <pre>), since html wraps. html output: always do prettyprinting, ignoring existing formatting. encode_flags_raw 4 output without formatting or wrapping the content. this flag may be used to preserve the original formatting as much as possible. encode_flags_body_only 8 output only...
...And 8 more matches
dx - SVG: Scalable Vector Graphics
the dx attribute indicates a shift along the x-axis on the position of an element or its content. ...
...altglyph>, <fedropshadow>, <feoffset>, <glyphref>, <
text>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- lines materialized the position of the glyphs --> <line x1="0" x2="100%" y1="50%" y2="50%" /> <line x1="10%" x2="10%" y1="0" y2="100%" /> <line x1="60%" x2="60%" y1="0" y2="100%" /> <!-- some reference
text --> <
text x="10%" y="50%" fill="grey">svg</
text> <!-- the same
text with a shift along the x-axis --> <
text dx="50%" x="10%" y="50%">svg</
text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } altglyph warning: as of svg2 <altglyph> is deprecated and shouldn't be used. for <altglyph>, if it contains a single value, dx defines a shift along the x-axis for...
...et by the primitiveunits attribute of the <filter> element. value <number> default value 0 animatable yes glyphref warning: as of svg2 <glyphref> is deprecated and shouldn't be used. for <glyphref>, dx defines the x offset of the glyph, in the font metric system. value <number> default value 0 animatable yes
text for <
text>, if it contains a single value, dx defines a shift along the x-axis for all glyphs. if there are multiple values, dx defines a shift along the x-axis for each individual glyph relative to the preceding glyph. if there are less values than glyphs, the remaining glyphs use a value of 0. if there are more values than glyphs, extra values are ignored. value list of <length> ...
...And 8 more matches
dy - SVG: Scalable Vector Graphics
the dy attribute indicates a shift along the y-axis on the position of an element or its content. ...
...lyph>, <fedropshadow>, <feoffset>, <glyphref>, <
text>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- lines materialized the position of the glyphs --> <line x1="10%" x2="10%" y1="0" y2="100%" /> <line x1="0" x2="100%" y1="30%" y2="30%" /> <line x1="0" x2="100%" y1="80%" y2="80%" /> <!-- some reference
text --> <
text x="10%" y="30%" fill="grey">svg</
text> <!-- the same
text with a shift along the y-axis --> <
text dy="50%" x="10%" y="30%">svg</
text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } altglyph warning: as of svg2 <altglyph> is deprecated and shouldn't be used. for <altglyph>, if it contains a single value, dy defines a shift along the y-axis for...
...et by the primitiveunits attribute of the <filter> element. value <number> default value 0 animatable yes glyphref warning: as of svg2 <glyphref> is deprecated and shouldn't be used. for <glyphref>, dy defines the y offset of the glyph, in the font metric system. value <number> default value 0 animatable yes
text for <
text>, if it contains a single value, dy defines a shift along the y-axis for all glyphs. if there are multiple values, dy defines a shift along the y-axis for each individual glyph relative to the preceding glyph. if there are less values than glyphes, the remaining glyphes use a value of 0. if there are more values than glyphes, extra values are ignored. value list of <lengt...
...And 8 more matches
Creating annotations - Archive of obsolete content
the widget api is deprecated from firefox 29 onwards. please see the ui module for replacements. in particular, for a simple button, try the action button or toggle button apis, and for a more complex widget try the toolbar or sidebar apis. we'll use two objects to create annotations: a page-mod to find page elements that the user can annotate, and a panel for the user to enter the annotation
text itself. selector page-mod selector content scripts the content script for the selector page-mod uses jquery to examine and manipulate the dom. its main job is to maintain a matched element: this is the page element that is the current candidate for an annotation. the matched element is highlighted and has a click handler bound to it which sends a message to the main add-on code. the selector...
...idea here is to make it more likely that the annotator will be able to identify annotated elements correctly later on. if the page element is eligible for annotation, then the selector highlights that element and binds a click handler to it. the click handler sends a message called show back to the main add-on code. the show message contains: the url for the page, the id attribute value, and the
text content of the page element. $('*').mouseenter(function() { if (!active || $(this).hasclass('annotated')) { return; } resetmatchedelement(); ancestor = $(this).closest("[id]"); matchedelement = $(this).first(); originalbgcolor = $(matchedelement).css('background-color'); $(matchedelement).css('background-color', 'yellow'); $(matchedelement).bind('click.annotator', function(ev...
... because this code uses jquery, you'll need to download that as well, and save it in data. updating main.js go back to main.js and add the code to create the selector...
...And 7 more matches
Displaying web content in an extension without security issues - Archive of obsolete content
a typical example is an rss reader extension that would take the content of the rss feed (html code), format it nicely and insert into the extension window. the issue that is commonly overlooked here is that the rss feed could contain some malicious javascript code and it would then execute with the privileges of the extension — meaning that it would get full access to the browser (cookies, history etc) and to user’s files. these issues can easily be avoided by making use of the existing security mechanisms in the mozilla codebase. ...
...here the "data:" protocol is useful. this protocol is special because it inherits the privileges from its parent document. however, if a "data:" document is the topmost content document, there is no parent document (remember, content documents have no access to the chrome documents above them) and consequently no privileges. ...
...restricting what documents that contain untrusted data can do there are several restrictions that can be applied per frame. ...
...And 7 more matches
The Essentials of an Extension - Archive of obsolete content
the file is formatted in a special flavor of xml called rdf. rdf used to be the central storage mechanism for firefox, but it is now being replaced for a simpler database system. we'll discuss both of these storage systems further ahead in the tutorial. now let's look at the important parts of the file. ...
... web pages in a firefox tab. windows like the downloads window are pure chrome. most of the code for an extension resides in the chrome folder, just like in the hello world example. as we saw in the directory structure of the unpacked extension, the chrome is composed of 3 sections: content, locale and skin. the 3 are necessary for most extensions. if we open the chrome.manifest file (again, any
text editor will do), we see that the same 3 sections are mentioned: content xulschoolhello content/ skin xulschoolhello classic/1.0 skin/ locale xulschoolhello en-us locale/ the chrome.manifest file tells firefox where to look for chrome files. the
text is spaced to look like a table, but that is not necessary. the parser ignores repeated spaces. the first word ...
... "unix" skin is the default, with no flags. the chrome as mentioned earlier, the chrome is composed of 3 sections: content, locale and skin. the content is the most important section, holding user interface (xul) and script (js) files. the skin section has the files that define most of the look and feel of the ui (using css and images, just like web pages). finally, the locale section holds all
text used in the extension, in dtd and properties files. this division allows other developers to create themes that replace skins, and translators to create localizations in different languages, all of this without having to change your extension or your code. this gives firefox extensions a great deal of flexibility. chrome files are accessed through the chrome protocol. this is what a chrome uri l...
...And 7 more matches
Index of archived content - Archive of obsolete content
.htaccess ( hyper
text access ) 2015 mdn fellowship program api navigator navigator.moznotification add-ons add-on sdk builder guides content scripts communicating with other scripts communicating using "port" communicating using "postmessage" cross-domain content scripts interacting with page scripts loading content scripts reddit example port self ...
... program id sdk api lifecycle sdk and xul comparison testing the add-on sdk two types of scripts working with events xul migration guide high-level apis addon-page base64 clipboard con
text-menu hotkeys indexed-db l10n notifications page-mod page-worker panel passwords private-browsing querystring request selection self simple-prefs simple-storage system ...
... request selection self simple-prefs simple-storage system tabs timers ui url widget windows low-level apis /loader chrome console/plain-
text console/traceback content/content content/loader content/mod content/symbiont content/worker core/heritage core/namespace core/promise dev/panel event/core event/target frame/hidden-frame frame/utils ...
...And 7 more matches
Document Object Model - Archive of obsolete content
« previousnext » the document object model (dom) can be used with xul elements to get information about them or modify them. dom introduction the document object model (dom) is used to store the tree of xul nodes. when an xul file is loaded, the tags are parsed and converted into a hierarchical document structure of nodes, one for each tag and block of
text. the dom structure may be examined and modified using various methods provided for this purpose. specific xul elements also provide additional functions which may be used. each xul file that is loaded will have its own document displayed in a window or frame. although there is only ever one document associated with a window at a time, you may load additional documents using various methods. in mozilla, the dom may be a...
...ozilla provides these objects for use. in javascript, there is always a single global object that is always available. you can refer to the properties and methods of the global object without having to qualify them with an object. for example, if the global object has a 'name' property, you can change the name with the code 'name = 7', without having to specify any object to use. in a browser con
text, the window is the global object, and the same is also true for xul. naturally, this global object will be different for each window. each frame will also have a separate window object. the window is often referred to using the window property, although this is optional. sometimes, this is done just to clarify the scope of the method you are referring to. for example, the following two lines whi...
... a new window are functionally equivalent: window.open("test.xul","_new"); open("test.xul","_new"); when you declare a function or a variable at the top level of a script, that is outside another function, you are actually declaring a property of the global object. in xul, each function you declare will be set as a property of the window object. ...
...And 7 more matches
XBL Example - Archive of obsolete content
« previousnext » this section will describe an example xbl element. a slideshow element let's construct a full example of an xbl element. this will be a widget that stores a deck of objects, each displayed one at a time. navigation buttons along the bottom will allow the user to cycle through the objects while a
text widget between the buttons will display the current page. you could put anything within the pages, however, this widget might be useful for a set of images. we'll call this a slideshow element. content of the slideshow first, let's determine what elements need to go in the xbl content. because we want page flipping, a deck element would be the most suitable to hold the page content. the content of the pages will be specified in the xul file, not in xbl, but w...
...ong the bottom, we'll need a button to go the previous page, a label to display the current page number, and a button to go to the next page. example 1 : source <binding id="slideshow"> <content> <xul:vbox flex="1"> <xul:deck xbl:inherits="selectedindex" selectedindex="0" flex="1"> <children/> </xul:deck> <xul:hbox> <xul:button xbl:inherits="label=previous
text"/> <xul:label flex="1"/> <xul:button xbl:inherits="label=next
text"/> </xul:hbox> </xul:vbox> </content> </binding> this binding creates the slideshow structure that we want. the flex attribute has been added to a number of elements so that it stretches in the right way. the label attributes on the two buttons inherit their values from the bound element. here, they in...
...<xul:button xbl:inherits="label=next
text"/> </xul:hbox> </xul:vbox> </content> </binding> this binding creates the slideshow structure that we want. the flex attribute has been added to a number of elements so that it stretches in the right way. the label attributes on the two buttons inherit their values from the bound element. here, they inherit from two custom attributes, previous
text and next
text. this makes it easy to change the labels on the buttons. the children of the element that the xbl is bound to will be placed inside the deck. the selectedindex is inherited by the deck, so we may set the initial page in the xul. the following xul file produces the result in the image. ...
...And 7 more matches
<statusbarpanel> - Archive of obsolete content
ype of button which is drawn differently. unlike normal buttons, a statusbarpanel can only have a label or an image but not both. this element is often used with a short label or icon to indicate status, for instance whether the user is online or whether there are new messages. ...
...usbarpanel-iconic, statusbarpanel-iconic-
text, statusbarpanel-menu-iconic examples <statusbar> <statusbarpanel label="left panel"/> <spacer flex="1"/> <progressmeter mode="determined" value="82"/> <statusbarpanel label="right panel"/> </statusbar> attributes crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. ...
...s given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left the
text will be cropped on its left side. right the
text will be cropped on its right side. ...
...And 7 more matches
Browser Feature Detection - Archive of obsolete content
es/methods in document name firefox 1.5 ie 6 & 7 opera 8.54 - 9.01 document.doctype true true true document.implementation true true true document.documentelement true true true document.createelement() true true true document.createdocumentfragment() true true true document.create
textnode() true true true document.createcomment() true true true document.createcdatasection() true false true document.createprocessinginstruction() true false true document.createattribute() true true true document.createentityreference()obsolete since gecko 7 (method present but only returns null: bug 9850...
...es/methods in document name firefox 1.5 ie 6 & 7 opera 8.54 - 9.01 document.doctype true true true document.implementation true true true document.documentelement true true true document.createelement() true true true document.createdocumentfragment() true true true document.create
textnode() true true true document.createcomment() true true true document.createcdatasection() true false true document.createprocessinginstruction() true false true document.createattribute() true true true document.createentityreference()obsolete since gecko 7 true false false document.getele...
... document.getelementbyid() true true true dom level 1 html support for properties/methods in document name firefox 1.5 ie 6 & 7 opera 8.54 - 9.01 document.documentelement true true true document.createelement() true true true document.createdocumentfragment() true true true document.create
textnode() true true true document.createcomment() true true true document.createattribute() true true true document.getelementsbytagname() true true true document.title true true true document.referrer true true true document.domain true true true document.url true true ...
...And 7 more matches
Desktop gamepad controls - Game development
gh the cached states from the previous frame does the job — if the button was already pressed, then we ignore the new press and set it to false. implementation we now know what the gamepadapi object looks like and what variables and functions it contain, so let's learn how all this is actually used in the game. ...
...me does the job — if the button was already pressed, then we ignore the new press and set it to false. implementation we now know what the gamepadapi object looks like and what variables and functions it contain, so let's learn how all this is actually used in the game. to indicate that the gamepad controller is active we can show the user some custom
text on the game's main menu screen. ...
...tton was already pressed, then we ignore the new press and set it to false. implementation we now know what the gamepadapi object looks like and what variables and functions it contain, so let's learn how all this is actually used in the game. to indicate that the gamepad controller is active we can show the user some custom
text on the game's main menu screen. the
textgamepad object holds the
text saying a gamepad has been connected, and is hidden by default. ...
...And 7 more matches
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
ww.w3.org/2001/xinclude', 'include'); if (xincludes) { for (i=0; i < xincludes.length; i++) { var xinclude = xincludes[i]; var href = xinclude.getattribute('href'); var parse = xinclude.getattribute('parse'); var xpointer = xinclude.getattribute('xpointer'); var encoding = xinclude.getattribute('encoding'); // e.g., utf-8 // "
text/xml or application/xml or matches
text/*+xml or application/*+xml" before encoding (then utf-8) var accept = xinclude.getattribute('accept'); // header "accept: "+x var acceptlanguage = xinclude.getattribute('accept-language'); // "accept-language: "+x var xifallback = xinclude.getelementsbytagnamens('http://www.w3.org/2001/xinclude', 'fallback')[0]; // only on...
... // fix: we test for file extensions as well in case file:// doesn't return content type (as seems to be the case); can some oth...
... if (acceptlanguage) { request.setrequestheader('accept-language', acceptlanguage); } switch (parse) { case '
text': // priority should be on media type: var contenttype = request.getresponseheader('content-type'); //
text/xml; charset="utf-8" // send to get headers first? // fix: we test for file extensions as well in case file:// doesn't return content type (as seems to be the case); can some other tool be uesd in ff (or ie) to detect encoding of local file? probably just need bom test since other encodings must be specified var patternxml = /\.(svg|xml|xul|...
...And 7 more matches
WAI-ARIA basics - Learn web development
aria-labelledby="label" allows you to put an id on an element, then reference it as being the label for anything else on the page, including multiple elements, which is not possible using <label for="input">. as an example, you could use aria-labelledby to specify that a key description contained in a <div> is the label for multiple table cells, or you could use it as an alternative to image alt
text — specify existing information on the page as an image's alt
text, rather than having to repeat it inside the alt attribute. you can see an example of this at
text alternatives. states — special properties that define the current conditions of elements, such as aria-disabled="true", which specifies to a screenreader that a form input is currently disabled. states differ from properties in th...
...e <header> element — "banner, 2 items" (it contains a heading and the <nav>). on the <nav> element — "navigation 2 items" (it contains a list and a form). on the <main> element — "main 2 items" (it contains an article and an aside). on the <aside> element — "complementary 2 items" (it contains a heading and a list). on the search form input — "search query, insertion at beginning of
text". on the <footer> element — "footer 1 item". if you go to voiceover's landmarks menu (accessed using voiceover key + u and then using the cursor keys to cycle through the menu choices), you'll see that most of the elements are nicely listed so they can be accessed quickly. however, we could do better here. the search form is a really important landmark that people will want to find, but i...
... very common, easily recognised feature, and adding a visual label would spoil the page design. <input type="search" name="q" placeholder="search query" aria-label="search through site content"> now if we use voiceover to look at this example, we get some improvements: the search form is called out as a separate item, both when browsing through the page, and in the landmarks menu. the label
text contained in the aria-label attribute is read out when the form input is highlighted. beyond this, the site is more likely to be accessible to users of older browsers such as ie8; it is worth including aria roles for that purpose. and if for some reason your site is built using just <div>s, you should definitely include the aria roles to provide these much needed semantics! the improved semant...
...And 7 more matches
JavaScript basics - Learn web development
le, enter this code on a new line, just before the closing </body> tag: <script src="scripts/main.js"></script> this is doing the same job as the <link> element for css. it applies the javascript to the page, so it can have an effect on the html (along with the css, and anything else on the page). add this code to the main.js file: const myheading = document.queryselector('h1'); myheading.
textcontent = 'hello world!'; make sure the html and javascript files are saved. then load index.html in your browser. you should see something like this: note: the reason the instructions (above) place the <script> element near the bottom of the html file is that the browser reads code in the order it appears in the file. if the javascript loads first and it is supposed to affect the html that...
... the html file is that the browser reads code in the order it appears in the file. if the javascript loads first and it is supposed to affect the html that hasn't loaded yet, there could be problems. placing javascript near the bottom of an html page is one way to accommodate this dependency. to learn more about alternative approaches, see script loading strategies. ...
... note: both of the features you used in this exercise are parts of the document object model (dom) api, which has the capability to manipulate documents. language basics crash course to give you a better understanding of how javascript works, let's explain some of the core features of the language. ...
...And 7 more matches
Properly configuring server MIME types - Learn web development
as new content types are invented or added to web servers, web administrators may fail to add the new mime types to their web server's configuration. this is a major source of problems for users of gecko-based browsers, which respect the mime types as reported by web servers and web applications. ...
... a major source of problems for users of gecko-based browsers, which respect the mime types as reported by web servers and web applications. what are mime types? mime types describe the media type of content either in email or served by web servers or web applications and are intended to help guide a web browser in how the content is to be processed and displayed. examples of mime types are:
text/html for normal web pages
text/plain for plain
text text/css for cascading style sheets
text/javascript for scripts application/octet-stream meaning "download this file" application/x-java-applet for java applets application/pdf for pdf documents technical background registered values for mime types are available in iana | mime media types. the http specification defines a superset of mi...
...her web browsers, such as microsoft® internet explorer, try to allow for misconfigured web servers and applications by guessing what the correct mime type should be. this has sheltered many web administrators from their own errors, since internet explorer will continue to process content as expected even though the web server is misconfigured, e.g. displays an image which is reported to be plain
text. serving content using the correct mime type can also be important for security reasons; it's possible for malicious content to affect the user's computer by pretending to be a safe type of document when it is in fact not. note: historically, firefox has loaded css files even if they had the wrong mime type, as long as the html document that requested them was being processed in quirks mode. f...
...And 7 more matches
Beginning our React todo list - Learn web development
pboard, then paste it into app.js so that it replaces the existing app() function: function app(props) { return ( <div classname="todoapp stack-large"> <h1>todomatic</h1> <form> <h2 classname="label-wrapper"> <label htmlfor="new-todo-input" classname="label__lg"> what needs to be done? ...
...on app(props) { return ( <div classname="todoapp stack-large"> <h1>todomatic</h1> <form> <h2 classname="label-wrapper"> <label htmlfor="new-todo-input" classname="label__lg"> what needs to be done? ...
...n type="button" classname="btn"> edit <span classname="visually-hidden">repeat</span> </button> <button type="button" classname="btn btn__danger"> delete <span classname="visually-hidden">repeat</span> </button> </div> </li> </ul> </div> ); } now open public/index.html and change the <title> element’s
text to todomatic. this way, it will match the <h1> at the top of our app. <title>todomatic</title> when your browser refreshes, you should see something like this: it's ugly, and doesn’t function yet, but that's okay — we'll style it in a moment. first, consider the jsx we have, and how it corresponds to our user stories: we have a <form> element, with an <input type="
text"> for writing o...
...And 7 more matches
Mozilla Web Developer FAQ
way to activate the quirks mode for html is to omit the doctype declaration. however, authoring new documents that rely on quirks is discouraged. the almost standards mode was introduced in mozilla 1.1 beta and mozilla 1.0.1. in earlier versions the doctype declarations that now activate the almost standards mode activated the standards mode. doctype sniffing only applies to documents served as
text/html. documents sent as xml always activate the standards layout mode. this includes documents sent as application/xhtml+xml. the consequence is that xhtml 1.0 transitional documents are rendered in the almost standards mode when served as
text/html under pre
text of the appendix c but in the standards mode when served as application/xhtml+xml. since also other contemporary browsers have a standa...
...e behavior of old browsers. these aspects of the layout can be changed by explicitly setting the display css property of the images (and possible surrounding <a> elements) to block. if the table cells that contain only an image are marked with <td class="imgcell">, the required css rule is: .imgcell img, .imgcell a { display: block; } longer explanation… why are there still gaps even between
text rows in tables when the layout engine is in the standards mode or in the almost standards mode? in the standards mode and in the almost standards mode mozilla does not suppress the default margins of the first and last child element in table cells. therefore, the default margins for paragraphs apply even with markup such as <td><p>foo</p></td>. often the content of a cell in a table of tabular ...
... html markup, such as <style>, does not belong in .css files. font-face is not a real css property. the property is font-family and @font-face is an at-rule. if @import is used, it should be the first thing in a css file. css parsing errors are reported to the javascript console. is the server sending the proper content-type header for css style sheets? the correct type is
text/css. in the standards mode and the almost standards mode only style sheets with the correct type are applied. you can see the http headers sent by the server by using the livehttpheaders extension or by using the web sniffer. class names and ids are case-sensitive. the element selectors are case-sensitive with xml. style sheet processing instructions are only allowed in the prolog o...
...And 7 more matches
NSS API Guidelines
( !nssfoo_verifypointer(arg1) ) return (rv *)null; if( !nssbar_verifypointer(arg2) ) return (rv *)null; #endif /* debug */ return nsstype_method(t, arg1, arg2); } aside from error cases, all documented entry points should check pointers in a debug, wherever possible. pointers to user-supplied buffers, and templates, should be checked against null. pointers to con
text-style functions should be checked using special debug macros. these macros only define code when debug is turned on, providing a way for systems to register, deregister, and check valid pointers. secport_decl_ptr_class(classname, size) - declare a class of pointers (labelled classname) this object file needs to check. this class is local only to this object file. size is the expected number of p...
...y it. for some data structures, this problem can be removed by protected reference counting. the object does not disappear until all users have released it. next we examine global data, including function local static structures. just initialized, and never to be changed global data, does not need to protection from mutexes. we should also determine if global data should be moved to a session con
text (see session con
text and global effects below). note: permanent objects, like data in files, databases, tokens, etc. should be treated as global data. global data which is changed rarely, should be protected by reader/writer locks. aside from global data, allocated data that gets modified needs to be examined. data that's just been allocated, within a function, is safe to modify. no other cod...
... pointer. once that data pointer is made visible to the 'outside', either by returning the pointer, or attaching the pointer to an existing visible data structure, access to the data should be protected. data structures that are read only, like seckeypublickeys or pk11symkeys, need not be protected. many of the data structures in the security code contain some sort of session state or session con
text. these data structures may be accessed without data protection as long as: this semantic is documented in the functions which use these data structures. these data structures are used for single streams, and not reused. examples of these data in structures may include things like the pkcs #7 contentinfo structure. example code should be included in the documentation, to show how to safely u...
...And 7 more matches
nss tech note4
oid represents an algorithm, a mechanism, a piece of information, etc. examples: x500 rsa encryption, certificate basic constraints, pkcs#7 digested data, etc. there is a long list of pre-defined oids, and new ones can be added dynamically by an application. ...
... oids, and new ones can be added dynamically by an application. the oid data structure contains an array of identifier bytes (each byte is a "level" in a hierarchical namespace), a
text description, and some other things. ...
...ecoid_findoidtag(ext_oid); switch (oidtag) { case a_tag_that_app_recognizes: ..... case ..... ...... ...
...And 7 more matches
nsIAlertsService
cko 22, the notifications are provided by firefox and have become platform-independent. ...
...e provided by firefox and have become platform-independent. ...
...ing); void closealert([optional] in astring name, [optional] in nsiprincipal principal); methods showalertnotification() displays a notification window. note: if you are calling this function from javascript, you should wrap it in a try/catch because it can fail on mac os x prior to firefox 22. void showalertnotification( in astring imageurl, in astring title, in astring
text, in boolean
textclickable, optional in astring cookie, optional in nsiobserver alertlistener, optional in astring name, optional in astring dir, optional in astring lang, optional in astring data, optional in nsiprincipal principal, optional in boolean inprivatebrowsing, optional ); parameters imageurl a url identifying the image to display in the notification alert. titl...
...And 7 more matches
nsIAuthPrompt
on. inherits from: nsisupports last changed in gecko 1.9 (firefox 3) this interface is implemented by @mozilla.org/login-manager/prompter;1. ...
...is interface is implemented by @mozilla.org/login-manager/prompter;1. ...
... save_password_for_...
...And 7 more matches
CDATASection - Web APIs
the cdatasection interface represents a cdata section that can be used within xml to include extended portions of unescaped
text. the symbols < and & don’t need escaping as they normally do when inside a cdata section. in xml, a cdata section looks like: <![cdata[ ... ]]> for example: <foo>here is a cdata section: <![cdata[ < > & ]]> with all kinds of unescaped
text.</foo> the only sequence which is not allowed within a cdata section is the closing sequence of a cdata section itself, ]]>: <![cdata[ ]]> will cause an error ]]> note that cdata sections should not be used within html; they only work in xml. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display:...
...splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/characterdata" target="_top"><rect x="266" y="1" width="130" heigh...
...And 7 more matches
DOMParser - Web APIs
xmldocument depending on the mimetype argument. parameters this method has 2 parameters (both required): string the domstring to be parsed. it must contain either html, xml, xhtml+xml, or svg document. mimetype a domstring. this string determines a class of the the method's return value. ...
...ype argument. parameters this method has 2 parameters (both required): string the domstring to be parsed. it must contain either html, xml, xhtml+xml, or svg document. mimetype a domstring. this string determines a class of the the method's return value. ...
... parsing svg or html the domparser can also be used to parse an svg document (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7) or an html document (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9). there are three dif...
...And 7 more matches
Examples of web and XML development using the DOM - Web APIs
on the element and that object's css style properties, which can be retrieved and set from the dom. in this case, you are manipulating the individual styles directly. in the next example (see example 4), you can use stylesheets and their rules to change styles for whole documents. ...
...cuments. <!doctype html> <html lang="en"> <head> <title>changing color and font-size example</title> <script> function change
text() { var p = document.getelementbyid("pid"); p.style.color = "blue" p.style.fontsize = "18pt" } </script> </head> <body> <p id="pid" onclick="window.location.href = 'http://www.cnn.com/';">linker</p> <form> <p><input value="rec" type="button" onclick="change
text();" /></p> </form> </body> </html> example 4: using stylesheets the stylesheets property on the document object returns a list of the stylesheets that have been loaded on that document. you can access these stylesheets and their rules individually using the stylesheet, style, and cssrule objects, as demonstrated in this example, which prints out all of the style rule selectors to the console.
...ve been loaded on that document. you can access these stylesheets and their rules individually using the stylesheet, style, and cssrule objects, as demonstrated in this example, which prints out all of the style rule selectors to the console. ...
...And 7 more matches
Using Fetch - Web APIs
fetch('https://example.com', { credentials: 'include' }); if you only want to send credentials if the request url is on the same origin as the calling script, add credent...
...e"][multiple]'); formdata.append('title', 'my vegas vacation'); for (let i = 0; i < photos.files.length; i++) { formdata.append('photos', photos.files[i]); } fetch('https://example.com/posts', { method: 'post', body: formdata, }) .then(response => response.json()) .then(result => { console.log('success:', result); }) .catch(error => { console.error('error:', error); }); processing a
text file line by line the chunks that are read from a response are not broken neatly at line boundaries and are uint8arrays, not strings. if you want to fetch a
text file and process it line by line, it is up to you to handle these complications. the following example shows one way to do this by creating a line iterator (for simplicity, it assumes the
text is utf-8, and doesn't handle fetch errors).
...e chunks that are read from a response are not broken neatly at line boundaries and are uint8arrays, not strings. if you want to fetch a
text file and process it line by line, it is up to you to handle these complications. the following example shows one way to do this by creating a line iterator (for simplicity, it assumes the
text is utf-8, and doesn't handle fetch errors). ...
...And 7 more matches
HTMLAnchorElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 7 more matches
HTMLElement - Web APIs
lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 7 more matches
HTMLMediaElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 30%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 180" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 7 more matches
HTMLOptionElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 7 more matches
HTMLTableCellElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 7 more matches
Using IndexedDB - Web APIs
the time of unloading. at least with the addition of the abort notifications and idbdatabase.onclose, you can know when this has happened. locale-aware sorting mozilla has implemented the ability to perform locale-aware sorting of indexeddb data in firefox 43+. by default, indexeddb didn’t handle internationalization of sorting strings at all, and everything was sorted as if it were english
text. for example, b, á, z, a would be sorted as: a b z á which is obviously not how users want their data to be sorted — aaron and Áaron for example should go next to one another in a contacts list. achieving proper international sorting therefore required the entire dataset to be called into memory, and sorting to be performed by client-side javascript, which is not very efficient. thi...
...rns the locale if any, or null if none is specified) and isautolocale (returns true if the index was created with an auto locale, meaning that the platform's default locale is used, false otherwise.) note: this feature is currently hidden behind a flag — to enable it and experiment, go to about:config and enable dom.indexeddb.experimental. ...
...lass="note"> <p> works and tested with: </p> <div id="compat"> </div> </div> <div id="msg"> </div> <form id="register-form"> <table> <tbody> <tr> <td> <label for="pub-title" class="required"> title: </label> </td> <td> <input type="
text" id="pub-title" name="pub-title" /> </td> </tr> <tr> <td> <label for="pub-biblioid" class="required"> bibliographic id:<br/> <span class="note">(isbn, issn, etc.)</span> </label> </td> <td> <input type="
text" id="pub-biblioid" name="pub-biblioid"/> ...
...And 7 more matches
OffscreenCanvas - Web APIs
offscreencanvas.converttoblob() creates a blob object representing the image contained in the canvas. ...
... offscreencanvas.converttoblob() creates a blob object representing the image contained in the canvas. ...
... offscreencanvas.converttoblob() creates a blob object representing the image contained in the canvas. offscreencanvas.transfertoimagebitmap() creates an imagebitmap object from the most recently rendered image of the offscreencanvas. ...
...And 7 more matches
PannerNode.coneInnerAngle - Web APIs
the coneinnerangle property of the pannernode interface is a double value describing the angle, in degrees, of a cone inside of which there will be no volume reduction. the coneinnerangle property's default value is 360, suitable for a non-directional source. syntax var audioctx = new audiocon
text(); var panner = audioctx.createpanner(); panner.coneinnerangle = 360; value a double. example in this example, we'll demonstrate how changing the orientation parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume. to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector. the x and z components are always at a 90° to each other, so...
...the angle so 0 points towards the listener const radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...st radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...And 7 more matches
PannerNode.coneOuterAngle - Web APIs
the coneouterangle property of the pannernode interface is a double value describing the angle, in degrees, of a cone outside of which the volume will be reduced by a constant value, defined by the coneoutergain property. the coneouterangle property's default value is 0. syntax var audioctx = new audiocon
text(); var panner = audioctx.createpanner(); panner.coneouterangle = 0; value a double. example in this example, we'll demonstrate how changing the orientation parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume. to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector. the x and z components are always at a 90° to each...
...the angle so 0 points towards the listener const radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...st radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...And 7 more matches
PannerNode.coneOuterGain - Web APIs
the default is 0, and its value can be in the range 0–1. ...
...the angle so 0 points towards the listener const radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...st radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...And 7 more matches
A basic 2D WebGL animation example - Web APIs
stem we use to represent our scene is the same as the canvas's coordinate system. that is, (0, 0) is at the top-left corner and the bottom-right corner is at (600, 460). vertex shader first, let's take a look at the vertex shader. its job, as always, is to convert the coordinates we're using for our scene into clipspace coordinates (that is, the system by which (0, 0) is at the center of the con
text and each axis extends from -1.0 to 1.0 regardless of the actual size of the con
text). <script id="vertex-shader" type="x-shader/x-vertex"> attribute vec2 avertexposition; uniform vec2 uscalingfactor; uniform vec2 urotationvector; void main() { vec2 rotatedposition = vec2( avertexposition.x * urotationvector.y + avertexposition.y * urotationvector.x, avertexp...
... = vec4(rotatedposition * uscalingfactor, 0.0, 1.0); } </script> the main program shares with us the attribute avertexposition, which is the position of the vertex in whatever coordinate system it's using. we need to convert these values so that both components of the position are in the range -1.0 to 1.0. this can be done easily enough by multiplying by a scaling factor that's based on the con
text's aspect ratio. we'll see that computation shortly. we're also rotating the shape, and we can do that here, by applying a transform. we'll do that first. the rotated position of the vertex is computed by applying the rotation vector, found in the uniform urotationvector, that's been computed by the javascript code. then the final position is computed by multiplying the rotated position by the s...
...or provided by the javascript code in uscalingfactor. the values of z and w are fixed at 0.0 and 1.0, respectively, since we're drawing in 2d. the standard webgl global gl_position is then set to the transformed and rotated vertex's position. fragment shader next comes the fragment shader. its role is to return the color of each pixel in the shape being rendered. since we're drawing a solid, un
textured object with no lighting applied, this is exceptionally simple: <script id="fragment-shader" type="x-shader/x-fragment"> #ifdef gl_es precision highp float; #endif uniform vec4 uglobalcolor; void main() { gl_fragcolor = uglobalcolor; } </script> this starts by specifying the precision of the float type, as required. then we set the global gl_fragcolor to the value of the ...
...And 7 more matches
Writing WebSocket client applications - Web APIs
e http upgrade mechanism, so the request for the protocol upgrade is implicit when we address the web server as ws://www.example.com or wss://www.example.com. sending data to the server once you've opened your connection, you can begin transmitting data to the server. to do this, simply call the websocket object's send() method for each message you want to send: examplesocket.send("here's some
text that the server is urgently awaiting!"); you can send data as a string, blob, or arraybuffer. as establishing a connection is asynchronous and prone to failure there is no guarantee that calling the send() method immediately after creating a websocket object will be successful. we can at least be sure that attempting to send data only takes place once a connection is established by defining an...
... connection is asynchronous and prone to failure there is no guarantee that calling the send() method immediately after creating a websocket object will be successful. ...
...ler to do the work: examplesocket.onopen = function (event) { examplesocket.send("here's some
text that the server is urgently awaiting!"); }; using json to transmit objects one handy thing you can do is use json to send reasonably complex data to the server. for example, a chat program can interact with a server using a protocol implemented using packets of json-encapsulated data: // send
text to all users through the server function send
text() { // construct a msg object containing the data the server needs to process the message from the chat client. var msg = { type: "message",
text: document.getelementbyid("
text").value, id: clientid, date: date.now() }; // send the msg object as a json-formatted string. examplesocket.send(json.stringify(msg)); // bl...
...And 7 more matches
Understandable - Accessibility
the web content accessibility guidelines (wcag) 2.0 and 2.1. understandable states that information and the operation of user interface must be understandable. note: to read the w3c definitions for understandable and its guidelines and success criteria, see principle 3: understandable — information and the operation of user interface must be understandable. guideline 3.1 — readable: make
text content readable and understandable this guideline focuses on making
text content as understandable as possible. success criteria how to conform to the criteria practical resource 3.1.1 language of page (a) the default human language of each web page should be detectable via code. this is essential for purposes like making sure the reader has arrived at a page wri...
...rms that aren't part of a specific language). 3.1.3 unusual words (aaa) where technical terms, jargon, or idioms/slang are used, definitions should be provided for such phrases/words. your site should provide a glossary that contains definitions of such words/terms that you can then link to when they appear, or at the very least provide definitions somewhere in the surrounding
text, or in a description list at the bottom of the page. 3.1.4 abbreviations (aaa) where abbreviations are used, you should provide an expansion of them, or a definition as required. the <abbr> element is often thought of as the preferred way to provide an expansion for an abbreviation — it takes a title attribute that contains the expansion, and this appears when the acro...
...tion — it takes a title attribute that contains the expansion, and this appears when the acronym is moused over. however, the title contents are not accessible via keyboard, nor are they reliably read out by screenreaders. a better way to handle this is to again provide links to glossary pages containing the acronym expansion and explanation, or at the very least include them in the surrounding
text in con
text. see abbreviations. 3.1.5 reading level (aaa) if
text is provided that requires a higher reading level that lower secondary education level (typically children around 11-14 years old), provide supplementary explainer material to help people who can't read it, or provide an alternative version that is written at lower secondary level. this doesn't mean that ...
...And 7 more matches
:checked - CSS: Cascading Style Sheets
ed; } result toggling elements with a hidden checkbox this example utilizes the :checked pseudo-class to let the user toggle content based on the state of a checkbox, all without using javascript. ...
...ggling elements with a hidden checkbox this example utilizes the :checked pseudo-class to let the user toggle content based on the state of a checkbox, all without using javascript. ...
... a hidden checkbox this example utilizes the :checked pseudo-class to let the user toggle content based on the state of a checkbox, all without using javascript. ...
...And 7 more matches
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
l keywords as offset values to push the item around. in the code snippet below, the item is placed 20 pixels from the top, and 30 pixels from the left of the container: .container { position: relative; } .item { position: absolute; top: 20px; left: 30px; } <div class="container"> <div class="item">item</div> </div> another place you might see physical keywords in use, is when using
text-align: right to align
text to the right. there are also physical properties in css. we add margins, padding, and borders using these physical properties of margin-left, padding-left, and so on. we call these keywords and properties physical because they relate to the screen you are looking at. left is always left, no matter what direction your
text is running. this can become an issue when deve...
... we add margins, padding, and borders using these physical properties of margin-left, padding-left, and so on. we call these keywords and properties physical because they relate to the screen you are looking at. left is always left, no matter what direction your
text is running. this can become an issue when developing a site that has to work in multiple languages, including languages that have
text starting on the right, rather than the left. browsers are pretty good at dealing with
text direction, and you don’t even need to be working in a rtl language to take a look. in the example below, i have two paragraphs. one has no
text-align property set, the second has
text-align set to left. i have added dir="rtl" to the html element, which switches the writing mode from the default for an eng...
... and you don’t even need to be working in a rtl language to take a look. in the example below, i have two paragraphs. one has no
text-align property set, the second has
text-align set to left. i have added dir="rtl" to the html element, which switches the writing mode from the default for an english language document of ltr. you can see that the first paragraph remains left to right, due to the
text-align value being left . the second however, switches direction and the
text runs from right to left . this is a very simple example of the problem with physical values and properties being used in css. they prevent the browser being able to do the work to switch writing mode, as they make the assumption that the
text is flowing left to right and top to bottom. logical properties and values ...
...And 7 more matches
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
). complex websites have very large amounts of css, often with a lot of repeated values. for example, the same color might be used in hundreds of different places, requiring global search and replace if that color needs to change. custom properties allow a value to be stored in one place, then referenced in multiple other places. an additional benefit is semantic identifiers. for example, --main-
text-color is easier to understand than #00ff00, especially if this same color is also used in other con
texts. custom properties are subject to the cascade and inherit their value from their parent. basic usage declaring a custom property is done using a custom property name that begins with a double hyphen (--), and a property value that can be any valid css value. like any other property, this is...
...which leads us to this: notice the repetition in the css. the background color is set to brown in several places. for some css declarations, it is possible to declare this higher in the cascade and let css inheritance solve this problem naturally. for non-trivia...
...which leads us to this: notice the repetition in the css. the background color is set to brown in several places. for some css declarations, it is possible to declare this higher in the cascade and let css inheritance solve this problem naturally. for non-trivial projects, this is not always po...
...And 7 more matches
Making content editable - Developer guides
these are object resizing on <img>, <table>, and absolutely-positioned elements; inline table editing to add or remove rows and columns; and the grabber that allows moving of absolutely-positioned elements. ...
...these are object resizing on <img>, <table>, and absolutely-positioned elements; inline table editing to add or remove rows and columns; and the grabber that allows moving of absolutely-positioned elements. ...
...at allows moving of absolutely-positioned elements. see bug 1449564 and firefox-specific html editing ui has been deprecated for additional details. how does it work? all you have to do is set the contenteditable attribute on nearly any html element to make it editable. here's a simple example which creates a <div> element whose contents the user can edit. ...
...And 7 more matches
Constraint validation - Developer guides
nt validation or have a sanitization algorithm transforming incorrect values to a correct default. validation-related attributes in addition to the type attribute described above, the following attributes are used to describe basic constraints: attribute input types supporting the attribute possible values constraint description associated violation pattern
text, search, url, tel, email, password a javascript regular expression (compiled with the ecmascript 5 global, ignorecase, and multiline flags disabled) the value must match the pattern. patternmismatch constraint violation min range, number a valid number the value must be greater than or equal to the value. rangeunderflow constraint violation date, month, week...
... valuemissing constraint violation step date an integer number of days unless the step is set ...
...ange, number a valid number the value must be less than or equal to the value rangeoverflow constraint violation date, month, week a valid date datetime, datetime-local, time a valid date and time required
text, search, url, tel, email, password, date, datetime, datetime-local, month, week, time, number, checkbox, radio, file; also on the <select> and <
textarea> elements none as it is a boolean attribute: its presence means true, its absence means false there must be a value (if set). valuemissing constraint violation step date an integer number of days unless the step is set to the any literal, the value must be min + an integral multiple of the step. stepmismatch constraint violation month an integer numbe...
...And 7 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
supplementary reading. what requests use cors? this cross-origin sharing standard can enable cross-site http requests for: invocations of the xmlhttprequest or fetch apis, as discussed above. web fonts (for cross-domain font usage in @font-face within css), so that servers can deploy truetype fonts that can only be cross-site loaded and used by web sites that are permitted to do so. webgl
textures. images/video frames drawn to a canvas using drawimage(). css shapes from images. this article is a general discussion of cross-origin resource sharing and includes a discussion of the necessary http headers. functional overview the cross-origin resource sharing standard works by adding new http headers that let servers describe which origins are permitted to read that information from ...
... no readablestream object is used in the request. note: these are the same kinds of cross-site requests that web content can already issue, and no response data is released to the requester unless the server sends an appropriate header...
... http/1.1 200 ok date: mon, 01 dec 2008 00:23:53 gmt server: apache/2 access-control-allow-origin: * keep-alive: timeou...
...And 7 more matches
List of default Accept values - HTTP
this article documents the default values for the http accept header for specific inputs and browser versions. default values these are the values sent when the con
text doesn't give better information. note that all browsers add the */* mime type to cover all cases. this is typically used for requests initiated via the address bar of a browser, or via an html <a> element. ...
...or the http accept header for specific inputs and browser versions. default values these are the values sent when the con
text doesn't give better information. note that all browsers add the */* mime type to cover all cases. this is typically used for requests initiated via the address bar of a browser, or via an html <a> element. user agent value comment firefox
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (since firefox 66)
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 (in firefox 65)
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (before) in firefox 65 and earlier, this value can be modified using the network.http.accept.default parameter. (source) safari,...
...n/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (since firefox 66)
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 (in firefox 65)
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (before) in firefox 65 and earlier, this value can be modified using the network.http.accept.default parameter. ...
...And 7 more matches
Template literals (Template strings) - JavaScript
template literals are string literals allowing embedded expressions. you can use multi-line strings and string interpolation features with them. they were called "template strings" in prior editions of the es2015 specification. syntax `string
text` `string
text line 1 string
text line 2` `string
text ${expression} string
text` tag`string
text ${expression} string
text` description template literals are enclosed by the backtick (` `) (grave accent) character instead of double or single quotes. template literals can contain placeholders. these are indicated by the dollar sign and curly braces (${expression}). the expressions in the placeholders and the
text between the backticks (` `) get passed to a function. the default function just concatenates the parts into a single string. i...
...plate literal, which you can then manipulate before outputting. to escape a backtick in a template literal, put a backslash (\) before the backtick. `\`` === '`' // --> true multi-line strings any newline characters inserted in the source are part of the template literal. ...
...can then manipulate before outputting. to escape a backtick in a template literal, put a backslash (\) before the backtick. `\`` === '`' // --> true multi-line strings any newline characters inserted in the source are part of the template literal. ...
...And 7 more matches
begin - SVG: Scalable Vector Graphics
"60" height="15" width="0"> <animate attributetype="xml" attributename="width" to="75" begin="2s" dur="6s" fill="freeze" /> </rect> <rect x="60" y="85" height="15" width="0"> <animate attributetype="xml" attributename="width" to="50" begin="4s" dur="4s" fill="freeze" /> </rect> <!-- grid --> <
text x="10" y="20"
text-anchor="middle">0s</
text> <line x1="10" y1="25" x2="10" y2="105" stroke="grey" stroke-width=".5" /> <
text x="35" y="20"
text-anchor="middle">2s</
text> <line x1="35" y1="25" x2="35" y2="105" stroke="grey" stroke-width=".5" /> <
text x="60" y="20"
text-anchor="middle">4s</
text> <line x1="60" y1="25" x2="60" y2="105" stroke="grey" stroke-width=".5" /> <
text ...
...
text-anchor="middle">0s</
text> <line x1="10" y1="25" x2="10" y2="105" stroke="grey" stroke-width=".5" /> <
text x="35" y="20"
text-anchor="middle">2s</
text> <line x1="35" y1="25" x2="35" y2="105" stroke="grey" stroke-width=".5" /> <
text x="60" y="20"
text-anchor="middle">4s</
text> <line x1="60" y1="25" x2="60" y2="105" stroke="grey" stroke-width=".5" /> <
text x="85" y="20"
text-anchor="middle">6s</
text> <line x1="85" y1="25" x2="85" y2="105" stroke="grey" stroke-width=".5" /> <
text x="110" y="20"
text-anchor="middle">8s</
text> <line x1="110" y1="25" x2="110" y2="105" stroke="grey" stroke-width=".5" /> <line x1="10" y1="30" x2="110" y2="30" stroke="grey" stroke-width=".5" /> <line x1="10" y1="105" x2="110" y2="105" stroke="grey" stroke-width=".5" /> ...
...ct> <rect x="60" y="60" height="15" width="0"> <animate attributetype="xml" attributename="width" to="25" id="second" begin="first.end" dur="2s" /> </rect> <rect x="85" y="85" height="15" width="0"> <animate attributetype="xml" attributename="width" to="25" id="third" begin="second.end" dur="2s" /> </rect> <!-- grid --> <
text x="10" y="20"
text-anchor="middle">0s</
text> <line x1="10" y1="25" x2="10" y2="105" stroke="grey" stroke-width=".5" /> <
text x="35" y="20"
text-anchor="middle">2s</
text> <line x1="35" y1="25" x2="35" y2="105" stroke="grey" stroke-width=".5" /> <
text x="60" y="20"
text-anchor="middle">4s</
text> <line x1="60" y1="25" x2="60" y2="105" stroke="grey" stroke-width=".5" /> <
text ...
...And 7 more matches
font-variant - SVG: Scalable Vector Graphics
the font-variant attribute indicates whether the
text is to be rendered using variations of the fontʼs glyphs. note: as a presentation attribute, font-variant can be used as a css property. see the css font-variant property for more information. ...
... the font-variant attribute indicates whether the
text is to be rendered using variations of the fontʼs glyphs. note: as a presentation attribute, font-variant can be used as a css property. see the css font-variant property for more information. ...
... the font-variant attribute indicates whether the
text is to be rendered using variations of the fontʼs glyphs. note: as a presentation attribute, font-variant can be used as a css property. see the css font-variant property for more information. ...
...And 7 more matches
Index - XPath
_xslt, xpath, xpath_reference, xslt, xslt_reference for further information on using xpath expressions, please see the for further reading section at the end of transforming xml with xslt document. also see the 'axes' section in the xpath spec. 3 ancestor axe, xpath no summary! 4 ancestor-or-self axe, xpath the ancestor-or-self axis indicates the con
text node and all of its ancestors, including the root node. 5 attribute axe, xpath the attribute axis indicates the attributes of the con
text node. only elements have attributes. this axis can be abbreviated with the at sign (@). 6 child axe, xpath the child axis indicates the children of the con
text node. if an xpath expression does not specify an axis, the ...
... at sign (@). 6 child axe, xpath the child axis indicates the children of the con
text node. if an xpath expression does not specify an axis, the child axis is understood by default. since only the root node or element nodes have children, any other use will select nothing. 7 descendant axe, xpath the descendant axis indicates all of the children of the con
text node, and all of their children, and so forth. attribute and namespace nodes are not included - the parent of an attribute node is an element node, but attribute nodes are not the children of their parents. 8 descendant-or-self axe, xpath the descendant-or-self axis indicates the con
text node and all of its descendants. attribute and namespace nodes are not included - the par...
... descendant-or-self axe, xpath the descendant-or-self axis indicates the con
text node and all of its descendants. attribute and namespace nodes are not included - the parent of an attribute node is an element node, but attribute nodes are not the children of their parents. 9 following axe, xpath the following axis indicates all the nodes that appear after the con
text node, except any descendant, attribute, and namespace nodes. 10 following-sibling axe, xpath the following-sibling axis indicates all the nodes that have the same parent as the con
text node and appear after the con
text node in the source document. 11 namespace axe, xpath (not supported) 12 parent axe, xpath the parent axis indicates t...
...And 7 more matches
Communicating using "port" - Archive of obsolete content
global self object. thus, to emit a message from a content script: self.port.emit("mycontentscriptmessage", mycontentscriptmessagepayload); to receive a message from the add-on code: self.port.on("myaddonmessage", function(myaddonmessagepayload) { // handle the message }); compare this to the technique used to receive built-in messages in the content script. for example, to receive the con
text message in a content script associated with a con
text menu object, you would call the on function attached to the global self object: self.on("con
text", function() { // handle the message }); so the port property is essentially used here as a namespace for user-defined messages. accessing port in the add-on script in the add-on code, the channel of communication between the add-on and a pa...
...thus the port object for communicating with a content script is a property of the corresponding worker object. however, the worker is not exposed to add-on code in quite the same way in all modules. the panel and page-worker objects integrate the worker api directly. ...
... however, the worker is not exposed to add-on code in quite the same way in all modules. the panel and page-worker objects integrate the worker api directly. ...
...And 6 more matches
Miscellaneous - Archive of obsolete content
m; width: 10em;"> this is the scrolling area. this is the scrolling area. this is the scrolling area. this is the scrolling area. this is the scrolling area. this is the scrolling area. this is the scrolling area. this is the scrolling area. this is the scrolling area. this is the scrolling area. this is the scrolling area. this is the scrolling area. ...
...mousewheel.withcontrolkey.action and related preferences. the meaning of the action preference is shown in the following table mousewheel.withxxxkey.action result 0 scroll by lines. if set, you will receive dommousescroll events. 1 scroll by page. 2 move around in the history. if set, you will not receive dommousescroll events. 3 change
text size. if set, you will not receive dommousescroll events. you can listen to mouse wheel click events just like normal click events (via mousedown and mouseup events). when the mouse wheel is clicked, event.button will be equal to 1. simulating mouse and key events https://developer.mozilla.org/samples/domref/dispatchevent.html also, new in firefox 3 / gecko 1.9: var utils = window.quer...
...y events https://developer.mozilla.org/samples/domref/dispatchevent.html also, new in firefox 3 / gecko 1.9: var utils = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindowutils); utils.sendmouseevent("mousedown", 10, 10, 0, 1, 0); utils.sendmouseevent("mouseup", 10, 10, 0, 1, 0); getting the currently selected
text from browser.xul overlay con
text: var selected
text = document.commanddispatcher.focusedwindow.getselection().tostring(); or: content.getselection(); // |window| object is implied; i.e., window.content.getselection() or: getbrowserselection(); // |window| object is implied; i.e., window.getbrowserselection() this final option massages the selection to remove leading and trailing whitespa...
...And 6 more matches
XUL user interfaces - Archive of obsolete content
lized features can be built from parts by using xul together with other technologies that you have seen in this tutorial: css style, javascript code, and xbl bindings. like other xml-based languages, xul uses css stylesheets. more details for more information about xul user interfaces, see the xul page in this wiki. ...
...d xbl bindings. like other xml-based languages, xul uses css stylesheets. more details for more information about xul user interfaces, see the xul page in this wiki. action: a xul demonstration make a new xul document as a plain
text file, doc7.xul. ...
... title="css getting started - xul demonstration" onload="init();"> <script type="application/javascript" src="script7.js"/> <label class="head-1" value="xul demonstration"/> <vbox> <groupbox class="demo-group"> <caption label="day of week calculator"/> <grid> <columns> <column/> <column/> </columns> <rows> <row> <label class="
text-prompt" value="date:" accesskey="d" control="date-
text"/> <
textbox id="date-
text" type="timed" timeout="750" oncommand="refresh();"/> </row> <row> <label value="day:"/> <hbox id="day-box"> <label class="day" value="sunday" disabled="true"/> <label class="day" value="monday" disabled="true"/> ...
...And 6 more matches
Drag and Drop Example - Archive of obsolete content
(event, boardobserver)" ondragdrop="nsdraganddrop.drop(event, boardobserver)"> </stack> the board only needs to respond to the dragdrop and dragover events. we'll add a boardobserver to the file dragboard.js in a moment. next, a palette will be added to the right side of the window. ...
...we'll create a listobserver object that will set the data to be dragged. note that each button here has an additional elem attribute. this is a made-up attribute. ...
...we'll create a listobserver object that will set the data to be dragged. note that each button here has an additional elem attribute. this is a made-up attribute. ...
...And 6 more matches
Introduction to XUL - Archive of obsolete content
nstance, will have preconceived notions of what to do when they receive an "open file" command. an "open" button is simply a button. it will send its command to the application for processing, generally using some simple javascript for linkage. we are at first primarily concerned with the obvious ui components: toolbars, menus and dialogs. ...
...ensitive. xul is equally so. our current code tends not to be strict about enforcing this, especially for tags and attributes in the html namespace. this will change: tags and attributes will, as a rule, always be lower case as suggested in the xhtml working draft. mozilla gives a special meaning to xul files; it expects to find ui descriptions within. for this reason, we've defined a mime type "
text/xul" mapped to files with the extension ".xul". (for standards purposes, we will probably need to change the the mime type to something like "
text/x-xul".) these files are processed using the same parser as "
text/xml" files (and therefore subject to xml syntax rules, as they should be). it's possible to load a xul document from an xml file (one named *.xml). the resulting ui will be created using...
...ated stylesheets. mozilla includes a standard stylesheet, "xul.css". you can load as many style sheets as you wish using repeated processing directives, although you should always make sure to load the xul.css file initially. and finally, any namespaces used in the document must be declared. so a xul file will begin <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/xul.css" type="
text/css"?> <!doctype window> <window xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> the html namespace is of course the standard one. the xul namespace is obviously a temporary one, but at least serves to explain the pronunciation. note that the above example is using an implicit xul namespace. this is optional; other examples in t...
...And 6 more matches
OpenClose - Archive of obsolete content
oncommand="document.getelementbyid('editmenu').open = true;"/> <menu id="editmenu" label="edit"> <menupopup> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </menu> this technique may be used for both menupopups that use the menu tag, the button tag and the toolbarbutton tag. for menupopups attached to other elements using the popup or con
text attributes, see opening a popup below. as with other ways of opening a menu, the popupshowing event will be fired to provide an opportunity to customize the commands that appear on the menu. there are several situations when opening a menu is not allowed. these are: if the menu is already open, or already in the process of being opened. naturally, attempting to open a menu that is already op...
...open and the open property on the submenu is set to false, the submenu will close, yet the parent file menu will remain open. on the other hand, if the open property on the file menu is set to false, both menus will close. this technique may be used for both menupopups that use the menu tag, the button tag and the toolbarbutton tag. for menupopups attached to other elements using the popup or con
text attributes, see closing a popup below. when a menu is closed, the popuphiding event is fired at the menupopup. attaching an event listener which listens for the popuphiding event can be used to remove any commands that were adding during the popupshowing event. menus and popups are also closed when the document or window they are contained within is closed, or if the menupopup element is remove...
...ans of replicating this action with the keyboard, so you should always provide an alternate means of accessing the functionality of the menu. this can be done by either placing alternate commands elsewhere in the user interface, or by providing a keyboard shortcut to open the menu. once the menu is open, the keyboard can be used to navigate and select items as usual. popups attached using the con
text attribute are opened when the user performs an action that attempts to open a con
text menu. this action will vary on each platform, but it general it involves clicking on the element with the right mouse button. on macintosh systems with only one mouse button, a con
text menu may be opened by either holding down the mouse button or by pressing the control key and clicking the mouse button. on wind...
...And 6 more matches
dialogheader - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a heading row for a dialog box. this element should be placed inside a dialog element. the header may have a title and a description. ...
...global.css" type="
text/css"?> <dialog id="donothing" title="dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <dialogheader title="my dialog" description="example dialog"/> <!-- other widgets --> </dialog> attributes crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. ...
...s given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left the
text will be cropped on its left side. right the
text will be cropped on its right side. ...
...And 6 more matches
listitem - Archive of obsolete content
by default it contains a single listcell element of type and class appropriate to that of the listitem. more information is available in the xul tutorial. ...
...ermine whether this attribute is set instead of getattribute(). for buttons, the type attribute must be set to checkbox or radio for this attribute to have any effect. command type: id set to the id of a command element that is being observed by the element. ...
...ckbox or radio for this attribute to have any effect. command type: id set to the id of a command element that is being observed by the element. crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left ...
...And 6 more matches
progressmeter - Archive of obsolete content
teger an integer ranging from 0 to the maximum value that indicates the progress. for instance, if no maximum value has been set, setting the value to "0" shows an empty bar, "100" shows a bar at full length and "25" shows the first quarter of the bar. ...
... integer ranging from 0 to the maximum value that indicates the progress. for instance, if no maximum value has been set, setting the value to "0" shows an empty bar, "100" shows a bar at full length and "25" shows the first quarter of the bar. ...
... max type: integer gets and sets the value of the max attribute. ...
...And 6 more matches
Audio for Web games - Game development
ividually using xmlhttprequest or the fetch api, which means you can load them synchronously or in parallel. loading synchronously might mean parts of your music are ready earlier and you can start playing them while others load. either way you may want to synchronize tracks or loops. the web audio api contains the notion of an internal clock that starts ticking the moment you create an audio con
text. you'll need to take account of the time between creating an audio con
text and when the first audio track starts playing. recording this offset and querying the playing track's current time gives you enough information to synchronize separate pieces of audio. to see this in action, let's lay out some separate tracks: <section id="tracks"> <ul> <li data-loading="true"> <a href="leadg...
...io con
text and when the first audio track starts playing. recording this offset and querying the playing track's current time gives you enough information to synchronize separate pieces of audio. ...
...ul> <li data-loading="true"> <a href="leadguitar.mp3" class="track">lead guitar</a> <p class="loading-
text">loading...</p> <button data-playing="false" aria-decribedby="guitar-play-label"> <span id="guitar-play-label">play</span> </button> </li> <li data-loading="true"> <a href="bassguitar.mp3" class="track">bass guitar</a> <p class="loading-
text">loading...</p> <button data-playing="false" aria-describedby="bass-play-label"> <span id="bass-play-label">play</span> </button> </li> <li data-loading="true"> <a href="drums.mp3" class="track">drums</a> <p class="loading-
text">loading...</p> <button data-playing="false" aria-describedby="drums-play-label"> <span id="drums-play-label">play</s...
...And 6 more matches
Advanced styling effects - Learn web development
tures such as box shadows, blend modes, and filters. prerequisites: html basics (study introduction to html) and an idea of how css works (study css first steps.) objective: to get an idea about how to use some of the advanced styling effects available in modern browsers. box shadows box-shadow allows you to apply one or more drop shadows to an element's box. like
text shadows, box shadows are supported pretty well across browsers, including ie9+ and edge. users of older ie versions might just have to cope with no shadows, so just test your designs to make sure your content is legible without them. you can find the examples in this section at box-shadow.html (see the source code too). a simple box shadow let's look at a simple example to get things started. ...
... 3px 3px 1px red, 4px 4px 1px red, 5px 5px 1px black, 6px 6px 1px black; } now we get this result: we've done something fun here by creating a raised box with multiple coloured layers, but you could use it in any way you want, for example to create a more realistic look with shadows based on multiple light sources. other box shadow features unlike
text-shadow, box-shadow has an inset keyword available — putting this at the start of a shadow declaration causes it to become an inner shadow, rather than an outer shadow. let's have a look and see what we mean. first, we'll go with some different html for this example: <button>press me!</button> button { width: 150px; font-size: 1.1rem; line-height: 2; border-radius: 10px; border: non...
.... try contrast(200%), invert(100%) or hue-rotate(20deg) on the live example below. take a look at the mdn page for filter for many other options you could try. you can apply filters to any element and not just images. some of the filter options available do very similar things to other css features, for example drop-shadow() works in a very similar way and gives a similar effect to box-shadow or
text-shadow. the really nice thing about filters however, is that they work on the exact shapes of the content inside the box, not just the box itself as one big chunk, so it is worth knowing the difference. in this next example we are applying our filter to a box, and comparing it to a box shadow. as you can see, the drop-shadow filter follows the exact shape of the
text and border dashes. the box ...
...And 6 more matches
Images, media, and form elements - Learn web development
elements can be a tricky issue when it comes to styling with css, and the web forms module contains detailed guides to the trickier aspects of styling form elements, which i will not fully reproduce here. there are a few key basics worth highlighting in this section of the article. many form controls are added to your page by way of the <input> element — this defines simple form fields such as
text inputs, through to more complex fields added in html5 such as color and date pickers. there are some additional elements, such as <
textarea> for multiline
text input, and also elements used to contain and label parts of forms such as <fieldset> and <legend>. html5 also contains attributes that enable web developers to indicate which fields are required, and even the type of content that needs to...
...ieldset> and <legend>. html5 also contains attributes that enable web developers to indicate which fields are required, and even the type of content that needs to be entered. if the user enters something unexpected, or leaves a required field blank, the browser can show an error message. different browsers are inconsistent in how much styling and customization they allow for such items. styling
text input elements elements that allow for
text input, such as <input type="
text">, specific types such as <input type="email">, and the <
textarea> element are quite easy to style and tend to behave just like other boxes on your page. the default styling of these elements will differ however based on the operating system and browser that your user visits the site with. in the example below we have ...
...we are using attribute selectors to target the different input types. try changing how this form looks by adjusting the borders, adding background colors to the fields, and changing fonts and padding. ...
...And 6 more matches
Introduction to CSS layout - Learn web development
ent (see types of css boxes for more information). we also have entire layout methods that are switched on via specific display values, for example css grid and flexbox, which alter how elements inside the element they are set on are laid out. floats — applying a float value such as left can cause block level elements to wrap alongside one side of an element, like the way images sometimes have
text floating around them in magazine layouts. the position property — allows you to precisely control the placement of boxes inside other boxes. static positioning is the default in normal flow, but you can cause elements to be laid out differently using other values, for example always fixed to the top of the browser viewport. table layout — features designed for styling the parts of an html t...
...in css are all values of the display property. this property allows us to change the default way something displays. everything in normal flow has a value of display, used as the default way that elements they are set on behave. for example, the fact that paragraphs in english display one below the other is due to the fact that they are styled with display: block. if you create a link around some
text inside a paragraph, that link remains inline with the rest of the
text, and doesn’t break onto a new line. this is because the <a> element is display: inline by default. you can change this default display behavior. for example, the <li> element is display: block by default, meaning that list items display one below the other in our english document. if we change the display value to inline th...
...at property has four possible values: left — floats the element to the left. right — floats the element to the right. none — specifies no floating at all. this is the default value. inherit — specifies that the value of the float property should be inherited from the element's parent element. in the example below we float a <div> left, and give it a margin on the right to push the
text away from the element. this gives us the effect of
text wrapped around that box, and is most of what you need to know about floats as used in modern web design. floats example body { width: 90%; max-width: 900px; margin: 0 auto; } p { line-height: 2; word-spacing: 0.1rem; } .box { background-color: rgb(207,232,220); border: 2px solid rgb(79,185,227); padding:...
...And 6 more matches
The web and web standards - Learn web development
e first implementation of the tcp/ip protocol suite. these two technologies form the basis of the infrastructure that the internet is built on. in 1980, tim berners-lee (often referred to as timbl) wrote a notebook program called enquire, which featured the concept of links between different nodes. sound familiar? fast forward to 1989, and timbl wrote information management: a proposal and hyper
text at cern; these two publications together provided the background for how the web would work. they received a fair amount of interest, enough to convince timbl's bosses to allow him to go ahead and create a global hyper
text system. by late 1990, timbl had created all the things needed to run the first version of the web — http, html, the first web browser, which was called worldwideweb, an http...
...me of them work together, read our article how the web works. browsers you are probably reading these words inside a web browser in this very moment (unless you've printed it out, or are using assistive technology, such as a screenreader to read it out to you). web browsers are the software programs people use to consume the web, and include firefox, chrome, opera, safari, and edge. http hyper
text transfer protocol, or http, is a messaging protocol that allows web browsers to communicate with web servers (where web sites are stored). a typical conversation goes something like "hello web server. can you give me the files i need to render bbc.co.uk"? "sure thing web browser — here you go" [downloads files and renders web page] the actual syntax for http messages (called requests and re...
...er. can you give me the files i need to render bbc.co.uk"? "sure thing web browser — here you go" [downloads files and renders web page] the actual syntax for http messages (called requests and responses) is not that human-readable, but this gives you the basic idea. ...
...And 6 more matches
Mozilla accessibility architecture
umptions about what is the most important information, and how an accessibility server like mozilla should use the api's programmatic interfaces to expose this information to an accessibility client (the assistive technology). each platform's accessibility api has made different assumptions, although there are a number of common characteristics. for example, they all expose an accessible name, or
text representation, of each object, and they all use an enumerated integer value from a finite list, to expose the role of an object. examples of accessible role constants are role_button, role_checkbox and role_list, although they can have slightly different names and values in each api. in general, the accessibility apis use similar concepts, but use different method, constant and interfaces names.
...ven that there is a fair amount of commonality between accessibility api toolkits, it made sense to write of the code in a cross platform manner, and then deal with the platform differences on a consistent manner. the shared code makes itself available to the toolkit-specific code via generic xpcom interfaces that return information about objects we want to expose. ...
... the shared code makes itself available to the toolkit-specific code via generic xpcom interfaces that return information about objects we want to expose. all focusable nodes, tables and
text have accessibility interfaces. we call these objects "accessible nodes". each of these accessible nodes supports at minimum the generic cross-platform accessibility interface nsiaccessible (which provides a
text name, enumerated role identifier and a set of state flags) and sometimes additional interfaces. for example, tables support nsiaccessibletable,
text supports nsiaccessible
text and edit boxes support nsieditable
text., although this code has been moved into the atk specific directories because it is not currently used in windows. we will not rule out the possibility of supporting some of the rich a...
...And 6 more matches
JS_THREADSAFE
s_threadsafe build, the application must separate code that uses the jsapi from code that performs blocking i/o or time-consuming calculations. a request is a region of code that uses the jsapi. requests must be bracketed with calls to js_beginrequest() and js_endrequest(). js_beginrequest(cx); /* ... do jsapi stuff ... */ js_endrequest(cx); a request is always associated with a specific jscon
text and runs from start to finish on a single thread. most jsapi functions require the caller to be in a request. in this reference, these jsapi functions are marked with the words "requires request", like this: name type description cx jscon
text * the con
text to use. requires request. in a js_threadsafe build, the caller must be in a request on this jscon
text. ...
...provides request. in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx. the callback does not need to call js_beginrequest()). in particular, jsnative callbacks provide a request. ...
...provides request. in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx. the callback does not need to call js_beginrequest()). in particular, jsnative callbacks provide a request. ...
...And 6 more matches
Building the WebLock UI
nents.classes["@dougt/weblock"] .getservice() .queryinterface(components.interfaces.iweblock); in addition to this basic setup, you must also write javascript that uses the addsite method to add new sites to the white list. this is a bit more complicated, because it requires that you work with the currently loaded page or provide other ui (e.g., a
textfield where you can enter an arbitrary url) for specifying urls. in the xul section we'll go into how the user interface is defined. this section describes the functions that are called from the interface and how they interact with the weblock component. the url that the addsite method expects is a string, so we can pass a string directly in from the user interface, or we can do a check on the st...
... you also need to create the function that displays the weblock window itself when the user clicks the weblock icon in the statusbar. that function uses the opendialog method from the window object and takes the url to the xul file in which the dialog is defined: function loadweblock() { window.opendialog("chrome://weblock/weblock.xul"); } xul the entire user interface of the mo...
... the dialog and the events that initiate interaction with the web locking are defined. at the top of all xul documents, an xml declaration is followed by the root element for the document, which is usually <window/> but for dialog boxes can also be the element <dialog/>. the "shell" for the xul file, then, looks like this: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="
text/css"?> <dialog id="weblock_ui" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="web lock manager" persist="screenx screeny" screenx="24" screeny="24"> </dialog> note that this part of the xul file also contains a stylesheet declaration, which imports css rules and applies them to particular parts of the interface. in gecko, css is us...
...And 6 more matches
nsIScriptableIO
eam guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes). there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading
textual data, writing
textual data, list of file-related error codes. nsiscriptableio provides a convenient api for creating files and streams, as well as for reading and writing data to them. for your convenience, this api is published through a global io object. for more details about how to use this object, see the file and stream guide. network/base/public/nsiscriptableio.idlscriptable pleas...
...sitransport: a transport object such as a socket. nsiinputstream: a stream returned by a previous call to this method, or any other object that implements nsiinputstream. string: a string from which to read data. amode a space-delineated string of mode terms controlling the manner in which the stream is accessed. if none of these modes are desired, specify an empty string.
text: read unicode-converted
text. the default character set is utf-8; to read
text in another character set, set the acharset argument to the desired character set. buffered: a stream that uses a buffer to hold a block of the next piece of the data to be read. this mode is generally used as a wrapper for other streams. by default, the buffer size is 1024 bytes; however, the size may be changed by s...
... block: when this mode is specified, reading from a transport such as a socket when no data is available will block until data is available before returning. if this mode isn't specified, an exception is thrown if no data is available. ...
...And 6 more matches
nsITransferable
adddataflavor( in string adataflavor ); nsisupportsarray flavorstransferablecanexport( ); nsisupportsarray flavorstransferablecanimport( ); void getanytransferdata( out string aflavor, out nsisupports adata, out unsigned long adatalen ); void gettransferdata( in string aflavor, out nsisupports adata, out unsigned long adatalen ); void init(in nsiloadcon
text acon
text); boolean islargedataset( ); void removedataflavor( in string adataflavor ); void settransferdata( in string aflavor, in nsisupports adata, in unsigned long adatalen ); attributes attribute type description converter nsiformatconverter an nsiformatconverter instance which implements the code needed to convert data into and...
...type description converter nsiformatconverter an nsiformatconverter instance which implements the code needed to convert data into and out of the transferable given the supported flavors. isprivatedata boolean although this is not a read-only attribute, you should generally avoid changing it, since doing so may cause it not to actually reflect the status of the con
text in which the transferable was created. native code only! requestingnode nsidomnode the source dom node this transferable was created from. native code only! note: currently, this can only be used on windows (in order to support network principal information in drag operations). constants kflavorhasdataprovider (that title needs to be better) ...
...principal information in drag operations). constants kflavorhasdataprovider (that title needs to be better) constant value description kflavorhasdataprovider 0 a description is needed here. common mime types some of these need better descriptions, especially the mozilla-specific ones. constant value description k
textmime
text/plain plain
text. kunicodemime
text/unicode unicode
text. kmoz
textinternal
text/x-moz-
text-internal
text data that isn't meant to be used by non-mozilla code. khtmlmime
text/html html. kaolmailmime aolmail aol mail. need details. kpngimagemime image/png png image. kjpegimagemime image/jpeg jpe...
...And 6 more matches
XPIDL
string. cstring this is an nsacstring declaration. overrides native string. jsval this type gets const when an in type. special in typelib. nsid this type gets const when an in type. special in typelib. ptr the type is really (native str)* ref the type is really (native str)& utf8string this is an nsacstring declaration whose
text is utf-8. as far as i can tell, these properties also apply to typedefs. need to verify. webidl interfaces are also valid xpidl types. to declare a webidl interface in xpidl, write webidl interfacename;. webidl types will be passed as mozilla::dom::interfacename* when used as in-parameters, as mozilla::dom::interfacename** when used as out or inout-parameters, and as refptr<mozilla::dom::...
...s invoked on property calls instead of an object with the given property scriptable this interface is usable by javascript classes. must inherit from a scriptable interface. methods and attributes interfaces declare a series of attributes and methods. attributes in idl are akin to javascript properties, in that they are a getter and (optionally) a setter pair. in javascript con
texts, attributes are exposed as a regular property access, while native code sees attributes as a get and possibly a set method. attributes can be declared readonly, in which case setting causes an error to be thrown in script con
texts and native con
texts lack the set method, by using the "readonly" keyword. to native code, on attribute declared 'attribute type foo;' is syntactic sugar for the decl...
... addition, any attribute whose name matches the regex /^[a-z]{2,3}i[a-z][a-z]/ is emitted with a warning, as its name looks like an nsiinterface or a moziinterface declaration. also like methods, if the first character of an attribute is lowercase in idl, it is made uppercase in native code only. methods define a return type and a series of in and out parameters. when called from a javascript con
text, they invocation looks as it is declared for the most part; some parameter properties can adjust what the code looks like. the calls are more mangled in native con
texts. an important attribute for methods and attributes is scriptability. a method or attribute is scriptable if it is declared in a scriptable interface and it lacks a noscript or notxpcom property. any method that is not scriptable ...
...And 6 more matches
Creating a Custom Column
unfortunately the new column doesn't have any data in it and it doesn't react to sort clicks on it... yet. the column handler now th...
...unfortunately the new column doesn't have any data in it and it doesn't react to sort clicks on it... yet. the column handler now that our column physically exists it's time to give it a bit of personality. the nsimsgcustomcolumnhandler interface to handle a ...
...ions that must be implemented to ensure that your extension works well with thunderbird. rest assured that these functions will be called - so implement them, even with empty function. ...
...And 6 more matches
Debugger.Source - Firefox Developer Tools
the two cases are distinguished by the latter having its introductiontype property always being "wasm" and the former having its introductiontype property never being "wasm". each debugger instance has a separate collection of debugger.source instances representing the source code that has been presented to the system. a debugger may place its own properties on debugger.source instances, to store metadata about particular pieces of source code. ...
.... if a given piece of source code is presented to the javascript implementation more than once, with the same origin metadata, the javascript implementation may generate a fresh debugger.source instance to represent each presentation, or it may use a single debugger.source instance to represent them all. debugger.source for webassembly for a debugger.source instance representing the serialized
text of a block of webassembly code, its properties provide the serialized
text as a string. currently only entire modules evaluated via new webassembly.module are represented. spidermonkey constructs exactly one debugger.source for each underlying webassembly module per debugger instance. please note at the time of this writing, support for webassembly is very preliminary. many properties below ret...
...r each underlying webassembly module per debugger instance. please note at the time of this writing, support for webassembly is very preliminary. many properties below return placeholder values. ...
...And 6 more matches
Network request list - Firefox Developer Tools
of loading the page. each request is displayed in its own row: by default, the network monitor is cleared each time you navigate to a new page or reload the current page. you can override this behavior by checking "enable persistent logs" in the settings. network request columns you can toggle columns on and off by right-clicking on the table header and choosing the specific column from the con
text menu. a reset columns command is available on the con
text menu to reset the columns to their initial configuration. you can also change the width of the columns to help make the information you are looking for easier to view. the mouse pointer changes to a resize icon when you move it over the border of a column. you can drag to manually set the size of column. starting in firefox 76 you can dou...
...n also change the width of the columns to help make the information you are looking for easier to view. the mouse pointer changes to a resize icon when you move it over the border of a column. you can drag to manually set the size of column. starting in firefox 76 you can double-click a column divider to resize the column to the left of it to fit its contents. the reset columns command on the con
text menu also resets the width of the columns to the default values. clicking the column header label sorts the request list by that column. you can reset the sort to the default by selecting "reset sorting" from the con
text menu. here is a list of all available columns: status: the http status code returned. the numeric code is displayed on a colored background, to help unusual ones stand o...
... blocking specific urls if you want to view your page as it would look without a resource (e.g., if it were blocked by the browser or an extension), you can block requests matching patterns you specify. click the request blocking icon in the toolbar. this opens the blocking sidebar. (click the icon again when you want to close the sidebar.) enter a string in the field with the placeholder
text block resource when url contains. reload the page to test it with the specified url blocked. other actions you can take with request blocking: to turn all request blocking off or on: toggle the checkbox next to enable request blocking. to turn a specific block off or on: toggle the checkbox next to that item. to delete a blocked item, click the x icon that appears when you focus the item.
...And 6 more matches
AudioBufferSourceNode - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audionode" target="_top"><rect x="151" y="1" width="90" height...
...naco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audionode" target="_top"><rect x="151" y="1" width="90" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="196" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">audionode</
text></a><polyline points="241,25 251,20 251,30 241,25" stroke="#d4dde4" fill="none"/><line x1="251" y1="25" x2="281" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audioscheduledsourcenode" target="_top"><rect x="281" y="1" wid...
...no,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">audionode</
text></a><polyline points="241,25 251,20 251,30 241,25" stroke="#d4dde4" fill="none"/><line x1="251" y1="25" x2="281" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audioscheduledsourcenode" target="_top"><rect x="281" y="1" width="240" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="401" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">audioscheduledsourcenode</
text></a><polyline points="521,25 531,20 531,30 521,25" stroke="#d4dde4" fill="none"/><line x1="531" y1="25" x2="561" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audiobuffersourcenode" target="_top"><rect x="56...
...And 6 more matches
Encoding API - Web APIs
stringview – a c-like representation of strings based on typed arrays. ...
... stringview – a c-like representation of strings based on typed arrays. ...
... stringview – a c-like representation of strings based on typed arrays. ...
...And 6 more matches
HTMLAreaElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 6 more matches
HTMLBodyElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 6 more matches
HTMLElement.oncopy - Web APIs
the oncopy property of the htmlelement interface is an eventhandler that processes copy events. the copy event fires when the user attempts to copy
text. syntax target.oncopy = functionref; value functionref is a function name or a function expression. the function receives a clipboardevent object as its sole argument. example this example blocks every copy and paste attempt from the <
textarea>. ...
...lement interface is an eventhandler that processes copy events. the copy event fires when the user attempts to copy
text. syntax target.oncopy = functionref; value functionref is a function name or a function expression. the function receives a clipboardevent object as its sole argument. example this example blocks every copy and paste attempt from the <
textarea>. ...
...is an eventhandler that processes copy events. the copy event fires when the user attempts to copy
text. syntax target.oncopy = functionref; value functionref is a function name or a function expression. the function receives a clipboardevent object as its sole argument. example this example blocks every copy and paste attempt from the <
textarea>. ...
...And 6 more matches
HTMLElement.oncut - Web APIs
the htmlelement.oncut property of the htmlelement interface is an eventhandler that processes cut events. the cut event fires when the user attempts to cut
text. syntax target.oncut = functionref; value functionref is a function name or a function expression. the function receives a clipboardevent object as its sole argument. example this example allows
text to be copied from the <
textarea>, but doesn't allow
text to be cut. it also logs each copy and cut attempt. ...
...s. the cut event fires when the user attempts to cut
text. syntax target.oncut = functionref; value functionref is a function name or a function expression. the function receives a clipboardevent object as its sole argument. example this example allows
text to be copied from the <
textarea>, but doesn't allow
text to be cut. it also logs each copy and cut attempt. ...
... fires when the user attempts to cut
text. syntax target.oncut = functionref; value functionref is a function name or a function expression. the function receives a clipboardevent object as its sole argument. example this example allows
text to be copied from the <
textarea>, but doesn't allow
text to be cut. it also logs each copy and cut attempt. ...
...And 6 more matches
HTMLElement.onpaste - Web APIs
the htmlelement.onpaste property of the htmlelement interface is an eventhandler that processes paste events. the paste event fires when the user attempts to paste
text. note that there is currently no dom-only way to obtain the
text being pasted; you'll have to use an nsiclipboard to get that information. syntax target.onpaste = functionref; value functionref is a function name or a function expression. the function receives a clipboardevent object as its sole argument. example this example logs every copy and paste attempt to the <
textarea>. ...
...ere is currently no dom-only way to obtain the
text being pasted; you'll have to use an nsiclipboard to get that information. syntax target.onpaste = functionref; value functionref is a function name or a function expression. the function receives a clipboardevent object as its sole argument. example this example logs every copy and paste attempt to the <
textarea>. ...
...no dom-only way to obtain the
text being pasted; you'll have to use an nsiclipboard to get that information. syntax target.onpaste = functionref; value functionref is a function name or a function expression. the function receives a clipboardevent object as its sole argument. example this example logs every copy and paste attempt to the <
textarea>. ...
...And 6 more matches
HTMLObjectElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 6 more matches
HTMLOutputElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 6 more matches
HTMLScriptElement - Web APIs
element interface, which provides special properties and methods for manipulating the behavior and execution of <script> elements (beyond the inherited htmlelement interface). javascript files should be served with the application/javascript mime type, but browsers are lenient and block them only if the script is served with an image type (image/*), video type (video/*), audio type (audio/*), or
text/csv. if the script is blocked, its element receives an error event; otherwise, it receives a load event. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a...
...splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...And 6 more matches
Dragging and Dropping Multiple Items - Web APIs
dify or remove. the drag processing described in this document use the datatransfer interface. this processing does not use the datatransferitem interface nor the datatransferitemlist interface. setting and getting with indices the mozsetdataat() method allows you to add multiple items during a dragstart event. this function similarly to setdata() var dt = event.datatransfer; dt.mozsetdataat("
text/plain", "data to drag", 0); dt.mozsetdataat("
text/plain", "second data to drag", 1); this example adds two items to be dragged. the last argument specifies the index of the item to add. you should add them in order starting with 0 as you cannot add items at positions farther than the last item, however you can replace existing items by using indices you have already added. using 0 as the index ...
... the last argument specifies the index of the item to add. you should add them in order starting with 0 as you cannot add items at positions farther than the last item, however you can replace existing items by using indices you have already added. using 0 as the index is equivalent to calling setdata(). you can clear an item using the mozcleardataat() method. ...
...ing 0 as the index is equivalent to calling setdata(). you can clear an item using the mozcleardataat() method. event.datatransfer.mozcleardataat("
text/plain", 1); caution: removing the last format for a particular index will remove that item entirely, shifting the remaining items down, so the later items will have different indices. ...
...And 6 more matches
OES_standard_derivatives - Web APIs
in webgl 2, the constant is available as gl.fragment_shader_derivative_hint and it requires glsl #version 300 es. ...
...in webgl 2, the constant is available as gl.fragment_shader_derivative_hint and it requires glsl #version 300 es. ...
...in webgl 2, the constant is available as gl.fragment_shader_derivative_hint and it requires glsl #version 300 es. ...
...And 6 more matches
PannerNode.orientationX - Web APIs
the angle so 0 points towards the listener const radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...st radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...es - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...And 6 more matches
PannerNode.orientationY - Web APIs
the angle so 0 points towards the listener const radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...st radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...es - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...And 6 more matches
PannerNode.orientationZ - Web APIs
the angle so 0 points towards the listener const radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...st radians = (degrees - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...es - 90) * (math.pi / 180); // using cosine and sine here ensures the output values are always normalised // i.e. ...
...And 6 more matches
SVGDefsElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 6 more matches
SVGForeignObjectElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 6 more matches
SVGGElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 6 more matches
SVGGeometryElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 6 more matches
SVGRectElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 6 more matches
SVGSetElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 6 more matches
SVGSwitchElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 6 more matches
SVGUseElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 6 more matches
Using server-sent events - Web APIs
you can also listen for events with addeventlistener(): evtsource.addeventlistener("ping", function(event) { const newelement = document.createelement("li"); const time = json.parse(event.data).time; newelement.innerhtml = "ping at " + time; eventlist.appendchild(newelement); }); this code is similar, except that it will be called automatically whenev...
...ans that you can open 6 sse connections across all of the tabs to www.example1.com and another 6 sse connections to www.example2.com (per stackoverflow). when using http/2, the maximum number of simultaneous http streams is negotiated between the server and the client (defaults to 100). ...
...abs to www.example1.com and another 6 sse connections to www.example2.com (per stackoverflow). when using http/2, the maximum number of simultaneous http streams is negotiated between the server and the client (defaults to 100). sending events from the server the server-side script that sends events needs to respond using the mime type
text/event-stream. each notification is sent as a block of
text terminated by a pair of newlines. for details on the format of the event stream, see event stream format. the php code for the example we're using here follows: date_default_timezone_set("america/new_york"); header("cache-control: no-cache"); header("content-type:
text/event-stream"); $counter = rand(1, 10); while (true) { // every second, send a "ping" event. echo "event: ping\n"; $cur...
...And 6 more matches
SubtleCrypto.sign() - Web APIs
thm calculates and verifies hash-based message authentication codes according to the fips 198-1 standard. the digest algorithm to use is specified in the hmackeygenparams object that you pass into generatekey(), or the hmacimportparams object that you pass into importkey(). examples note: you can try the working examples out on github. ...
... in the hmackeygenparams object that you pass into generatekey(), or the hmacimportparams object that you pass into importkey(). examples note: you can try the working examples out on github. rsassa-pkcs1-v1_5 this code fetches the contents of a
text box, encodes it for signing, and signs it with a private key. see the complete source code on github. /* fetch the contents of the "message"
textbox, and encode it in a form we can use for the sign operation. ...
...de fetches the contents of a
text box, encodes it for signing, and signs it with a private key. see the complete source code on github. /* fetch the contents of the "message"
textbox, and encode it in a form we can use for the sign operation. */ function getmessageencoding() { const messagebox = document.queryselector(".rsassa-pkcs1 #message"); let message = messagebox.value; let enc = new
textencoder(); return enc.encode(message); } let encoded = getmessageencoding(); let signature = await window.crypto.subtle.sign( "rsassa-pkcs1-v1_5", privatekey, encoded ); rsa-pss this code fetches the contents of a
text box, encodes it for signing, and signs it with a private key. see the complete source code on github. ...
...And 6 more matches
WEBGL_draw_buffers - Web APIs
the webgl_draw_buffers extension is part of the webgl api and enables a fragment shader to write to several
textures, which is useful for deferred shading, for example. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is only available to webgl1 con
texts. in webgl2, the functionality of this extension is available on the webgl2 con
text by default. in webgl 2, the constants are available without the "webgl" suffix and the new glsl built-ins require glsl #version 300 es. ...
...ability: this extension is only available to webgl1 con
texts. in webgl2, the functionality of this extension is available on the webgl2 con
text by default. in webgl 2, the constants are available without the "webgl" suffix and the new glsl built-ins require glsl #version 300 es. constants this extension exposes new constants, which can be used in the gl.framebufferrenderbuffer(), gl.framebuffer
texture2d(), gl.getframebufferattachmentparameter() ext.drawbufferswebgl(), and gl.getparameter() methods. ext.color_attachment0_webgl ext.color_attachment1_webgl ext.color_attachment2_webgl ext.color_attachment3_webgl ext.color_attachment4_webgl ext.color_attachment5_webgl ext.color_attachment6_webgl ext.color_attachment7_webgl ext.color_attachment8_webgl ext.color_attachment9_webgl ext...
... framebuffer color attachment points. ext.max_draw_buffers_webgl a glint indicating the maximum number of draw buffers. methods this extension exposes one new method. ext.drawbufferswebgl() defines the draw buffers to which all fragment colors are written. (when using webgl2, this method is available as gl.drawbuffers() by default). ...
...And 6 more matches
Using WebGL extensions - Web APIs
moz_, webkit_, etc.) or the extension is only available once a browser preference has been toggled. if you wish to work with the bleeding edge of extensions, and want to keep working on upon ratification (assuming, of course, that the extension doesn't change in incompatible ways), that you query the canonical extension name as well as the vendor extension name. for instance: var ext = ( gl.ge
textension('oes_vertex_array_object') || gl.ge
textension('moz_oes_vertex_array_object') || gl.ge
textension('webkit_oes_vertex_array_object') ); note that, vendor prefix have been discouraged more and more and thus most browser implement experimental extensions behind a feature flag rather than vendor prefix. the feature flags are: webgl.enable-draft-extensions in firefox chrome://flags/#ena...
...ons that optimize for virtual reality. ext_: extensions that mirror other opengl es or opengl api extensions. webgl_: extensions that are webgl-specific and intended to be compatible with multiple web browsers. it should also be used for extensions which originated with the opengl es or opengl apis, but whose behavior has been significantly altered. querying available extensions the webgl con
text supports querying what extensions are available. var available_extensions = gl.getsupportedextensions(); the webglrenderingcon
text.getsupportedextensions() method returns an array of strings, one for each supported extension. extension list the current extensions are: angle_instanced_arrays ext_blend_minmax ext_color_buffer_float ext_color_buffer_half_float ext_disjoint_timer_query e...
...available_extensions = gl.getsupportedextensions(); the webglrenderingcon
text.getsupportedextensions() method returns an array of strings, one for each supported extension. ...
...And 6 more matches
WebGL: 2D and 3D graphics for the web - Web APIs
raphics acceleration provided by the user's device. support for webgl is present in firefox 4+, google chrome 9+, opera 12+, safari 5.1+, internet explorer 11+, and microsoft edge build 10240+; however, the user's device must also have hardware that supports these features. ...
...rer 11+, and microsoft edge build 10240+; however, the user's device must also have hardware that supports these features. the webgl 2 api introduces support for much of the opengl es 3.0 feature set; it's provided through the webgl2renderingcon
text interface. the <canvas> element is also used by the canvas api to do 2d graphics on web pages. ...
...dge build 10240+; however, the user's device must also have hardware that supports these features. the webgl 2 api introduces support for much of the opengl es 3.0 feature set; it's provided through the webgl2renderingcon
text interface. the <canvas> element is also used by the canvas api to do 2d graphics on web pages. ...
...And 6 more matches
Web Audio API best practices - Web APIs
al here for creating your own instrument for information on creating sounds with oscillators and buffers. cross browser & legacy support the web audio api specification is constantly evolving and like most things on the web, there are some issues with it working consistently across browsers. here we'll look at options for getting around cross-browser problems. there's the standardised-audio-con
text npm package, which creates api functionality consistently across browsers, full holes as they are found. it's constantly in development and endeavours to keep up with the current specification. there is also the option of libraries, of which there are a few depending on your use case. for a good all-rounder, howler.js is a good choice. it has cross-browser support and, provides a useful subset o...
...ons built on top of the web audio api. r-audio, from the bbc's research & development department, is a library of react components aiming to provide a "more intuitive, declarative interface to web audio". if you're used to writing jsx it might be worth looking at. autoplay policy browsers have started to implement an autoplay policy, which in general can be summed up as: "create or resume con
text from inside a user gesture". but what does that mean in practice? a user gesture has been interpreted to mean a user-initiated event, normally a click event. browser vendors decided that web audio con
texts should not be allowed to automatically play audio; they should instead be started by a user. this is because autoplaying audio can be really annoying and obtrusive. but how do we handle this?
... but what does that mean in practice? ...
...And 6 more matches
Background audio processing using AudioWorklet - Web APIs
pt code to create custom audio processors that would be invoked to perform real-time audio manipulations. the drawback to scriptprocessornode was simple: it ran on the main thread, thus blocking everything else going on until it completed execution. this was far less than ideal, especially for something that can be as computationally expensive as audio processing. enter audioworklet. an audio con
text's audio worklet is a worklet which runs off the main thread, executing audio processing code added to it by calling the con
text's audioworklet.addmodule() method. calling addmodule() loads the specified javascript file, which should contain the implementation of the audio processor. with the processor registered, you can create a new audioworkletnode which passes the audio through the processor's...
... level overview before we start looking at the use of audioworklet on a step-by-step basis, let's start with a brief high-level overview of what's involved. create module that defines a audio worklet processor class, based on audioworkletprocessor which takes audio from one or more incoming sources, performs its operation on the data, and outputs the resulting audio data. access the audio con
text's audioworklet through its audioworklet property, and call the audio worklet's domxref("worklet.addmodule", "addmodule()")}} method to install the audio worklet processor module. as needed, create audio processing nodes by passing the processor's name (which is defined by the module) to the audioworkletnode() constructor. set up any audio parameters the audioworkletnode needs, or that you wish ...
...this call to registerprocessor() registers your class as the basis for any audioworkletprocessors created when audioworkletnodes are set up. this is the barest framework and actually has no effect until code is added into process() to do something with those inputs and outputs. whic...
...And 6 more matches
Window.open() - Web APIs
the window interface's open() method loads the specified resource into the new or existing browsing con
text (window, <iframe> or tab) with the specified name. if the name doesn't exist, then a new browsing con
text is opened in a new tab or a new window, and the specified resource is loaded into it. syntax var window = window.open(url, windowname, [windowfeatures]); parameters url a domstring indicating the url of the resource to be loaded. this can be a path or url to an html page, image file, or any other resource that is supported by the browser. if the empty string ("") is specified as url, a blank page is opened into the targeted browsing con
text. ...
...indowname, [windowfeatures]); parameters url a domstring indicating the url of the resource to be loaded. this can be a path or url to an html page, image file, or any other resource that is supported by the browser. if the empty string ("") is specified as url, a blank page is opened into the targeted browsing con
text. windowname optional a domstring specifying the name of the browsing con
text (window, <iframe> or tab) into which to load the specified resource; if the name doesn't indicate an existing con
text, a new window is created and is given the name specified by windowname. this name can be used as the target for the target attribute of <a> or <form> elements. the name should not contain whitespace. keep in mind that this will not be used as the window's title. windowfeatures...
...he request's referrer set to noreferrer; this prevents the request from sending the url of the page that initiated the request to the server where the request is sent. in addition, setting this feature also automatically sets noopener. see rel="noreferrer" for additional details and compatibility information. firefox introduced support for noreferrer in firefox 68. ...
...And 6 more matches
Synchronous and asynchronous requests - Web APIs
ata has been received. this lets the browser continue to work as normal while your request is being handled. example: send a file to the console log this is the simplest usage of asynchronous xmlhttprequest. var xhr = new xmlhttprequest(); xhr.open("get", "/bar/foo.txt", true); xhr.onload = function (e) { if (xhr.readystate === 4) { if (xhr.status === 200) { console.log(xhr.response
text); } else { console.error(xhr.status
text); } } }; xhr.onerror = function (e) { console.error(xhr.status
text); }; xhr.send(null); line 2 specifies true for its third parameter to indicate that the request should be handled asynchronously. line 3 creates an event handler function object and assigns it to the request's onload attribute. this handler looks at the request's readyst...
...equest changes. example: writing a function to read an external file in some cases, you must read many external files. this is a standard function which uses the xmlhttprequest object asynchronously in order to switch the content of the read file to a specified listener. ...
...tatus
text); } function loadfile(url, callback /*, opt_arg1, opt_arg2, ... ...
...And 6 more matches
Operable - Accessibility
t and would be invalidated if it were turned off. 2.2.2 pausing, stopping, hiding (a) for moving/blinking content that starts automatically, lasts longer than 5 seconds, and is shown alongside other content, controls should be provided to pause, stop, or hide it. this does not apply to moving/blinking content that is essential to the experience. examples include scrolling
text and videos. for auto-updating information that starts automatically and is shown alongside other content, controls should be provided to pause, stop, or hide it, or to control the frequency of updates. this does not apply to auto-updating content that is essential to the experience. examples include carousels or rotating annoucements. 2.2.3 no time limits (aaa) this build...
...eatures (e.g. links, buttons, form inputs) makes logical sense, meaning that the page is still usable by non-sighted/keyboard users. see ui controls for general advice on tabbing to controls. if you need to place elements in an unusual layout, it is better to make sure the source order is sensible, then use css features like positioning to handle the layout. ...
...e page is still usable by non-sighted/keyboard users. see ui controls for general advice on tabbing to controls. if you need to place elements in an unusual layout, it is better to make sure the source order is sensible, then use css features like positioning to handle the layout. 2.4.4 link purpose (in con
text) (a) the purpose/destination of a link can be determined from the link
text, or from its surroundings (e.g. the surrounding
text). exceptions are where the link purpose is ambiguous to all users (see ambiguous to users in general for a useful explanation of this). see meaningful
text labels. also note that you should minimize instances where multiple copies of the same
text are linked to different places. this can cause problems for screenreader users, who will often ...
...And 6 more matches
Color contrast - Accessibility
the color contrast between background and foreground content (that is, usually
text) should be great enough to ensure legibility. when designing readable interfaces for different vision capabilities, the wcag guidelines recommend the following contrast ratios: type of content minimum ratio (aa rating) enhanced ratio (aaa rating) body
text 4.5 : 1 7 : 1 large-scale
text (120-150% larger than body
text) 3 : 1 4.5 : 1 active user interface components and graphical objects such as icons and graphs 3 : 1 not defined these ratios do not apply to "incidental"
text, such as inactive controls, logotypes, or purely decorative
text. see the solution section below for further information. having good color contrast on your ...
...etails. it is good to have a cool design on your website, but the design is worthless if your users can't read your content. ...
...can't read your content. examples let's have a look at some simple html and css code: <div class="good">good contrast</div> <div class="bad">bad contrast</div> div { /* general div styles here */ } .good { background-color: #fae6fa; } .bad { background-color: #400064; } both pieces of
text have their default black color. ...
...And 6 more matches
::placeholder - CSS: Cascading Style Sheets
the ::placeholder css pseudo-element represents the placeholder
text in an <input> or <
textarea> element. ::placeholder { color: blue; font-size: 1.5em; } only the subset of css properties that apply to the ::first-line pseudo-element can be used in a rule using ::placeholder in its selector. note: in most browsers, the appearance of placeholder
text is a translucent or light gray color by default. syntax ::placeholder accessibility concerns color contrast contrast ratio placeholder
text typically has a lighter color treatment to indicate that it is a suggestion for what kind of input will be valid, and is not actual input of any kind. ...
...eholder
text is a translucent or light gray color by default. syntax ::placeholder accessibility concerns color contrast contrast ratio placeholder
text typically has a lighter color treatment to indicate that it is a suggestion for what kind of input will be valid, and is not actual input of any kind. it is important to ensure that the contrast ratio between the color of the placeholder
text and the background of the input is high enough that people experiencing low vision conditions will be able to read it while also making sure there is enough of a difference between the placeholder
text and input
text color that users do not mistake the placeholder for inputed data. ...
...the color of the placeholder
text and the background of the input is high enough that people experiencing low vision conditions will be able to read it while also making sure there is enough of a difference between the placeholder
text and input
text color that users do not mistake the placeholder for inputed data. color contrast ratio is determined by comparing the luminosity of the placeholder
text and the input background color values. in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for
text content and 3:1 for larger
text such as headings. large
text is defined as 18.66px and bold or larger, or 24px or larger. webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c...
...And 6 more matches
Block and inline layout in normal flow - CSS: Cascading Style Sheets
in this guide, we will explore the basics of how block and inline elements behave when they are part of the normal flow. normal flow is defined in the css 2.1 specification, which explains that any boxes in normal flow will be part of a formatting con
text. they can be either block or inline, but not both at once. we describe block-level boxes as participating in a block formatting con
text, and inline-level boxes as participating in an inline formatting con
text. the behaviour of elements which have a block or inline formatting con
text is also defined in this specification. for elements with a block formatting con
text, the spec says: “in a block formatting con
text, boxes are laid out one after the other, vertically, beginning at the top of a containing block. the vertical distance between...
... is also defined in this specification. for elements with a block formatting con
text, the spec says: “in a block formatting con
text, boxes are laid out one after the other, vertically, beginning at the top of a containing block. the vertical distance between two sibling boxes is determined by the 'margin' properties. vertical margins between adjacent block-level boxes in a block formatting con
text collapse. in a block formatting con
text, each box's left outer edge touches the left edge of the containing block (for right-to-left formatting, right edges touch).” - 9.4.1 for elements with an inline formatting con
text: “in an inline formatting con
text, boxes are laid out horizontally, one after the other, beginning at the top of a containing block. horizontal margins, borders, and p...
...the rectangular area that contains the boxes that form a line is called a line box.” - 9.4.2 note that the css 2.1 specification describes documents as being in a horizontal, top to bottom writing mode. for example, by describing vertical distance between block boxes. ...
...And 6 more matches
Content categories - Developer guides
for elements to not be a member of any of these categories. there are three types of content categories: main content categories, which describe common rules shared by many elements. form-related content categories, which describe rules common to form-related elements. specific content categories, which describe rare categories shared only by a few elements, sometimes only in a specific con
text. note: a more detailed discussion of these content categories and their comparative functionalities is beyond the scope of this article; for that, you may wish to read the relevant portions of the html specification. main content categories metadata content elements belonging to the metadata content category modify the presentation or the behavior of the rest of the document, set up link...
...nt elements belonging to the metadata content category modify the presentation or the behavior of the rest of the document, set up links to other documents, or convey other out of band information. elements belonging to this category are <base>, <command>, <link>, <meta>, <noscript>, <script>, <style> and <title>. flow content elements belonging to the flow content category typically contain
text or embedded content. they are: <a>, <abbr>, <address>, <article>, <aside>, <audio>, <b>,<bdo>, <bdi>, <blockquote>, <br>, <button>, <canvas>, <cite>, <code>, <command>, <data>, <datalist>, <del>, <details>, <dfn>, <div>, <dl>, <em>, <embed>, <fieldset>, <figure>, <footer>, <form>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <header>, <hgroup>, <hr>, <i>, <iframe>, <img>, <input>, <ins>, <kbd>, <keygen>...
... a few other elements belong to this category, but only if a specific condition is fulfilled: <area>, if it is a descendant of a <map> element <link>, if the itemprop attribute is present <meta>, if the itemprop attribute is present <style>, if the scoped attribute is present sectioning content elements belonging to the sectioning cont...
...And 6 more matches
this - JavaScript
termined by how a function is called (runtime binding). it can't be set by assignment during execution, and it may be different each time the function is called. ...
...arrow functions which don't provide their own this binding (it retains the this value of the enclosing lexical con
text). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax this value a property of an execution con
text (global, function or eval) that, in non–strict mode, is always a reference to an object and in strict mode can be any value. description global con
text in the global execution con
text (outside of any function), this refers to the global object whether in strict mode or not. // in web browsers, the window object is also the global object: console.log(this === window); // true a = 37; consol...
...fers to the global object whether in strict mode or not. // in web browsers, the window object is also the global object: console.log(this === window); // true a = 37; console.log(window.a); // 37 this.b = "mdn"; console.log(window.b) // "mdn" console.log(b) // "mdn" note: you can always easily get the global object using the global globalthis property, regardless of the current con
text in which your code is running. function con
text inside a function, the value of this depends on how the function is called. since the following code is not in strict mode, and because the value of this is not set by the call, this will default to the global object, which is window in a browser. function f1() { return this; } // in a browser: f1() === window; // true // in node: f1() === ...
...And 6 more matches
Authoring MathML - MathML
ith web fonts. prior to gecko 31.0 (firefox 31.0 / thunderbird 31.0 / seamonkey 2.28), it was a bit tedious to setup math fonts, see the font instructions for mozilla 2.0. for gecko 31.0 (firefox 31.0 / thunderbird 31.0 / seamonkey 2.28), this is much simpler and is compatible with any web rendering engine with mathml support. for example, here is a minimal stylesheet to use latin modern for the
text and latin modern math for the mathematics: @namespace url('http://www.w3.org/1999/xhtml'); @namespace m url('http://www.w3.org/1998/math/mathml'); body, m|m
text { font-family: latin modern; } m|math { font-family: latin modern math; } you can then use the @font-face rule as usual to provide woff fallback for latin modern and latin modern math. see this github repository to get woff fon...
...mathml input box has also been integrated into seamonkey since version 2.28 and into thunderbird since version 31. again, the way mathml is handled and the quality of the mathml rendering depends on the mail client. even if your browser supports mathml, your webmail may prevent you to send or receive mails with mathml inside. gecko-based instant messaging clients can integrate a javascript-based
text-to-mathml converter (mentioned below) and then render the mathml expressions generated from the (plain
text) instant messages. for example, there is an instantbird add-on that handles latex expressions. conversion from a simple syntax there are many simple notations (e.g. wiki or markdown syntaxes) to generate html pages. the same is true for mathml: for example ascii syntaxes as used in calcula...
...mple notations (e.g. wiki or markdown syntaxes) to generate html pages. the same is true for mathml: for example ascii syntaxes as used in calculators or the more powerful latex language, very popular among the scientific community. in this section, we present some of these tools to convert from a simple syntax to mathml. pros: writing mathematical expressions may only require a standard
text editor. many tools are available, some of them are compatible with the classical latex-to-pdf workflow. this gives access to advanced features of latex like macros. cons: this may be harder to use: people must learn a syntax, typos in the code may easily lead to parsing or rendering errors etc the interface is not user-friendly: only code editor without immediate display of t...
...And 6 more matches
<feDiffuseLighting> - SVG: Scalable Vector Graphics
the <fediffuselighting> svg filter primitive lights an image using the alpha channel as a bump map. the resulting image, which is an rgba opaque image, depends on the light color, light position and surface geometry of the input bump map. the light map produced by this filter primitive can be combined with a
texture image using the multiply term of the arithmetic operator of the <fecomposite> filter primitive. multiple light sources can be simulated by adding several of these light maps together before applying it to the
texture image. usage con
text categoriesfilter primitive elementpermitted contentany number of descriptive elements and exactly one light source element, in any order. attributes global attributes core attributes presentation attributes filter primitive attributes c...
...useconstant kernelunitlength dom interface this element implements the svgfediffuselightingelement interface. example the following example show the effect of the <fediffuselighting> element on a circle with each light source available. each time, the light comes from the upper left corner. ...
...nstant kernelunitlength dom interface this element implements the svgfediffuselightingelement interface. example the following example show the effect of the <fediffuselighting> element on a circle with each light source available. each time, the light comes from the upper left corner. ...
...And 6 more matches
<tref> - SVG: Scalable Vector Graphics
the
textual content for a <
text> svg element can be either character data directly embedded within the <
text> element or the character data content of a referenced element, where the referencing is specified with a <tref> element. usage con
text categories
text content element,
text content child elementpermitted contentany number of the following elements, in any order:descriptive elements<animate>, <animatecolor>, <set> attributes global attributes conditional processing attributes core attributes graphical event attributes presentation attributes xlink attributes class style externalresourcesrequired specific attributes xlink:href dom interface this element implements the svgtrefelement interface. example <svg width="100%" height="100%" viewbox="0 0 1000 300" x...
...e attributes graphical event attributes presentation attributes xlink attributes class style externalresourcesrequired specific attributes xlink:href dom interface this element implements the svgtrefelement interface. ...
...ical event attributes presentation attributes xlink attributes class style externalresourcesrequired specific attributes xlink:href dom interface this element implements the svgtrefelement interface. ...
...And 6 more matches
widget - Archive of obsolete content
data; require("sdk/widget").widget({ id: "my-widget", label: "my widget", contenturl: data.url("my-content.html") }); this widget contains an entire web page: require("sdk/widget").widget({ id: "hello-display", label: "my hello widget", content: "hello!", width: 50 }); widgets are quite small by default, so this example used the width property to grow it in order to show all the
text. scripting widget content to interact with the widget's content you need to load a separate script into the panel. in the sdk these scripts are called "content scripts" because they're explicitly used for interacting with web content. while content scripts can access the content they're attached to, they can't use the sdk's apis. so implementing a complete solution usually means you have to se...
... include this to listen to the widget's message event. onmouseover function include this to listen to the widget's mouseover event. onmouseout function include this to listen to the widget's mouseout event. onattach function include this to listen to the widget's attach event. tooltip string optional
text to show when the user's mouse hovers over the widget. if not given, the label is used. allow object an optional object describing permissions for the content. it should contain a single key named script whose value is a boolean that indicates whether or not to execute script in the content. script defaults to true. contentscriptfile string,array a l...
...not to execute script in the content. script defaults to true. contentscriptfile string,array a local file url or an array of local file urls of content scripts to load. content scripts specified by this property are loaded before those specified by the contentscript property. contentscript string,array a string or an array of strings containing the
texts of content scripts to load. content scripts specified by this property are loaded after those specified by the contentscriptfile property. contentscriptwhen string when to load the content scripts. this may take one of the following values: "start": load content scripts immediately after the document element for the widget is inserted into the dom, but before t...
...And 5 more matches
Downloading Files - Archive of obsolete content
ts.utils.import("resource://gre/modules/privatebrowsingutils.jsm"); const webbrowserpersist = components.constructor("@mozilla.org/embedding/browser/nswebbrowserpersist;1", "nsiwebbrowserpersist"); var persist = webbrowserpersist(); var targetfile = services.dirsvc.get("desk", ci.nsifile); targetfile.append("file.bin"); // obtain the privacy con
text of the browser window that the url // we are downloading comes from. if, and only if, the url is not // related to a window, null should be used instead. var privacy = privatebrowsingutils.privacycon
textfromwindow(urlsourcewindow); persist.persistflags = persist.persist_flags_from_cache | persist.persist_flags_replace_existing_files; persist.saveuri(uritosave, null, null, n...
...m"); const webbrowserpersist = components.constructor("@mozilla.org/embedding/browser/nswebbrowserpersist;1", "nsiwebbrowserpersist"); var persist = webbrowserpersist(); var targetfile = services.dirsvc.get("desk", ci.nsifile); targetfile.append("file.bin"); var obj_uri = services.io.newuri(aurltodownload, null, null); // obtain the privacy con
text of the browser window that the url // we are downloading comes from. if, and only if, the url is not // related to a window, null should be used instead. var privacy = privatebrowsingutils.privacycon
textfromwindow(aurlsourcewindow); var progresselement = document.getelementbyid("progress_element"); persist.progresslistener = { onprogresschange: function(awebprogress, arequest, acurselfprogress...
...y = privatebrowsingutils.privacycon
textfromwindow(aurlsourcewindow); var progresselement = document.getelementbyid("progress_element"); persist.progresslistener = { onprogresschange: function(awebprogress, arequest, acurselfprogress, amaxselfprogress, acurtotalprogress, amaxtotalprogress) { var percentcomplete = math.round((acurtotalprogress / amaxtotalprogress) * 100); progresselement.
textcontent = percentcomplete +"%"; }, onstatechange: function(awebprogress, arequest, astateflags, astatus) { // do something } } persist.saveuri(obj_uri, null, null, null, "", targetfile, privacy); downloading files that require credentials before calling nsiwebbrowserpersist.saveuri(), you need to set the progresslistener property of the nsiwebbrowserpersist instance to an object that ...
...And 5 more matches
Connecting to Remote Content - Archive of obsolete content
« previousnext » using xmlhttprequest xmlhttprequest is an api for transferring xml between a local script and a remote server via http. it is an integral part of the modern web, and all major browsers support it. besides xml, it can be used to retrieve data in other formats, for example json, html and plain
text. in this section we'll look into the xml and json communication mechanisms. ...
...sed to retrieve data in other formats, for example json, html and plain
text. in this section we'll look into the xml and json communication mechanisms. let url = "http://www.example.com/"; let request = components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] .createinstance(components.interfaces.nsixmlhttprequest); request.onload = function(aevent) { window.alert("response
text: " + aevent.target.response
text); }; request.onerror = function(aevent) { window.alert("error status: " + aevent.target.status); }; request.open("get", url, true); request.send(null); in this example we demonstrate how to make a xmlhttprequest call in asynchronous mode. you can see that an instance of the xmlhttprequest class is created and it holds all functionality for making a request. we...
... request. we create this instance using xpcom instead of the usual way (new xmlhttprequest()) because this way works both in chrome and non-chrome code. following initialization, onload and onerror handlers are registered to a callback function to handle the response returned from the remote server. in both cases aevent.target is an nsixmlhttprequest. in the onload callback function, the response
text parameter contains the server response as
text. if the response is an xml document, the responsexml property will hold an xmldocument object that can be manipulated using dom methods. sometimes the server doesn't specify an xml content-type header, which is necessary for the xml parsing to happen automatically. you can use overridemimetype to force the response to be parsed as xml. request.over...
...And 5 more matches
Adding preferences to an extension - Archive of obsolete content
can't rely on // "this" referring to the right object, so we need to reference // it by its full name var symbol = stockwatcher.tickersymbol; var fullurl = "http://quote.yahoo.com/d/quotes.csv?f=sl1d1t1c1ohgv&e=.csv&s=" + symbol; function inforeceived() { var samplepanel = document.getelementbyid('stockwatcher2'); var output = httprequest.response
text; if (output.length) { // remove any whitespace from the end of the string output = output.replace(/\w*$/, ""); // build the tooltip string var fieldarray = output.split(","); samplepanel.label = symbol + ": " + fieldarray[1]; samplepanel.tooltip
text = "chg: " + fieldarray[4] + " | " + "open: " + fieldarray[5] + " | " + ...
...wser window is loaded and unloaded. window.addeventlistener("load", function(e) { stockwatcher.startup(); }, false); window.addeventlistener("unload", function(e) { stockwatcher.shutdown(); }, false); design the preference dialog now that we've written all the code, we need to build the xul file for the options dialog. ...
...in our case, we have a single preference, the stock symbol to monitor. preferences are identified by name; in this case, the name is "extensions.stockwatcher2.symbol". the actual user interface is described in the...
...And 5 more matches
Creating a hybrid CD - Archive of obsolete content
mozilla.party -map ~/hfsmapping ~/party/ cdrecord -v speed=2 dev=0,6,0 ~/party.iso its also handy to be able to mount an image file to test it. mount ~/party.iso /mnt/cdrom -t iso9660 -o loop=/dev/loop3,blocksize=1024 umount /mnt/cdrom here is the hfs mapping that i used. the creator "moss" is for netscape 4.x and "mozz" is used for mozilla. ...
... ~/party.iso its also handy to be able to mount an image file to test it. mount ~/party.iso /mnt/cdrom -t iso9660 -o loop=/dev/loop3,blocksize=1024 umount /mnt/cdrom here is the hfs mapping that i used. the creator "moss" is for netscape 4.x and "mozz" is used for mozilla. it is used as the creator type for readme and other
text files because it can handle unix and windows linebreaks, but teach
text cannot. ...
...1024 umount /mnt/cdrom here is the hfs mapping that i used. the creator "moss" is for netscape 4.x and "mozz" is used for mozilla. it is used as the creator type for readme and other
text files because it can handle unix and windows linebreaks, but teach
text cannot. ...
...And 5 more matches
Supporting per-window private browsing - Archive of obsolete content
ses["@mozilla.org/privatebrowsing;1"]. getservice(components.interfaces.nsiprivatebrowsingservice). privatebrowsingenabled; if (!inprivatebrowsing) { ... } } catch(e) { components.utils.reporterror(e); return; } } obtaining an nsiloadcon
text for privacy-sensitive apis some apis (such as nsitransferable and nsiwebbrowserpersist) take nsiloadcon
text arguments that are used to determine whether they should be classed as private or not (for example, whether the uri being persisted by saveuri should be added to the permanent download history). to do this, import resource://gre/modules/privatebrowsingutils.jsm and use privatebrowsingutils.
...sensitive apis some apis (such as nsitransferable and nsiwebbrowserpersist) take nsiloadcon
text arguments that are used to determine whether they should be classed as private or not (for example, whether the uri being persisted by saveuri should be added to the permanent download history). to do this, import resource://gre/modules/privatebrowsingutils.jsm and use privatebrowsingutils.getprivacycon
textfromwindow(win), passing a window object that is related to the content in question. as an example, if an add-on adds a con
text menu item that accesses an api that requires an nsiloadcon
text, the most relevant window is the one that owns the element being targeted by the con
text menu (element.ownerdocument.defaultview). if some action triggered by a chrome element (such as a button) requires an ap...
... window object that is related to the content in question. as an example, if an add-on adds a con
text menu item that accesses an api that requires an nsiloadcon
text, the most relevant window is the one that owns the element being targeted by the con
text menu (element.ownerdocument.defaultview). if some action triggered by a chrome element (such as a button) requires an api that takes a privacy con
text, the most relevant window is the one that contains the chrome element. in some cases, there is no logical window object to use (such as when data or an action originate from some other source than web content). in these cases, it is permissable to pass null as the argument instead of a real privacy con
text. however, this can lead to privacy leaks (such as cache and download entries) if not used c...
...And 5 more matches
Anonymous Content - Archive of obsolete content
ment. this template describes a content tree that will be generated around the bound element during binding attachment. an element declared in a bound document using a single tag can then be constructed out of multiple child elements, and this implementation is hidden from the bound document. for example, the html file upload control appears in most browsers as a composite widget consisting of a
text field and a button. a sample xbl binding for the file widget might look as follows: <binding id="fileupload"> <content> <html:input type="
text"/> <html:input type="button"/> </content> </binding> because this content is not visible to its parent element, it is said to be anonymous content. scoping and access using the dom when a binding is attached and certain conditions are met,...
...orresponding attribute on the anonymous content is also set or removed. on any anonymous content element in a template, an inherits attribute can be used to specify a comma-separated list of attributes that should be inherited. attributes with namespaces can be defined using a namespace prefix and the attribute name separate by a colon. ...
...mma-separated list of attributes that should be inherited. attributes with namespaces can be defined using a namespace prefix and the attribute name separate by a colon. for example, on the html file upload control, the anonymous
textfield can be set up to automatically inherit the value attribute from the bound element. <xbl:binding id="fileuploadcontrol"> <xbl:content> <html:input type="
text" xbl:inherits="value"/> <html:input type="button" value="browse..."/> </xbl:content> </xbl:binding> each entry in the inherits list can either simply list an attribute (such as value in the example above), or it can specify an = separated pair consisting of the attribute on the anonymous content that should be tied to the attribute on the bound element. the anonymous content attribute is ...
...And 5 more matches
Panels - Archive of obsolete content
a panel is a popup which can support any type of content. it is used when supporting temporary popup displays for selecting or entering data. the panel element the panel element is used to create panels. the panel will display whatever elements are placed as children of the panel element. for example, the following panel displays a
textbox for entering a name. note that the panel is not placed in a separate file and is instead placed inside another window. ...
...electing or entering data. the panel element the panel element is used to create panels. the panel will display whatever elements are placed as children of the panel element. for example, the following panel displays a
textbox for entering a name. note that the panel is not placed in a separate file and is instead placed inside another window. <?xml-stylesheet href="chrome://global/skin" type="
text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <button label="details" type="panel"> <panel id="search-panel"> <label control="name" value="name:"/> <
textbox id="name"/> </panel> </button> </window> many panels will be associated with a button, as in this example. when the button is pressed, the panel is opened. clicking outside the panel or ...
... changed. for more information about positioning the popup, see positioning popups. only buttons (and toolbarbuttons) have this automatic behaviour which opens the popup when pressed. for other types of elements, you need to use a different technique as in the following example. <label value="search" popup="search-panel"/> <panel id="search-panel"> <label control="search" value="terms:"/> <
textbox id="search"/> </panel> to attach a panel to an non-button element, for instance to have a panel open when a label is clicked, use the popup attribute. the popup attribute should be set to the id of a panel within the same document. when the left mouse button is pressed on the element with the popup attribute, the corresponding panel will be displayed. for instance, to attach the popup defi...
...And 5 more matches
Tooltips - Archive of obsolete content
tooltips a tooltip is used to provide descriptive help to the user about the control that the mouse is over. for instance, moving the mouse over top of a toolbar button and waiting for a second can display a small popup label containing
text describing the button's function. when the mouse is moved again, the tooltip disappears. this is a useful means of providing additional details about a user interface without cluttering up the main interface. note that tooltips can only be activated using the mouse, so they should never contain important information that isn't available elsewhere. the tooltip
text attribute in most cases, the tooltip will display only a single label. for this, the tooltip
text attribute may be used, which is valid for all xul elements. the value of this attribute...
...ithout cluttering up the main interface. note that tooltips can only be activated using the mouse, so they should never contain important information that isn't available elsewhere. the tooltip
text attribute in most cases, the tooltip will display only a single label. for this, the tooltip
text attribute may be used, which is valid for all xul elements. the value of this attribute should be the
text to appear in the tooltip. <toolbarbutton label="back" tooltip
text="go back one page"/> in this example, a back button on a toolbar is given additional
text to appear on a tooltip. this could also be useful if the toolbar is configured such that labels do not appear. if an element does not have a tooltip
text attribute, yet a parent element does, the parent tooltip will apply. for example, in t...
...however, the close button does not have a tooltip associated with it, yet the parent toolbar does. ...
...And 5 more matches
Accesskey display rules - Archive of obsolete content
xul elements don't display any accesskeys on mac xul elements don't display any accesskeys on mac. ...
...be "file". if a label has two or more characters which are same as its accesskey, the first character of them will be underlined. if a label doesn't have the character, xul elements append the accesskey character with parentheses. e.g., when an accesskey of "open" is 'a', the generated label will be "open (a)". however, if the last character of the label is an ellipsis or a colon, the accesskey
text is inserted before them. i.e., when an accesskey of "open…" is 'a', the generated label will be "open (a)…". and also when an accesskey of "your name:" is 'b', the generated label will be "your name (b):". this document calls the appended
text "accesskey
text". always appends accesskey
text the basic rules are enough for western locales. however, in some locales, e.g., japanese localized bui...
... name:" is 'b', the generated label will be "your name (b):". this document calls the appended
text "accesskey
text". always appends accesskey
text the basic rules are enough for western locales. however, in some locales, e.g., japanese localized build, its most ui labels don't have alphabets but alphabets are used to accesskey. for coherence of the labels on such localized builds, the accesskey
text is always appended even if the labels have their accesskey characters. e.g., when an accesskey of "ok" is 'o' and an accesskey of "キャンセル" (means "cancel") is 'c', the labels will be "ok(o)" and "キャンセル(c)" on japanese localized build. xul elements check "intl.menuitems.alwaysappendaccesskeys" pref value whether they should append accesskey
text always. if the value is "true" (s...
...And 5 more matches
Box Model Details - Archive of obsolete content
in addition, the flex attribute can be applied to any element. ...
...uttons in it, contained inside a flexible box. the box has the pack attribute which is used to center the buttons horizontally. the align attribute aligns the buttons vertically. the result is that the buttons will be centered in the box in both directions. this example will work with a vertical box as well, although the second button will be underneath the first one, instead of beside it. ...
...ons horizontally. the align attribute aligns the buttons vertically. the result is that the buttons will be centered in the box in both directions. this example will work with a vertical box as well, although the second button will be underneath the first one, instead of beside it. ...
...And 5 more matches
Skinning XUL Files by Hand - Archive of obsolete content
hanges, such as an image), use the style rules in the global skin by importing it into your stylesheet with the following instruction: @import url("chrome://global/skin/"); refer to the document writing skinnable xul and css for guidelines on how to make your skins friendly to the global skin, to xul, and to mozilla. stylesheet syntax to familiarize yourself with the global skin, open up the
text file called global.css in the chrome/classic.jar!/skin/classic/global directory of the mozilla application. in a cascading stylesheet, the style definitions have the following basic form: element { style-attribute1: value; style-attribute2: value; style-attribute3: value; } for example, the following definition -- were it not in serious conflict with the many menu style definitions in th...
...style information to classes of elements, and element ids. ...
...ows the basic format for these two common types of style definitions: class id element.class { attribute: value; } element#id { attribute: value; } menu.baseline { border: 0px; font-size: 9pt; } menu#edit { color: red; } other style subgroups con
textualsubgroups -- elements appearing within other elements, such as italicized
text anywhere within a <p> element or a <div> -- can be grouped in css, but this is an extremely inefficient way to style xul, and is frowned upon in the mozilla development community (again, refer to the skinning guidelines in writing skinnable xul and css for more info); css2 also provides some new ways to group elements for styling, which we summarize briefly here, because they appear in mozilla wi...
...And 5 more matches
The Box Model - Archive of obsolete content
each additional element will be placed to the right of the previous one. the elements will not wrap at all so the more elements you add, the wider the window will be. similarly, each element added to a vertical box will be placed underneath the previous one. the example below shows a simple login prompt: example 2 : source view <vbox> <hbox> <label control="login" value="login:"/> <
textbox id="login"/> </hbox> <hbox> <label control="pass" value="password:"/> <
textbox id="pass"/> </hbox> <button id="ok" label="ok"/> <button id="cancel" label="cancel"/> </vbox> here four elements have been oriented vertically, two inner hbox tags and two button elements. notice that only the elements that are direct descendants of the box are oriented vertically. the labels and ...
...box id="login"/> </hbox> <hbox> <label control="pass" value="password:"/> <
textbox id="pass"/> </hbox> <button id="ok" label="ok"/> <button id="cancel" label="cancel"/> </vbox> here four elements have been oriented vertically, two inner hbox tags and two button elements. notice that only the elements that are direct descendants of the box are oriented vertically. the labels and
textboxes are inside the inner hbox elements, so they are oriented according to those boxes, which are horizontal. you can see in the image that each label and
textbox is oriented horizontally. aligning
textboxes if you look closely at the image of the login dialog, you can see that the two
textboxes are not aligned with each other horizontally. it would probably be better if they were. in order to do...
...osely at the image of the login dialog, you can see that the two
textboxes are not aligned with each other horizontally. it would probably be better if they were. in order to do this we need to add some additional boxes. example 3 : source view <vbox> <hbox> <vbox> <label control="login" value="login:"/> <label control="pass" value="password:"/> </vbox> <vbox> <
textbox id="login"/> <
textbox id="pass"/> </vbox> </hbox> <button id="ok" label="ok"/> <button id="cancel" label="cancel"/> </vbox> notice how the
text boxes are now aligned with each other. to do this, we needed to add boxes inside of the main box. the two labels and
textboxes are all placed inside a horizontal box. then, the labels are placed inside another box, this time a vertical...
...And 5 more matches
listhead - Archive of obsolete content
a header row of a listbox. it is usual to place listheader elements inside the listhead, one for each column. attributes disabled properties acesssibletype, disabled examples (example needed) attributes disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
...nd to mouse events. to enable the element, leave this attribute out entirely. visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. ...
...se events. to enable the element, leave this attribute out entirely. visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. ...
...And 5 more matches
listheader - Archive of obsolete content
<listitem> <listcell label="mary ellen"/> <listcell label="candle maker"/> </listitem> <listitem> <listcell label="roger"/> <listcell label="swashbuckler"/> </listitem> </listbox> attributes disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
... effect. the element will, however, still respond to mouse events. to enable the element, leave this attribute out entirely. visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. label type: string the label that will appear on the element. ...
.... label type: string the label that will appear on the element. if this is left out, no
text appears. for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. ...
...And 5 more matches
radio - Archive of obsolete content
er this should be set to a character that is used as a shortcut key. this should be one of the characters that appears in the label attribute for the element. command type: id set to the id of a command element that is being observed by the element. ...
...ears in the label attribute for the element. command type: id set to the id of a command element that is being observed by the element. crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left ...
...tion is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left the
text will be cropped on its left side. right the
text will be cropped on its right side. center the
text will be cropped in the middle, showing both the start and end of the
text normally. none the
text will be not be cropped using an ellipsis. however, the
text will simply be cut off if it is too large. the si...
...And 5 more matches
toolbarbutton - Archive of obsolete content
on except that it may be rendered differently. typically, it is expected to have an image. more information is available in the xul tutorial. relevant accessbility guidelines all toolbar functionality should be duplicated elsewhere in the application where possible, provide keyboard alternatives. where possible, duplicate functionality in a menu item or con
text menu. where not possible, make all toolbarbuttons focusable by -moz-user-focus: normal. attributes accesskey, autocheck, checkstate, checked, command, crop, dir, disabled, dlgtype, group, image, label, oncommand, open, orient, tabindex, title, type, validate properties accesskey, accessibletype, autocheck, checkstate, checked, command, crop, d...
...ermine whether this attribute is set instead of getattribute(). for buttons, the type attribute must be set to checkbox or radio for this attribute to have any effect. command type: id set to the id of a command element that is being observed by the element. ...
...ckbox or radio for this attribute to have any effect. command type: id set to the id of a command element that is being observed by the element. crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left ...
...And 5 more matches
nsIContentPolicy - Archive of obsolete content
process() (for example, by launching a dialog to prompt the user for something).") note: in reality, much of this interface is defined in the nsicontentpolicybase interface, but for now is documented here until someone has time to split things up. ...
...time to split things up. method overview short shouldload(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acon
text, in acstring amimetypeguess, in nsisupports aextra, in nsiprincipal arequestprincipal); short shouldprocess(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acon
text, in acstring amimetype, in nsisupports aextra, in nsiprincipal arequestprincipal); constants content types constant value description type_other 1 indicates content whose type is unknown, or is not interesting outside a limited use case. in general, you should try not to use this type unless none of the others is a fit. type_script 2 indicates...
..._websocket 16 indicates a websocket load. type_csp_report 17 indicates a content security policy report. type_xslt 18 indicates a style sheet transformation. type_beacon 19 indicates a beacon post. type_fetch 20 indicates a load initiated by the globalfetch.fetch() method, which is available as a global in both window and worker con
texts. type_imageset 21 indicates a request to load an <img> (with the srcset attribute or <picture>. type_web_manifest 22 indicates a request to load a web manifest. type_internal_script 23 an internal constant used to represent scripts loaded using <script> elements. important: this type is mapped to type_script before being passed to conte...
...And 5 more matches
Floats - Learn web development
previous overview: css layout next originally for floating images inside blocks of
text, the float property became one of the most commonly used tools for creating multiple column layouts on webpages. with the advent of flexbox and grid it has now returned to its original purpose, as this article explains. prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css.) objective: to learn how to create floated features on webpages, and to use the clear property and other methods of clearing floats. ...
...s (study introduction to html), and an idea of how css works (study introduction to css.) objective: to learn how to create floated features on webpages, and to use the clear property and other methods of clearing floats. the background of floats the float property was introduced to allow web developers to implement simple layouts involving an image floating inside a column of
text, with the
text wrapping around the left or right of it. the kind of thing you might get in a newspaper layout. but web developers quickly realized that you can float anything, not just images, so the use of float broadened, for example to fun layout effects such as drop-caps. floats have commonly been used to create entire web site layouts featuring multiple columns of information floated so th...
...o sit below one another, in the same order as they appear in the source). there are newer, better layout techniques available and so use of floats in this way should be regarded as a legacy technique. in this article we'll just concentrate on the proper uses of floats. a simple float example let's explore how to use floats. we'll start with a really simple example involving floating a block of
text around an element. you can follow along by creating a new index.html file on your computer, filling it with a simple html template, and inserting the below code into it at the appropriate places. at the bottom of the section, you can see a live example of what the final code should look like. first, we'll start off with some simple html — add the following to your html body, removing anything ...
...And 5 more matches
Styling lists - Learn web development
objective: to become familiar with the best practices and properties related to styling lists. a simple list example to begin with, let's look at a simple list example. ...
... objective: to become familiar with the best practices and properties related to styling lists. a simple list example to begin with, let's look at a simple list example. ...
...e same as the different list types. handling list spacing when styling lists, you need to adjust their styles so they keep the same vertical spacing as their surrounding elements (such as paragraphs and images; sometimes called vertical rhythm), and the same horizontal spacing as each other (you can see the finished styled example on github, and find the source code too.) the css used for the
text styling and spacing is as follows: /* general styles */ html { font-family: helvetica, arial, sans-serif; font-size: 10px; } h2 { font-size: 2rem; } ul,ol,dl,p { font-size: 1.5rem; } li, p { line-height: 1.5; } /* description list styles */ dd, dt { line-height: 1.5; } dt { font-weight: bold; } the first rule sets a sitewide font and a baseline font size of 10px. these ...
...And 5 more matches
How can we design for all types of users? - Learn web development
s or technical constraints. this article lists the most important quick-wins for universal design. summary when you're building a website, one top issue to consider is universal design: accommodating all users regardless of disability, technical constraints, culture, location, and so on. active learning there is no active learning available yet. dig deeper color contrast to keep your
text readable, use a
text color that contrasts well with the background color. make it extra easy to read the
text, to help visually-impaired people and people using their phones on the street. the w3c defines a good color mix with an algorithm that calculates luminosity ratio between foreground and background. the calculation may seem pretty complicated, but we can rely on tools to do the job for us...
...p's colour contrast analyser. note: alternatively you can find a number of contrast checkers online, such as webaim's color contrast checker. we suggest a local checker because it comes packaged with an on-screen color picker to find out a color value. for instance, let's test the colors on this page and see how we fare in the colour contrast analyser: the luminosity contrast ratio between
text and background is 8.30:1, which exceeds the minimum standard (4.5:1) and should enable many visually-impaired people to read this page. font size you can specify font size on a website either through relative units or absolute units. absolute units absolute units are not proportionally calculated but refer to a size set in stone, so to speak, and are expressed most of the time in pixels (px).
...t it? this works as of internet explorer 9 and in every other current browser, so please feel free to use this unit. note: you may notice opera mini does not support font sizing in rem. it will end up setting its own font size, so don't bother feeding it font units. why would i want to use proportional units? because you don't know when a browser is going to come around and refuse to zoom up
text whose size is expressed in pixels. also, check your website's statistics: you may receive visits from older browsers. we would advise the following: describe fonts in rem units, most browsers will be very happy with them; let older browsers display fonts with their own internal engine. browser's engines will ignore any property or value in the css if they can't cope with them, so that your w...
...And 5 more matches
CSS basics - Learn web development
previous overview: getting started with the web next css (cascading style sheets) is the code that styles web content. css basics walks through what you need to get started. we'll answer questions like: how do i make
text red? how do i make content display at a certain location in the (webpage) layout? how do i decorate my webpage with background images and colors? what is css? like html, css is not a programming language. it's not a markup language either. css is a style sheet language. css is what you use to selectively style html elements. for example, this css selects paragraph
text, setting the color to red: p { color: red; } let's try it out! using a
text editor, paste the three lines of css (above) into a new file. save the file as style.css in a directory named styles...
...n't change the appearance of the html. (if you haven't been following our project, pause here to read dealing with files and html basics.) open your index.html file. paste the following line in the head (between the <head> and </head> tags): <link href="styles/style.css" rel="stylesheet"> save index.html and load it in your browser. you should see something like this: if your paragraph
text is red, congratulations! your css is working. anatomy of a css ruleset let's dissect the css code for red paragraph
text to understand how it works : the whole structure is called a ruleset. (the term ruleset is often referred to as just rule.) note the names of the individual parts: selector this is the html element name at the start of the ruleset. it defines the element(s) to be style...
... img[src] selects <img src="myimage.png"> but not <img> pseudo-class selector the specified element(s), but only when in the specified state. (for example, when a cursor hovers over a link.) a:hover selects <a>, but only when the mouse pointer is hovering over the link. there are many more selectors to discover. to learn more, see the mdn selectors guide. fonts and
text now that we've explored some css fundamentals, let's improve the appearance of the example by adding more rules and information to the style.css file. first, find the output from google fonts that you previously saved from what will your website look like?. add the <link> element somewhere inside your index.html's head (anywhere between the <head> and </head> tags). it looks something like...
...And 5 more matches
JS_LookupProperty
obsolete since jsapi 37this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. determine if a specified property exists. ...
... obsolete since jsapi 37this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. determine if a specified property exists. ...
...try to avoid using it. determine if a specified property exists. ...
...And 5 more matches
Gecko object attributes
« at apis support page introduction you can obtain object attributes by nsiaccessible.getattributes() method. object attributes are relevant for the entire subtree of the object they are on, unless they are overridden by a descendent with the same object attribute. this is in contrast to
text attributes, which apply only to substrings in a
text object. object attributes list aria attributes all aria attributes used on dom element (i.e., any attribute prefixed by 'aria-') are exposed as object attributes; name is preserved except the 'aria-' prefix is cut. common attributes class the class name for an element from html, xul, svg, etc. this is useful for retrieving microformat semantics for an element. display similar with display css style. applied to: any visible accessib...
...he aria states and properties module for more information. additional information may be provide by the object attributes atomic and relevant. applied to: any role exposed in aria: aria-live relevant space delimited string with keywords describing what kinds of changes in the subtree are informational, as opposed to presentational. if not specified, the default should be considered "additions
text", which indicates that newly created objects and changes to
text and
text equivalents should be considered relevant, and that the hiding or removal of items is not. please see the aria states and properties module for more information. exposed in aria: aria-relevant container-atomic is this change inside a region that should always be presented at once. if yes, member-of relation will point to...
...t's not exposed currently table related attributes layout-guess true when gecko's heuristic determines that it is a table that is probably used for layout, not for table. value not set means it is probably a data table. applied to: role_table table-cell-index the index of the table cell accessible. use nsiaccessibletable and nsiaccessibletablecell instead. applied to role_cell hyper
text attributes formatting "block" if the object uses block formatting, and thus starts on a new line and ends with a hard line break that is not visible in the actual
text. for example, a heading, paragraph, or list item is typically formatted as a block, but there is no requirement to do so. their formatting may have been changed with css. an example of this is often horizontal navigation bars...
...And 5 more matches
Gecko states
s state represents the default button in a window. state_expanded children of this object that have the role_outlineitem role are displayed. state_collapsed children of this object that have the role_outlineitem role are hidden. state_busy the control cannot accept input at this time. state_floating children "owned" not "contained" by parent state_checkable indicates scrolling or moving
text or graphics. state_animated the object's appearance changes rapidly or constantly. graphics that are occasionally animated are described as role_graphic with the state property set to state_animated. this state is used to indicate that the object's location is changing. state_invisible the object is programmatically hidden. for example, menu itmes are programmatically hidden until a user acti...
...o users. state_offscreen scrolled off state_sizeable the object can be resized. for example, a user could change the size of a window by clicking the border with a mouse and dragging the mouse. state_moveable indicates that the object can be moved. for example, a user can click on the titlebar for the object and drag the object to a new location. state_selfvoicing the object or child uses
text-to-speech (tts) technology for description purposes. a speech-based accessibility aid does not announce information when an object with this state has the focus because the object automatically announces information. isn't used state_focusable the object can be focused. applied to: events: concomitant state: state_focused state_selectable the object can be selected. applied to: ...
... the focus because the object automatically announces information. isn't used state_focusable the object can be focused. applied to: events: concomitant state: state_focused state_selectable the object can be selected. applied to: events: concomitant state: state_selected state_linked indicates that the object is formatted as a hyperlink. the object role will usually be role_
text_leaf. state_traversed the object is a hyperlink that has been visited (previously clicked) by a user. state_multiselectable supports multiple selection state_extselectable supports extended selection state_required indicates that user interaction is required. state_important isn;t used. state_invalid indicates a validation failure. ext_state_supports_autocompletion for editable a...
...And 5 more matches
Add to iPhoto
os x carbon, core foundation, and other system frameworks from an extension written entirely in javascript. note: this extension uses carbon routines, which can no longer be used in firefox add-ons now that firefox is a 64-bit application. you can download an installable version of this extension on amo. once installed, when you right-click on an image, you'll see among the options in the con
textual menu an option to "add image to iphoto". choose it, and iphoto will start up (if it's not already running) and import the image. declaring the apis the first thing we have to do is declare the mac os x apis we'll be using. this extension uses a number of methods and data types, as well as constants, from three system frameworks. since a lot of this stuff is repetitive, we'll only look at se...
...nstants used for the flags field in the lsapplicationparameters structure: this.klsrolesnone = 1; this.klsrolesviewer = 2; this.klsroleseditor = 4; this.klsrolesall = 0xffffffff; implementing the extension now that the mac os x apis we'll be using have been declared, we can write the core of the extension itself. this is done in the iphoto object in the extension's code. ...
...parameters structure: this.klsrolesnone = 1; this.klsrolesviewer = 2; this.klsroleseditor = 4; this.klsrolesall = 0xffffffff; implementing the extension now that the mac os x apis we'll be using have been declared, we can write the core of the extension itself. this is done in the iphoto object in the extension's code. ...
...And 5 more matches
Migrating from Firebug - Firefox Developer Tools
l/xml/svg and the css related to it. within the devtools this functionality is served by the page inspector. edit html within the page inspector the tag attributes and the contents can be edited inline just like in firebug. beyond that it allows to edit the tag names inline. you can also edit the html directly. in firebug you do this by right-clicking a node and clicking edit html... ...
...onality is served by the page inspector. edit html within the page inspector the tag attributes and the contents can be edited inline just like in firebug. beyond that it allows to edit the tag names inline. you can also edit the html directly. in firebug you do this by right-clicking a node and clicking edit html... in the con
text menu. in the devtools this option is also available via the con
text menu. there the option is called edit as html. only the live preview of changes is currently missing, which is tracked in bug 1067318 and bug 815464. copy html and related information firebug's html panel allows to copy the inner and outer html of an element as well as the css and xpath to it via the con
text menu of an element. the page inspector provides the same functionality except copying x...
... the page inspector provides the same functionality except copying xpaths. this is covered by bug 987877. edit css both tools allow to view and edit the css rules related to the element selected within the node view in a similar way. firebug has a style side panel for this, the devtools have a rules side panel. in firebug you add new rules by right-clicking and choosing add rule... from the con
text menu. the devtools also have a con
text menu option for that named add new rule and additionally have a + button within the rules panel's toolbar to create new rules. to edit element styles, i.e. the css properties of the style attribute of an element, in firebug you have to right-click into the style side panel and choose edit element style... from the con
text menu. the devtools display an eleme...
...And 5 more matches
Basic animations - Web APIs
ge(); var moon = new image(); var earth = new image(); function init() { sun.src = 'https://mdn.mozillademos.org/files/1456/canvas_sun.png'; moon.src = 'https://mdn.mozillademos.org/files/1443/canvas_moon.png'; earth.src = 'https://mdn.mozillademos.org/files/1429/canvas_earth.png'; window.requestanimationframe(draw); } function draw() { var ctx = document.getelementbyid('canvas').getcon
text('2d'); ctx.globalcompositeoperation = 'destination-over'; ctx.clearrect(0, 0, 300, 300); // clear canvas ctx.fillstyle = 'rgba(0, 0, 0, 0.4)'; ctx.strokestyle = 'rgba(0, 153, 255, 0.4)'; ctx.save(); ctx.translate(150, 150); // earth var time = new date(); ctx.rotate(((2 * math.pi) / 60) * time.getseconds() + ((2 * math.pi) / 60000) * time.getmilliseconds()); ctx.translate(1...
....pi * 2, false); // earth orbit ctx.stroke(); ctx.drawimage(sun, 0, 0, 300, 300); window.requestanimationframe(draw); } init(); <canvas id="canvas" width="300" height="300"></canvas> screenshotlive sample an animated clock this example draws an animated clock, showing your current time. ...
...canvasxsize) { // image larger than canvas x = canvasxsize - imgw; } if (imgw > canvasxsize) { // image width larger than canvas clearx = imgw; } else { clearx = canvasxsize; } if (imgh > canvasysize) { // image height larger than canvas cleary = imgh; } else { cleary = canvasysize; } // get canvas con
text ctx = document.getelementbyid('canvas').getcon
text('2d'); // set refresh rate return setinterval(draw, speed); } function draw() { ctx.clearrect(0, 0, clearx, cleary); // clear the canvas // if image is <= canvas size if (imgw <= canvasxsize) { // reset, start from beginning if (x > canvasxsize) { x = -imgw + x; } // draw addi...
...And 5 more matches
Pixel manipulation with canvas - Web APIs
e specified dimensions. all pixels are preset to transparent black (all zeroes i.e rgba(0,0,0,0)). you can also create a new imagedata object with the same dimensions as the object specified by anotherimagedata. the new object's pixels are all preset to transparent black. ...
...0,0,0,0)). you can also create a new imagedata object with the same dimensions as the object specified by anotherimagedata. the new object's pixels are all preset to transparent black. this does not copy the image data! var myimagedata = ctx.createimagedata(anotherimagedata); getting the pixel data for a con
text to obtain an imagedata object containing a copy of the pixel data for a canvas con
text, you can use the getimagedata() method: var myimagedata = ctx.getimagedata(left, top, width, height); this method returns an imagedata object representing the pixel data for the area of the canvas whose corners are represented by the points (left,top), (left+width, top), (left, top+height), and (left+width, top+height). the coordinates are specified in canvas coordinate space units. note: any...
...he article manipulating video using canvas. a color picker in this example we are using the getimagedata() method to display the color under the mouse cursor. for this, we need the current position of the mouse with layerx and layery, then we look up the pixel data on that position in the pixel array that getimagedata() provides us. ...
...And 5 more matches
Using images - Web APIs
ur image is not cached, and for larger images the encoded url can become quite long. using frames from a video you can also use frames from a video being presented by a <video> element (even if the video is not visible). for example, if you have a <video> element with the id "myvideo", you can do this: function getmyvideo() { var canvas = document.getelementbyid('canvas'); if (canvas.getcon
text) { var ctx = canvas.getcon
text('2d'); return document.getelementbyid('myvideo'); } } this returns the htmlvideoelement object for the video, which, as covered earlier, is one of the objects that can be used as a canvasimagesource. drawing images once we have a reference to our source image object we can use the drawimage() method to render it to the canvas. as we will see later the...
... only using one image, so i use the image object's load event handler to execute the drawing statements. the drawimage() method places the backdrop at the coordinate (0, 0), which is the top-left corner of the canvas. ...
...ly by looping and placing the scaled images at different positions. in the code below, the first for loop iterates over the rows. the second for loop iterates over the columns. the image is scaled to one third of its original size, which is 50x38 pixels. note: images can become blurry when scaling up or grainy if they're scaled down too much. ...
...And 5 more matches
Comment - Web APIs
the comment interface represents
textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view. comments are represented in html and xml as content between '<!--' and '-->'. in xml, the character sequence '--' cannot be used within a comment. ...
...lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/characterdata" target="_top"><rect x="266" y="1" width="130" heigh...
...And 5 more matches
CustomElementRegistry.define() - Web APIs
); // create spans var wrapper = document.createelement('span'); wrapper.setattribute('class','wrapper'); var icon = document.createelement('span'); icon.setattribute('class','icon'); icon.setattribute('tabindex', 0); var info = document.createelement('span'); info.setattribute('class','info'); // take attribute content and put it inside the info span var
text = this.getattribute('
text'); info.
textcontent =
text; // insert icon var imgurl; if(this.hasattribute('img')) { imgurl = this.getattribute('img'); } else { imgurl = 'img/default.png'; } var img = document.createelement('img'); img.src = imgurl; icon.appendchild(img); // create some css to apply to the shadow dom var style = document.create...
... info.
textcontent =
text; // insert icon var imgurl; if(this.hasattribute('img')) { imgurl = this.getattribute('img'); } else { imgurl = 'img/default.png'; } var img = document.createelement('img'); img.src = imgurl; icon.appendchild(img); // create some css to apply to the shadow dom var style = document.createelement('style'); style.
textcontent = '.wrapper {' + 'position: relative;' + '}' + '.info {' + 'font-size: 0.8rem;' + 'width: 200px;' + 'display: inline-block;' + 'border: 1px solid black;' + 'padding: 10px;' + ...
... customized built-in element the following code is taken from our word-count-web-component example (see it live also). // c...
...And 5 more matches
Introduction to the DOM - Web APIs
, it's written in javascript, but it uses the dom to access the document and its elements. the dom is not a programming language, but without it, the javascript language wouldn't have any model or notion of web pages, html documents, xml documents, and their component parts (e.g. elements). every element in a document—the document as a whole, the head, tables within the document, table headers,
text within the table cells—is part of the document object model for that document, so they can all be accessed and manipulated using the dom and a scripting language like javascript. in the beginning, javascript and the dom were tightly intertwined, but eventually, they evolved into separate entities. the page content is stored in the dom and may be accessed and manipulated via javascript, so that...
...he alert() function from the window object, or it may use more sophisticated dom methods to actually create new content, as in the longer example below. this following javascript will display an alert when the document is loaded (and when the whole dom is available for use): <body onload="window.alert('welcome to my home page!');"> another example. ...
...xample. this function creates a new h1 element, adds
text to that element, and then adds the h1 to the tree for this document: <html> <head> <script> // run this function when the document is loaded window.onload = function() { // create a couple of elements in an otherwise empty html page const heading = document.createelement("h1"); const heading_
text = document.create
textnode("big head!"); heading.appendchild(heading_
text); document.body.appendchild(heading); } </script> </head> <body> </body> </html> fundamental data types this reference tries to describe the various objects and types in simple terms. but there are a number of different data types being passed around the api that you should be aware of. ...
...And 5 more matches
Element.innerHTML - Web APIs
to insert the html into the document rather than replace the contents of an element, use the method insertadjacenthtml(). ...
... to insert the html into the document rather than replace the contents of an element, use the method insertadjacenthtml(). ...
... to insert the html into the document rather than replace the contents of an element, use the method insertadjacenthtml(). ...
...And 5 more matches
HTMLIFrameElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 5 more matches
HTMLPreElement - Web APIs
the htmlpreelement interface exposes specific properties and methods (beyond those of the htmlelement interface it also has available to it by inheritance) for manipulating a block of preformatted
text (<pre>). ...
...splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...And 5 more matches
HTMLSelectElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 5 more matches
HTMLTableElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 5 more matches
HTMLTrackElement: cuechange event - Web APIs
the cuechange event fires when a
texttrack has changed the currently displaying cues. the event is fired at both the
texttrack and at the htmltrackelement in which it's being presented, if any. ...
... the cuechange event fires when a
texttrack has changed the currently displaying cues. the event is fired at both the
texttrack and at the htmltrackelement in which it's being presented, if any. ...
...the cuechange event fires when a
texttrack has changed the currently displaying cues. the event is fired at both the
texttrack and at the htmltrackelement in which it's being presented, if any. ...
...And 5 more matches
ReadableStream.cancel() - Web APIs
examples in jake archibald's cancelling a fetch example, a stream is used to fetch the whatwg html spec chunk by chunk; each chunk is searched for the string "service workers". when the search terms is found, cancel() is used to cancel the stream — the job is finished so it is no longer needed. ...
...bald's cancelling a fetch example, a stream is used to fetch the whatwg html spec chunk by chunk; each chunk is searched for the string "service workers". when the search terms is found, cancel() is used to cancel the stream — the job is finished so it is no longer needed. ...
...he job is finished so it is no longer needed. ...
...And 5 more matches
SVGCursorElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGFEBlendElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGFEColorMatrixElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGFECompositeElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGFEConvolveMatrixElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGFEDisplacementMapElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGFEGaussianBlurElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGFEMorphologyElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGGradientElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGGraphicsElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGMPathElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGMetadataElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGPatternElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGScriptElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGStyleElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SVGTitleElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
SubtleCrypto.decrypt() - Web APIs
syntax const result = crypto.subtle.decrypt(algorithm, key, data); parameters algorithm is an object specifying the algorithm to be used, and any extra parameters as required. ...
... syntax const result = crypto.subtle.decrypt(algorithm, key, data); parameters algorithm is an object specifying the algorithm to be used, and any extra parameters as required. ...
...n rsaoaepparams object. to use aes-ctr, pass an aesctrparams object. to use aes-cbc, pass an aescbcparams object. to use aes-gcm, pass an aesgcmparams object. key is a cryptokey containing the key to be used for decryption. if using rsa-oaep, this is the privatekey property of the cryptokeypair object. data is a buffersource containing the data to be decrypted (also known as cipher
text). return value result is a promise that fulfills with an arraybuffer containing the plain
text. exceptions the promise is rejected when the following exceptions are encountered: invalidaccesserror raised when the requested operation is not valid for the provided key (e.g. invalid encryption algorithm, or invalid key for the specified encryption algorithm). operationerror raised when ...
...And 5 more matches
WebGLSampler - Web APIs
webglsampler objects are not available in webgl 1. ...
...webglsampler objects are not available in webgl 1. ...
...webglsampler objects are not available in webgl 1. ...
...And 5 more matches
Lighting in WebGL - Web APIs
.0, -1.0, 0.0, // right 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, // left -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0 ]; gl.bufferdata(gl.array_buffer, new float32array(vertexnormals), gl.static_draw); ... return { position: positionbuffer, normal: normalbuffer,
texturecoord:
texturecoordbuffer, indices: indexbuffer, }; this should look pretty familiar by now; we create a new buffer, bind it to be the buffer we're working with, then send along our array of vertex normals into the buffer by calling bufferdata(). then we add the code to drawscene() to bind the normals array to a shader attribute so the shader code can get access to it: // tell webg...
...vailable to them, we need to update the code in the shaders themselves. the vertex shader the first thing to do is update the vertex shader so it generates a shading value for each vertex based on the ambient lighting as well as the directional lighting. ...
...o it generates a shading value for each vertex based on the ambient lighting as well as the directional lighting. ...
...And 5 more matches
A simple RTCDataChannel sample - Web APIs
a quick look at the html that's needed. there's nothing incredibly complicated here. ...
... couple of buttons for establishing and closing the connection: <button id="connectbutton" name="connectbutton" class="buttonleft"> connect </button> <button id="disconnectbutton" name="disconnectbutton" class="buttonright" disabled> disconnect </button> then there's a box which contains the
text input box into which the user can type a message to transmit, with a button to send the entered
text. this <div> will be the first peer in the channel. ...
...button> <button id="disconnectbutton" name="disconnectbutton" class="buttonright" disabled> disconnect </button> then there's a box which contains the
text input box into which the user can type a message to transmit, with a button to send the entered
text. this <div> will be the first peer in the channel. <div class="messagebox"> <label for="message">enter a message: <input type="
text" name="message" id="message" placeholder="message
text" inputmode="latin" size=60 maxlength=120 disabled> </label> <button id="sendbutton" name="sendbutton" class="buttonright" disabled> send </button> </div> finally, there's the little box into which we'll insert the messages. this <div> block will be the second peer. <div class="messagebox" id="receivebox"> ...
...And 5 more matches
ARIA: img role - Accessibility
the aria img role can be used to identify multiple elements inside page content that should be considered as a single image. these elements could be images, code snippets,
text, emojis, or other content that can be combined to deliver information in a visual manner. <div role="img" aria-label="description of the overall image"> <img src="graphic1.png" alt=""> <img src="graphic2.png"> </div> description any set of content that should be consumed as a single image (which could include images, video, audio, code snippets, emojis, or other content) can be identified using role="img". ...
...deliver information in a visual manner. <div role="img" aria-label="description of the overall image"> <img src="graphic1.png" alt=""> <img src="graphic2.png"> </div> description any set of content that should be consumed as a single image (which could include images, video, audio, code snippets, emojis, or other content) can be identified using role="img". ...
...img" aria-label="description of the overall image"> <img src="graphic1.png" alt=""> <img src="graphic2.png"> </div> description any set of content that should be consumed as a single image (which could include images, video, audio, code snippets, emojis, or other content) can be identified using role="img". ...
...And 5 more matches
Web Accessibility: Understanding Colors and Luminance - Accessibility
tion of color in a well-lit room will be different than perception of that same color on that same computer screen in a dark room. in terms of accessibility, the use of certain color-combinations have more impact than others. font size, font style (some fonts are so thin or fancy that they present accessibility problems on their own), background color, the size of the background space around the
text, even pixel densities and more all affect how color is delivered from the screen. (see understanding success criterion 1.4.3: contrast) a viewer's distance from the screen, the ambient background, the health of his eyes, and more all affect how that color is received by the viewer. how the viewer perceives color after it gets to his eyes is yet another matter, and can be affected by overall hea...
... jewett's "mini color selector" with hsl, rgb, hex options for checking contrast in the browser. luminance and contrast contrast contrast between colors ("hues") is a critical component, but the use of color ("hues") alone is not enough to create accessible content. as mentioned before, any calculation of contrast must include luminance in the calculation. in addition, the "shape" of the
text itself will matter. thin letters will be harder to read than thick ones; all type faces need space to "breathe" for human perception. in general, for accessibility purposes, the more contrast the better. that changes with animation. "safer" animation means images with less contrast, not more. for more on color contrast in animation, see three flashes or below threshold understanding sc 2.3.1 ...
...se queries will allow users to choose contrast levels that is right for them, and enable them to adjust these levels depending upon where they are, and what kind of screen they are using. the mdn document, ambient light events, describes an experimental technology worth watching; this technology would enable a web page to be aware of any change in the light intensity, and consquently, adjust the
text accordingly. this would be a great boon to those with motor skills problems, or do not have the use of their hands. to summarize, color is as much about human physiology and perception in the brain as it is the measurement of light coming from a computer screen. it's also important to understand that the ambient light environment affects the ability to perceive color and contrast. light, and i...
...And 5 more matches
::cue-region - CSS: Cascading Style Sheets
candidate recommendation initial definit...
... candidate recommendation initial definition. ...
... candidate recommendation initial definition. ...
...And 5 more matches
Cubic Bezier Generator - CSS: Cascading Style Sheets
<html> <canvas id="bezier" width="336" height="336"> </canvas> <form> <label for="x1">x1 = </label><input onchange="updatecanvas();" type="
text" maxlength=6 id="x1" value="0.79" class='field'> <label for="y1">y1 = </label><input onchange="updatecanvas();return true;" type="
text" maxlength=6 id="y1" value="0.33" class='field'> <label for="x2">x2 = </label><input onchange="updatecanvas();return true;" type="
text" maxlength=6 id="x2" value="0.14" class='field'> <label for="y2">y2 = </label><input onchange="updatecanvas();return true;" type="
text" maxlength=6 id="y2" value="0.53" class='field'> <br> <output id="output">log</output> </form> </html> .field { width: 40px; } function updatecanvas() { var x1 =...
...ar scaling; //limitation: scaling is computed once: if canvas.height/canvas.width change it won't be recalculated var dragsm = 0; // drag state machine: 0 = nodrag, others = object being dragged function initcanvas() { // get the canvas element using the dom var canvas = document.getelementbyid('bezier'); // make sure we don't execute when canvas isn't supported if (canvas.getcon
text) { // use getcon
text to use the canvas for drawing var ctx = canvas.getcon
text('2d'); scaling = math.min(canvas.height - rulers - margin, canvas.width - rulers - margin); canvas.onmousedown = mousedown; canvas.onmouseup = mouseup; } else { alert('you need safari or firefox 1.5+ to see this demo.'); } } function cx(x) { return x * scal...
...function ly(y) { // used when drawing horizontal lines to prevent subpixel blur var result = cy(y); return math.round(result) == result ? ...
...And 5 more matches
display - CSS: Cascading Style Sheets
lock or display: inline is specified, will set the inner value to flow. this will result in expected behavior; for example if you specify an element to be block, you would expect that the children of that element would participate in block and inline normal flow layout. inside <display-inside> these keywords specify the element’s inner display type, which defines the type of formatting con
text that its contents are laid out in (assuming it is a non-replaced element). valid <display-inside> values: flow the element lays out its contents using flow layout (block-and-inline layout). if its outer display type is inline or run-in, and it is participating in a block or inline formatting con
text, then it generates an inline box. otherwise it generates a block container box. dependi...
...ents using flow layout (block-and-inline layout). if its outer display type is inline or run-in, and it is participating in a block or inline formatting con
text, then it generates an inline box. otherwise it generates a block container box. depending on the value of other properties (such as position, float, or overflow) and whether it is itself participating in a block or inline formatting con
text, it either establishes a new block formatting con
text (bfc) for its contents or integrates its contents into its parent formatting con
text. flow-root the element generates a block element box that establishes a new block formatting con
text, defining where the formatting root lies. table these elements behave like html <table> elements. it defines a block-level box. flex the element behave...
...lements. table-row these elements behave like <tr> html elements. table-cell these elements behave like <td> html elements. table-column-group these elements behave like <colgroup> html elements. table-column these elements behave like <col> html elements. table-caption these elements behave like <caption> html elements. ruby-base these elements behave like <rb> html elements. ruby-
text these elements behave like <rt> html elements. ruby-base-container these elements behave like <rbc> html elements generated as anonymous boxes. ruby-
text-container these elements behave like <rtc> html elements. box <display-box> these values define whether an element generates display boxes at all. valid <display-box> values: contents these elements don't produce a speci...
...And 5 more matches
font - CSS: Cascading Style Sheets
fantasy">fantasy</label><br /> <input type="radio" id="font-family-system-ui" name="font_family" value="system-ui" onchange="setcss()"> <label for="font-family-system-ui">system-ui</label><br /> </div> </div> <div class="cf propinputs"> <div class="propinputcont tar"> font : </div> <div class="propinputcont"> <input type="
text" class="curcss" id="input_font_style"><br/> font-style <br/> optional </div> <div class="propinputcont"> <input type="
text" class="curcss" id="input_font_variant"> <br/> font-variant <br/> optional </div> <div class="propinputcont"> <input type="
text" class="curcss" id="input_font_weight"> <br...
..."propinputcont"> <input type="
text" class="curcss" id="input_font_variant"> <br/> font-variant <br/> optional </div> <div class="propinputcont"> <input type="
text" class="curcss" id="input_font_weight"> <br/> font-weight <br/> optional </div> <div class="propinputcont"> <input type="
text" class="curcss mandatory" id="input_font_size"> <br/> font-size <br/> mandatory </div> <div class="propinputcont"> <input type="
text" class="curcss" id="input_line_height"> <br/> line-height <br/> optional </div> <div class="propinputcont"> <input type="
text" class="curcss mandatory" id="input_...
... <input type="
text" class="curcss" id="input_line_height"> <br/> line-height <br/> optional </div> <div class="propinputcont"> <input type="
text" class="curcss mandatory" id="input_font_family"> <br/> font-family <br/> mandatory </div> </div> </form> <div class="fontshorthand"> this is some sample
text. ...
...And 5 more matches
Creating and triggering events - Developer guides
e event name is 'build'. event.initevent('build', true, true); // listen for the event. elem.addeventlistener('build', function (e) { // e.target matches elem }, false); // target can be any element or other eventtarget. ...
...e is 'build'. event.initevent('build', true, true); // listen for the event. elem.addeventlistener('build', function (e) { // e.target matches elem }, false); // target can be any element or other eventtarget. ...
...event. elem.addeventlistener('build', function (e) { // e.target matches elem }, false); // target can be any element or other eventtarget. ...
...And 5 more matches
Evolution of HTTP - HTTP
http (hyper
text transfer protocol) is the underlying protocol of the world wide web. developed by tim berners-lee and his team between 1989-1991, http has seen many changes, keeping most of the simplicity and further shaping its flexibility. http has evolved from an early protocol to exchange files in a semi-trusted laboratory environment, to the modern maze of the internet, now carrying images, videos in high resolution and 3d. invention of the world wide web in 1989, while he was working at cern, tim berners-lee wrote a proposal to build a hyper
text system over the internet. initially calling it the mesh, it was later renamed to world wide web during its implementation in 1990. ...
... now carrying images, videos in high resolution and 3d. invention of the world wide web in 1989, while he was working at cern, tim berners-lee wrote a proposal to build a hyper
text system over the internet. initially calling it the mesh, it was later renamed to world wide web during its implementation in 1990. built over the existing tcp and ip protocols, it consisted of 4 building blocks: a
textual format to represent hyper
text documents, the hyper
text markup language (html). a simple protocol to exchange these documents, the hypert
text transfer protocol (http). a client to display (and accidentally edit) these documents, the first web browser called worldwideweb. a server to give access to the document, an early version of httpd. these four building blocks were completed by the end...
...sfer protocol (http). a client to display (and accidentally edit) these documents, the first web browser called worldwideweb. a server to give access to the document, an early version of httpd. these four building blocks were completed by the end of 1990, and the first servers were already running outside of cern by early 1991. on august 6th 1991, tim berners-lee's post on the public alt.hyper
text newsgroup is now considered as the official start of the world wide web as a public project. the http protocol used in those early phases was very simple, later dubbed http/0.9, and sometimes as the one-line protocol. http/0.9 – the one-line protocol the initial version of http had no version number; it has been later called 0.9 to differentiate it from the later versions. http/0.9 is extrem...
...And 5 more matches
Common MIME types - HTTP
application/octet-stream is the default value for all other cases. an unknown file type should use this type. browsers pay a particular care when manipulating these files, attempting to safeguard the user to prevent dangerous behaviors. ...
...zw amazon kindle ebook format application/vnd.amazon.ebook .bin any kind of binary data application/octet-stream .bmp windows os/2 bitmap graphics image/bmp .bz bzip archive application/x-bzip .bz2 bzip2 archive application/x-bzip2 .csh c-shell script application/x-csh .css cascading style sheets (css)
text/css .csv comma-separated values (csv)
text/csv .doc microsoft word application/msword .docx microsoft word (openxml) application/vnd.openxmlformats-officedocument.wordprocessingml.document .eot ms embedded opentype fonts application/vnd.ms-fontobject .epub electronic publication (epub) application/epub+zip .gz ...
...soft word (openxml) application/vnd.openxmlformats-officedocument.wordprocessingml.document .eot ms embedded opentype fonts application/vnd.ms-fontobject .epub electronic publication (epub) application/epub+zip .gz gzip compressed archive application/gzip .gif graphics interchange format (gif) image/gif .htm .html hyper
text markup language (html)
text/html .ico icon format image/vnd.microsoft.icon .ics icalendar format
text/calendar .jar java archive (jar) application/java-archive .jpeg .jpg jpeg images image/jpeg .js javascript
text/javascript, per the following specifications: https://html.spec.whatwg.org/multipage/#s...
...And 5 more matches
Nullish coalescing operator (??) - JavaScript
contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. see pr #1482 regarding the addition of this example. syntax leftexpr ?? rightexpr examples using the nullish coalescing operator in this example, we will provide default values but keep values other than null or undefined. ...
... and send us a pull request. see pr #1482 regarding the addition of this example. syntax leftexpr ?? rightexpr examples using the nullish coalescing operator in this example, we will provide default values but keep values other than null or undefined. ...
...number ?? ...
...And 5 more matches
SVG Presentation Attributes - SVG: Scalable Vector Graphics
eight glyph-orientation-horizontal glyph-orientation-vertical image-rendering kerning letter-spacing lighting-color marker-end marker-mid marker-start mask opacity overflow pointer-events shape-rendering solid-color solid-opacity stop-color stop-opacity stroke stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width
text-anchor
text-decoration
text-rendering transform unicode-bidi vector-effect visibility word-spacing writing-mode attributes alignment-baseline it specifies how an object is aligned along the font baseline with respect to its parent. value: auto|baseline|before-edge|
text-before-edge|middle|central|after-edge|
text-after-edge|ideographic|alphabetic|hanging|mathematical|inherit; animat...
... value: auto|baseline|super|sub|<percentage>|<length>|inherit; animatable: yes clip deprecated it defines what portion of an element is visible. ...
... yes color-rendering it provides a hint to the browser about how to optimize its color interpolation and compositing operations. value: auto|optimizespeed|optimizequality|inherit; animatable: yes cursor it specifies the mouse cursor displayed when the mouse pointer is over an element. value: <funciri>|<keywords>|inherit; animatable: yes direction it specifies the base writing direction of
text. ...
...And 5 more matches
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
ted (bug 1239218) lang attribute without namespace implemented (bug 721920) svgsvgelement.viewport removed never implemented xml:base attribute removed implementation status unknown reorder descendent elements of <switch> having systemlanguage attribute according to allowreorder smil attribute implementation status unknown made <tspan> and <
textpath> graphics elements implementation status unknown allow x, y, width, and height on <symbol> implementation status unknown made <use> element shadow trees consistent with shadow dom spec implementation status unknown role mapping of <a> element depending on whether it is a valid link implementation status unknown aria state and property attributes...
... overflow: hidden; on <hatch> in ua style sheet implementation status unknown 0 0 as default value of transform-origin except root <svg> and <svg> children of <foreign> implementation status unknown use of white-space instead of deprecated xml:space attribute in ua style sheet implementation status unknown @font-face, ::first-letter and ::first-line on <
text> implementation status unknown svg and html style sheets in html document with inline svg applying to whole document content implementation status unknown presentation attributes on any svg namespaced element implementation status unknown display behavior of <style> defined via ua style sheet implementation status unknown !important user agent style...
...n status unknown bounding box for element with no position at (0, 0) implementation status unknown defer keyword removed from preserveaspectratio attribute removed (bug 1280425) added non-scaling-size, non-rotation and fixed-position keywords for vector-effect property not implemented yet (bug 1318208) vector-effect has no effect within 3d rendering con
text implementation status unknown consider clip and overflow on svg document referenced by <image> implementation status unknown paths change notes b and b path commands implementation status unknown z and z path commands to add path coordinate data to previous command implementation status unknown not render <path>, <polygon> an...
...And 5 more matches
Using custom elements - Web Components
<p is="word-count">, or document.createelement("p", { is: "word-count" }). working through some simple examples at this point, let's go through some more simple examples to show you how custom elements are created in more detail. autonomous custom elements let's have a look at an example of an autonomous custom element — <popup-info-box> (see a live example). this takes an image icon and a
text string, and embeds the icon into the page. when the icon is focused, it displays the
text in a pop up information box to provide further in-con
text information. to begin with, the javascript file defines a class called popupinfo, which extends the generic htmlelement class. class popupinfo extends htmlelement { constructor() { // always call super first in constructor super(); //...
...); icon.setattribute('tabindex', 0); // insert icon from defined attribute or default icon const img = icon.appendchild(document.createelement('img')); img.src = this.hasattribute('img') ? ...
.../ insert icon from defined attribute or default icon const img = icon.appendchild(document.createelement('img')); img.src = this.hasattribute('img') ? ...
...And 5 more matches
selection - Archive of obsolete content
get and set
text and html selections in the current web page. usage registering for selection notifications to be notified when the user makes a selection, register a listener for the "select" event. each listener will be called after a selection is made. function mylistener() { console.log("a selection has been made."); } var selection = require("sdk/selection"); selection.on('select', mylistener); // you can remove listeners too. selection.removelistener('select', mylistener); iterating over discontiguous selections discontiguous selections can be accessed by iterating over the selection module itself. each iteration yields a selection object from which
text, html, and iscontiguous properties can be accessed. private windows if your add-on has not opted into private browsing, t...
...s can be accessed. private windows if your add-on has not opted into private browsing, then you won't see any selections made in tabs that are hosted by private browser windows. to learn more about private windows, how to opt into private browsing, and how to support private browsing, refer to the documentation for the private-browsing module. ...
...ed into private browsing, then you won't see any selections made in tabs that are hosted by private browser windows. to learn more about private windows, how to opt into private browsing, and how to support private browsing, refer to the documentation for the private-browsing module. ...
...And 4 more matches
Extension Versioning, Update and Compatibility - Archive of obsolete content
user gets an add-on update notification and should be used to give a quick overview of what new features have been added and any security issues that have been resolved. in order to do this you must add an updateinfourl entry to the update manifest (see the example above). the page at this url will be retrieved and displayed to the user. since it is being displayed outside of a normal webpage con
text it is heavily sanitized, which means there are few formatting options available and scripting and images aren't allowed. the information page retrieved must currently be totally valid xhtml, including being delivered with the mime type application/xhtml+xml (important: see problems section) you may include %app_locale% in your updateinfourl if you want to have locale information included in the...
...re are few formatting options available and scripting and images aren't allowed. the information page retrieved must currently be totally valid xhtml, including being delivered with the mime type application/xhtml+xml (important: see problems section) you may include %app_locale% in your updateinfourl if you want to have locale information included in the url -- this allows you to customize the
text based on the user's locale. you may also use the other substitution strings supported by updateurl, although those may be less useful. formatting prior to firefox 4 prior to firefox 4 you could only use the following tags, any other tags have themselves and their contents completely stripped: h1, h2 and h3 for general headings p for paragraphs ul and ol for lists. within lists use the us...
...hough those may be less useful. formatting prior to firefox 4 prior to firefox 4 you could only use the following tags, any other tags have themselves and their contents completely stripped: h1, h2 and h3 for general headings p for paragraphs ul and ol for lists. within lists use the usual li tag for each list item. ...
...And 4 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
o is overlay the palette in your main browser overlay. <overlay id="xulschoolhello-browser-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <toolbarpalette id="browsertoolbarpalette"> <toolbarbutton id="xulschoolhello-hello-world-button" class="toolbarbutton-1 chromeclass-toolbar-additional" label="&xulschoolhello.helloworld.label;" tooltip
text="&xulschoolhello.helloworld.tooltip;" oncommand="xulschoolchrome.browseroverlay.dosomething(event);" /> <!-- more buttons here. --> </toolbarpalette> <!-- more overlay stuff. --> </overlay> one detail that is easy to overlook is the fact that the toolbarpalette element is outside of the window element. if you put the toolbarpalette element inside the window element in your overlay...
...seroverlay.dosomething(event);" /> <!-- more buttons here. --> </toolbarpalette> <!-- more overlay stuff. --> </overlay> one detail that is easy to overlook is the fact that the toolbarpalette element is outside of the window element. if you put the toolbarpalette element inside the window element in your overlay, some weird errors will begin to happen. always set the label and tooltip
text attributes of a toolbarbutton. in the case of a toolbaritem element (discussed later), use the title attribute instead of label. tooltips are very important for users that want to know what a button does before clicking it. setting the image for a toolbar button is done with css: #xulschoolhello-hello-world-button { list-style-image: url("chrome://xulschoolhello/skin/hello-world.png"); } i...
... your buttons. keep in mind most users don't know how to customize toolbars in firefox. let's add our own toolbar. this is done in the overlay as well. <window id="main-window"> <toolbox id="navigator-toolbox"> <toolbar id="xulschoolhello-toolbar" toolbarname="&xulschoolhello.toolbarname.label;" accesskey="&xulschoolhello.toolbar.accesskey;" customizable="true" mode="icons" con
text="toolbar-con
text-menu" defaultset="xulschoolhello-hello-world-button" insertbefore="personaltoolbar" /> </toolbox> </window> (note for mac os x: <window id="main-window"> and </window> are not required) our toolbar is added as a child of the toolbox element in the main browser window. the toolbox is the collection of toolbars in firefox, including the main menu bar. let's look a...
...And 4 more matches
Adding windows and dialogs - Archive of obsolete content
is the recommended way to create common dialogs in an extension. read the article and its examples carefully, because there are many useful functions to use in the prompt service. there are some equivalent, simpler functions that are available in the window object, but those are meant for unprivileged html javascript code. alert the alert is the simplest form of dialog. all it does is display a
text message that the user can read and then click the ok button to dismiss it. we have been using the window.alert function to open alert messages in our examples so far, but that's not the right way to do it. it's ok to use this function if you're just debugging some problem and want to see if the program reaches a specific line of code, or to inspect the value of a variable, but your final extensio...
...uld of course use localized strings instead of hard-coded ones. the prompt service allows you to set the title of the dialog however you want it, and also lets you specify the window you want to use as a parent for the alert. this normally should be set to the current window. you can pass a null value and the service will pick the currently active window. confirm confirmation dialogs display a
text with a yes / no question, and prompts the user to choose an answer. in html you can use the window.confirm function for this. the prompt service has a confirm method with similar behavior: let prompts = cc["@mozilla.org/embedcomp/prompt-service;1"]. getservice(ci.nsipromptservice); if (prompts.confirm(window, "confirm title", "would you like to continue?")) { // do something. } else {...
...behavior: let prompts = cc["@mozilla.org/embedcomp/prompt-service;1"]. getservice(ci.nsipromptservice); if (prompts.confirm(window, "confirm title", "would you like to continue?")) { // do something. } else { // do something else } the method returns a boolean value indicating the user's response. others unprivileged javascript can also use the window.prompt function to receive
text input from the user. the prompt service has a very rich set of functions that allow different kinds of inputs, such as
text, passwords, usernames and passwords, and checkboxes that can be used for "never ask this again"-type dialogs. the confirmex and prompt methods are the most customizable, allowing a great deal of options that cover most common dialog cases. using the prompt service will save...
...And 4 more matches
Images, Tables, and Mysterious Gaps - Archive of obsolete content
und the line in which the image sits. the image is sitting in a line because images are, by default, inline content. that's all it takes. how inline content is constructed in order to understand what just happened, let's take a look at the construction of a line box, the placement of images within a line box, and the placement of a line box within a table cell. first a basic line box containing
text, shown in figure 3. the most crucial part of figure 3 is the baseline (represented by the blue line), and its placement within the line box. the baseline's exact placement is dependent on the "default" font for the line box (represented by the red box), which is determined by the value of font-family for the element that contains the line box. it isn't possible for an author to change the base...
...e the descenders in lowercase letters like "j", "y", and "q" are drawn. figure 4 shows what happens when we add an image to the mix. note where the image sits by default: its bottom edge is aligned with the baseline of the line box. this placement can be changed with vertical-align-- we'll talk about that in a bit-- but almost nobody ever changes the value from its default. let's take away the
text, and leave only the image, as was done in figure 5. so we have an image sitting on the baseline of a line box that contains only the image. now consider what happens when we put that line in a table cell (figure 6). and there you have it-- spaces opening up where none have ever been seen before. it gets even worse with small images, like ones that are one pixel tall, as illustrated in figur...
... it's very worldly. lorem ipsum, dolor sit amet...</p></td></tr></table> as we see in figure 8, that works well in some cases but not so well in others. the thin red line shows that the single-pixel spacer gif is now only making the cell one pixel tall, as the designe...
...And 4 more matches
Using XML Data Islands in Mozilla - Archive of obsolete content
plorer had an "xml data islands" feature that allows web authors include xml data inline in html documents using the <xml> tag. this feature is not based on multi-vendor web standards and is not supported in firefox (or other non-ie browsers). xml data islands are no longer supported from internet explorer 10 onwards. html5 has a more general feature called "data blocks" that can carry almost any
textual data, including xml. javascript can use the content of a <script> element as a data block if the src attribute is omitted and the type attribute does not specify an executable script type. when putting xml in a data block, you need to make sure that the xml content you are embedding does not have an end tag that case-insensitively matches "</script>". for example, a simple xml purchase order c...
...script>". ...
...here is a complete demo (also available as an atta...
...And 4 more matches
Getting Started - Archive of obsolete content
ny point you wish to revert back to the original code again, just extract this jar over top of what you've modified. now all of the css and images are extracted, but if you make some changes and run mozilla as it is, you will not see them because it's still set to look at the files in the jar files. ...
...if mozilla runs fine, that means that it worked. ...
... the images/styles for the browser, email client, or html editor. css files the css files in these directories tell the browser how to display the buttons and other controls, where to put the images, what border and padding it should put around them, etc. for this next part, let's modify the standard button. go into \mozilla\chrome\classic\skin\classic\global and open button.css in your favourite
text editor. scroll down to button {. this section defines the normal button in its basic state (there is no mouse over it, it's not disabled, and it's not selected). change the background-color: to darkblue and the color: to white. save the file and run mozilla. when the browser pops up, you probably won't be able to see much. open the preferences dialog box and take a look at all of the buttons in t...
...And 4 more matches
New Skin Notes - Archive of obsolete content
edback fix weird width bug on preferences page. --dria css classes for feature and subfeature boxes, including required graphics. -- dria when will these fixes be on the live site? --nickolay 10:38, 31 aug 2005 (pdt) existing fixes should be on test/docs/ now. --dria stuff that's been fixed note that while i've made these fixes, they haven't necessarily been checked in yet. edit page
textarea needs to 'scale' better with page width (so large whitespace area's are non-existant), suggest min-width:some-em-size; width: 88%; and max-width set to 95% or something like that. --callek i tried this, but it gets totally screwed up in ie for some reason. i'll try again, but can't guarantee this will be fixed for the initial upgrades. --dria took two days, but i finally got this sorted out...
...arge whitespace area's are non-existant), suggest min-width:some-em-size; width: 88%; and max-width set to 95% or something like that. --callek i tried this, but it gets totally screwed up in ie for some reason. i'll try again, but can't guarantee this will be fixed for the initial upgrades. --dria took two days, but i finally got this sorted out. when the skin is updated on test/docs, editform
textarea should be resizeable in all browsers. yay! --dria wordpress skins need footer information. -- dria when a page is redirected, need to say-so and what it was redirected from, (see document for an example of such.) this is only an issue in mw1.5 so far. devmo skin vs cavendish skin --callek i can probably pull-off this patch if needed (quickly), so dria or others do not have to hunt up "...
...ry much embedded into the mediawiki code. there are some other changes i need to make, however, so i'll try to fix it up a bit while i'm digging around in there. --dria how about modifying style for the side-bar to have a :hover class added which modifies (to a slightly lighter shade) the background color of the link, this will help to make items "appear as links" to many users, possibly add a
text-decoration: underline as well. --callek is it possible to remove the blank space on category pages, like category:dom?by the way, it looks like this skin has the same problem as previous - the edit box, category list on category pages, and others are always below the end of the sidebar. the major problem it caused in cavendish skin - that they were out of the screen - is solved by making the si...
...And 4 more matches
Venkman Introduction - Archive of obsolete content
the debug menu and from the console to stop at errors or at exceptions. the continue button to the right of the stop button dismisses the stop mode and specifies that scripts should be executed normally, without pausing as each statement is executed. the pretty print button toggles pretty print mode. while in pretty print mode, the contents of the source view will contain the decompiled source
text for the selected function. this is the same
text you would get from the tosource method of the function prototype. if the source
text you are debugging is poorly formatted, pretty print can help make it easier to read by inserting line breaks and whitespace in appropriate places. when pretty print is enabled you will see a green check mark on the toolbar button, and the menu item will be checked...
... property flags properties of both scope and this objects are listed alphabetically, grouped by data type. figure 9 shows which icons represent which data types. properties which are of the type object are displayed with the name of their constructor function in curly braces as their value. you can locate the source code of the constructor by selecting "find constructor" from the property's con
text menu. you can find the place where the object was instantiated with the "find creator" command. by default, properties of type function are not displayed, in order to conserve space in the view. if you would like to have functions displayed, check the "include functions" menu item in the view's con
text menu. you may need to close and re-open any objects you had open to see the change. properties...
...if a property shows up in a bold red font, an exception occurred when venkman tried to read the value. the exception object will appear as the value of the property. ...
...And 4 more matches
newlines - Archive of obsolete content
« xul reference home newlines type: one of the values below how the
text box handles pastes with newlines in them. ...
... « xul reference home newlines type: one of the values below how the
text box handles pastes with newlines in them. ...
... « xul reference home newlines type: one of the values below how the
text box handles pastes with newlines in them. ...
...And 4 more matches
Adding HTML Elements - Archive of obsolete content
//www.w3.org/1999/xhtml" this is a declaration of html much like the one we used to declare xul. this must be entered exactly as shown or it won't work correctly. note that mozilla does not actually download this url, but it does recognize it as being html. here is an example as it might be added to the find file window: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="
text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> then, you can use html tags as you would normally, keeping in mind the following: you must add a html: prefix to the beginning of each tag, assuming you declared the html namespace as above. ...
...ul one. if you left out the html: part, the browser would think that the elements were xul elements and they would not display because img, input, table, and so on are not valid xul tags. in xul, you can add labels with the description or label element. you should use these elements when you can. you can also add labels to controls either by using the html label element, or you can simply put the
text inside another html block element (such as p or div) as in the example below. example 1 : source view <html:p> search for: <html:input id="find-
text"/> <button id="okbutton" label="ok"/> </html:p> this code will cause the
text 'search for:' to be displayed, followed by an input element and an ok button. notice that the xul button can appear inside the html elements, as it does here. plain ...
... inside another html block element (such as p or div) as in the example below. example 1 : source view <html:p> search for: <html:input id="find-
text"/> <button id="okbutton" label="ok"/> </html:p> this code will cause the
text 'search for:' to be displayed, followed by an input element and an ok button. notice that the xul button can appear inside the html elements, as it does here. plain
text will only be displayed when placed inside an html element that would normally allow you to display
text (such as a p tag).
text outside of one will not be displayed, unless the xul element the
text is inside allows this (the description element, for example). the examples below may help. examples of html elements what follows are some examples of adding html elements to windows. in each case, the...
...And 4 more matches
Adding Labels and Images - Archive of obsolete content
« previousnext » this section describes a way to add labels and images to a window. in addition, we look at how to include elements into groups.
text elements you cannot embed
text directly into a xul file without tags around it and expect it to be displayed. you can use two xul elements for this purpose. label element the most basic way to include
text in a window is to use the label element. it should be used when you want to place a descriptive label beside a control, such as a button. an example is shown below: example 1 : source view <label value="this is some
text"/> the value attribute can be used to specify the
text that you wish to have displayed. the
text will not wrap, so the
text will all be displayed on a single line. this syntax is the most common of labels. if ...
...ment. it should be used when you want to place a descriptive label beside a control, such as a button. an example is shown below: example 1 : source view <label value="this is some
text"/> the value attribute can be used to specify the
text that you wish to have displayed. the
text will not wrap, so the
text will all be displayed on a single line. this syntax is the most common of labels. if the
text needs to wrap, you can place the
text content inside opening and closing tags as in the following example: example 2 : <label>this is some longer
text that will wrap onto several lines.</label> as with html, line breaks and extra whitespace are collapsed into a single space. later, we'll find out how to constrain the width of elements so that we can see the wrapping more easily. control attribut...
...ility, so that screen readers read aloud the label for the control as the user tabs to it. set the value of the control attribute to the id of the element to be focused. example 3 : source view <label value="click here:" control="open-button"/> <button id="open-button" label="open"/> in the example above, clicking the label will cause the button to be focused. description element for descriptive
text not associated with any particular control, you can use the description tag. this element is useful for informative
text at the top of a dialog or a group of controls for example. as with the label element, you can either use the value attribute for a single line of
text or place
text or xhtml content inside opening and closing description tags for longer blocks of
text. it is more common to use ...
...And 4 more matches
Custom Tree Views - Archive of obsolete content
nformation. the tree will call methods of the view to get the information that it needs to display. in general, although the tree view has thirty or so functions that may be implemented, you only need to implement the ones that the tree will call. three methods that you should implement are listed below. rowcount this property should be set to the total number of rows in the tree. getcell
text( row , column ) this method should return the
text contents at the specified row and column. this will be called to display data for each cell. the rows are supplied as numeric values starting at 0. the columns are treecolumn objects. in the older versions of mozilla (before firefox 1.5 or mozilla 1.8), the columns are supplied as the values of the id attribute on the columns. if you need a id a...
...), the columns are supplied as the values of the id attribute on the columns. if you need a id attribute like older versions, the id property of treecolumn can be used. settree( tree ) this method is called once to set the tree element on the view. ...
..., getcellproperties: function(row,col,props){}, getcolumnproperties: function(colid,col,props){} }; the functions in the example not described above do not need to perform any action, but they must be implemented as the tree calls them to gather additional information. this example can be used for a tree with 10,000 rows. the contents of the cells in the first column will be set to the
text 'row x' where x is the row number. the contents of the cells in the second column will be set to 'february 18'. the if statement in the function getcell
text() compares the id property of the column argument to the
text 'namecol'. this
text 'namecol' corresponds to the id of the first treecol in the example above. this example is very simple of course -- in reality you would have more complex data...
...And 4 more matches
Groupboxes - Archive of obsolete content
upboxes are box elements, so you can use the box attributes, such as orient and flex. a simple groupbox example the example below shows a simple groupbox: example 1 : source view <groupbox> <caption label="answer"/> <description value="banana"/> <description value="tangerine"/> <description value="phone booth"/> <description value="kiwi"/> </groupbox> this will cause four pieces of
text to be displayed surrounded by a box with the label answer. note that the groupbox has a vertical orientation by default which is necessary to have the
text elements stack in a single column. more complex captions you can also add child elements inside the caption element to create a more complex caption. for example, mozilla's font preferences panel uses a drop-down menu as a caption. although an...
...inside the caption element to create a more complex caption. for example, mozilla's font preferences panel uses a drop-down menu as a caption. although any content can be used, usually you would use a checkbox or dropdown menu. ...
...we'll add a groupbox to the find files dialog in the next section. ...
...And 4 more matches
Numeric Controls - Archive of obsolete content
« previousnext » xul has two elements used for the entry of numeric values or ranges, and well as two elements for entering dates and times. these elements are only available in firefox 3 and later. number fields a
textbox may be used for entering numbers by setting the value of the type attribute to the value number. this type of
textbox may only be used to enter numbers. other characters are not allowed and are just ignored if typed. in addition, arrow buttons appear beside the
textbox to allow the user to cycle through the values. as with other
textboxes, the default value can be specified with the value attribute. naturally, this value should be a number. however, the minimum and maximum values can also be specified using the min and max attributes. if these are set, ...
...f typed. in addition, arrow buttons appear beside the
textbox to allow the user to cycle through the values. as with other
textboxes, the default value can be specified with the value attribute. naturally, this value should be a number. however, the minimum and maximum values can also be specified using the min and max attributes. if these are set, you can control the range of values that the
textbox may be set to. if the user enters a value less or greater than this value, it will be reset to the minimum or maximum value as necessary. for instance, the following numeric
textbox has a range between 1 and 20. <
textbox type="number" min="1" max="20"/> as the default value isn't specified, it will default to 1, the minimum value. the min attribute is set to 1 to indicate a minimum possible v...
... default value isn't specified, it will default to 1, the minimum value. the min attribute is set to 1 to indicate a minimum possible value of 1 and the max attribute is set to 20 to indiciate a maximum possible value of 20. if the minimum value is not specified, it has a default value of 0. the maximum value defaults to the special value infinity which means that there is no limit. other numeric
textbox attributes the increment attribute may be used to specify by how much the value changes when the arrows are pressed. the default value is 1, but specifying a different value allows the number to change by a larger amount. for instance, the following example steps in multiples of 10. <
textbox type="number" increment="10" max="100"/> this
textbox steps in multiples of 10 from 0 to 100. since th...
...And 4 more matches
XBL Inheritance - Archive of obsolete content
g can be extended with another. the child binding can add properties, methods and event handlers. the child binding will have all the features it defines in addition to the features from the binding it inherits from (and any that binding inherits from and so on up the tree). to extend an existing binding, add an extends attribute on to the binding tag. ...
...another. the child binding can add properties, methods and event handlers. the child binding will have all the features it defines in addition to the features from the binding it inherits from (and any that binding inherits from and so on up the tree). to extend an existing binding, add an extends attribute on to the binding tag. for example, the following binding creates a
textbox which adds the
text 'http://www' to the beginning of its value when the f4 key is pressed. example 1 : source <binding id="
textboxwithhttp" extends="chrome://global/content/bindings/
textbox.xml#
textbox"> <handlers> <handler event="keypress" keycode="vk_f4"> this.value="http://www"+value; </handler> </handlers> </binding> the xbl here extends from the xul
textbox element. the url given in ...
...en the f4 key is pressed. example 1 : source <binding id="
textboxwithhttp" extends="chrome://global/content/bindings/
textbox.xml#
textbox"> <handlers> <handler event="keypress" keycode="vk_f4"> this.value="http://www"+value; </handler> </handlers> </binding> the xbl here extends from the xul
textbox element. the url given in the extends attribute above is the url of the
textbox binding. this means that we inherit all of the content and behavior provided by the
textbox binding. in addition, we add a handler which responds to the keypress event. autocompleting
textboxes the example above is similar to how the url autocomplete feature works in mozilla. a
textbox that supports autocomplete is just one with a xbl binding that extends the basic
textbox. the autocomplete te...
...And 4 more matches
binding - Archive of obsolete content
syntax, it can be used to bind a particular property of a matched node to a particular variable name. that name can then be used within the action of a rule. ...
...t can be used to bind a particular property of a matched node to a particular variable name. that name can then be used within the action of a rule. ...
...it can be a variable reference, an rdf resource uri, or an rdf literal value. predicate type: uri the predicate or property to match. this must be a uri of the property. ...
...And 4 more matches
bindings - Archive of obsolete content
or more binding elements. this element is optional in firefox 3/mozilla 1.9 and later; instead binding elements may be placed directly inside the rule element. more information is available in the template guide. ...
...binding elements. this element is optional in firefox 3/mozilla 1.9 and later; instead binding elements may be placed directly inside the rule element. more information is available in the template guide. ...
...it can be a variable reference, an rdf resource uri, or an rdf literal value. predicate type: uri the predicate or property to match. this must be a uri of the property. ...
...And 4 more matches
deck - Archive of obsolete content
<description value="this is the third page"/> <button label="this is also the third page"/> </box> </deck> attributes selectedindex type: integer gets and sets the index of the currently selected panel. the first item is at index 0. ...
...cription value="this is the third page"/> <button label="this is also the third page"/> </box> </deck> attributes selectedindex type: integer gets and sets the index of the currently selected panel. the first item is at index 0. ...
...you may select an item by assigning its index to this property. by assigning -1 to this property, all items will be deselected. ...
...And 4 more matches
member - Archive of obsolete content
elements that are containers or are contained within another element. both the container and child attributes may use variables. more information is available in the xul tutorial. ...
... that are containers or are contained within another element. both the container and child attributes may use variables. more information is available in the xul tutorial. ...
... container type: ? a variable reference to a node that is expected to be a container. ...
...And 4 more matches
menupopup - Archive of obsolete content
enupopup may be used: it may be placed inside a menu, menulist, toolbarbutton, or a button with the type attribute set to "menu" to create a popup that will open when the menu or button is pressed. it may be attached to any element using the popup attribute. when the element is clicked with the left mouse button, the menupopup will be displayed. it may be attached to any element using the con
text attribute. when a con
text menu is opened, the menupopup will be displayed. a con
text menu may be opened by right-clicking the element, or by pressing the menu key on the keyboard. more information is available in the xul tutorial and popup guide. attributes ignorekeys, left, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position, top properties accessibletype, anchornode,...
...enupopup may be attached to a menulist. <menulist> <menupopup> <menuitem label="mozilla" value="http://mozilla.org"/> <menuitem label="slashdot" value="http://slashdot.org"/> <menuitem label="sourceforge" value="http://sf.net"/> <menuitem label="freshmeat" value="http://freshmeat.net"/> </menupopup> </menulist> the following example shows how a menupopup can be used as a con
text menu for an element. when the label is right-clicked, the menu will be displayed. <menupopup id="clipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> <label value="right click for popup" con
text="clipmenu"/> attributes ignorekeys type: boolean if true, keyboard navigation between items in the popup is disabled. left type: i...
...appearing. onpopupshown type: script code this event is sent to a popup after it has been opened, much like the onload event is sent to a window when it is opened. position type: string the position attribute determines where the popup appears relative to the element the user clicked to invoke the popup. this allows you to place the popup on one side of a button. note that a con
text menu will never respect this attribute, always appearing relative to the mouse cursor. this value can be specified either as a single word offering pre-defined alignment positions, or as 2 words specifying exactly which part of the anchor and popup should be aligned. if specified as 2 words, the value indicates which corner or edge of the anchor (the first word) is aligned which which corne...
...And 4 more matches
tab - Archive of obsolete content
is set to true if the tab is immediately before the currently selected tab. this is set automatically set when needed and you shouldn't adjust it manually. this is primarily useful for themes so that they can adjust the appearance of the area around the selected tab. ...
...ded and you shouldn't adjust it manually. this is primarily useful for themes so that they can adjust the appearance of the area around the selected tab. crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left ...
...tion is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left the
text will be cropped on its left side. right the
text will be cropped on its right side. center the
text will be cropped in the middle, showing both the start and end of the
text normally. none the
text will be not be cropped using an ellipsis. however, the
text will simply be cut off if it is too large. the si...
...And 4 more matches
treecols - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a group of treecol elements. there should one and only one treecols element in a tree. more information is available in the xul tutorial. attributes pickertooltip
text properties accessibletype examples (example needed) attributes pickertooltip
text type: string the
text for the tooltip on the column picker. ...
...information is available in the xul tutorial. attributes pickertooltip
text properties accessibletype examples (example needed) attributes pickertooltip
text type: string the
text for the tooltip on the column picker. ...
...on is available in the xul tutorial. attributes pickertooltip
text properties accessibletype examples (example needed) attributes pickertooltip
text type: string the
text for the tooltip on the column picker. ...
...And 4 more matches
Adobe Flash - Archive of obsolete content
lity features. until macromedia changes this from within the flash plugin, scriptability can not be used on mac os x browsers based on gecko. the example below shows a detection heuristic in action. example 1: verifying the flash plugin version below, javascript identifies the version of flash, and whether it is scriptable in netscape gecko: can we have javascript in a wiki page? <script type="
text/javascript">identifyflash();</script> typically, javascript code that determines what version of the plugin is installed looks at the mimetypes array that is part of the navigator object. every plugin exposes a description string that typically includes the plugin's name and version number. the flash plugin's description string uses a standard versioning nomenclature that can then be parsed for...
...ml 4 standard, whereas the latter is a deprecated element, as discussed in using the right markup to invoke plugins. however, if you wish to use fscommands with the flash plugin to call javascript functions in an html page, then you must use the embed element, as discussed further in the section on fscommands. ...
...using the right markup to invoke plugins. however, if you wish to use fscommands with the flash plugin to call javascript functions in an html page, then you must use the embed element, as discussed further in the section on fscommands. accessing flash from javascript the simple example below shows how input into an html
text box in a form field can be transferred to a flash animation (the grey
text box below). ...
...And 4 more matches
Browser Detection and Cross Browser Support - Archive of obsolete content
e solution was either to provide the lowest-common denominator of html or to use browser detection techniques on the web server to send customized content to each browser depending on what level of support the browser provided. server side browser detection using user agent strings was born. user agent strings are defined in the http protocol and are available to web servers (see rfc 1945 - hyper
text transfer protocol 1.0 and rfc 2068 - hyper
text transfer protocol 1.1). the most common approach at this time was to distinguish user agents by vendor and version using the reported user agent string. although this approach was considered reasonable at the time, this approach caused problems for browser vendors right from the beginning. the original netscape browsers used a user agent string whic...
...e to avoid this trap. problems caused by inappropriate browser detection excluding unknown browsers if you only provide tests for specific browsers in your detection logic, your site will not be usable if a visitor uses a different browser. consider the following example: // wrong approach - do not use! if (document.all) { // internet explorer 4+ document.write('<link rel="stylesheet" type="
text/css" src="style-ie.css">'); } else if (document.layers) { // navigator 4 document.write('<link rel="stylesheet" type="
text/css" src="style-nn.css">'); } note how the above example only provided stylesheets for internet explorer and navigator 4 and even then only if the visitor has javascript support turned on in their browser. users of netscape 6, netscape 7, compuserve 7, mozilla, opera will n...
...s from ever being seen by navigator 4. for example, navigator 4 does not understand the @import directive in css and will not load any external css style sheets specified via @import. this technique can be used to provide basic common css rules for all browsers (including navigator 4) while providing more advanced rules in a external css file for more modern css compliant browsers. ...
...And 4 more matches
Processing XML with E4X - Archive of obsolete content
javascript embedded in a page to be surrounded by html comment tags to prevent <script> unaware browsers from displaying javascript code to the user. this practice is no longer necessary, but remains in some legacy code. for backwards compatibility, e4x defaults to ignoring comments and cdata sections. you can add an e4x=1 argument to your <script> tag to disable this restriction: <script type="
text/javascript;e4x=1"> ... </script> creating an xml object e4x offers two principal ways of creating an xml object. the first is to pass a string to the xml constructor: var languages = new xml('<languages type="dynamic"><lang>javascript</lang><lang>python</lang></languages>'); the second is to embed the xml directly in your script, as an xml literal: var languages = <languages type="dynami...
...the two are not the same thing. e4x introduces new syntax that only works with e4x xml objects. the syntax is designed to be familiar to javascript programmers, but e4x does not provide a direct mapping from xml to native javascript objects; just the illusion of one. it is possible to interpolate variables into an xml literal to create an element name (or to create content). var h = 'html'; var
text = "here's some
text"; var doc = <{h}><body>{
text}</body></{h}>; alert(doc.toxmlstring()); // gives <html> <body>here's some
text</body> </html> working with attributes xml literal syntax has a significant advantage over the xml constructor when you need to create markup dynamically. with e4x it is easy to embed dynamic values in markup. variables and expressions can be used to create attribu...
... if (languages.@type.tostring() === 'agile') { ... } or, simply: if (languages.@type == 'agile') { ... } working with xml objects xml objects provide a number of methods for inspecting and updating their contents. they support javascript's regular dot and [] notation, but instead of accessing object properties e4x overloads these operators to access the e...
...And 4 more matches
XForms Input Element - Archive of obsolete content
types: show the label before or after the checkbox (see below) type restrictions the input element can be bound to a node containing simple content of any data type except xsd:base64binary, xsd:hexbinray or any data type derived from these. representations the xforms input element can be represented by the following widgets for the spcified data types (or types derived from these data types):
text field - the default widget when no type is specified or the data is of type xsd:string (xhtml/xul) checkbox - used for xsd:boolean instance data. (xhtml/xul) datepicker - used to represent data of type xsd:date (xhtml/xul) calendar - used to represent data of type xsd:date when appearance attribute also has the value 'full' (xhtml/xul) month list - used to represent data of type xsd:gmonth (xhtml...
...:date (xhtml/xul) calendar - used to represent data of type xsd:date when appearance attribute also has the value 'full' (xhtml/xul) month list - used to represent data of type xsd:gmonth (xhtml only) days list - used to represent data of type xsd:gday (xhtml only) number field - used to represent data of numeric type (fx 3.0 only, xul only) more detail about each of these widgets follows below. ...
...ar - used to represent data of type xsd:date when appearance attribute also has the value 'full' (xhtml/xul) month list - used to represent data of type xsd:gmonth (xhtml only) days list - used to represent data of type xsd:gday (xhtml only) number field - used to represent data of numeric type (fx 3.0 only, xul only) more detail about each of these widgets follows below. ...
...And 4 more matches
Mozilla XForms User Interface - Archive of obsolete content
to build user interfaces. some of the 'form controls' can have multiple appearances and thus may be rendered in multiple ways. we use the data type of the instance node that the form control is bound to as a clue when making a rendering decision. the form author can also use the 'appearance' attribute on the form control to give us another clue. for example, a xforms input control may appear as a
text field or as a datepicker depending on whether it is bound to a xsd:string type or a xsd:date type. when a xf:output binds to a node that has a type of xsd:date, we output the date value as plain
text. an output bound to a date and also having @appearance='full' will display as a calendar. this article uses several notations. if you see fx 3.0 only, that means that the control will only be availab...
...he form author can also influence the widget by using the appearance attribute on the element. form controls module this section contains a short description for each form control element. input a key xforms element to show and change the instance data to which it is bound. usually bound to data that can be well-represented by a string (see the spec). it can have the following representations:
text field - default representation. used for most data types, especially
text data. checkbox - used for boolean instance data datepicker - default representation for date data types. similar to a combobox. consists of a
text field for direct input and a dropdown calendar that can also be used to input the date value. calendar - used for date data types when appearance = 'full'. days list - us...
... also be used to input the date value. calendar - used for date data types when appearance = 'full'. days list - used when the data has a data type of day. months list - used when the data has a data type of month. number field - used for numerical data types. secret used for inputting passwords. each character typed by the user is represented by an asterisk on the screen (see the spec).
textarea serves to show/change multiline
text (see the spec). output serves to show the instance data that the element is bound to in a read-only manner (see the spec). it can have the following presentations:
text - default representation for data of most types, especially static
text. calendar - used for date data types when appearance = 'full'. image - if the instance node contains an image,...
...And 4 more matches
Explaining basic 3D theory - Game development
n 3d position in the coordinate system and usually some additional information that defines it. every vertex is described by these attributes: position: identifies it in a 3d space (x, y, z). color: holds an rgba value (r, g and b for the red, green, and blue channels, alpha for transparency — all values range from 0.0 to 1.0). normal: a way to describe the direction the vertex is facing.
texture: a 2d image that the vertex can use to decorate the surface it is part of instead of a simple color. you can build geometry using this information — here is an example of a cube: a face of the given shape is a plane between vertices. for example, a cube has 8 different vertices (points in space) and 6 different faces, each constructed out of 4 vertices. a normal defines which way the fa...
...ere is an example of a cube: a face of the given shape is a plane between vertices. for example, a cube has 8 different vertices (points in space) and 6 different faces, each constructed out of 4 vertices. a normal defines which way the face is directed in. also, by connecting the points we're creating the edges of the cube. the geometry is built from a vertex and the face, while material is a
texture, which uses a color or an image. if we connect the geometry with the material we will get a mesh. rendering pipeline the rendering pipeline is the process by which images are prepared and output onto the screen. the graphics rendering pipeline takes the 3d objects built from primitives described using vertices, applies processing, calculates the fragments and renders them on the 2d screen as...
...e next step in the rendering pipeline. rasterization rasterization converts primitives (which are connected vertices) to a set of fragments. those fragments — which are 3d projections of the 2d pixels — are aligned to the pixel grid, so eventually they can be printed out as pixels on a 2d screen display during the output merging stage. ...
...And 4 more matches
GLSL Shaders - Game development
al, global, and built-in glsl variable. gl_position is used to store the position of the current vertex. the void main() function is a standard way of defining the gl_position variable. everything inside void main() will be executed by the vertex shader. a vertex shader yields a variable containing how to project a vertex's position in 3d space onto a 2d screen. fragment shaders fragment (or
texture) shaders define rgba (red, blue, green, alpha) colors for each pixel being processed — a single fragment shader is called once per pixel. the purpose of the fragment shader is to set up the gl_fragcolor variable. gl_fragcolor is a built-in glsl variable like gl_position. the calculations result in a variable containing the information about the rgba color. demo let's build a simple demo t...
...o be the full size of the viewport. the <script> element in the <head> includes the three.js library in the page; we will write our code into three script tags in the <body> tag: the first one will contain the vertex shader. the second one will contain the fragment shader. the third one will contain the actual javascript code generating the scene. before reading on, copy this code to a new
text file and save it in your working directory as index.html. we'll create a scene featuring a simple cube in this file to explain how the shaders work. the cube's source code instead of creating everything from scratch we can reuse the building up a basic demo with three.js source code of the cube. most of the components like the renderer, camera, and lights will stay the same, but instead of the ...
...ewmatrix are provided by three.js and the vector is passed with the new 3d position, which results in the original cube moving 10 units along the x axis and 5 units along the z axis, translated via a shader. we can ignore the fourth parameter and leave it with the default 1.0 value; this is used to manipulate the clipping of the vertex position in the 3d space, but we don't need in our case. ...
...And 4 more matches
Beginner's guide to media queries - Learn web development
e we tend to detect most often in order to create responsive designs (and that has widespread browser support) is viewport width, and we can apply css if the viewport is above or below a certain width — or an exact width — using the min-width, max-width, and width media features. these features are used to create layouts that respond to different screen sizes. for example, to change the body
text color to red if the viewport is exactly 600 pixels, you would use the following media query. @media screen and (width: 600px) { body { color: red; } } open this example in the browser, or view the source. the width (and height) media features can be used as ranges, and therefore be prefixed with min- or max- to indicate that the given value is a minimum, or a maximum. for examp...
...ome of the newer features introduced in level 4 and 5 of the media queries specification have limited browser support. each feature is documented on mdn along with browser support information, and you can find a full list at using media queries: media features. orientation one well-supported media feature is orientation, which allows us to test for portrait or landscape mode. to change the body
text color if the device is in landscape orientation, use the following media query. @media (orientation: landscape) { body { color: rebeccapurple; } } open this example in the browser, or view the source. a standard desktop view has a landscape orientation, and a design that works well in this orientation may not work as well when viewed on a phone or tablet in portrait mode. testi...
... complex media queries with all of the different possible media queries, you may want to combine them, or create lists of queries — any of which could be matched. "and" logic in media queries to combine media features you can use and in much the same way as we have used and above to combine a media type and feature. for example, we might want to test for a min-width and orientation. the body
text will only be blue if the viewport is at least 600 pixels wide and the device is in landscape mode. @media screen and (min-width: 600px) and (orientation: landscape) { body { color: blue; } } open this example in the browser, or view the source. "or" logic in media queries if you have a set of queries, any of which could match, then you can comma separate these queries. in the ...
...And 4 more matches
Getting started with CSS - Learn web development
will take a simple html document and apply css to it, learning some practical things about the language along the way. prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, and html basics (study introduction to html.) objective: to understand the basics of linking a css document to an html file, and be able to do simple
text formatting with css. starting with some html our starting point is an html document. you can copy the code from below if you want to work on your own computer. save the code below as index.html in a folder on your machine. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>getting started with css</title> </head> <body> <h1>i am a level one heading</h1> ...
...tarting with some html our starting point is an html document. you can copy the code from below if you want to work on your own computer. save the code below as index.html in a folder on your machine. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>getting started with css</title> </head> <body> <h1>i am a level one heading</h1> <p>this is a paragraph of
text. in the
text is a <span>span element</span> and also a <a href="http://example.com">link</a>.</p> <p>this is the second paragraph. it contains an <em>emphasized</em> element.</p> <ul> <li>item one</li> <li>item two</li> <li>item <em>three</em></li> </ul> </body> </html> note: if you are reading this on a device or an environment where you can't easily cr...
...ehavior of elements when we look at a well-marked up html document, even something as simple as our example, we can see how the browser is making the html readable by adding some default styling. headings are large and bold and our list has bullets. this happens because browsers have internal stylesheets containing default styles, which they apply to all pages by default; without them all of the
text would run together in a clump and we would have to style everything from scratch. all modern browsers display html content by default in pretty much the same way. however, you will often want something other than the choice the browser has made. this can be done by simply choosing the html element that you want to change, and using a css rule to change the way it looks. a good example is our <u...
...And 4 more matches
Web fonts - Learn web development
previous overview: styling
text next in the first article of the module, we explored the basic css features available for styling fonts and
text. in this article we will go further, exploring web fonts in detail — these allow you to download custom fonts along with your web page, to allow for more varied, custom
text styling. prerequisites: basic computer literacy, html basics (study introduction to html), css basics (study introduction to css), css
text and font fundamentals. objective: to learn how to apply web fonts to a web page, using either a third party service, or by writing your own code. ...
... for more varied, custom
text styling. prerequisites: basic computer literacy, html basics (study introduction to html), css basics (study introduction to css), css
text and font fundamentals. objective: to learn how to apply web fonts to a web page, using either a third party service, or by writing your own code. font families recap as we looked at in fundamental
text and font styling, the fonts applied to your html can be controlled using the font-family property. this takes one or more font family names, and the browser travels down the list until it finds a font it has available on the system it is running on: p { font-family: helvetica, "trebuchet ms", verdana, sans-serif; } this system works well, but traditionally web developers' font choices were li...
...nt-start.html and web-font-start.css files as a starting point to add your code to (see the live example). make a copy of these files in a new directory on your computer now. in the web-font-start.css file, you'll find some minimal css to deal with the basic layout and typesetting of the example. finding fonts for this example, we'll use two web fonts, one for the headings, and one for the body
text. to start with, we need to find the font files that contain the fonts. fonts are created by font foundries and are stored in different file formats. there are generally three types of sites where you can obtain fonts: a free font distributor: this is a site that makes free fonts available for download (there may still be some license conditions, such as crediting the font creator). examples in...
...And 4 more matches
How much does it cost to do something on the Web? - Learn web development
erence between a webpage, a website, etc., and what a domain name is. objective: review the complete process for creating a website and find out how much each step can cost. summary when launching a website, you may spend nothing, or your costs may go through the roof. in this article we discuss how much everything costs, and how you get what you pay (or don't pay). ...
...ite, etc., and what a domain name is. objective: review the complete process for creating a website and find out how much each step can cost. summary when launching a website, you may spend nothing, or your costs may go through the roof. in this article we discuss how much everything costs, and how you get what you pay (or don't pay). ...
... review the complete process for creating a website and find out how much each step can cost. summary when launching a website, you may spend nothing, or your costs may go through the roof. in this article we discuss how much everything costs, and how you get what you pay (or don't pay). software
text editors you likely have a
text editor: such as, notepad on windows, gedit on linux,
textedit on mac. you'll have an easier time writing code if you choose an editor that color-codes, checks your syntax, and assists you with code structure. many editors are free, for example atom, brackets, bluefish,
textwrangler, eclipse, netbeans, and visual studio code. some, like sublime
text, you can test as long as you like, but you're encouraged to pay. some, like phpstorm, can cost between a ...
...And 4 more matches
What software do I need to build a website? - Learn web development
objective: learn which software components you need if you want to edit, upload, or view a website. summary you can download most of the programs you need for web development for free. we'll provide a few links in this article. you'll need tools to: create and edit webpages upload files to your web server view your website nearly all operating systems by default include a
text editor and a browser, which you can use to view websites. as a result, you usually only need to acquire software for transferring files to your web server. active learning there is no active learning available yet. dig deeper creating and editing webpages to create and edit a website, you need a
text editor.
text editors create and modify unformatted
text files. other formats, like rtf, let...
...ur web server. active learning there is no active learning available yet. dig deeper creating and editing webpages to create and edit a website, you need a
text editor.
text editors create and modify unformatted
text files. other formats, like rtf, let you to add formatting, like bold or underline. those formats are not suitable for writing web pages. you should put some thought into which
text editor you use, since you'll be working with it extensively while you're building the website. all desktop operating systems come with a basic
text editor. these editors are all straightforward, but lack special features for webpage coding. if you want something a bit fancier, there are plenty of third-party tools available. third-party editors often come with extra features, including syntax co...
...lable. third-party editors often come with extra features, including syntax coloring, auto-completion, collapsible sections, and code search. ...
...And 4 more matches
The HTML5 input types - Learn web development
separated by commas): <input type="email" id="email" name="email" multiple> on some devices — notably, touch devices with dynamic keyboards like smart phones — a different virtual keypad might be presented that is more suitable for entering email addresses, including the @ key. see the firefox for android keyboard screenshot below for an example: note: you can find examples of the basic
text input types at basic input examples (see the source code also). this is another good reason for using these newer input types — improving the user experience for users of these devices. client-side validation as you can see above, email, along with other newer input types, provides built-in client-side error validation — performed by the browser before the data gets sent to the server. it...
...e: if the data entered is not an email address, the :invalid pseudo-class will match, and the validitystate.typemismatch property will return true. search field search fields are intended to be used to create search boxes on pages and apps. this type of field is set by using the value search for the type attribute: <input type="search" id="search" name="search"> the main difference between a
text field and a search field is how the browser styles its appearance. often, search fields are rendered with rounded corners; they also sometimes display an "Ⓧ", which clears the field of any value when clicked). additionally, on devices with dynamic keyboards, the keyboard's enter key may read "search", or display a magnifying glass icon. the below screenshots show a non-empty search field in fi...
...ault keyboard will often display some or all of the colon, period, and forward slash as default keys. see below for an example (taken on firefox for android): note: just because the url is well-formed doesn't necessarily mean that it refers to a location that actually exists! numeric field controls for entering numbers can be created with an <input> type of number. this control looks like a
text field but allows only floating-point numbers, and usually provides buttons in the form of a spinner to increase and decrease the value of the control. on devices with dynamic keyboards, the numeric keyboard is generally displayed. the following screenshot (from firefox for android) provides an example: with the number input type, you can constrain the minimum and maximum values allowed by set...
...And 4 more matches
How to build custom form controls - Learn web development
t end, we will work with an example: rebuilding the <select> element. we will also discuss how, when, and whether building your own control makes sense, and what to consider when building a control is a requirement. note: we'll focus on building the control, not on how to make the code generic and reusable; that would involve some non-trival javascript code and dom manipulation in an unknown con
text, and that is out of the scope of this article. design, structure, and semantics before building a custom control, you should start by figuring out exactly what you want. this will save you some precious time. in particular, it's important to clearly define all the states of your control. to do this, it's good to start with an existing control whose states and behavior are well known, so that y...
...end, we will split our css work into two parts: the first part will be the css rules absolutely necessary to make our control behave like a <select> element, and the second part will consist of the fancy styles used to make it look the way we want. required styles the required styles are those necessary to handle the three states of our control. .select { /* this will create a positioning con
text for the list of options; adding this to .select:focus-within will be a better option when fully supported */ position: relative; /* this will make our control become part of the
text flow and sizable at the same time */ display : inline-block; } we need an extra class active to define the look and feel of our control when it is in its active state. because our control is focusable,...
...ible, and will match the screenshot at the beginning of this article. however, you should feel free to experiment and see what you can come up with. .select { /* the computations are made assuming 1em == 16px which is the default value in most browsers. ...
...And 4 more matches
HTML Cheatsheet - Learn web development
lue">style and group</span> particular elements </p> p its used to style and group particular elements another inline container <p>span its used to differentiate a part <span style="color:blue">of the content</span> that we will work on differently </p> span its used to differentiate a part of the content that we will work on differently emphasize some
text <em>i'm posh</em> i'm posh italic
textt you can mark a phrase in the
text in <i>italics</i> you can mark a phrase in the
text in italics bold some
text <b>bold a word or phrase</b>within the
text bold a word or phrase within the
text mark
text as important <strong>i'm important</strong> i'm important highlight some
text <mar...
... a phrase in the
text in <i>italics</i> you can mark a phrase in the
text in italics bold some
text <b>bold a word or phrase</b>within the
text bold a word or phrase within the
text mark
text as important <strong>i'm important</strong> i'm important highlight some
text <mark>notice me</mark> notice me draw a line through irrelevant
text <s>i'm irrelevant</s> i'm irrelevant underline a non-
textual annotation this is <u>mispelled</u> this is mispelled
text displayed lower than normal
text h<sub>2</sub>o h2o small
text used to represent the <small>small print </small>of a document used to represent the small print of a document used for an address <address>main street 67...
... underline a non-
textual annotation this is <u>mispelled</u> this is mispelled
text displayed lower than normal
text h<sub>2</sub>o h2o small
text used to represent the <small>small print </small>of a document used to represent the small print of a document used for an address <address>main street 67</address> main street 67 used for a
textual cite <cite>lorem ipsum</cite> lorem ipsum
text displayed higher than normal
text x<sup>2</sup> x2 a short inline quotation <q>the q element indicates a short inline quotation.</q> the q element indicates a short inline quotation. a line break line 1<br>line 2 line 1 line 2 suggesting a line break it is used to suggest the brows...
...And 4 more matches
Document and website structure - Learn web development
"a paragraph" or "an image"), html also boasts a number of block level elements used to define areas of your website (such as "the header", "the navigation menu", "the main content column"). this article looks into how to plan a basic website structure, and write the html to represent this structure. prerequisites: basic html familiarity, as covered in getting started with html. html
text formatting, as covered in html
text fundamentals. how hyperlinks work, as covered in creating hyperlinks. objective: learn how to structure your document using semantic tags, and how to work out the structure of a simple website. basic sections of a document webpages can and will look pretty different from one another, but they all tend to share similar standard components, un...
...rate. main content: a big area in the center that contains most of the unique content of a given webpage, for example, the video you want to watch, or the main story you're reading, or the map you want to view, or the news headlines, etc. this is the one part of the website that definitely will vary from page to page! sidebar: some peripheral info, links, quotes, ads, etc. usually, this is con
textual to what is contained in the main content (for example on a news article page, the sidebar might contain the author's bio, or links to related articles) but there are also cases where you'll find some recurring elements like a secondary navigation system. footer: a strip across the bottom of the page that generally contains fine print, copyright notices, or contact info. it's a place to put c...
...ou can also find the example in our github repository). we'd like you to look at the example above, and then look over the listing below to see what parts make up what section of the visual. ...
...And 4 more matches
Choosing the right approach - Learn web development
w date() object, extracts a time string out of it using tolocaletimestring(), and then displays it in the ui. we then run it once per second using setinterval(), creating the effect of a digital clock that updates once per second (see this live, and also see the source): function displaytime() { let date = new date(); let time = date.tolocaletimestring(); document.getelementbyid('demo').
textcontent = time; } const createclock = setinterval(displaytime, 1000); pitfalls the frame rate isn't optimized for the system the animation is running on, and can be somewhat inefficient. unless you need to choose a specific (slower) framerate, it is generally better to use requestanimationframe(). browser compatibility desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webvi...
...it live, and see the source code: function fetchanddecode(url, type) { // returning the top level promise, so the result of the entire chain is returned out of the function return fetch(url).then(response => { // depending on what type of file is being fetched, use the relevant function to decode its contents if(type === 'blob') { return response.blob(); } else if(type === '
text') { return response.
text(); } }) .catch(e => { console.log(`there has been a problem with your fetch operation for resource "${url}": ` + e.message); }); } // call the fetchanddecode() method to fetch the images and the
text, and store their promises in variables let coffee = fetchanddecode('coffee.jpg', 'blob'); let tea = fetchanddecode('tea.jpg', 'blob'); let description = ...
... } }) .catch(e => { console.log(`there has been a problem with your fetch operation for resource "${url}": ` + e.message); }); } // call the fetchanddecode() method to fetch the images and the
text, and store their promises in variables let coffee = fetchanddecode('coffee.jpg', 'blob'); let tea = fetchanddecode('tea.jpg', 'blob'); let description = fetchanddecode('description.txt', '
text'); // use promise.all() to run code only when all three function calls have resolved promise.all([coffee, tea, description]).then(values => { console.log(values); // store each value returned from the promises in separate variables; create object urls from the blobs let objecturl1 = url.createobjecturl(values[0]); let objecturl2 = url.createobjecturl(values[1]); let desc
text = values[2...
...And 4 more matches
Build your own function - Learn web development
we want to give to our function go inside the parentheses, and the code that runs when we call the function goes inside the curly braces. finally, add the following code inside the curly braces: const html = document.queryselector('html'); const panel = document.createelement('div'); panel.setattribute('class', 'msgbox'); html.appendchild(panel); const msg = document.createelement('p'); msg.
textcontent = 'this is a message box'; panel.appendchild(msg); const closebtn = document.createelement('button'); closebtn.
textcontent = 'x'; panel.appendchild(closebtn); closebtn.onclick = function() { panel.parentnode.removechild(panel); } this is quite a lot of code to go through, so we'll walk you through it bit by bit. the first line uses a dom api function called document.queryselector(...
... its own — we need to specify where to put it. const panel = document.createelement('div'); panel.setattribute('class', 'msgbox'); html.appendchild(panel); the next two sections make use of the same createelement() and appendchild() functions we've already seen to create two new elements — a <p> and a <button> — and insert them in the page as children of the panel <div>. ...
...t. const panel = document.createelement('div'); panel.setattribute('class', 'msgbox'); html.appendchild(panel); the next two sections make use of the same createelement() and appendchild() functions we've already seen to create two new elements — a <p> and a <button> — and insert them in the page as children of the panel <div>. ...
...And 4 more matches
React interactivity: Events and state - Learn web development
are defining a function whose job is to modify name, called setname(). usestate() returns these two things, so we are using array destructuring to capture them both in separate variables. reading state you can see the name state in action right away. add a value attribute to the form’s input, and set its value to name. your browser will render "use hooks!" inside the input. <input type="
text" id="new-todo-input" classname="input input__lg" name="
text" autocomplete="off" value={name} /> change "use hooks!" to an empty string once you're done; this is what we want for our initial state. const [name, setname] = usestate(''); reading user input before we can change the value of name, we need to capture a user's input as they type. for this, we can listen to the onchange eve...
...e] = usestate(''); reading user input before we can change the value of name, we need to capture a user's input as they type. for this, we can listen to the onchange event. let’s write a handlechange() function, and listen for it on the <input /> tag. // near the top of the `form` component function handlechange(e) { console.log("typing!"); } // down in the return statement <input type="
text" id="new-todo-input" classname="input input__lg" name="
text" autocomplete="off" value={name} onchange={handlechange} /> currently, your input’s value will not change as you type, but your browser will log the word "typing!" to the javascript console, so we know our event listener is attached to the input. in order to change the input’s value, we have to use our handlechange() fun...
... attached to the input. in order to change the input’s value, we have to use our handlechange() function to update our name state. to read the contents of the input field as they change, you can access the input’s value property. we can do this inside handlechange() by reading e.target.value. e.target represents the element that fired the change event — that’s our input. so, value is the
text inside it. you can console.log() this value to see it in your browser’s console. function handlechange(e) { console.log(e.target.value); } updating state logging isn’t enough — we want to actually store the updated state of the name as the input value changes! change the console.log() to setname(), as shown below: function handlechange(e) { setname(e.target.value); } now we need ...
...And 4 more matches
Componentizing our Svelte app - Learn web development
omponent should ideally only do one thing. if it ends up growing, it should be split into smaller subcomponents. both approaches should complement each other, and help you decide how to better organize your components. eventually, we will split up our app into the following components: alert.svelte: a general notification box for communicating actions that have occurred. newtodo.svelte: the
text input and button that allow you to enter a new todo item. filterbutton.svelte: the all, active, and completed buttons that allow you to apply filters to the displayed todo items. todosstatus.svelte: the "x out of y items completed" heading. todo.svelte: an individual todo item. each visible todo item will be displayed in a separate copy of this component. moreactions.svelte: the check all and...
...velte will show the update form; when it's false, it will remove it from the dom and add in the checkbox. thanks to svelte reactivity, assigning the value of the editing variable will be enough to display the correct html elements. the following gives you an idea of what the basic if block structure looks like: <div class="stack-small"> {#if editing} <!-- markup for editing todo: label, input
text, cancel and save button --> {:else} <!-- markup for displaying todo: checkbox, label, edit and delete button --> {/if} </div> the non-editing section — that is, the {:else} part (lower half) of the if block — will be very similar to the one we had in our todos component. the only difference is that we are calling ontoggle(), onedit(), and onremove(), depending on the user action. {:else} ...
...e upper half) will contain an <input> field and two buttons to cancel or save the changes: <div class="stack-small"> {#if editing} <form on:submit|preventdefault={onsave} class="stack-small" on:keydown={e => e.key === 'escape' && oncancel()}> <div class="form-group"> <label for="todo-{todo.id}" class="todo-label">new name for '{todo.name}'</label> <input bind:value={name} type="
text" id="todo-{todo.id}" autocomplete="off" class="todo-
text" /> </div> <div class="btn-group"> <button class="btn todo-cancel" on:click={oncancel} type="button"> cancel<span class="visually-hidden">renaming {todo.name}</span> </button> <button class="btn btn__primary todo-edit" type="submit" disabled={!name}> save<span class="visually-hidden">new name for ...
...And 4 more matches
Adding a new todo form: Vue events, methods, and models - Learn web development
previous overview: client-side javascript frameworks next we now have sample data in place, and a loop that takes each bit of data and renders it inside a todoitem in our app. what we really need next is the ability to allow our users to enter their own todo items into the app, and for that we'll need a
text <input>, an event to fire when the data is submitted, a method to fire upon submission to add the data and rerender the list, and a model to control the data. this is what we'll cover in this article. prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line. vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to th...
...ript> tag like before: <template></template> <script> export default {}; </script> let's add in an html form that lets you enter a new todo item and submit it into the app. we need a <form> with a <label>, an <input>, and a <button>. update your template as follows: <template> <form> <label for="new-todo-input"> what needs to be done? </label> <input type="
text" id="new-todo-input" name="new-todo" autocomplete="off" /> <button type="submit"> add </button> </form> </template> so we now have a form component into which we can enter the title of a new todo item (which will become a label for the corresponding todoitem when it is eventually rendered). let's load this component into our app. go back to app.vue a...
...s: v-model. v-model binds to the data property you set on it and keeps it in sync with the <input>. v-model works across all the various input types, including check boxes, radios, and select inputs. to use v-model, you add an attribute with the structure v-model="variable" to the <input>. so in our case, we would add it to our new-todo-input field as seen below. do this now: <input type="
text" id="new-todo-input" name="new-todo" autocomplete="off" v-model="label" /> note: you can also sync data with <input> values through a combination of events and v-bind attributes. in fact, this is what v-model does behind the scenes. however, the exact event and attribute combination varies depending on input types and will take more code than just using the v-model shortcut. ...
...And 4 more matches
Accessibility/LiveRegionDevGuide
e of the priority criterion. the "purge by timestamp" method will be used to remove old messages that are no longer deemed relevant while "purge by politeness" is used to satisfy the aria live politeness specification. the later method will be explained in detail below. event types the table for web page mutation event types lists the two major event types associated with live regions, namely
text-changed and object changed events. both will be discussed in detail below. object changed the object changed events are slightly different in at-spi and iaccessible2. in at-spi, the object changed event are called object:children-changed events because the event is triggered on the parent of the object. the actual object that change can then be found in the event.any_data field. in iaccessible...
...the event.any_data field. in iaccessible2, the event_object_* events are triggered on the actual object that changed. the object changed events can be further subdivided into object addition and removal events. in at-spi, this is accomplished by appending ":add" or ":remove" to the event string. in iaccessible2, there are two separate event types, namely event_object_show and event_object_hide.
text changed the
text changed events are quite similar in at-spi and iaccessible2 with both having an insert and delete or removal events. the
text changed event type in at-spi has a similar scheme as the object:children-changed events. in this case, the root event string is object:
text-changed with ":delete" and ":insert" being appended to complete the event type. in iaccessible2, there are two dist...
...ents are quite similar in at-spi and iaccessible2 with both having an insert and delete or removal events. the
text changed event type in at-spi has a similar scheme as the object:children-changed events. in this case, the root event string is object:
text-changed with ":delete" and ":insert" being appended to complete the event type. in iaccessible2, there are two distinct event types - ia2_event_
text_removed and ia2_event_
text_inserted. the
text associated with an at-spi
text changed event is directly in the event object. the event.any_data field holds the entire
text string while event.detail1 is the start index while event.detail2 is the
text string length. in iaccessible2, iaccessible
text::get_old
text and iaccessible
text::get_new
text are used to acquire the
text and offsets. filtering ev...
...And 4 more matches
Accessibility information for UI designers and developers
ces with accessibility in mind, they will work for more people. this page describes a number of design-related aspects to look out for, in no particular order. color enough contrast ensure there is enough contrast between foreground and background colors. your content can then be better consumed by users with low vision and people with color deficiencies. ...
...in mind, they will work for more people. this page describes a number of design-related aspects to look out for, in no particular order. color enough contrast ensure there is enough contrast between foreground and background colors. your content can then be better consumed by users with low vision and people with color deficiencies. the ratio should be 4.5:1 for regular
text and 3:1 for large
text. calculating this ratio is easiest done with a tool, for example lea verou's contrast ratio. there are also plug-ins available for design software, like stark for sketch. don't rely on color alone when your interface uses color to distinguish between things, make sure the distinction is also made in other ways. for example, add
text labels or
texture in addition to color differences. for exam...
...t it, users that can't or don't use a mouse cannot see where they are. it would be like removing the mouse indicator. see also: understanding sc 2.4.7: focus visible be ready for resizing and custom styles on the web, users can use tools in their browser to make font sizes larger, or even provide custom css to meet their specific needs. ensure your design is flexible enough to allow for this. ...
...And 4 more matches
Experimental features in Firefox
? nightly 80 no developer edition 80 no beta 80 no release 80 no preference name layout.css.prefers-contrast.enabled apis graphics: canvas, webgl, and webgpu interface: offscreencanvas the offscreencanvas interface provides a canvas that can be rendered offscreen. it is available in both the window and worker con
texts. see bug 1390089 for more details. release channel version added enabled by default? nightly 44 no developer edition 44 no beta 44 no release 44 no preference name gfx.offscreencanvas.enabled hit regions whether the mouse coordinates are within a particular area on the canvas is a common problem t...
...mat media. this feature is available in nightly builds effective in firefox for android 81 or later. it is enabled by default. release channel version added enabled by default? nightly 81 yes developer edition — — beta — — release — — preference name — security and privacy block plain
text requests from flash on encrypted pages in order to help mitigate man-in-the-middle (mitm) attacks caused by flash content on encrypted pages, a preference has been added to treat object_subrequests as active content. see bug 1190623 for more details. release channel version added enabled by default? nightly 59 no developer edition 59 no ...
...quests as active content. see bug 1190623 for more details. release channel version added enabled by default? nightly 59 no developer edition 59 no beta 59 no release 59 no preference name security.mixed_content.block_object_subrequest insecure page labeling these two preferences add a "not secure"
text label in the address bar next to the traditional lock icon when a page is loaded insecurely (that is, using http rather than https). see bug 1335970 for more details. release channel version added enabled by default? nightly 60 no developer edition 60 no beta 60 no release 60 no preference name security.in...
...And 4 more matches
Storage access policy: Block cookies from trackers
ample.com a.b.example.com yes blah.example.com example.com no a.b.example.com c.d.example.com no blah.example.com foo.blah.example.com yes what does the storage access policy block? the storage access policy blocks resources identified as trackers from accessing their cookies and other site storage when they are loaded in a third-party con
text. this prevents those resources from retrieving tracking identifiers stored in cookies or site storage and using them to identify users across visits to multiple first parties. specifically, firefox does this by imposing the following restrictions: cookies: block cookie request headers and ignore set-cookie response headers. return an empty string for calls to document.cookie and ignore reque...
...s not blocked by the policy? this policy does not currently restrict third-party storage access for resources that are not classified as tracking resources. we may choose to apply additional restrictions to third-party storage access in the future. the restrictions applied by the policy will not prevent third-party scripts classified as tracking resources from accessing storage in the main con
text of the page. these scripts can continue to use storage scoped to the top-level origin. origins classified as trackers will have access to their own storage when they are loaded in a first-party con
text. cross-origin resources loaded from the same etld+1 as the top-level con
text will still have access to their storage. origins normally classified as trackers will not be blocked if the top-level...
..., if tracker.example were granted access on example.com it would be able to access its storage on bar.foo.example.com, foo.example.com, and example.com. when storage access is granted to tracker.example on example.com, all resources loaded from tracker.example on any top-level document loaded from example.com are immediately given storage access. this includes all resources loaded in the main con
text of the page, embedded <iframe>s, and resources loaded within embedded <iframe>s. storage access is not extended to other resources loaded on example.com (e.g. other-tracker.example), nor to other first parties on which tracker.example is embedded (e.g. example.org). storage access grants extend into the first level of nested con
texts, but no further. this means that <iframe>s embedded in the mai...
...And 4 more matches
GC Rooting Guide
he stack js::rooted<t> all gc thing pointers stored on the stack (i.e., local variables and parameters to functions) must use the js::rooted<t> class. this is a template class where the template parameter is the type of the gc thing it contains. from the user perspective, a js::rooted<t> instance behaves exactly as if it were the underlying pointer. js::rooted must be constructed with a jscon
text*, and optionally an initial value. there are typedefs available for the main types. within spidermonkey, it is suggested that these are used in preference to the template class (gecko uses the template versions): template class typedef js::rooted<js::value> js::rootedvalue js::rooted<jsobject*> js::rootedobject js::rooted<jsstring*> js::rooted...
...levalue js::handle<jsobject*> js::handleobject js::handle<jsstring*> js::handlestring js::handle<jsscript*> js::handlescript js::handle<jsid> js::handleid you should use js::handle<t> for all function parameters taking gc thing pointers (except out-parameters, which are described below). for example, instead of: jsobject * somefunction(jscon
text *cx, jsobject* obj) { // ... } you should write: jsobject * somefunction(jscon
text *cx, js::handleobject obj) { // ... } js::mutablehandle<t> all gc thing pointers that are used as out-parameters must be wrapped in a js::mutablehandle<t>. a js::mutablehandle<t> is a reference to a js::rooted<t> that, unlike a normal handle, may modify the underlying js::rooted<t>. all js::mutablehan...
... if (!waserror) valueout.set(resultvalue); return wa...
...And 4 more matches
JS::Compile
this article covers features introduced in spidermonkey 17 compile a script for execution. ...
... this article covers features introduced in spidermonkey 17 compile a script for execution. ...
...ution. ...
...And 4 more matches
JS::CompileOptions
this article covers features introduced in spidermonkey 17 compile options classes. constructor js::readonlycompileoptions(); // added in spidermonkey 31 js::owningcompileoptions(jscon
text *cx); // added in spidermonkey 31 js::compileoptions(jscon
text *cx, jsversion version = jsversion_unknown); name type description cx jscon
text * pointer to a js con
text from which to derive runtime information. requires request. in a js_threadsafe build, the caller must be in a request on this jscon
text. version jsversion javascript version used to compile the script. methods some methods of js::owningcompileoptions and js::compileoptions return the instance itself to allow method chain. methods of js::readonlycompileoptions ...
...() const returns the url of the source map. methods of js::owningcompileoptions method description jsobject *element() const returns the dom element to which this source code belongs, if any, or null if it belongs to no dom element. source belongs to a dom element in the following cases: source belongs to a <script> element if it is the element's
text content (that is, it is written out as the body of the <script> element in the markup
text), or is the source document referenced by its src attribute. source belongs to a dom element if it is an event handler content attribute (that is, if it is written out in the markup
text as an attribute value). source belongs to a dom element if it was assigned to one of the element's event handle...
...re.) jsstring *elementattributename() const if this source belongs to a dom element because it is an event handler content attribute or an event handler idl attribute, this returns the name of that attribute, a string. otherwise, this returns null. jsscript *introductionscript() const returns a pointer to jsscript which introduces the file. ...
...And 4 more matches
JS::Evaluate
this article covers features introduced in spidermonkey 17 compile and execute a script. ...
... this article covers features introduced in spidermonkey 17 compile and execute a script. ...
.... ...
...And 4 more matches
JS_CompileScript
compiles a script for execution. ...
... compiles a script for execution. ...
... const char *ascii, size_t length, const js::compileoptions &options, js::mutablehandlescript script); bool js_compileucscript(jscon
text *cx, const char16_t *chars, size_t length, const js::compileoptions &options, js::mutablehandlescript script); // obsolete since jsapi 39 bool js_compilescript(jscon
text *cx, js::handleobject obj, const char *ascii, size_t length, const js::compileoptions &options, js::mutablehandlescript script); bool js_compileucscript(jscon
text *cx, js::handleobject obj, const char16_t *chars, size_t length, const js::compileoptions &options, js::mutablehandlescript scr...
...And 4 more matches
JS_CompileScriptForPrincipals
obsolete since jsapi 28this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. compile a security-enabled script for execution. ...
... work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. compile a security-enabled script for execution. ...
...scriptforprincipals(jscon
text *cx, jsobject *obj, jsprincipals *principals, const char *src, size_t length, const char *filename, unsigned int lineno); jsscript * js_compileucscriptforprincipals(jscon
text *cx, jsobject *obj, jsprincipals *principals, const jschar *src, size_t length, const char *filename, unsigned int lineno); jsobject * js_compilescriptforprincipalsversion(jscon
text *cx, jsobject *obj, jsprincipals *principals, const char *src, size_t length, const char *filename, unsigned int lineno, jsversion version); // obsoleted since jsapi 19 jsobject * js_compileucscriptforprincipalsversion(jscon
text *cx, jsobject *obj, jsprincipals *principals, const jschar *src, size_t length, const char *filename, unsigned int lineno, jsversion version); // obsolet...
...And 4 more matches
Compositing example - Web APIs
everything else is made transparent.', 'the new shape is drawn where it doesn\'t overlap the existing canvas content.', 'the new shape is only drawn where it overlaps the existing canvas content.', 'new shapes are ...
...d = "url("+op_8x8.data+")"; canvas.style.border = "1px solid #000"; canvas.style.margin = "5px"; canvas.width = width/2; canvas.height = height/2; return canvas; } function runcomposite() { var dl = document.createelement("dl"); document.body.appendchild(dl); while(gco.length) { var pop = gco.pop(); var dt = document.createelement("dt"); dt.
textcontent = pop; dl.appendchild(dt); var dd = document.createelement("dd"); var p = document.createelement("p"); p.
textcontent = gco
text.pop(); dd.appendchild(p); var canvastodrawon = createcanvas(); var canvastodrawfrom = createcanvas(); var canvastodrawresult = createcanvas(); var ctx = canvastodrawresult.getcon
text('2d'); ...
...tx.save(); ctx.drawimage(canvas1, 0, 0, width/2, height/2); ctx.globalcompositeoperation = pop; ctx.drawimage(canvas2, 0, 0, width/2, height/2); ctx.globalcompositeoperation = "source-over"; ctx.fillstyle = "rgba(0,0,0,0.8)"; ctx.fillrect(0, height/2 - 20, width/2, 20); ctx.fillstyle = "#fff"; ctx.font = "14px arial"; ctx.fill
text(pop, 5, height/2 - 5); ctx.restore(); var ctx = canvastodrawon.getcon
text('2d'); ctx.clearrect(0, 0, width, height) ctx.save(); ctx.drawimage(canvas1, 0, 0, width/2, height/2); ctx.fillstyle = "rgba(0,0,0,0.8)"; ctx.fillrect(0, height/2 - 20, width/2, 20); ctx.fillstyle = "#fff"; ctx.font = "14px arial"; ctx.fill
text...
...And 4 more matches
Transformations - Web APIs
rent drawing state is pushed onto the stack. a drawing state consists of the transformations that have been applied (i.e. translate, rotate and scale – see below). the current values of the following attributes: strokestyle, fillstyle, globalalpha, linewidth, linecap, linejoin, miterlimit, linedashoffset, shadowoffsetx, shadowoffsety, shadowblur, shadowcolor, globalcompositeoperation, font,
textalign,
textbaseline, direction, imagesmoothingenabled. the current clipping path, which we'll see in the next section. you can call the save() method as many times as you like. each time the restore() method is called, the last saved state is popped off the stack and all saved settings are restored. a save and restore canvas state example this example tries to illustrate how the stack of draw...
...he save() method as many times as you like. each time the restore() method is called, the last saved state is popped off the stack and all saved settings are restored. a save and restore canvas state example this example tries to illustrate how the stack of drawing states functions by drawing a set of consecutive rectangles. ...
... the draw() function, we call the fillrect() function nine times using two for loops. in each loop, the canvas is translated, the rectangle is drawn, and the canvas is returned back to its original state. note how the call to fillrect() uses the same coordinates each time, relying on translate() to adjust the drawing position. ...
...And 4 more matches
Using channel messaging - Web APIs
in this article we'll explore the basics of using this technology. note: this feature is available in web workers. use cases channel messaging is mainly useful in cases where you've got a social site that embeds capabilities from other sites into its main interface via iframes, such as games, address book, or an audio player with personalized music choices. ...
...r add new background music choices from the audio player onto the game? such things are not so easy using conventional web technology, because of the security models the web uses. you have to think about whether the origins trust one another, and how the messages are passed. message channels on the other hand can provide a secure channel that allows you to pass data between different browsing con
texts. note: for more information and ideas, the ports as the basis of an object-capability model on the web section of the spec is a useful read. simple examples to get your started, we have published a couple of demos on github. first up, check out our channel messaging basic demo (run it live too), which shows a really simple single message transfer between a page and an embedded <iframe>. s...
...gle message transfer between a page and an embedded <iframe>. secondly, have a look at our multimessaging demo (run this live), which shows a slightly more complex setup that can send multiple messages between the main page and an iframe. we'll be focusing on the latter example in this article. it looks like so: creating the channel in the main page of the demo, we have a simple form with a
text input for entering messages to be sent to an <iframe>. we also have a paragraph which we will use later on to display confirmation messages that we will receive back from the <iframe>. var input = document.getelementbyid('message-input'); var output = document.getelementbyid('message-output'); var button = document.queryselector('button'); var iframe = document.queryselector('iframe'); var chan...
...And 4 more matches
CharacterData - Web APIs
the characterdata abstract interface represents a node object that contains characters. this is an abstract interface, meaning there aren't any object of type characterdata: it is implemented by other interfaces, like
text, comment, or processinginstruction which aren't abstract. ...
...lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/characterdata" target="_top"><rect x="266" y="1" width="130" heigh...
...And 4 more matches
Document.evaluate() - Web APIs
namespaceresolver is a function that will be passed any namespace prefixes and should return a string representing the namespace uri associated with that prefix. ...
... namespaceresolver is a function that will be passed any namespace prefixes and should return a string representing the namespace uri associated with that prefix. ...
... namespaceresolver is a function that will be passed any namespace prefixes and should return a string representing the namespace uri associated with that prefix. ...
...And 4 more matches
Document Object Model (DOM) - Web APIs
to achieve this, the following interfaces present in the different dom level 3 or earlier specifications have been removed. it is uncertain whether some may be reintroduced in the future or not, but for the time being they shou...
...to achieve this, the following interfaces present in the different dom level 3 or earlier specifications have been removed. it is uncertain whether some may be reintroduced in the future or not, but for the time being they should be ...
...to achieve this, the following interfaces present in the different dom level 3 or earlier specifications have been removed. it is uncertain whether some may be reintroduced in the future or not, but for the time being they should be considered obso...
...And 4 more matches
Event.preventDefault() - Web APIs
<code>preventdefault()</code> won't let you check this!<br>"; event.preventdefault(); }, false); html <p>please click on the checkbox control.</p> <form> <label for="id-checkbox">checkbox:</label> <input type="checkbox" id="id-checkbox"/> </form> <div id="output-box"></div> result stopping keystrokes from reaching an edit field the following example demonstrates how invalid
text input can be stopped from reaching the input field with preventdefault(). nowadays, you should usually use native html form validation instead. html here's the form: <div class="container"> <p>please enter your name using lowercase letters only.</p> <form> <input type="
text" id="my-
textbox"> </form> </div> css we use a little bit of css for the warning box we'll draw when the user...
...="
text" id="my-
textbox"> </form> </div> css we use a little bit of css for the warning box we'll draw when the user presses an invalid key: .warning { border: 2px solid #f39389; border-radius: 2px; padding: 10px; position: absolute; background-color: #fbd8d4; color: #3b3c40; } javascript and here's the javascript code that does the job. ...
...iv> css we use a little bit of css for the warning box we'll draw when the user presses an invalid key: .warning { border: 2px solid #f39389; border-radius: 2px; padding: 10px; position: absolute; background-color: #fbd8d4; color: #3b3c40; } javascript and here's the javascript code that does the job. ...
...And 4 more matches
HTMLBaseElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLButtonElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLDListElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLDataElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLDivElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLDocument - Web APIs
lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/document" target="_top"><rect x="266" y="1" width="80" height="50"...
...solas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/document" target="_top"><rect x="266" y="1" width="80" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="306" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">document</
text></a><polyline points="346,25 356,20 356,30 346,25" stroke="#d4dde4" fill="none"/><line x1="356" y1="25" x2="386" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmldocument" target="_top"><rect x="386" y="1" width="120" heig...
...And 4 more matches
HTMLEmbedElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLFieldSetElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLHRElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLHeadElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLHeadingElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLHtmlElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLImageElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLLIElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLLabelElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLLegendElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLLinkElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLMapElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLMediaElement.onencrypted - Web APIs
block; position: relative; width: 100%; padding-bottom: 8.571428571428571%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLMediaElement.onwaitingforkey - Web APIs
block; position: relative; width: 100%; padding-bottom: 8.571428571428571%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLMetaElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLMeterElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLModElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLOListElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLOptGroupElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLParagraphElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLParamElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLPictureElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLProgressElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLQuoteElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLShadowElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLSourceElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLSpanElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLStyleElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLTableCaptionElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLTableColElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLTableRowElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLTableSectionElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLTemplateElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLTimeElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLUListElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTMLUnknownElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 4 more matches
HTML Drag and Drop API - Web APIs
element, drags the element to a droppable element, and then releases the dragged element. during drag operations, several event types are fired, and some events might fire many times, such as the drag and dragover events. each drag event type has an associated global event handler: event on event handler fires when… drag ondrag …a dragged item (element or
text selection) is dragged. dragend ondragend …a drag operation ends (such as releasing a mouse button or hitting the esc key; see finishing a drag.) dragenter ondragenter …a dragged item enters a valid drop target. (see specifying drop targets.) dragexit ondragexit …an element is no longer the drag operation's immediate selection target. dra...
...s a summary of the basic steps to add drag-and-drop functionality to an application. ...
....addeventlistener("dragstart", dragstart_handler); }); </script> <p id="p1" draggable="true">this element is draggable.</p> for more information, see: draggable attribute reference drag operations guide define the drag's data the application is free to include any number of data items in a drag operation. ...
...And 4 more matches
MediaDevices.getUserMedia() - Web APIs
s failure handler. possible errors are: aborterror although the user and operating system both granted access to the hardware device, and no hardware issues occurred that would cause a notreadableerror, some problem occurred which prevented the device from being used. notallowederror one or more of the requested source devices cannot be used at this time. this will happen if the browsing con
text is insecure (that is, the page was loaded using http rather than https). it also happens if the user has specified that the current browsing instance is not permitted access to the device, the user has denied access for the current session, or the user has denied all access to user media devices globally. on browsers that support managing media permissions with feature policy, this error is retur...
...a fingerprinting surface. securityerror user media support is disabled on the document on which getusermedia() was called. the mechanism by which user media support is enabled and disabled is left up to the individual user agent. typeerror the list of constraints specified is empty, or has all constraints set to false. ...
...disabled on the document on which getusermedia() was called. the mechanism by which user media support is enabled and disabled is left up to the individual user agent. typeerror the list of constraints specified is empty, or has all constraints set to false. this can also happen if you try to call getusermedia() in an insecure con
text, since navigator.mediadevices is undefined in an insecure con
text. privacy and security as an api that may involve significant privacy concerns, getusermedia()'s specification lays out a wide array of privacy and security requirements that browsers are obligated to meet. getusermedia() is a powerful feature which can only be used in secure con
texts; in insecure con
texts, navigator.mediadevices is undefined, preventing access to getusermedia(). a secure cont...
...And 4 more matches
PaymentRequest - Web APIs
the payment request api's paymentrequest interface the primary access point into the api, and lets web content and apps accept payments from the end user on behalf of the operator of the site or the publisher of the app. constructor paymentrequest() secure con
text creates a new paymentrequest object. properties paymentrequest.id read only secure con
text an unique identifier for a particular paymentrequest, which can be set via details.id. when none is set, it defaults to a uuid. paymentrequest.shippingaddress read only secure con
text if requested via payment options, returns the shipping address chosen by the user for the purposes of calculating shipping. this property is only populated if the constructor is called with the requestshipping flag set to true. additionall...
...ress chosen by the user for the purposes of calculating shipping. this property is only populated if the constructor is called with the requestshipping flag set to true. additionally, in some browsers, the parts of the address will be redacted for privacy until the user indicates they are ready to complete the transaction (i.e., they hit "pay"). paymentrequest.shippingoption read only secure con
text returns the identifier of the selected shipping option. this property is only populated if the constructor is called with the requestshipping flag set to true. paymentrequest.shippingtype read only secure con
text returns the type of shipping used to fulfill the transaction. this will be one of shipping, delivery, pickup, or null if a value was not provided in the constructor. methods ...
...hipping option. this property is only populated if the constructor is called with the requestshipping flag set to true. paymentrequest.shippingtype read only secure con
text returns the type of shipping used to fulfill the transaction. this will be one of shipping, delivery, pickup, or null if a value was not provided in the constructor. methods paymentrequest.canmakepayment() secure con
text indicates whether the paymentrequest object can make a payment before calling show(). paymentrequest.show() secure con
text causes the user agent to begin the user interaction for the payment request. ...
...And 4 more matches
PaymentResponse - Web APIs
the paymentresponse interface of the payment request api is returned after a user selects a payment method and approves a payment request. properties paymentresponse.details read only secure con
text returns a json-serializable object that provides a payment method specific message used by the merchant to process the transaction and determine successful fund transfer. the contents of the object depend on the payment method being used; for example, if the basic card payment method is used, this object must conform to the structure defined in the basiccardresponse dictionary. paymentresponse.methodname read only secure con
text returns the payment method identifier for the payment method that the user selected, for example, visa, mastercard, paypal, etc.. paymentresponse.payeremail r...
...ent method being used; for example, if the basic card payment method is used, this object must conform to the structure defined in the basiccardresponse dictionary. paymentresponse.methodname read only secure con
text returns the payment method identifier for the payment method that the user selected, for example, visa, mastercard, paypal, etc.. paymentresponse.payeremail read only secure con
text returns the email address supplied by the user. this option is only present when the requestpayeremail option is set to true in the options parameter of the paymentrequest() constructor. paymentresponse.payername read only secure con
text returns the name supplied by the user. this option is only present when the requestpayername option is set to true in the options parameter of the paymentreq...
... present when the requestpayeremail option is set to true in the options parameter of the paymentrequest() constructor. paymentresponse.payername read only secure con
text returns the name supplied by the user. this option is only present when the requestpayername option is set to true in the options parameter of the paymentrequest() constructor. paymentresponse.payerphone read only secure con
text returns the phone number supplied by the user. this option is only present when the requestpayerphone option is set to true in the options parameter of the paymentrequest() constructor. paymentresponse.requestid read only secure con
text returns the identifier of the paymentrequest that produced the current response. this is the same value supplied in the paymentrequest() constructor by detail...
...And 4 more matches
SVGAnimationElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGCircleElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 700 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGClipPathElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGDescElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGEllipseElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGFEDistantLightElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGFEMergeNodeElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGFEPointLightElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGFESpotLightElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGGraphicsElement: paste event - Web APIs
the paste event is fired on an svggraphicselement when the user has initiated a "paste" action through the browser's user interface. bubbles yes cancelable yes interface clipboardevent event handler property onpaste if the cursor is in an editable con
text (for example, in a <
textarea> or an element with contenteditable attribute set to true) then the default action is to insert the contents of the clipboard into the document at the cursor position. a handler for this event can access the clipboard contents by calling getdata() on the event's clipboarddata property. to override the default behavior (for example to insert some different data or a transformation of the clipboard contents) an event handler must cancel the default action us...
... data manually. it's possible to construct and dispatch a synthetic paste event, but this will not affect the document's contents. ...
...construct and dispatch a synthetic paste event, but this will not affect the document's contents. ...
...And 4 more matches
SVGLineElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGMaskElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGPathElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGPolygonElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGPolylineElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGSVGElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
SVGStopElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 4 more matches
Using Service Workers - Web APIs
the premise of service workers one overriding problem that web users have suffered with for years is loss of connectivity. ...
... local development, localhost is considered a secure origin by browsers as well. basic architecture with service workers, the following steps are generally observed for basic set up: the service worker url is fetched and registered via serviceworkercontainer.register(). if successful, the service worker is executed in a serviceworkerglobalscope; this is basically a special kind of worker con
text, running off the main script execution thread, with no dom access. the service worker is now ready to process events. installation of the worker is attempted when service worker-controlled pages are accessed subsequently. an install event is always the first one sent to a service worker (this can be used to start the process of populating an indexeddb, and caching site assets). this is really t...
...understanding promises. const imgload = (url) => { return new promise((resolve, reject) => { var request = new xmlhttprequest(); request.open('get', url); request.responsetype = 'blob'; request.onload = () => { if (request.status == 200) { resolve(request.response); } else { reject(error('image didn\'t load successfully; error code:' + request.status
text)); } }; request.onerror = () => { reject(error('there was a network error.')); }; request.send(); }); } we return a new promise using the promise() constructor, which takes as an argument a callback function with resolve and reject parameters. somewhere in the function, we need to define what happens for the promise to resolve successfully or be rejected — in th...
...And 4 more matches
Service Worker API - Web APIs
path. it takes the form of a javascript file that can control the web-page/site that it is associated with, intercepting and modifying navigation and resource requests, and caching resources in a very granular fashion to give you complete control over how your app behaves in certain situations (the most obvious one being when the network is not available). a service worker is run in a worker con
text: it therefore has no dom access, and runs on a different thread to the main javascript that powers your app, so it is non-blocking. it is designed to be fully async; as a consequence, apis such as synchronous xhr and localstorage can't be used inside a service worker. service workers only run over https, for security reasons. having modified network requests, wide open to man in the middle attac...
...hancements, for example pre-fetching resources that the user is likely to need in the near future, such as the next few pictures in a photo album. in the future, service workers will be able to do a number of other useful things for the web platform that will bring it closer towards native app viability. interestingly, other specifications can and will start to make use of the service worker con
text, for example: background synchronization: start up a service worker even when no users are at the site, so caches can be updated, etc. reacting to push messages: start up a service worker to send users a message to tell them new content is available. reacting to a particular time & date. entering a geo-fence. interfaces cache represents the storage for request / response object pair...
...rs that are cached as part of the serviceworker life cycle. cachestorage represents the storage for cache objects. it provides a master directory of all the named caches that a serviceworker can access, and maintains a mapping of string names to corresponding cache objects. client represents the scope of a service worker client. a service worker client is either a document in a browser con
text or a sharedworker, which is controlled by an active worker. clients represents a container for a list of client objects; the main way to access the active service worker clients at the current origin. extendableevent extends the lifetime of the install and activate events dispatched on the serviceworkerglobalscope, as part of the service worker lifecycle. this ensures that any functional ...
...And 4 more matches
Clearing by clicking - Web APIs
every time the user clicks the canvas or the button, the canvas is cleared with a new randomly chosen color. note how we embed the webgl function calls inside the event handler function. ...
...every time the user clicks the canvas or the button, the canvas is cleared with a new randomly chosen color. note how we embed the webgl function calls inside the event handler function. ...
...gl function calls inside the event handler function. <p>a very simple webgl program that still shows some color and user interaction.</p> <p>you can repeatedly click the empty canvas or the button below to change color.</p> <canvas id="canvas-view">your browser does not seem to support html5 canvas.</canvas> <button id="color-switcher">press here to switch color</button> body {
text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : inline-block; font-size : inherit; margin : auto; padding : 0.6em; } window.addeventlistener("load", function setupwebgl (evt) { "use strict" // cleaning after ourselves. the event handler removes // its...
...And 4 more matches
Starting up and shutting down a WebXR session - Web APIs
d on march 26, 2020. it introduced support for augmented reality (ar) through the webxr ar module, which has is approaching a stable state. documentation for ar is forthcoming shortly here on mdn. other improvements include updating the emulator to rename the xr interface to xrsystem, introduce support for squeeze (grip) input sources, and add support for the xrinputsource property profiles. con
text requirements a webxr compatible environment starts with a securely-loaded document. your document needs to either have been loaded from the local drive (such as by using an url such as http://localhost/...), or using https when loading the page. the javascript code must, likewise, have been loaded securely. if the document wasn't loaded securely, you won't get very far. the navigator.xr propert...
...tual reality session using a headset or similar device that fully replaces the world around the user with the images you present. immersive-ar an augmented reality session in which images are added to the real world using a headset or similar apparatus. this option is not yet widely supported, as the ar specification is in flux. inline an on-screen presentation of the xr imagery within the con
text of the document window. if the session couldn't be created for some reason—such as feature policy disallowing its use or the user declining to grant permission to use the headset—the promise gets rejected. so a more complete function that starts up and returns a webxr session could look like this: async function createimmersivesession(xr) { try { session = await xr.requestsession("im...
...es the end at a minimum, so you can detect when the session is over. if you use xr input controllers, watch the inputsourceschange event to detect the addition or removal of xr input controllers, and the various select and squeeze action events. you may want to watch for the xrsystem event devicechange so you can be advised when the set of available immersive devices changes. obtain a webgl con
text for the canvas into which you intend to render your frames by calling the htmlcanvaselement method getcon
text() on the target con
text. set up your webgl data and models and prepare to render the scene. set the webgl con
text as the source for the xr system by creating an xrwebgllayer and passing set the value of the session's renderstate property baselayer. perform calculations for the initial ...
...And 4 more matches
Example and tutorial: Simple synth keyboard - Web APIs
this article presents the code and working demo of a video keyboard you can play using the mouse. the keyboard allows you to switch among the standard waveforms as well as one custom waveform, and you can control the master gain using a volume slider beneath the keyboard. this example makes use of the following web api interfaces: audiocon
text, oscillatornode, periodicwave, and gainnode. because oscillatornode is based on audioscheduledsourcenode, this is to some extent an example for that as well. the video keyboard html there are three primary components to the display for our virtual keyboard. the first is the musical keyboard itself. we draw this in a pair of nested <div> elements so that we can make the keyboard horizontally scrollable if all the keys don't fit on the screen, without...
...> </select> </div> </div> css .container { overflow-x: scroll; overflow-y: hidden; width: 660px; height: 110px; white-space: nowrap; margin: 10px; } .keyboard { width: auto; padding: 0; margin: 0; } .key { cursor: pointer; font: 16px "open sans", "lucida grande", "arial", sans-serif; border: 1px solid black; border-radius: 5px; width: 20px; height: 80px;
text-align: center; box-shadow: 2px 2px darkgray; display: inline-block; position: relative; margin-right: 3px; user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; } .key div { position: absolute; bottom: 0;
text-align: center; width: 100%; pointer-events: none; } .key div sub { font-size: 10px; pointer-events: none; } .key:hove...
...0; display: table-cell; vertical-align: middle; } .left span, .left input { vertical-align: middle; } .right { width: 50%; position: absolute; right: 0; display: table-cell; vertical-align: middle; } .right span { vertical-align: middle; } .right input { vertical-align: baseline; } javascript the javascript code begins by initializing a number of variables. let audiocon
text = new (window.audiocon
text || window.webkitaudiocon
text)(); let osclist = []; let mastergainnode = null; audiocon
text is set to reference the global audiocon
text object (or webkitaudiocon
text if necessary). osclist is set up to be ready to contain a list of all currently-playing oscillators. it starts off empty, since there are none playing yet. mastergainnode is set to null; during the set...
...And 4 more matches
XMLDocument - Web APIs
lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/document" target="_top"><rect x="266" y="1" width="80" height="50"...
...solas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/document" target="_top"><rect x="266" y="1" width="80" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="306" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">document</
text></a><polyline points="346,25 356,20 356,30 346,25" stroke="#d4dde4" fill="none"/><line x1="356" y1="25" x2="386" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/xmldocument" target="_top"><rect x="386" y="1" width="110" heigh...
...And 4 more matches
Sending and Receiving Binary Data - Web APIs
the response property will contain the entity body according to responsetype, as an arraybuffer, blob, document, json, or string. this is null if the request is not complete or was not successful. ...
...image as a binary file and creates an 8-bit unsigned integer array from the raw bytes. note that this will not decode the image and read the pixels. you will need a png decoding library for that. var oreq = new xmlhttprequest(); oreq.open("get", "/myfile.png", true); oreq.responsetype = "arraybuffer"; oreq.onload = function (oevent) { var arraybuffer = oreq.response; // note: not oreq.response
text if (arraybuffer) { var bytearray = new uint8array(arraybuffer); for (var i = 0; i < bytearray.bytelength; i++) { // do something with each byte in the array } } }; oreq.send(null); you can also read a binary file as a blob by setting the string "blob" to the responsetype property. var oreq = new xmlhttprequest(); oreq.open("get", "/myfile.png", true); oreq.responsety...
...esponse; // ... }; oreq.send(); receiving binary data in older browsers the load_binary_resource() function shown below loads binary data from the specified url, returning it to the caller. function load_binary_resource(url) { var req = new xmlhttprequest(); req.open('get', url, false); //xhr binary charset opt by marcus granado 2006 [http://mgran.blogspot.com] req.overridemimetype('
text\/plain; charset=x-user-defined'); req.send(null); if (req.status != 200) return ''; return req.response
text; } the magic happens in line 5, which overrides the mime type, forcing the browser to treat it as plain
text, using a user-defined character set. this tells the browser not to parse it, and to let the bytes pass through unprocessed. var filestream = load_binary_resource(url); var a...
...And 4 more matches
XMLHttpRequest - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.076923076923077%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 650 150" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/xmlhttprequesteventtarget" target="_top"><rect x="151" y="1" w...
...monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/xmlhttprequesteventtarget" target="_top"><rect x="151" y="1" width="250" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="276" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">xmlhttprequesteventtarget</
text></a><polyline points="401,25 411,20 411,30 401,25" stroke="#d4dde4" fill="none"/><line x1="411" y1="25" x2="441" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/xmlhttprequest" target="_top"><rect x="441" y="...
...ace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">xmlhttprequesteventtarget</
text></a><polyline points="401,25 411,20 411,30 401,25" stroke="#d4dde4" fill="none"/><line x1="411" y1="25" x2="441" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/xmlhttprequest" target="_top"><rect x="441" y="1" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="511" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">xmlhttprequest</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} despite its name, xmlhttprequest can be used to retrieve any type of data, not just xml. if your communication needs to involve receiving event data ...
...And 4 more matches
XRWebGLLayer() - Web APIs
the webxr device api xrwebgllayer() constructor creates and returns a new xrwebgllayer object, providing the linkage between the webxr device and the webgl graphics layer used to render the 3d scene. syntax let gllayer = new xrwebgllayer(session, con
text, layerinit); parameters session an xrsession object specifying the webxr session which will be rendered using the webgl con
text. con
text a webglrenderingcon
text or webgl2renderingcon
text identifying the webgl drawing con
text to use for rendering the scene for the specified webxr session. layerinit optional an object conforming to the xrwebgllayerinit dictionary, providing configuration options for the new xrwebgllayer. the options available are: alpha optional the frame buffer's color buffer will be established with an alph...
...onfiguration options for the new xrwebgllayer. the options available are: alpha optional the frame buffer's color buffer will be established with an alpha channel if the alpha boolean property is true. otherwise, the color buffer will not have an alpha channel. the default value is true. antialias optional a boolean value which is true if anti-aliasing is to be used when rendering in the con
text; otherwise false. the browser selects the anti-aliasing method to use; there is no support for requesting a specific mode yet. the default value is true. depth optional a boolean value which, if true, requests that the new layer have a depth buffer; otherwise, no depth layer is allocated. the default is true. framebufferscalefactor optional a floating-point value which is used to scale the i...
... value which indicates whether or not to ignore the contents of the depth buffer while compositing the scene. the default is false. stencil optional a boolean value which, if true, requests that the new layer include a stencil buffer. otherwise, no stencil buffer is allocated. the default is false. ...
...And 4 more matches
ARIA live regions - Accessibility
and the second-smallest planet in the solar system after mercury. ...
...y. ...
...ferred to as the "red planet".' } }; function renderplanetinfo(planet) { const planettitle = document.queryselector('#planettitle'); const planetdescription = document.queryselector('#planetdescription'); if (planet in planets_info) { planettitle.
textcontent = planets_info[planet].title; planetdescription.
textcontent = planets_info[planet].description; } else { planettitle.
textcontent = 'no planet selected'; planetdescription.
textcontent = 'select a planet to view its description'; } } const renderplanetinfobutton = document.queryselector('#renderplanetinfobutton'); renderplanetinfobutton.addeventlistener('click', event => { const planetsselect = document.queryselector('#planetsselect'); const selectedplanet = planetsselect.options[planetsselect.selectedinde...
...And 4 more matches
Using the alert role - Accessibility
ssible alert event using the operating system's accessibility api if it supports it. assistive technology products should listen for such an event and notify the user accordingly: screen readers may interrupt current output (whether it's speech or braille) and immediately announce or display the alert message. screen magnifiers may visually indicate that an alert occurred and what the alert
text was. note: opinons may differ on how assistive technology should handle this technique. the information provided above is one of those opinions and therefore not normative. examples example 1: adding the role in the html code the snippet below shows how the alert role is added directly into the html source code. the moment the element finishes loading the screen reader should be notified of...
...e error immediately after announcing the page title. <h2 role="alert">your form could not be submitted because of 3 validation errors.</h2> example 2: dynamically adding an element with the alert role this snippet dynamically creates an element with an alert role and adds it to the document structure. ...
...ter announcing the page title. <h2 role="alert">your form could not be submitted because of 3 validation errors.</h2> example 2: dynamically adding an element with the alert role this snippet dynamically creates an element with an alert role and adds it to the document structure. ...
...And 4 more matches
ARIA: figure role - Accessibility
the aria figure role can be used to identify a figure inside page content where appropriate semantics do not already exist. a figure is generally considered to be one or more images, code snippets, or other content that puts across information in a different way to a regular flow of
text. <div role="figure" aria-labelledby="caption"> <img src="image.png" alt="full alternative image description"> <p id="caption">figure 1: the caption</p> </div> in the above example, we have a figure that consists of two separate content items — an image and a caption. this is wrapped by a <div> element that identifies the content as a figure using role="figure". instead of using aria to create a figure, consider using the native, semantic html <figure> element. along with the <figcaption> eleme...
...ve technology, navigable by keyboard as well as mouse, and so on. you can add a caption or label to your figure in a number of ways. you could add an id to an element containing content that describes the figure, and then reference that id inside an appropriate attribute on the figure to associate the figure with the label: <div role="figure" aria-labelledby="figure-1"> ... ...
...add a caption or label to your figure in a number of ways. you could add an id to an element containing content that describes the figure, and then reference that id inside an appropriate attribute on the figure to associate the figure with the label: <div role="figure" aria-labelledby="figure-1"> ... <p id="figure-1">
text that describes the figure.</p> </div> use aria-labelledby when the
text is a concise label. ...
...And 4 more matches
ARIA: button role - Accessibility
ntly expanded or collapsed. if the button has aria-expanded="false" set, the grouping is not currently expanded; if the button has aria-expanded="true" set, it is currently expanded; if the button has aria-expanded="undefined" set or the attribute is ommitted, it is not expandable. basic buttons buttons should always have an accessible name. for most buttons, this name will be the same as the
text inside the button. in some cases, for example buttons represented by icons, the accessible name may be provided from the aria-label or aria-labelledby attributes. toggle buttons a toggle button typically has two states: pressed and not pressed. a third mixed state is available for toggle buttons that control other elements, such as other toggle buttons or checkboxes, which do not all share the ...
... enter activates the button. space activates the button following button activation, focus is set depending on the type of action the button performs. for example, if clicking the button opens a dialog, the focus should move to the dialog. if the button closes a dialog, focus should returns to the button that opened the dialog unless the function performed in the dialog con
text logically leads to a different element. if the button alters the current con
text, then focus typically remains on the button, such as muting and unmuting an audio file. required javascript features required event handlers buttons can be operated by mouse, touch, and keyboard users. for native html <button> elements, the button's onclick event fires for mouse clicks and when the user presses sp...
...b order. the included css style is provided to make the <span> element look like a button, and to provide visual cues when the button has focus. the handlebtnclick and handlebtnkeydown event handlers perform the button's action when activated using a mouse click or the space or enter key. in this case, the action is to add a new name to the list of names. ...
...And 4 more matches
WAI-ARIA Roles - Accessibility
e. dialogs are generally placed on top of the rest of the page content using an overlay. dialogs can be either non-modal (it's still possible to interact with content outside of the dialog) or modal (only the content in the dialog can be interacted with).aria: document rolegenerally used in complex composite widgets or applications, the document role can inform assistive technologies to switch con
text to a reading mode: the document role tells assistive technologies with reading or browse modes to use the document mode to read the content contained within this element.aria: feed rolea feed is a dynamic scrollable list of articles in which articles are added to or removed from either end of the list as the user scrolls. a feed enables screen readers to use the browse mode reading cursor to both...
...m of rich content that may continue scrolling infinitely by loading more content as the user reads.aria: figure rolethe aria figure role can be used to identify a figure inside page content where appropriate semantics do not already exist. a figure is generally considered to be one or more images, code snippets, or other content that puts across information in a different way to a regular flow of
text.aria: form rolethe form landmark role can be used to identify a group of elements on a page that provide equivalent functionality to an html form.aria: grid rolethe grid role is for a widget that contains one or more rows of cells. the position of each cell is significant and can be focused using keyboard input.aria: gridcell rolethe gridcell role is used to make a cell in a grid or treegrid. it ...
...of information.aria: heading rolethe heading role defines this element as a heading to a page or section. to give the page more structure, a level should also be provided to indicate relationships between sections.aria: img rolethe aria img role can be used to identify multiple elements inside page content that should be considered as a single image. these elements could be images, code snippets,
text, emojis, or other content that can be combined to deliver information in a visual manner.aria: list rolethe aria list role can be used to identify a list of items. it is normally used in conjunction with the listitem role, which is used to identify a list item contained inside the list.aria: listbox rolethe listbox role is used for lists from which a user may select one or more items which are st...
...And 4 more matches
:disabled - CSS: Cascading Style Sheets
abled state, in which it can be activated or accept focus. /* selects any disabled <input> */ input:disabled { background: #ccc; } syntax :disabled examples this example shows a basic shipping form. it uses the javascript change event to let the user enable/disable the billing fields. ...
...r accept focus. /* selects any disabled <input> */ input:disabled { background: #ccc; } syntax :disabled examples this example shows a basic shipping form. it uses the javascript change event to let the user enable/disable the billing fields. ...
...t> */ input:disabled { background: #ccc; } syntax :disabled examples this example shows a basic shipping form. it uses the javascript change event to let the user enable/disable the billing fields. ...
...And 4 more matches
:host() - CSS: Cascading Style Sheets
ctor given as the function's parameter matches the shadow host. the most obvious use of this is to put a class name only on certain custom element instances, and then include the relevant class selector as the function argument. you can't use this with a descendant selector expression to select only instances of the custom element that are inside a particular ancestor. that's the job of :host-con
text(). note: this has no effect when used outside a shadow dom. /* selects a shadow root host, only if it is matched by the selector argument */ :host(.special-custom-element) { font-weight: bold; } syntax :host( <compound-selector-list> )where <compound-selector-list> = <compound-selector>#where <compound-selector> = [ <type-selector>? <subclass-selector>* [ <pseudo-element-selector> <ps...
...en><attribute-selector> = '[' <wq-name> ']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>? ']'where <attr-matcher> = [ '~' | | | '^' | '$' | '*' ]? '='<attr-modifier> = i | s examples selectively styling shadow hosts the following snippets are taken from our host-selectors example (see it live also). ...
...']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>? ']'where <attr-matcher> = [ '~' | | | '^' | '$' | '*' ]? '='<attr-modifier> = i | s examples selectively styling shadow hosts the following snippets are taken from our host-selectors example (see it live also). ...
...And 4 more matches
:read-write - CSS: Cascading Style Sheets
we do just this in the example below. ...
...we do just this in the example below. ...
...ipping details), while still being able to submit the information along with the rest of the form. we do just this in the example below. ...
...And 4 more matches
Coordinate systems - CSS: Cascading Style Sheets
this guide describes the standard coordinate systems used by the css object model. these are generally only different in terms of where their origin is located. ...
... this guide describes the standard coordinate systems used by the css object model. these are generally only different in terms of where their origin is located. ...
... this guide describes the standard coordinate systems used by the css object model. these are generally only different in terms of where their origin is located. ...
...And 4 more matches
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
of “cards” – product listings, image galleries, and so on. a grid can make it very easy to create these listings in a way that is responsive without needing to add media queries to make it so. in this next example i’m combining css grid and flexbox layouts to make a simple product listing layout. the markup for my listing is an unordered list of items. each item contains a heading, some
text of varying height, and a call to action link. <ul class="listing"> <li> <h2>item one</h2> <div class="body"><p>the content of this listing item goes here.</p></div> <div class="cta"><a href="">call to action!</a></div> </li> <li> <h2>item two</h2> <div class="body"><p>the content of this listing item goes here.</p></div> <div class="cta"><a href="">call to acti...
...p></div> <div class="cta"><a href="">call to action!</a></div> </li> <li> <h2>item two</h2> <div class="body"><p>the content of this listing item goes here.</p></div> <div class="cta"><a href="">call to action!</a></div> </li> <li class="wide"> <h2>item three</h2> <div class="body"><p>the content of this listing item goes here.</p> <p>this one has more
text than the other items.</p> <p>quite a lot more</p> <p>perhaps we could do something different with it?</p></div> <div class="cta"><a href="">call to action!</a></div> </li> <li> <h2>item four</h2> <div class="body"><p>the content of this listing item goes here.</p></div> <div class="cta"><a href="">call to action!</a></div> </li> <li> <h2>item fi...
...i want them never to become smaller than 200 pixels, and then to share any available remaining space equally – so we always get equal width co...
...And 4 more matches
background-clip - CSS: Cascading Style Sheets
ckground properties are their initial values, and the propagated values are treated as if they were specified on the root element. it is recommended that authors of html documents specify the canvas background for the <body> element rather than the html element. syntax /* keyword values */ background-clip: border-box; background-clip: padding-box; background-clip: content-box; background-clip:
text; /* global values */ background-clip: inherit; background-clip: initial; background-clip: unset; values border-box the background extends to the outside edge of the border (but underneath the border in z-ordering). padding-box the background extends to the outside edge of the padding. no background is drawn beneath the border. content-box the background is painted within (clipped to) t...
...es */ background-clip: inherit; background-clip: initial; background-clip: unset; values border-box the background extends to the outside edge of the border (but underneath the border in z-ordering). padding-box the background extends to the outside edge of the padding. no background is drawn beneath the border. content-box the background is painted within (clipped to) the content box.
text the background is painted within (clipped to) the foreground
text. formal definition initial valueborder-boxapplies toall elements. it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <box>#where <box> = border-box | padding-box | content-box examples html <p class="border-box">the background extends behind the bo...
...nheritednocomputed valueas specifiedanimation typediscrete formal syntax <box>#where <box> = border-box | padding-box | content-box examples html <p class="border-box">the background extends behind the border.</p> <p class="padding-box">the background extends to the inside edge of the border.</p> <p class="content-box">the background extends only to the edge of the content box.</p> <p class="
text">the background is clipped to the foreground
text.</p> css p { border: .8em darkviolet; border-style: dotted double; margin: 1em 0; padding: 1.4em; background: linear-gradient(60deg, red, yellow, red, yellow, red); font: 900 1.2em sans-serif;
text-decoration: underline; } .border-box { background-clip: border-box; } .padding-box { background-clip: padding-box; } .content-box { b...
...And 4 more matches
Using shadow DOM - Web Components
. note: shadow dom is supported by default in firefox (63 and onwards), chrome, opera, and safari. the new chromium-based edge (75 and onwards) supports it too; the old edge didn't. high-level view this article assumes you are already familiar with the concept of the dom (document object model) — a tree-like structure of connected nodes that represents the different elements and strings of
text appearing in a markup document (usually an html document in the case of web documents). as an example, consider the following html fragment: <!doctype html> <html> <head> <meta charset="utf-8"> <title>simple dom example</title> </head> <body> <section> <img src="dinosaur.png" alt="a red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small...
...can attach a shadow root to any element using the element.attachshadow() method. this takes as its parameter an options object that contains one option — mode — with a value of open or closed: let shadow = elementref.attachshadow({mode: 'open'}); let shadow = elementref.attachshadow({mode: 'closed'}); open means that you can access the shadow dom using javascript written in the main page con
text, for example using the element.shadowroot property: let myshadowdom = mycustomelem.shadowroot; if you attach a shadow root to a custom element with mode: closed set, you won't be able to access the shadow dom from the outside — mycustomelem.shadowroot returns null. this is the case with built in elements that contain shadow doms, such as <video>. note: as this blog post shows, it is actuall...
...ment, manipulating it is a matter of just using the same dom apis as you use for the regular dom manipulation: let para = document.createelement('p'); shadow.appendchild(para); // etc. working through a simple example now let's walk through a simple example to demonstrate the shadow dom in action inside a custom element — <popup-info> (see a live example also). this takes an image icon and a
text string, and embeds the icon into the page. when the icon is focused, it displays the
text in a pop up information box to provide further in-con
text information. to begin with, in our javascript file we define a class called popupinfo, which extends htmlelement: class popupinfo extends htmlelement { constructor() { // always call super first in constructor super(); // write element...
...And 4 more matches
XUL Migration Guide - Archive of obsolete content
ce into the browser: for example, adding menu items, buttons, and toolbars. because sdk-based extensions are restartless, they can't use xul overlays. to add user interface components to the browser, there are a few different options. in order of complexity, the main options are: the sdk includes modules that implement some basic user interface components including buttons, dialogs, and con
text menu items. there is a collection of community-developed modules that includes various user interface components. by using the sdk's low-level apis you can directly modify the browser chrome. xul windows xul windows are used to define completely new windows to host user interface elements specific to the add-on. the sdk generally expects you to specify your user interface using ...
... allows you to refer to objects in these directories from "chrome.manifest" using a relative path, like "chrome/content". this is provided only as a migration aid, and it's still a good idea to port xul windows to html. content scripts in a xul-based add-on, code that uses xpcom objects, code that manipulates the browser chrome, and code that interacts with web pages all runs in the same con
text. but the sdk makes a distinction between: add-on scripts, which can use the sdk apis, but are not able to interact with web pages content scripts, which can access web pages, but do not have access to the sdk's apis content scripts and add-on scripts communicate by sending each other json messages: in fact, the ability to communicate with the add-on scripts is the only extra privilege a con...
.../action").actionbutton({ id: "highlight-active-tab", label: "highlight active tab", icon: "./icon-16.png", onclick: highlightactivetab }); security implications the sdk implements a security model in which an add-on only gets to access the apis it explicitly imports via require(). this is useful, because it means that if a malicious web page is able to inject code into your add-on's con
text, it is only able to use the apis you have imported. for example, if you have only imported the notifications module, then even if a malicious web page manages to inject code into your add-on, it can't use the sdk's file module to access the user's data. but this means that the more powerful modules you require(), the greater is your exposure if your add-on is compromised. low-level modules like ...
...And 3 more matches
clipboard - Archive of obsolete content
currently the image type doesn't support transparency on windows. examples set and get the contents of the clipboard. var clipboard = require("sdk/clipboard"); clipboard.set("lorem ipsum dolor sit amet"); var contents = clipboard.get(); set the clipboard contents to some html. ...
...ipsum dolor sit amet"); var contents = clipboard.get(); set the clipboard contents to some html. var clipboard = require("sdk/clipboard"); clipboard.set("<blink>lorem ipsum dolor sit amet</blink>", "html"); if the clipboard contains html content, open it in a new tab. var clipboard = require("sdk/clipboard"); if (clipboard.currentflavors.indexof("html") != -1) require("sdk/tabs").open("data:
text/html;charset=utf-8," + clipboard.get("html")); set the clipboard contents to an image. var clipboard = require("sdk/clipboard"); clipboard.set("data:image/png;base64,ivborw0kggoaaaansuheugaaacaaaaagcaya" + "aabzenr0aaaasuleqvryhe3o0qkaiawd0eyqe3q993aq3cbsukpygfsnty" + "n5ugbqpk0baadgp0brdwxwlweaaaaagpsa3rzdaaaaahgpcgrpganzq2fg" + "bwrr9aaaaabjru5erkjggg...
..."); if the clipboard contains an image, open it in a new tab. var clipboard = require("sdk/clipboard"); if (clipboard.currentflavors.indexof("image") != -1) require("sdk/tabs").open(clipboard.get()); as noted before, data type can be easily omitted for images. if the intention is set the clipboard to a data url as string and not as image, it can be done by specifying a different flavor, like
text. ...
...And 3 more matches
Forms related code snippets - Archive of obsolete content
here are some <form> related code snippets. date picker (before implementing it in a working environment, please read the note about the const statement compatibility) <!doctype html> <html> <head> <meta http-equiv="content-type" content="
text/html; charset=utf-8" /> <title>datepicker example - mdn</title> <script type="
text/javascript"> /*\ |*| |*| datepicker example mdndeveloper network |*| |*| https://developer.mozilla.org/docs/code_snippets/forms |*| https://developer.mozilla.org/user:fusionchess |*| |*| this snippet is released under the gnu public license, version 3 or later. |*| http://www.gnu.org/licenses/gpl-3.0-standalone.html |*| \*/ (function () { function datepicker (otarget) { const otable = document.createelement("table"), ohrow = document.createelemen...
... otr = document.createelement("tr"); this.otbody.appendchild(otr); } nday = niter - nendblanks + 1; otd = document.createelement("td"); if (niter + 1 > nendblanks && niter < nend) { otd.classname = sprefs + "-active-cell"; otd.id = sprefs + "-day-" + this.id + "-" + nday; otd.onclick = ondayclick; otd.appendchild(document.create
textnode(nday)); } else { otd.classname = sprefs + "-empty-cell"; } otr.appendchild(otd); } this.display.innerhtml = smonthsnames[this.current.getmonth()] + " " + this.current.getfullyear(); this.container.appendchild(this.otbody); }; function ondocclick (opssevt) { const oevt = opssevt || /* ie */ window.event; var boutside = true; for (var ono...
... window.addeventlistener ? addeventlistener("load", buildcalendars, false) : window.attachevent ? attachevent("onload", buildcalendars) : (onload = buildcalendars); document.addeventlistener ? document.addeventlistener("mousedown", ondocclick, false) : document.attachevent ? ...
...And 3 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
t.onerror(event); }; request.send(); } loadfile("chrome://myaddon/content/filename.ext",datatype,function(data) { /* do stuff with data */ }); note: when using xmlhttprequest to access a file:// url the request.status is not properly set to 200 to indicate success. in such cases, request.readystate == 4, request.status == 0 and request.response will evaluate to true. if your file is
text, use "
text" as your data type. if you're getting json this way make sure to explicitly set the type as "
text" if you intend to parse it yourself. even though it says that the default type is "
text", firefox will attempt to autodetect and fail, resulting in an error message in the console. this doesn't seem to break anything, but it is easily avoidable by being explicit with the type. mdn says you...
...the new way to do this is to use javascript typed arrays. specify "arraybuffer" as your data type to get one from your xmlhttprequest. to access that data you're going to need a data view to look at your typed array with. ...
...unction setdefaultpref(prefname,prefvalue) { var defaultbranch = services.prefs.getdefaultbranch(null); setgenericpref(defaultbranch,prefname,prefvalue); } function getucharpref(prefname,branch) // unicode getcharpref { branch = branch ? branch : services.prefs; return branch.getcomplexvalue(prefname, components.interfaces.nsisupportsstring).data; } function setucharpref(prefname,
text,branch) // unicode setcharpref { var string = components.classes["@mozilla.org/supports-string;1"] .createinstance(components.interfaces.nsisupportsstring); string.data =
text; branch = branch ? branch : services.prefs; branch.setcomplexvalue(prefname, components.interfaces.nsisupportsstring, string); } just grab the above, move your default preference...
...And 3 more matches
Setting Up a Development Environment - Archive of obsolete content
previousnext » getting the right tools there are 3 tools that we think are essential for effective add-on development (or any kind of development, really): a source code editor, a source control system, and a build system. in regards to code editing, there's no official mozilla ide. on the other hand, extensions use the same (or similar) languages that are used for web development, so most
text editors and ides are up to the task. most xul tools and plugins you'll find online are merely templates that generate the folder structure for the project, and that's not much help. we recommend komodo edit. it's free, open source, and cross-platform. it's based on the mozilla xulrunner platform, so it has support for some of the particularities in firefox extension development. komodo edit has ...
...e can tell that the file in the bin directory is up to date, and nothing needs to be done. making changes on source files will make make run the necessary steps to build the xpi again. you can clean up the bin directory by just running the following command (again, from the src directory): make clean you can also run these commands from komodo. click on tools > run command.... ...
...you also have the option to save the command, by clicking on the "add to toolbox" checkbox. to see the toolbox, click on view > tabs > toolbox, from the main menu. ...
...And 3 more matches
Creating a dynamic status bar extension - Archive of obsolete content
our extension will refresh the stock information display when the user clicks the panel. write the...
...bles used by that function. due to the way javascript works, if inforeceived() were outside refreshinformation(), it would not have access to the same variable scope. in fact, even the this value would not match, so we couldn't get at the same variables and functions that way. ...
... var output = httprequest.response
text; if (output.length) { // remove whitespace from the end of the string; // this gets rid of the end-of-line characters output = output.replace(/\w*$/, ''); // build the tooltip string var fieldarray = output.split(','); // assert that fieldarray[0] == 'goog' samplepanel.label = 'goog: ' + fieldarray[1]; samplepanel.tooltip
text = 'chg: ' + fieldarray[4] + ' | ' + 'open: ' + fieldarray[5] + ' | ' + 'low: ' + fieldarray[6] + ' | ' + 'high: ' + fieldarray[7] + ' | ' + 'vol: ' + fieldarray[8]; } } the first thing we do here is get the status bar panel into the variable samplepanel by calling the document.getelementbyid() dom function. we need this so that we can make changes to the sta...
...And 3 more matches
Defining Cross-Browser Tooltips - Archive of obsolete content
summary: authors are used to having alt
text appear as a "tooltip" above images, but that's not how it was meant to be used. learn how to define "tooltips" in a cross-browser, standards-friendly way. authors are used to using the alt attribute to create "tooltips" in web browsers. the classic example is a "tooltip" of an image; when the user pauses the mouse pointer over an image, the contents of the alt attribute are displayed as a "tooltip." gecko-based browsers such as mozilla, netscape 6+, and compuserve 7 do not support this behavior. see bug 25537 for a lengthy, sometimes passionate discussion of gecko's behavior in this regard. ...
...ge; when the user pauses the mouse pointer over an image, the contents of the alt attribute are displayed as a "tooltip." gecko-based browsers such as mozilla, netscape 6+, and compuserve 7 do not support this behavior. see bug 25537 for a lengthy, sometimes passionate discussion of gecko's behavior in this regard. the problem according to the html 4.01 definition of the alt attribute: alt =
text cs for user agents that cannot display images, forms, or applets, this attribute specifies alternate
text. the language of the alternate
text is specified by the lang attribute. in other words, alt
text should only be displayed when a user agent cannot display the primary content of the element (e.g., a
text-mode browser that cannot display images). in a visual browser, the image should be dis...
...s that cannot display images, forms, or applets, this attribute specifies alternate
text. the language of the alternate
text is specified by the lang attribute. in other words, alt
text should only be displayed when a user agent cannot display the primary content of the element (e.g., a
text-mode browser that cannot display images). in a visual browser, the image should be displayed and the alt
text should not. this assumes that the browser can find the image and that it supports the image format used; if either of these is not true, and the image cannot be displayed, then the alt
text should be displayed in place of the missing image. ...
...And 3 more matches
Editor Embedding Guide - Archive of obsolete content
ne loading. ...
...hod, the editor is created underneath and the event listeners are all prepa if (ns_failed(rv)) return ns_error_failure; // we are not setup??!! ...
... and the event listeners are all prepa if (ns_failed(rv)) return ns_error_failure; // we are not setup??!! ...
...And 3 more matches
Block and Line Layout Cheat Sheet - Archive of obsolete content
it will add padding and border to determine the final width. is this where the "tending towards zero width" stuff comes in? ns_block_no_auto_margins ns_block_margin_root indicates that this is a frame from which child margins can be calculated. the absence of this flag implies that child margin calculations should ignore the frame and look further up the parent chain. used in nsblockreflowcon
text::computecollapsedtopmargin(). this flag causes the nsblockreflowstate's constructor to set the brs_istopmarginroot and brs_isbottommarginroot flags. this is set by default for document, table cell inner, and absolutely positioned wrapper frames. ns_block_space_mgr this indicates that a block frame should create its own space manager. this is required by each block frame that can contain floater...
...consists of lines and other blocks, stacked vertically. a block frame has one nslinebox for each line, and one nslinebox for each block child. these are stored as a doubly-linked list in the mlines member of nsblockframe. nsinlineframe mflags ns_inline_frame_contains_percent_aware_child this flag is set if the inline frame has any children that have a percentage value set (via the style con
text) for the width or height of the content area, padding, border, or margin. nshtmlreflowstate the current state of reflow, built up as reflow recursively descends the frame tree. this is "passed in" to a child frame from its parent, and provides the constraints in which the child frame must size itself; e.g. the width and height available to the child frame. mcomputedwidth mcomputedheight ...
...return whether the top margin should apply. if the flag hasn't been set in the block reflow state, then shouldapplytopmargin() will crawl the line list to see if a block frame precedes the specified frame. if so, the top margin should be applied, and the flag set to cache the result. (if not, the top margin will be applied as a result of the generational margin collapsing logic in nsblockreflowcon
text::computecollapsedtopmargin(). in this case, the flag won't be set, so subsequent calls to shouldapplytopmargin() will continue crawl the line list.) this flag is also set in the nsblockreflowstate constructor if brs_istopmarginroot is set; that is, if the frame being reflowed is a margin root by default. brs_computemaxelementsize this flag is set if reflow should recompute an element's maximum ...
...And 3 more matches
List of commands - Archive of obsolete content
scrollright cmd_selectcharprevious cmd_selectcharnext cmd_wordprevious cmd_wordnext cmd_selectwordprevious cmd_selectwordnext cmd_beginline cmd_endline cmd_selectbeginline cmd_selectendline cmd_selectlineprevious cmd_selectlinenext cmd_selectpageprevious cmd_selectpagenext cmd_selectmovetop cmd_selectmovebottom editor commands (legal when the focus is anywhere where you can type
text): cmd_paste - paste a selection from the clipboard cmd_pastequote cmd_delete cmd_deletecharbackward cmd_deletecharforward cmd_deletewordbackward cmd_deletewordforward cmd_deletetobeginningofline cmd_deletetoendofline cmd_scrolltop cmd_scrollbottom cmd_movetop cmd_movebottom cmd_selecttop cmd_selectbottom cmd_linenext cmd_lineprevious cmd_selectlinenext cmd_selectlineprevious ...
...n cmd_bm_openinnewtab cmd_bm_openinnewwindow cmd_bm_paste cmd_bm_properties cmd_bm_rename cmd_bm_selectall cmd_bm_setnewbookmarkfolder cmd_bm_setnewsearchfolder cmd_bm_setpersonaltoolbarfolder cmd_bm_sortfolder cmd_bm_sortfolderbyname cmd_close cmd_closeothertabs cmd_closewindow cmd_copy cmd_copyimage cmd_copylink cmd_cut cmd_delete cmd_editpage cmd_findtypelinks cmd_findtype
text cmd_gotoline cmd_handlebackspace cmd_handleshiftbackspace cmd_minimizewindow cmd_neweditor cmd_neweditordraft cmd_neweditortemplate cmd_newnavigator cmd_newnavigatortab cmd_newtabwithtarget cmd_openhelp cmd_paste - paste a selection from the clipboard cmd_printsetup cmd_quit cmd_redo cmd_savepage cmd_scrollpagedown cmd_scrollpageup cmd_selectall cmd_switchdocumentdirection cm...
...also obtained from htt...
...And 3 more matches
Namespaces - Archive of obsolete content
in addition to this document, see namespaces crash course. xml namespaces provide a way to distinguish duplicate element and attribute names. duplicates element and attribute names can occur when an xml document contains elements and attributes from two or more different xml schemas (or dtds). to quote wikipedia: "in general, a namespace is an abstract container providing con
text for the items ... it holds and allows disambiguation of items having the same name." if you are familiar with c++ namespaces, java packages, perl packages, or python module importing, you are already familiar with the namespace concept. an xml namespace is identified by an unique name (called a uri, not a url, even though it can look like a url). an uri is any string, although most people choose a url-based uri becau...
...ing, although most people choose a url-based uri because urls are an easy way to hope for uniqueness. although there's nothing preventing someone else from using the namespace http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul, it's fairly unlikely anyone would choose that accidentally. even if they did accidentally choose it, they may not define the same elements as xul anyway (e.g., <
textbox/>) in their schema/dtd. any element type or attribute name in an xml namespace can be uniquely identified by its xml namespace and its "local name". together, these two items define a qualified name, or qname. for example, <xul:
textbox/> uses a namespace named "xul" and a local name "
textbox". this distinguishes it from, for example, <foobar:
textbox/> which might occur in the same document. th...
...the only way to distinguish that they have different meanings is with namespaces. there's only one other thing to know: "default namespace". ...
...And 3 more matches
Sorting and filtering a custom tree view - Archive of obsolete content
at is, a tree whose values are loaded via javascript. this will not work for other types of trees, for example rdf-backed or ones created with dom methods. for the sake of simplicity, strings are not localized and the data loaded is hard coded. because of bug 340478, this code will only work from privileged script. ...
...xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="
text/css"?> <!doctype window> <window title="sorting a custom tree view example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="init()"> <script type="application/javascript" src="sort.js"/> <hbox align="center" id="search-box"> <label accesskey="f" control="filter">filter</label> <
textbox id="filter" oninput="inputfilter(event)" flex="1"/> <button id="clearfilter" oncommand="clearfilter()" label="clear" accesskey="c" disabled="true"/> </hbox> <tree id="tree" flex="1" persist="sortdirection sortresource" sortdirection="ascending" sortresource="description"> <treecols> <treecol id="name" label="name" flex="1" persist="width ordinal hidden" onclick="sort(this)" class="so...
...this is useful if this is an editable table //to prevent the user from losing the row they edited var topvisiblerow = null; if (table) { topvisiblerow = gettopvisiblerow(); } if ...
...And 3 more matches
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
llowing alternate syntax can be used when the code in a handler is more complex: <binding id="binding-name"> <handlers> <handler event="event-name"> -- handler code goes here -- </handler> </handlers> </binding> handlers example the following example adds some key handlers to create a very primitive local clipboard: example 1 : source <binding id="clipbox"> <content> <xul:
textbox/> </content> <implementation> <field name="clipboard"/> </implementation> <handlers> <handler event="keypress" key="x" modifiers="control" action="this.clipboard=document.getanonymousnodes(this)[0].value; document.getanonymousnodes(this)[0].value='';"/> <handler event="keypress" key="c" modifiers="control" action="this.clipboard=document.getanonymousnodes(this)[...
...however, each one will have its own buffer. three handlers have been added, one for cut, one for copy and the other for paste. each has its own keystroke that invokes it. the first handler is the cut operation and is invoked when the control ...
...ment.getanonymousnodes(this)[0].value;"/> <handler event="keypress" key="v" modifiers="control" action="document.getanonymousnodes(this)[0].value=this.clipboard ? ...
...And 3 more matches
Adding Style Sheets - Archive of obsolete content
t we are building the find files dialog for themeability, because the find files dialog can be referred to with the url chrome://findfile/content/findfile.xul so the style sheet file will be stored in chrome://findfile/skin/findfile.css. all the xul examples so far have actually been using a style sheet already. the second line has always been: <?xml-stylesheet href="chrome://global/skin/" type="
text/css"?> this line indicates that we want to use the style provided by chrome://global/skin/. in mozilla, this will be translated as the file global.css, which contains default style information for xul elements. you could leave the line out and the elements will still work, however they will look fairly plain. the style sheet applies various fonts, colors and borders to make the elements look mor...
... might change the meaning of the element. however you should avoid this as much as possible. for installed files, you'll have to create or modify a manifest file and install the skin. our find files dialog example let's modify the find files dialog so that its style comes from a separate style file. first, the modifed lines of findfile.xul: <?xml-stylesheet href="chrome://global/skin/" type="
text/css"?> <?xml-stylesheet href="findfile.css" type="
text/css"?> ... <spacer class="titlespace"/> <groupbox orient="horizontal"> <caption label="search criteria"/> <menulist id="searchtype"> <menupopup> <menuitem label="name"/> <menuitem label="size"/> <menuitem label="date modified"/> </menupopup> </menulist> <spacer class="sp...
...<spacer class="titlespace"/> <hbox> <progressmeter id="progmeter" value="50%" style="display:none;"/> the new xml-stylesheet line is used to import the style sheet. it will contain the styles instead of having them directly in the xul file. ...
...And 3 more matches
List Controls - Archive of obsolete content
le" /> <listitem label="squash swirl" value="squash" /> </listbox> the example has been changed to display only 3 rows at a time. values have also been added to each item in the list. list boxes have some additional features, which will be described later. multi-column list boxes the listbox also supports multiple columns. each cell may have arbitrary content within it, although usually only
text is used. when the user selects an item in the list, the entire row is selected. you cannot have a single cell selected. two tags are used to specify the columns in the listbox. the listcols element is used to hold the column information, each of which is specified using a listcol element. you will need one listcol element for each column in the listbox. the listcell element may be used for each c...
...re used to specify the columns in the listbox. the listcols element is used to hold the column information, each of which is specified using a listcol element. you will need one listcol element for each column in the listbox. the listcell element may be used for each cell in a row. if you want to have three columns, you will need to add three listcell elements inside each listitem. to specify the
text content of a cell, place a label attribute on a listcell. for the simple case where there is only one column, you may also place the label attributes directly on the listitem elements and leave the listcell elements out entirely, as was seen in the earlier listbox examples. the following example is of a listbox with two columns and three rows: example 3 : source view <listbox> <listcols> ...
...the window to see that the column stretches as the window does. if you shrink the size horizontally, the labels on the cells will crop themselves automatically using an ellipsis. you can use the crop attribute on the cells or items set to the value none to disable the ellipsis. drop-down lists drop-down lists can be created in html using the select element. the user can see a single choice in a
textbox and may click the arrow or some similar such button next to the
textbox to make a different selection. the other choices will appear in a pop-up window. xul has a menulist element which can be used for this purpose. it is made from a
textbox with a button beside it. its name was chosen because it pops up a menu with the choices in it. three elements are needed to describe a drop-down box. the ...
...And 3 more matches
Trees - Archive of obsolete content
it can be used with rows either in a flat list or arranged into a hierarchy. a tree also allows the user to rearrange, resize and hide individual columns. some examples of trees include the list of messages in a mail application, or the bookmarks window in mozilla. in some ways, a tree has some similarities with the listbox. ...
...e list of messages in a mail application, or the bookmarks window in mozilla. in some ways, a tree has some similarities with the listbox. both can be used to create tables of data with multiple rows and columns, and both may contain column headers. the tree also supports nested rows, whereas the listbox does not. however, listboxes may contain any type of content, whereas trees may only contain
text and images. (using advanced features, progress meters or checkboxes also can be added to the tree) a tree consists of two parts, the set of columns, and the tree body. the set of columns is defined by a number of treecol elements, one for each column. each column will appear as a header at the top of the tree. the second part, the tree body, contains the data to appear in the tree and is cre...
...umber of rows without any performance problems. of course, this is independant of the performance of the view object itself. a tree view is an object which implements the nsitreeview interface. this interface contains thirty properties and functions which you may implement. these functions will be called by the tree as necessary to retrieve data and state about the tree. for instance, the getcell
text() function will be called to get the label for a particular cell in the tree. an advantage of using a tree view is that it allows the view to store the data in a manner which is more suitable for the data, or to load the data on demand as rows are displayed. this allows more flexibility when using trees. naturally, having to implement a tree view with thirty or so properties and methods for eve...
...And 3 more matches
button - Archive of obsolete content
mine whether this attribute is set instead of getattribute(). for buttons, the type attribute must be set to checkbox or radio for this attribute to have any effect. command type: id set to the id of a command element that is being observed by the element. ...
...box or radio for this attribute to have any effect. command type: id set to the id of a command element that is being observed by the element. crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left ...
...tion is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left the
text will be cropped on its left side. right the
text will be cropped on its right side. center the
text will be cropped in the middle, showing both the start and end of the
text normally. none the
text will be not be cropped using an ellipsis. however, the
text will simply be cut off if it is too large. the si...
...And 3 more matches
caption - Archive of obsolete content
more information is available in the xul tutorial. ...
...box label="a checked groupbox"/> </caption> </groupbox> attributes accesskey type: character this should be set to a character that is used as a shortcut key. this should be one of the characters that appears in the label attribute for the element. ...
...ld be set to a character that is used as a shortcut key. this should be one of the characters that appears in the label attribute for the element. crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left ...
...And 3 more matches
checkbox - Archive of obsolete content
mine whether this attribute is set instead of getattribute(). for buttons, the type attribute must be set to checkbox or radio for this attribute to have any effect. command type: id set to the id of a command element that is being observed by the element. ...
...box or radio for this attribute to have any effect. command type: id set to the id of a command element that is being observed by the element. crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left ...
...tion is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left the
text will be cropped on its left side. right the
text will be cropped on its right side. center the
text will be cropped in the middle, showing both the start and end of the
text normally. none the
text will be not be cropped using an ellipsis. however, the
text will simply be cut off if it is too large. the si...
...And 3 more matches
colorpicker - Archive of obsolete content
icking on one of the grid cells. attributes disabled, color, onchange, preference, tabindex, type properties accessibletype, color, disabled, open, tabindex, value examples <colorpicker/> attributes disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
...g the currently selected color. this is modified when the user selects a color. you can assign a string of the form #rrggbb to this property to change the selected color. overview an onchange attribute is an event listener to the object for the event change. a change event is fired in different ways for different xul input elements as listed below: onchange type: script code
textbox when enter key is pressed radio/check box when the state is changed select list when the selected item is changed what is accessible the script con
text at this point can only access the following things: global values/functions i.e. window, document, or any of the functions/objects/variables bound to the window object event object example <?xml version...
...when the state is changed select list when the selected item is changed what is accessible the script con
text at this point can only access the following things: global values/functions i.e. ...
...And 3 more matches
command - Archive of obsolete content
you attach the code to the command using the oncommand attribute. it will be called no matter how it is invoked by the user. ...
...xample with two buttons <commandset><command id="cmd_openhelp" oncommand="alert('help');"/></commandset> <button label="help" command="cmd_openhelp"/> <button label="more help" command="cmd_openhelp"/> attributes disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
...o effect. the element will, however, still respond to mouse events. to enable the element, leave this attribute out entirely. visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. label type: string the label that will appear on the element. if this is left out, no
text appears. for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. oncommand type: script code this event handler is called when the command is activated. this occurs when a user selects a menu item or presses a keyboard shortcut attached to the command. reserved type: string this attribute applie...
...And 3 more matches
dropmarker - Archive of obsolete content
intended to be used as a separate element, but as part of another element. for instance the menulist and the popup type of datepicker use a dropmarker, that when pressed, will reveal a popup menu. ...
... to be used as a separate element, but as part of another element. for instance the menulist and the popup type of datepicker use a dropmarker, that when pressed, will reveal a popup menu. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
...And 3 more matches
groupbox - Archive of obsolete content
the xul tutorial. ...
...tutorial. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
...And 3 more matches
key - Archive of obsolete content
te (or an oncommand handler) on the key element. to display the shortcut defined with the key element in the ui, you can use <menuitem key="key element's id" command="command id" .../>. in order to use (non-default) key commands within specific elements, you will need to listen for key events. more information is available in the xul tutorial. attributes command, disabled, key, keycode, key
text, modifiers, oncommand, phase examples (example needed) attributes command type: id set to the id of a command element that is being observed by the element. disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does ...
...ttribute, as it may need to update additional state. key type: character the character that must be pressed. this should be set to a displayable character. keycode type: string key code for keys that do not have displayable characters, such as the enter key or function keys, use this attribute instead of the key attribute. valid keys are listed at keyboard shortcuts. key
text type: string a label for the keyboard shortcut. this
text would appear next to a menuitem label if that menuitem is associated with the key element via its key attribute. modifiers type: space-separated list of the values below a list of modifier keys that should be pressed to invoke the keyboard shortcut. multiple keys may be separated by spaces or commas. keys will map to other keys ...
...d be pressed to invoke the keyboard shortcut. multiple keys may be separated by spaces or commas. keys will map to other keys on platforms that do not have them. shift: the shift key. alt: the alt key. on the macintosh, this is the option key. on macintosh this can only be used in conjunction with another modifier, since alt+letter combinations are reserved for entering special characters in
text. meta: the meta key. on the macintosh, this is the command key. control: the control key. os: windows logo key on windows, super or hyper key on linux. this shouldn't be specified directly because it may conflict with system wide shortcut key. accel: the key used for keyboard shortcuts on the user's platform, which is control on windows and linux, and command on mac. usually, this would be t...
...And 3 more matches
keyset - Archive of obsolete content
ntainer element for key elements. the keyset and its descendants are not displayed. more information is available in the xul tutorial. ...
...lement for key elements. the keyset and its descendants are not displayed. more information is available in the xul tutorial. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case ...
...And 3 more matches
statusbar - Archive of obsolete content
y. contains statusbarpanels. ...
...ns statusbarpanels. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
...And 3 more matches
toolbargrippy - Archive of obsolete content
ed to collapse and expand it. this element is used internally by the toolbar and should only be used directly when modifying its theme. more information is available in the xul tutorial. ...
...lapse and expand it. this element is used internally by the toolbar and should only be used directly when modifying its theme. more information is available in the xul tutorial. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties accessible type: nsiaccessible returns the accessibility object for the element. ...
...And 3 more matches
toolbarseparator - Archive of obsolete content
e themes may apply a different appearance. ...
...may apply a different appearance. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
...And 3 more matches
toolbarspacer - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] firefox only a space between toolbar items. ...
... « xul reference home [ examples | attributes | properties | methods | related ] firefox only a space between toolbar items. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
...And 3 more matches
toolbarspring - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] firefox only a flexible space between toolbar items. ...
... « xul reference home [ examples | attributes | properties | methods | related ] firefox only a flexible space between toolbar items. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element. ...
...And 3 more matches
treecell - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a single cell in a tree. this element should be placed inside a treerow. you can set the
text for the cell using the label attribute. more information is available in the xul tutorial. attributes editable, label, mode, properties, ref, src, value attributes editable type: boolean allows the contents of individual cells in the column to be changed, especially useful when <treecol type="checkbox">. also useful for disabling editing of individual treecells. when the user double-clicks an editable cell, a
text field appears in which the user can edit the contents of the cell. the tree and treecol must also be marked as editable in order for this to work. the tree must be a conte...
...ling editing of individual treecells. when the user double-clicks an editable cell, a
text field appears in which the user can edit the contents of the cell. the tree and treecol must also be marked as editable in order for this to work. the tree must be a content tree for this to work on treecells. label type: string the label that will appear on the element. if this is left out, no
text appears. for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. mode type: one of the values below for columns that are progress meters, this determines the type of progress meter to use. none no progress meter is displayed. the cell
text is displayed instead. normal the cell uses its value ...
...ri set this to the uri of an image to appear in the tree cell. if this attribute is left out, no image appears. you can have both an image and a label. value type: string the string attribute allows you to associate a data value with an element. it is not used for any specific purpose, but you can access it with a script for your own use. ...
...And 3 more matches
display-outside - Archive of obsolete content
the display-outside css property specifies the outer display type of the box generated by an element, dictating how the element participates in its parent formatting con
text. ...
...ne-level; display-outside: run-in; display-outside: contents; display-outside: none; display-outside: table-row-group; display-outside: table-header-group; display-outside: table-footer-group; display-outside: table-row; display-outside: table-cell; display-outside: table-column-group; display-outside: table-column; display-outside: table-caption; display-outside: ruby-base; display-outside: ruby-
text; display-outside: ruby-base-container; display-outside: ruby-
text-container; /* global values */ display-outside: inherit; display-outside: initial; display-outside: unset; value not found in db! syntax one of the keyword values listed below. values block-level the element generates a block-level box, and participates in a block formatting con
text. other formatting con
texts, such as fle...
... run-in the element generates a run-in box. run-in elements act like inlines or blocks, depending on the surrounding elements. contents the element lays out its contents using flex layout. ...
...And 3 more matches
CSS - Archive of obsolete content
sin mozilla applications like firefox, the -moz-border-top-colors css property sets a list of colors for the top border.-moz-stack-sizing-moz-stack-sizing is an extended css property. normally, a <xul:stack> will change its size so that all of its child elements are completely visible. for example, moving a child of the stack far to the right will widen the stack so the child remains visible.-moz-
text-blinkthe -moz-
text-blink non-standard mozilla css extension specifies the blink mode.-moz-window-shadowthe -moz-window-shadow css property specifies whether a window will have a shadow. it only works on mac os x.-ms-acceleratorthe -ms-accelerator css property is a microsoft extension that sets or retrieves a string indicating whether the object represents a keyboard shortcut.-ms-block-progression...
..., and the scroll arrows of a scroll bar.-ms-scrollbar-shadow-colorthe -ms-scrollbar-shadow-color css property is a microsoft extension that specifies the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.-ms-scrollbar-track-colorthe -ms-scrollbar-track-color css property is a microsoft extension that specifies the color of the track element of a scrollbar.-ms-
text-autospacethe -ms-
text-autospace css property is a microsoft extension that specifies the autospacing and narrow space width adjustment of
text.-ms-touch-selectthe -ms-touch-select css property is a microsoft extension that toggles the gripper visual elements that enable touch
text selection.-ms-wrap-flowthe -ms-wrap-flow css property is a microsoft extension that specifies how exclusions impact i...
...this pseudo-element is non-standard, supported only in internet explorer 10, internet explorer 11, and microsoft edge.::-ms-expandthe ::-ms-expand css pseudo-element is a microsoft extension that represents the button of a <select> menu control that opens or closes the drop-down menu. typically it is a triangle that points downward.::-ms-fillthe ::-ms...
...And 3 more matches
Implementation Status - Archive of obsolete content
upported 4.5.5 xforms-output-exception unsupported 4.5.6 xforms-submit-error supported 4.5.7 xforms-version-exception unsupported 4.6 event sequencing supported 4.6.1 for input, secret,
textarea, range, or upload controls supported 4.6.2 for output controls supported 4.6.3 for select or select1 controls partial 4.6.4 for trigger controls supported 4.6.5 for submit controls supported ...
... we will support simpletype's using length, minlength, maxlength, pattern, maxinclusive, mininclusive, maxexclusive, minexclusive, totaldigits, and fractiondigits 7. ...
...core form controls section title status notes...
...And 3 more matches
Parsing microformats in JavaScript - Archive of obsolete content
firefox 3 introduces a new api for managing and parsing microformats. this article examines the generic microformat parsing api, which handles the heavy lifting of pulling data out of a microformat. this api is primarily intended to be used when implementing new microformats. methods datetimegetter() specifically retrieves a date from a microformat node. after getting the
text, it is normalized into an iso 8601 date. normalizeddate = microformats.parser.datetimegetter(propnode, parentnode); parameters propnode the dom node to check. parentnode the property's parent node. if it is a subproperty, this is the parent property node. otherwise this is the microformat node. return value a string containing the normalized date. defaultgetter() uses the microformat ...
... = microformats.parser.datetimegetter(propnode, parentnode); parameters propnode the dom node to check. parentnode the property's parent node. if it is a subproperty, this is the parent property node. otherwise this is the microformat node. return value a string containing the normalized date. defaultgetter() uses the microformat patterns to decide what the correct
text for a given microformat property is. this includes looking at thing such as abbr, img and alt, area and alt, and value excerpting. propertyvalue = microformats.parser.defaultgetter(propnode, parentnode, datatype); parameters propnode the dom node to check. parentnode the property's parent node. if it is a subproperty, this is the parent property node. otherwise thi...
... and value excerpting. propertyvalue = microformats.parser.defaultgetter(propnode, parentnode, datatype); parameters propnode the dom node to check. parentnode the property's parent node. if it is a subproperty, this is the parent property node. otherwise this is the microformat node. datatype "html" if the search should be done using innerhtml(), or "
text" to use inner
text(). the default is "
text". return value a string containing the property's value. emailgetter() specifically retrieves an email address from a microformat node. this removes the subject if one is specified, as well as the mailto: prefix. email = microformats.parser.emailgetter(propnode, parentnode); parameters propnode the dom node to check. parentnode ...
...And 3 more matches
RDF in Mozilla FAQ - Archive of obsolete content
reference is dropped. how do i create a datasource from an rdf/xml file? you can either create an rdf/xml datasource using the rdf service's getdatasource() method: // get the rdf service var rdf = components .classes["@mozilla.org/rdf/rdf-service;1"] .getservice(components.interfaces.nsirdfservice); // ...and from it, get the datasource. ...
... do i create a datasource from an rdf/xml file? you can either create an rdf/xml datasource using the rdf service's getdatasource() method: // get the rdf service var rdf = components .classes["@mozilla.org/rdf/rdf-service;1"] .getservice(components.interfaces.nsirdfservice); // ...and from it, get the datasource. ...
...om component manager var ds = components .classes["@mozilla.org/rdf/datasource;1?name=xml-datasource"] .createinstance(components.interfaces.nsirdfdatasource); // the nsirdfremotedatasource interface has the interfaces // that we need to setup the datasource. var remote = ds.queryinterface(components.interfaces.nsirdfremotedatasource); // be sure that your web server will deliver this as
text/xml (recommended) or
text/rdf! remote.init("http://www.mozilla.org/some-rdf-file.rdf"); // make it load! note that this will happen asynchronously. by setting // ablocking to true, we could force it to be synchronous, but this // is generally a bad idea, because your ui will completely lock up! remote.refresh(false); // note that ds will load asynchronously, so assertions will not // be immediate...
...And 3 more matches
markup - MDN Web Docs Glossary: Definitions of Web-related terms
descriptive markup: labels sections of documents as to how the program should handle them. ...
... descriptive markup: labels sections of documents as to how the program should handle them. ...
... descriptive markup: labels sections of documents as to how the program should handle them. ...
...And 3 more matches
MDN Web Docs Glossary: Definitions of Web-related terms
abbreviations you need to know to successfully understand and build for the web. ...
... b bandwidth base64 baseline beacon bézier curve bidi bigint blink block block (css) block (scripting) block cipher mode of operation boolean boot2gecko bootstrap bounding box breadcrumb brotli browser browsing con
text buffer c cache cacheable caldav call stack callback function canonical order canvas card sorting carddav caret cdn certificate authority certified challenge-response authentication character character encoding character s...
... call stack callback function canonical order canvas card sorting carddav caret cdn certificate authority certified challenge-response authentication character character encoding character set chrome cia cipher cipher suite cipher
text class client hints closure cms code splitting codec compile compile time computer programming conditional constant constructor continuous media control flow cookie copyleft cors cors-safelisted request header cors-safelisted res...
...And 3 more matches
What is accessibility? - Learn web development
with visual impairments people with visual impairments include people with blindness, low-level vision, and color blindness. many people with visual impairments use screen magnifiers that are either physical magnifiers or software zoom capabilities. most browsers and operating systems these days have zoom capabilities. some users will rely on screen readers, which is software that reads digital
text aloud. some screen reader examples include: some are paid commercial products, like jaws (windows) and dolphin screen reader (windows). some are free products, like nvda (windows), chromevox (chrome, windows and mac os x), and orca (linux). some are built into the operating system, like voiceover (macos, ipados, ios), narrator (microsoft windows), chromevox (on chrome os), and talkback (andr...
... impairments otherwise known as people with auditory impairments or deaf people, this group of people has either low hearing levels or no hearing at all. hearing-impaired people do use ats (see assistive devices for people with hearing, voice, speech, or language disorders), but there are not really special ats specific for computer/web use. there are, however, specific techniques for providing
textual alternatives to audio content which range from simple
text transcripts to
text tracks (i.e. captions) that can be displayed along with video. an article, later on, will discuss these. hearing-impaired people also represent a significant userbase — "466 million people worldwide have disabling hearing loss", says the world health organization's deafness and hearing loss fact sheet. people wi...
...within clinical definitions of cognitive impairments, people with them experience a common set of functional problems. these include difficulty with understanding content, remembering how to complete tasks, and confusion caused by inconsistent webpage layouts. ...
...And 3 more matches
CSS values and units - Learn web development
ferred to as a data type, it is really just a fancy way of saying value. note: yes, css values tend to be denoted using angle brackets, to differentiate them from css properties (e.g. the color property, versus the <color> data type). you might get confused between css data types and html elements too, as they both use angle brackets, but this is unlikely — they are used in very different con
texts. in the following example we have set the color of our heading using a keyword, and the background using the rgb() function: h1 { color: black; background-color: rgb(197,93,161); } a value in css is a way to define a collection of allowable sub-values. this means that if you see <color> as valid you don't need to wonder which of the different types of color value can be used — keywor...
...er than screen output. for example we don't typically use cm (centimeters) on screen. the only value that you will commonly use is px (pixels). relative length units relative length units are relative to something else, perhaps the size of the parent element's font, or the size of the viewport. the benefit of using relative units is that with some careful planning you can make it so the size of
text or other elements scale relative to everything else on the page. some of the most useful units for web development are listed in the table below. unit relative to em font size of the parent, in the case of typographical properties like font-size, and font size of the element itself, in the case of other properties like width. ex x-height of the element's f...
...to 1.5em and you will see that the font size of all the elements increases, but only the last item will get wider, as the width is relative to that font size. after following the instructions above, try playing with the values in other ways, to see what you get. ems and rems em and rem are the two relative lengths you are likely to encounter most frequently when sizing anything from boxes to
text. it's worth understanding how these work, and the differences between them, especially when you start getting on to more complex subjects like styling
text or css layout. the below example provides a demonstration. the html is a set of nested lists — we have three lists in total and both examples have the same html. the only difference is that the first has a class of ems and the second a clas...
...And 3 more matches
Practical positioning examples - Learn web development
anging the information shown using a javascript feature such as xmlhttprequest. at this point in your learning however we want to keep things as simple as possible. there is some javascript later on, but only a tiny bit. to start with, we'd like you to make a local copy of the starting html file — info-box-start.html. save this somewhere sensible on your local computer, and open it up in your
text editor. let's look at the html contained within the body: <section class="info-box"> <ul> <li><a href="#" class="active">tab 1</a></li> <li><a href="#">tab 2</a></li> <li><a href="#">tab 3</a></li> </ul> <div class="panels"> <article class="active-panel"> <h2>the first tab</h2> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit. pellentesque turpis nibh...
...dth is set to 150px so they will comfortably fit across the info-box. the <a> elements are set to display inline-block so they will sit in a line but still be stylable, and they are styled appropriately for tab buttons, using a variety of other properties. add the following css: .info-box li { float: left; list-style-type: none; width: 150px; } .info-box li a { display: inline-block;
text-decoration: none; width: 100%; line-height: 3; background-color: red; color: black;
text-align: center; } finally for this section we'll set some styles on the link states. first, we'll set the :focus and :hover states of the tabs to look different when they are focused/hovered, providing users with some visual feedback. secondly, we'll set a rule that puts the same styling on one of t...
...: #a60000; color: white; } .info-box li a.active { background-color: #a60000; color: white; } styling the panels the next job is to style our panels. let's get going! first, of all, add the following rule to style the .panels <div> container. here we simply set a fixed height to make sure the panels fit snugly inside the info-box, position relative to set the <div> as the positioning con
text, so you can then place positioned child elements relative to it and not the <html> element, and finally we clear the float set in the css above so that it doesn't interfere with the remainder of the layout. .info-box .panels { height: 352px; position: relative; clear: both; } finally for this section, we will style the individual <article> elements that comprise our panels. the first rule...
...And 3 more matches
Typesetting a community school homepage - Learn web development
starting point to get this assessment started, you should: go and grab the html and css files for the exercise, and the provided external link icon. make a copy of them on your local computer. alternatively, you could use a site like jsbin or glitch to do your assessment. ...
... starting point to get this assessment started, you should: go and grab the html and css files for the exercise, and the provided external link icon. make a copy of them on your local computer. alternatively, you could use a site like jsbin or glitch to do your assessment. ...
... at the bottom of the css file, to make sure it is easy to mark the bits you have done. don't worry if some of the selectors are repetitious; we'll let you off in this instance. fonts: first of all, download a couple of free-to-use fonts. because this is a college, the fonts should be chosen to give the page a fairly serious, formal, trustworthy feel — a serif site-wide font for the general
text body, coupled with sans-serif or slab serif for the headings might be nice. use a suitable service to generate bulletproof @font-face code for these two fonts. apply your body font to the whole page, and your heading font to your headings. general
text styling: give the page a site-wide font-size of 10px. give your headings and other element types appropriate font-sizes defined using a su...
...And 3 more matches
Example - Learn web development
this is the example code for the article your first html form. ...
... example code for the article your first html form. ...
... html form. ...
...And 3 more matches
Debugging HTML - Learn web development
previous overview: introduction to html next writing html is fine, but what if something goes wrong, and you can't work out where the error in the code is? this article will introduce you to some tools that can help you find and fix errors in html. prerequisites: html familiarity, as covered in, for example, getting started with html, html
text fundamentals, and creating hyperlinks. objective: learn the basics of using debugging tools to find problems in html. debugging isn't scary when writing code of some kind, everything is usually fine, until that dreaded moment when an error occurs — you've done something wrong, so your code doesn't work — either not at all, or not quite how you wanted it to. for example, the following shows an error reported...
...nd list item elements have no closing tags. looking at the image above, this doesn't seem to have affected the markup rendering too badly, as it is easy to infer where one element should end and another should begin. the first <strong> element has no closing tag. this is a bit more problematic, as it isn't easy to tell where the element is supposed to end. in fact, the whole of the rest of the
text has been strongly emphasised. this section is badly nested: <strong>strong <em>strong emphasised?</strong> what is this?</em>. it is not easy to tell how this has been interpreted because of the previous problem. the href attribute value is missing a closing double quote. this seems to have caused the biggest problem — the link has not rendered at all. now let's look at the markup t...
...kup looks like: using the dom inspector, let's explore our code in detail to see how the browser has tried to fix our html errors (we did the review in firefox; other modern browsers should give the same result): the paragraphs and list items have been given closing tags. it isn't clear where the first <strong> element should be closed, so the browser has wrapped each separate block of
text with its own strong tag, right down to the bottom of the document! the incorrect nesting has been fixed by the browser as shown here: <strong>strong <em>strong emphasised?</em> </strong> <em> what is this?</em> the link with the missing double quote has been deleted altogether. the last list item looks like this: <li> <strong>unclosed attributes: another common source of htm...
...And 3 more matches
nsIJSON
omponents.interfaces.nsijson); method overview note: the idl file has portions of the idl commented out because they represent things that can't actually be properly described by idl; however, for the purposes of this article, we'll pretend they can be and ignore that issue. ...
...hey can be and ignore that issue. ...
... note: this method is more flexible than it should be, and accepts some not-correctly-structured json. ...
...And 3 more matches
nsIParserUtils
x 14.0 / thunderbird 14.0 / seamonkey 2.11) warning: do not use this from within gecko--use nscontentutils, nstreesanitizer, and so on directly instead. ...
...opforms (1 << 4) flag for sanitizer: drops forms and form controls (excluding <fieldset> and <legend>. sanitizerdropmedia (1 << 5) flag for sanitizer: drops <img>, <video>, <audio>, and <source>, and flattens out svg. sanitizerlogremovals (1 << 6) flag for sanitizer: log messages to the console for everything that gets sanitized. methods converttoplain
text() converts html to plain
text. astring converttoplain
text( in astring src, in unsigned long flags, in unsigned long wrapcol ); parameters src the html source to parse (c++ callers are allowed but not required to use the same string for the return value.) flags conversion option flags defined in nsidocumentencoder. wrapcol number of characters per line; 0 for no auto-wrapping. ...
... parsefragment() parses markup into a sanitized document fragment. nsidomdocumentfragment parsefragment( in astring fragment, in unsigned long flags, in boolean isxml, in nsiuri baseuri, in nsidomelement element ); parameters fragment the input markup. flags sanitization option flags defined above. ...
...And 3 more matches
nsISmsService
dom/sms/interfaces/nsismsservice.idlscriptable used to send sms
text messages for the websms api 1.0 66 introduced gecko 13.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsservice;1. ...
... introduced gecko 13.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsservice;1. ...
...sservice = components.classes["@mozilla.org/sms/smsservice;1"] .createinstance(components.interfaces.nsismsservice); method overview [implicit_jscon
text] nsidommozsmsmessage createsmsmessage(in long id, in domstring delivery, in domstring sender, in domstring receiver, in domstring body, in jsval timestamp, in bool read ); unsigned short getnumberofmessagesfor
text(in domstring
text); boolean hassupport(); void send(in domstring number, in domstring message, in long requestid, [optional] in unsigned long long processid); methods createsmsmessage() [implicit_jscon
text] nsidommozsmsmessage createsmsmessage( in long id, in domstring delivery, in domstring sender, in domstring receiver, in domstring body, in jsval timestam...
...And 3 more matches
nsITraceableChannel
var data ...
..., null); // storagestream // not sure why its 8192 but thats how eveyrone is doing it, we should ask why var ostream = new binaryoutputstream(sstream.getoutputstream(0)); // binaryoutputstream // copy received data as they come. ...
...d ask why var ostream = new binaryoutputstream(sstream.getoutputstream(0)); // binaryoutputstream // copy received data as they come. ...
...And 3 more matches
Set a breakpoint - Firefox Developer Tools
onditional) breakpoints and conditional breakpoints. breakpoints in brief breakpoints are very useful when debugging javascript — you basically set a point in your code where you would like execution of the code to pause. at this point you can do useful things like studying the value of different variables at that point, allowing you to work out why a problem is occurring. the source pane con
text menu in the source pane, you can handle setting breakpoints by bringing up the con
text menu over a line number. there are a few options available here: add breakpoint: add a standard unconditional breakpoint at this line number (see below). add condition: add a condition and create a conditional breakpoint (see below). add log: add a log point, which logs a value to your console rather t...
...g point, which logs a value to your console rather than pausing execution as a breakpoint does. continue to here: when stepping through code, this option tells the debugging to continue execution through to this point. unconditional breakpoints an unconditional breakpoint is one where the code will always pause execution when it is reached. you can set an unconditional breakpoint using the con
text menu (see above), or by: clicking on the line number for the line you want to break at in the source pane. highlighting the line you want to break at in the source pane and pressing ctrl + b (windows/linux) or cmd + b (macos). the line number is highlighted in blue: in addition, if the line contains multiple function calls, each one will be given a small blue arrow icon to the left of it...
...low you to set the breakpoint to happen exactly on any one of the function calls in the line (or multiple calls), by clicking on each relevant one. conditional breakpoints a conditional breakpoint is one where the code will pause execution when it is reached, only if a certain condition is met, such a variable having a certain value at the time. ...
...And 3 more matches
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
em. visit the url about:config, and set the devtools.chrome.enabled preference to true: setting the 'devtools.chrome.enabled' preference open a developer scratchpad (menu button > developer > scratchpad), and select "browser" from the "environment" menu. (this menu will not be present unless you have changed the preference as explained above.) selecting the 'browser' con
text in the scratchpad enter the following code in the scratchpad: // this simply defines the 'debugger' constructor in this // scratchpad; it doesn't actually start debugging anything. components.utils.import('resource://gre/modules/jsdebugger.jsm'); adddebuggertoglobal(window); (function () { // the debugger we'll use to observe a tab's allocation. var dbg; // start measuring the...
...make sure the current browser tab is displaying this page. <div onclick="dodivsandspans()"> click here ...
... of children) walk(child, grandchildren, indent + ' '); } walk(null, rootchildren, ''); } })(); in the scratchpad, ensure that no
text is selected, and press the "run" button. (if you get an error complaining that components.utils is not defined, be sure you've selected browser from the scratchpad's environment menu, as described in step 2.) save the following html
text to a file, and visit the file in your browser. make sure the current browser tab is displaying this page. <div onclick="dodivsandspans()"> click here to make the page do some allocations. ...
...And 3 more matches
Index - Firefox Developer Tools
ing, tools, web development, webdevelopment:tools the browser console is like the web console, but applied to the whole browser rather than a single content tab. 15 browser toolbox debug, firefox, javascript the browser toolbox enables you to debug add-ons and the browser's own javascript code rather than just web pages like the normal toolbox. the browser toolbox's con
text is the whole browser rather than just single page on a single tab. 16 dom property viewer dom, tools, web development the dom property viewer lets you inspect the properties of the dom as an expandable tree structure, starting from the window object of the current page or the selected iframe. 17 debugger-api debugger, intermediate, intro, javascript, tools ...
...pt instance may refer to a sequence of bytecode in the debuggee or to a block of webassembly code. for the former, it is the debugger api’s presentation of a jsapi jsscript object. the two cases are distinguished by their format property being "js" or "wasm". 24 debugger.source a debugger.source instance represents either a piece of javascript source code or the serialized
text of a block of webassembly code. the two cases are distinguished by the latter having its introductiontype property always being "wasm" and the former having its introductiontype property never being "wasm". 25 tutorial: set a breakpoint this page shows how you can try out the debugger api yourself using firefox’s scratchpad. we use debugger to set a breakpoint in a functio...
... the selected element is the element in the page that the inspector is currently focused on. the selected element is shown in the html pane and its css is displayed in the css pane. 70 use the inspector api inspector, reference, référence(2), tools firefox add-ons may access the following objects from the chrome://browser/content/devtools/inspector/inspector.xul con
text: 71 use the inspector from the web console guide, inspector, tools the element that's currently selected in the page inspector can be referenced in the web console using the variable $0. 72 view background images in the rules view, you can see a preview of images specified using background-image. just hover over the rule: 73 visualize transfor...
...And 3 more matches
Console messages - Firefox Developer Tools
or javascript, css and console api messages, the message can be traced to a specific line of code. the console then provides a link to the filename and line number that generated the message. by default, the console is cleared each time you navigate to a new page or reload the current page. to override this behavior, enable persist logs in the console settings menu (gear icon). the con
text menu options listed below are available on all message categories. additional con
text menu options are described in the subsection for the message category they apply to. copy message copies the selected message to the clipboard. select all selects all messages available in the message display pane. export visible messages to clipboard copies all messages available in the display pane ...
...onal "xhr" tag indicating this. if more information is available, a disclosure triangle lets you display it, in an embedded panel that is identical to the network monitor request details. uri the target uri. summary the http version, response code, and time taken to complete. clicking the response code takes you to the reference page for that code. the con
text menu for network messages includes a few extra items in addition the globally-available ones: copy link location acts as you would expect, copying the url into the clipboard open in network panel switches con
text to the network tab, selects the request and shows you the details resend request sends the network request again. open url in new tab opens the url in a new browser tab. if t...
...elogger-data. the web console decodes these headers and displays them. to find a suitable library for your server code, see the chrome logger documentation. interpreter input/output commands sent to the browser using the web console's javascript interpreter, and the corresponding responses, are logged in the console messages. for responses that contain objects or variables, the following con
text menu options are available: reveal in inspector shows the selected dom node in the inspector pane. store as global variable creates a global variable (with a name like temp0, temp1, etc.) whose value is the selected object. the name of the variable appears as an input to the interpreter, and its value appears as a response. copy object copies the selected object to the clipboard. filter...
...And 3 more matches
AnalyserNode - Web APIs
lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audionode" target="_top"><rect x="151" y="1" width="90" height...
...naco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audionode" target="_top"><rect x="151" y="1" width="90" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="196" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">audionode</
text></a><polyline points="241,25 251,20 251,30 241,25" stroke="#d4dde4" fill="none"/><line x1="251" y1="25" x2="281" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/analysernode" target="_top"><rect x="281" y="1" width="120" hei...
...andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">audionode</
text></a><polyline points="241,25 251,20 251,30 241,25" stroke="#d4dde4" fill="none"/><line x1="251" y1="25" x2="281" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/analysernode" target="_top"><rect x="281" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="341" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">analysernode</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor analysernode() creates a new instance of an analysernode object. properties inherits properties from its parent, audionode. analys...
...And 3 more matches
AudioListener - Web APIs
properties the position, forward, and up value are set and retrieved using different syntaxes. ...
... properties the position, forward, and up value are set and retrieved using different syntaxes. ...
...x) for setting position, etc. if it supports those, or older methods (like audiolistener.setorientation()) if it still supports those but not the new properties. ...
...And 3 more matches
AudioNode.connect() - Web APIs
t, allowing you to chain multiple connect() calls. in some browsers, older implementations of this interface return undefined. if the destination is an audioparam, connect() returns undefined. exceptions indexsizeerror the value specified as outputindex or inputindex doesn't correspond to an existing input or output. invalidaccesserror the destination node is not part of the same audio con
text as the source node. notsupportederror the specified connection would create a cycle (in which the audio loops back through the same nodes repeatedly) and there are no delaynodes in the cycle to prevent the resulting waveform from getting stuck constructing the same audio frame indefinitely. examples connecting to an audio input the most obvious use of the connect() method is to direct the a...
...ght send the audio from a mediaelementaudiosourcenode—that is, the audio from an html5 media element such as <audio>—through a band pass filter implemented using a biquadfilternode to reduce noise before then sending the audio along to the speakers. this example creates an oscillator, then links it to a gain node, so that the gain node controls the volume of the oscillator node. var audiocon
text = window.audiocon
text || window.webkitaudiocon
text; var audioctx = new audiocon
text(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); audioparam example in this example, we will be altering the gain value of a gainnode using an oscillatornode with a slow frequency value. this technique...
...var audioctx = new audiocon
text(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); audioparam example in this example, we will be altering the gain value of a gainnode using an oscillatornode with a slow frequency value. this technique is know as an lfo-controlled parameter. ...
...And 3 more matches
AudioParam.setTargetAtTime() - Web APIs
gradual change to the audioparam value. this is useful for decay or release portions of adsr envelopes. syntax var paramref = param.settargetattime(target, starttime, timeconstant); parameters target the value the parameter will start to transition towards at the given start time. starttime the time that the exponential transition will begin, in the same time coordinate system as audiocon
text.currenttime. if it is less than or equal to audiocon
text.currenttime, the parameter will start changing immediately. timeconstant the time-constant value, given in seconds, of an exponential approach to the target value. the larger this value is, the slower the transition will be. returns a reference to this audioparam object. some older browser implementations of this interface return void.
...is example, we have a media source with two control buttons (see the webaudio-examples repo for the source code, or view the example live.) when these buttons are pressed, settargetattime() is used to fade the gain value up to 1.0, and down to 0, respectively, with the effect starting after 1 second, and the length of time the effect lasts being controlled by the timeconstant. ...
...ve a media source with two control buttons (see the webaudio-examples repo for the source code, or view the example live.) when these buttons are pressed, settargetattime() is used to fade the gain value up to 1.0, and down to 0, respectively, with the effect starting after 1 second, and the length of time the effect lasts being controlled by the timeconstant. ...
...And 3 more matches
AudioParam.setValueCurveAtTime() - Web APIs
aluecurveattime(values, starttime, duration); parameters values an array of floating-point numbers representing the value curve the audioparam will change through along the specified duration. every value in the array must be a finite number; if any value is nan, infinity, or -infinity, a typeerror exception is thrown. starttime a double representing the time (in seconds) after the audiocon
text was first created that the change in value will happen. if this value is lower than audiocon
text.currenttime, it is clamped to currenttime. duration a double representing the total time (in seconds) over which the parameter's value will change following the specified curve. the specified values are spaced equally along this duration. return value a reference to this audioparam object. some o...
...ions of the web audio api did not ensure this to be the case, causing unexpected results. ...
...udio api did not ensure this to be the case, causing unexpected results. ...
...And 3 more matches
AudioParamDescriptor - Web APIs
gle value which is to be used for all 128 samples // if no automation is scheduled for the moment. } }) return true } } registerprocessor('white-noise-processor', whitenoiseprocessor) next, in our main scripts file we'll load the processor, create an instance of audioworkletnode passing it the name of the processor, and connect the node to an audio graph. ...
...to be used for all 128 samples // if no automation is scheduled for the moment. } }) return true } } registerprocessor('white-noise-processor', whitenoiseprocessor) next, in our main scripts file we'll load the processor, create an instance of audioworkletnode passing it the name of the processor, and connect the node to an audio graph. ...
...8 samples // if no automation is scheduled for the moment. } }) return true } } registerprocessor('white-noise-processor', whitenoiseprocessor) next, in our main scripts file we'll load the processor, create an instance of audioworkletnode passing it the name of the processor, and connect the node to an audio graph. ...
...And 3 more matches
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
gle value which is to be used for all 128 samples // if no automation is scheduled for the moment. } }) return true } } registerprocessor('white-noise-processor', whitenoiseprocessor) next, in our main scripts file we'll load the processor, create an instance of audioworkletnode passing it the name of the processor, and connect the node to an audio graph. ...
...to be used for all 128 samples // if no automation is scheduled for the moment. } }) return true } } registerprocessor('white-noise-processor', whitenoiseprocessor) next, in our main scripts file we'll load the processor, create an instance of audioworkletnode passing it the name of the processor, and connect the node to an audio graph. ...
...8 samples // if no automation is scheduled for the moment. } }) return true } } registerprocessor('white-noise-processor', whitenoiseprocessor) next, in our main scripts file we'll load the processor, create an instance of audioworkletnode passing it the name of the processor, and connect the node to an audio graph. ...
...And 3 more matches
BroadcastChannel: message event - Web APIs
the message event is fired on a broadcastchannel object when a message arrives on that channel. bubbles no cancelable no interface messageevent event handler property onmessage examples live example in this example there's a "sender" <iframe> that broadcasts the contents of a <
textarea> when the user clicks a button. ...
... event handler property onmessage examples live example in this example there's a "sender" <iframe> that broadcasts the contents of a <
textarea> when the user clicks a button. there are two "receiver" iframes that listen to the broadcast message and write the result into a <div> element. ...
...live example in this example there's a "sender" <iframe> that broadcasts the contents of a <
textarea> when the user clicks a button. there are two "receiver" iframes that listen to the broadcast message and write the result into a <div> element. ...
...And 3 more matches
Using the CSS Typed Object Model - Web APIs
we iterate through the style map, creating a...
...we iterate through the style map, creating a <dt> and <dd> for each property and value respectively. in browsers that support computedstylemap(), you'll see a list of all the css properties and...
...omputedstylemap() const allcomputedstyles = myelement.computedstylemap(); // array of properties we're interested in const ofinterest = ['font-weight', 'border-left-color', 'color', '--color']; // iterate through our properties of interest for ( let i = 0; i < ofinterest.length; i++ ) { // properties const cssproperty = document.createelement('dt'); cssproperty.appendchild(document.create
textnode(ofinterest[i])); styleslist.appendchild(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.create
textnode( allcomputedstyles.get(ofinterest[i]))); styleslist.appendchild(cssvalue); } we included border-left-color to demonstrate that, had we included all the properties, every value that defaults to currentcolor (including caret-c...
...And 3 more matches
Document.getElementsByTagNameNS() - Web APIs
ts matching the tag name parameter. note that when the node on which getelementsbytagname is invoked is not the document node, in fact the element.getelementsbytagnamens method is used. to use the following example, just copy/paste it into a new file saved with the .xhtml extension. ...
...rt("there are " + num + " <p> elements in div1 element"); } function div2paraelems() { var div2 = document.getelementbyid("div2") var div2paras = div2.getelementsbytagnamens("http://www.w3.org/1999/xhtml", "p"); var num = div2paras.length; alert("there are " + num + " <p> elements in div2 element"); } </script> </head> <body style="border: solid green 3px"> <p>some outer
text</p> <p>some outer
text</p> <div id="div1" style="border: solid blue 3px"> <p>some div1
text</p> <p>some div1
text</p> <p>some div1
text</p> <div id="div2" style="border: solid red 3px"> <p>some div2
text</p> <p>some div2
text</p> </div> </div> <p>some outer
text</p> <p>some outer
text</p> <button onclick="getallparaelems();"> show all p elements in document</b...
...ts children, identifying all @xmlns instances, etc.) would be necessary to find all tags with the desired local name and namespace, but xpath is much faster. ...
...And 3 more matches
Example - Web APIs
<html> <head> <title>my document</title> <script type="
text/javascript"> function change() { // document.getelementsbytagname("h1") returns a nodelist of the h1 // elements in the document, and the first is number 0: var header = document.getelementsbytagname("h1").item(0); // the firstchild of the header is a
text node: header.firstchild.data = "a dynamic document"; // now the header is "a dynamic document". ...
...n the document, and the first is number 0: var header = document.getelementsbytagname("h1").item(0); // the firstchild of the header is a
text node: header.firstchild.data = "a dynamic document"; // now the header is "a dynamic document". ...
... var header = document.getelementsbytagname("h1").item(0); // the firstchild of the header is a
text node: header.firstchild.data = "a dynamic document"; // now the header is "a dynamic document". ...
...And 3 more matches
Element.localName - Web APIs
the element.localname read-only property returns the local part of the qualified name of an element. in previous dom specifications this api was defined within the node interface. syntax name = element.localname return value a domstring representing the local part of the element's qualified name. ...
...erface. syntax name = element.localname return value a domstring representing the local part of the element's qualified name. ...
....localname return value a domstring representing the local part of the element's qualified name. ...
...And 3 more matches
File.getAsBinary() - Web APIs
ad. syntax var binary = instanceoffile.getasbinary(); returns a string. ...
...x var binary = instanceoffile.getasbinary(); returns a string. ...
...= instanceoffile.getasbinary(); returns a string. ...
...And 3 more matches
HTMLAudioElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 3 more matches
HTMLInputElement.setSelectionRange() - Web APIs
the htmlinputelement.setselectionrange() method sets the start and end positions of the current
text selection in an <input> or <
textarea> element. optionally, in newer browser versions, you can specify the direction in which selection should be considered to have occurred. this lets you indicate, for example, that the selection was set by the user clicking and dragging from the end of the selected
text toward the beginning. this method updates the htmlinputelement.selectionstart, selectionend, and selectiondirection properties in one call. note that accordingly to the whatwg forms spec selectionstart, selectionend properties and setselectionrange method apply only to inputs of types
text, search, url, tel and password. chrome, starting from version 33, throws an exception while accessing ...
... syntax element.setselectionrange(selectionstart, selectionend [, selectiondirection]); parameters if selectionend is less than selectionstart, then both are treated as the value of selectionend. selectionstart the 0-based index of the first selected character. ...
...nt's value is treated as pointing to the end of the value. selectiondirection optional a string indicating the direction in which the selection is considered to have been performed. possible values: "forward" "backward" "none" if the direction is unknown or irrelevant. default value. ...
...And 3 more matches
HTMLMenuElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 3 more matches
HTMLElement.focus() - Web APIs
contain the following property: preventscroll optional a boolean value indicating whether or not the browser should scroll the document to bring the newly-focused element into view. a value of false for preventscroll (the default) means that the browser will scroll the element into view after focusing it. if preventscroll is set to true, no scrolling will occur. ...
...r not the browser should scroll the document to bring the newly-focused element into view. a value of false for preventscroll (the default) means that the browser will scroll the element into view after focusing it. if preventscroll is set to true, no scrolling will occur. ...
...t to bring the newly-focused element into view. a value of false for preventscroll (the default) means that the browser will scroll the element into view after focusing it. if preventscroll is set to true, no scrolling will occur. ...
...And 3 more matches
HTMLVideoElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 3 more matches
InputEvent.dataTransfer - Web APIs
the datatransfer read-only property of the inputevent interface returns a datatransfer object containing information about rich
text or plain
text data being added to or removed from editible content. syntax var datatransfer = inputevent.datatransfer value a datatransfer object. examples in the following simple example we've set up an event listener on the input event so that when any content is pasted into the contenteditable <p> element, its html source is retrieved via the inputevent.datatransfer.getdata() method and reported in the paragraph below the input. try copying and pasting some of the content provided to see the effects. ...
...mple example we've set up an event listener on the input event so that when any content is pasted into the contenteditable <p> element, its html source is retrieved via the inputevent.datatransfer.getdata() method and reported in the paragraph below the input. try copying and pasting some of the content provided to see the effects. ...
...t is pasted into the contenteditable <p> element, its html source is retrieved via the inputevent.datatransfer.getdata() method and reported in the paragraph below the input. try copying and pasting some of the content provided to see the effects. ...
...And 3 more matches
KeyboardEvent - Web APIs
be a user interaction with the keyboard; each event describes a single interaction between the user and a key (or combination of a key with modifier keys) on the keyboard. the event type (keydown, keypress, or keyup) identifies what kind of keyboard activity occurred. note: keyboardevent events just indicate what interaction the user had with a key on the keyboard at a low level, providing no con
textual meaning to that interaction. when you need to handle
text input, use the input event instead. keyboard events may not be fired if the user is using an alternate means of entering
text, such as a handwriting system on a tablet or graphics tablet. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: mi...
...nline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill=...
...="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="153.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">uievent</
text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#d4dde4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/keyboardevent" target="_top"><rect x="231" y="1" width="130" he...
...And 3 more matches
OscillatorNode - Web APIs
it always has exactly one output and no inputs. ...
... 1 channel count mode max channel count 2 (not used in the default count mode) channel interpretation speakers constructor oscillatornode() creates a new instance of an oscillatornode object, optionally providing an object specifying default values for the node's properties. if the default values are acceptable, you can simply call the baseaudiocon
text.createoscillator() factory method. properties inherits properties from its parent, audioscheduledsourcenode, and adds the following properties: oscillatornode.frequency an a-rate audioparam representing the frequency of oscillation in hertz (though the audioparam returned is read-only, the value it represents is not). the default value is 440 hz (a standard middle-a note). oscillatorno...
...scribes a periodic waveform to be used instead of one of the standard waveforms; calling this sets the type to custom. this replaces the now-obsolete oscillatornode.setwavetable() method. oscillatornode.start() specifies the exact time to start playing the tone. oscillatornode.stop() specifies the time to stop playing the tone. ...
...And 3 more matches
ReadableStreamDefaultReader.read() - Web APIs
put to the ui as an array of utf-8 bytes, until the stream has finished being read, at which point we return out of the recursive function and print the entire stream to another part of the ui. ...
...sreceived = 0; // read() returns a promise that resolves // when a value has been received reader.read().then(function process
text({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data. // value - some data. always undefined when done is true. if (done) { console.log("stream complete"); para.
textcontent = result; return; } // value for fetch streams is a uint8array charsreceived += value.length; const chunk = value; let listitem = document.createelement('li'); listitem.
textcontent = 'received ' + charsreceived + ' characters so far. current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this functio...
... value for fetch streams is a uint8array charsreceived += value.length; const chunk = value; let listitem = document.createelement('li'); listitem.
textcontent = 'received ' + charsreceived + ' characters so far. current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(process
text); }); } example 2 - handling
text line by line this example shows how you might fetch a
text file and handle it as a stream of
text lines. ...
...And 3 more matches
SVGAnimateElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 3 more matches
SVGAnimateMotionElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 3 more matches
SVGAnimateTransformElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 3 more matches
SVGFEFuncAElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 3 more matches
SVGFEFuncBElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 3 more matches
SVGFEFuncGElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 3 more matches
SVGFEFuncRElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 3 more matches
getBBox() - Web APIs
etboundingclientrect(), as the latter returns value relative to the viewport syntax let bboxrect = object.getbbox(); return value the returned value is a svgrect object, which defines the bounding box. this value is irrespective of any transformation attribute applied to it or the parent elements. ...
...ct(), as the latter returns value relative to the viewport syntax let bboxrect = object.getbbox(); return value the returned value is a svgrect object, which defines the bounding box. this value is irrespective of any transformation attribute applied to it or the parent elements. ...
...rt syntax let bboxrect = object.getbbox(); return value the returned value is a svgrect object, which defines the bounding box. this value is irrespective of any transformation attribute applied to it or the parent elements. ...
...And 3 more matches
SVGImageElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 3 more matches
SVGLinearGradientElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 3 more matches
SVGRadialGradientElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 3 more matches
TaskAttributionTiming - Web APIs
the taskattributiontiming interface of the long tasks api returns information about the work involved in a long task and its associate frame con
text. the frame con
text, also called the container, is the iframe, embed or object that is being implicated, on the whole, for a long task. ...
... position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performanceentry</
text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/taskattributiontiming" target="_top"><rect x="201" y="1" ...
... taskattrib...
...And 3 more matches
TimeEvent - Web APIs
the timeevent interface, a part of svg smil animation, provides specific con
textual information associated with time events. ...
...nline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/timeevent" target="_top"><rect x="116" y="1" width="90" height="50" fil...
...for this e...
...And 3 more matches
Touch events - Web APIs
of contact between the user and the touch surface. touchlist represents a group of touches; this is used when the user has, for example, multiple fingers on the surface at the same time. example this example tracks multiple touchpoints at a time, allowing the user to draw in a <canvas> with more than one finger at a time. it will only work on a browser that supports touch events. note: the
text below uses the term "finger" when describing the contact with the surface, but it could, of course, also be a stylus or other contact method. create a canvas <canvas id="canvas" width="600" height="600" style="border:solid black 1px;"> your browser does not support canvas element. </canvas> <br> log: <pre id="log" style="border: 1px solid #ccc;"></pre> setting up the event handlers when th...
...vents as they occur. tracking new touches we'll keep track of the touches in-progress. var ongoingtouches = []; when a touchstart event occurs, indicating that a new touch on the surface has occurred, the handlestart() function below is called. ...
...s[i]); ctx.beginpath(); ctx.arc(touches[i].pagex, touches[i].pagey, 4, 0, 2 * math.pi, false); // a circle at the start ctx.fillstyle = color; ctx.fill(); console.log("touchstart:" + i + "."); } } this calls event.preventdefault() to keep the browser from continuing to process the touch event (this also prevents a mouse event from also being delivered). then we get the con
text and pull the list of changed touch points out of the event's touchevent.changedtouches property. after that, we iterate over all the touch objects in the list, pushing them onto an array of active touchpoints and drawing the start point for the draw as a small circle; we're using a 4-pixel wide line, so a 4-pixel radius circle will show up neatly. drawing as the touches move each time one or m...
...And 3 more matches
WebGLTransformFeedback - Web APIs
the webgltransformfeedback interface is part of the webgl 2 api and enables transform feedback, which is the process of capturing primitives generated by vertex processing. it allows to preserve the post-transform rendering state of an object and resubmit this data multiple times. ...
...feedback interface is part of the webgl 2 api and enables transform feedback, which is the process of capturing primitives generated by vertex processing. it allows to preserve the post-transform rendering state of an object and resubmit this data multiple times. ...
...enables transform feedback, which is the process of capturing primitives generated by vertex processing. it allows to preserve the post-transform rendering state of an object and resubmit this data multiple times. ...
...And 3 more matches
Boilerplate 1 - Web APIs
« previousnext » this example describes repeated pieces of code that will be hidden from now on, as well as defining a javascript utility function to make webgl initialization easier. boilerplate code for setting up webgl rendering con
text by now you are quite used to seeing the same pieces of html, css, and javascript repeated again and again. so we are going to hide them from now on. this would allow us to focus on the interesting pieces of code that are most relevant for learning webgl. specifically, the html has a <p> element that contains some descriptive
text about the page and may also hold error messages; a <canvas> element; and optionally a <button>. the css contains rules for body, canvas, and button. any additional non-trivial css and html will be displayed on th...
...specifically, the html has a <p> element that contains some descriptive
text about the page and may also hold error messages; a <canvas> element; and optionally a <button>. the css contains rules for body, canvas, and button. any additional non-trivial css and html will be displayed on the pages of specific examples. in following examples, we will use a javascript helper function, getrenderingcon
text(), to initialize the webgl rendering con
text. by now, you should be able to understand what the function does. basically, it gets the webgl rendering con
text from the canvas element, initializes the drawing buffer, clears it black, and returns the initialized con
text. in case of error, it displays an error message and returns null. finally, all javascript code will run within an immediate functi...
...con
text from the canvas element, initializes the drawing buffer, clears it black, and returns the initialized con
text. in case of error, it displays an error message and returns null. finally, all javascript code will run within an immediate function, which is a common javascript technique (see function). the function declaration and invocation will also be hidden. html <p>[ some descriptive
text about the example. ]</p> <button>[ optional button element. ...
...And 3 more matches
Taking still photos with WebRTC - Web APIs
— the user does not need to see this intermediate stage. we also have an <img> element into which we will draw the image — this is the final display shown to the user. <canvas id="canvas"> </canvas> <div class="output"> <img id="photo" alt="the screen capture will appear in this box."> </div> that's all of the relevant html. the rest is just some page layout fluff and a bit of
text offering a link back to this page. the javascript code now let's take a look at the javascript code. we'll break it up into a few bite-sized pieces to make it easier to explain. initialization we start by wrapping the whole script in an anonymous function to avoid global variables, then setting up various variables we'll be using. (function() { var width = 320; // we will scale the phot...
...e startup() method: clearphoto(); } this is where we call the clearphoto() method we'll describe below in the section clearing the photo box. clearing the photo box clearing the photo box involves creating an image, then converting it into a format usable by the <img> element that displays the most recently captured frame. that code looks like this: function clearphoto() { var con
text = canvas.getcon
text('2d'); con
text.fillstyle = "#aaa"; con
text.fillrect(0, 0, canvas.width, canvas.height); var data = canvas.todataurl('image/png'); photo.setattribute('src', data); } we start by getting a reference to the hidden <canvas> element that we use for offscreen rendering. next we set the fillstyle to #aaa (a fairly light grey), and fill the entire canvas with that...
...bute() to make our captured still box display the image. capturing a frame from the stream there's one last function to define, and it's the point to the entire exercise: the takepicture() function, whose job it is to capture the currently displayed video frame, convert it into a png file, and display it in the captured frame box. ...
...And 3 more matches
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
ne. generalized cameras in general, virtual cameras may or may not be incorporated into physical objects within the scene. indeed, outside the scope of 3d gaming, the odds are far more likely that the camera will not correspond with an object that appears in the scene at all. some examples of ways 3d cameras are used: when rendering animation—whether for filmmaking or for use within the con
text of a presentation or game—the virtual camera is used just like a real-world film camera. as much as possible, standard cinematographic techniques are used, since the viewer has likely grown up watching films using those techniques, and has subconscious expectations that a film or animation will follow those methods. deviating from them can pull the viewer out of the moment. in business applica...
...a around the user, with the majority of the display showing the area ahead of the user's path of motion. when using webgl to accelerate 2d graphics drawing, the camera is typically placed directly above the center of the scene with the distance and field of view set to allow the entire scene to be presented. when accelerating bitmapped graphics, the renderer would draw the 2d image into a webgl
texture's buffer, then redraw the
texture to refresh the screen. this essentially uses the
texture as a backbuffer for performing multiple buffering in your 2d graphics application. cameras in gaming there are many kinds of games, and as such, there are several ways in which cameras might be used in games. some common situations include: in a first-person game, the camera is located within the p...
... converted into a rotation transform matrix; then, finally, the view matrix is multiplied by the rotation transform to complete the rotations. representing 3d with webxr webxr takes 3d graphics a step further, allowing them to be presented using special visual hardware such as goggles or a headset to create 3d graphics that appear to actually exist in three dimensions, potentially within the con
text of the real world (in the case of augmented reality). in order to perceive depth, it's necessary to have two perspectives on the scene. by comparing the two views, it's possible to recognize the depth of objects and, by extension, the distance between the viewer and objects which are seen. this is why we have two eyes, spaced slightly apart. you can remind yourself of this fact by closing one ey...
...And 3 more matches
Lighting a WebXR setting - Web APIs
however, there are issues and details to keep in mind while creating your lighting code, especially for augmented reality (ar) applications. this guide discusses these topics. and while this article provides brief reminders as to how lighting works in general, it is not by any means a tutorial in lighting or a guide to how to create a properly-lit 3d scene. ...
...t source objects and automatically calculate and apply lighting effect for you, webgl does not. fortunately, lighting isn't overly difficult to apply in your own vertex and fragment shaders. ...
... the viewer position and distance. the surface material and reflectivity. ...
...And 3 more matches
Basic concepts behind Web Audio API - Web APIs
ns some of the audio theory behind how the features of the web audio api work, to help you make informed decisions while designing how audio is routed through your app. it won't turn you into a master sound engineer, but it will give you enough background to understand why the web audio api works like it does. audio graphs the web audio api involves handling audio operations inside an audio con
text, and has been designed to allow modular routing. basic audio operations are performed with audio nodes, which are linked together to form an audio routing graph. several sources — with different types of channel layout — are supported even within a single con
text. this modular design provides the flexibility to create complex audio functions with dynamic effects. audio nodes are linked via t...
...nctions with dynamic effects. audio nodes are linked via their inputs and outputs, forming a chain that starts with one or more sources, goes through one or more nodes, then ends up at a destination. although, you don't have to provide a destination if you, say, just want to visualize some audio data. a simple, typical workflow for web audio would look something like this: create the audio con
text. inside the con
text, create sources — such as <audio>, oscillator, or stream. create effects nodes, such as reverb, biquad filter, panner, or compressor. choose the final destination for the audio, such as the user's computer speakers. establish connections from the audio sources through zero or more effects, eventually ending at the chosen destination. channel notation the number of aud...
...ers. each input or output is composed of one or more audio channels, which together represent a specific audio layout. any discrete channel structure is supported, including mono, stereo, quad, 5.1, and so on. audio sources can be obtained in a number of ways: sound can be generated directly in javascript by an audio node (such as an oscillator). created from raw pcm data (the audio con
text has methods to decode supported audio formats). taken from html media elements (such as <video> or <audio>). taken directly from a webrtc mediastream (such as a webcam or microphone). audio data: what's in a sample when an audio signal is processed, sampling means the conversion of a continuous signal to a discrete signal; or put another way, a continuous sound wave, such as a band playing l...
...And 3 more matches
Using IIR filters - Web APIs
irst pass nothing would be sent back: let feedbackward = [1.0126964558, -1.9991880801, 0.9873035442]; note: these values are calculated based on the lowpass filter specified in the filter characteristics of the web audio api specification. as this filter node gains more popularity we should be able to collate more coefficient values. using an iirfilter in an audio graph let's create our con
text and our filter node: const audiocon
text = window.audiocon
text || window.webkitaudiocon
text; const audioctx = new audiocon
text(); const iirfilter = audioctx.createiirfilter(feedforward, feedback); we need a sound source to play. we set this up using a custom function, playsoundnode(), which creates a buffer source from an existing audiobuffer, attaches it to the default destination, starts it ...
...n
text || window.webkitaudiocon
text; const audioctx = new audiocon
text(); const iirfilter = audioctx.createiirfilter(feedforward, feedback); we need a sound source to play. we set this up using a custom function, playsoundnode(), which creates a buffer source from an existing audiobuffer, attaches it to the default destination, starts it playing, and returns it: function playsourcenode(audiocon
text, audiobuffer) { const soundsource = audiocon
text.createbuffersource(); soundsource.buffer = audiobuffer; soundsource.connect(audiocon
text.destination); soundsource.start(); return soundsource; } this function is called when the play button is pressed. the play button html looks like this: <button class="button-play" role="switch" data-playing="false" aria-pressed="false">play</button>...
...or a linear approach, but it's far better when working with frequencies to take a log approach, so let's fill our array with frequency values that get larger further on in the array items. now let's get our response data: iirfilter.getfrequencyresponse(myfrequencyarray, magresponseoutput, phaseresponseoutput); we can use this data to draw a filter frequency plot. we'll do so on a 2d canvas con
text. ...
...And 3 more matches
Web audio spatialization basics - Web APIs
ser or is rotated so the speakers are facing away from them, etc. this is done by setting the different properties of the pannernode object instance in relation to that movement, to emulate spacialization. note: the experience is much better if you use headphones, or have some kind of surround sound system to plug your computer into. ...
...s are facing away from them, etc. this is done by setting the different properties of the pannernode object instance in relation to that movement, to emulate spacialization. note: the experience is much better if you use headphones, or have some kind of surround sound system to plug your computer into. ...
...diocon
text (the interface the audiocon
text is extended from) has a listener property that returns an audiolistener object. this represents the listener of the scene, usually your user. you can define where they are in space and in which direction they are facing. they remain static. the pannernode can then calculate its sound position relative to the position of the listener. ...
...And 3 more matches
Using the slider role - Accessibility
e and describes the effect it has on browsers and assistive technology. the slider role is used for markup that allows a user to select a value from within a given range. the slider role is assigned to the "thumb," the control that is adjusted to change the value. as the user interacts with the thumb, the application must programmatically adjust the slider's aria-valuenow (and possible aria-value
text) attribute to reflect the current value. see the examples section below for more information. keyboard and focus the slider should be keyboard focusable and operable. when the user tabs focus to the slider, it should land on the thumb: the control a mouse user would drag. arrow keys should operate as follows (localization for right-to-left languages should reverse the direction of the arrows): ...
...in the example below, the slider is used to select a day of the week. <label id="day-label">days</label> <div class="day-slider"> <div id="day-handle" class="day-slider-handle" role...
...enow="50" oninput="outputupdate(value)"> <output for="fader" id="volume">50</output> the following code snippet allows you to return the output as it is updated by user input: function outputupdate(vol) { document.queryselector('#volume').value = vol; } example 2:
text values sometimes, a slider is used to choose a value that is not, semantically, a number. in these cases, the aria-value
text attribute is used to provide the appropriate
text name for the currently selected value. ...
...And 3 more matches
ARIA: dialog role - Accessibility
ient to make a dialog accessible. additionally, the following needs to be done: the dialog must be properly labeled keyboard focus must be managed correctly the sections below describe how these two requirements can be met. labeling even though it is not required for the dialog itself to be able to receive focus, it still needs to be labeled. the label given to the dialog will provide con
textual information for the interactive controls inside the dialog. in other words, the dialog's label acts like a grouping label for the controls inside it (similar to how a <legend> element provides a grouping label for the controls inside a <fieldset> element). if a dialog already has a visible title bar, the
text inside that bar can be used to label the dialog itself. the best way to achieve this...
... controls inside it (similar to how a <legend> element provides a grouping label for the controls inside a <fieldset> element). if a dialog already has a visible title bar, the
text inside that bar can be used to label the dialog itself. the best way to achieve this is by using the aria-labelledby attribute to the role="dialog" element. additionally, if the dialog contains additional descriptive
text besides the dialog title, this
text can be associated with the dialog using the aria-describedby attribute. this approach is shown in the code snippet below: <div role="dialog" aria-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully updated</h2> <p id="dialog1desc">you can change your details at any time in the user account...
...attribute. this approach is shown in the code snippet below: <div role="dialog" aria-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully updated</h2> <p id="dialog1desc">you can change your details at any time in the user account section.</p> <button>close</button> </div> keep in mind that a dialog's title and description
text do not have to be focusable in order to be perceived by screen readers operating in a non-virtual mode. the combination of the aria dialog role and labeling techniques should make the screen reader announce the dialog's information when focus is moved into it. required javascript features focus management a dialog has particular requirements for how keyboard focus should be managed: dialog...
...And 3 more matches
ARIA: heading role - Accessibility
the heading role defines this element as a heading to a page or section. to give the page more structure, a level should also be provided to indicate relationships between sections. <div role="heading" aria-level="1">this is a main page heading</div> this defines the
text in the div to be the main heading of the page, indicated by being level 1 via the aria-level attribute. description the heading role indicates to assistive technologies that this element should be treated like a heading. screen readers would read the
text and indicate that it is formatted like a heading. in addition, the level tells assistive technologies which part of the page structure this heading represents. a level 1 heading usually indicates the main heading of a page, a level 2 heading the first subsect...
... event handlers none. changing attribute values usually not required, unless dynamically inserting content. in that case, the newly-added headings need aria-level attributes whose values are consistent with the rest of the document structure. ...
... native <h1> through <h6> element instead to indicate that this
text is a heading, and what part of the structure it represents. examples the following shows a typical page structure. ...
...And 3 more matches
An overview of accessible web applications and widgets - Accessibility
element using display:none. here is an example of a tooltip that uses aria-hidden to control the visibility of the tooltip. the example shows a simple web form with tooltips containing instructions associated with the entry fields. in this example, the html for the tooltip has the form shown in example 2a. line 9 sets the aria-hidden state to true. example 2a. ...
...n to control the visibility of the tooltip. the example shows a simple web form with tooltips containing instructions associated with the entry fields. in this example, the html for the tooltip has the form shown in example 2a. line 9 sets the aria-hidden state to true. example 2a. html for a tooltip <div class="
text"> <label id="tp1-label" for="first">first name:</label> <input type="
text" id="first" name="first" size="20" aria-labelledby="tp1-label" aria-describedby="tp1" aria-required="false" /> <div id="tp1" class="tooltip" role="tooltip" aria-hidden="true">your first name is optional</div> </div> the css for this markup is shown in example 2b. note that there is no custom classname used, only the status of the aria-hidde...
... el.setattribute('aria-hidden', 'false'); } role changes aria allows developers to declare a semantic role for an element that otherwise offers incorrect or no semantics. the role of an element should not change. instead, remove the original element and replace it with an element with the new role. ...
...And 3 more matches
::cue - CSS: Cascading Style Sheets
::cue { color: #fff; background-color: rgba(0, 0, 0, 0.6); } spec...
... ::cue { color: #fff; background-color: rgba(0, 0, 0, 0.6); } specifications s...
... ::cue { color: #fff; background-color: rgba(0, 0, 0, 0.6); } specifications specification s...
...And 3 more matches
::first-line (:first-line) - CSS: Cascading Style Sheets
/* selects the first line of a <p> */ p::first-line { color: red; } css3 introduced the ::first-line notation (with two colons) to distinguish pseudo-classes from pseudo-elements. browsers also accept :first-line, introduced in css2. ...
...see what i mean?</p> <span>th...
...see what i mean?</p> <span>the first line of t...
...And 3 more matches
::selection - CSS: Cascading Style Sheets
the ::selection css pseudo-element applies styles to the part of a document that has been highlighted by the user (such as clicking and dragging the mouse across
text). ::selection { background-color: cyan; } allowable properties only certain css properties can be used with ::selection: color background-color cursor caret-color outline and its longhands
text-decoration and its associated properties
text-emphasis-color
text-shadow in particular, background-image is ignored. ...
...} allowable properties only certain css properties can be used with ::selection: color background-color cursor caret-color outline and its longhands
text-decoration and its associated properties
text-emphasis-color
text-shadow in particular, background-image is ignored. syntax /* legacy firefox syntax (version 61 and below) */ ::-moz-selection ::selection examples html this
text has special styles when you highlight it. ...
... ::selection: color background-color cursor caret-color outline and its longhands
text-decoration and its associated properties
text-emphasis-color
text-shadow in particular, background-image is ignored. syntax /* legacy firefox syntax (version 61 and below) */ ::-moz-selection ::selection examples html this
text has special styles when you highlight it. ...
...And 3 more matches
:host - CSS: Cascading Style Sheets
r words, this allows you to select a custom element from inside its shadow dom. note: this has no effect when used outside a shadow dom. /* selects a shadow root host */ :host { font-weight: bold; } syntax :host examples styling the shadow host the following snippets are taken from our host-selectors example (see it live also). ...
...tom element from inside its shadow dom. note: this has no effect when used outside a shadow dom. /* selects a shadow root host */ :host { font-weight: bold; } syntax :host examples styling the shadow host the following snippets are taken from our host-selectors example (see it live also). ...
...note: this has no effect when used outside a shadow dom. /* selects a shadow root host */ :host { font-weight: bold; } syntax :host examples styling the shadow host the following snippets are taken from our host-selectors example (see it live also). ...
...And 3 more matches
:read-only - CSS: Cascading Style Sheets
we do just this in the example below. ...
...we do just this in the example below. ...
...ipping details), while still being able to submit the information along with the rest of the form. we do just this in the example below. ...
...And 3 more matches
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
pated ways. the external resources and see also sections of this document link to more writing modes resources. the writing modes specification the css writing modes level 3 specification defines the impact a change the document writing mode has on flow layout. ...
... the block flow direction is the direction in which boxes, for example paragraphs, stack in that writing mode. the css writing-mode property controls the block flow direction. ...
...or example paragraphs, stack in that writing mode. the css writing-mode property controls the block flow direction. if you want to change your page, or part of your page, to vertical-lr then you can set writing-mode: vertical-lr on the element and this will change the direction of the blocks and therefore the inline direction as well. while certain languages will use a particular writing mode or
text direction, we can also use these properties for creative effect, such as running a heading vertically. the writing-mode property and block flow the writing-mode property accepts the values horizontal-tb, vertical-rl and vertical-lr. these values control the direction that blocks flow on the page. the initial value is horizontal-tb, which is a top to bottom block flow direction with a horizont...
...And 3 more matches
column-span - CSS: Cascading Style Sheets
ed a spanning element. syntax the column-span property is specified as one of the keyword values listed below. values none the element does not span multiple columns. all the element spans across all columns. content in the normal flow that appears before the element is automatically balanced across all columns before the element appears. the element establishes a new block formatting con
text. formal definition initial valuenoneapplies toin-flow block-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | all examples making a heading span columns in this example, the heading is made to span across all the columns of the article. html <article> <h2>header spanning all of the columns</h2> <p> the h2 should span all the columns.
... initial valuenoneapplies toin-flow block-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | all examples making a heading span columns in this example, the heading is made to span across all the columns of the article. html <article> <h2>header spanning all of the columns</h2> <p> the h2 should span all the columns. ...
...alueas specifiedanimation typediscrete formal syntax none | all examples making a heading span columns in this example, the heading is made to span across all the columns of the article. html <article> <h2>header spanning all of the columns</h2> <p> the h2 should span all the columns. the rest of the
text should be distributed among the columns. </p> <p>this is a bunch of
text split into three columns using the css `columns` property. ...
...And 3 more matches
unset - CSS: Cascading Style Sheets
he property naturally inherits from its parent, and to its initial value if not. in other words, it behaves like the inherit keyword in the first case, when the property is an inherited property, and like the initial keyword in the second case, when the property is a non-inherited property. unset can be applied to any css property, including the css shorthand all. ...
...t, and to its initial value if not. in other words, it behaves like the inherit keyword in the first case, when the property is an inherited property, and like the initial keyword in the second case, when the property is a non-inherited property. unset can be applied to any css property, including the css shorthand all. ...
...haves like the inherit keyword in the first case, when the property is an inherited property, and like the initial keyword in the second case, when the property is a non-inherited property. unset can be applied to any css property, including the css shorthand all. ...
...And 3 more matches
HTML5 Parser - Developer guides
the call happened after the parser was done, the inserted content replaced the document. in ie, such calls are either ignored or imply a call to document.open(), replacing the document. in html5, document.write() can only be called from a script that is created by a <script> tag that does not have the async or defer attributes set. ...
... content replaced the document. in ie, such calls are either ignored or imply a call to document.open(), replacing the document. in html5, document.write() can only be called from a script that is created by a <script> tag that does not have the async or defer attributes set. with the html5 parser, calls to document.write() in any other con
text either are ignored or replace the document. some con
texts from which you should not call document.write() include: scripts created using document.createelement() event handlers settimeout() setinterval() <script async src="..."> <script defer src="..."> if you use the same mechanism for loading script libraries for all browsers including ie, then your code probably will not be affected by this change. scripts that serve racy code to firefox, ...
...nerability. if an attacker could force a premature end-of-file, the parser might change which parts of the document it considered to be executable scripts. in addition, supporting reparsing led to unnecessarily complex parsing code. with html5, parsers no longer reparse documents. this change has the following consequences for web developers: if you omit the closing tag for <title>, <style>, <
textarea>, or <xmp>, the page will fail to be parsed. ie already fails to parse documents with a missing </title> tag, so if you test with ie, you probably don't have that problem. if you forget to close a comment, the page will most likely fail to be parsed. however, unclosed comments often already break in existing browsers for one reason or another, so it's unlikely that you have this issue in sit...
...And 3 more matches
Data URLs - HTTP
in documents. they were formerly known as "data uris" until that name was retired by the whatwg. note: data urls are treated as unique opaque origins by modern browsers, rather than inheriting the origin of the settings object responsible for the navigation. syntax data urls are composed of four parts: a prefix (data:), a mime type indicating the type of data, an optional base64 token if non-
textual, and the data itself: data:[<mediatype>][;base64],<data> the mediatype is a mime type string, such as 'image/jpeg' for a jpeg image file. if omitted, defaults to
text/plain;charset=us-ascii if the data is
textual, you can simply embed the
text (using the appropriate entities or escapes based on the enclosing document's type). otherwise, you can specify base64 to embed base64-encoded binary...
...mage/jpeg' for a jpeg image file. if omitted, defaults to
text/plain;charset=us-ascii if the data is
textual, you can simply embed the
text (using the appropriate entities or escapes based on the enclosing document's type). otherwise, you can specify base64 to embed base64-encoded binary data. you can find more info on mime types here and here. a few examples: data:,hello%2c%20world! ...
...the
text (using the appropriate entities or escapes based on the enclosing document's type). otherwise, you can specify base64 to embed base64-encoded binary data. you can find more info on mime types here and here. a few examples: data:,hello%2c%20world! simple
text/plain data. note the use of percent-encoding (url-encoding) for the quote and space characters. also, for csv data (mime type "
text/csv"), percent-encoding is needed to preserve the line endings that delimit rows of the spreadsheet. data:
text/plain;base64,sgvsbg8sifdvcmxkiq== base64-encoded version of the above data:
text/html,%3ch1%3ehello%2c%20world!%3c%2fh1%3e an html document with <h1>hello, world!</h1> data:
text/html,<script>alert('hi');</script> an html document that executes a javascript alert. note that the closi...
...And 3 more matches
Accept - HTTP
the accept request http header advertises which content types, expressed as mime types, the client is able to understand. using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the content-type response header. browsers set adequate values for this header depending on the con
text where the request is done: when fetching a css stylesheet a different value is set for the request than when fetching an image, video or a script. header type request header forbidden header name no cors-safelisted request header yes, with the additional restriction that values can't contain a cors-unsafe request header byte: 0x00-0x1f (except 0x09 (ht)), "():<>?@[\]{}, and 0x7f (del). syntax accept: <mime...
...t header forbidden header name no cors-safelisted request header yes, with the additional restriction that values can't contain a cors-unsafe request header byte: 0x00-0x1f (except 0x09 (ht)), "():<>?@[\]{}, and 0x7f (del). syntax accept: <mime_type>/<mime_subtype> accept: <mime_type>/* accept: */* // multiple types, weighted with the quality value syntax: accept:
text/html, application/xhtml+xml, application/xml;q=0.9, image/webp, */*;q=0.8 directives <mime_type>/<mime_subtype> a single, precise mime type, like
text/html. <mime_type>/* a mime type, but without any subtype. image/* will match image/png, image/svg, image/gif and any other image types. */* any mime type ;q= (q-factor weighting) any value used is placed in an order of preference expres...
....8 directives <mime_type>/<mime_subtype> a single, precise mime type, like
text/html. <mime_type>/* a mime type, but without any subtype. image/* will match image/png, image/svg, image/gif and any other image types. */* any mime type ;q= (q-factor weighting) any value used is placed in an order of preference expressed using relative quality value called the weight. ...
...And 3 more matches
X-Content-Type-Options - HTTP
e mime types into executable mime types. since then, other browsers have introduced it, even if their mime sniffing algorithms were less aggressive. starting with firefox 72, the opting out of mime sniffing is also applied to top-level documents if a content-type is provided. this can cause html web pages to be downloaded instead of being rendered when they are served with a mime type other than
text/html. make sure to set both headers correctly. site security testers usually expect this header to be set. note: x-content-type-options only apply request-blocking due to nosniff for request destinations of "script" and "style". however, it also enables cross-origin read blocking (corb) protection for html, txt, json and xml files (excluding svg image/svg+xml). header type response...
...cript" and "style". however, it also enables cross-origin read blocking (corb) protection for html, txt, json and xml files (excluding svg image/svg+xml). ...
... living standard initial definition ...
...And 3 more matches
An overview of HTTP - HTTP
http is a protocol which allows the fetching of resources, such as html documents. it is the foundation of any data exchange on the web and it is a client-server protocol, which means requests are initiated by the recipient, usually the web browser. a complete document is reconstructed from the different sub-documents fetched, for instance
text, layout description, images, videos, scripts, and more. clients and servers communicate by exchanging individual messages (as opposed to a stream of data). the messages sent by the client, usually a web browser, are called requests and the messages sent by the server as an answer are called responses. designed in the early 1990s, http is an extensible protocol which has evolved over time. it is an application layer protocol that is sent over tcp, o...
...ed requests and the messages sent by the server as an answer are called responses. designed in the early 1990s, http is an extensible protocol which has evolved over time. it is an application layer protocol that is sent over tcp, or over a tls-encrypted tcp connection, though any reliable transport protocol could theoretically be used. due to its extensibility, it is used to not only fetch hyper
text documents, but also images and videos or to post content to servers, like with html form results. http can also be used to fetch parts of documents to update web pages on demand. components of http-based systems http is a client-server protocol: requests are sent by one entity, the user-agent (or a proxy on behalf of it). most of the time the user-agent is a web browser, but it can be anything,...
...equests corresponding to execution scripts, layout information (css) to display, and sub-resources contained within the page (usually images and videos). the web browser then mixes these resources to present to the user a complete document, the web page. scripts executed by the browser can fetch more resources in later phases and the browser updates the web page accordingly. a web page is a hyper
text document. this means some parts of displayed
text are links which can be activated (usually by a click of the mouse) to fetch a new web page, allowing the user to direct their user-agent and navigate through the web. the browser translates these directions in http requests, and further interprets the http responses to present the user with a clear response. the web server on the opposite side o...
...And 3 more matches
Set - JavaScript
callbackfn[, thisarg]) calls callbackfn once for each value present in the set object, in insertion order. if a thisarg parameter is provided, it will be used as the this value for each invocation of callbackfn. ...
...s callbackfn once for each value present in the set object, in insertion order. if a thisarg parameter is provided, it will be used as the this value for each invocation of callbackfn. ...
...yset.add(5) // set [ 1, 5 ] myset.add('some
text') // set [ 1, 5, 'some
text' ] let o = {a: 1, b: 2} myset.add(o) myset.add({a: 1, b: 2}) // o is referencing a different object, so this is okay myset.has(1) // true myset.has(3) // false, since 3 has not been added to the set myset.has(5) // true myset.has(math.sqrt(25)) // true myset.has('some
text'.tolowercase()) // true myset.has(o) // true myset.size // 5 myset.delete(5) // removes 5 from the set myset.has(5) // false, 5 has been removed myset.size // 4, since we just removed one value console.log(myset) // logs set(4) [ 1, "some
text", {…}, {…} ] in firefox // logs set(4) { 1, "some
text", {…}, {…} } in chrome iterating sets // iterate over ...
...And 3 more matches
Applying SVG effects to HTML content - SVG: Scalable Vector Graphics
you can achieve the same effect using svg filters. <p class="blur">time to clean my glasses</p> <svg height="0"> <defs> <filter id="wherearemyglasses" x="0" y="0"> <fegaussianblur in="sourcegraphic" stddeviation="1"/> </filter> </defs> </svg> you can apply the svg and t...
...you can achieve the same effect using svg filters. <p class="blur">time to clean my glasses</p> <svg height="0"> <defs> <filter id="wherearemyglasses" x="0" y="0"> <fegaussianblur in="sourcegraphic" stddeviation="1"/> </filter> </defs> </svg> you can apply the svg and the css filter in the sa...
...vg height="0"> <defs> <filter id="wherearemyglasses" x="0" y="0"> <fegaussianblur in="sourcegraphic" stddeviation="1"/> </filter> </defs> </svg> you can apply the svg and the css filter in the same class: .blur { filter: url(#wherearemyglasses); } blurring is computation heavy, so ensure to use it sparingly, especially in elements that get scrolled or animated. ...
...And 3 more matches
end - SVG: Scalable Vector Graphics
"60" height="15" width="0"> <animate attributetype="xml" attributename="width" to="75" begin="0s" end="6s" fill="freeze" /> </rect> <rect x="10" y="85" height="15" width="0"> <animate attributetype="xml" attributename="width" to="50" begin="0s" end="4s" fill="freeze" /> </rect> <!-- grid --> <
text x="10" y="20"
text-anchor="middle">0s</
text> <line x1="10" y1="25" x2="10" y2="105" stroke="grey" stroke-width=".5" /> <
text x="35" y="20"
text-anchor="middle">2s</
text> <line x1="35" y1="25" x2="35" y2="105" stroke="grey" stroke-width=".5" /> <
text x="60" y="20"
text-anchor="middle">4s</
text> <line x1="60" y1="25" x2="60" y2="105" stroke="grey" stroke-width=".5" /> <
text ...
...
text-anchor="middle">0s</
text> <line x1="10" y1="25" x2="10" y2="105" stroke="grey" stroke-width=".5" /> <
text x="35" y="20"
text-anchor="middle">2s</
text> <line x1="35" y1="25" x2="35" y2="105" stroke="grey" stroke-width=".5" /> <
text x="60" y="20"
text-anchor="middle">4s</
text> <line x1="60" y1="25" x2="60" y2="105" stroke="grey" stroke-width=".5" /> <
text x="85" y="20"
text-anchor="middle">6s</
text> <line x1="85" y1="25" x2="85" y2="105" stroke="grey" stroke-width=".5" /> <
text x="110" y="20"
text-anchor="middle">8s</
text> <line x1="110" y1="25" x2="110" y2="105" stroke="grey" stroke-width=".5" /> <line x1="10" y1="30" x2="110" y2="30" stroke="grey" stroke-width=".5" /> <line x1="10" y1="105" x2="110" y2="105" stroke="grey" stroke-width=".5" /> ...
... <animate attributetype="xml" attributename="width" from="0" to="100" begin="0s" end="endbutton.click" dur="8s" repeatcount="indefinite" fill="freeze" /> </rect> <!-- trigger --> <rect id="endbutton" style="cursor:pointer;" x="19.5" y="62.5" rx="5" height="25" width="80" fill="#efefef" stroke="black" stroke-width="1" /> <
text x="60" y="80"
text-anchor="middle" style="pointer-events:none;">click me.</
text> <!-- grid --> <
text x="10" y="20"
text-anchor="middle">0s</
text> <line x1="10" y1="25" x2="10" y2="55" stroke="grey" stroke-width=".5" /> <
text x="35" y="20"
text-anchor="middle">2s</
text> <line x1="35" y1="25" x2="35" y2="55" stroke="grey" stroke-width=".5" /> <
text x="60" y="20" t...
...And 3 more matches
font-size-adjust - SVG: Scalable Vector Graphics
rs to specify an aspect value for an element that will preserve the x-height of the first choice font in a substitute font. note: as a presentation attribute, font-size-adjust can be used as a css property. see the css font-size-adjust property for more information. ...
...ecify an aspect value for an element that will preserve the x-height of the first choice font in a substitute font. note: as a presentation attribute, font-size-adjust can be used as a css property. see the css font-size-adjust property for more information. ...
...ust can be used as a css property. see the css font-size-adjust property for more information. as a presentation attribute, it can be applied to any element but it has effect only on the following eight elements: <altglyph>, <
text>, <
textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg width="600" height="80" viewbox="0 0 500 80" xmlns="http://www.w3.org/2000/svg"> <
text y="20" font-family="times, serif" font-size="10px"> this
text uses the times font (10px), which is hard to read in small sizes. ...
...And 3 more matches
stroke-width - SVG: Scalable Vector Graphics
the stroke-width attribute is a presentation attribute defining the width of the stroke to be applied to the shape. ...
... the stroke-width attribute is a presentation attribute defining the width of the stroke to be applied to the shape. ...
... the stroke-width attribute is a presentation attribute defining the width of the stroke to be applied to the shape. ...
...And 3 more matches
stroke - SVG: Scalable Vector Graphics
on attribute defining the color (or any svg paint servers like gradients or patterns) used to paint the outline of the shape; note: as a presentation attribute stroke can be used as a css property. ...
...bute defining the color (or any svg paint servers like gradients or patterns) used to paint the outline of the shape; note: as a presentation attribute stroke can be used as a css property. ...
...cx="15" cy="5" r="4" fill="none" stroke="url(#mygradient)" /> </svg> usage notes value <paint> default value none animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'stroke' in that specification. candidate recommendation definition for shapes and
texts. adds con
text-fill and con
text-stroke. scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke' in that specification. recommendation initial definition for shapes and
texts browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/b...
...And 3 more matches
Creating a status bar extension - Archive of obsolete content
s tutorial won't work in firefox that don't have a static status bar (that is, firefox 4 and up). you can find a more up-to-date tutorial in the xul school tutorial the essentials of an extension. many of the concepts introduced here apply to any xul-based application; however, to keep from getting completely overwhelmed, we're going to focus specifically on firefox. this sample will add a static
text string to the status bar at the bottom of firefox browser windows. if this sounds a lot like the existing building an extension article, you're right. however, this sample will be expanded upon in later articles in the series. download the sample you can download a copy of this sample to look over -- or to use as the basis for your own extension. download the sample the install manifest the insta...
...e bottom of firefox browser windows. if this sounds a lot like the existing building an extension article, you're right. however, this sample will be expanded upon in later articles in the series. download the sample you can download a copy of this sample to look over -- or to use as the basis for your own extension. download the sample the install manifest the install manifest, install.rdf, is a
text file containing information that tells the host application important information about the extension. <?xml version="1.0"?> <rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <em:id>status-bar-sample-1@example.com</em:id> <em:version>1.0</em:version> <em:type>2</em:type> ...
... human-readable information in this sample, we have four pieces of human-readable information; that is, information that is displayed to the user within the firefox interface. these are: property name description em:name the extension's name. this name is displayed in the extensions window. em:description a short, one-line description of the extension. this
text is also displayed in the extensions window. em:creator the author's name. homepageurl the url of a web site the user can visit to get information about the extension, or to look for updates. this is not a required field, but including it is a nice thing to do. target application information it's also necessary to include information that identifies the application or...
...And 2 more matches
Notes on HTML Reflow - Archive of obsolete content
me corresponds to the geometric information for (roughly) a single element in the content model; the frames are arranged into a hierarchy that parallels the containment hierarchy in the content model. a frame is rectangular, with width, height, and an offset from the parent frame that contains it. more than one frame may be needed to represent a single element from the content model; for example,
text that wraps is broken into several frames, one per wrapped line. in this case, the primary frame is the frame containing the first line of
text, with continuing frames (or continuations ) created for subsequent lines. html uses a flow based layout model, meaning that most of the time it is possible to compute the geometry in a single pass. elements later "in the...
...ayout model. all html reflow, including the initial reflow , begins at the root frame , which corresponds to the <html> element of the html document. reflow proceeds recursively through some or all of the frame hierarchy, computing geometric information for each frame object that requires it. reflow may have the side-effect of creating new continuation frames, for example, for a
text frame when the
text must be wrapped. some reflows are immediate in response to user or script actions; for example, resizing the window or changing the document's default font. these are dispatched directly from the presentation shell (e.g., nsipresshell::stylechangereflow), and affect the entire frame tree. other reflows are incremental and are dealt with asynchronously; for ex...
...tal reflow, a frame can assume that none of the constraints computed "from above" (for example, available width) have changed; instead, something "within" the frame has changed, which may have bottom-up impact to the frame hierarchy. resize, when the containing boundary for the frame hierarchy changes. during a resize reflow, the frame can assume that none of the frame's internal state (e.g., a
text frame's
text) has changed; instead, a top-down change in the layout constraints has occurred. stylechange, when the entire frame hierarchy must be traversed to recover from stylistic change; for example, a change in the default font size. dirty, when a container frame has consolidated several individual incremental reflows that have been targeted at its child frames. initial, incremental, re...
...And 2 more matches
Getting Started - Archive of obsolete content
help, messenger, messenger-newsblog and mozapps directories from above. (yes, this means that the structure of your new directory and classic.jar will be slightly different.) creating the install files icon.png and preview.png these are some png images containing the icon and the preview of the theme. chrome.manifest make a copy of chrome.manifest and place it in \my_theme and open it up in your
text editor. this file is a small manifest file which is used to describe the skin. in the code search for all instances of "my_theme" and replace them with the name of your theme. the packages section lists which components of the browser you're modifying. if we also had skins for chatzilla, we would need to add another line resembling the other ones and change it to point to chatzilla. but this list...
...escribe the skin. in the code search for all instances of "my_theme" and replace them with the name of your theme. the packages section lists which components of the browser you're modifying. if we also had skins for chatzilla, we would need to add another line resembling the other ones and change it to point to chatzilla. but this list includes everything that we changed, so just modify the blue
text to point to match the name/version that you used in the sections before this. skin global my_theme jar:chrome/my_theme.jar!/global/ skin mozapps my_theme jar:chrome/my_theme.jar!/mozapps/ skin messenger my_theme jar:chrome/my_theme.jar!/messenger/ skin messenger-newsblog my_theme jar:chrome/my_theme.jar!/messenger-newsblog/ skin communicator my_theme jar:chrome/my_theme.jar!/communicator/ skin he...
...this file is a small xml database that describes the skin. <description about="urn:mozilla:install-manifest"> <em:id>{themes_uuid}</em:id> <em:version>themes_version</em:version> the first section requires that you establish a uuid for your theme and that you give you...
...And 2 more matches
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
new directory called my_theme. into this directory put the browser, global, communicator, help, and mozapps directories from above, as well as the icon.png and preview.png files. (yes, this means that the structure of your new directory and classic.jar will be slightly different.) creating the install files contents.rdf make a copy of contents.rdf, place it in \my_theme and open it up in your
text editor. this file is a small xml database which is used to describe the skin. in the code, search for all instances of "my_theme" and replace them with the name of your theme. the packages section lists which components of the browser you're modifying. if we also had skins for chatzilla, we would need to add another line resembling the other ones and change it to point to chatzilla. but this li...
...ribe the skin. in the code, search for all instances of "my_theme" and replace them with the name of your theme. the packages section lists which components of the browser you're modifying. if we also had skins for chatzilla, we would need to add another line resembling the other ones and change it to point to chatzilla. ...
...this file is a small xml database that describes the skin. ...
...And 2 more matches
JavaScript Client API - Archive of obsolete content
rvices/sync/modules/record.js. there's a base record object, which defines the basic record api. but, you want to use a derived class, cryptowrapper, which seamlessly encrypts and decrypts records on the client. this makes your synchronized data more secure and unreadable by the server operators. all you have to do is write an object that extends cryptowrapper and maintains a property called clear
text. clear
text must be a json-able object. put into it all values that you want to have encrypted, stored on the server, decrypted, and synced up. you may find it useful to write getters and setters for various properties of your record implementation. the skeleton of a sample record implementation: function foorecord(collection, id) { cryptowrapper.call(this, collection, id); } foorecord.pr...
... and synced up. you may find it useful to write getters and setters for various properties of your record implementation. ...
...o write getters and setters for various properties of your record implementation. ...
...And 2 more matches
JavaScript crypto - Archive of obsolete content
services. these services are a balance between the functionality web pages need and the requirement to protect users from malicious web sites. most of these services are available via the dom window object as window.crypto. services are provided to enable: smart card events, generating certificate requests, importing user certs, generating random numbers, logging out of your tokens, and signing
text. handling smart card events web sites can make themselves more smartcard friendly by listening for smartcard insertion and removal events. to enable your document to receive these events, you must first tell the crypto system you are interested by setting window.crypto.enablesmartcardevents to true. you can then register event handlers for these events with the document.addeventlistener() metho...
...tes script script calls key generation method (generatecrmfrequest) signing and encryption keys are generated encryption private key is wrapped with public key of key recovery authority (kra) (passed in in the form of a certificate as part of the script, and checked against a pre-installed certificate copy in the local certificate database) the public keys, wrapped encryption private key, and
text string from the script (possibly containing naming or enrollment info) are signed by the user signed blob is returned to the script script submits signed blob and any other necessary info to the ca/ra ca/ra verifies signature on signed blob ca/ra validates identity of user ca/ra sends wrapped encryption private key to kra kra sends escrow verification back to ca ca creates and signs certif...
... if (typeof(crypto...
...And 2 more matches
Simple Storage - Archive of obsolete content
sole.log(elt));var bar = mystorage.heimelfarbs.bar;jetpack.notifications.show(bar.baz); that's all there is to it! note that these examples create a mystorage variable to emphasize the fact that jetpack.storage.simple is just a normal javascript object. they could have simply used jetpack.storage.simple directly. here's a complete real-world example. it's a simple note-taking jetpack. select some
text on the page, right-click, and select note. the
text will be remembered across browser restarts as a note. all notes are shown in the tools menu. you can install this example from the jetpack gallery. jetpack.future.import("menu");jetpack.future.import("selection");jetpack.future.import("storage.simple");// create the persistent notes array if it doesn't already exist.jetpack.storage.simple.notes ...
... the current notes. we'll add a notes menu with// a submenu, which lists all the notes. ...
...enu(notes.length > 0 ? ...
...And 2 more matches
Example Sticky Notes - Archive of obsolete content
notes.html all parts are made and commented by vk [schools_ring@yahoo.com]. all rights are given to the world. view this example <!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html401/strict.dtd"> <html> <head> <title>xbl demo : sticky notes</title> <meta http-equiv="content-type" content="
text/html; charset=iso-8859-1"> <style type="
text/css"> body { background-color: #ffffff; color: #000000; font: 1em verdana, sans-serif; } h1 { font-size: 1.5em; } /* binding: */ .sticker { -moz-binding: url(notes.xml#default); } </style> </head> <body> <h1><a href="http://developer.mozilla.org/en/docs/xbl:xbl_1.0_reference">xbl</a> demo : sticky notes</h1> <div class="sticker"><p>acme, inc. fax - respond today.</p></div> <div class="sticker"><p>don't forget ...
...around javascript code are not mandatory but recommended. this way you protect yourselve from < and > signs breaking your xml layout. it also speeds up the parsing as the engine doesn't go through cdata sections but simply skip on them. --> <constructor><![cdata[ /** * the code below will be called one time only after * the binding is successfully prepared and bound. * "this" in this con
text refers to the bound element. */ // your code goes here ]]></constructor> <destructor><![cdata[ /** * the code below will be called one time only before * binding is unbound. you cannot cancel this event, * but you may accomplish some last minute clean up. * "this" in this con
text refers to the bound element. */ // your code goes here ]]></destructor> <field name="priority"><![cd...
...clean up. * "this" in this con
text refers to the bound element. */ // your code goes here ]]></destructor> <field name="priority"><![cdata[ /** * new "real" property for the bound element. * within this block the content is interpreted * as javascript code. the result of this code * evaluation (if any) will be used as initial value. */ "normal"; ]]></field> <property name="inner
text"> <!-- new "virtual" property for the bound element. unlike <field> these are really two functions (getter and setter). within the virtual properties you cannot set or get the named property itself. say an attempt to assign this.inner
text='something' will lead to circular setter call and stack overflow. --> <getter><![cdata[ var st = this.innerhtml || ''; if (st != '') { var re = /<\/?
...And 2 more matches
accesskey - Archive of obsolete content
this should be one of the characters that appears in the label attribute for the element. on non-macintosh platforms, the character on the element's label matching the accesskey is underlined. for example, when a menu labeled 'file' has an accesskey of 'f', the generated label will be 'file'. ...
...racters which are same as its accesskey, the first of those characters in the label will be underlined. if a label doesn't have the specified character, the character will be appended to the label with parentheses. for example, when an accesskey of an 'open' label is 'a', the generated label will be 'open (a)'. however, if the last character of the label is an ellipsis or a colon, the accesskey
text is inserted before them. this allows a label of 'open…' with an accesskey of 'a', to have a generated label of 'open (a)…'. similarly, when the label is 'your name:' and the accesskey is 'b', the generated label will be 'your name (b):'. it is recommended that you only use characters that appear in the label. however in some languages, for example, in japanese, characters will not always ma...
...el will be 'your name (b):'. it is recommended that you only use characters that appear in the label. however in some languages, for example, in japanese, characters will not always map directly to single keys, and it is quite common to have labels which cannot have a single accesskey. for these languages, you can assign an accesskey different than any of the label characters, and the accesskey
text will always be appended as described above. for consistency, this occurs for languages such as japanese even if the labels have their accesskey characters. for example, when an the accesskey for an 'ok' button is 'o', and the accesskey for the button labeled 'キャンセル' (which means 'cancel') is 'c', the labels will be 'ok(o)' and 'キャンセル(c)'. example <vbox> <label val...
...And 2 more matches
Attribute (XUL) - Archive of obsolete content
« xul reference home accel
text accessible accesskey activetitlebarcolor afterselected align allowevents allownegativeassertions alternatingbackground alwaysopenpopup attribute autocheck autocompleteenabled autocompletepopup autocompletesearch autocompletesearchparam autofill autofillaftermatch autoscroll beforeselected buttonaccesskeyaccept buttonaccesskeycancel buttonaccesskeydisclosure buttonaccesskeyextra1 buttonaccesskeyextra2 buttonaccesskeyhelp buttonalign buttondir buttondisabledaccept buttonlabelaccept buttonlabelcancel buttonlabeldisclosure buttonlabelextra1 buttonlabelextra2 buttonlabelhelp buttonorient buttonpack buttons checked checkstate clicktoscroll class closebutton closemenu coalesceduplicatearcs collapse collapsed co...
...ttonalign buttondir buttondisabledaccept buttonlabelaccept buttonlabelcancel buttonlabeldisclosure buttonlabelextra1 buttonlabelextra2 buttonlabelhelp buttonorient buttonpack buttons checked checkstate clicktoscroll class closebutton closemenu coalesceduplicatearcs collapse collapsed color cols command commandupdater completedefaultindex container containment contentcon
textmenu contenttooltip con
text con
textmenu control crop curpos current currentset customindex customizable cycler datasources decimalplaces default defaultbutton defaultset description dir disableautocomplete disableautoselect disableclose disabled disablehistory disablekeynavigation disablesecurity dlgtype dragging editable editortype element empty empty
text deprecat...
...on dir disableautocomplete disableautoselect disableclose disabled disablehistory disablekeynavigation disablesecurity dlgtype dragging editable editortype element empty empty
text deprecated since gecko 2 enablecolumndrag enablehistory equalsize eventnode events expr firstdayofweek firstpage first-tab fixed flags flex focused forcecomplete grippyhidden grippytooltip
text group handlectrltab height helpuri hidden hidechrome hidecolumnpicker hideheader hideseconds hidespinbuttons highlightnonmatches homepage href icon id ignoreblurwhilesearching ignorecase ignoreincolumnpicker ignorekeys image inactivetitlebarcolor increment index inputtooltip
text insertafter insertbefore instantapply inverted iscontainer isempty key keycode keyte...
...And 2 more matches
XUL Events - Archive of obsolete content
event description blur the opposite of the focus event, the blur event is passed after an element loses the focus. attribute: onblur change this event is sent when the value of the
textbox is changed. the event is not sent until the focus is moved to another element. attribute: onchange click this event is sent when a mouse button is pressed and released. you can determine which mouse button was clicked by retrieving the button property of the event object. this event is also sent w...
... the focus while a key is pressed but not released. attribute: onkeydown keypress the keypress event is sent to an element that has the focus when a key is pressed and released. when the user presses a key, the keydown event is sent first, followed by the keypress event and then the keyup event. in a
textbox, a user can normally hold down a key to repeat a character in this case, multiple sets of key events are sent (as if the user pressed the same key repeatedly). attribute: onkeypress keyup the keyup event is sent to an element that has the focus when a key is released. attribute: onkeyu...
...led in all of the needed cases. attribute: oncommand commandupdate this event occurs when a command update occurs on a <commandset> element. you would use this to update the disabled status of its commands. attribute: oncommandupdate con
textmenu this event is sent to an element when the user requests to open the con
text menu for the element. the action to do this varies by platform, but it will typically be a right click. this handler is usually used to dynamically set the commands on a menu when the user requests to display it, or you can use popupshowing event. returning false from this event handle...
...And 2 more matches
PopupEvents - Archive of obsolete content
popup events there are several events related to popups and menus. an overview of these is listed below: con
textmenu this event is fired when a request is made to open a con
text menu, whether by the keyboard or mouse. this event will be fired even for elements that don't have a con
text menu associated with them. for more information about how to use this event, see con
text menu events. popupshowing this event is fired on a menupopup, panel or tooltip just before it is made visible. this event is most commonly used to add or adjust items on the popup based on the con
text. popupshown this event is fired on a menupopup, panel or tooltip once it is visible on screen. popuphiding this even...
...s been hidden. the popupshowing event just before a popup is about to be displayed, a popupshowing event will fired on the popup. this will occur regardless of how the popup is opened, either from user interaction or from a script calling the openpopup or openpopupatscreen methods. the typical usage of a listener of the popupshowing event is to adjust the content of the popup based on con
text. ...
... to be displayed, a popupshowing event will fired on the popup. this will occur regardless of how the popup is opened, either from user interaction or from a script calling the openpopup or openpopupatscreen methods. the typical usage of a listener of the popupshowing event is to adjust the content of the popup based on con
text. for instance, right clicking on an image might display items on a con
text menu pertaining to images, whereas clicking on a link would display only those items pertaining to links. within the listener for the popupshowing event, you can append to or modify the menu as needed before it is displayed. for examples of the use of the popupshowing event when used with con
text menus, see hiding and showing menu items based on con
text. however, this technique can be applied to ...
...And 2 more matches
Attribute Substitution - Archive of obsolete content
s sometimes useful though, to concatenate two values together without a space. this can be done simply by putting two variables next to each other in an attribute value separated by a caret (^). <label value="?name" class="?gender^?nationality"/> the caret is considered a separator between variables, however it will not appear in the output. it can also be used to separate a variable with normal
text: <label value="?name" class="?gender^german"/> these last two examples have been setting the class attribute on a label. the effect will be that a label will have either the 'malegerman' or 'femalegerman' class. in a stylesheet, you could set properties for each of these classes such that different values appear differently without having to use multiple rules. although not common, you may also ...
... row are only needed after a variable. one last thing to point out is that since the only characters that can separate a variable are a caret, a space or the end of the attribute, this means that any other character is valid as a variable name. however, for readability, you should restrict variable names to letters, numbers and perhaps hyphens to separate words. ...
...a variable are a caret, a space or the end of the attribute, this means that any other character is valid as a variable name. however, for readability, you should restrict variable names to letters, numbers and perhaps hyphens to separate words. it may be desirable to have longer
text wrap by placing it as the content of a description element. this means that we want to do variable replacement as
text, not as an attribute value. a special tag is used for this purpose, the
textnode tag. it has one attribute, the value attribute, which may use variable substitution like other attributes. however, the
textnode element is not copied into the generated content, but instead a dom
text node is created with the value of the value attribute as its contents. for instance, if the template contained: <des...
...And 2 more matches
The Joy of XUL - Archive of obsolete content
pers and their managers to xul so they can not only understand why mozilla's platform is based on it, but how they might adopt it for their own use. xul (pronounced "zool") is mozilla's xml-based user interface language that lets you build feature rich cross-platform applications that can run connected to or disconnected from the internet. these applications are easily customized with alternative
text, graphics, and layout so they can be readily branded or localized for various markets. web developers already familiar with dynamic html (dhtml) will learn xul quickly and can start building applications right away. also described are some reasons application developers might choose to leverage xul and mozilla technology for building cross-platform applications. this same investigation will prov...
...rce the benefits of building applications with mozilla. key features and benefits powerful widget-based markup language the goal of xul is to build cross platform applications, in contrast with dhtml which is intended for developing web pages. for this reason, xul is oriented toward application artifacts such as windows, labels, and buttons instead of pages, heading levels, and hyper
text links. in fact, many developers invest a significant amount of effort to achieve these results in their dhtml web applications but at the cost of complexity and performance and without any supporting standards. based on existing standards xul is an xml language based on w3c standard xml 1.0. applications written in xul are based on additional w3c standard technologies featurin...
...lient application logic. this poses a significant problem in team environments because the skills required to develop these two parts are often satisfied by different people. xul provides a clear separation among the client application definition and programmatic logic ("content" consisting of xul, xbl, and javascript), presentation ("skin" consisting of css and images), and language-specific
text labels ("locale" consisting of dtds and string bundles in .properties files). the layout and appearance of xul applications can be altered independently of the application definition and logic. further, the application can be localized for different languages and regions independently of its logic or presentation. this degree of separation results in applications that are easier to maintain ...
...And 2 more matches
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
ttons to the toolbar palette, rather than adding them directly to the toolbar. the latter is possible, but is not recommended and is harder to implement. adding a button to the toolbar palette is very easy. ...
... set the command to be executed when the button is clicked in the oncommand attribute. if you need to handle middle-click, add this line after the oncommand line. ...
... attribute. if you need to handle middle-click, add this line after the oncommand line. onclick="checkformiddleclick(this, event)" you can also handle middle-click and right-click using onclick handler and check event.button in it like this: <toolbarpalette id="browsertoolbarpalette"> <toolbarbutton id="myextension-button" class="toolbarbutton-1" label="&toolbarbutton.label;" tooltip
text="&toolbarbutton.tooltip;" onclick="myextension.onclick(event);"/> </toolbarpalette> onclick: function(event) { switch(event.button) { case 0: // left click break; case 1: // middle click break; case 2: // right click break; } } to add more buttons, put more <toolbarbutton> elements inside the <toolbarpalette> element. wrap elements other than <toolbarbutton> in <toolbaritem>. adding the b...
...And 2 more matches
Commands - Archive of obsolete content
pplications. for instance, in order to implement the clipboard menu commands, cut, copy and paste, you can use commands. if you did not use commands, you would need to figure out which field has the focus, then check to ensure that the operation is suitable for that element. ...
...you should use them when the operation depends on which element is focused. a command is identified by its id attribute. mozilla uses the convention that command id's start with 'cmd_'. ...
...controller by looking at the currently focused element to see if it has a controller which can handle the command. xul elements have a controllers property which is used to check. you can use the controllers property to add your own controllers. you might use this to have a listbox respond to cut, copy and paste operations, for instance. an example of this will be provided later. by default, only
textboxes have a controller that does anything. the
textbox controller handles clipboard operations, selection, undo and redo as well as some editing operations. note that an element may have multiple controllers, which will all be checked. if the currently focused element does not have a suitable controller, the window is checked next. the window also has a controllers property which you can modify ...
...And 2 more matches
Styling a Tree - Archive of obsolete content
e the style sheet can take this property and use it to change the appearance of the row for unread messages or labels. you can think of the properties as functioning much like style classes, although they require a somewhat more complex syntax to use in a style sheet. this is because you can specify the style for a number of parts of the cell individually. you can style not only the cell and its
text, but the twisty and indentation. the following is the syntax that needs to be used: treechildren::-moz-tree-row(makeitblue) { background-color: blue; } this style which has a complex selector is used to style the background color of rows that have the 'makeitblue' property. this special syntax is needed because the cells themselves are not separate elements. all of the content inside the tre...
...however, css has a concept to access parts of elements considering them to be pseudo-elements. this selector matches some tree rows inside the treechildren element as pseudo-elements. the style sets style rules for particular parts of what it displays. this style rule means, inside a treechildren element, set the background color to blue for all tree rows that have the 'makeitblue' property. the
text '::-moz-tree-row' specifies what content area is desired, which in this case is a row. you can also use the following values: ::-moz-tree-cell: a cell. use this to set borders and background colors. ::-moz-tree-cell-
text: the
text in a cell. use this to set the font and
text color. ::-moz-tree-twisty: the appearance of the twisty used to expand and collapse child rows. ::-moz-tree-image: th...
...tcellproperties : function(row,column,prop){} from gecko 22 you can return a string of space-separated property names from these functions. getrowproperties : function(row){ return ''} getcolumnproperties : function(column,columnelement){ return ''} getcellproperties : function(row,column){ return ''} let's look at an example of changing a specific cell. ...
...And 2 more matches
Using Remote XUL - Archive of obsolete content
this isn't a problem inside an organization that uses mozilla-based browsers exclusively, but for other sites you may need to provide another form of navigation as well. prerequisites to understand this tutorial you should have experience with tag-based languages like html along with basic javascript, css, and the dom. knowledge of xml and its syntax is useful but not required. you also need a
text editor and a web browser that can render xul, like mozilla, or firefox. if you build a xul file along with this tutorial and put it onto a web server, you need to configure your web server to specify the content type of xul files as application/vnd.mozilla.xul+xml. for apache, you can do this by adding the following line to your mime.types file: application/vnd.mozilla.xul+xml .xul alternatel...
...ex="1" /> </window> the menubar element is a container for a series of menus. it can also contain other elements. it serves to group menus together into a single horizontal bar like the one you see at the top of many desktop applications. the menu element defines a pull-down menu, and the button element defines a pressable button. both menus and buttons take a label attribute whose value is the
text to display in the element. source | rendered step 4: menu items menus aren't terribly useful unless they contain selectable items. to add items to a menu, we need to first add a menupopup element and then put menuitem elements within it for each item we want to appear on the menu. <?xml version="1.0"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <menuba...
.../> <button label="search" value="https://www.mozilla.org/search.html" /> </menubar> <iframe src="https://www.mozilla.org/" flex="1" /> </window> the menupopup element is a container for menu items. it represents the rectangular box that appears when you click a menu title. the menuitem element represents a selectable item within the popup. its label attribute contains the
text to display in the item. its value attribute, while defined in the xul specification, has no specific function in xul; it can store any data associated with the item. in our case we use it to store the url of the page to load when the user selects the item from the menu. source | rendered step 5: appearance there's an obvious problem with the menus: their labels look plain. this makes them ug...
...And 2 more matches
XUL element attributes - Archive of obsolete content
being placed in the center of the box. end child elements are placed on the right or bottom edge of the box. if the box is larger than the total size of the children, the extra space is placed on the left or top side. baseline this value applies to horizontally oriented boxes only. it causes the child elements to be aligned so that their
text labels are lined up. stretch this is the default value. the child elements are stretched to fit the size of the box. for a horizontal box, the children are stretched to be the height of the box. for a vertical box, the children are stretched to be the width of the box. if the size of the box changes, the children stretch to fit. use the flex attribute to create eleme...
... that a resource is a container. when generating content from a template this is used to determine which resources from the datasource are containers and thus can have child nodes and which ones are not containers. this attribute should be placed on the same element that the datasources and the ref attribute is on. it may be set to a space-separated list of rdf properties or resources. ...
...rces from the datasource are containers and thus can have child nodes and which ones are not containers. this attribute should be placed on the same element that the datasources and the ref attribute is on. it may be set to a space-separated list of rdf properties or resources. con
text type: id should be set to the value of the id of the popup element that should appear when the user con
text-clicks on the element. a con
text-click varies on each platform. usually it will be a right click. you can use the special value '_child' to indicate the first menupopup child of the element. con
textmenu type: id alternate name for the con
text attribute, but also has a corresponding script property con
textmenu. datasources type: space separated list of datasource uris a space-sep...
...And 2 more matches
editor - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a frame which is expected to contain an editable document. set the value of the editortype attribute to html to create an editor document. mozilla provides two types of editors, the html editor and the plain
text editor. the editor does not provide any editing user interface; you would supply that yourself. however,
text editing, image resizing, and table row and cell editing capabilities are provided. if you do not set the editortype attribute on an editor, you must enable editing using the makeeditable method. to specify the document to load in the editor use the src attribute. however, an issue is that if you specify the src attribute initially on the editor tag in the xul file, the document...
...in the editor editable. enable the design mode of the document loaded in the editor. to edit a new document, set the src attribute to about:blank. to access most of the functionality of the editor, your application must be part of an extension or part of the chrome. xul applications loaded via a url from a web server will not be able to access most of the features of the editor. see the rich
text editing and midas pages for more information about gecko's built-in rich
text editor. attributes editortype, src, type properties accessibletype, commandmanager, contentdocument, contentwindow, docshell, editingsession, editortype, webbrowserfind, webnavigation methods geteditor, gethtmleditor, makeeditable examples this example shows how to made the editor editable by setting th...
...ocument.getelementbyid("myeditor"); // toggle bold for the current selection editor.contentdocument.execcommand("bold", false, null); see the midas overview for more command strings. attributes editortype type: one of the values below the type of editor to use. this value will be overridden depending on the content type of the document in the editor. html an html editor.
text a plain
text editor. src type: uri the uri of the content to appear in the element. type type: string if set to the string content-primary, this editor becomes the primary content for the page. the window for the primary content can be retrieved more conveniently using window.content. properties accessibletype type: integer a valu...
...And 2 more matches
listbox - Archive of obsolete content
the listbox to be retrieved and modified. you may specify the number of rows to display in the list using the rows attribute. additional rows can be viewed using a scroll bar. a listbox is expected to contain listitem elements. all the rows in the listbox are the same height, which is the height of the tallest item in the list. if you wish to create a list with variable height rows, or with non-
text content, you should instead use the richlistbox element. see list controls for more information. attributes disabled, disablekeynavigation, preference, rows, seltype, suppressonselect, tabindex, value properties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, itemcount, listboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppress...
...bel', gems[i].gem); row.appendchild(cell); cell = document.createelement('listcell'); cell.setattribute('label', gems[i].price ); row.appendchild(cell); thelist.appendchild(row); } attributes disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
... use the getrowcount method. seltype type: one of the values below used to indicate whether multiple selection is allowed. single only one row may be selected at a time. (default in listbox and richlistbox.) multiple multiple rows may be selected at once. (default in tree.) for trees, you can also use the following values: cell individual cells can be selected
text rows are selected; however, the selection highlight appears only over the
text of the primary column. for richlistbox, this is new in firefox 3.5. suppressonselect type: boolean if this attribute is not specified, a select event is fired whenever an item is selected, either by the user or by calling one of the select methods. if set to true, the select event is never fired. ...
...And 2 more matches
panel - Archive of obsolete content
horizontal position of the popup specified by the showpopup method. level type: one of the values below specifies whether the panel appears on top of all windows, or just on top of the window the panel is in. if this attribute is not set, the popup window level depends on the platform. on linux, the default value is top, otherwise, the default value is parent. if a panel has one or more
text fields, this attribute should not be set, otherwise ime or on-screen keyboard popups will appear incorrectly. for these reasons, you should avoid setting the level if not needed. top the panel is shown in front of all other normal windows, including those of other applications. parent the panel is shown just above the window the panel is in, but behind other windows above it. if ancho...
...appearing. onpopupshown type: script code this event is sent to a popup after it has been opened, much like the onload event is sent to a window when it is opened. position type: string the position attribute determines where the popup appears relative to the element the user clicked to invoke the popup. this allows you to place the popup on one side of a button. note that a con
text menu will never respect this attribute, always appearing relative to the mouse cursor. this value can be specified either as a single word offering pre-defined alignment positions, or as 2 words specifying exactly which part of the anchor and popup should be aligned. if specified as 2 words, the value indicates which corner or edge of the anchor (the first word) is aligned which which corne...
... hidepopup() return type: no return value closes the popup immediately. moveto( x, y ) return type: no return value moves the popup to a new location defined by screen coordinates (and not client coordinates). if both x and y have the value -1 the call will realign the popup with its anchor node. openpopup( anchor , position , x , y , iscon
textmenu, attributesoverride, triggerevent ) return type: no return value opens the popup relative to a specified node at a specific location. anchor the popup may be either anchored to another node or opened freely. to anchor a popup to a node, supply an anchor node and set the position to a string indicating the manner in which the popup should be anchored. the anchor node do...
...And 2 more matches
popupset - Archive of obsolete content
a container for menupopup, panel and tooltip elements. this element is optional; the given elements need not appear in a popupset container. more information is available in the xul tutorial. ...
...the xul tutorial. ...
...utorial. ...
...And 2 more matches
preference - Archive of obsolete content
type, value, valuefrompreferences methods reset examples <preferences> <preference id="pref_id" name="preference.name" type="int"/> </preferences> see preferences system for a complete example. attributes disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
...f enabling it. name type: string the name of the preference to change. for example, the browser's home page is set with the preference browser.startup.homepage. overview an onchange attribute is an event listener to the object for the event change. a change event is fired in different ways for different xul input elements as listed below: onchange type: script code
textbox when enter key is pressed radio/check box when the state is changed select list when the selected item is changed what is accessible the script con
text at this point can only access the following things: global values/functions i.e. window, document, or any of the functions/objects/variables bound to the window object event object example <?xml version...
...when the state is changed select list when the selected item is changed what is accessible the script con
text at this point can only access the following things: global values/functions i.e. ...
...And 2 more matches
preferences - Archive of obsolete content
ces service. attribute nsiprefbranch rootbranch; the root prefs branch. attribute nsiprefbranch defaultbranch; the root branch of the tree with default values. attribute nsiprefbranch2 rootbranchinternal; the root prefs branch (nsiprefbranch2). ...
...ce. attribute nsiprefbranch rootbranch; the root prefs branch. attribute nsiprefbranch defaultbranch; the root branch of the tree with default values. attribute nsiprefbranch2 rootbranchinternal; the root prefs branch (nsiprefbranch2). ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...And 2 more matches
query - Archive of obsolete content
the query for a template. the attributes and content of the query are dependent on the type of datasource being used. for rdf datasources, the query should contain one content element as well as member and/or triple elements. for xml datasources, the query should have an expr attribute and may optionally contain assign elements. for sql datasources, the query should contain an sql statement as
text. ...
... sql statement as
text. attributes expr examples (example needed) attributes expr type: string for xml queries, an xpath expression which returns results. any namespace prefixes declared on the element may be used within the expression. ...
...ement as
text. attributes expr examples (example needed) attributes expr type: string for xml queries, an xpath expression which returns results. any namespace prefixes declared on the element may be used within the expression. ...
...And 2 more matches
richlistbox - Archive of obsolete content
note: in versions of firefox prior to firefox 3, rich list boxes support only single selection. firefox 3 introduced multiple selection to rich list boxes. ...
...ichlistbox> the richlistbox element contains multiple richlistitem elements, which can contain any content. you can click on any richlistitem element and use the keyboard to move the selection around. attributes disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
...references system article. seltype type: one of the values below used to indicate whether multiple selection is allowed. single only one row may be selected at a time. (default in listbox and richlistbox.) multiple multiple rows may be selected at once. (default in tree.) for trees, you can also use the following values: cell individual cells can be selected
text rows are selected; however, the selection highlight appears only over the
text of the primary column. for richlistbox, this is new in firefox 3.5. suppressonselect type: boolean if this attribute is not specified, a select event is fired whenever an item is selected, either by the user or by calling one of the select methods. if set to true, the select event is never fired. ...
...And 2 more matches
richlistitem - Archive of obsolete content
vidual item in a richlistbox. attributes disabled, searchlabel, selected, tabindex, value properties accessible, control, disabled, label, selected, tabindex, value examples (example needed) attributes disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
...rols. using it with an anchor tag (an <a> link) will have no effect. the element will, however, still respond to mouse events. to enable the element, leave this attribute out entirely. visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. searchlabel type: string
text used for 'find-as-you-type' (fayt) searching. in situations where the search
text is ambiguous or missing, searchlabel can be used to give con
text to fayt. if searchlabel is not present, fayt falls back to use the label property. selected type: boolean indicates whether the element is selected or not. this value is read-only. to change the selection, set either the selectedindex or selec...
...the tab order is the order in which the focus is moved when the user presses the "tab" key. elements with a higher tabindex are later in the tab sequence. value type: string the string attribute allows you to associate a data value with an element. it is not used for any specific purpose, but you can access it with a script for your own use. ...
...And 2 more matches
spinbuttons - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] spin buttons are two arrows, one to increase a value and one to decrease a value. spin buttons are not used as separate elements, but are used in combination with other elements to create a control that can be increased and decreased. ...
...e not used as separate elements, but are used in combination with other elements to create a control that can be increased and decreased. for instance, spinbuttons are used for the number type
textbox, and with the timepicker and datepicker. ...
...d as separate elements, but are used in combination with other elements to create a control that can be increased and decreased. for instance, spinbuttons are used for the number type
textbox, and with the timepicker and datepicker. ...
...And 2 more matches
titlebar - Archive of obsolete content
ement is clicked and dragged, the window moves with it. this element can't be used to change the platform-native titlebar of normal windows; instead, it's used to create custom titlebars for chromeless windows. if the titlebar is in a panel element, dragging it will move the panel. elements inside the titlebar usually don't receive any mouse events, so e.g. buttons inside it can't be clicked and
textboxes can't be focused with the mouse. if you don't want this behavior, you can override it by setting allowevents="true" on the titlebar element. the titlebar will send a command event after the move is complete. examples this xul file will create a hud-style window that can be moved with the mouse. it will close if the mouse button is released. <?xml version="1.0"?> <window title="movable hu...
... -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); margin: 8px 12px 16px;"/> </window> it can be opened from the error console like this: open("file:///users/markus/sites/hudwindow.xul", "", "chrome=1, titlebar=0") attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-...
...opup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width note: the allowevents attribute did not work for title bars prior to firefox 3. ...
...And 2 more matches
Scratchpad - Archive of obsolete content
case of using scratchpad with a page run by a local web server. it is also possible to use scratchpad over pages opened from a local file system, if permission policies allow that. but even with possible limitations present, the html code can be either manually entered or copied from the source and pasted into the "about:blank" page (a new empty tab) with the use page inspector's edit as html con
text menu command. usage opening scratchpad in its own window there are several different ways to open scratchpad in its own window: press shift + f4, or go to the web developer menu (which is a submenu in the tools menu on macos and linux), then select scratchpad click the wrench icon (), which is in the main toolbar or under the hamburger menu (), then select "scratchpad". this will open u...
...shows a summary of the function's syntax and a short description: the "[docs]" link takes you to the mdn documentation for the symbol. executing once you've written your code, select the code you want to run. if you don't select anything, all the code in the window will be run. then choose the way you want the code to run using the buttons along the top, using the execute menu, or using the con
text menu. the code is executed in the scope of the currently selected tab. any variables you declare outside of a function will be added to the global object for that tab. there are four execution options available. run when you choose the run option, the selected code is executed. this is what you'd use to execute a function or other code that manipulates the content of your page without needing...
... the selected code, then inserts the result directly into your scratchpad editor window as a comment, so you can use it as a repl. reload and run the reload and run option is only available in the execute menu. it first reloads the page, then executes the code when the page's "load" event fires. this is useful for running the code in a pristine environment. running scratchpad in the browser con
text you can run scratchpad in the con
text of the browser as a whole rather than a specific web page. this is useful if you are working on firefox itself or developing add-ons. to do this check "enable chrome and add-on debugging" in the developer tool settings. once you've done this, the environment menu has a browser option; once that's selected, your scope is the entire browser rather than just th...
...And 2 more matches
E4X for templating - Archive of obsolete content
ach line: <vbox> {foreach(e(someel.somechild[0]).split('\n'), function (line) <description>{line}</description> )} </vbox> the following example shows iteration over an e4x object itself: {foreach(elems, function (k, elem, iter) <> <row>{k}: {elem}</row> <row><image src="chrome://myext/skin/images/fillerrow.jpg" /></row> </>)} or if the e4x child element had its own children and
text: {foreach(elems, function (k, elem, iter) <> <row>{k}: {elem.
text()} {elem.somechild}</row> <row><image src="chrome://myext/skin/images/fillerrow.jpg" /></row> </>)} sorting /* @param {xmllist} xmllist the xmllist to sort @param {function} h the sorting handler */ function sort (xmllist, h) { var k, arr=[], ret = <></>; for (k in xmllist) { if (xmllist.hasownproperty(k...
...inline functions a...
...inline functions as explained...
...And 2 more matches
The Business Benefits of Web Standards - Archive of obsolete content
caught between a rock and a hard place, web designers face a formidable challenge. yet they are finding an unsuspected ally in the battle: web standards. this article discusses how adhering to web standards, and leaving behind proprietary markup and technologies, can contribute to a company's business goals. site wide consistent look and feel by separating structure (or content) from presentation, web designers have a lot to gain. ...
...n-used transitional html markup), forces the designer not to use presentation tags in the html documents, naturally enforcing the separation of content from presentation. by locating all the style and design issues in one document - the style sheet - whole sites can be rethemed in one go. the blogging community are particularly dynamic in this respect where on many platforms including wordpress,
textpattern and habari, the site theme is a complete and discrete entity in its own right. improved user experience: less bandwidth and fast loads html code is often much more compact (therefore easier to read and maintain) when used in conjunction with css. according to various reports, case studies, and andy king, author of speed up your web site: web site optimization, css has made it possible to...
...urally to standards developers without additional effort, time or thought. all their documents are properly marked up at the outset. the number of sites which do not include proper titles and descriptions in the meta is surprising. a lot of other sites would greatly increase their seo by simply using proper tags for the content. adding h1, h2, and h3, tags and so on gives proper structure to hyper
text documents. search engine agents crawl the web to index it, but for ranking and indexing purposes they can only process
text. dynamic effects such as those created by javascript are not taken into account, and
text rendered with graphics cannot be read and parsed either. separating presentation from content increases the information/markup ratio, making css-based documents more pertinent with reg...
...And 2 more matches
Using the Right Markup to Invoke Plugins - Archive of obsolete content
que identifier of an activex control (in the above example, the string beginning with "d27..."). this is, in fact, the unique identifier of macromedia's flash plugin, and developers are expected to know such unique identifiers in order to invoke the component of their choice. the codebase attribute used above points to a location that houses the cab file containing the activex control. in this con
text, the codebase attribute is used as an obtainment mechanism -- that is to say, a way to obtain a control if it isn't present. if the flash activex control is not installed, ie will then go to the url referenced by the codebase attribute and retrieve the activex control. additional param elements (which are "children" of the above object element) specify configuration parameters for the flash plugi...
..."> here.</a></p> </object> </object> web authors have to specify anobtainment mechanism in mozilla-based browsers -- the browser won't automatically retrieve plugins that are missing if you don't specify where to get the plugin from using the codebase attribute. if you don't specify a codebase attribute, and the plugin is not installed,the browser will display only the alternate innermost
text. it won't attempt to retrieve a missing plugin using the netscape plugin finder service. this behavior is not incorrect according to the html 4.01 specification, but it obliges web authors to diligently specifyobtainment mechanisms. at a minimum, web authors will have to nest some alternate
text inside their object elements telling users where to obtain the missing component. adding an additional...
...me="sounds" value="1.au|2.au|3.au|4.au|5.au|6.au|7.au|8.au|9.au|0.au" /> <param name="pause" value="200" /> <p>you need the java plugin. get it from <a href="http://java.sun.com/products/plugin/index.html">here.</a></p> </object> the above code mentions a version specific mime type, and if the mozilla-based browser such as netscape 7 doesn't have jre 1.4.1_01 installed, the alternate
text is displayed. it isn't always necessary to give such a version specific mime type. if you aren't taking advantage of any version specific features, a more generic mime type such as application/x-java-vm will do the job just as well. the configuration parameters for the applet, including the class which contains the initial entry point (animator.class, referenced by the "code" param element), are ...
...And 2 more matches
Windows Media in Netscape - Archive of obsolete content
rovide users with the right component if a failed instantiation is detected. the code listing below provides a mechanism to to this. <object id="playerex2" classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" height="200" width="200"> <param name="uimode" value="full" /> <param name="autostart" value="true" /> <param name="url" value="preludesteel.wma" /> </object> <script type="
text/javascript"> if(!document.playerex2.versioninfo) { // control not installed -- the versioninfo property returns null // redirect users to http://www.microsoft.com/windows/windowsmedia/download/default.asp } else { //control was correctly created //proceed with scripting calls, etc. } </script> note that if the control is correctly instantiated, you will know that it is a version of wind...
...atically updated with caption data. this does not work in gecko because it requires ie dom functionality that has not been implemented. fortunately, windows media player also fires a scriptcommand() event for closed captioning, which means content may update the caption manually with a small piece of javascript. ...
...ith caption data. this does not work in gecko because it requires ie dom functionality that has not been implemented. fortunately, windows media player also fires a scriptcommand() event for closed captioning, which means content may update the caption manually with a small piece of javascript. ...
...And 2 more matches
Square tilemaps implementation: Static maps - Game development
this article covers how to implement static square tilemaps using the canvas api. note: when writing this article, we assumed previous reader knowledge of canvas basics such as how get a 2d canvas con
text, load images, etc., which is all explained in the canvas api tutorial, as well as the basic information included in our tilemaps introduction article. the tile atlas a tilemap might use one or several atlases — or spritesheets — that contain all of the tile images. this is the atlas we will be using as an example, which features five different tiles: to draw a tile from the atlas into the canvas we make use of the drawimage() method in a canvas 2d con
text. we need to supply the atlas image, the coordinates and dimensions of the tile inside the atlas, and the target coordinates an...
... the tilemap data structure to store that map data, we can use a plain object or a custom class. ...
..., 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1 ], gettile: function(col, row) { return this.tiles[row * map.cols + col] } }; rendering the map we can render the map by iterating over its columns and rows. ...
...And 2 more matches
Pseudo-classes and pseudo-elements - Learn web development
o select the first line, of the first <p> element, which is inside an <article> element. article p:first-child::first-line { font-size: 120%; font-weight: bold; } generating content with ::before and ::after there are a couple of special pseudo-elements, which are used along with the content property to insert content into your document using css. ...
...s inside an <article> element. article p:first-child::first-line { font-size: 120%; font-weight: bold; } generating content with ::before and ::after there are a couple of special pseudo-elements, which are used along with the content property to insert content into your document using css. you could use these to insert a string of
text, such as in the live example below. ...
...re and ::after there are a couple of special pseudo-elements, which are used along with the content property to insert content into your document using css. you could use these to insert a string of
text, such as in the live example below. try changing the
text value of the content property and see it change in the output. you could also change the ::before pseudo-element to ::after and see the
text inserted at the end of the element instead of the beginning. inserting strings of
text from css isn't really something we do very often on the web however, as that
text is inaccessible to some screen readers and might be hard for someone to find and edit in the future. a more valid use of these pseudo-elements is to insert an icon, for example the little arrow added in the example below, whic...
...And 2 more matches
How CSS is structured - Learn web development
ing environment is very restrictive. for example, perhaps your cms only allows you to edit the html body. you may also see a lot of inline styles in html email to achieve compatibility with as many email clients as possible. playing with the css in this article for the exercise that follows, create a folder on your computer. you can name the folder whatever you want. ...
...y creating some css rules that use the selectors above. add html to be styled by the selectors. if any of the syntax above is not familiar, try searching mdn. note: you will learn more about selectors in the next module: css selectors. specificity you may encounter scenarios where two selectors select the same html element. ...
... html to be styled by the selectors. if any of the syntax above is not familiar, try searching mdn. note: you will learn more about selectors in the next module: css selectors. specificity you may encounter scenarios where two selectors select the same html element. consider the stylesheet below, with a p selector that sets paragraph
text to blue. however, there is also a class that sets the
text of selected elements to red. .special { color: red; } p { color: blue; } suppose that in our html document, we have a paragraph with a class of special. both rules apply. which selector prevails? do you expect to see blue or red paragraph
text? <p class="special">what color am i?</p> the css language has rules to control which selector is stronger in the event of a conflict. these rules ...
...And 2 more matches
CSS FAQ - Learn web development
.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> when at all possible, you should just use the html5 doctype. why doesn't my css, which is valid, render at all? here are some possible causes: you've got the path to css file wrong. to be applied, a css stylesheet must be served with a
text/css mime type. if the web server doesn't serve it with this type, it won't be applied. what is the difference between id and class? html elements can have an id and/or class attribute. the id attribute assigns a name to the element it is applied to, and for valid markup, there can be only one element with that name. the class attribute assigns a class name to the element, and that name can be ...
...e). however, assigning multiple classes to a single element can provide the same effect, and css variables now provide a way to define style information in one place that can be reused in multiple places. how do i assign multiple classes to an element? html elements can be assigned multiple classes by listing the classes in the class attribute, with a blank space to separate them. <style type="
text/css"> .news { background: black; color: white; } .today { font-weight: bold; } </style> <div class="news today"> ... content of today's news ... </div> if the same property is declared in both rules, the conflict is resolved first through specificity, then according to the order of the css declarations. the order of classes in the class attribute is not relevant. why don't my style rules work...
...ances of ignored style rules are listed below. html elements hierarchy the way css styles are applied to html elements depends also on the elements hierarchy. it is important to remember that a rule applied to a descendent overrides the style of the parent, in spite of any specificity or priority of css rules. .news { color: black; } .corpname { font-weight: bold; color: red; } <!-- news item
text is black, but corporate name is red and in bold --> <div class="news"> (reuters) <span class="corpname">general electric</span> (ge.nys) announced on thursday... </div> in case of complex html hierarchies, if a rule seems to be ignored, check if the element is inside another element with a different style. explicitly re-defined style rule in css stylesheets, order is important. if you defi...
...And 2 more matches
Using CSS generated content - Learn web development
note: content specified in a stylesheet does not become part of the dom. ...
... note: content specified in a stylesheet does not become part of the dom. specifying content in a stylesheet can cause complications. ...
...ur document that share a stylesheet. if you specify content in your stylesheet that requires translation, you have to put those parts of your stylesheet in different files and arrange for them to be linked with the appropriate language versions of your doucment. this issue does not arise if the content you specify consists of symbols or images that apply in all languages and cultures. ...
...And 2 more matches
create fancy boxes - Learn web development
by having border-radius larger than the actual size of the box. making circles <div class="fancy">hi! i want to be fancy.</div> this is something that is both very simple and very fun. the border-radius property is made to create a rounded corner applied to boxes, but what happens if the radius size is equal or larger than the actual width of the box? .fancy { /* within a circle, centered
text looks prettier. */
text-align : center; /* let's avoid our
text touching the border. as our
text will still flow in a square, it looks nicer that way, giving the feeling that it's a "real" circle. */ padding : 1em; /* the border will make the circle visible. you could also use a background, as backgrounds are clipped by border radius */ border : 0.5em solid bl...
...e even more amazing styles. most of the time, that leads to polluting the dom by adding extra html element for the unique purpose of style. even if it is necessary, it's somewhat considered bad practice. one solution to avoid such pitfalls is to use css pseudo-elements. a cloud <div class="fancy">hi! i want to be fancy.</div> let's have an example by turning our box into a cloud: .fancy {
text-align: center; /* same trick as previsouly used to make circles */ box-sizing: border-box; width : 150px; height : 150px; padding : 80px 1em 0 1em; /* we make room for the "ears" of our cloud */ margin : 0 100px; position: relative; background-color: #a4c9cf; /* well, actually we are not making a full circle as we want the bottom of our cloud to be flat. ...
...at some point, to accomplish such box embellishment is a matter of creativity, both in design and technical use of css properties. by doing such it's possible to create optical illusions that can bring your boxes alive like in this example: <div class="...
...And 2 more matches
What are browser developer tools? - Learn web development
⌘ + ⌥ + i menu bar: firefox: menu ➤ web developer ➤ toggle tools, or tools ➤ web developer ➤ toggle tools chrome: more tools ➤ developer tools safari: develop ➤ show web inspector. if you can't see the develop menu, go to safari ➤ preferences ➤ advanced, and check the show develop menu in menu bar checkbox. opera: developer ➤ developer tools con
text menu: press-and-hold/right-click an item on a webpage (ctrl-click on the mac), and choose inspect element from the con
text menu that appears. (an added bonus: this method straight-away highlights the code of the element you right-clicked.) the inspector: dom explorer and css editor the developer tools usually open by default to the inspector, which looks something like the following screensh...
...click dom explorer, or press ctrl + 1. in microsoft edge, or opera, tap/click elements. in safari, the controls are not so clearly presented, but you should see the html if you haven't selected something else to appear in the window. press the style button to see the css. exploring the dom inspector for a start, right-click (ctrl-click) an html element in the dom inspector and look at the con
text menu. the available menu options vary among browsers, but the important ones are mostly the same: delete node (sometimes delete element). deletes the current element. edit as html (sometimes add attribute/edit
text). lets you change the html and see the results on the fly. very useful for debugging and testing. :hover/:active/:focus. forces element states to be toggled on, so you can see w...
... toggled on, so you can see what their styling would look like. copy/copy as html. copy the currently selected html. some browsers also have copy css path and copy xpath available, to allow you to copy the css selector or xpath expression that would select the current html element. try editing some of your dom now. double-click an element, or right-click it and choose edit as html from the con
text menu. you can make any changes you'd like, but you cannot save your changes. exploring the css editor by default, the css editor displays the css rules applied to the currently selected element: these features are especially handy: the rules applied to the current element are shown in order of most-to-least-specific. click the checkboxes next to each declaration to see what would happen ...
...And 2 more matches
What are hyperlinks? - Learn web development
web stands: url, an address system that keeps track of web documents http, a transfer protocol to find documents when given their urls html, a document format allowing for embedded hyperlinks as you can see in the three pillars, everything on the web revolves around documents and how to access them. the web's original purpose was to provide an easy way to reach, read, and navigate through
text documents. since then, the web has evolved to provide access to images, videos, and binary data, but these improvements have hardly changed the three pillars. before the web, it was quite hard to access documents and move from one to another. being human-readable, urls already made things easier, but it's hard to type a long url whenever you want to access a document. this is where hyperlinks re...
...ovide access to images, videos, and binary data, but these improvements have hardly changed the three pillars. before the web, it was quite hard to access documents and move from one to another. being human-readable, urls already made things easier, but it's hard to type a long url whenever you want to access a document. this is where hyperlinks revolutionized everything. links can correlate any
text string with a url, such that the user can instantly reach the target document by activating the link. links stand out from the surrounding
text by being underlined and in blue
text. tap or click a link to activate it, or if you use a keyboard, press tab until the link is in focus and hit enter or spacebar. links are the breakthrough that made the web so useful and successful. in the rest of t...
...that said, there are some nuances worth considering: types of links internal link a link between two webpages, where both webpages belong to the same website, is called an internal link. without internal links, there's no such thing as a website (unless, of course, it's a one-page website). ...
...And 2 more matches
Sending forms through JavaScript - Learn web development
const form = document.geteleme...
...e about the filereader api, see using files from web applications. the least complicated way of sending binary data is by using formdata's append() method, demonstrated above. if you have to do it by hand, it's trickier. in the following example, we use the filereader api to access binary data and then build the multi-part form data request by hand: <form id="theform"> <p> <label for="the
text">
text data:</label> <input id="the
text" name="my
text" value="some
text data" type="
text"> </p> <p> <label for="thefile">file data:</label> <input id="thefile" name="myfile" type="file"> </p> <button>send me!</button> </form> as you see, the html is a standard <form>. there's nothing magical going on. the "magic" is in the javascript: // because we want to access dom nodes, /...
...> <input id="thefile" name="myfile" type="file"> </p> <button>send me!</button> </form> as you see, the html is a standard <form>. there's nothing magical going on. the "magic" is in the javascript: // because we want to access dom nodes, // we initialize our script at page load. ...
...And 2 more matches
Marking up a letter - Learn web development
previous overview: introduction to html next we all learn to write a letter sooner or later; it is also a useful example to test our
text formatting skills. in this assignment, you'll have a letter to mark up as a test for your html
text formatting skills, as well as hyperlinks and proper use of the html <head> element. prerequisites: before attempting this assessment you should have already worked through getting started with html, what's in the head? metadata in html, html
text fundamentals, creating hyperlinks, and advanced
text formatting. objective: test basic and advanced html
text formatting, use of hyperlinks, and use of html <head>. starting point to begin, get the raw
text you need to mark up, and the the css to style the html. create a new...
... note: if you get stuck, then ask us for help. see the assessment or further help section at the bottom of this page. ...
...ith strong importance. the four dates in the document should be have appropriate elements containing machine-readable dates. the first address and first date in the letter should have a class attribute value of sender-column. the css you'll add later will cause these to be right aligned, as it should be in the case in a classic letter layout. mark up the five acronyms/abbreviations in the main
text of the letter to provide expansions of each acronym/abbreviation. the six sub/superscripts should be marked up appropriately — in the chemical formulae, and the numbers 103 and 104 (they should be 10 to the power of 3 and 4, respectively). try to mark up at least two appropriate words in the
text with strong importance/emphasis. there are two places where the letter should have a hyperlink.
...And 2 more matches
Introduction to events - Learn web development
turning to the above example: const btn = document.queryselector('button'); btn.onclick = function() { const rndcol = 'rgb(' + random(255) + ',' + random(255) + ',' + random(255) + ')'; document.body.style.backgroundcolor = rndcol; } the onclick property is the event handler property being used in this situation. it is essentially a property like any other available on the button (e.g. btn.
textcontent, or btn.style), but it is a special type — when you set it to be equal to some code, that code is run when the event fires on the button. you could also set the handler property to be equal to a named function name (like we saw in build your own function). the following works just the same: const btn = document.queryselector('button'); function bgchange() { const rndcol = 'rgb(' + r...
...eds to be done to put things right. some browsers support automatic form data validation features, but since many don't, you are advised to not rely on those and implement your own validation checks. let's look at a simple example. ...
...es, but since many don't, you are advised to not rely on those and implement your own validation checks. let's look at a simple example. first, a simple html form that requires you to enter your first and last name: <form> <div> <label for="fname">first name: </label> <input id="fname" type="
text"> </div> <div> <label for="lname">last name: </label> <input id="lname" type="
text"> </div> <div> <input id="submit" type="submit"> </div> </form> <p></p> div { margin-bottom: 10px; } now some javascript — here we implement a very simple check inside an onsubmit event handler (the submit event is fired on a form when it is submitted) that tests whether the
text fields are empty. if they are, we call the preventdefault() function on the event object — which...
...And 2 more matches
Functions — reusable blocks of code - Learn web development
x. pretty much anytime you make use of a javascript structure that features a pair of parentheses — () — and you're not using a common built-in language structure like a for loop, while or do...while loop, or if...else statement, you are making use of a function. built-in browser functions we've made use of functions built in to the browser a lot in this course. ...
...use of a javascript structure that features a pair of parentheses — () — and you're not using a common built-in language structure like a for loop, while or do...while loop, or if...else statement, you are making use of a function. built-in browser functions we've made use of functions built in to the browser a lot in this course. ...
...s a pair of parentheses — () — and you're not using a common built-in language structure like a for loop, while or do...while loop, or if...else statement, you are making use of a function. built-in browser functions we've made use of functions built in to the browser a lot in this course. ...
...And 2 more matches
Ember app structure and componentization - Learn web development
<section class="todoapp"> <h1>todos</h1> <input class="new-todo" aria-label="what needs to be done?" placeholder="what needs to be done?" autofocus > </section> note: aria-label provides a label for assistive technology to make use of — for example, for a screenreader to read out. this is useful in such cases where we have an <input> being used with no corresponding html
text that could be turned into a label. when you save application.hbs, the development server you started earlier will automatically rebuild the app and refresh the browser. the rendered output should now look like this: it doesn't take too much effort to get our html looking like a fully-featured to-do list app. update the application.hbs file again so its content looks like this: <section clas...
...iv class="view"> <input aria-label="toggle the completion of this todo" class="toggle" type="checkbox" > <label>buy movie tickets</label> <button type="button" class="destroy" title="remove this todo" ></button> </div> <input autofocus class="edit" value="todo
text"> </li> <li> <div class="view"> <input aria-label="toggle the completion of this todo" class="toggle" type="checkbox" > <label>go to movie</label> <button type="button" class="destroy" title="remove this todo" ></button> </div> <input aut...
... <div class="view"> <input aria-label="toggle the completion of this todo" class="toggle" type="checkbox" > <label>go to movie</label> <button type="button" class="destroy" title="remove this todo" ></button> </div> <input autofocus class="edit" value="todo
text"> </li> </ul> </section> <footer class="footer"> <span class="todo-count"> <strong>0</strong> todos left </span> <ul class="filters"> <li> <a href="#">all</a> <a href="#">active</a> <a href="#">completed</a> </li> </ul> <button type="button" class="clear-completed"> clear completed </button> </footer> </sec...
...And 2 more matches
Getting started with Svelte - Learn web development
similar to handlebars. it extends css by adding a scoping mechanism, allowing each component to define their own styles without the risk of clashing with other component's styles. it extends javascript by reinterpreting specific directives of the language to achieve true reactivity and ease component state management. the compiler only intervenes in very specific situations and only in the con
text of svelte components. extensions to the javascript language are minimal and carefully picked in order to not break javascript syntax nor alienate developers. in fact, you will be mostly working with vanilla javascript. first steps with svelte being a compiler, you can't just add a <script src="svelte.js"> tag to your page and import it into your app. you'll have to set up your development envir...
...e a look at the svelte documentation. with this in mind, let's have a look at the src/app.svelte file that came with the starter template. you should see something like the following: <script> export let name; </script> <main> <h1>hello {name}!</h1> <p>visit the <a href="https://svelte.dev/tutorial">svelte tutorial</a> to learn how to build svelte apps.</p> </main> <style> main {
text-align: center; padding: 1em; max-width: 240px; margin: 0 auto; } h1 { color: #ff3e00;
text-transform: uppercase; font-size: 4em; font-weight: 100; } @media (min-width: 640px) { main { max-width: none; } } </style> the <script> section the <script> block contains javascript that runs when a component instance is created. variables declared (o...
...f the component (e.g. other components). this is one example of svelte extending javascript syntax to make it more useful, while keeping it familiar. the markup section in the markup section you can insert any html you like, and in addition you can insert valid javascript expression inside single curly brackets ({}). in this case we are embedding the value of the name prop right after the hello
text. <main> <h1>hello {name}!</h1> <p>visit the <a href="https://svelte.dev/tutorial">svelte tutorial</a> to learn how to build svelte apps.</p> </main> svelte also supports tags like {#if...}, {#each...}, and {#await...} — these examples allow you to conditionally render a portion of the markup, iterate through a list of elements, and work with async values, respectively. the <style> sectio...
...And 2 more matches
Styling Vue components with CSS - Learn web development
tom: 0; } ul { list-style: none; padding: 0; } button { border: none; margin: 0; padding: 0; width: auto; overflow: visible; background: transparent; color: inherit; font: inherit; line-height: normal; -webkit-font-smoothing: inherit; -moz-osx-font-smoothing: inherit; -webkit-appearance: none; } button::-moz-focus-inner { border: 0; } button, input, optgroup, select,
textarea { font-family: inherit; font-size: 100%; line-height: 1.15; margin: 0; } button, input { /* 1 */ overflow: visible; } input[type="
text"] { border-radius: 0; } body { width: 100%; max-width: 68rem; margin: 0 auto; font: 1.6rem/1.25 "helvetica neue", helvetica, arial, sans-serif; background-color: #f5f5f5; color: #4d4d4d; -moz-osx-font-smoothing: grayscale; -webkit...
...tyles present in the file. let's remove those and replace them with the styles below. these styles do a few things — adding some styling to buttons and inputs, and customizing the #app element and its children. ...
...round-color: #ca3c3c; border-color: #bd2130; } .btn__filter { border-color: lightgrey; } .btn__danger:focus { outline-color: #c82333; } .btn__primary { color: #fff; background-color: #000; } .btn-group { display: flex; justify-content: space-between; } .btn-group > * { flex: 1 1 auto; } .btn-group > * + * { margin-left: 0.8rem; } .label-wrapper { margin: 0; flex: 0 0 100%;
text-align: center; } [class*="__lg"] { display: inline-block; width: 100%; font-size: 1.9rem; } [class*="__lg"]:not(:last-child) { margin-bottom: 1rem; } @media screen and (min-width: 620px) { [class*="__lg"] { font-size: 2.4rem; } } .visually-hidden { position: absolute; height: 1px; width: 1px; overflow: hidden; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px)...
...And 2 more matches
Strategies for carrying out testing - Learn web development
web site feature. consider the following example (see the source code, and also the example running live): test criteria for this feature could be written like so: a and b grade: button should be activatable by the user's primary control mechanism, whatever it is — this should include mouse, keyboard, and touch. toggling the button should make the information box appear/disappear. ...
...g live): test criteria for this feature could be written like so: a and b grade: button should be activatable by the user's primary control mechanism, whatever it is — this should include mouse, keyboard, and touch. toggling the button should make the information box appear/disappear. the
text should be readable. visually impaired users using screenreaders should be able to access the
text. a grade: the information box should animate smoothly as it appears/disappears. ...
...ivatable by the user's primary control mechanism, whatever it is — this should include mouse, keyboard, and touch. toggling the button should make the information box appear/disappear. the
text should be readable. visually impaired users using screenreaders should be able to access the
text. a grade: the information box should animate smoothly as it appears/disappears. the gradient and
text shadow should appear to enhance the look of the box. ...
...And 2 more matches
Setting up your own test automation environment - Learn web development
ways to find an element by css — the by.css method allows you to select an element using a css selector enter the following at the bottom of your quick_test.js code now: const button = driver.findelement(by.css('button:nth-of-type(1)')); testing your element there are many ways to interact with your web documents and elements on them. you can see useful common examples starting at getting
text values on the webdriver docs. if we wanted to get the
text inside our button, we could do this: button.get
text().then(function(
text) { console.log('button
text is \'' +
text + '\''); }); add this to quick_test.js now. making sure you are inside your project directory, try running the test: node quick_test.js you should see the button's
text label reported inside the console. let's do som...
...t more useful. delete the previous code entry, then add this line at the bottom instead: button.click(); try running your test again; the button will be clicked, and the alert() popup should appear. at least we know the button is working! you can interact with the popup too. add the following to the bottom of the code, and try testing it again: let alert = driver.switchto().alert(); alert.get
text().then(function(
text) { console.log('alert
text is \'' +
text + '\''); }); alert.accept(); next, let's try entering some
text into one of the form elements. add the following code and try running your test again: const input = driver.findelement(by.id('name')); input.sendkeys('filling in my form'); you can submit key presses that can't be represented by normal characters using properties of...
...elenium-webdriver'); by = webdriver.by, until = webdriver.until; // username: username can be found at automation dashboard const username = '{username}'; // accesskey: accesskey can be generated from automation dashboard or profile section const key = '{accesskey}'; // gridurl: gridurl can be found at automation dashboard const grid_host = 'hub.lambdatest.com/wd/hub'; function search
textongoogle() { // setup input capabilities const capabilities = { platform: 'windows 10', browsername: 'chrome', version: '67.0', resolution: '1280x800', network: true, visual: true, console: true, video: true, name: 'test 1', // name of the test build: 'nodejs build' // name of the build }; // url: https://{username}:{a...
...And 2 more matches
CSUN Firefox Materials
n moving to firefox from internet explorer for screen reader users. in fact, the same keyboard commands are still available, so users can become comfortable and productive right away. screen magnifier users can also benefit from firefox's powerful features today, as caret and focus tracking are fully enabled. mozilla corporation is currently reaching out to work with ai squared, the makers of zoom
text, in order to enable complete support of advanced zoom
text features such as the doc reader and app reader. firefox on linux currently boasts the best onscreen keyboard support in the industry via gok, the gnome onscreen keyboard. basic screen reader accessibility is available via gnopernicus or the fire vox extension. keyboard support "mozilla firefox is a web-browser with superior keyboard sup...
...gnome onscreen keyboard. basic screen reader accessibility is available via gnopernicus or the fire vox extension. keyboard support "mozilla firefox is a web-browser with superior keyboard support. " - alan cantor, cantor access consulting (http://www.cantoraccess.com) firefox includes keyboard access to all of its amazing features: find as you type allows for quick navigation to links and
text searching without opening a separate dialog -- this allows more convenient use by screen magnification users because there is a single point of regard for the search. it also assists users of input aids because there are far fewer keys to type to get the desired location. for example, it is possible to navigate to the desired link by pressing 2 letter keys rather than tabbing through many links t...
...of input aids because there are far fewer keys to type to get the desired location. for example, it is possible to navigate to the desired link by pressing 2 letter keys rather than tabbing through many links to get there. browse with caret allows users to select arbitrary content with the keyboard and move through content as if inside a read-only editor. this allows copying arbitrary pieces of
text to the clipboard. the f7 key toggles this feature on/off. tabbed browsing helps keyboard users by putting all of the browsed documents in one firefox application window rather than cluttering the alt+tab order which makes keyboard navigation within the entire windows os much simpler. both history and bookmarks can be searched with a "quick search" field that quickly narrows the list down via ...
...And 2 more matches
Embedding API for Accessibility
ility apis for a platform, such as microsoft active accessibility or atk for linux and unix desktops. there are many other pieces, such as preferences to allow the user to change foreground and background colors, and font sizes. mozilla already supports some of these options. this document lays out what we already have, and what we'll need later, in the embedding api to support accessibility. ...
...essibility or atk for linux and unix desktops. there are many other pieces, such as preferences to allow the user to change foreground and background colors, and font sizes. mozilla already supports some of these options. this document lays out what we already have, and what we'll need later, in the embedding api to support accessibility.
text zoom on a per-window basis the nsidomwindow::get
textzoom(float *zoomfactor) and nsidomwindow::set
textzoom(float zoomfactor) methods can be used to set a wide range of
text zoom factors on a content window. a zoom factor of 1.0 represents 100%, or normal zoom. for double-sized
text, use nsidomwindow::set
textzoom(2.0); using accessibility preferences there are a number of prefs related to accessibility. for the most part, an automatic reframe is ...
...*/); setboolpref("browser.underline_anchors", boolunderlinelinks); moz 0.8 focus appearance setboolpref("browser.display.use_focus_colors", usefocuscolors); setcharpref("browser.display.focus_background_color", colorstring); setcharpref("browser.display.focus_
text_color", colorstring); setcharpref("browser.display.focus_ring_width", numpixels); /* 0-4 */ moz 0.9.2
text selection appearance setcharpref("browser.selection.background_color", colorstring); setcharpref("browser.selection.foreground_color", colorstring); set...
...And 2 more matches
SVG Guidelines
w tab. plus, in most of the cases, the filename is quite descriptive so it's recommended to remove that kind of metadata since it doesn't bring much value. you shouldn't include doctypes in your svgs either; they are a source of many issues, and the svg wg recommends not to include them. see svg authoring guidelines. ...
...those kinds of shapes are visible but off the svg view box. here's an example of a file with offscreen shapes. on the other hand, the uncolored ones are easier to spot, since they usually come with styles making them invisible. they must meet two conditions: they must be devoid of any fill (or a transparent one) or stroke. ...
... many useless attributes. ...
...And 2 more matches
Displaying Places information using views
ay the file browser/components/places/content/placesoverlay.xul: <?xml-stylesheet href="chrome://browser/content/places/places.css" ?> <?xul-overlay href="chrome://browser/content/places/placesoverlay.xul" ?> it's this stylesheet that binds elements with the special type attribute to one of the views. the overlay contains javascript required by the views. it also contains the built-in places con
text menu and commands, which you may want to take advantage of in your own uses of the views. connecting a view to its data to hook up a built-in view to its data, use the view's special place attribute. note: starting in gecko 2.0, you can't use the place attribute with menus. see menu view for details. you may specify the attribute directly in the xul or set its corresponding property via jav...
... rather than the content it displays. try css here. hiding columns of the built-in tree view. just leave out the treecol elements you want to hide. managing how the view responds to clicks, commands, and other user interaction. don't break the separation of concerns here. views are for displaying data, controllers for logic. you can hook up a built-in view to the standard places commands and con
text menu, or you can create a custom controller to handle custom commands. see view controller for more information. regardless of the kind of view you are writing, it should implement interface nsiplacesview. (nsiplacesview is currently not a true interface; the built-in views simply implement its methods and attributes directly.) as described above in using a view, this interface provides control...
... everything else to a placestreeview instance that you would own. perhaps an easier strategy is to modify an existing placestreeview instance, which is what the following example does. the following javascript creates a new placestreeview instance but overrides two of its nsitreeview methods to display columns not present in the built-in tree view: var view = new placestreeview(); view._getcell
text = view.getcell
text; view.getcell
text = function (arowindex, acol) { // handle our special columns. as with placestreeview, we'll recognize // them by their id's or anonid's. switch (acol.id || acol.element.getattribute("anonid")) { // uri for all nodes (like folders), not just uri nodes (like bookmarks) case "fulluri": return this.nodefortreeindex(arowindex).uri; break; // i...
...And 2 more matches
Multiple Firefox profiles
rtorana profile management determining the profile while firefox is running to determine the profile of a currently-running firefox instance in windows, macos or linux, type about:profiles into the browser url search bar. the page presents a list of all of your profiles, each beginning with "profile: " followed by its name. the one being run by this firefox instance will include the bold
text "this is the profile in use" for example, if you find that
text beneath the entry for "profile: suzie", then you are running in a profile named suzie. launching firefox into a desired profile although it is possible in some cases to have multiple instances of firefox running in different profiles, to avoid confusion, you might want to first exit/quit/terminate all running instances of firefox,...
...ofiles after selecting this option, you must start the profile manager first. using the profiles windows if you want to have the profile manager to pop up each time you start firefox, so you can choose a profile, you will need to edit the "target" of the launch icon. to do this: right-click the icon and choose "properties". when the properties dialog box pops up, you should see a "target"
text field that you can edit, and it should show the current file path. after the closing quote, add -profilemanager. click ok. now whenever you double click that icon, the profile manager should appear, allowing you to choose which profile you'd like to use. if you want individual icons to launch specific profiles, you will need to edit the "target" of each icon. to do this: right-click the i...
...d -profilemanager. click ok. now whenever you double click that icon, the profile manager should appear, allowing you to choose which profile you'd like to use. if you want individual icons to launch specific profiles, you will need to edit the "target" of each icon. to do this: right-click the icon and choose "properties". when the properties dialog box pops up, you should see a "target"
text field that you can edit, and it should show the current file path. to permanently set a specific profile, add -p profile_name to the target path, but outside of the quotes, replacing "profile_name" with the actual profile name you chose. if you would also like to allow multiple instances of firefox to run at the same time, add -no-remote after the profile name. once you are all done, click ok...
...And 2 more matches
Chrome-only CSS reference
stylesheets: see the css documentation for a list of these. -moz-window-draggingthe -moz-window-dragging css property specifies whether a window is draggable or not. ...
...umentation for a list of these. -moz-window-draggingthe -moz-window-dragging css property specifies whether a window is draggable or not. ...
...her a window is draggable or not. ...
...And 2 more matches
Introduction to Layout in Mozilla
se, compute style, render; repeat css used for rendering all content content theoretically separate from “presentation” key data structures content node elements, attributes, leaves dom frame rectangular formatting primitive geometric information [0..n] per content node 2nd thru nth are “continuations” style con
text non-geometric information may be shared by adjacent frames reference counted, owned by frame view clipping, z-order, transparency [0..1] per frame, owned by frame widget native window [0..1] per view, owned by view key data structures the document owns the content model, and one or more presentations expos...
... may not be directly manipulated detailed walk-through setting up content model construction frame construction style resolution reflow painting setting up assume basic knowledge of embedding and network apis (doc shell, streams) content dll auto-registers a document loader factory (dlf) ...
...ype, dimensions, etc. may not be directly manipulated detailed walk-through setting up content model construction frame construction style resolution reflow painting setting up assume basic knowledge of embedding and network apis (doc shell, streams) content dll auto-registers a document loader factory (dlf) @mozilla.org/content-viewer-factory/view;1?type=
text/html all mime types mapped to the same class, nscontentdlf nsdocshell receives inbound content via nsdsuricontentlistener invokes nsidlf::createinstance, passes mime type to dlf nscontentdlf creates a nshtmldocument object, invokes startdocumentload. creates a parser, returned as nsistreamlistener back to the docshell cr...
...And 2 more matches
Examples
urrentdir); }); }).then(null, components.utils.reporterror); parallel promise (this example needs more work) so when chaining promises, consequent promises run after the previous promise completes. now what if we want to run multiple promises and then return when all are done? this is accomplished by using promise.all, this feature requires promise.jsm. ...
... }); }).then(null, components.utils.reporterror); parallel promise (this example needs more work) so when chaining promises, consequent promises run after the previous promise completes. now what if we want to run multiple promises and then return when all are done? this is accomplished by using promise.all, this feature requires promise.jsm. ...
...ises, consequent promises run after the previous promise completes. now what if we want to run multiple promises and then return when all are done? this is accomplished by using promise.all, this feature requires promise.jsm. ...
...And 2 more matches
WebChannel.jsm
ew listen(function callback); stoplistening(); send(object message, eventtarget target); attributes id string webchannel id methods listen() registers the callback for messages on this channel. registers the channel itself with the webchannelbroker. parameters callback callback function containing function(id, message, sendercon
text) parameters. id - webchannel id of the incoming messages message - incoming message object sendercon
text - incoming message con
text - this should be treated as an opaque object and passed to the .send() method stoplistening() resets the callback for messages on this channel. removes the channel from the webchannelbroker. parameters none send() sends message...
... - this should be treated as an opaque object and passed to the .send() method stoplistening() resets the callback for messages on this channel. removes the channel from the webchannelbroker. parameters none send() sends messages over the webchannel id using the "webchannelmessagetocontent" event. ...
...eated as an opaque object and passed to the .send() method stoplistening() resets the callback for messages on this channel. removes the channel from the webchannelbroker. parameters none send() sends messages over the webchannel id using the "webchannelmessagetocontent" event. ...
...And 2 more matches
Localizing with Pontoon
lows for user-specific tasks, like commiting to repository, downloading files and signing out. info menu gives important information, like the anticipated project timeline and a list of keyboard shortcuts. alright, how about we do some translating now? translate strings when using pontoon for localization, you have a couple of options to translate your strings. you can translate in-con
text, out-of-con
text, or a combination of the two. we'll start with looking at in-con
text translation. in-con
text pontoon's in-con
text translation mode is what puts it above others. it opens a web page (or web app) and enables real-time editing of that page. here's how you translate your first string: hover over the
text you want to translate with your mouse. an edit button appears over that t...
...the contents of the <title> tag in websites and strings with placeables or different plural forms. ...
...s. it opens a web page (or web app) and enables real-time editing of that page. here's how you translate your first string: hover over the
text you want to translate with your mouse. an edit button appears over that
text. click on it to enable the translate mode. replace the original
text with its translation into your language. click the save button to save your translation. out-of-con
text some strings are impossible to translate in-con
text, e.g. the contents of the <title> tag in websites and strings with placeables or different plural forms. ...
...And 2 more matches
Localizing without a specialized tool
with that document, users can see immediately two localized files in their user interface by following closely and carefully the steps to create a language pack or a binary file that is ready for installation. repeating the process allows a localizer to create a testable package to see his or her work as they progress to a final version. if you choose to localize mozilla with nothing more than a
text editing application and not a specialized tool, this document (along with create a new localization) will enable you to learn just what needs to be done. before we start, did you make sure to install mercurial and confirm that you have set up the proper build environment on your local machine? you cannot begin localizing mozilla file by file without a specialized tool without going through the c...
...are keeping your localization files, the en-us sources $ cd /path/to/your/working/directory now, you will need run compare locales. to do this, enter the following commands, keeping sure to change "x-testing" to the actual locale code of your locale. $ compare-locales mozilla-1.9.2/browser/locales/l10n.ini l10n-mozilla-1.9.2 x-testing for convenience, try saving the output of this command to a
text file on your desktop so you can review it as you go. run: $ compare-locales mozilla-1.9.2/browser/locales/l10n.ini l10n-mozilla-1.9.2 x-testing > ~/desktop/x-testing.compare open the x-testing.compare file that is on your desktop. you should see something like this: x-testing browser chrome browser aboutcerterror.dtd // add and localize this file aboutdial...
... ... ... x-testing: unchanged: 2 changed: 3 missinginfiles: 6117 missing: 13 0% of entries changed the beauty of the compare-locales output is that it tells you all the missing files and which files you need to add and localize. ...
...And 2 more matches
Extras
ow> <mi title="natural log">ln</mi> <mo>&applyfunction;</mo> <mi>x</mi> </mrow> <mrow> <mi title="natural log">ln</mi> <mo>&applyfunction;</mo> <mi>a</mi> </mrow> </mfrac> </mrow> </math> </p> css content math.cue *[title] { color: blue; } mixing with other markups html content <math display="block"> <mrow> <mi>a</mi> <mo>=</mo> <mo>[</mo> <mtable> <mtr> <mtd><mn>1</mn></mtd> <mtd> <m
text> <img width="16" height="16" src="https://udn.realityripple.com/samples/3f/9341cbddc0.png" alt="mozilla-16" /> </m
text> </mtd> </mtr> <mtr> <mtd> <m
text><input value="type" size="4"/></m
text> </mtd> <mtd><mn>4</mn></mtd> </mtr> </mtable> <mo>]</mo> </mrow> </math> <math display="block"> <msqrt> <mpadded width="30px" height="15px" depth="15px" voffset="-15px"> <m
text> <svg width="30px" height="30...
...transform" attributetype="xml" type="rotate" from="360" to="0" dur="15s" repeatcount="indefinite"/> <g transform="translate(-15, -15)"> <path fill="url(#radgrad1)" d="m 15 0 l 20 10 l 30 15 l 20 20 l 15 30 l 10 20 l 0 15 l 10 10"/> </g> </g> </g> </svg> </m
text> </mpadded> </msqrt> <mo>=</mo> <msubsup> <mo>∫</mo> <mn>0</mn> <mfrac> <mi>π</mi> <mn>2</mn> </mfrac> </msubsup> <msup> <mi>θ</mi> <m
text> <svg width="15px" height="15px"> <defs> <radialgradient id="radgrad2" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop offset="0%" style="stop-color:rgb(255,255,255); stop-opacity:1;"/> <stop offset="100%" ...
...="0%" style="stop-color:rgb(255,255,255); stop-opacity:1;"/> <stop offset="100%" style="stop-color:rgb(0,0,255); stop-opacity:.9;"/> </radialgradient> </defs> <g> <animatemotion path="m0,0 l3,0 l2,5 l5,5 l0,4 l5,2 z" begin="0s" dur="0.5s" repeatcount="indefinite"/> <circle fill="url(#radgrad2)" r="5px" cx="5px" cy="5px"/> </g> </svg> </m
text> </msup> <mrow> <mo>ⅆ</mo> <mi>θ</mi> </mrow> </math> <div style="width: 300px; margin-left: auto; margin-right: auto;"> <svg width="300px" height="250px"> <defs> <lineargradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%"> <stop offset="0%" style="stop-color:rgb(0,0,255);stop-opacity:1"/> <stop offset="100%" style="stop-color:rgb(0,255,0);stop-opacity:1"/> </lineargradient> <lineargradient...
...And 2 more matches
Power profiling overview
red in joules, and power is measured in watts, which is equivalent to joules per second. although power is an instantaneous concept, in practice measurements of it are determined in a non-instantaneous fashion, i.e. by dividing an energy amount by a non-infinitesimal time period. strictly speaking, such a computation gives the average power but this is often referred to as just the power when con
text makes it clear. in the con
text of computing, a fully-charged mobile device battery (as found in a laptop or smartphone) holds a certain amount of energy, and the speed at which that stored energy is depleted depends on the power consumption of the mobile device. that in turn depends on the software running on the device. web browsers are popular applications and can be power-intensive, and there...
...ents these are combinations of proxy measurements. the combinations are semi-arbitrary, they amplify the unreliability of proxy measurements, and unlike non-hybrid proxy measurements, they don't have a clear physical meaning. avoid them. the most notable example of a hybrid proxy measurement is the "energy impact" used by os x's activity monitor. ways to user power-related measurements low-con
text measurements most power-related measurements are global or per-process. such low-con
text measurements are typically good for understand if power consumption is good or bad, but in the latter case they often don't provide much insight into why the problem is occurring, which part of the code is at fault, or how it can be fixed. nonetheless, they can still help improve understanding of a problem b...
...configurations of firefox to see if a particular feature is affecting things. compare different workloads. this can be particularly useful if the workloads only vary slightly. for example, it can be useful to gradually remove elements from a web page and see how the power-related measurements change. even just switching a tab from the foreground to the background can make a difference. high-con
text measurements a few power-related measurements can be obtained in a high-con
text fashion, e.g. with stack traces that clearly pinpoint specific parts of the code as being responsible. standard performance profiling tools that measure cpu usage or proxies of cpu usage (such as instruction counts) typically provide high-con
text measurements. this is useful because high cpu usage typically causes...
...And 2 more matches
L20n HTML Bindings
example of the manifest file (all keys are required): { "locales": [ "en-us", "pl"], "default_locale": "en-us", "resources": [ "../locales/{{locale}}/strings.l20n", "/shared/{{locale}}/date.l20n"¨ ] } make html elements localizable use the data-l10n-id attribute on an html element to mark it as localizable. <p data-l10n-id="about"></p> notice that you don't have to put the
text content in the html anymore (you still can if you want to). all content lives in the localization resources. a safe subset of html elements (e.g. em, sup), attributes (e.g. title) and entities can be used in translations. in addition to the pre-defined whitelists, any element found in the original source html is allowed in the translation as well. consider the following source html: <p data-l10...
...(e.g. title) and entities can be used in translations. in addition to the pre-defined whitelists, any element found in the original source html is allowed in the translation as well. consider the following source html: <p data-l10n-id="save"> <input type="submit"> <a href="/main" class="btn-cancel"></a> </p> assume the following malicious translation: <save """ <input value="save" type="
text"> or <a href="http://myevilwebsite.com" onclick="alert('pwnd!')" title="back to the homepage">cancel</a>. """> the result will be: <p data-l10n-id="back"> <input value="save" type="submit"> or <a href="/main" class="btn-cancel" title="back to the homepage">cancel</a>. </p> the input element is not on the default whitelist but since it's present in the source html, it is a...
...e it's present in the source html, it is also allowed in the translation. the value attribute is allowed on input elements, but type is not. similarly, href and onclick attributes are not allowed in translations and they are not inserted in the final dom. however, the title attribute is safe. ...
...And 2 more matches
Midas
midas can be enabled via javascript on an html document. when midas is enabled, the document becomes editable by the user. scripting for midas is based on the dhtml commands supported by internet explorer. internet explorer supports the ability to make an entire document editable by setting the designmode property of the document object; this is how midas is invoked in gecko. internet explorer also supports the ability to edit specific elements using the contenteditable attribute; starting with firefox 3, gecko also supports contenteditable. once midas is invoked, a few more methods of the document object become available. ...
...ithout setting a pref or using signed js. see: more about security preferences note: the shortcut key will automatically trigger this command (typically accel-x) with or without the signed js or any code on the page to handle it. decreasefontsize this command will add a <small> tag around selection or at insertion point. delete this command will delete all
text and objects that are selected. if no
text is selected it deletes one character to the right. this is similar to the delete button on the keyboard. fontname a font name this command will set the font face for a selection or at the insertion point if there is no selection. the given string is such as would be used in the "face" attribute of the font tag, i.e., a comma-separated l...
...ch as would be used in the "face" attribute of the font tag, i.e., a comma-separated list of font names. fontsize a number this command will set the fontsize for a selection or at the insertion point if there is no selection. the given number is such as would be used in the "size" attribute of the font tag. forecolor a color code this command will set the
text color of the selection or at the insertion point. formatblock h1, h2, h3, h4, h5, h6, p, div, address, blockquote (more?) the selection surrounded by the given block element. heading h1, h2, h3, h4, h5, h6 selected block will be formatted as the given type of heading. hilitecolor a color code this command will set the hilite color of the selection or a...
...And 2 more matches
NSS tools : certutil
odings from external files. · oid (example): 1.2.3.4 · critical-flag: critical or not-critical · filename: full path to a file containing an encoded extension -f password-file specify a file that will automatically supply the password to include in a certificate or to access a certificate database. this is a plain-
text file containing one password. be sure to prevent unauthorized access to this file. -g keysize set a key size to use when generating new public and private key pairs. the minimum is 512 bits and the maximum is 16384 bits. the default is 2048 bits. any size between the minimum and maximum is allowed. -h tokenname ...
...for example: -t "tc,c,t" use the -l option to see a list of the current certificates and trust attributes in a certificate database. note that the output of the -l option may in...
... use the -l option to see a list of the current certificates and trust attributes in a certificate database. note that the output of the -l option may include "u" flag, which means that there is a private key associated with the certificate. it is a dynamic flag and you cannot set it with certutil. ...
...And 2 more matches
NSS Tools ssltap
host name and port on the server side. it passes any data sent by the client to the server and vice versa. the tool also displays the data to the shell window from which it was called. it can do this for plain http connections or any tcp protocol, as well as for ssl streams, as described here. the tool cannot and does not decrypt any encrypted message data. you use the tool to look at the plain
text and binary data that are part of the handshake procedure, before the secure connection is established. syntax to run the ssl debugging tool, type this command in a command shell: ssltap [-vhfsxl] [-p port] hostname:port options the command does not require any options other than hostname:port, but you normally use them to control the connection interception and output. the options ...
...he first connection is complete, so the browser is not able to load images. to make the tool continue to accept connections, switch on looping mode with the -l option. the following examples show the output from commonly used combinations of options. example 1 the s and x options in this example turn on ssl parsing and show undecoded values in hex/ascii format. the output is routed to a
text file. command ssltap.exe -sx -p 444 interzone.mcom.com:443 > sx.txt output output connected to interzone.mcom.com:443--> [alloclen = 66 bytes [ssl2] clienthellov2 { version = {0x03, 0x00} cipher-specs-length = 39 (0x27) sid-length = 0 (0x00) challenge-length = 16 (0x10) cipher-suites = { (0x010080) ssl2/rsa/rc4-12...
... 223 (0xdf) < encrypted >}sslrecord { 0: 15 03 00 00 12 |..... type = 21 (alert) version = { 3,0 } length = 18 (0x12) < encrypted >}]server socket closed. example 2 the -s option turns on ssl parsing. because the -x option is not used in this example, undecoded values are output as raw data. the output is routed to a
text file. command ssltap.exe -s -p 444 interzone.mcom.com:443 > s.txt output connected to interzone.mcom.com:443--> [alloclen = 63 bytes [ssl2] clienthellov2 { version = {0x03, 0x00} cipher-specs-length = 36 (0x24) sid-length = 0 (0x00) challenge-length = 16 (0x10) cipher-suites = { (0x010080) ssl2/rsa/rc4-128/md5 ...
...And 2 more matches
Rhino overview
iece of code (and any pieces of code that it may in turn generate). these features allow for the implementation of a traditional url-based security policy for javascript as in netscape navigator. embeddings that trust the javascript code they execute may ignore the security features. embeddings that run untrusted javascript code must do two things to enable the security features. first, every con
text that is created must be supplied an instance of an object that implements the securitysupport interface. this will provide rhino the support functionality it needs to perform security-related tasks. second, the value of the property security.requiresecuritydomain should be changed to true in the resource bundle org.mozilla.javascript.resources.security. the value of this property can be determin...
...lements the securitysupport interface. this will provide rhino the support functionality it needs to perform security-related tasks. second, the value of the property security.requiresecuritydomain should be changed to true in the resource bundle org.mozilla.javascript.resources.security. the value of this property can be determined at runtime by calling the issecuritydomainrequired method of con
text. setting this property to true requires that any calls that compile or evaluate javascript must supply a security domain object of any object type that will be used to identify javascript code. in a typical client embedding, this object might be a string with the url of the server that supplied the script, or an object that contains a representation of the signers of a piece of code for certifica...
...ll be used to identify javascript code. in a typical client embedding, this object might be a string with the url of the server that supplied the script, or an object that contains a representation of the signers of a piece of code for certificate-based security policies. when javascript code attempts a restricted action, the security domain can be retrieved in the following manner. the class con
text should be obtained from the security manager (see java.lang.securitymanager.getclasscon
text()). then, the class of the code that called to request the restricted action can be obtained by looking an appropriate index into the class con
text array. if the caller is javascript the class obtained may be one of two types. first, it may be the class of the interpreter if interpretive mode is in effect.
...And 2 more matches
Scripting Java
ile is on you classpath then you may import them into your javascript application. these packages are likely not in the java package, so you'll need to prefix the package name with "packages." for example, to import the org.mozilla.javascript package you could use importpackage() as follows: $ java org.mozilla.javascript.tools.shell.main js> importpackage(packages.org.mozilla.javascript); js> con
text.currentcon
text; org.mozilla.javascript.con
text@bb6ab6 occasionally, you will see examples that use the fully qualified name of the package instead of importing using the importpackage() method. this is also acceptable, it just takes more typing. using a fully qualified name, the above example would look as follows: $ java org.mozilla.javascript.tools.shell.main js> jspackage = packages.org.moz...
...you will see examples that use the fully qualified name of the package instead of importing using the importpackage() method. this is also acceptable, it just takes more typing. ...
...amples that use the fully qualified name of the package instead of importing using the importpackage() method. this is also acceptable, it just takes more typing. ...
...And 2 more matches
JSAPI Cookbook
etboolean(false); // or: v = js::booleanvalue(false); finding the global object many of these recipes require finding the current global object first. // javascript var global = this; there is a function, js_getglobalforscopechain(cx), that makes a best guess, and sometimes that is the best that can be done. ...
... * this makes your c function visible as a global function in javascript. ...
... * this makes your c function visible as a global function in javascript. ...
...And 2 more matches
JS::Call
this article covers features introduced in spidermonkey 17 call a specified js function. ...
... this article covers features introduced in spidermonkey 17 call a specified js function. ...
...eatures introduced in spidermonkey 17 call a specified js function. ...
...And 2 more matches
JS_CompileFunctionForPrincipals
obsolete since jsapi 28this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. create a security-enabled js function from a
text string. ...
... obsolete since jsapi 28this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. create a security-enabled js function from a
text string. ...
...e. try to avoid using it. create a security-enabled js function from a
text string. syntax jsfunction * js_compilefunctionforprincipals(jscon
text *cx, jsobject *obj, jsprincipals *principals, const char *name, unsigned int nargs, const char **argnames, const char *body, size_t length, const char *filename, unsigned int lineno); jsfunction * js_compileucfunctionforprincipals(jscon
text *cx, jsobject *obj, jsprincipals *principals, const char *name, unsigned int nargs, const char **argnames, const jschar *body, size_t length, const char *filename, unsigned int lineno); name type description cx jscon
text * the con
text in which to compile the function. requires request. in a js_threadsafe build, the caller must be in a request on this js...
...And 2 more matches
JS_DecompileFunctionBody
fun js::handle<jsfunction*> the function to decompile. ...
... fun js::handle<jsfunction*> the function to decompile. ...
... fun js::handle<jsfunction*> the function to decompile. ...
...And 2 more matches
Places utilities for JavaScript
for instance, normally in order to get access to the bookmarks service, you have to run something like: components.classes["@mozilla.o...
...for instance, normally in order to get access to the bookmarks service, you have to run something like: components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservi...
...for instance, normally in order to get access to the bookmarks service, you have to run something like: components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookma...
...And 2 more matches
jsdIStackFrame
nged in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) strict mode is on. warnings reported as errors. makes eval() use the last object on its 'obj' param's scope chain as the ecma 'variables object'. private data for this object is an nsisupports object. attempting to alter this bit will result in an ns_error_illegal_value. opt_* values above, or'd together. last version set on this con
text. ...
...ts 'obj' param's scope chain as the ecma 'variables object'. private data for this object is an nsisupports object. attempting to alter this bit will result in an ns_error_illegal_value. opt_* values above, or'd together. last version set on this con
text. scripts typically select this with the "language" attribute. see the version_* consts on jsdidebuggerservice. unique tag among all valid jsdicon
text objects, useful as a hash key. private data for this con
text, if it is an nsisupports, |null| otherwise. retrieve the underlying con
text wrapped by this jsdicon
text. top of the scope chain for this con
text. |true| if this con
text should be allowed to run scripts, |false| otherwise. this attribute is only valid for con
texts which implement nsiscriptcon
text. setting or getting this attribute on any...
...stack frame objects. these are only valid inside the jsdiexecutionhook which gave it to you. after you return from that handler the bottom frame, and any frame you found attached through it, are invalidated via the jsdiephemeral interface. ...
...And 2 more matches
nsIAccessible
rm interface that supports platform-specific accessibility apis like msaa and atk. contains the sum of what's needed to support iaccessible as well as atk's generic accessibility objects. can also be used by in-process accessibility clients to get information about objects in the accessible tree. the accessible tree is a subset of nodes in the dom tree -- such as documents, focusable elements and
text. mozilla creates the implementations of nsiaccessible on demand. [scriptable, uuid=(c7520419-87ec-42bc-98cc-04c0bf173530)] interface nsiaccessible : nsisupports { ... }; accessible/public/nsiaccessible.idlscriptable please add a summary to this article. last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) overview this section provides short overview of methods and...
...essible.takeselection() and nsiaccessible.extendselection(). actions you can prepare actions on some accessibles (for example on button accessible). the following methods are intended for this nsiaccessible.actioncount, nsiaccessible.getactionname(), nsiaccessible.getactiondescription() and nsiaccessible.doaction(). descriptions nsiaccessible.description and nsiaccessible.help provides additional
text information about accessible. attributes many accessibles exposes attributes to provide more details that cannot be fit into existing api methods, please refer to attributes documentation for more information. you can use nsiaccessible.attributes to get a map of attributes. keyboard shortcuts some actions on accessibles can be performed by keyboard shortcuts. following methods are used to get the...
...ray of localized string of global keyboard accelerator for the given action index supported by accessible. getstate provides a bit fields of accessible states which describe boolean properties of accessible. groupposition this method returns grouping information. used for tree items, list items, tab panel labels, radio buttons, etc. also used for collectons of non-
text objects. getchildatpoint this method returns an accessible child which contains the coordinate at (x, y) in screen pixels. getchildat this method returns nth accessible child using zero-based index or last child if index than less than zero. getaccessibletoright this method returns an accessible node geometrically to the right of this one. ...
...And 2 more matches
nsIAppShellService
void hidesplashscreen(); obsolete since gecko 1.8 void initialize(in nsicmdlineservice acmdlineservice, in nsisupports nativeappsupportorsplashscreen); obsolete since gecko 1.8 void quit(in pruint32 aferocity); obsolete since gecko 1.8 void registertoplevelwindow(in nsixulwindow awi...
...e acmdlineservice, in boolean caninteract); obsolete since gecko 1.8 void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gecko 1.8 void enterlastwindowclosingsurvivalarea(); obsolete since gecko 1.8 void exitlastwindowclosingsurvivalarea(); obsolete since gecko 1.8 void gethiddenwindowandjscon
text(out nsidomwindow ahiddendomwindow, out jscon
text ajscon
text); native code only! void hidesplashscreen(); obsolete since gecko 1.8 void initialize(in nsicmdlineservice acmdlineservice, in nsisupports nativeappsupportorsplashscreen); obsolete since gecko 1.8 void quit(in pruint32 aferocity); obsolete since gecko 1.8 void registertoplevelwindow(in nsixulwindow awindow); void run(); obsolete since gecko ...
...forms that do not normally quit when the last window has closed, call enter once, but not exit) void enterlastwindowclosingsurvivalarea(); parameters none. exitlastwindowclosingsurvivalarea() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void exitlastwindowclosingsurvivalarea(); parameters none. native code only!gethiddenwindowandjscon
text return the (singleton) application hidden window as an nsidomwindow, and, the corresponding javascript con
text pointer. this is useful if you'd like to subsequently call opendialog on the hidden window. void gethiddenwindowandjscon
text( out nsidomwindow ahiddendomwindow, out jscon
text ajscon
text ); parameters ahiddendomwindow the hidden window queryinterface'd to type nsidomwindow. a...
...And 2 more matches
nsIAuthPromptCallback
ous nsiauthprompt2 method. 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) callers must call exactly one method if nsiauthprompt2.asyncpromptauth() returns successfully. they must not call any method on this interface before nsiauthprompt2.asyncpromptauth() returns. ...
...m: nsisupports last changed in gecko 1.9 (firefox 3) callers must call exactly one method if nsiauthprompt2.asyncpromptauth() returns successfully. they must not call any method on this interface before nsiauthprompt2.asyncpromptauth() returns. method overview void onauthavailable(in nsisupports acon
text, in nsiauthinformation aauthinfo); void onauthcancelled(in nsisupports acon
text, in boolean usercancel); methods onauthavailable() authentication information is available. note: any exceptions thrown from this method should be ignored. void onauthavailable( in nsisupports acon
text, in nsiauthinformation aauthinfo ); parameters acon
text the con
text as passed to nsiauthprompt2.asyncpromptauth(). aauthinfo authentication information. must be the same...
... usercancel if false, this prompt was cancelled by calling the the cancel method on the nsicancelable; otherwise, it was cancelled by the user. ...
...And 2 more matches
nsIContentSecurityPolicy
call...
...calls to this may trigger violation reports when queried, so this value should not be cached. read only. allowsinlinescript boolean whether this policy allows in-page script. calls to t...
...lled by the service when sub-elements of the protected document are being loaded. given a bit of information about the request, decides whether or not the policy is satisfied. calls to this may trigger violation reports when queried, so this value should not be cached. short shouldload( in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acon
text, in acstring amimetypeguess, in nsisupports aextra ); parameters acontenttype acontentlocation arequestorigin acon
text amimetypeguess aextra return value shouldprocess() delegate method called by the service when sub-elements of the protected document are being processed. given a bit of information about the request, decides whether or not the policy is satisfied. short shouldproces...
...And 2 more matches
nsIMarkupDocumentViewer
ins are allowed within the doc shell. default = true. obsolete since gecko 1.8 authorstyledisabled boolean disable entire author style level (including html presentation hints) bidicharacterset octet whether to force the user's character set 1 - use the document character set 2 - use the character set chosen by the user. obsolete since gecko 6.0 bidicontrols
textmode octet the order of bidirectional
text in form controls. 1 - logical 2 - visual 3 - like the containing document. obsolete since gecko 2.0 bidinumeral octet the type of numerals to display. 1 - depending on con
text, default is arabic numerals 2 - depending on con
text, default is hindi numerals 3 - arabic numerals 4 - hindi numerals. bidioptions pruint32 use ...
...als 2 - depending on con
text, default is hindi numerals 3 - arabic numerals 4 - hindi numerals. bidioptions pruint32 use this attribute to access all the bidi options in one operation. bidisupport octet whether to use platform bidi support or mozilla's bidi support 1 - use mozilla's bidi support 2 - use the platform bidi support 3 - disable bidi support. bidi
textdirection octet options for bidi presentation. use these attributes to access the individual bidi options. the default direction for the layout of bidirectional
text. 1 - left to right 2 - right to left. bidi
texttype octet the ordering of bidirectional
text. this may be either "logical" or "visual". ...
...1 - the default order for the charset 2 - logical order 3 - visual order. ...
...And 2 more matches
nsIMsgFolder
nvfeditsearchscope(in boolean asearchthisfolder, in boolean asetonsubfolders); void copydatatooutputstreamforappend(in nsiinputstream aistream, in long alength, in nsioutputstream outputstream); void copydatadone(); void setjunkscoreformessages(in nsisupportsarray amessages, in acstring ajunkscore); void applyretentionsettings(); boolean fetchmsgpreview
text([array, size_is (anumkeys)] in nsmsgkey akeystofetch, in unsigned long anumkeys, in boolean alocalonly, in nsiurllistener aurllistener); void addkeywordstomessages(in nsisupportsarray amessages, in acstring akeywords); void removekeywordsfrommessages(in nsisupportsarray amessages, in acstring akeywords); autf8string getmsg
textfromstream(in nsimsgdbhdr amsghdr, in nsiinp...
... aistream, in long alength, in nsioutputstream outputstream); copydatadone() void copydatadone(); setjunkscoreformessages() void setjunkscoreformessages(in nsisupportsarray amessages, in acstring ajunkscore); applyretentionsettings() void applyretentionsettings(); fetchmsgpreview
text() get the beginning of the message bodies for the passed in keys and store them in the msg hdr property "preview". this is intended for new mail alerts, title tips on folders with new messages, and perhaps titletips/message preview in the thread pane. boolean fetchmsgpreview
text([array, size_is (anumkeys)] in nsmsgkey akeystofetch, in unsigned long anumkeys, ...
...ure out the diffs, but these methods might be more convenient. keywords are space delimited, in the case of multiple keywords. ...
...And 2 more matches
nsIProgressEventSink
t sink after its asyncopen method has been called. notifications will cease once the channel calls its listener's onstoprequest method or once the channel is canceled (via nsirequest.cancel()). note: this interface is actually not specific to channels and may be used with other implementations of nsirequest. ...
...annel is canceled (via nsirequest.cancel()). note: this interface is actually not specific to channels and may be used with other implementations of nsirequest. method overview void onprogress(in nsirequest arequest, in nsisupports acon
text, in unsigned long long aprogress, in unsigned long long aprogressmax); void onstatus(in nsirequest arequest, in nsisupports acon
text, in nsresult astatus, in wstring astatusarg); methods onprogress() called to notify the event sink that progress has occurred for the given request. void onprogress( in nsirequest arequest, in nsisupports acon
text, in unsigned long long aprogress, in unsigned long long aprogressmax ); parameters arequest the request being observed (may qi to nsichannel). ac...
...in nsresult astatus, in wstring astatusarg); methods onprogress() called to notify the event sink that progress has occurred for the given request. void onprogress( in nsirequest arequest, in nsisupports acon
text, in unsigned long long aprogress, in unsigned long long aprogressmax ); parameters arequest the request being observed (may qi to nsichannel). acon
text if arequest is a channel, then this parameter is the listener con
text passed to nsichannel.asyncopen(). aprogress numeric value in the range 0 to aprogressmax indicating the number of bytes transfered thus far. aprogressmax numeric value indicating maximum number of bytes that will be transfered (or 0xffffffffffffffff if total is unknown). onstatus() called to ...
...And 2 more matches
nsISearchEngine
g data, [optional] in astring responsetype, [optional] in astring purpose); boolean supportsresponsetype(in astring responsetype); attributes attribute type description alias astring an optional shortcut alias for the engine. when non-null, this is a unique identifier. description astring a
text description describing the engine. read only. hidden boolean whether the engine should be hidden from the user. iconuri nsiuri a nsiuri corresponding to the engine's icon, stored locally. may be null. read only. name astring the display name of the search engine. this is a unique identifier. read only. ...
... methods addparam() adds a parameter to the search engine's submission data. this should only be called on engines created via nsibrowsersearchservice.addenginewithdetails(). void addparam( in astring name, in astring value, in astring responsetype ); parameters name the name of the parameter to add. value the value to p...
... constant value description type_mozsearch 1 type_sherlock 2 type_opensearch 3 search engine data type constants constant value description data_xml 1 data type is xml data_
text 2 data type is
text. methods addparam() adds a parameter to the search engine's submission data. this should only be called on engines created via nsibrowsersearchservice.addenginewithdetails(). void addparam( in astring name, in astring value, in astring responsetype ); parameters name the name of the parameter to add. value the value to pass. if value is "{searchterms}"...
...And 2 more matches
nsISelectionPrivate
lectiontype(in nsidomrange range); void removeselectionlistener(in nsiselectionlistener listenertoremove); void scrollintoview(in short aregion, in boolean aissynchronous, in short avpercent, in short ahpercent); void setancestorlimiter(in nsicontent acontent); native code only! void setpresshell(in nsipresshell apresshell); native code only! void set
textrangestyle(in nsidomrange range, in const
textrangestyleref
textrangestyle); native code only! void startbatchchanges(); wstring tostringwithformat(in string formattype, in unsigned long flags, in print32 wrapcolumn); attributes attribute type description cancacheframeoffset boolean frame offset cache can be used just during calling nsed...
... wstring tostringwithformat(in string formattype, in unsigned long flags, in print32 wrapcolumn); attributes attribute type description cancacheframeoffset boolean frame offset cache can be used just during calling nseditor::endplaceholdertransaction. endplaceholdertransaction will give rise to reflow/refreshing view/scroll, and call times of ns
textframe::getpointfromoffset whose return value is to be cached. see bug 35296 and bug 199412 native code only! interlineposition boolean type short returns the type of the selection (see nsiselectioncontroller for available constants). read only. constants constant value description endofprecedingline 0 startofnext...
... tableselection_allcells 5 methods addselectionlistener() void addselectionlistener( in nsiselectionlistener newlistener ); parameters newlistener endbatchchanges() will resume user interface updates after a previous call to startbatchchanges(). void endbatchchanges(); parameters none. native code only!getcachedframeoffset returns cached value for ns
textframe::getpointfromoffset. void getcachedframeoffset( in nsiframe aframe, in print32 inoffset, in nspointref apoint ); parameters aframe inoffset apoint getenumerator() nsienumerator getenumerator(); parameters none. return value native code only!getframeselection nsframeselection getframeselection(); parameters none. return value a reference to the frame s...
...And 2 more matches
nsPIPromptService
om: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) implemented by: the contract id isn't defined. this interface defines the meaning of each indexes of getint(), setint(), getstring() and setstring() of the nsidialogparamblock interface but they are defined on in c++. the indexes for getstring() and setstring() are: emsg the value is 0. ...
...ird 3.1 / fennec 1.0) implemented by: the contract id isn't defined. this interface defines the meaning of each indexes of getint(), setint(), getstring() and setstring() of the nsidialogparamblock interface but they are defined on in c++. the indexes for getstring() and setstring() are: emsg the value is 0. this is the message
text of the dialog. echeckboxmsg the value is 1. this is the label
text of a checkbox on the dialog. eiconclass the value is 2. this is the class attribute value of the icon image. etitlemessage the value is 3. this is the heading of the message. eeditfield1msg the value is 4. this is the label
text of the first
text field on the dialog. eeditfield2msg the value is 5. this is the label
text of the second
text field on the dialog. eeditfield1value the value is 6. this...
...class the value is 2. this is the class attribute value of the icon image. etitlemessage the value is 3. this is the heading of the message. eeditfield1msg the value is 4. this is the label
text of the first
text field on the dialog. eeditfield2msg the value is 5. this is the label
text of the second
text field on the dialog. eeditfield1value the value is 6. this is the default value of the first
text field. this is also used for the result of the dialog. eeditfield2value the value is 7. this is the default value of the second
text field. this is also used for the result of the dialog. ebutton0
text the value is 8. this is the label of the first button on the dialog. ebutton1
text the value is 9. this is the label of the second button on the dialog. ebutton2
text the value is 10. this is the labe...
...And 2 more matches
Adding items to the Folder Pane
is called when a rebuild occurs } }; window.addeventlistener("load", gnumbersext.load, true); the structure of folder-tree-items the folder pane stores its current display data in a property called _rowmap. this property is an array of folder-tree-items. each item in this array satisfies the following interface: id (attribute) a unique string for this object. ...
...ld occurs } }; window.addeventlistener("load", gnumbersext.load, true); the structure of folder-tree-items the folder pane stores its current display data in a property called _rowmap. this property is an array of folder-tree-items. each item in this array satisfies the following interface: id (attribute) a unique string for this object. ...
...all from getrowproperties or getcellproperties for this item will be passed into this function command (function) this function will be called when the item is double-clicked for our example extension, two different types of folder-tree-items will be defined. ...
...And 2 more matches
Debugger - Firefox Developer Tools
operty with a getter and setter. it is initially false in a freshly created debugger instance. setting this flag to true is intended for uses of subsystems of the debugger api (e.g, debugger.source) for purposes other than step debugging a target javascript program. allowwasmbinarysource a boolean value indicating whether webassembly sources will be available in binary form. the webassembly
text generation will be disabled. collectcoverageinfo a boolean value indicating whether code coverage should be enabled inside each debuggee of this debugger instance. changing this flag value will recompile all jit code to add or remove code coverage instrumentation. changing this flag when any frame of the debuggee is currently active on the stack will produce an exception. setting this to tr...
...ugger-exception as its sole argument and the debugger instance as the this value. this function should return a resumption value, which determines how the debuggee should continue. if the uncaught exception hook itself throws an exception,uncaught-hook-exception, spidermonkey throws a new error object,confess-to-debuggee-exception, to the debuggee whose message blames the debugger, and includes
textual descriptions ofuncaught-hook-exception and the originaldebugger-exception. if uncaughtexceptionhook’s value is null, spidermonkey throws an exception to the debuggee whose message blames the debugger, and includes a
textual description ofdebugger-exception. assigning anything other than a callable value or null to this property throws a typeerror exception. (this is not an ideal way to...
...is not an ideal way to handle debugger bugs, but the hope here is that some sort of backstop, even if imperfect, will make life easier for debugger developers. for example, an uncaught exception hook may have access to browser-level features like the alert function, which this api’s implementation does not, making it possible to present debugger errors to the developer in a way suited to the con
text.) debugger handler functions each debugger instance inherits accessor properties with which you can store handler functions for spidermonkey to call when given events occur in debuggee code. when one of the events described below occurs in debuggee code, the engine pauses the debuggee and calls the corresponding debugging handler on each debugger instance that is observing the debuggee. the...
...And 2 more matches
Debugger.Object - Firefox Developer Tools
erent's display name, if the referent is a function with a display name. if the referent is not a function, or if it has no display name, this is undefined. if a function has a given name, its display name is the same as its given name. in this case, the displayname and name properties are equal. if a function has no name, spidermonkey attempts to infer an appropriate name for it given its con
text. for example: function f() {} // display name: f (the given name) var g = function () {}; // display name: g o.p = function () {}; // display name: o.p var q = { r: function () {} // display name: q.r }; note that the display name may not be a proper javascript identifier, or even a proper expression: we attempt to find helpful names even when the function is not immediate...
...ealed is implicit and in a different compartment from the caller.) freeze() prevent properties from being added to or deleted from the referent, and mark each property as non-writable. return this debugger.object instance. (this function behaves like the standard object.freeze function, except that the object to be sealed is implicit and in a different compartment from the caller.) preven
textensions() prevent properties from being added to the referent. (this function behaves like the standard object.preven
textensions function, except that the object to operate on is implicit and in a different compartment from the caller.) issealed() return true if the referent is sealed—that is, if it is not extensible, and all its properties have been marked as non-configurable. (this fu...
...tion follows the invocation function conventions. if the referent is not a global object, throw a typeerror exception. codeis interpreted as strict mode code when it contains a use strict directive. ifcode is not strict mode code, then variable declarations incode affect the referent global object. (in the terms used by the ecmascript specification, the variableenvironment of the execution con
text for the eval code is the referent.) theoptions argument is as for debugger.frame.prototype.eval. evalinglobalwithbindings(code,bindings, [options]) like evalinglobal, but evaluatecode using the referent as the variable object, but with a lexical environment extended with bindings from the objectbindings. for each own enumerable property ofbindings namedname whose value isvalue, include a ...
...And 2 more matches
HTMLBRElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 2 more matches
HTMLDataListElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 2 more matches
HTMLElement: change event - Web APIs
unlike the input event, the change event is not necessarily fired for each alteration to an element's value. ...
... the html specification lists the <input> types that should fire the change event. examples <select> element html <label>choose an ice cream flavor: <select class="ice-cream" name="ice-cream"> <option value="">select one …</option> <option value="chocolate">chocolate</option> <option value="sardine">sardine</option> <option value="vanilla">v...
...kbox">; when the user commits the change explicitly (e.g., by selecting a value from a <select>'s dropdown with a mouse click, by selecting a date from a date picker for <input type="date">, by selecting a file in the file picker for <input type="file">, etc.); when the element loses focus after its value was changed, but not commited (e.g., after editing the value of <
textarea> or <input type="
text">). the html specification lists the <input> types that should fire the change event. examples <select> element html <label>choose an ice cream flavor: <select class="ice-cream" name="ice-cream"> <option value="">select one …</option> <option value="chocolate">chocolate</option> <option value="sardine">sardine</option> <option value="vanilla">vanilla</option> </select...
...And 2 more matches
HTMLElement.dir - Web APIs
arabic languages and hebrew are typical languages using the rtl directionality. an image can have its dir property set to "rtl" in which case the html attributes title and alt will be formatted and defined as "rtl". when a table has its dir set to "rtl", the column order is arranged from right to left. when an element has its dir set to "auto", the direction of the element is determined based on its first strong directionality character, or default to the directionality of its parent element. ...
...t will be formatted and defined as "rtl". when a table has its dir set to "rtl", the column order is arranged from right to left. when an element has its dir set to "auto", the direction of the element is determined based on its first strong directionality character, or default to the directionality of its parent element. browsers might allow users to change the directionality of <input> and <
textarea>s in order to assist with authoring content. chrome and safari provide a directionality option in the con
textual menu of input fields while internet explorer and edge use the key combinations ctrl + left shift and ctrl + right shift. firefox uses ctrl/cmd + shift + x but does not update the dir attribute value. syntax var currentwritingdirection = elementnodereference.dir; elementnoderefer...
... possible values for dir are ltr, for left-to-right, rtl, for right-to-left, and auto for specifying that the direction of the element must be determined based on the contents of the element. ...
...And 2 more matches
HTMLElement.isContentEditable - Web APIs
the htmlelement.iscontenteditable read-only property returns a boolean that is true if the contents of the element are editable; otherwise it returns false. ...
... the htmlelement.iscontenteditable read-only property returns a boolean that is true if the contents of the element are editable; otherwise it returns false. ...
... the htmlelement.iscontenteditable read-only property returns a boolean that is true if the contents of the element are editable; otherwise it returns false. ...
...And 2 more matches
HTMLFormElement.elements - Web APIs
llection are in the same order in which they appear in the form by following a preorder, depth-first traversal of the tree. this is called tree order. ...
... <object> <output> <select> <
textarea> no other elements are included in the list returned by elements, which makes it an excellent way to get at the elements most important when processing forms. example quick syntax example in this example, we see how to obtain the list of form controls as well as how to access its members by index and by name or id. ...
...rea> no other elements are included in the list returned by elements, which makes it an excellent way to get at the elements most important when processing forms. example quick syntax example in this example, we see how to obtain the list of form controls as well as how to access its members by index and by name or id. <form id="my-form"> <input type="
text" name="username"> <input type="
text" name="full-name"> <input type="password" name="password"> </form> var inputs = document.getelementbyid("my-form").elements; var inputbyindex = inputs[0]; var inputbyname = inputs["username"]; accessing form controls this example gets the form's element list, then iterates over the list, looking for <input> elements of type "
text" so that some form of processing can be performed on them. v...
...And 2 more matches
HTMLMarqueeElement - Web APIs
pos...
...possible values are scroll, slide and alternate. if no value is specified, the default value is scroll. ht...
...eft: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/htmlmarqueeelement" target="_top"><rect x="1" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="91" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">htmlmarqueeelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmlmarqueeelement.behavior sets how the
text is scrolled within the marquee. possible values are scroll, slide and alternate. if no value is specified, the default value is scroll. htmlmarqueeelement.bgcolor sets the background color through color nam...
...And 2 more matches
HTMLMenuItemElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 2 more matches
HTMLTableElement.insertRow() - Web APIs
an indexsizeerror exception will result. if index is omitted it defaults to -1. return value newrow is an htmltablerowelement that references the new row. example this example uses insertrow(-1) to append a new row to a table. we then use htmltablerowelement.insertcell() to insert a new cell in the new row. (to be valid html, a <tr> must have at least one <td> element.) finally, we add some
text to the cell using document.create
textnode() and node.appendchild(). html <table id="my-table"> <tr><td>row 1</td></tr> <tr><td>row 2</td></tr> <tr><td>row 3</td></tr> </table> javascript function addrow(tableid) { // get a reference to the table let tableref = document.getelementbyid(tableid); // insert a row at the end of the table let newrow = tableref.insertrow(-1); // in...
... living standard document object model (dom...
... living standard document object model (dom) level 2 html specificationthe...
...And 2 more matches
HTMLTableRowElement.insertCell() - Web APIs
an indexsizeerror exception will result. if index is omitted it defaults to -1. return value newcell is an htmltablecellelement that references the new cell. example this example uses htmltableelement.insertrow() to append a new row to a table. we then use insertcell(0) to insert a new cell in the new row. (to be valid html, a <tr> must have at least one <td> element.) finally, we add some
text to the cell using document.create
textnode() and node.appendchild(). html <table id="my-table"> <tr><td>row 1</td></tr> <tr><td>row 2</td></tr> <tr><td>row 3</td></tr> </table> javascript function addrow(tableid) { // get a reference to the table let tableref = document.getelementbyid(tableid); // insert a row at the end of the table let newrow = tableref.insertrow(-1); // in...
... living standard document object mod...
... living standard document object model (dom) level 2 html specifica...
...And 2 more matches
HTMLTitleElement - Web APIs
splay: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 2 more matches
Using microtasks in JavaScript with queueMicrotask() - Web APIs
avoided. for instance, when using promises to create microtasks, exceptions thrown by the callback are reported as rejected promises rather than being reported as standard exceptions. also, creating and destroying promises takes additional overhead both in terms of time and memory that a function which properly enqueues microtasks avoids. simply pass the javascript function to call while the con
text is handling microtasks into the queuemicrotask() method, which is exposed on the global con
text as defined by either the window or worker interface, depending on the current execution con
text. queuemicrotask(() => { /* code to run in the microtask here */ }); the microtask function itself takes no parameters, and does not return a value. when to use microtasks in this section, we'll take a...
...ext. queuemicrotask(() => { /* code to run in the microtask here */ }); the microtask function itself takes no parameters, and does not return a value. when to use microtasks in this section, we'll take a look at scenarios in which microtasks are particularly useful. generally, it's about capturing or checking results, or performing cleanup, after the main body of a javascript execution con
text exits, but before any event handlers, timeouts and intervals, or other callbacks are processed. when is that useful? the main reason to use microtasks is simply that: to ensure consistent ordering of tasks, even when results or data is available synchronously, but while simultaneously reducing the risk of user-discernible delays in operations. ensuring ordering on conditional use of promises ...
...es used by fetch() in the else clause). batching operations you can also use microtasks to collect multiple requests from various sources into a single batch, avoiding the possible overhead involved with multiple calls to handle the same kind of work. the snippet below creates a function that batches multiple messages into an array, using a microtask to send them as a single object when the con
text exits. const messagequeue = []; let sendmessage = message => { messagequeue.push(message); if (messagequeue.length === 1) { queuemicrotask(() => { const json = json.stringify(messagequeue); messagequeue.length = 0; fetch("url-of-receiver", json); }); } }; when sendmessage() gets called, the specified message is first pushed onto the message queue array. then t...
...And 2 more matches
Headers - Web APIs
t with a given name; this method has now been deleted from the spec, and headers.get() now returns all values of a given name instead of just the first one. ...
...he spec, and headers.get() now returns all values of a given name instead of just the first one. ...
... living standard ...
...And 2 more matches
InputEvent.inputType - Web APIs
the inputtype read-only property of the inputevent interface returns the type of change made to editible content. possible changes include for example inserting, deleting, and formatting
text. syntax var astring = inputevent.inputtype; value a domstring containing the type of input that was made. there are many possible values, such as insert
text, deletecontentbackward, insertfrompaste, and formatbold. for a complete list of the available input types, see the attributes section of the input events level 1 spec. examples this example logs the inputtype for input events on an editable <div>. ...
...nsert
text, deletecontentbackward, insertfrompaste, and formatbold. for a complete list of the available input types, see the attributes section of the input events level 1 spec. examples this example logs the inputtype for input events on an editable <div>. html <p id="log">input type: </p> <div contenteditable="true" style="margin: 20px;padding: 20px;border:2px dashed red;"> <p>some sample
text. ...
...aste, and formatbold. for a complete list of the available input types, see the attributes section of the input events level 1 spec. examples this example logs the inputtype for input events on an editable <div>. html <p id="log">input type: </p> <div contenteditable="true" style="margin: 20px;padding: 20px;border:2px dashed red;"> <p>some sample
text. ...
...And 2 more matches
KeyboardEvent.key - Web APIs
t.preventdefault is not called: a keydown event is first fired. if the key is held down further and the key produces a character key, then the event continues to be emitted in a platform implementation dependent interval and the keyboardevent.repeat read only property is set to true. if the key produces a character key that would result in a character being inserted into possibly an <input>, <
textarea> or an element with htmlelement.contenteditable set to true, the beforeinput and input event types are fired in that order. note that some other implementations may fire keypress event if supported. the events will be fired repeatedly while the key is held down. a keyup event is fired once the key is released. this completes the process. in sequence 1 & 3, the keyboardevent.key attribute i...
...ract with the shift and the 2 key using a u.s keyboard layout as compared to when we do so using a uk keyboard layout. try experimenting using the following two test cases: press and hold the shift key, then press 2 and release it. next, release the shift key. press and hold the shift key, then press and hold 2. release the shift key. finally, release 2. ...
...ayout as compared to when we do so using a uk keyboard layout. try experimenting using the following two test cases: press and hold the shift key, then press 2 and release it. next, release the shift key. press and hold the shift key, then press and hold 2. release the shift key. finally, release 2. ...
...And 2 more matches
Using Pointer Events - Web APIs
s surface a touch-sensitive surface. this may be a trackpad, a touch screen, or even a virtual mapping of a user's desk surface (or mousepad) with the physical screen. touch point a point of contact with the surface. this may be a finger (or elbow, ear, nose, whatever, but typically a finger), stylus, mouse, or any other method for specifying a single point on the surface. example the
text below uses the term "finger" when describing the contact with the surface, but it could, of course, also be a stylus, mouse, or other method of pointing at a location. create a canvas the touch-action property is set to none to prevent the browser from applying its default touch behavior to the application. <canvas id="canvas" width="600" height="600" style="border:solid black 1px; touch-actio...
... the touch events as they occur. tracking new touches we'll keep track of the touches in-progress. var ongoingtouches = new array(); when a pointerdown event occurs, indicating that a new touch on the surface has occurred, the handlestart() function below is called. ...
...rs move each time one or more pointers moves, a pointermove event is delivered, resulting in our handlemove() function being called. its responsibility in this example is to update the cached touch information and to draw a line from the previous position to the current position of each touch. ...
...And 2 more matches
PublicKeyCredential - Web APIs
hich is a credential for logging in to a service using an un-phishable and data-breach resistant asymmetric key pair instead of a password. it inherits from credential, and was created by the web authentication api extension to the credential management api. other interfaces that inherit from credential are passwordcredential and federatedcredential. note: this api is restricted to top-level con
texts. use from within an <iframe> element will not have any effect. properties publickeycredential.type read only secure con
text inherited from credential. always set to public-key for publickeycredential instances. publickeycredential.id read only secure con
text inherited from credential and overridden to be the base64url encoding of publickeycredential.rawid. publickeycredential.rawid read...
...in an <iframe> element will not have any effect. properties publickeycredential.type read only secure con
text inherited from credential. always set to public-key for publickeycredential instances. publickeycredential.id read only secure con
text inherited from credential and overridden to be the base64url encoding of publickeycredential.rawid. publickeycredential.rawid read only secure con
text an arraybuffer that holds the globally unique identifier for this publickeycredential. this identifier can be used to look up credentials for future calls to credentialscontainer.get. publickeycredential.response read only secure con
text an instance of an authenticatorresponse object. it is either of type authenticatorattestationresponse if the publickeycredential was the results of a navigat...
...eycredential.response read only secure con
text an instance of an authenticatorresponse object. it is either of type authenticatorattestationresponse if the publickeycredential was the results of a navigator.credentials.create() call, or of type authenticatorassertionresponse if the publickeycredential was the result of a navigator.credentials.get() call. methods publickeycredential.getclien
textensionresults()secure con
text if any extensions were requested, this method will return the results of processing those extensions. publickeycredential.isuserverifyingplatformauthenticatoravailable()secure con
text a static method returning a promise which resolves to true if an authenticator bound to the platform is capable of verifying the user. with the current state of implementation, this m...
...And 2 more matches
Range.setStart() - Web APIs
for other node types, startoffset is the number of child nodes between the start of the startnode. setting the start point below (lower in the document) the end point will result in a collapsed range with the start and end points both set to the specified start position. syntax range.setstart(startnode, startoffset); parameters startnode the node where the range should start. ...
... start. startoffset an integer greater than or equal to zero representing the offset for the start of the range from the start of startnode. examples highlight part of an element this example uses the range.setstart() and range.setend() methods to add part of an address to a range. the selected range is then highlighted using range.surroundcontents(). the address contains nine nodes: five
text nodes, and four <br> elements. html <p id="address">wyatt earp<br> 101 e. main st.<br> dodge city, ks<br> 67801<br> usa</p> <hr> <p>nodes in the original address:</p> <ol id="log"></ol> javascript const address = document.getelementbyid('address'); const log = document.getelementbyid('log'); // log info address.childnodes.foreach(node => { const li = document.createelement('li'); li.tex...
....appendchild(li); }); // highlight the street and city const startoffset = 2; // start at third node: 101 e. main st. ...
...And 2 more matches
SVGComponentTransferFunctionElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
SVGFEComponentTransferElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
SVGFEDiffuseLightingElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
SVGFEDropShadowElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
SVGFEFloodElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
SVGFEImageElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
SVGFEMergeElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
SVGFEOffsetElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
SVGFESpecularLightingElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
SVGFETileElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
SVGFETurbulenceElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
SVGFilterElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
SVGGraphicsElement: copy event - Web APIs
data property, and cancelling the event's default action using event.preventdefault(). however, the handler cannot read the clipboard data. it's possible to construct and dispatch a synthetic copy event, but this will not affect the system clipboard. ...
...celling the event's default action using event.preventdefault(). however, the handler cannot read the clipboard data. it's possible to construct and dispatch a synthetic copy event, but this will not affect the system clipboard. ...
...ult action using event.preventdefault(). however, the handler cannot read the clipboard data. it's possible to construct and dispatch a synthetic copy event, but this will not affect the system clipboard. ...
...And 2 more matches
SVGSymbolElement - Web APIs
ock; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
Selection.setBaseAndExtent() - Web APIs
he number of child nodes from the start of the focus node that should be included in the selection. so for example, if the value is 0 the whole node is excluded. if the value is 1, the first child node is included. and so on. note: if the focus position appears before the anchor position in the document, the direction of the selection is reversed — the caret is placed at the beginning of the
text rather the end, which matters for any keyboard command that might follow. for example, shift + ➡︎ would cause the selection to narrow from the beginning rather than grow at the end. return value void. exceptions if anchoroffset is larger than the number of child nodes inside anchornode, or if focusoffset is larger than the number of child nodes inside focusnode, an indexsizeerror excepti...
... note: you can find this example on github (see it live also.) specifications specification status comment selection apithe definition of 'selection.se...
... note: you can find this example on github (see it live also.) specifications specification status comment selection apithe definition of 'selection.setbaseandextent()' in that specification.
...And 2 more matches
Selection - Web APIs
to obtain a selection object for examination or manipulation, call window.getselection(). a user may make a selection from left to right (in document order) or right to left (reverse of document order). the anchor is where the user began the selection and the focus is where the user ends the selection. if you make a selection with a desktop mouse, the anchor is placed where you pressed the mouse button, and the focus is placed where you released the mouse button. anchor and focus should not be confused with the start and end positions of a selection. ...
...sa, depending on the direction you made your selection. properties selection.anchornoderead only returns the node in which the selection begins. can return null if selection never existed in the document (e.g., an iframe that was never clicked on). selection.anchoroffsetread only returns a number representing the offset of the selection's anchor within the anchornode. if anchornode is a
text node, this is the number of characters within anchornode preceding the anchor. if anchornode is an element, this is the number of child nodes of the anchornode preceding the anchor. selection.focusnoderead only returns the node in which the selection ends. can return null if selection never existed in the document (for example, in an iframe that was never clicked on). selection.focusoffsetrea...
... the number of child nodes of the anchornode preceding the anchor. selection.focusnoderead only returns the node in which the selection ends. can return null if selection never existed in the document (for example, in an iframe that was never clicked on). selection.focusoffsetread only returns a number representing the offset of the selection's anchor within the focusnode. if focusnode is a
text node, this is the number of characters within focusnode preceding the focus. if focusnode is an element, this is the number of child nodes of the focusnode preceding the focus. selection.iscollapsedread only returns a boolean indicating whether the selection's start and end points are at the same position. selection.rangecountread only returns the number of ranges in the selection. selecti...
...And 2 more matches
ServiceWorkerGlobalScope - Web APIs
developers should keep in mind that the serviceworker state is not persisted across the termination/restart cycle, so each event handler should assume it's being invoked with a bare, default global state. once successfully registered, a service worker can and will be terminated when idle to conserve memory and processor power. an active service worker is automatically restarted to respond to events, such as serviceworkerglobalscope.onfetch or serviceworkerglobalscope.onmessage. ...
...lock; position: relative; width: 100%; padding-bottom: 12.142857142857142%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 85" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/workerglobalscope" target="_top"><rect x="151" y="1" width="17...
...le mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/workerglobalscope" target="_top"><rect x="151" y="1" width="170" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="236" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">workerglobalscope</
text></a><polyline points="321,25 331,20 331,30 321,25" stroke="#d4dde4" fill="none"/><line x1="331" y1="25" x2="361" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/serviceworkerglobalscope" target="_top"><rect x="361" y...
...And 2 more matches
StaticRange - Web APIs
ck; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/abstractrange" target="_top"><rect x="1" y="1" width="130" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="66" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">abstractrange</
text></a><polyline points="131,25 141,20 141,30 131,25" stroke="#d4dde4" fill="none"/><line x1="141" y1="25" x2="171" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/staticrange" target="_top"><rect x="171" y="1" width="110" h...
... p...
... properties the properties below are inherited from its parent interface, abstractrange. staticrange.co...
...And 2 more matches
Using readable streams - Web APIs
s an example, have a look at our simple random stream demo (see it live also), which creates a custom stream, enqueues some random strings into it, and then reads the data out of the stream again once the stop string generation button is pressed. note: in order to consume a stream using fetchevent.respondwith(), the enqueued stream contents must be of type uint8array; for example, encoded using
textencoder. the custom stream constructor has a start() method that uses a windowtimers.setinterval() call to generate a random string every second. readablestreamdefaultcontroller.enqueue() is then used to enqueue it into the stream. when the button is pressed, the interval is cancelled, and a function called readstream() is invoked to read the data back out of the stream again. we also close the ...
...ata back out of the stream again. we also close the stream, as we’ve stopped enqueuing chunks to it. ...
... — reading each chunk with read(), checking whether done is true and then ending the process if so, and reading the next chunk and processing it if not, before running the read() method again. ...
...And 2 more matches
SubtleCrypto.digest() - Web APIs
ut 384 bits long. sha-512 this algorithm is specified in fips 180-4, section 6.4, and produces an output 512 bits long. hint: if you are looking here for how to create an keyed-hash message authentication code (hmac), you need to use the subtlecrypto.sign() instead. ...
... an keyed-hash message authentication code (hmac), you need to use the subtlecrypto.sign() instead. examples basic example this example encodes a message, then calculates its sha-256 digest and logs the digest length: const
text = 'an obscure body in the s-k system, your majesty. the inhabitants refer to it as the planet earth.'; async function digestmessage(message) { const encoder = new
textencoder(); const data = encoder.encode(message); const hash = await crypto.subtle.digest('sha-256', data); return hash; } const digestbuffer = await digestmessage(
text); console.log(digestbuffer.bytelength); converting a digest to a hex string the digest is returned as an arraybuffer, but for comparison and display digests are often represented as hex strings. this example calculates a d...
...sh = await crypto.subtle.digest('sha-256', data); return hash; } const digestbuffer = await digestmessage(
text); console.log(digestbuffer.bytelength); converting a digest to a hex string the digest is returned as an arraybuffer, but for comparison and display digests are often represented as hex strings. this example calculates a digest, then converts the arraybuffer to a hex string: const
text = 'an obscure body in the s-k system, your majesty. ...
...And 2 more matches
TransformStream - Web APIs
this is intended as a polyfill for unsupported platf...
...r.error("cannot send a symbol as a chunk part") break case 'undefined': controller.error("cannot send undefined as a chunk part") default: controller.enqueue(this.
textencoder.encode(string(chunk))) break }, flush() { /* do any destructor work here */ } } class anytou8stream extends transformstream { constructor() { super({...transformcontent,
textencoder: new
textencoder()}) } } polyfilling
textencoderstream and
textdecoderstream note that this is deprecated by the native constructors. ...
... flush() { /* do any destructor work here */ } } class anytou8stream extends transformstream { constructor() { super({...transformcontent,
textencoder: new
textencoder()}) } } polyfilling
textencoderstream and
textdecoderstream note that this is deprecated by the native constructors. this is intended as a polyfill for unsupported platforms. ...
...And 2 more matches
WEBGL_debug_renderer_info - Web APIs
the webgl_debug_renderer_info extension is part of the webgl api and exposes two constants with information about the graphics driver for debugging purposes. depending on the privacy settings of the browser, this extension might only be available to privileged con
texts. generally, the graphics driver information should only be used in edge cases to optimize your webgl content or to debug gpu problems. the webglrenderingcon
text.getparameter() method can help you to detect which features are supported and the failifmajorperformancecaveat con
text attribute lets you control if a con
text should be returned at all, if the performance would be dramatically slow. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in ...
...n
text attribute lets you control if a con
text should be returned at all, if the performance would be dramatically slow. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: depending on the privacy settings of the browser, this extension might only be available to privileged con
texts or not work at all. in firefox, if privacy.resistfingerprinting is set to true, this extensions is disabled. this extension is available to both, webgl1 and webgl2 con
texts. constants ext.unmasked_vendor_webgl vendor string of the graphics driver. ext.unmasked_renderer_webgl renderer string of the graphics driver. ...
...ileged con
texts or not work at all. in firefox, if privacy.resistfingerprinting is set to true, this extensions is disabled. this extension is available to both, webgl1 and webgl2 con
texts. constants ext.unmasked_vendor_webgl vendor string of the graphics driver. ext.unmasked_renderer_webgl renderer string of the graphics driver. ...
...And 2 more matches
Clearing with colors - Web APIs
note that css sets the background color of the canvas to black, so when the canvas turns green we know that webgl's magic has worked. in addition, you may notice that clearing the drawing buffer with a solid color is a two-stage process. first, we set the clear color to green, using the method clearcolor(). this only changes some internal state of webgl, but does not draw anything yet. next, we actually do the drawing by calling the clear() method. ...
...webgl machine, which in turn changes how input (in this case, a clear command) translates into output (in this case, all pixels are set to green). finally, we note that color in webgl is usually in rgba format, that is four numerical components for red, green, blue and alpha (opacity). therefore, clearcolor() takes four arguments. ...
...at color in webgl is usually in rgba format, that is four numerical components for red, green, blue and alpha (opacity). therefore, clearcolor() takes four arguments. <p>a very simple webgl program that shows some color.</p> <!--
text within a canvas element is displayed only if canvas is not supported. --> <canvas>your browser does not seem to support html5 canvas.</canvas> body {
text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } // run everything inside window load event handler, to make sure // dom is fully loaded and styled before trying to manipulate it, // and to not mess up the global scope. we are giving the event // handler a name (setupwebgl) so that we ...
...And 2 more matches
Detect WebGL - Web APIs
« previousnext » this example demonstrates how to detect a webgl rendering con
text and reports the result to the user. feature-detecting webgl in this first example we are going to check whether the browser supports webgl. to that end we will try to obtain the webgl rendering con
text from a canvas element. the webgl rendering con
text is an interface, through which you can set and query the state of the graphics machine, send data to the webgl, and execute draw commands. saving the state of the graphics machine within a single con
text interface is not unique to webgl. this is also done in other graphics {̣{glossary("api")}}, such as the canvas 2d rendering con
text. however, the properties and variables you can tweak are different for each api. <p>[ here would go the resu...
...mmands. saving the state of the graphics machine within a single con
text interface is not unique to webgl. this is also done in other graphics {̣{glossary("api")}}, such as the canvas 2d rendering con
text. however, the properties and variables you can tweak are different for each api. <p>[ here would go the result of webgl feature detection ]</p> <button>press here to detect webglrenderingcon
text</button> body {
text-align : center; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } // run everything inside window load event handler, to make sure // dom is fully loaded and styled before trying to manipulate it. window.addeventlistener("load", function() { var paragraph = document.queryselector("p"), button = document.queryselector("butto...
...margin : auto; padding : 0.6em; } // run everything inside window load event handler, to make sure // dom is fully loaded and styled before trying to manipulate it. window.addeventlistener("load", function() { var paragraph = document.queryselector("p"), button = document.queryselector("button"); // adding click event handler to button. ...
...And 2 more matches
Scissor animation - Web APIs
lear color state of webgl remains at the set value, until we change it again when a new square is created. ...
....</canvas> body {
text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } ;(function(){ "use strict" window.addeventlistener("load", setupanimation, false); // variables to hold the webgl con
text, and the color and // position of animated squares. ...
...inherit; margin : auto; padding : 0.6em; } ;(function(){ "use strict" window.addeventlistener("load", setupanimation, false); // variables to hold the webgl con
text, and the color and // position of animated squares. var gl, color = getrandomcolor(), position; function setupanimation (evt) { window.removeeventlistener(evt.type, setupanimation, false); if (!(gl = getrenderingcon
text())) return; gl.enable(gl.scissor_test); gl.clearcolor(color[0], color[1], color[2], 1.0); // unlike the browser window, vertical position in webgl is // measured from bottom to top. in here we set the initial // position of the square to be at the top left corner of the // drawing buffer. position = [0, gl.drawingbufferheight]; var button = document.queryselector("button"); ...
...And 2 more matches
WebGL by example - Web APIs
examples by topic the examples are sorted in order of increasing difficulty. but rather than just presenting them in a single long list, they are additionally divided into topics. ...
... examples by topic the examples are sorted in order of increasing difficulty. but rather than just presenting them in a single long list, they are additionally divided into topics. ...
...and later at intermediate and advanced levels. instead of trying to juggle shaders, geometry, and working with gpu memory, already in the first program, the examples here explore webgl in an incremental way. we believe that it leads to a more effective learning experience and ultimately a deeper understanding of the underlying concepts. ...
...And 2 more matches
Getting started with WebGL - Web APIs
hat encapsulate webgl's capabilities, making it easier to build 3d applications and games, such as three.js and babylon.js. preparing to render in 3d the first thing you need in order to use webgl for rendering is a canvas. the html fragment below declares a canvas that our sample will draw into. ...
...preparing to render in 3d the first thing you need in order to use webgl for rendering is a canvas. the html fragment below declares a canvas that our sample will draw into. <body> <canvas id="glcanvas" width="640" height="480"></canvas> </body> preparing the webgl con
text the main() function in our javascript code, is called when our script is loaded. its purpose is to set up the webgl con
text and start rendering content. // // start here // function main() { const canvas = document.queryselector("#glcanvas"); // initialize the gl con
text const gl = canvas.getcon
text("webgl"); // only continue if webgl is available and working if (gl === null) { alert("unable to initialize webgl. your browser or machine may not support it."); return; } // set clear color to bla...
...ay not support it."); return; } // set clear color to black, fully opaque gl.clearcolor(0.0, 0.0, 0.0, 1.0); // clear the color buffer with specified clear color gl.clear(gl.color_buffer_bit); } window.onload = main; the first thing we do here is obtain a reference to the canvas, assigning it to a variable named canvas. ...
...And 2 more matches
Signaling and video calling - Web APIs
l, and send a signalling server notification to the other peer, requesting it also close. the javascript code we'll divide this code into functional areas to more easily describe how it works. the main body of this code is found in the connect() function: it opens up a websocket server on port 6503, and establishes a handler to receive messages in json object format. this code generally handles
text chat messages as it did previously. sending messages to the signaling server throughout our code, we call sendtoserver() in order to send messages to the signaling server. this function uses the websocket connection to do its work: function sendtoserver(msg) { var msgjson = json.stringify(msg); connection.send(msgjson); } the message object passed into this function is converted into a j...
...se users property is an array of strings specifying the user names of every connected user. function handleuserlistmsg(msg) { var i; var listelem = document.queryselector(".userlistbox"); while (listelem.firstchild) { listelem.removechild(listelem.firstchild); } msg.users.foreach(function(username) { var item = document.createelement("li"); item.appendchild(document.create
textnode(username)); item.addeventlistener("click", invite, false); listelem.appendchild(item); }); } after getting a reference to the <ul> which contains the list of user names into the variable listelem, we empty the list by removing each of its child elements. note: obviously, it would be more efficient to update the list by adding and removing individual users instead of rebuilding t...
... the list by removing each of its child elements. note: obviously, it would be more efficient to update the list by adding and removing individual users instead of rebuilding the whole list every time it changes, but this is good enough for the purposes of this example. then we iterate over the array of user names using foreach(). for each name, we create a new <li> element, then create a new
text node containing the user name using create
textnode(). that
text node is added as a child of the <li> element. next, we set a handler for the click event on the list item, that clicking on a user name calls our invite() method, which we'll look at in the next section. finally, we append the new item to the <ul> that contains all of the user names. starting a call when the user clicks on a usern...
...And 2 more matches
Writing WebSocket servers - Web APIs
your server must disconnect from a client if that client sends an unmasked message.) when sending a frame back to the client, do not mask it and do not set the mask bit. we'll explain masking later. note: you must mask messages even when using a secure socket. rsv1-3 can be ignored, they are for extensions. the opcode field defines how to interpret the payload data: 0x0 for continuation, 0x1 for
text (which is always encoded in utf-8), 0x2 for binary, and other so-called "control codes" that will be discussed later. in this version of websockets, 0x3 to 0x7 and 0xb to 0xf have no meaning. the fin bit tells whether this is the last message in a series. if it's 0, then the server keeps listening for more parts of the message; otherwise, the server should consider the message delivered. more on...
...you're done. reading and unmasking the data if the mask bit was set (and it should be, for client-to-server messages), read the next 4 octets (32 bits); this is the masking key. once the payload length and masking key is decoded, you can read that number of bytes from the socket. let's call the data encoded, and the key mask. to get decoded, loop through the octets (bytes a.k.a. characters for
text data) of encoded and xor the octet with the (i modulo 4)th octet of mask. in pseudo-code (that happens to be valid javascript): var decoded = ""; for (var i = 0; i < encoded.length; i++) { decoded[i] = encoded[i] ^ mask[i % 4]; } now you can figure out what decoded means depending on your application. message fragmentation the fin and opcode fields work together to send a message split up...
...] = encoded[i] ^ mask[i % 4]; } now you can figure out what decoded means depending on your application. message fragmentation the fin and opcode fields work together to send a message split up into separate frames. this is called message fragmentation. fragmentation is only available on opcodes 0x0 to 0x2. recall that the opcode tells what a frame is meant to do. if it's 0x1, the payload is
text. if it's 0x2, the payload is binary data. however, if it's 0x0, the frame is a continuation frame; this means the server should concatenate the frame's payload to the last frame it received from that client. here is a rough sketch, in which a server reacts to a client sending
text messages. the first message is sent in a single frame, while the second message is sent across three frames. fin and ...
...And 2 more matches
Rendering and the WebXR frame animation callback - Web APIs
e, a function named mydrawframe()—is responsible for scheduling time to draw another frame by once again calling requestanimationframe(). refresh rate and frame rate assuming you've called the xrsession method requestanimationframe() since the last time the screen refreshed, the browser will call your frame renderer callback every time it's ready to repaint your app or site window. in this con
text, "repaint" simply means the process of ensuring that the screen's displayed content matches what the dom and the elements within are trying to present at the moment. hardare vertical refresh rate when the browser is ready to refresh the <canvas> within which your webxr content is displayed, it calls your frame rendering callback, which uses the specified timestamp and any other relevant data, s...
... means the process of ensuring that the screen's displayed content matches what the dom and the elements within are trying to present at the moment. hardare vertical refresh rate when the browser is ready to refresh the <canvas> within which your webxr content is displayed, it calls your frame rendering callback, which uses the specified timestamp and any other relevant data, such as models and
textures, as well as application state, to render the scene—as it should appear at the specified time—into the webgl backbuffer. when your callback returns, the browser transfers that backbuffer to the display or xr device, along with anything else that's changed since the last time the screen was refreshed. historically, displays have refreshed 60 times per second. this is due to early displays ...
...e webxr renderering callback, we use a very straightforward approach that works great for relatively simple projects. this pseudocode outlines that process: for each view in the pose's views list: get the webxr gl layer's viewport set the webgl viewport to match for each object in the scene bindprogram() bindvertices() bindmatrices() binduniforms() bindbuffers() bind
textures() drawmyobject() put simply, this form of renderer is using view-first order. each of the two views making up the xr device's display are rendered back to back, where every object is drawn on one view before rendering the same set of objects on the other view. as a result, there's a good bit of replicated effort, since much of the data needed to draw an object winds up getting sent to t...
...And 2 more matches
WebXR Device API - Web APIs
the webxr augmented reality module. a typical xr device can have either 3 or 6 degrees of freedom and might or might not have an external positional sensor. the equipment may also include an accelerometer, barometer, or other sensors which are used to sense when the user moves through space, rotates their head, or the like. accessing the webxr api to gain access to the webxr api within the con
text of a given window, use the navigator.xr property, which returns an xrsystem object through which the entire webxr device api is then exposed. navigator.xr read only this property, added to the navigator interface, returns the xrsystem object through which the webxr api is exposed. if this property is missing or null, webxr is not available. webxr interfaces xr the navigator.xr property...
...event sent to indicate that the set of available input sources has changed for the xrsession. xrreferencespaceevent sent when the state of an xrreferencespace changes. xrsessionevent sent to indicate that the state of an xrsession has changed. for example, if the position and/or orient extensions to the webgl api the webgl api is extended by the webxr specification to augment the webgl con
text to allow it to be used to render views for display by a webxr device. webglrenderingcon
textbase.makexrcompatibile() configures the webgl con
text to be compatible with webxr. if the con
text was not initially created with the xrcompatible property set to true, you must call makexrcompatible() prior to attempting to use the webgl con
text for webxr rendering. returns a promise which resolves once...
... guides and tutorials the following guides and tutorials are a great resource to learn how to comprehend webxr and the underlying 3d and vr/ar graphics concepts. ...
...And 2 more matches
Functions and classes available to Web Workers - Web APIs
by default, methods and properties of window are not available to them, but dedicatedworkerglobalscope, like window, implements windowtimers and windowbase64. ...
...e yes, but is a no-op. unknown no postmessage() yes, on dedicatedworkerglobalscope no no unknown no apis available in workers function functionality support in gecko (firefox) support in ie support in blink (chrome and opera) support in webkit (safari) broadcast channel api allows simple communication between browsing con
texts (that is windows, tabs, frames, or iframes) with the same origin (usually pages from the same site). 38 (38) no support no support no support cache cache api provides the ability to programmatically control cache storage associated with current origin. (yes) no support 43 ? channel messaging api allows two separate scripts running in different brow...
...is windows, tabs, frames, or iframes) with the same origin (usually pages from the same site). 38 (38) no support no support no support cache cache api provides the ability to programmatically control cache storage associated with current origin. (yes) no support 43 ? channel messaging api allows two separate scripts running in different browsing con
texts attached to the same document (e.g., two iframes, or the main document and an iframe, two documents via a sharedworker, or two workers) to communicate directly via two ports. 41 (41) (yes) (yes) (yes) console api provides access to the browser's debugging console (e.g., the web console in firefox). the specifics of how it works vary from browser to browser, but there is a...
...And 2 more matches
Window.crypto - Web APIs
e global object. this object allows web pages access to certain cryptographic related services. although the property itself is read-only, all of its methods (and the methods of its child object, subtlecrypto) are not read-only, and therefore vulnerable to attack by polyfill. although window.crypto is available on all windows, the returned crypto object only has one usable feature in insecure con
texts: the getrandomvalues() method. in general, you should use this api only in secure con
texts. syntax var cryptoobj = window.crypto || window.mscrypto; // for ie 11 value an instance of the crypto interface, providing access to general-purpose cryptography and a strong random-number generator. example this example uses the window.crypto property to access the getrandomvalues() method. javas...
....mscrypto; // for ie 11 value an instance of the crypto interface, providing access to general-purpose cryptography and a strong random-number generator. example this example uses the window.crypto property to access the getrandomvalues() method. ...
...stance of the crypto interface, providing access to general-purpose cryptography and a strong random-number generator. example this example uses the window.crypto property to access the getrandomvalues() method. ...
...And 2 more matches
Window.devicePixelRatio - Web APIs
than simply double the standard resolution of 96 or 76 dpi. examples correcting resolution in a <canvas> a <canvas> can appear too blurry on retina screens. use window.devicepixelratio to determine how much extra pixel density should be added to allow for a sharper image. html <canvas id="canvas"></canvas> javascript var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcon
text('2d'); // set display size (css pixels). var size = 200; canvas.style.width = size + "px"; canvas.style.height = size + "px"; // set actual size in memory (scaled to account for extra pixel density). var scale = window.devicepixelratio; // change to 1 on retina screens to see blurry canvas. canvas.width = math.floor(size * scale); canvas.height = math.floor(size * scale); // normalize coordina...
...ccount for extra pixel density). var scale = window.devicepixelratio; // change to 1 on retina screens to see blurry canvas. canvas.width = math.floor(size * scale); canvas.height = math.floor(size * scale); // normalize coordinate system to use css pixels. ctx.scale(scale, scale); ctx.fillstyle = "#bada55"; ctx.fillrect(10, 10, 300, 300); ctx.fillstyle = "#ffffff"; ctx.font = '18px arial'; ctx.
textalign = 'center'; ctx.
textbaseline = 'middle'; var x = size / 2; var y = size / 2; var
textstring = "i love mdn"; ctx.fill
text(
textstring, x, y); monitoring screen resolution or zoom level changes in this example, we'll set up a media query and watch it to see when the device resolution changes, so that we can check the value of devicepixelratio to handle any updates we need to. javascript ...
...t the javascript code creates the media query that monitors the device resolution and checks the value of devicepixelratio any time it changes. let pixelratiobox = document.queryselector(".pixel-ratio"); let mqstring = `(resolution: ${window.devicepixelratio}dppx)`; const updatepixelratio = () => { let pr = window.devicepixelratio; let prstring = (pr * 100).tofixed(0); pixelratiobox.inner
text = `${prstring}% (${pr.tofixed(2)})`; } updatepixelratio(); matchmedia(mqstring).addlistener(updatepixelratio); the string mqstring is set up to be the media query itself. the media query, which begins as (resolution: 1dppx) (for standard displays) or (resolution: 2dppx) (for retina/hidpi displays), checks to see if the current display resolution matches a specific number of device dots per p...
...And 2 more matches
Window.find() - Web APIs
acasesensitive boolean. if true, specifies a case-sensitive search. abackwards boolean. if true, specifies a backward search. awraparound boolean. ...
...boolean. if true, specifies a backward search. awraparound boolean. if true, specifies a wrap around search. awholeword unimplemented boolean. if true, specifies a whole word search. this is not implemented; see bug 481513. asearchinframes boolean. if true, specifies a search in frames. returns true if the string is found; otherwise, false. ...
...an. if true, specifies a backward search. awraparound boolean. if true, specifies a wrap around search. awholeword unimplemented boolean. if true, specifies a whole word search. this is not implemented; see bug 481513. asearchinframes boolean. if true, specifies a search in frames. returns true if the string is found; otherwise, false. ...
...And 2 more matches
Window.prompt() - Web APIs
the window.prompt() displays a dialog with an optional message prompting the user to input some
text. syntax result = window.prompt(message, default); parameters message optional a string of
text to display to the user. can be omitted if there is nothing to show in the prompt window. default optional a string containing the default value displayed in the
text input field. note that in internet explorer 7 and 8, if you do not provide this parameter, the string "undefined" is the default value. return value a string containing the
text entered by the user, or null. example let sign = prompt("what's your sign?"); if (sign.tolowercase() == "scorpio") { alert("wow! i'm a scorpio too!"); } // there are many ways to use the prompt feature sign = window.prompt(); // open the blank ...
...if the user clicks the cancel button, this function returns null. ...
...se() == "scorpio") { alert("wow! ...
...And 2 more matches
Window.sessionStorage - Web APIs
or the current origin. sessionstorage is similar to localstorage; the difference is that while data in localstorage doesn't expire, data in sessionstorage is cleared when the page session ends. a page session lasts as long as the browser is open, and survives over page reloads and restores. opening a page in a new tab or window creates a new session with the value of the top-level browsing con
text, which differs from how session cookies work. opening multiple tabs/windows with the same url creates sessionstorage for each tab/window. closing a tab/window ends the session and clears objects in sessionstorage. data stored in sessionstorage is specific to the protocol of the page. in particular, data stored by a script on a site accessed with http (e.g., http://example.com) is put in a dif...
... if the origin uses the file: or data: scheme, for example). for example, the user may have their browser configured to deny permission to persist data for the specified origin. example the following snippet accesses the current origin's session storage object and adds data to it with storage.setitem(). ...
...). for example, the user may have their browser configured to deny permission to persist data for the specified origin. example the following snippet accesses the current origin's session storage object and adds data to it with storage.setitem(). sessionstorage.setitem('mycat', 'tom'); the following example autosaves the contents of a
text field, and if the browser is refreshed, restores the
text field content so that no writing is lost. ...
...And 2 more matches
XPathEvaluator.evaluate() - Web APIs
resolver optional permits translation of all prefixes, including the xml namespace prefix, within the xpath expression into appropriate namespace uris. ...
... resolver optional permits translation of all prefixes, including the xml namespace prefix, within the xpath expression into appropriate namespace uris. ...
... resolver optional permits translation of all prefixes, including the xml namespace prefix, within the xpath expression into appropriate namespace uris. ...
...And 2 more matches
XRWebGLLayer.framebuffer - Web APIs
t framebuffer = xrwebgllayer.framebuffer; value a webglframebuffer object representing the framebuffer into which the 3d scene is being rendered, or null if the xr compositor is disabled for the session. usage notes how opaque framebuffers are special the framebuffer represented by the framebuffer property is opaque. as such, its behavior is different in several ways from a standard webgl con
text. ...
... opaque framebuffers are considered incomplete and are not available for rendering other than while executing the requestanimationframe() callback. ...
...n an opaque framebuffer results in the webgl error invalid_operation (0x0502). opaque framebuffers are considered incomplete and are not available for rendering other than while executing the requestanimationframe() callback. attempting to clear, draw to, or read from the framebuffer results in a webgl invalid_framebuffer_operation error (0x0506). calling checkframebufferstatus() on the webgl con
text from outside the animation frame callback causes the webgl framebuffer_unsupported error (0x8cdd) to be reported. opaque framebuffers initialized with the depth property set to false will not have a depth buffer and will rely on the coordinates alone to determine distance. opaque framebuffers initialized without specifying a stencil will not have a stencil buffer. opaque framebuffers will not ...
...And 2 more matches
Alerts - Accessibility
each field h...
...each field has a set of criteria which must be met in order to pass validation. in order to simplify th...
...<script type="application/javascript"> function removeoldalert() { var oldalert = document.getelementbyid("alert"); if (oldalert){ document.body.removechild(oldalert); } } function addalert(amsg) { removeoldalert(); var newalert = document.createelement("div"); newalert.setattribute("role", "alert"); newalert.setattribute("id", "alert"); var msg = document.create
textnode(amsg); newalert.appendchild(msg); document.body.appendchild(newalert); } function checkvalidity(aid, asearchterm, amsg) { var elem = document.getelementbyid(aid); var invalid = (elem.value.indexof(asearchterm) < 0); if (invalid) { elem.setattribute("aria-invalid", "true"); addalert(amsg); } else { elem.setattribute("aria-invalid", "false"); removeolda...
...And 2 more matches
Mobile accessibility checklist - Accessibility
this document provides a concise checklist of accessibility requirements for mobile app developers. it is intended to continuously evolve as more patterns arise. colour colour contrast must comply with wcag 2.1 aa level requirements: contrast ratio of 4.5:1 for normal
text (less than 18 point or 14 point bold.) contrast ratio of 3:1 for large
text (at least 18 point or 14 point bold.) information conveyed via colour must be also available by other means too (underlined
text for links, etc.) visibility content hiding techniques such as zero opacity, z-index order and off-screen placement must not be used exclusively to handle visibility. everything other than the currently visible screen must be truly invisible (especially relevant for single page apps with m...
...lutely unavoidable, aria-hidden attribute should not be used. focus all activatable elements must be focusable: standard controls such as links, buttons, and form fields are focusable by default. non-standard controls must have an appropriate aria role assigned to them, such as button, link, or checkbox. focus should be handled in a logical order and consistent manner.
text equivalents
text equivalent must be provided for every non-strictly presentational non-
text element within the app. use alt and title where appropriate (see steve faulkner's post about using the html title attribute for a good guide.) if the above attributes are not applicable, use appropriate aria states and properties such as aria-label, aria-labelledby, or aria-describedby. ...
...wcag 2.1: label in name. all form controls must have labels (<label> elements) for the benefit of screen reader users. ...
...And 2 more matches
-webkit-border-before - CSS: Cascading Style Sheets
r-before: medium dashed blue; /* global values */ -webkit-border-before: inherit; -webkit-border-before: initial; -webkit-border-before: unset; -webkit-border-before can be used to set the values for one or more of: -webkit-border-before-width, -webkit-border-before-style, and -webkit-border-before-color. it maps to a physical border depending on the element's writing mode, directionality, and
text orientation. it corresponds to the border-top, border-right, border-bottom, or border-left property depending on the values defined for writing-mode, direction, and
text-orientation. it relates to -webkit-border-after, -webkit-border-start, and -webkit-border-end, which define the other borders of the element. this property is on the standard track as border-block-start. syntax values one or...
... ...
... ...
...And 2 more matches
Feature-Policy - HTTP
ame yes syntax feature-policy: <directive> <allowlist> <directive> the feature policy directive to apply the allowlist to. see directives below for a list of the permitted directive names. <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. directives accelerometer controls whether the current...
...And 2 more matches
A typical HTTP session - HTTP
work around this problem, web developers use several techniques: ping the server periodically via the xmlhttprequest, fetch apis, using the websockets api, or similar protocols. sending a client request once the connection is established, the user-agent can send the request (a user-agent is typically a web browser, but can be anything else, a crawler, for example). a client request consists of
text directives, separated by crlf (carriage return, followed by line feed), divided into three blocks: the first line contains a request method followed by its parameters: the path of the document, i.e. an absolute url without the protocol or domain name the http protocol version subsequent lines represent an http header, giving the server information about what type of data is appr...
...tation of the specified resource. requests using get should only retrieve data. the post method sends data to a server so it may change its state. this is the method often used for html forms. structure of a server response after the connected agent has sent its request, the web server processes it, and ultimately returns a response. similar to a client request, a server response is formed of
text directives, separated by crlf, though divided into three blocks: the first line, the status line, consists of an acknowledgment of the http version used, followed by a status request (and its brief meaning in human-readable
text). subsequent lines represent specific http headers, giving the client information about the data sent (e.g. type, data size, compression algorithm used, hints about c...
...aders, giving the client information about the data sent (e.g. type, data size, compression algorithm used, hints about caching). similarly to the block of http headers for a client request, these http headers form a block ending with an empty line. the final block is a data block, which contains the optional data. ...
...And 2 more matches
Grammar and types - JavaScript
ed by semicolons. ecmascript also has rules for automatic insertion of semicolons (asi) to end statements. (for more information, see the detailed reference about javascript's lexical grammar.) it is considered best practice, however, to always write a semicolon after a statement, even when it is not strictly needed. this practice reduces the chances of bugs getting into the code. the source
text of javascript script gets scanned from left to right, and is converted into a sequence of input elements which are tokens, control characters, line terminators, comments, or whitespace. (spaces, tabs, and newline characters are considered whitespace.) comments the syntax of comments is the same as in c++ and in many other languages: // a one line comment /* this is a longer, * multi-line com...
...for more details, see this blog post.) you can also use the unicode escape sequences as characters in identifiers. some examples of legal names are number_hits, temp99, $credit, and _name. declaring variables you can declare a variable in two ways: with the keyword var. for example, var x = 42. this syntax can be used to declare both local and global variables, depending on the execution con
text. with the keyword const or let. for example, let y = 13. this syntax can be used to declare a block-scope local variable. (see variable scope below.) you can also simply assign a value to a variable for example, x = 42. this form creates an undeclared global variable. it also generates a strict javascript warning. undeclared global variables can often lead to unexpected behavior. thus, it is d...
...e.log('the value of y is ' + y); // uncaught referenceerror: y is not defined let y; you can use undefined to determine whether a variable has a value. in the following code, the variable input is not assigned a value, and the if statement evaluates to true. var input; if (input === undefined) { dothis(); } else { dothat(); } the undefined value behaves as false when used in a boolean con
text. for example, the following code executes the function myfunction because the myarray element is undefined: var myarray = []; if (!myarray[0]) myfunction(); the undefined value converts to nan when used in numeric con
text. var a; a + 2; // evaluates to nan when you evaluate a null variable, the null value behaves as 0 in numeric con
texts and as false in boolean con
texts. for example: var n...
...And 2 more matches
Object.isFrozen() - JavaScript
all its properties are non-configurable, and all its data properties (that is, properties which are not accessor properties with getter or setter components) are non-writable. examples using object.isfrozen // a new object is extensible, so it is not frozen. object.isfrozen({}); // === false // an empty object which is not extensible // is vacuously frozen. ...
...uously frozen. var vacuouslyfrozen = object.preven
textensions({}); object.isfrozen(vacuouslyfrozen); // === true // a new object with one property is also extensible, // ergo not frozen. var oneprop = { p: 42 }; object.isfrozen(oneprop); // === false // preventing extensions to the object still doesn't // make it frozen, because the property is still // configurable (and writable). object.preven
textensions(oneprop); object.isfrozen(oneprop); // === false // ...but then deleting that property makes the object // vacuously frozen. delete oneprop.p; object.isfrozen(oneprop); // === true // a non-extensible object with a non-writable // but still configurable property is not frozen. ...
...roperty is still // configurable (and writable). object.preven
textensions(oneprop); object.isfrozen(oneprop); // === false // ...but then deleting that property makes the object // vacuously frozen. delete oneprop.p; object.isfrozen(oneprop); // === true // a non-extensible object with a non-writable // but still configurable property is not frozen. var nonwritable = { e: 'plep' }; object.preven
textensions(nonwritable); object.defineproperty(nonwritable, 'e', { writable: false }); // make non-writable object.isfrozen(nonwritable); // === false // changing that property to non-configurable // then makes the object frozen. object.defineproperty(nonwritable, 'e', { configurable: false }); // make non-configurable object.isfrozen(nonwritable); // === true // a non-extensible object with a ...
...And 2 more matches
String.prototype.substring() - JavaScript
uld be careful not to get them confused. the arguments of substring() represent the starting and ending indexes, while the arguments of substr() represent the starting index and the number of characters to include in the returned string. furthermore, substr() is considered a legacy feature in ecmascript and could be removed from future versions, so it is best to avoid using it if possible. let
text = 'mozilla' console.log(
text.substring(2,5)) // => "zil" console.log(
text.substr(2,3)) // => "zil" differences between substring() and slice() the substring() and slice() methods are almost identical, but there are a couple of subtle differences between the two, especially in the way negative arguments are dealt with. the substring() method swaps its two arguments if indexstart is greater...
...substring() and slice() the substring() and slice() methods are almost identical, but there are a couple of subtle differences between the two, especially in the way negative arguments are dealt with. the substring() method swaps its two arguments if indexstart is greater than indexend, meaning that a string is still returned. the slice() method returns an empty string if this is the case. ...
...substring() and slice() methods are almost identical, but there are a couple of subtle differences between the two, especially in the way negative arguments are dealt with. the substring() method swaps its two arguments if indexstart is greater than indexend, meaning that a string is still returned. the slice() method returns an empty string if this is the case. ...
...And 2 more matches
String - JavaScript
some of the most-used operations on strings are to check their length, to build and concatenate them using the + and += string operators, checking for the existence or location of substrings with the indexof() method, or extracting substrings with the substring() method. ...
...er case is used instead of lower case in this function, due to problems with certain utf-8 character conversions. string primitives and string objects note that javascript distinguishes between string objects and primitive string values. ...
...tive string values. (the same is true of boolean and numbers.) string literals (denoted by double or single quotes) and strings returned from string calls in a non-constructor con
text (that is, called without using the new keyword) are primitive strings. javascript automatically converts primitives to string objects, so that it's possible to use string object methods for primitive strings. in con
texts where a method is to be invoked on a primitive string or a property lookup occurs, javascript will automatically wrap the string primitive and call the method or perform the property lookup. let s_prim = 'foo' let s_obj = new string(s_prim) console.log(typeof s_prim) // logs "string" console.log(typeof s_obj) // logs "object" string primitives and string objects also give different results ...
...And 2 more matches
Image file type and format guide - Web media technologies
te png image (including the file header). if you use ico files, you should use the bmp format, as support for png inside ico files wasn't added until windows vista and may not be well supported. ico files should not be used in web content. additionally, their use for favicons has subsided in favor of using a png file and the <link> element, as described in providing icons for different usage con
texts in <link>: the external resource link element. mime type image/vnd.microsoft.icon (official), image/x-icon (used by microsoft) file extension(s) .ico specification browser compatibility all versions of chrome, edge, firefox, internet explorer, opera, and safari maximum dimensions 256×256 pixels supported color modes ...
... svg (scalable vector graphics) svg is an xml-based vector graphics format that specifies the contents of an image as a set of drawing commands that create shapes, lines, apply colors, filters, and so forth. svg files are ideal for diagrams, icons, and other images which can be accurately drawn at any size. as such, svg is popular for user interface elements in modern web design. svg files are
text files containing source code that, when interpreted, draws the desired image. for instance, this example defines an drawing area with initial size 100 by 100 units, containing a line drawn diagonally through the box: <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <line x1="0" y1="80" x2="100" y2="20" stroke="black" /> </svg> svg can be used in web content in two ways: you c...
...port the first image. tiff supports a variety of color spaces, not just rgb. these include cmyk, ycbcr, and others, making tiff a good choice for storing images intended for print, film, or television media. long ago, some browsers supported tiff images in web content; today, however, you need to use special libraries or browser add-ons to do so. as such, tiff files are not useful within the con
text of web content, but it's common to provide downloadable tiff files when distributing photos and other artwork intended for precision editing or printing. mime type image/tiff file extension(s) .tif, .tiff specification adobe.io/open/standards/tiff.html browser compatibility no browsers integrate support for tiff; its value is as a download format ...
...And 2 more matches
path - SVG: Scalable Vector Graphics
the path attribute has two different meanings, either it defines a
text path along which the characters of a
text are rendered, or a motion path along which a referenced element is animated. two elements are using this attribute: <animatemotion> and <
textpath> html, body, svg { height: 100%; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path id="mypath" fill="none" stroke="silver" d="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50" /> <
text> <
textpath path="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50"> quick brown fox jumps over the lazy dog. ...
...th> html, body, svg { height: 100%; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path id="mypath" fill="none" stroke="silver" d="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50" /> <
text> <
textpath path="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50"> quick brown fox jumps over the lazy dog. </
textpath> </
text> </svg> animatemotion for <animatemotion>, path defines the motion path, expressed in the same format and interpreted the same way as the d geometric property for the <path> element. the effect of a motion path animation is a translation along the x- and y-axes of the current user coordinate system by the x and y values computed over time. value <path-data> ...
...ong the x- and y-axes of the current user coordinate system by the x and y values computed over time. value <path-data> default value none animatable no <path-data> this value defines the motion path along which the referenced element is animated. for detailed information about the commands that can be used, see the explanation for the d attribute.
textpath for <
textpath>, path defines the path onto which the glyphs of a <
text> element will be rendered. an empty string indicates that there is no path data for the element. this means that the
text within the <
textpath> element does not render or contribute to the bounding box of the <
text> element. if the attribute is not specified, the path specified in href is used instead. value ...
...And 2 more matches
startOffset - SVG: Scalable Vector Graphics
the startoffset attribute defines an offset from the start of the path for the initial current
text position along the path after converting the path to the <
textpath> element's coordinate system. ...
... the startoffset attribute defines an offset from the start of the path for the initial current
text position along the path after converting the path to the <
textpath> element's coordinate system. ...
...is attribute: <
textpath> html,body,svg { height:100% } <svg viewbox="0 0 220 100" xmlns="http://www.w3.org/2000/svg"> <path id="path1" fill="none" stroke="red" d="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50" /> <path id="path2" fill="none" stroke="red" d="m130,90 q210,90 210,45 q210,10 170,10 q130,10 130,40 q130,70 165,70 q190,70 195,50" /> <
text> <
textpath href="#path1" startoffset="0"> quick brown fox jumps over the lazy dog. </
textpath> </
text> <
text> <
textpath href="#path2" startoffset="40"> quick brown fox jumps over the lazy dog. ...
...And 2 more matches
stroke-miterlimit - SVG: Scalable Vector Graphics
tio of the miter length to the stroke-width used to draw a miter join. when the limit is exceeded, the join is converted from a miter to a bevel. note: as a presentation attribute stroke-miterlimit can be used as a css property. ...
...he miter length to the stroke-width used to draw a miter join. when the limit is exceeded, the join is converted from a miter to a bevel. note: as a presentation attribute stroke-miterlimit can be used as a css property. ...
...tween the segments in user space by the formula: stroke-miterlimit = miterlength stroke-width = 1 sin ( θ 2 ) for example, a miter limit of 1.414 converts miters to bevels for theta less than 90 degrees, a limit of 4.0 converts them for theta less than approximately 29 degrees, and a limit of 10.0 converts them for theta less than approximately 11.5 degrees. usage con
text value <number> default value 4 animatable yes the value of stroke-miterlimit must be greater than or equal to 1. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechr...
...And 2 more matches
<solidcolor> - SVG: Scalable Vector Graphics
t lets authors define a single color for use in multiple places in an svg document. it is also useful as away of animating a palette colors. note: this is an experimental technology, and not yet implemented in browsers. a workaround is to use a <lineargradient> with only one color stop. this is less elegant, and unlike <solidcolor>, cannot itself be used in the definition of gradients. usage con
text missing attributes global attributes core attributes global event attributes presentation attributes style attributes specific attributes none. dom interface this element implements the svgsolidcolorelement interface. example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 300 200" height="150"> <defs> <!-- solidcolor is experimental. --> <solidcolor id="mycolo...
... height="150"> <defs> <!-- solidcolor is experimental. --> <solidcolor id="mycolor" solid-color="gold" solid-opacity="0.8"/> <!-- lineargradient with a single color stop is a less elegant way to achieve the same effect, but it works in current browsers. ...
...imental. --> <solidcolor id="mycolor" solid-color="gold" solid-opacity="0.8"/> <!-- lineargradient with a single color stop is a less elegant way to achieve the same effect, but it works in current browsers. ...
...And 2 more matches
Axes - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes there are thirteen different axes in the xpath specification. an axis represents a relationship to the con
text node, and is used to locate nodes relative to that node on the tree. the following is an extremely brief description of the thirteen available axes and the degree of support available in gecko. for further information on using xpath expressions, please see the for further reading section at the end of transforming xml with xslt document. also see the 'axes' section in the xpath spec. ...
...e to that node on the tree. the following is an extremely brief description of the thirteen available axes and the degree of support available in gecko. for further information on using xpath expressions, please see the for further reading section at the end of transforming xml with xslt document. also see the 'axes' section in the xpath spec. ancestor indicates all the ancestors of the con
text node beginning with the parent node and traveling through to the root node. ancestor-or-self indicates the con
text node and all of its ancestors, including the root node. attribute indicates the attributes of the con
text node. only elements have attributes. this axis can be abbreviated with the at sign (@). child indicates the children of the con
text node. if an xpath expression does not sp...
...ates the attributes of the con
text node. only elements have attributes. this axis can be abbreviated with the at sign (@). child indicates the children of the con
text node. if an xpath expression does not specify an axis, this is understood by default. since only the root node or element nodes have children, any other use will select nothing. descendant indicates all of the children of the con
text node, and all of their children, and so forth. attribute and namespace nodes are not included - the parent of an attribute node is an element node, but attribute nodes are not the children of their parents. descendant-or-self indicates the con
text node and all of its descendants. attribute and namespace nodes are not included - the parent of an attribute node is an element node, but attribute n...
...And 2 more matches
Index - WebAssembly
xisting ecosystem of c libraries and allow developers to use them on the web. 5 compiling from rust to webassembly compiling, webassembly, rust, wasm if you've written some rust code, you can compile it into webassembly! this tutorial takes you through all you need to know to compile a rust project to wasm and use it in an existing web app. ...
...e them on the web. 5 compiling from rust to webassembly compiling, webassembly, rust, wasm if you've written some rust code, you can compile it into webassembly! this tutorial takes you through all you need to know to compile a rust project to wasm and use it in an existing web app. 6 converting webassembly
text format to wasm webassembly, assembly, conversion,
text format, wabt, wasm, wast2wasm, wat2wasm webassembly has an s-expression-based
textual representation, an intermediate form designed to be exposed in
text editors, browser developer tools, etc. this article explains a little bit about how it works, and how to use available tools to covert
text format files to the .wasm assembly format. 7 exported webassembly functions guide, j...
...ebassembly code fetch, javascript, webassembly, xmlhttprequest, bytecode to use webassembly in javascript, you first need to pull your module into memory before compilation/instantiation. this article provides a reference for the different mechanisms that can be used to fetch webassembly bytecode, as well as how to compile/instantiate then run it. 10 understanding webassembly
text format functions, javascript, s-expressions, webassembly, calls, memory, shared address, table,
text format, was, wasm this finishes our high-level tour of the major components of the webassembly
text format and how they get reflected in the webassembly js api. 11 using the webassembly javascript api api, devtools, javascript, webassembly, compile, instantiate, memory, ta...
...And 2 more matches
Classes and Inheritance - Archive of obsolete content
this is all handled automatically. on the other hand, the call to the constructor for shape still has t...
...this is all handled automatically. on the other hand, the call to the constructor for shape still has to be made explicitl...
...this is all handled automatically. on the other hand, the call to the constructor for shape still has to be made explicitly. this is done by forwarding...
...this is all handled automatically. on the other hand, the call to the constructor for shape still has to be made explicitly. this is done by forwarding to the initialize method of the prototype of the base class. note that this is always safe, ...
notifications - Archive of obsolete content
nsient, toaster-style desktop messages to the user. usage this api supports desktop notifications on windows, os x using growl (and notification center as of os x 10.9 mavericks), and linux using libnotify. here's a typical example. when the message is clicked, a string is logged to the console. var notifications = require("sdk/notifications"); notifications.notify({ title: "jabberwocky",
text: "'twas brillig, and the slithy toves", data: "did gyre and gimble in the wabe", onclick: function (data) { console.log(data); // console.log(this.data) would produce the same result. } }); this one displays an icon that's stored in the add-on's data directory. see the self module documentation for more information. var notifications = require("sdk/notifications"); var self = requ...
...click: function (data) { console.log(data); // console.log(this.data) would produce the same result. } }); this one displays an icon that's stored in the add-on's data directory. see the self module documentation for more information. ...
...; var self = require("sdk/self"); var myiconurl = self.data.url("myicon.png"); notifications.notify({
text: "i have an icon!", iconurl: myiconurl }); from firefox 34, you can use "./myicon.png" as an alias for self.data.url("myicon.png"). so you can rewrite the above code like this: var notifications = require("sdk/notifications"); var myiconurl = "./myicon.png"; notifications.notify({
text: "i have an icon!", iconurl: myiconurl }); this module depends on the underlying system's notification service. if the user's system does not support desktop notifications or if its notifications service is not running: if firefox was started normally, notifications are logged to firefox's error console if the user launched firefox from the command line, notifications are logged to the te...
...fications are logged to firefox's error console if the user launched firefox from the command line, notifications are logged to the terminal. globals functions notify(options) displays a transient notification to the user. parameters options : object optional options: name type title string a string to display as the message's title.
text string a string to display as the body of the message. iconurl string the url of an icon to display inside the message. it may be a remote url, a data uri, or a url returned by the self module. onclick function a function to be called when the user clicks the message. it will be passed the value of data. data string ...
page-mod - Archive of obsolete content
usage to use page-mod, you specify: one or more scripts to attach. the sdk calls these scripts "content scripts". a pattern that a page's url must match, in order for the script(s) to be attached to that page. ...
...lement message. the content script receives the getelements message, retrieves all elements of that type, and for each element sends a gotelement message containing the element's innerhtml. the "main.js" code receives each gotelement message and logs the contents. if multiple documents that match the page-mod's include pattern are loaded, then each document is loaded into its own execution con
text with its own copy of the content scripts. in this case the listener assigned to onattach is called once for each loaded document, and the add-on code will have a separate worker for each document. to learn much more about communicating with content scripts, see the guide to content scripts and in particular the chapter on communicating using port. mapping workers to tabs the worker has a tab p...
...add-on in the add-ons manager. note that this is a very naive implementation, created only for demonstration purposes, and will not work properly in many real-world cases. attaching content scripts to tabs we've seen that the page-mod api attaches content scripts to documents based on their url. sometimes, though, we don't care about the url: we just want to execute a script on demand in the con
text of a particular tab. for example, we might want to run a script in the con
text of the currently active tab when the user clicks a button: to block certain content, to change the font style, or to display the document's dom structure. using the attach method of the tab object, you can attach a set of content scripts to a particular tab. the scripts are executed immediately. the following add-on...
...clude: "*.developer.mozilla.org", contentscript: modscript }); var tabs = require("sdk/tabs"); tabs.open("mozilla.org"); // matches tabs.open("addons.mozilla.org"); // matches tabs.open("developer.mozilla.org"); // no match pagemod a page-mod object. once created a page-mod will execute the supplied content scripts, and load any supplied stylesheets, in the con
text of any documents matching the pattern specified by the include property. methods destroy() stops the page-mod from making any more modifications. once destroyed the page-mod can no longer be used. modifications already made to open documents by content scripts will not be undone, but stylesheets added by contentstyle or contentstylefile, will be unregistered immediately. properties include ...
page-worker - Archive of obsolete content
tscript: "console.log(document.body.innerhtml);", contenturl: "./myfile.html" }); you can load a new page by setting the page worker's contenturl property. in this example we fetch the first paragraph of a page from wikipedia, then the first paragraph of a different page: var getfirstparagraph = "var paras = document.getelementsbytagname('p');" + "console.log(paras[0].
textcontent);" + "self.port.emit('loaded');" pageworker = require("sdk/page-worker").page({ contentscript: getfirstparagraph, contenturl: "http://en.wikipedia.org/wiki/chalk" }); pageworker.port.on("loaded", function() { pageworker.contenturl = "http://en.wikipedia.org/wiki/cheese" }); scripting page content to access the page's dom you need to attach a script to it. ...
...in your own add-ons...
... contentscriptfile string,array a local file url or an array of local file urls of content scripts to load. content scripts specified by this option are loaded before those specified by the contentscript option. see working with content scripts for help on setting this property. contentscript string,array a string or an array of strings containing the
texts of content scripts to load. content scripts specified by this option are loaded after those specified by the contentscriptfile option. contentscriptwhen string when to load the content scripts. this may take one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom...
... script in the content. script defaults to true. include a set of match patterns to define the urls which the page-worker's content script will be applied. this is useful when using pages which redirect to other pages in your page-worker. contentscriptfile a local file url or an array of local file urls of content scripts to load. contentscript a string or an array of strings containing the
texts of content scripts to load. contentscriptwhen when to load the content scripts. this may have one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "e...
io/file - Archive of obsolete content
viding access to the contents of a file. parameters path : string the path of the file to open. mode : string an optional string, each character of which describes a characteristic of the returned stream. if the string contains "r", the file is opened in read-only mode. "w" opens the file in write-only mode. "b" opens the file in binary mode. if "b" is not present, the file is opened in
text mode, and its contents are assumed to be utf-8. if mode is not given, "r" is assumed, and the file is opened in read-only
text mode. apart from these options, this api always passes the following options: create_file, truncate (see //github.com/realityripple/uxp/blob/master/nsprpub/pr/include/prio.h#550). this means that: if the file does not exist it is created if the file exists, its le...
...if the file is opened in binary read-only mode, a bytereader is returned, and if binary write-only mode, a bytewriter is returned. see byte-streams for more information on these byte stream objects. ...
... these options, this api always passes the following options: create_file, truncate (see //github.com/realityripple/uxp/blob/master/nsprpub/pr/include/prio.h#550). this means that: if the file does not exist it is created if the file exists, its length is truncated to zero it is not possible to open the file in append mode. returns stream : if the file is opened in
text read-only mode, a
textreader is returned, and if
text write-only mode, a
textwriter is returned. see
text-streams for information on these
text stream objects. if the file is opened in binary read-only mode, a bytereader is returned, and if binary write-only mode, a bytewriter is returned. see byte-streams for more information on these byte stream objects. opened files should always be closed after use by calling close...
..., mode) opens a file and returns a string containing its entire contents. parameters path : string the path of the file to read. mode : string an optional string, each character of which describes a characteristic of the returned stream. if the string contains "b", the contents will be returned in binary mode. if "b" is not present or mode is not given, the file contents will be returned in
text mode. returns string : a string containing the file's entire contents. remove(path) removes a file from the file system. to remove directories, use rmdir. parameters path : string the path of the file to remove. rmdir(path) removes a directory from the file system. if the directory is not empty, an exception is thrown. parameters path : string the path of the directory to remove. isf...
ui/frame - Archive of obsolete content
ouple of <span> elements, and includes a css file to style the content and a javascript script to implement behavior: <!doctype html> <html> <head> <link href="city-info.css" rel="stylesheet"></link> </head> <body> <select name="city" id="city-selector"></select> <span id="time" class="info-element"></span> <span id="weather" class="info-element"></span> <script type="
text/javascript" src="city-info.js"></script> </body> </html> if we save this document as "city-info.html" under the add-on's "data" directory, we can create a frame hosting it and add the frame to a toolbar like this: var { frame } = require("sdk/ui/frame"); var { toolbar } = require("sdk/ui/toolbar"); var frame = new frame({ url: "./city-info.html" }); var toolbar = toolbar({ name: "city-...
...positioned between the address bar and the content window. it occupies the whole width of the browser window and is 18 pixels high on a normal-resolution display or 36 pixels high on a high-resolution (hidpi) display. this toolbar might look something like: scripting frames to add scripts to frames, include them directly from the frame's html content, as with a normal web page: <script type="
text/javascript" src="frame.js"></script> as usual, the path to the script is relative to the html file's location. messages logged from a frame script using the console will not appear in the terminal when you run the add-on using jpm run. however, they will appear in the browser console. this issue is being tracked as bug 982385. communicating with frames you can exchange messages between the ...
...in this way you can customize the frame for each browser window. to do this, you call postmessage() not on the frame itself but on the source attribute of the object passed into an event listener. for targetorigin, you can use the origin...
... parameters message : string the message to send. targetorigin : string specifies the target of the message, as in window.postmessag...
window/utils - Archive of obsolete content
rwindow = utils.getmostrecentbrowserwindow(); var window = browserwindow.content; // `window` object for the current webpage utils.gettoplevelwindow(window) == browserwindow // => true parameters window : nsidomwindow returns nsidomwindow getwindowdocshell(window) returns the nsidocshell for the tabbrowser element. ...
...window(); var window = browserwindow.content; // `window` object for the current webpage utils.gettoplevelwindow(window) == browserwindow // => true parameters window : nsidomwindow returns nsidomwindow getwindowdocshell(window) returns the nsidocshell for the tabbrowser element. parameters window : nsidomwindow returns nsidocshell getwindowloadingcon
text(window) returns the nsiloadcon
text. ...
...ect for the current webpage utils.gettoplevelwindow(window) == browserwindow // => true parameters window : nsidomwindow returns nsidomwindow getwindowdocshell(window) returns the nsidocshell for the tabbrowser element. parameters window : nsidomwindow returns nsidocshell getwindowloadingcon
text(window) returns the nsiloadcon
text. parameters window : nsidomwindow returns nsiloadcon
text open(uri, options) this function is used to open top level (application) windows. it takes the uri of the window document as its first argument and an optional hash of options as its second argument. var { open } = require('sdk/window/utils'); var window = open('data:
text/html,hello window'); this function wraps nsiwindowwatcher.openwindow. parameters uri : string uri of the document to be...
...me string name that is assigned to the window. optional, defaults to null. features object map of features to set for the window, defined like this: { width: 10, height: 15, chrome: true }. see the window.open features documentation for more details. optional, defaults to an empty map: {}. var { open } = require('sdk/window/utils'); var window = open('data:
text/html,hello window', { name: 'jetpack window', features: { width: 200, height: 50, popup: true } }); args object extra argument(s) to be attached to the new window as the window.arguments property. returns nsidomwindow opendialog(options) opens a top level window and returns its nsidomwindow representation. this is the same as open, but you can supp...
Creating Reusable Modules - Archive of obsolete content
we'll do exactly that with a module that calculates file hashes. a hashing add-on a hash function takes a string of bytes of any length, and produces a short, fixed length string of bytes as output. it's a useful way to create a "fingerprint" that can be used to identify a file. md5 is a commonly used hash function: although it's no longer considered secure, it works fine outside a security con
text. here we'll write an add-on that lets the user select a file on disk and calculates its hash. for both these operations we'll use xpcom interfaces. file picker to let the user select a file we'll use nsifilepicker. the documentation for that interface includes an example which we can adapt like this: var {cc, ci} = require("chrome"); function promptforfile() { const nsifilepicker = ci.nsif...
...note that you usually won't // need to work with the string paths. var path = fp.file.path; // work with returned nsilocalfile... } return path; } hash function firefox has built-in support for hash functions, exposed via the ...
...note that you usually won't // need to work with the string paths. var path = fp.file.path; // work with returned nsilocalfile... } return path; } require("sdk/ui/button/action").actionbutton({ id: "show-panel", label: "sho...
...note that you usually won't // need to work with the string paths. var path = fp.file.path; // work with returned nsilocalfile... } return path; } exports.promptforfile = promptforfile; md5.js next, create another file...
Examples and demos from articles - Archive of obsolete content
[article] fade in/out [html] sometimes a page uses dozens and dozens of animations. in such a condition is difficult and unnatural to keep track of all events started and then to stop them when appropriate through the cleartimeout() function. ...
...[article] fade in/out [html] sometimes a page uses dozens and dozens of animations. in such a condition is difficult and unnatural to keep track of all events started and then to stop them when appropriate through the cleartimeout() function. ...
...ata-descr custom data attribute to create a pure-css, glossary-like tooltip. [article] pure-css lightbox [html] the :target pseudo-class is useful to switch on/off some invisible elements. in this way you can create a pure-css lightbox. [article] pure-css editable (pseudo)<select> [html] this example shows how it's possible to simulate an editable <select> through a fieldset of radioboxes and
textboxes. [article] expandable elements [html] this example shows how it is possible to show/hide classes of elements in pure css. in this demo there is also an example of a "toggle button" rendered through a <label> element. [article] code snippets and tutorials javascript complete cookies reader/writer with full unicode support this little framework consists of a complete cookies reader/wr...
...ull unicode support this little framework consists of a complete cookies reader/writer with unicode support. xml to json conversion snippets (jxon) jxon (lossless javascript xml object notation) is a generic name by which is defined the representation of javascript objects using xml. there are no real standards for this conversion, but some conventions begin to appear on the web. autogrowing <
textarea> this example shows how to make a
textarea really autogrowing during a typing. insert some custom
text in a <
textarea> this example shows how to insert some html tags or smiles or any custom
text in a
textarea. using setinterval within animations sometimes a page uses dozens and dozens of animations. in such a condition is difficult and unnatural to keep track of all events started and t...
HTML to DOM - Archive of obsolete content
se in the wild. the code snippets on this page will let your site work until these new features are more widely available. safely parsing simple html to dom when using xmlhttprequest to get the html of a remote webpage, it is often advantageous to turn that html string into dom for easier manipulation. however, there are potential dangers involved in injecting remote content in a privileged con
text in your extension, so it can be desirable to parse the html safely. the function below will safely parse simple html and return a dom object which can be manipulated like web page elements. this will remove tags like <script>, <style>, <head>, <body>, <title>, and <iframe>. it will also remove all javascript, including element attributes that contain javascript. function htmlparser(ahtmlstring)...
...create your own function using unique name, id, and so forth. var frame = document.getelementbyid("sample-frame"); if (!frame) { // create frame...
...create your own function using unique name, id, and so forth. var frame = document.getelementbyid("sample-frame"); if (!frame) { // create frame frame = document.createelement("iframe"); // iframe (or browser on older firefox) frame.setattribute("id", "samp...
...ce of code here is the domcontentloaded event listener we define for the element. let's take a look at the donkeyfire.donkeybrowser_onpageload() handler: donkeybrowser_onpageload: function(aevent) { var doc = aevent.originaltarget; var url = doc.location.href; if (aevent.originaltarget.nodename == "#document") { // ok, it's a real page, let's do our magic dump("[df] url = "+url+"\n"); var
text = doc.evaluate("/html/body/h1",doc,null,xpathresult.string_type,null).stringvalue; dump("[df]
text in /html/body/h1 = "+
text+"\n"); } }, as you can see, we obtain full access to the dom of the page we loaded in background, and we can even evaluate xpath expressions. in the example, we dump() to the console the page's url and the
text contained in the first h1 tag of the page's <body>. but, ...
Label and description - Archive of obsolete content
line breaking under normal conditions, a description will not break long-running
text and the
text may be cropped or hidden. to cause the
text to wrap: ensure the long-running
text is a
text node child of <description/> or <label/> (i.e., do not specify the long-running
text in the value attribute of these elements). the default style for these xul elements includes white-space: wrap;. this reduces all whitespace chunks (including newlines) to single spaces.
text is permitted to wrap. <description>i am your father's brother's nephew's cousin's former roommate. what's that make us? absolutely nothing!</description> with white-space: pre; all whitespace, including newlines, is rendered literally.
text cannot wrap automatically but can still be achieved with <html:br/> if desired. <descri...
...h white-space: pre; all whitespace, including newlines, is rendered literally.
text cannot wrap automatically but can still be achieved with <html:br/> if desired. <description style="white-space: pre-wrap;">i am your father's brother's nephew's cousin's former roommate. what's that make us? ...
...ap; all whitespace is rendered literally, but
text is additionally permitted to wrap at spaces. note: prior to firefox 3, it was necessary to use -moz-pre-wrap instead of -pre-wrap. you may wish to use both for backward compatibility. <description style="white-space: pre;">i am your father's brother's nephew's cousin's former roommate. what's that make us? absolutely nothing!</description>
text can also be made to wrap by inserting an <html:br/> element regardless of the css style, but this creates a hard-break that does not change as parent elements resize. <description>i am your father's brother's nephew's cousin's former roommate.<html:br/> what's that make us?<html:br/> absolutely nothing!</description> using labels as anchors its possible to make a label look and act like an ht...
...y inserting an <html:br/> element regardless of the css style, but this creates a hard-break that does not change as parent elements resize. <description>i am your father's brother's nephew's cousin's former roommate.<html:br/> what's that make us?<html:br/> absolutely nothing!</description> using labels as anchors its possible to make a label look and act like an html <a> tag: <label class="
text-link" href="http://whatever.com" value="click here to go to whatever"/> "
text-link" is a built-in, predefined class. note: if running in a xulrunner application add the following preferences to your default preferences file: pref("network.protocol-handler.expose.http", false); pref("network.protocol-handler.warn-external.http", false); change or add additional protocols (https or ftp) as nee...
Jetpack Processes - Archive of obsolete content
's global scope. at minimum, javascript 1.8.1 is used. individual lines of the form //@line 1 "foo.js" can be used to specify filename and line number information for debugging purposes. gc() synchronously performs garbage collection. handles messages that communicate between the browser and jetpack process may contain only serializable (json) data and handles. ...
...browser and jetpack process may contain only serializable (json) data and handles. a handle can be used to provide con
text for messages. either the browser or the jetpack implementation may create one. a handle keeps any arbitrary properties attached to it alive, but those properties are not transmitted across the process boundary. these arbitrary properties are the primary means through which con
text can be provided for messages; for instance, if the handle is meant to represent a network request, an xmlhttprequest instance can be attached to the handle on the chrome process. because a handle's existence crosses process boundaries and cross-process garbage collection does not exist, the lifetime of a handle needs to be controlled manually by code. by default, a handle is rooted in the javascr...
...l references to it are removed, at which point it is garbage collected. handles have the following native methods and properties: invalidate() invalidates the handle. either process may invalidate a handle when it is no longer useful. createhandle() creates a child handle which becomes invalid when its parent does. this is useful for associating handles to the lifetime of a particular window, con
text menu, or other element, and helping ensure that they do not leak. parent the parent handle of the object, if any. read-only. isvalid whether the handle is still valid or not. read-only. isrooted whether the handle is gc rooted or not. read-write. oninvalidate a callback to call when the handle is garbage collected, either through an explicit call to invalidate() or being unrooted and then unreach...
...le is still valid or not. read-only. isrooted whether the handle is gc rooted or not. read-write. oninvalidate a callback to call when the handle is garbage collected, either through an explicit call to invalidate() or being unrooted and then unreachable. the callback is only called from the process that the handle was not garbage collected in. read-write. special messages core:process-error(con
text) when the jetpack process crashes, this message is sent to the parent. if a crash report minidump is available, the con
text.dumpid property will list the minidump id of the crash report that was collected. core:exception(error) when an exception occurs in a jetpack script and is not caught, this message is sent to the parent. the error object contains the following properties: filename, linenumbe...
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
ll omit explanations of widely understood technologies, and focus instead on introducing new technologies you will need to understand in order to develop for firefox. i will assume that you have experience developing with dynamic html, as well as the topics below. for more information on these technologies, please refer to other sources. xml coding css coding basic javascript syntax xml: a
text-based structural language extensible markup language (xml) is a meta-language for expressing various kinds of data. it was specified in 1998 by w3c, the organization that sets standards for web-related technologies. it has a number of useful qualities: it is generic, extensible, and easy to validate as well-formed. some examples of xml-based markup languages include xhtml, which is html redefin...
...ical formulas. xul, which is used in firefox, is also based on xml. listing 1: xml syntax <elementname someattribute="somevalue"> content </elementname> as shown in listing 1, xml uses elements, which consist of an opening tag, a closing tag, and content. note: elements that take no content can be expressed in compact form as <elementname/>. an element can include other elements as well as
text in its content, and all information is structured as a tree. as in all trees, elements can have children (elements contained within them) and parents (elements that contain them). attributes can also be added to opening tags, each with a value. as the "extensible" part of xml implies, elements from various xml-based languages such as xhtml and svg can be interspersed in one another as a means to...
...s, data can be reused better than it is when structural and stylistic markup are both embedded in html. there are three css specifications (level 1 through level 3), with progressively powerful features. the gecko rendering engine handles nearly all of css level 2 and some of css level 3. ...
... 3. listing 2: css code sample body { color: black; background-color: white; } p { margin-bottom: 1em;
text-indent: 1em; } javascript: the world's most misunderstood language javascript is a scripting language first developed in the 1990s, at which time it was created as a way to add dynamic features to web pages. because it was often used at first to display pop-up windows, marching
text in status bars, or in other ways that made web pages less useful to users, the language acquired a reputation as having little practical use and lacking in functionality. also, because a series of security holes were discovered in javascript and the compatible technology jscript, there was an initial reluctance to use javascript at all. nevertheless, the rise of web services like google maps, w...
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
middle attacker might replace the json with attack code before it arrives at the user. use native json since firefox 3.5 you should use json. really, just use it! note: do not use json parsers implemented in javascript. these implementations are less efficient and often also contain serious security vulnerabilities. such implementations are meant to be used within a very different security con
text, namely a website, where the origin of the data is usually known in all instances and where vulnerabilities would have a much smaller impact. what about jsonp? jsonp, which really is just another script tag containing generated, remotely retrieved code, is generally not secure. it might be possible to execute any retrieved jsonp code in an unprivileged sandbox (which is complicated!), but if yo...
... alternative: use (anonymous) functions you can always create a small anonymous function to pa...
... alternative: use (anonymous) functions you can always create a small anonymous function to pass around instead. closures will ensure the code is ...
...y calling eval, settimeout and friends. alternative: use (anonymous) functions you can always create a small anonymous function to pass around instead. closures will ensure the code is still valid, even if your outer function already returned from execution. addeventlistener("load", function() { myaddon.init(); myaddon.onload(); }, true); function doxhr() { //... var response = xhr.response
text; settimeout(function() { alert(response); }, 100); } alternative: use function.bind() introduced in javascript 1.8.5 function.bind is a new utility function that you may use to (partially) bind parameters to functions. addeventlistener("load", myaddon.init.bind(myaddon), true); settimeout(alert.bind(null, xhr.response
text), 100); function.bind() returns a new function. this is imp...
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
lockpref("mail.identity.id1.useremail", mail); lockpref("mail.server.server2.name", mail); lockpref("mail.identity.id1.fullname", cn); //debug with popup error messages doesn't work anymore :-( !! var env_mozdebug= getenv("mozilla_debug"); if (env_mozdebug) {displayerror("no error, just a debug, cn =" + cn + " and mail = " + mail); } } } //...
...iles\v6we4uku.default start in debug mode in comand line interface: debug with displayerror() here's the result, i used the displayerror() method ( not the best way :-( see bug 206294 ) to show environment and ldap variables in order to check that it worked fine. just setting mozilla_debug=1 (see js code in thunderbird.cfg) allow that message to appear , it's very useful in debuging con
text ... the displayerror() function does not work properly in thunderbird 3.1: see https://bugzilla.mozilla.org/show_bu...?id=502597#c34 a usable workaround is placing the following code at the top of your autoconfig script: // enable logging. pref("mcd.logging.console", "all"); pref("mcd.logging.dump", "all"); components.utils.import("resource:///modules/gloda/log4moz.js"); var log = log4moz.ge...
...hods and have no access to other objects (need to investigate what exactly are allowed). alert() is a method of the window object. cf. also related post in newsgroups: mozilla.dev.tech.js-engine date: wed, 17 may 2006 19:06:28 +0200 from: jehan procaccia <jehan.procaccia@int-evry.fr> newsgroups: mozilla.dev.tech.js-engine subject: scope of js file functions in frefox/thunderbird autoconfig con
text firefox 2.x recently (2007/03/20), i've tested autoconfig support in firefox 2.0.0.2 on a linux fedora. autoconfig works fine, but ldap calls are still unavailable in firefox (as it was the case in firefox 1.x, but fortunatly not the case for thunderbird !). that "bug" report is then still up to date!: bug 295329 $ cat /etc/redhat-release fedora core release 6 (zod) $ rpm -qi firefox name ...
... // user homedir var env_display = getenv("display"); // x11 display var env_editor = getenv("editor"); // use in mail edit? var env_visual = getenv("visual"); // use in mail edit? var env_mozilla_home = getenv("mozilla_home") var env_mozdebug = getenv("mozilla_debug") // for ease of update... we use the autoadmin operation to redirect // netscape.cfg to read the plain-
text "config-file-unix.jsc" file. // any changes // from now on can be made here w/o re-encoding the netscape.jsc file to // netscape.cfg. config( "autoadmin.global_config_url", \ "http://lugdunum.int-evry.fr/browser/config-file-unix.jsc" ); // how often (in minutes) to update // every 6 hours seems a good interval to keep hosts who don't ever // exit netscape updated on current changes. config( "auto...
Making it into a static overlay - Archive of obsolete content
when installing an extension like ours. we'll first make the file into a static overlay, then we'll make it into a dynamic overlay. ...
...d, the element will be added as the last child of statusbar, usually before the resizer grippy. we could instead have used an insertafter attribute to place the element after another. to use this overlay instead of our changes to navigator.xul we need to remove our changes, then add a reference to the overlay to the top of navigator.xul: ... ...
... could instead have used an insertafter attribute to place the element after another. to use this overlay instead of our changes to navigator.xul we need to remove our changes, then add a reference to the overlay to the top of navigator.xul: ... ...
.../content/sessionhistoryui.js"/> <script type="application/javascript" src="chrome://navigator/content/tinderstatus.js"/> <!-- hook for stringbundle overlays --> ... ...
Creating a Help Content Pack - Archive of obsolete content
correctly. however, while it may seem like this is a disadvantage, it's actually an advantage - if you make an error you'll know immediately, and you should be able to easily figure out what the problem is by directly loading the file in firefox. later, when we get to actually writing content, you'll need to know xhtml, but for now knowledge of the syntax should be enough. open up your favorite
text editor and create the file content-pack.rdf. insert into it the following
text: <?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:nc="http://home.netscape.com/nc-rdf#"> </rdf:rdf> if you're familiar with html or xml, you might recognize this as the container element for the whole document. it serves as a wrapper around the entire contents of...
...sible source might be an online, dynamically-generated list of added content stored on your web site. to have the help viewer search through these additional data sources, define another rdf:li element like so: <rdf:li> <rdf:description nc:panelid="search" nc:datasources="" nc:emptysearch
text="[no matching items found.]" nc:emptysearchlink="chrome://foo/locale/bar.html"/> </rdf:li> nc:panelid should be set to search. nc:datasources should be set as with table of contents, index, and glossary definitions. nc:platform (added in mozilla 1.8b2/firefox 1.1) may be used on search data sources as it's used on table of contents, index...
... nc:emptysearchlink="chrome://foo/locale/bar.html"/> </rdf:li> nc:panelid should be set to search. nc:datasources should be set as with table of contents, index, and glossary definitions. nc:platform (added in mozilla 1.8b2/firefox 1.1) may be used on search data sources as it's used on table of contents, index, and glossary definitions. nc:emptysearch
text specifies the
text that is shown when a search through help returns no results. nc:emptysearchlink specifies what uri should be shown when the pseudo-result "no results found" is accessed. this attribute is required. the sample page chrome://help/locale/welcome.xhtml has a section on searching which may be a useful link to use here. note that you can use the nc:datasources attribute to inherit...
...p, he will see results from these databases. defining a search database is exactly like defining a table of contents file (and therefore exactly like creating an index file), so follow the instructions there to create additional data sources as you need them. viewing your content pack in the help viewer to launch the help viewer with your content pack, you need to have chrome://help/content/con
texthelp.js loaded into the xul file that provides the ui to open the help viewer: <script type="application/javascript" src="chrome://help/content/con
texthelp.js"/> this will allow you to access all of the viewer functions. to open the help viewer, run the openhelp() function. it's exactly the same as any javascript command, you you can insert it in command elements, oncommand attribut...
Twitter - Archive of obsolete content
ue to a user's id. (you can read about the parameters of the various methods at twitter's api reference.) there are two special, optional properties: success and error. success is a function that's called when the request successfully completes, and error is a function called when it fails to complete. the library simply passes them to jquery.ajax(), and so they are called like so: success(data,
textstatus) data is twitter's decoded json response.
textstatus is a simple string describing the status. error(xmlhttprequest,
textstatus, errorthrown) xmlhttprequest is the xhr used in the request.
textstatus is a simple string describing the type of error. errorthrown is an exception object, if one was thrown. the examples below all use this first, simpler style. the second style will be fam...
...apply there. example usage tweeting jetpack.lib.twitter.statuses.update({ status: "o frabjous day!" }); firefox will prompt for a username and password if the user is not already authenticated with twitter. ...
...lib.twitter.users.show({ id: "mozlabs", success: function (data, status) console.log(data.tosource()), error: function (xhr, errmsg, errobj) console.error(xhr.response
text) }); friends of a user jetpack.lib.twitter.statuses.friends({ id: "mozlabs", page: 3, success: function (data, status) console.log(data.tosource()), error: function (xhr, errmsg, errobj) console.error(xhr.response
text) }); trends jetpack.lib.twitter.trends({ success: function (data, status) console.log(data.tosource()), error: function (xhr, errmsg, errobj) console.error(xhr.response
text) }); searching jetpack.lib.twitter.search({ q: "#jetpack", lang: "ja", rpp: 10, page: 5, since_id: 1337, success: function (data, status) console.log(data.tosource()), error: function (xhr, errmsg, errobj) ...
...twitter.trends({ success: function (data, status) console.log(data.tosource()), error: function (xhr, errmsg, errobj) console.error(xhr.response
text) }); searching jetpack.lib.twitter.search({ q: "#jetpack", lang: "ja", rpp: 10, page: 5, since_id: 1337, success: function (data, status) console.log(data.tosource()), error: function (xhr, errmsg, errobj) console.error(xhr.response
text) }); ...
Clipboard - Archive of obsolete content
"); methods set(contentstringflavorstring) stringwrites data from jetpack to the clipboard. this is the recommended method of copying data to the clipboard. contentthe content to be copied to the clipboard. if no other arguments are specified, the flavor of the content is assumed to 'plain'.string flavordata type. this is an optional parameter. the only flavors currently implemented are 'plain' (
text/unicode) and 'html' (which is html).string"
text" here's an example of how to use the method to set the clipboard. jetpack.import.future("clipboard");// in
text formatjetpack.clipboard.set("hello world");// in other clipboard get(flavor string)returns data to jetpack from the clipboard. if flavor is provided, the data is returned in that format. flavorreturns data to jetpack from the clipboard.
...rd. if flavor is provided, the data is returned in that format. flavorreturns data to jetpack from the clipboard. if flavor is provided, the data is returned in that format. string here's an example of how to use the method to get the data on the clipboard. remember to import clipboard from the future before calling it. ...
... the clipboard. remember to import clipboard from the future before calling it. jetpack.import.future("clipboard");var mycontent = "<i>this is some italic
text</i>";jetpack.clipboard.set( mycontent, "html" ); getcurrentflavors()returns an array of available jetpack clipboard flavors, for the current system clipboard state. ...
..."<i>this is some italic
text</i>";jetpack.clipboard.set( mycontent, "html" ); getcurrentflavors()returns an array of available jetpack clipboard flavors, for the current system clipboard state. ...
Clipboard Test - Archive of obsolete content
"); methods set(contentstringflavorstring)writes data from jetpack to the clipboard. this is the recommended method of copying data to the clipboard. string contentthe content to be copied to the clipboard. if no other arguments are specified, the flavor of the content is assumed to 'plain'.string flavordata type. this is an optional parameter. the only flavors currently implemented are 'plain' (
text/unicode) and 'html' (which is html).string"
text" here's an example of how to use the method to set the clipboard. jetpack.import.future("clipboard");// in
text formatjetpack.clipboard.set("hello world");// in other clipboard get(flavor string)returns data to jetpack from the clipboard. if flavor is provided, the data is returned in that format. flavorreturns data to jetpack from the clipboard.
...rd. if flavor is provided, the data is returned in that format. flavorreturns data to jetpack from the clipboard. if flavor is provided, the data is returned in that format. string here's an example of how to use the method to get the data on the clipboard. remember to import clipboard from the future before calling it. ...
... the clipboard. remember to import clipboard from the future before calling it. jetpack.import.future("clipboard");var mycontent = "<i>this is some italic
text</i>";jetpack.clipboard.set( mycontent, "html" ); getcurrentflavors()returns an array of available jetpack clipboard flavors, for the current system clipboard state. ...
..."<i>this is some italic
text</i>";jetpack.clipboard.set( mycontent, "html" ); getcurrentflavors()returns an array of available jetpack clipboard flavors, for the current system clipboard state. ...
Clipboard - Archive of obsolete content
d"); methods set(contentstringflavorstring)writes data from jetpack to the clipboard. this is the recommended method of copying data to the clipboard. string contentthe content to be copied to the clipboard. if no other arguments are specified, the flavor of the content is assumed to 'plain'.string flavordata type. this is an optional parameter. the only flavors currently implemented are 'plain' (
text/unicode) and 'html' (which is html).string"
text" here's an example of how to use the method to set the clipboard. jetpack.import.future("clipboard"); // in
text format jetpack.clipboard.set("hello world"); // in other clipboard get(flavor string)returns data to jetpack from the clipboard. if flavor is provided, the data is returned in that format. flavorreturns data to jetpack from the clipboa...
...rd. if flavor is provided, the data is returned in that format. flavorreturns data to jetpack from the clipboard. if flavor is provided, the data is returned in that format. string here's an example of how to use the method to get the data on the clipboard. remember to import clipboard from the future before calling it. ...
...clipboard. remember to import clipboard from the future before calling it. jetpack.import.future("clipboard"); var mycontent = "<i>this is some italic
text</i>"; jetpack.clipboard.set( mycontent, "html" ); getcurrentflavors()returns an array of available jetpack clipboard flavors, for the current system clipboard state. ...
... is some italic
text</i>"; jetpack.clipboard.set( mycontent, "html" ); getcurrentflavors()returns an array of available jetpack clipboard flavors, for the current system clipboard state. ...
Clipboard - Archive of obsolete content
d"); methods set(contentstringflavorstring) stringwrites data from jetpack to the clipboard. this is the recommended method of copying data to the clipboard. contentthe content to be copied to the clipboard. if no other arguments are specified, the flavor of the content is assumed to 'plain'.string flavordata type. this is an optional parameter. the only flavors currently implemented are 'plain' (
text/unicode) and 'html' (which is html).string"
text" here's an example of how to use the method to set the clipboard. jetpack.import.future("clipboard"); // in
text format jetpack.clipboard.set("hello world"); // in other clipboard get(flavor string)returns data to jetpack from the clipboard. if flavor is provided, the data is returned in that format. flavorreturns data to jetpack from the clipboa...
...rd. if flavor is provided, the data is returned in that format. flavorreturns data to jetpack from the clipboard. if flavor is provided, the data is returned in that format. string here's an example of how to use the method to get the data on the clipboard. remember to import clipboard from the future before calling it. ...
...clipboard. remember to import clipboard from the future before calling it. jetpack.import.future("clipboard"); var mycontent = "<i>this is some italic
text</i>"; jetpack.clipboard.set( mycontent, "html" ); getcurrentflavors()returns an array of available jetpack clipboard flavors, for the current system clipboard state. ...
... is some italic
text</i>"; jetpack.clipboard.set( mycontent, "html" ); getcurrentflavors()returns an array of available jetpack clipboard flavors, for the current system clipboard state. ...
Monitoring downloads - Archive of obsolete content
the download manager instance is cached into a member variable in the downloadlogger object for reuse later, and its addlistener() method is called to start listening for download status updates. the...
...cument.getelementbyid("loglist"); var statement = dbconn.createstatement("select * from items"); // get all items in table try { while (statement.executestep()) { var row = document.createelement('listitem'); // add the cells to the row var cell = document.createelement('listcell'); var sourcestr = statement.getstring(0); row.setattribute("tooltip
text", sourcestr); sourcestr = sourcestr.slice(sourcestr.lastindexof("/")+1); cell.setattribute("label", sourcestr); // source row.appendchild(cell); cell = document.createelement('listcell'); cell.setattribute("label", (statement.getint64(1) / 1024).tofixed(1) + "kb"); // size cell.setattribute("style", "
text-align:right"); row.appendchild(cell);...
...64(3)); // end time cell = document.createelement('listcell'); datestr = thedate.tolocalestring(); cell.setattribute("label", datestr); row.appendchild(cell); var speed = statement.getdouble(4) / 1024.0; cell = document.createelement('listcell'); cell.setattribute("label", speed.tofixed(1) + "kb/sec"); cell.setattribute("style", "
text-align:right"); row.appendchild(cell); var status = statement.getint32(5); var style = "color:black"; cell = document.createelement('listcell'); var statusstr; switch(status) { case 0: statusstr = "downloading"; break; case 1: statusstr = "complete"; style = "color:green"; break; ...
...se methods take as a parameter the zero-based index number of the column whose value you wish to retrieve. note that the start time is being divided by 1000 before we create a javascript date object from it. that's to adjust the value from the granularity stored in the database to that expected by javascript. to right-justify the numeric columns, we set the appropriate cells' style attribute to
text-align:right. exercises for the reader there are some obvious things that could be done to improve this extension. if you're learning to use the download manager or storage apis, they're things you might look into doing for practice: add code to update the download log window on the fly, instead of generating a static list when it's first opened. add additional statistics. what's the ave...
open - Archive of obsolete content
, described in detail here. type a string describing the type of file being opened. description this method opens the file, preparing its resources for use by subsequent methods to examine or modify the file. certain methods of file, such as read and write should not be used when the file is not open. other methods, such as remove may not be used when the file is open. ...
.... type a string describing the type of file being opened. description this method opens the file, preparing its resources for use by subsequent methods to examine or modify the file. certain methods of file, such as read and write should not be used when the file is not open. other methods, such as remove may not be used when the file is open. ...
...scribing the type of file being opened. description this method opens the file, preparing its resources for use by subsequent methods to examine or modify the file. certain methods of file, such as read and write should not be used when the file is not open. other methods, such as remove may not be used when the file is open. valid file types are
text, binary and unicode. ...
...emove may not be used when the file is open. valid file types are
text, binary and unicode.
text indicates ascii
text without nul characters. binary indicates utf-8 files. unicode indicates ucs-2 files. for all file types, carriage returns and linefeeds are treated in a platform-agnostic way. ...
The Download Manager schema - Archive of obsolete content
8. this information is available using nsidownloadmanager methods to retrieve nsidownload objects for each download entry; however, if you feel like poking directly into the table, you can do so using the storage api. the schema table field name type description id integer a unique id for the download. this field is the primary key for the table. name
text the download's file name. source
text the source uri for the download. target
text the destination uri for the download. temppath
text the path of the temporary file being used for the download. starttime integer the download's start time. endtime integer the download's end time. state integer the downloa...
...this information is used to resume the download after it's been paused. currbytes integer the current number of bytes that have been downloaded. defaults to 0, may not be null. ...
...this information is used to resume the download after it's been paused. currbytes integer the current number of bytes that have been downloaded. defaults to 0, may not be null. maxbytes integer the total number of bytes that need to be downloaded. ...
...rom the nsiresumablechannel used to implement the download channel. this information is used to resume the download after it's been paused. currbytes integer the current number of bytes that have been downloaded. defaults to 0, may not be null. maxbytes integer the total number of bytes that need to be downloaded. defaults to -1, may not be null. mimetype
text the mime type of the file. preferredapplication
text the preferred application to use to open the file after the download is complete. preferredaction integer the action constant from nsimimeinfo representing the action to take upon completing the download. default 0 (save to disk); may not be null. autoresume integer 0 if the file should not automa...
crop - Archive of obsolete content
« xul reference home crop type: one of the values below if the label of the element is too big to fit in its given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. ...
...s given space, the
text will be cropped on the side specified by the crop attribute. an ellipsis will be used in place of the cropped
text. if the box direction is reversed, the cropping is reversed. start the
text will be cropped on its left side in left-to-right
text locales, and the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left the
text will be cropped on its left side. right the
text will be cropped on its right side. ...
...nd the right side in right-to-left locales. end the
text will be cropped on its right side in left-to-right
text locales, and the right side in right-to-left locales. left the
text will be cropped on its left side. right the
text will be cropped on its right side. center the
text will be cropped in the middle, showing both the start and end of the
text normally. none the
text will be not be cropped using an ellipsis. however, the
text will simply be cut off if it is too large. the side depends on the css
text alignment. depending on the platform and theme being used, some elements will have set a maximum width so they will alwa...
...ext normally. none the
text will be not be cropped using an ellipsis. however, the
text will simply be cut off if it is too large. the side depends on the css
text alignment. depending on the platform and theme being used, some elements will have set a maximum width so they will always appear cropped. if you wish to use the value none and the displayed
text is larger than this maximum width, you may be able to use the max-width css property (or the maxwidth attribute) to override this size. for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } ...
onchange - Archive of obsolete content
« xul reference home overview an onchange attribute is an event listener to the object for the event change. a change event is fired in different ways for different xul input elements as listed below: onchange type: script code
textbox when enter key is pressed radio/check box when the state is changed select list when the selected item is changed what is accessible the script con
text at this point can only access the following things: global values/functions i.e. ...
...when the state is changed select list when the selected item is changed what is accessible the script con
text at this point can only access the following things: global values/functions i.e. ...
... global values/functions i.e. ...
....0"?> <?xml-stylesheet href="chrome://global/skin/" type="
text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="
text/javascript"> function myfunction(e){ /* do something cool here or just say the below */ alert(e.target.nodename); } </script> <
textbox id="find-
text" onchange="return myfunction(event);"/> </window> ...
timeout - Archive of obsolete content
there is no default. the timer starts after the user types a character. ...
...there is no default. the timer starts after the user types a character. ...
...there is no default. the timer starts after the user types a character. ...
...there is no default. the timer starts after the user types a character. ...
Uploading and Downloading Files - Archive of obsolete content
eam guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes). there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading
textual data, writing
textual data, list of file-related error codes. the io object and stream objects can be used to upload files to servers in various ways. the exact method depends on the type of upload that you wish to perform. http file upload some web sites allow one to upload a file. this is done by using an html <input> element using the file type from within a form. when the user selects a...
...the data you use a file object that an extension can construct from file path. ...
... fetch upload please refer to uploading a file section inside the fetch article. downloading files under construction... meanwhile you can read this. ...
... upload a file using an http put operation. this is simpler but it doesn't allow sending additional data and web servers usually need special configuration to support put operations. function uploadput(posturl, filepath) { var req = new xmlhttprequest(); req.open("put", posturl); req.setrequestheader("content-type", "
text/plain"); req.onload = function(event) { alert(event.target.response
text); } req.send(new file(filepath)); } in this example, a new input stream is created for a file, and is passed to the xmlhttprequest's send method. fetch upload please refer to uploading a file section inside the fetch article. downloading files under construction... meanwhile you can read this. ...
Positioning - Archive of obsolete content
. however, the submenu will appear to the left instead for right to left locales. for both top level menus and submenus, they may appear above or to the left instead of their usual placement if there is not enough room to display the menu at full size below or to the right. if there is not enough room on either side, the menu will be shrunk down to fit. ...
... usual placement if there is not enough room to display the menu at full size below or to the right. if there is not enough room on either side, the menu will be shrunk down to fit. for popups attached using the popup or con
text attributes, the default position to appear is with the upper left corner (or upper right corner in right to left locales) at the position where the mouse was clicked. con
text menus will appear offset down and to the right a couple of pixels so that the menu can be dismissed again just by clicking in the same place. ...
...ill be shrunk down to fit. for popups attached using the popup or con
text attributes, the default position to appear is with the upper left corner (or upper right corner in right to left locales) at the position where the mouse was clicked. con
text menus will appear offset down and to the right a couple of pixels so that the menu can be dismissed again just by clicking in the same place. if a con
text menu was opened via the keyboard only, the menu will appear at the top left corner of the document, or underneath the currently selected item if a list is focused. con
text menus will always appear in this location, and not respect any position attribute value. tooltips will always appear near the current mouse position, offset vertically by a small amount. the position attribute the position ...
...h respect to the element that the popup is attached to. for a menupopup placed inside a menu, button or toolbarbutton, the position attribute controls how the menupopup is anchored to the parent menu, button or toolbarbutton. for a menupopup or panel attached using the popup attribute, the position attribute controls how the popup is anchored to the element with the popup attribute. for a con
text menu, that is, a menu that is attached to an an element using the con
text attribute and opened via con
text-clicking the mouse, the position attribute is ignored. the menu appears at the mouse position offset by a couple of pixels so that the user can close the con
text menu just by clicking in the same location. for a tooltip, the position attribute controls how the tooltip is anchored to the ele...
currentIndex - Archive of obsolete content
the tree has never been focused), the value will be -1. you cannot rely on this property to change or determine a tree selection, except for trees with seltype="single". (all trees have seltype="multiple" by default.) to reliably change or determine a selection, instead use the nsitreeselection interface methods available via tree.view.selection. ...
... trees have seltype="multiple" by default.) to reliably change or determine a selection, instead use the nsitreeselection interface methods available via tree.view.selection. example // one way of retrieving the
text of a cell. ...
...tiple" by default.) to reliably change or determine a selection, instead use the nsitreeselection interface methods available via tree.view.selection. example // one way of retrieving the
text of a cell. ...
...tead use the nsitreeselection interface methods available via tree.view.selection. example // one way of retrieving the
text of a cell. ...
Property - Archive of obsolete content
r builderview buttons canadvance cangoback cangoforward canrewind checked checkstate child children classname clickselectsall clientheight clientwidth collapsed color columns command commandmanager completedefaultindex container contentdocument contentprincipal contenttitle contentview contentvieweredit contentviewerfile contentwindow con
textmenu control controller controllers crop current currentindex currentitem currentnotification currentpage currentpane currentset currenturi customtoolbarcount database datasources date dateleadingzero datevalue decimalplaces decimalsymbol defaultbutton defaultvalue description dir disableautocomplete disableautocomplete disableautoselect disa...
...enturi customtoolbarcount database datasources date dateleadingzero datevalue decimalplaces decimalsymbol defaultbutton defaultvalue description dir disableautocomplete disableautocomplete disableautoselect disabled disablekeynavigation dlgtype docshell documentcharsetinfo editable editingcolumn editingrow editingsession editor editortype empty
text deprecated since gecko 2 enablecolumndrag eventnode firstordinalcolumn firstpermanentchild flex focused focuseditem forcecomplete group handlectrlpageupdown handlectrltab hasuservalue height hidden hideseconds highlightnonmatches homepage hour hourleadingzero id ignoreblurwhilesearching image increment inputfield inverted is24hourclock ispm ...
...unt searchlabel searchparam searchsessions second secondleadingzero securityui selected selectedbrowser selectedcount selectedindex selecteditem selecteditems selectedpanel selectedtab selectionend selectionstart selstyle seltype sessioncount sessionhistory showcommentcolumn showpopup size smoothscroll spinbuttons src state statusbar status
text stringbundle strings style subject suppressonselect tabcontainer tabindex tabs tabscrolling tabpanels tag
textlength
textvalue timeout title toolbarname toolbarset tooltip tooltip
text top treeboxobject type uri useraction value valuenumber view webbrowserefind webnavigation webprogress width wizardpages wraparound year yearlead...
...ement.nextelementsibling dom:element.nextsibling dom:element.nodename dom:element.nodetype dom:element.nodevalue dom:element.ownerdocument dom:element.parentnode dom:element.prefix dom:element.previouselementsibling dom:element.previoussibling dom:element.scrollheight dom:element.scrollleft dom:element.scrolltop dom:element.scrollwidth dom:element.tagname dom:element.
textcontent ...
Adding Buttons - Archive of obsolete content
ts. it isn't always placed on elements in this tutorial for simplicity. class the style class of the button. this works the same as in html. it is used to indicate the style that the button appears in. in this case the value dialog is used. in most cases, you will not use a class for a button. label the label that will appear on the button. for example, ok or cancel. if this is left out, no
text appears. image the url of the image to appear on the button. if this is attribute is left out, no image appears. you can also specify the image in a stylesheet using the list-style-image property. disabled if this attribute is set to true, the button is disabled. this is usually drawn with the
text in grey. if the button is disabled, the function of the button cannot be performed. if this a...
...when the user presses alt (or a similar key that varies on each platform) and the access key, the button will be focused from anywhere in the window. note: buttons support more attributes than those listed above. others will be discussed later. ...
... will appear to stretch across the window. you can add align="start" to the window tag to prevent the stretching. the findfile.xul example let's add this code to the file findfile.xul that we created in the previous section. the code needs to be inserted in-between the window tags. the code to add is shown in red below: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="
text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <button id="find-button" label="find"/> <button id="cancel-button" label="cancel"/> </window> you'll notice that the cancel button was added also. the window has been given a horizontal orientation so that the two butto...
...atekeeper/there.is.only.xul"> <button id="find-button" label="find"/> <button id="cancel-button" label="cancel"/> </window> you'll notice that the cancel button was added also. the window has been given a horizontal orientation so that the two buttons appear beside each other. if you open the file in mozilla, you should get something like the image shown here. note: you should not put
text labels directly in the xul file. you should use entities instead so that
text can be easily translated. in the next section, we will find out how to add labels and images to a xul window. see also more button features « previousnext » ...
Adding more elements - Archive of obsolete content
d date. <hbox> <menulist id="searchtype"> <menupopup> <menuitem label="name"/> <menuitem label="size"/> <menuitem label="date modified"/> </menupopup> </menulist> <spacer style="width: 10px;"/> <menulist id="searchmode"> <menupopup> <menuitem label="is"/> <menuitem label="is not"/> </menupopup> </menulist> <spacer style="width: 10px;"/> <
textbox id="find-
text" flex="1" style="min-width: 15em;"/> </hbox> two drop down boxes have been added to the dialog. a spacer has been added in between each element to separate them. these spacers have been given an explicit width of 10 pixels each. you will notice that if the window is resized, the
textbox grows but the other components do not. you will also notice that the label was removed. if...
...the first spacer adds extra spacing in between the title label and the search criteria elements. it might look nicer if there was a border around the search criteria. there a...
...the first spacer adds extra spacing in between the title label and the search criteria elements. it might look nicer if there was a border around the search criteria. there are two ways to do...
... first method would require that we set the style on the box itself. we will use the latter method, however. a groupbox has the advantage that it draws a box with a nice beveled look, suitable for the current theme. let us change the box into a groupbox: <groupbox orient="horizontal"> <caption label="search criteria"/> <menulist id="searchtype"> . . . <spacer style="width: 10px;"/> <
textbox id="find-
text" flex="1" style="min-width: 15em;"/> </groupbox> there are other cosmetic problems as well. we could also have the groupbox grow so that it extends vertically to the bottom of the box. also, we could modify some of the margins so that the elements are positioned better. we will see more examples of the box model and some of its features as we continue to add elements througho...
Anonymous Content - Archive of obsolete content
l:), because they are xul elements and aren't valid in xbl. this namespace was declared on the bindings tag. if you don't use the namespace on xul elements, mozilla will assume that the elements are xbl, not understand them, and your elements won't work correctly. filename input field example another example, this time for a field for entering a filename: <binding id="fileentry"> <content> <
textbox/> <button label="browse..."/> </content> </binding> attaching this binding to an element will cause it to contain a field for entering
text, followed by a browse button. this inner content is created anonymously and cannot be seen using the dom. override the bound element the anonymous content is created automatically whenever a binding is attached to an element. if you place child elem...
...ustom menu widgets. for example, a simplified version of an editable menulist element, might be created as follows: xul: <menu class="dropbox"> <menupopup> <menuitem label="1000"/> <menuitem label="2000"/> </menupopup> </menu> css: menu.dropbox { -moz-binding: url('chrome://example/skin/example.xml#dropbox'); } xbl: <binding id="dropbox"> <content> <children/> <xul:
textbox flex="1"/> <xul:button src="chrome://global/skin/images/dropbox.jpg"/> </content> </binding> this example creates an input field with a button beside it. the menupopup will be added to the content in the location specified by the children element. note that to dom functions, the content will appear as it was in the xul file, so the menupopup will be a child of the menu. the xbl content ...
...ion specified by the children element. note that to dom functions, the content will appear as it was in the xul file, so the menupopup will be a child of the menu. the xbl content is hidden away so the xul developer doesn't need to even know it is there. the resulting content would be: <menu class="dropbox"> <menupopup> <menuitem label="1000"/> <menuitem label="2000"/> </menupopup> <
textbox flex="1"/> <button src="chrome://global/skin/images/dropbox.jpg"/> </menu> includes attribute in some cases, you may wish to only include specific types of content and not others. or, you may wish to place different types of content in different places. the includes attribute can be used to allow only certain elements to appear in the content. its value should be set to a single tag name, o...
...this also applies to css selector rules. multiple children elements you can also use multiple children elements and have certain elements be placed in one location and other elements placed in another. by adding a includes attribute and setting it to a vertical bar-separated list of tags, you can make only elements in that list be placed at that location. ...
Creating a Window - Archive of obsolete content
« previousnext » we're going to be creating a simple find files utility throughout this tutorial. first, however, we should look at the basic syntax of a xul file. creating a xul file an xul file can be given any name but it really should have a .xul extension. the simplest xul file has the following structure: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="
text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <!-- other elements go here --> </window> this window will not do anything since it doesn't contain any ui elements. those will be added in the next section. in fact, there will not be shown any window at all. if you want to force the...
...ill not be shown any window at all. if you want to force the window to become visible you can add the width and height attribute to the window tag. here is a line by line breakdown of the code above: <?xml version="1.0"?> this line simply declares that this is an xml file. you would normally add this line as is at the top of each xul file. <?xml-stylesheet href="chrome://global/skin/" type="
text/css"?> this line is used to specify the style sheets to use for the file. this is the syntax that xml files use to import style sheets. in this case, we import the styles found in the global part of a skin package. we didn't specify a specific file so mozilla will determine which files in the directory to use. in this case, the all-important global.css file is selected. this file contains all t...
...are four. in the example, each attribute is placed on a separate line but they do not have to be. id="findfile-window" the id attribute is used as an identifier so that the window can be referred to by scripts. you will usually put an id attribute on all elements. the name can be anything you want although it should be something relevant. title="find files" the title attribute describes the
text that would appear on the title bar of the window when it is displayed. in this case the
text 'find files' will appear. orient="horizontal" the orient attribute specifies the arrangement of the items in the window. the value horizontal indicates that items should be placed horizontally across the window. you may also use the value vertical, which means that the items are placed in a column. thi...
... « previousnext » ...
Keyboard Shortcuts - Archive of obsolete content
d="file-menu" label="file" accesskey="f"> <menupopup id="file-popup"> <menuitem id="close-command" label="close" accesskey="c"/> </menupopup> </menu> </menubar> you can also use the accesskey attribute on buttons. when the key is pressed in this case, the button is selected. you might want to set up more general keyboard shortcuts however. for example, pressing ctrl + c to copy
text to the clipboard. although shortcuts such as this might not always be valid, they will usually work any time the window is open. usually, a keyboard shortcut will be allowed at any time and you can check to see whether it should do something using a script. for example, copying
text to the clipboard should only work when some
text is selected. key element xul provides an element, key, which let...
...voked. an example is shown below: <keyset> <key id="copy-key" modifiers="accel" key="c" oncommand="docopy();"/> </keyset> the function docopy will be called when the user presses the keys specified by the key element, which in this example, are the keys for copying to the clipboard (such as control + c). this will work as long as the window is open. the docopy function should check to see if
text is selected and then copy the
text to the clipboard. note that
textboxes have the clipboard shortcuts built-in so you don't have to implement them yourself. assigning a keyboard shortcut on a menu the second way is: if you are assigning a keyboard shortcut that performs a command that also exists on a menu, you can associate the key element directly with the menu command. to do this, also add a...
...nuitem id="paste-command" accesskey="p" key="paste-key" label="paste" oncommand="alert('paste invoked')"/> </menupopup> </menu> </menubar> the menuitem's key attribute, which here is paste-key is equal to the id of the defined key. you can use this for additional keys as well to define keyboard shortcuts for any number of menu items. you'll also notice in the image that
text has been placed next to the paste menu command to indicate that ctrl and the v key can be pressed to invoke the menu command. this is added for you based on the modifiers on the key element. keyboard shortcuts attached to menus will work even if the menu is not open. one additional feature of key definitions is that you can disable them easily. to do this add a disabled attribute to the key elem...
... might use this to check for allowed characters in a field. keydown called when a key is pressed down while an element has the focus. note that the event will be called as soon as the key is pressed, even if it hasn't been released yet. keyup called when a key is released while an element has the focus. key events are only sent to the element that has the focus. typically, this will include
textboxes, buttons, checkboxes and so forth. if no element is focused, the key event will instead be targeted at the xul document itself. in this case, you can add an event listener to the window tag. normally though, if you want to respond to keys globally, you will use a keyboard shortcut as described earlier. the key event object has two properties which hold the key that was pressed. the keycode ...
Manifest Files - Archive of obsolete content
ension, you will want to package them into an archive to avoid having to install lots of smaller files. the xpcnativewrappers=yes part at the end of the manifest line is a flag that may optionally be used. in javascript, it is possible for a web page to override built-in functions with their own code. if the xpcnativewrappers flag is specified, it indicates that scripts running in a privileged con
text don't call these overridden versions, but the original built-in versions instead. otherwise, if an extension attempted to call the modified versions, it would likely not work properly, or worse, create a security hole. this flag was added to prevent this problem and should always be used for newer extensions, but is left out for older extensions that might not be compatible with the change. for m...
...on" chrome:extension="true"/> </rdf:rdf> content,install,url,file:///main/app/ create a directory somewhere on your disk. many people put this as a subdirectory inside mozilla's chrome directory, but this isn't necessary. the directory could be anywhere and on any disk. put your xul files in this directory. create a file called contents.rdf and place it in this directory. ...
...n't necessary. the directory could be anywhere and on any disk. put your xul files in this directory. create a file called contents.rdf and place it in this directory. copy the
text in the box below into the new contents.rdf file. this file is used to identify the application id, its name, author, version and so on. change the highlighted parts of the file above to your own information. the red
text 'myapplication' should be the id of your application. you make this up, but typically, the id is similar to your application's name. replace the blue highlighted
text above with your application's title and author. if the 'chrome:extension' field is true, the application is a mozilla firefox extension and it will show up in the extensions window of the browser. if false, it will not appear. sav...
...n step 1. open the file <mozilla-directory>/chrome/installed-chrome.txt, where <mozilla-directory> is the directory where mozilla is installed. exit mozilla before you do this. next, you are going to register the new application with mozilla so it will know where to find it. add a line at the end of installed-chrome.txt pointing to the new directory you created in step 1. change the highlighted
text to the file url below of the directory. make sure that it url ends with a slash and that you press enter at the end of the line. if you aren't sure what the url is, open the directory created in step 1 into a mozilla browser and copy the url from the location field. note that the reference should always be a directory, not a file. delete the file <mozilla-directory>/chrome/chrome.rdf. start moz...
Modifying a XUL Interface - Archive of obsolete content
disabled properties. they set or clear the corresponding attribute as necessary. label and value properties examples here is a simple example which changes the label on a button: example 3 : source view <button label="hello" oncommand="this.label = 'goodbye';"/> when the button is pressed, the label is changed. this technique will work for a variety of different elements that have labels. for a
textbox, you can do something similar for the value property. example 4 : source view <button label="add" oncommand="this.nextsibling.value += '1';"/> <
textbox/> this example adds a '1' to the
textbox each time the button is pressed. the nextsibling property navigates from the button (this) to the next element, the
textbox. the += operator is used to add to the current value so a 1 will be added onto...
... similar for the value property. example 4 : source view <button label="add" oncommand="this.nextsibling.value += '1';"/> <
textbox/> this example adds a '1' to the
textbox each time the button is pressed. the nextsibling property navigates from the button (this) to the next element, the
textbox. the += operator is used to add to the current value so a 1 will be added onto the end of the existing
text. note that you can still enter
text into the
textbox. you can also retrieve the current label or value using these properties, as in the following example: example 5 : source view <button label="hello" oncommand="alert(this.label);"/> toggling a checkbox checkboxes have a checked property which may be used to check or uncheck the checkbox. it should be easy to determine how this is used. in this...
... of how to create this type of interface. example 7 : source view <script> function updatestate(){ var name = document.getelementbyid("name"); var sindex = document.getelementbyid("group").selectedindex; name.disabled = sindex == 0; } </script> <radiogroup id="group" onselect="updatestate();"> <radio label="random name" selected="true"/> <hbox> <radio label="specify a name:"/> <
textbox id="name" value="jim" disabled="true"/> </hbox> </radiogroup> in this example a function updatestate() is called whenever a select event is fired on the radio group. this will happen whenever a radio button is selected. this function will retrieve the currently selected radio element using the selectedindex property. note that even though one of the radio buttons is inside an hbox, it is st...
...a function updatestate() is called whenever a select event is fired on the radio group. this will happen whenever a radio button is selected. this function will retrieve the currently selected radio element using the selectedindex property. note that even though one of the radio buttons is inside an hbox, it is still part of the radio group. if the first radio button is selected (index of 0), the
textbox is enabled by setting its disabled property to true. if the second radio button is selected, the
textbox is enabled. the next section will provide more details about manipulating radio groups as well as manipulating lists. « previousnext » ...
More Wizards - Archive of obsolete content
cases, it would be more convenient to disable the next button until valid input has been entered. the wizard has a property canadvance, which can be set to true to indicate that the next button should be enabled. if set to false, the next button is disabled. you can change the property when invalid or valid data has been entered. ...
...be enabled. if set to false, the next button is disabled. you can change the property when invalid or valid data has been entered. in the following example, the user must enter a secret code into a
textbox on the first page of the wizard. the function checkcode() is called whenever the first page is shown as indicated by the onpageshow attribute. it is also called whenever a key is pressed in the
textbox, to determine whether the next button should be enabled again. ...
...t enter a secret code into a
textbox on the first page of the wizard. the function checkcode() is called whenever the first page is shown as indicated by the onpageshow attribute. it is also called whenever a key is pressed in the
textbox, to determine whether the next button should be enabled again. ...
...both properties are adjusted automatically as you switch pages. thus, the back button will be disabled on the first page so you don't ...
Property Files - Archive of obsolete content
for this purpose, property files can be used. a property file contains a set of strings. you will find property files alongside the dtd files with a .properties extension. properties in the file are declared with the syntax name=value. ...
...for this purpose, property files can be used. a property file contains a set of strings. you will find property files alongside the dtd files with a .properties extension. properties in the file are declared with the syntax name=value. ...
...dle = document.getelementbyid("strings"); var nofilesfound=strbundle.getstring("notfoundalert"); alert(nofilesfound); this example first gets a reference to the bundle using its id then, it looks up the string 'notfoundalert' in the property file. the function getstring() returns the value of the string or null if the string does not exist. finally, the string is displayed in an alert box.
text formatting the next method is getformattedstring(). this method also gets a string with the given key name from the bundle. in addition, each occurrence of formatting code (e.g. %s) is replaced by each successive element in the supplied array. var dir = "/usr/local/document"; var count = 10; var strbundle = document.getelementbyid("strings"); var result = strbundle.getformattedstring("resultmess...
...erate an incorrect string that strips the space character between the percentage character and the next word of the string ("50%off"). non-ascii characters, utf-8 and escaping gecko 1.8.x (or later) supports property files encoded in utf-8. you can and should write non-ascii characters directly without escape sequences, and save the file as utf-8 without bom. double-check the save options of your
text editor, because many don't do this by default. see localizing extension descriptions for more details. in some cases, it may be useful or needed to use escape sequences to express some characters. property files support escape sequences of the form: \uxxxx , where xxxx is a unicode character code. for example, to put a space at the beginning or end of a string (which would normally be stripped by...
Simple Menu Bars - Archive of obsolete content
n placed inside a flexible toolbox. the menubar has no special attributes but it is a type of box. this means that you could create a vertical menubar by setting the orient attribute to vertical. menu element the menu element works much like the button element. it accepts some of the same attributes plus some additional ones: id the unique identifier of the menu title button. label the
text to appear on the menu, such as file or edit. disabled this boolean attribute determines whether the menu is disabled. although you can, there's rarely a need to disable an entire menu. this attribute can be set to either true or false. of course, the latter is the default. accesskey this is the key that the user can press to activate the menu item. this letter is typically shown underli...
... attribute can be set to either true or false. of course, the latter is the default. accesskey this is the key that the user can press to activate the menu item. this letter is typically shown underlined on the menu title. mozilla will look at the label attribute and add an underline character to the character specified here. for that reason, you should specify a character that exists in the
text (although the key will still work if it doesn't). the menu element is normally placed on a menubar, although it does not have to be. however, it will be given a different look. the image here shows what the earlier example would look like without the menu bar. menupopup element the menupopup element creates the popup window containing the menu commands. it is a type of box which defaults to...
...izontal if you wanted to and the menuitems would be placed in a row. normally only menuitems and menuseparators would be placed on a menupopup. you can place any element on a menupopup, however they will be ignored on a macintosh. menuitem element the menuitem element is much like the menu element and has some of the same attributes. id the unique identifier of the menu item. label the
text to appear on the menu item, such as open or save. disabled this boolean attribute determines whether the menu item is disabled. this attribute can be set to either true or false where the latter is the default. accesskey this is the key that the user can press to activate the menu item. this letter is typically shown underlined on the menu title. mozilla will look at the label attribute...
.... this attribute can be set to either true or false where the latter is the default. accesskey this is the key that the user can press to activate the menu item. this letter is typically shown underlined on the menu title. mozilla will look at the label attribute and add an underline character to the character specified here. for that reason, you should specify a character that exists in the
text. accel
text this specifies the shortcut key
text to appear next to the menu command
text. it does not associate a key action with the menuitem however. we'll look at how to do this later. menuseparator element the menuseparator has no special attributes. it just creates a horizontal bar between the menuitems next to it. next, we'll learn some more features of menus. « previousnext ...
Stacks and Decks - Archive of obsolete content
ldren. the stack element might be used for cases where a status indicator needs to be added over an existing element. for example, a progress bar might be created using a bar and a label overlaid on top of it. shadowing with stacks one convenient use of the stack element however is that you could emulate a number of css properties with it. for example, you could create an effect similar to the
text-shadow property with the following: example 1 : source view <stack> <description value="shadowed" style="padding-left: 1px; padding-top: 1px; font-size: 15pt"/> <description value="shadowed" style="color: red; font-size: 15pt;"/> </stack> both description elements create
text with a size of 15 points. the first, however is offset one pixel to the right and down by adding a padding to it...
... <stack> <description value="shadowed" style="padding-left: 1px; padding-top: 1px; font-size: 15pt"/> <description value="shadowed" style="color: red; font-size: 15pt;"/> </stack> both description elements create
text with a size of 15 points. the first, however is offset one pixel to the right and down by adding a padding to its left and top sides. this has the result of drawing the same
text 'shadowed' again but slightly offset from the other. the second description element is drawn in red so the effect is more visible. this method has advantages over using
text-shadow because you could completely style the shadow apart from the main
text. it could have its own font, underline or size. (you could even make the shadow blink). it is also useful as mozilla doesn't currently support css...
...a disadvantage is that the area taken up by the shadow makes the size of the stack larger. ...
...ge is that the area taken up by the shadow makes the size of the stack larger. shadowing is very useful for creating the disabled appearance of buttons: example 2 : source view <stack style="background-color: #c0c0c0"> <description value="disabled" style="color: white; padding-left: 1px; padding-top: 1px;"/> <description value="disabled" style="color: grey;"/> </stack> this arrangement of
text and shadow colors creates the disabled look under some platforms. note that events such as mouse clicks and keypresses are passed to the element on the top of the stack, that is, the last element in the stack. that means that buttons will only work properly as the last element of the stack. decks a deck element also lays out its children on top of each other much like the stack element, howeve...
Tree View Details - Archive of obsolete content
open respectively. obviously, the new inserted child items will have both values set to false. implement the tree view interface next, we need to implement the tree view interface. ...
...s defined in nsitreeview. the settree function will be called to set the tree's box object. the tree box object is a specialized type of box object specific to trees and will be examined in detail in the next section. it is used to aid in drawing the tree. in this example, we will only need one function of the box object, to be able to redraw the tree when items are added or removed. the getcell
text, iscontainer and iscontaineropen functions just return the corresponding element from the visibledata array. finally, the remaining functions can just return false since we don't need those features. if we had a row that had no children we would want to implement the iscontainerempty function so that it returned true for those elements. getparentindex: function(idx) { if (this.iscontainer(idx)...
... twisty in the new state. the easiest way to do this is to invalidate the row. complete example there are several other view functions we can implement but they don't need to do anything in this example, so we can create functions that do nothing for those. ...
... solids: ["silver", "gold", "lead"], liquids: ["mercury"], gases: ["helium", "nitrogen"] }, visibledata : [ ["solids", true, false], ["liquids", true, false], ["gases", true, false] ], treebox: null, selection: null, get rowcount() { return this.visibledata.length; }, settree: function(treebox) { this.treebox = treebox; }, getcell
text: function(idx, column) { return this.visibledata[idx][0]; }, iscontainer: function(idx) { return this.visibledata[idx][1]; }, iscontaineropen: function(idx) { return this.visibledata[idx][2]; }, iscontainerempty: function(idx) { return false; }, isseparator: function(idx) { return false; }, issorted: function() { return false; }, iseditable: functi...
XUL Structure - Archive of obsolete content
skin, and the locale, which are all described below. a particular package might provide one or more skins and locales, but a user can replace them with their own. in addition, the package might include several different applications, each accessible via different chrome urls. the packaging system is flexible enough so that you can include whatever parts you need and allow other parts, such as the
text for different languages, to be downloaded separately. the three types of chrome packages are: content - windows and scripts the declarations of the windows and the user interface elements contained within them. these are stored in xul files, which have a .xul extension. a content package can have multiple xul files, but the main window should have a filename that is the same as the package ...
...ile within it called editor.xul. scripts are placed in separate files alongside the xul files. skin - style sheets, images and other theme specific files style sheets describe details of the appearance of a window. they are stored separately from xul files to facilitate modifying the skin (theme) of an application. any images used are stored here also. locale - locale specific files all the
text that is displayed within a window is stored separately. this way, a user can have a set for their own language. content packages the name of the jar file might describe what it contains, but you can't be sure unless you view its contents. let's use the browser package included with firefox as an example. if you extract the files in browser.jar, you will find that it contains a directory struct...
...the package. by changing the css files, you can adjust the appearance of a window without changing its function. this is how you can create a new theme. the xul part remains the same but the skin part changes independently. locales the file en-us.jar describes the language information for each component, in this case for us english. like the skins, each language file contains files that specify
text used by the package for a specific language. the locale structure is similar to the others, so it won't be listed here. the localized
text is stored in two types of files: dtd files and properties files. the dtd files have a .dtd extension and contain entity declarations, one for each
text string that is used in a window. for example, the file browser.dtd contains entity declarations for each me...
...heme or language without having to change the original package. other packages there is a special package called toolkit (or global). we saw the global directory earlier for skins. the file toolkit.jar contains the corresponding content part for it. it contains some global dialogs and definitions. it also defines the default appearance and functionality of the various common xul widgets such as
textboxes and buttons. the files located in the global part of a skin package contain the default look for all of the xul interface elements. the toolkit package is used by all xul applications. adding a package mozilla places the packages that are included with the installation in the chrome directory. however, they do not need to be placed there. when installing another package, you can place it a...
Using the standard theme - Archive of obsolete content
to the standard theme (the theme currently chosen by the user in the theme selector), or even the default theme delivered with your the base application. applying the standard theme in order to use the theme currently chosen by the user of the base application (the so called "global skin"), you have to add the following line to your xul file: <?xml-stylesheet href="chrome://global/skin/" type="
text/css"?> this imports the styles found in the <tt>global/skin</tt> chrome directory and will make the standard xul widgets of your application use the selected chosen theme. you do not have to specify a specific file; mozilla will determine by its own which files in the directory it needs to use. if you are only going to use these global style sheets, you of course do not need a <tt>skin</tt> dire...
...om skin in the <tt>chrome.manifest</tt>. note that you can also mix these two approaches, although it makes your code more readable when sticking to only one way. ...
...pproaches, although it makes your code more readable when sticking to only one way. ...
...that is, depending on the theme currently selected by the user, you can provide different custom style sheets for your extensions. ...
XUL Questions and Answers - Archive of obsolete content
content in a new window using "window.open" and send titlebar=”no” as one of the flags in the 3rd argument. is it possible to have checkbox support for multi column lists? the current issue is a person exploring if it is possible to have checkbox support for multi column lists. ...
...changed. for more information please look at the following link: nsextensionmanager.js is nsivariant fully supported using python? python has full support for variants. pass a python string/int/etc to the method requiring an nsivariant. a python object is convered when implmenting an interface taking an nsivariant. how do i close the "showpopup" which is automatically opened when the "oncon
textmenu" event is called? if you have a similar code base as the following: onbookmarkcon
textmenu: function(event, id) { document.getelementbyid("bookmarkpopup").showpopup(document.getelementbyid(id), event.screenx + 6, event.screeny + 6, "popup", "bottomright", "bottomright"); } use the hidepopup() function to solve this issue. what is an example of addprogresslistener? an example of t...
... see also http://developer.mozilla.org/en/docs...in_chrome_code how can i include a .js document from inside a javascript document? use the following snippet of code to reference a js file with...
... so how can i do this same way as <iframe>? you can't...
XUL Reference - Archive of obsolete content
ces prefpane prefwindow progressmeter query queryset radio radiogroup resizer richlistbox richlistitem row rows rule scale script scrollbar scrollbox scrollcorner separator spacer spinbuttons splitter stack statusbar statusbarpanel stringbundle stringbundleset tab tabbrowser (firefox-only starting with firefox 3/gecko 1.9) tabbox tabpanel tabpanels tabs template
textnode
textbox
textbox (firefox autocomplete)
textbox (mozilla autocomplete) timepicker titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren treecol treecols treeitem treerow treeseparator triple vbox where window wizard wizardpage categorical list of...
...e window wizard wizardpage categorical list of all xul elements « xul reference « windows window wizard wizardpage titlebar window structure --- menus and popups --- toolbars toolbar toolbarbutton toolbargrippy toolbaritem toolbarpallete toolbarseperator toolbarspring tabs and grouping tab tabbox tabpanel tabpanels tabs controls ---
text and images label caption image lists --- trees --- layout --- templates --- scripting --- helper elements other xul lists dialog overlay page window wizard wizardpage preference preferences prefpane prefwindow browser tabbrowser editor iframe titlebar resizer statusbar statusbarpanel dialogheader notification notificationbox ...
...ox menubar menu menuitem menuseparator menupopup panel tooltip popupset toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tabbox tabs tab tabpanels tabpanel groupbox caption separator spacer button checkbox colorpicker datepicker menulist progressmeter radio radiogroup scale splitter
textbox
textbox (firefox autocomplete)
textbox (mozilla autocomplete) timepicker description label image listbox listitem listcell listcol listcols listhead listheader richlistbox richlistitem tree treecell treechildren treecol treecols treeitem treerow treeseparator box hbox vbox bbox deck stack grid columns column rows row scrollbox action assign binding bindin...
...picker description label image listbox listitem listcell listcol listcols listhead listheader richlistbox richlistitem tree treecell treechildren treecol treecols treeitem treerow treeseparator box hbox vbox bbox deck stack grid columns column rows row scrollbox action assign binding bindings conditions content member param query queryset rule template
textnode triple where script commandset command broadcaster broadcasterset observes key keyset stringbundle stringbundleset arrowscrollbox dropmarker grippy scrollbar scrollcorner spinbuttons all attributes all properties all methods attributes defined for all xul elements style classes event handlers deprecated/defunct markup ...
XML - Archive of obsolete content
t they will with it. this is what xml is: a meta-language for defining languages appropriate to the tasks at hand; it's structured in a way that makes it accessible as "information" to both humans and machines. html -- which is a derived language like our memoml (see the appendix notes for information on the geneology of markup languages) -- has been created for the purposes of representing hyper
text documents and the basic relationships between them. humans read raw html often when they edit html documents, though this is changing as regular html editors are replaced by wysiwyg html editors, and so do html parsers, which use the markup to format the document in its presentational form in web browsers. like html and memoml, xul is an xml-based language. where in html the elements are used to...
...ic relationships between them. humans read raw html often when they edit html documents, though this is changing as regular html editors are replaced by wysiwyg html editors, and so do html parsers, which use the markup to format the document in its presentational form in web browsers. like html and memoml, xul is an xml-based language. ...
... as a set of interface-defining tags, xulis the widgets its tags describe. ...
...and behavior, rdf for resources, xml for the structure, and html for the content and some little extras. in this way, it's more like a developmentplatform or framework than a user interface language, particularly when it's used with related cross-platform technologies like xpcom, which also went into mozilla. gecko reads xul and makes interfaces just as our specially created memo is nothing but
text unless there is an application for making use of the structure in some way, so too our xul widgets are just marked-up
text unless there is software to interpret the structures and render the xul as actual widgets. all xml requires a parser or an engine of some kind at the receiving end to make it run. this is, in short, what gecko is. gecko is a rendering engine that understands xul and knows ho...
action - Archive of obsolete content
e, each variable will be a reference to data within the datasource, determined from the query. if the same variable appears multiple times, it will have the same value in each place. for more information, see actions. ...
...ariable will be a reference to data within the datasource, determined from the query. if the same variable appears multiple times, it will have the same value in each place. for more information, see actions. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ,...
...oltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), gete...
assign - Archive of obsolete content
ts. any namespace prefixes declared on the element may be used within the expression. var type: string for the xul assign attribute, this is the variable to assign the value to; otherwise it's a reference to a template variable such as "?name". ...
...amespace prefixes declared on the element may be used within the expression. var type: string for the xul assign attribute, this is the variable to assign the value to; otherwise it's a reference to a template variable such as "?name". ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
bbox - Archive of obsolete content
xul reference home [ examples | attributes | properties | methods | related ] a horizontal box that is baseline aligned. it is equivalent to using an hbox element with an align attribute set to baseline. ...
...rence home [ examples | attributes | properties | methods | related ] a horizontal box that is baseline aligned. it is equivalent to using an hbox element with an align attribute set to baseline. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
broadcaster - Archive of obsolete content
buttons that just want to have their disabled status set when the feature should be disabled, you should use a command element instead. more information is available in the broadcasters and observers xul tutorial. ...
...hat just want to have their disabled status set when the feature should be disabled, you should use a command element instead. more information is available in the broadcasters and observers xul tutorial. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
broadcasterset - Archive of obsolete content
ples | attributes | properties | methods | related ] a container element for broadcaster elements. the broadcasterset and its descendants are not displayed. more information is available in the xul tutorial. ...
...ttributes | properties | methods | related ] a container element for broadcaster elements. the broadcasterset and its descendants are not displayed. more information is available in the xul tutorial. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
column - Archive of obsolete content
ws in each column. it is common to use columns only to define width and flexibility for the grid column and not place elements directly inside the column. more information is available in the xul tutorial. example see grid for an example. ...
...h column. it is common to use columns only to define width and flexibility for the grid column and not place elements directly inside the column. more information is available in the xul tutorial. example see grid for an example. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
columns - Archive of obsolete content
nts placed inside a columns element occupy the full height of the grid and are placed in their corresponding positions between the columns. more information about columns is available in the xul tutorial. example see grid for an example. ...
...d inside a columns element occupy the full height of the grid and are placed in their corresponding positions between the columns. more information about columns is available in the xul tutorial. example see grid for an example. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
commandset - Archive of obsolete content
f event names that the command updater will update upon. if this attribute is not specified, or you set it to the value '*', all events are valid. valid events are listed below, or you can use your own events. you can send a custom event by calling the updatecommands method of the command dispatcher. focus: occurs when the focused element changes. select: occurs when the selected
text changed. clipboard: occurs when the clipboard is changed. undo: occurs when the undo buffer is changed. oncommandupdate type: script code this event occurs when a command update occurs. you would use this to update the disabled status of items. targets type: comma-separated list of element ids a comma-separated list of elemen...
... ids a comma-separated list of element ids that the command updater will update upon. if this attribute is not specified, or you set it to the value '*', all elements are valid. the command update will only occur when the event occurs to one of the specified elements. ...
... occurs to one of the specified elements. ...
...elements. ...
conditions - Archive of obsolete content
from the resource. if all variables can be replaced, the rule matched. this element is used with firefox 2/mozilla 1.8 and earlier instead of the query element. more information is available in the xul tutorial. ...
... resource. if all variables can be replaced, the rule matched. this element is used with firefox 2/mozilla 1.8 and earlier instead of the query element. more information is available in the xul tutorial. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
content - Archive of obsolete content
atributos flags ("banderas"), establezca dont-build-content, ("no almacenar contenido"), use treeitem en su lugar. para más información, se encuentra disponible el tutorial xul. ...
... flags ("banderas"), establezca dont-build-content, ("no almacenar contenido"), use treeitem en su lugar. para más información, se encuentra disponible el tutorial xul. ...
...if set, the conditions will only match if the template builder is parsing content for an element directly inside this tag. ...
...if set, the conditions will only match if the template builder is parsing content for an element directly inside this tag. for example, by using a value of treechildren, the condition will only match when placing elements directly inside a treechildren tag. ...
grippy - Archive of obsolete content
attributes | properties | methods | related ] an element that may be used inside a splitter which can be used to collapse a sibling element of the splitter. more information is available in the xul tutorial. ...
...es | properties | methods | related ] an element that may be used inside a splitter which can be used to collapse a sibling element of the splitter. more information is available in the xul tutorial. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
hbox - Archive of obsolete content
ox element, except it defaults to horizontal orientation. more information is available in the xul tutorial. ...
...t, except it defaults to horizontal orientation. more information is available in the xul tutorial. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
iframe - Archive of obsolete content
ay cause serious security problems! transparenttype: one of the values belowset the background of an iframe as transparent.transparentthis results in the iframe's background being transparent. ...
...serious security problems! transparenttype: one of the values belowset the background of an iframe as transparent.transparentthis results in the iframe's background being transparent. ...
... contentdocument type: document this read-only property contains the document object in the element. ...
... contentdocument type: document this read-only property contains the document object in the element. ...
menubar - Archive of obsolete content
<menuitem label="undo"/> <menuitem label="redo"/> </menupopup> </menu> </menubar> attributes grippyhidden seamonkey only type: boolean when set to true, the grippy will be hidden. when set to false, the default, the grippy will be shown. statusbar type: id if you set this attribute to the id of a statusbar element, the label on the statusbar will update to the status
text of the items on the menu as the user moves the mouse over them. properties accessibletype type: integer a value indicating the type of accessibility object for the element. statusbar type: id of statusbar element gets and sets the value of the statusbar attribute. inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , colla...
...tems on the menu as the user moves the mouse over them. properties accessibletype type: integer a value indicating the type of accessibility object for the element. statusbar type: id of statusbar element gets and sets the value of the statusbar attribute. ...
...ent gets and sets the value of the statusbar attribute. ...
...the statusbar attribute. ...
observes - Archive of obsolete content
he broadcast event is called on the observer. use the value * to observe all attribute of the broadcasters. the id, ref, and persist attributes are not observed. element type: id the id of the broadcaster element that the observer is observing. ...
...ast event is called on the observer. use the value * to observe all attribute of the broadcasters. the id, ref, and persist attributes are not observed. element type: id the id of the broadcaster element that the observer is observing. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
page - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] similar to a window, except it should be used for xul files that are to be loaded into an iframe. ...
... « xul reference home [ examples | attributes | properties | methods | related ] similar to a window, except it should be used for xul files that are to be loaded into an iframe. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
queryset - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container for query elements when more than one query is used. for more information, see multiple queries. ...
... « xul reference home [ examples | attributes | properties | methods | related ] a container for query elements when more than one query is used. for more information, see multiple queries. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
resizer - Archive of obsolete content
resizing grip that appears in the bottom corner of the window, used for resizing the window. as some platforms provide this resizing grip automatically, this type of resizer element will be hidden and ensure that the window does not get an extra resizer. ...
...grip that appears in the bottom corner of the window, used for resizing the window. as some platforms provide this resizing grip automatically, this type of resizer element will be hidden and ensure that the window does not get an extra resizer. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
row - Archive of obsolete content
he most child elements determines the number of columns in each row, which may be smaller or larger than the number of column elements defined in the grid. more information is available in the xul tutorial. example see grid for an example. ...
...hild elements determines the number of columns in each row, which may be smaller or larger than the number of column elements defined in the grid. more information is available in the xul tutorial. example see grid for an example. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
rows - Archive of obsolete content
non-row related elements placed inside a rows element occupy the full width of the grid and are placed in their corresponding positions between the rows. more information is available in the xul tutorial. example see grid for an example. ...
... related elements placed inside a rows element occupy the full width of the grid and are placed in their corresponding positions between the rows. more information is available in the xul tutorial. example see grid for an example. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
script - Archive of obsolete content
ation/javascript will always use the latest available javascript version. if you omit this attribute, the default (and older) javascript version is used (like you get when including a javascript file from web content without specifying a version number). ...
...ascript will always use the latest available javascript version. if you omit this attribute, the default (and older) javascript version is used (like you get when including a javascript file from web content without specifying a version number). ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
scrollbox - Archive of obsolete content
rface =scrollbox_element.boxobject.queryinterface( components.interfaces.nsiscrollboxobject); xpcominterface.ensureelementisvisible(child_element_to_make_visible); see the nsiscrollboxobject api for other scroll-related methods. ...
...rollbox_element.boxobject.queryinterface( components.interfaces.nsiscrollboxobject); xpcominterface.ensureelementisvisible(child_element_to_make_visible); see the nsiscrollboxobject api for other scroll-related methods. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
scrollcorner - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is used for the small box where the horizontal and vertical scrollbars meet. ...
... « xul reference home [ examples | attributes | properties | methods | related ] this element is used for the small box where the horizontal and vertical scrollbars meet. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
separator - Archive of obsolete content
arator is a horizontal or vertical separator. note that the values are the reverse of what seems more likely. horizontal the separator separates vertically placed elements. vertical the separator separates horizontally placed elements. ...
... a horizontal or vertical separator. note that the values are the reverse of what seems more likely. horizontal the separator separates vertically placed elements. vertical the separator separates horizontally placed elements. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
spacer - Archive of obsolete content
pacer does not occupy any space. if you want a small gap, consider using a separator instead. more information is available in the xul tutorial. ...
...s not occupy any space. if you want a small gap, consider using a separator instead. more information is available in the xul tutorial. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
splitter - Archive of obsolete content
ng element of the splitter is collapsed when the grippy is clicked. more information is available in the xul tutorial. attributes collapse, resizeafter, resizebefore, state, substate style classes tree-splitter examples <!-- this bar has some styling associated with it. the vbox is used to hold the .png image that a user clicks on to resize the search bar.--> <splitter tooltip
text="resize the search box" oncommand="alert('the splitter was dragged')"> <vbox id="example_vbox" /> </splitter> attributes collapse type: one of the values below determines which side of the splitter is collapsed when its grippy is clicked. if this attribute is not specified, the splitter will not cause a collapse. you should put a grippy element inside the splitter when it is used for ...
...the splitter is actually collapsed in. since collapse="both" is a gecko 1.9+ feature, this will have no effect on earlier versions. before the element immediately before the splitter is collapsed. after the element immediately after the splitter is collapsed. ...
...tely after the splitter is collapsed. ...
...psed. ...
stack - Archive of obsolete content
his example, the resulting width of the top-most hbox will be 400px (600px - 200px - 0) : <stack width="600"> <hbox flex="1"> <!-- content --> </hbox> <hbox left="0" right="200" > <!-- some content here. ...
...le, the resulting width of the top-most hbox will be 400px (600px - 200px - 0) : <stack width="600"> <hbox flex="1"> <!-- content --> </hbox> <hbox left="0" right="200" > <!-- some content here. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
stringbundle - Archive of obsolete content
291) attributes src properties applocale , src, stringbundle, strings methods getformattedstring, getstring examples (example needed) attributes src type: uri the uri of the property file that contains the localized strings. ...
...ttributes src properties applocale , src, stringbundle, strings methods getformattedstring, getstring examples (example needed) attributes src type: uri the uri of the property file that contains the localized strings. ...
...this is an object which implements nsilocale. ...
...this is an object which implements nsilocale. src type: url gets and sets the value of the src attribute. ...
stringbundleset - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container for stringbundle elements. ...
... « xul reference home [ examples | attributes | properties | methods | related ] a container for stringbundle elements. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
tabbrowser - Archive of obsolete content
-only views of web documents. it is similar to the browser element, except that multiple documents can be displayed, each in a separate tab. note: starting in firefox 3 (xulrunner/gecko 1.9), this is only used in the main firefox window and cannot be used in other xul windows by third-party applications or extensions. ...
... to enable autocomplete of fields. autocompletepopup type: id the id of a popup element used to hold autocomplete results for the element. autoscroll type: boolean set to false to disable autoscroll for this browser. if this attribute is set to true or omitted, autoscroll will be enabled or depending on the user preference general.autoscroll. contentcon
textmenu type: id the id of a menupopup element serving as the con
text menu for the content area in the tabbrowser. contenttooltip type: id the id of a tooltip element to be used for the content area in the tabbrowser. onbookmarkgroup not in firefox type: script code this code executes when the user chooses the "bookmark this group of tabs" command. ...
...abbrowser. this is a shortcut for looking at the tabs in the tabcontainer. visibletabs type: array an array containing tab objects for each visible tab in the tabbrowser. this lets you determine which tabs are visible in the current tab set. webbrowserfind type: nsiwebbrowserfind this read-only property contains an nsiwebbrowserfind object which can be used to search for
text in the document. webnavigation type: nsiwebnavigation this read-only property contains the nsiwebnavigation object for the document. most of its methods are callable directly on the element itself, such as goback and goforward. it also contains the load constants used by reloadwithflags and loaduriwithflags. webprogress type: nsiwebprogress this read-...
... by the array uris, into tabs. if loadinbackground is true, the tabs are loaded in the background, and if replace is true, the currently displayed tabs are replaced with the specified uris instead of adding new tabs. the properties of params are following: boolean inbackground boolean replace boolean allowthirdpartyfixup tab targettab number newindex object postdatas number usercon
textid note: this is the xul method on <browser> / <tabbrowser>, not the global function in chrome://browser/content/browser.js. please check which one you're documenting! (this one has no post data parameter, see loaduriwithflags for a version that does) loaduri( uri, referrer, charset ) return type: no return value load a url into the document, with the given referrer and c...
tabpanel - Archive of obsolete content
properties | methods | related ] a individual panel in a tabpanels element. this element is optional and you may just use any other container in place of it. more information is available in the xul tutorial. ...
...es | methods | related ] a individual panel in a tabpanels element. this element is optional and you may just use any other container in place of it. more information is available in the xul tutorial. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
tabpanels - Archive of obsolete content
e xul tutorial. attributes selectedindex properties selectedindex, selectedpanel examples (example needed) attributes selectedindex type: integer gets and sets the index of the currently selected panel. the first item is at index 0. ...
...orial. attributes selectedindex properties selectedindex, selectedpanel examples (example needed) attributes selectedindex type: integer gets and sets the index of the currently selected panel. the first item is at index 0. ...
... selectedindex type: integer returns the index of the currently selected item. ...
... selectedindex type: integer returns the index of the currently selected item. you may select an item by assigning its index to this property. by assigning -1 to this property, all items will be deselected. ...
tabs - Archive of obsolete content
ent should be placed inside a tabbox and should contain tab elements. nb: you can add some other elements to tabs such as button, but they will receive an index. activating them will not change the selectedindex. more information is available in the xul tutorial. ...
...o the "new tab" and "close" buttons by applying them to the tabs-newbutton and tabs-closebutton classes respectively. disableclose type: boolean if this attribute is true the close button will be disabled. disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
...the first element in the corresponding tabpanel when the tabs are navigated via the keyboard. if this attribute is false, the focus does not change during navigation. tabindex type: integer the tab order of the element. the tab order is the order in which the focus is moved when the user presses the "tab" key. elements with a higher tabindex are later in the tab sequence. tooltip
textnew not in firefox type: string used to set the
text which appears in the tooltip when the user moves the mouse over the new button in the tab row. properties accessibletype type: integer a value indicating the type of accessibility object for the element. disabled type: boolean gets and sets the value of the disabled attribute. itemcou...
...ot the list item that was selected) when it is changed either via this property, the selectedindex property, or changed by the user. tabbox type: tabbox element returns the tabbox element that contains the tabs. tabindex type: integer gets and sets the value of the tabindex attribute. value type: string gets and sets the value of the value attribute. for
textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the
textbox.value and menulist.value syntax. methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect...
template - Archive of obsolete content
n the template's first rule is used. member type: string may optionally be set to the variable to use as the member variable. if not specified, the variable specified in the uri attribute in the action body of the template's first rule is used. ...
...plate's first rule is used. member type: string may optionally be set to the variable to use as the member variable. if not specified, the variable specified in the uri attribute in the action body of the template's first rule is used. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
toolbar - Archive of obsolete content
ren of a toolbox element. you can associate an external toolbar with a toolbox for the purpose of managing your toolbars by setting the toolboxid property on the toolbar. the chromeclass-toolbar class may be used to create a toolbar where its visibility depends on the toolbar flag when opening the window with the window interface's open() method loads the specified resource into the browsing con
text (window, <iframe> or tab) with the specified name. if the name doesn't exist, then a new window is opened and the specified resource is loaded into its browsing con
text.">window.open() method. more information is available in the xul tutorial. note: starting in gecko 1.9.1, toolbar items are moved from the toolbarpalette and added to the toolbar when a toolbar is first displayed. in earlier ve...
...of each item was created and placed on the toolbar. this means that the palette now only contains items not already in the toolbar. this introduces a potential compatibility problem for extensions that depend on being able to identify all possible toolbar items by looking in the toolbarpalette. ...
...type: comma-separated list of item ids the default set of displayed items on the toolbar. this should be set to a comma-separated list of item ids from the toolbarpalette. for example, back-button,forward-button,print-button. grippyhidden seamonkey only type: boolean when set to true, the grippy will be hidden. when set to false, the default, the grippy will be shown. grippytooltip
text seamonkey only type: string the
text to appear on the tooltip for the toolbar's grippy when the toolbar is collapsed. this would be used to label the grippy so that the user knows which toolbar it represents. height type: string (representing an integer) the preferred height of the element in pixels. the actual displayed height may be different if the element or its contents have a min...
...arge icons or small icons; this should be the string "large" or "small", respectively. these can vary from one toolbar to another within a given toolbox, whose iconsize attribute defines the default for all toolbars that don't specify an icon size. mode not in seamonkey 1.x type: one of the values below how the toolbarbuttons on the toolbar are displayed. icons show only icons.
text show only
text. full show both. toolbarname not in seamonkey 1.x type: string the name of the toolbar, which is listed on the show/hide toolbars menu. properties accessibletype type: integer a value indicating the type of accessibility object for the element. currentset not in seamonkey 1.x type: comma-separated list of strings holds a comma-separated list...
toolbarpalette - Archive of obsolete content
spacing items, as those are added automatically. you can add your own custom buttons to the firefox browser by using an overlay that overlays the toolbarpalette with the idbrowsertoolbarpalette. ...
...ms, as those are added automatically. you can add your own custom buttons to the firefox browser by using an overlay that overlays the toolbarpalette with the idbrowsertoolbarpalette. ...
...rpalette"> <toolbarbutton id="toolbarpalette-button" class="toolbarbutton-class" label="&mylabel;" tooltip
text="&mytip
text;" oncommand="somefunction()"/> </toolbarpalette> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-...
...u, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition,...
toolbarset - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] firefox only this element is used as a container for custom toolbars, which are added in the custom toolbar dialog. ...
... « xul reference home [ examples | attributes | properties | methods | related ] firefox only this element is used as a container for custom toolbars, which are added in the custom toolbar dialog. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ...
...ooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getel...
toolbox - Archive of obsolete content
property. more information is available in the xul tutorial. if you'd like to detect when toolbars in a toolbox are changed, see toolbar customization events. ...
...indow id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="toolbox example" width="300"> <toolbox> <toolbar> <toolbarbutton label="back"/> <toolbarbutton label="forward"/> <toolbarbutton label="home"/> </toolbar> <toolbar> <toolbarbutton label="stop"/> <toolbarbutton label="reload"/> </toolbar> </toolbox> <
textbox multiline="true" value="we have two toolbars inside of one toolbox above." width="20"/> </window> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth...
... customtoolbarcount firefox only type: integer the number of custom toolbars currently within the toolbox. ...
... customtoolbarcount firefox only type: integer the number of custom toolbars currently within the toolbox. ...
treechildren - Archive of obsolete content
atingbackground attributes alternatingbackground obsolete since gecko 2.0 type: boolean if true, the background of the tree's rows will alternate between two colors. you can use the :-moz-tree-row css style to do this instead. ...
...ground attributes alternatingbackground obsolete since gecko 2.0 type: boolean if true, the background of the tree's rows will alternate between two colors. you can use the :-moz-tree-row css style to do this instead. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
treerow - Archive of obsolete content
ial. attributes properties examples (example needed) attributes properties type: space-separated list of property names sets the properties of the element, which can be used to style the element. for more information, see styling a tree. ...
...ttributes properties examples (example needed) attributes properties type: space-separated list of property names sets the properties of the element, which can be used to style the element. for more information, see styling a tree. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
treeseparator - Archive of obsolete content
ree. attributes properties examples (example needed) attributes properties type: space-separated list of property names sets the properties of the element, which can be used to style the element. for more information, see styling a tree. ...
...ttributes properties examples (example needed) attributes properties type: space-separated list of property names sets the properties of the element, which can be used to style the element. for more information, see styling a tree. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
triple - Archive of obsolete content
resource uri, or an rdf literal value. predicate type: uri the predicate or property to match. this must be a uri of the property. subject type: string the subject of the element. it can be a variable reference or an rdf resource uri. ...
... uri, or an rdf literal value. predicate type: uri the predicate or property to match. this must be a uri of the property. subject type: string the subject of the element. it can be a variable reference or an rdf resource uri. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
vbox - Archive of obsolete content
t to the box element, except it defaults to vertical orientation. more information is available in the xul tutorial. ...
...box element, except it defaults to vertical orientation. more information is available in the xul tutorial. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
where - Archive of obsolete content
alue endswith the value of subject must end with the value contains the value of subject must contain the value as a substring subject type: string the variable or string to compare. value type: string the value to compare. ...
...dswith the value of subject must end with the value contains the value of subject must contain the value as a substring subject type: string the variable or string to compare. value type: string the value to compare. ...
...sceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , ...
...ltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
window - Archive of obsolete content
. see window activation events. more information is available in the xul tutorial. ...
... xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <vbox> <hbox> <image src="application_form.png"/> <description>register online!</description> </hbox> <groupbox align="start"> <caption label="your information"/> <radiogroup> <vbox> <hbox> <label control="your-fname" value="enter first name:"/> <
textbox id="your-fname" value="johan"/> </hbox> <hbox> <label control="your-lname" value="enter last name:"/> <
textbox id="your-lname" value="hernandez"/> </hbox> <hbox> <button oncommand="alert('save!')"> <description>save</description> </button> </hbox> </vbox> </radiogroup> ...
...mode attribute wouldn't be minimized. setting this attribute does not change the window state. use window.maximize(), window.restore(), or window.minimize() to change the window state. to get the window state from javascript code, use window.windowstate. listen to the sizemodechange event dispatched to the dom window to get notified when the window state changes. title type: string the
text to appear in the title bar of the window. width type: string (representing an integer) the preferred width of the element. the value should not include a unit as all values are in pixels. the actual displayed width may be different if the element or its contents have a minimum or maximum width, or the size is adjusted by the flexibility or alignment of its parent. the css width property m...
...values for window type as found on mxr: http://mxr.mozilla.org/mozilla-release/search?string=windowtype navigator:browser - looks like if window has gbrowser it has this window type devtools:scratchpad - scratchpad windows navigator:view-source - the view source windows properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition,...
wizardpage - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element defines a page in a wizard. the content in the pages should be placed inside the wizardpage element. more information is available in the xul tutorial. attributes description, label, next, pageid properties next, pageid attributes description type: string descriptive
text to appear in addition to the dialog title. label type: string the label that will appear on the element. if this is left out, no
text appears. for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. next type: id set to the pageid of the next wizardpage after this one. when set, the page with this pageid is...
...last page. pageid type: string wizardpage id this attribute should be set to a string that identifies the page's identifer in the wizard. this is used with the next attribute. the wizard always starts with the wizardpage that appears first in the wizard child list. ...
...appears first in the wizard child list. ...
...d list. ...
Gecko Compatibility Handbook - Archive of obsolete content
t implements the standards strictly. the old "code to the bugs" approach will not work for netscape 6.x, netscape 7.x and other mozilla based browsers. example - putting forms in tables invalid html to eliminate line break in <form>. in older browsers, this results in the td cell tightly wrapping around the input element. <table border="1"> <tr> <form name="form2"> <td> <input type="
text"> </td> </form> </tr> <table> this approach is commonly used to get around the fact that <form> is a block level element in html and will naturally begin on a new line in the page. unfortunately, this is invalid html and can cause problems both when parsing the page and when applying the css styles. incorrect use of xml empty tag notation many authors have taken to using xml empty tag no...
...pty tag notation, then only do so for html elements that never have any content - not for html elements that have optional ending tags. css id's should be case-sensitive gecko implements the case sensitivity of class id's correctly and will display this example correctly. however internet explorer treats all css id's as case-insensitive and will not display this example correctly. <style type="
text/css"> #id1 {
text-decoration: line-through; } #id1 {
text-decoration: underline; } </style> <div id="id1"> should be line-through </div> <div id="id1"> should be underline </div> -(example removed)- note that the w3c's html validator will flag html id attributes as duplicates if they only differ due to case. there appears to be some inconsistency between the actual html 4.01 recommendat...
...since the html validator is one of the primary vehicles web developers have for learning about the standards. due to the common nature of this error, netscape 6.2 began treating css id attributes as case-insensitive in quirks mode only. if you are invoking standards mode, you should still code your css to be consistent with respect to case. ...
...earn about scripting gecko browsers, proper use of tags, changes in the plugin architecture vs. the netscape 4 generation, and suggested plugin strategies. web server configuration problems incorrectly specified mime types many web servers have incorrectly specified mime types for files. gecko browsers require that the server specifies the correct mime type to match the content type: html -
text/html css -
text/css (related article) xml -
text/xml svg - image/svg+xml faulty implementations of http several web servers incorrectly implement the http protocol which can result in problems for netscape 6. faulty implementations of ssl older browser such as internet explorer 4 and netscape navigator 4 implemented older versions of the secure sockets layer (ssl) protocol. the most commo...
Introduction to Public-Key Cryptography - Archive of obsolete content
suing ca. the ca's digital signature allows the certificate to function as a "letter of introduction" for users who know and trust the ca but don't know the entity identified by the certificate. for more information about the role of cas, see "how ca certificates are used to establish trust". authentication confirms an identity authentication is the process of confirming an identity. in the con
text of network interactions, authentication involves the confident identification of one party by another party. authentication over networks can take many forms. certificates are one way of supporting authentication. network interactions typically take place between a client, such as browser software running on a personal computer, and a server, such as the software and hardware used to host a web ...
...user's identity. the server determines whether the identified user is permitted to access the requested resource, and if so allows the client to access it. with this arrangement, the user must supply a new password for each server, and the administrator must keep track of the name and password for each user, typically on separate servers. proper implementation does not store passwords in plain
text. instead it concatenates the password with a random per-user value (so called "salt") and stores the hash value of the result along with the salt. this makes certain kinds of brute-force atacks more difficult. as shown in the next section, one of the advantages of certificate-based authentication is that it can be used to replace the first three steps in figure 4 with a mechanism that allows the...
...ns union (itu), an international standards body, since 1988. users don't usually need to be concerned about the exact contents of a certificate. however, system administrators working with certificates may need some familiarity with the information provided here. certificate data formats certificate requests and certificates can be created, stored, and installed in multiple formats: binary and
text. all of these formats conform to x.509 standards. three examples of binary formats are der-encoded certificates, pkcs #7 certificate chains, and netscape certificate sequence. any of the binary formats can be imported in
text form, which begins with the line: -----begin certificate----- following this line is the certificate data, which can be in any of the binary formats described. this data s...
... certificate chain causes authentication to fail. for example, figure 10 shows how verification fails if neither the root ca certificate nor any of the intermediate ca certificates are included in the verifier's local database. for general information about the way digital signatures work, see "digital signatures". for a more detailed description of the signature verification process in the con
text of ssl client and server authentication, see "introduction to ssl." managing certificates certificates are used in many applications, from encrypting email to accessing websites. there are two major stages in the lifecycle of a certificate: the point when it is issued (issuance and enrollment) and the period when the certificates are no longer valid (renewal or revocation). there are also ways ...
Building a Theme - Archive of obsolete content
/chrome/ browser/ communicator/ global/ mozapps/ we'll want to create a file structure similar to the one above for our tutorial, so let's begin by creating a folder for your theme somewhere on your hard disk (e.g. c:\themes\my_theme\ or ~/themes/my_theme/). inside your new theme folder, create two new empty
text files, one called chrome.manifest and the other called install.rdf. the file preview.png is shown as a preview of the theme in the themes panel of the add-ons window. the file icon.png is used as an icon in the same panel. we'll leave both of them out for now, unless you have something picked out that you want to use. the remaining directories will be extracted from the default theme. first, you...
... user actions are bound to functionality using javascript. these xul elements are styled using css. if you don't know css, it's going to be a steep learning curve, and you may want to try some html-based tutorials to start with. the browser ui has absolutely no styling on its own - if you try to start up with an empty theme, firefox will be unusable, as the button elements will be drawn as plain
text. this is why we copied the default styles in the setup step. when writing a theme, the easiest way to determine what css selectors you need to write is to use the dom inspector which you should have installed in the setup step. you can use this to inspect any element in a web page or an xul document, which makes it invaluable for themes. updating the toolbar's styling note in firefox 4.0 and ...
...ut your theme. during the development phase for firefox versions 2.0 and higher, you can point firefox to the folder where you are developing the theme, and it'll load it up every time you restart firefox. locate your profile folder and beneath it the profile you want to work with (e.g. firefox/profiles/<profile_id>.default/). open the extensions/ folder, creating it if need be. create a new
text file and put the full path to your development folder inside (e.g. c:\themes\my_theme\ or ~/themes/my_theme/). windows users should retain the os' slash direction, and everyone should remember to include a closing slash and remove any trailing spaces. save the file with the id of your theme as its name (e.g. sample@example.net). no file extension. now you should be ready to test your theme! s...
...velopment folder inside (e.g. c:\themes\my_theme\ or ~/themes/my_theme/). windows users should retain the os' slash direction, and everyone should remember to include a closing slash and remove any trailing spaces. save the file with the id of your theme as its name (e.g. sample@example.net). no file extension. now you should be ready to test your theme! start firefox. firefox will detect the
text link to your theme directory and install the theme. your theme will not be active the first time you install, and you will need to click "enable" and restart before you can see your change. after it restarts this second time, you should see the background color of the toolbars is displayed in orange now. you can now go back and make additional changes to your css files, close and restart firefox...
::-ms-clear - Archive of obsolete content
the ::-ms-clear css pseudo-element creates a clear button at the edge of an <input type="
text">
text control that clears the current value. this pseudo-element is non-standard, supported only in internet explorer 10, internet explorer 11, and microsoft edge. the clear button is only shown on focused, non-empty
text controls. this includes inputs that appear
text-like or fall back to type="
text". such inputs include: <input type="color"> <input type="date"> <input type="datetime"> <input type="datetime-local"> <input type="email"> <input type="month"> <input type="number"> <input type="search"> <input type="tel"> <input type="time"> <input type="url"> <input type="week"> allowable properties only the following css properties can be used in a rule with ::-ms-clear in...
...*/ /* the cross can be hidden by setting the display attribute as "none" */ } ...
...*/ /* the cross can be hidden by setting the display attribute as "none" */ } result the following screenshot shows what the feature will look like: specifications not part of any specification. ...
...rm transform-origin visibility width syntax ::-ms-clear example html <form> <label for="firstname">first name:</label> <input type="
text" id="firstname" name="firstname" placeholder="first name"> <br> <label for="lastname">last name:</label> <input type="
text" id="lastname" name="lastname" placeholder="second name"> </form> css input, label { display: block; } input[type=
text]::-ms-clear { color: red; /* this sets the cross color as red. */ /* the cross can be hidden by setting the display attribute as "none" */ } result the following screenshot shows what the feature will look like: specifications not part of any specification. ...
Old Proxy API - Archive of obsolete content
ibutes are determined by the given propertydescriptor. the return value of this method is ignored. delete proxy.name delete: function(name) -> boolean delete the named property from the proxy. the boolean return value of this method should indicate whether or not the name property was successfully deleted. ...
...note: the fixed object has the same object identity as the proxy object. if fix() returns undefined, the call throws a typeerror exception. derived traps default implementation refers to the code that is called for that trap when the trap isn't explicitly defined. in these functions, this refers to the handler object. ...
...od default implementation description name in proxy has: function(name) -> boolean function(name) { return !!this.getpropertydescriptor(name); } object.prototype.hasownproperty.call(proxy, name) hasown: function(name) -> boolean function(name) { return !!this.getownpropertydescriptor(name); } proxy.name (in the con
text of "getting the value") receiver.name (if receiver inherits from a proxy and does not override name) get: function(receiver, name) -> any function(receiver, name) { var desc = this.getpropertydescriptor(name); if (desc === undefined) { return undefined; } if ('value' in desc) { return desc.value; } else { if (desc.get === undefined) { return undefi...
...er, name) { var desc = this.getpropertydescriptor(name); if (desc === undefined) { return undefined; } if ('value' in desc) { return desc.value; } else { if (desc.get === undefined) { return undefined; } return desc.get.call(receiver); } } receiver is either the proxy or an object that inherits from the proxy. ...
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
down to styling. here's what one of those bits looks like once all the css has been applied. in order to make the fish cam page as agile as the fish themselves, it was necessary to strip out all of the tables, font tags, and other non-validating stuff. at the end of it, there were a series of div elements that contained a picture of the fish, the name of the fish, and one or more paragraphs of
text about the fish. here's a typical (and short) example. <div class="card"> <img src="thumb_clown_trigger.jpg" alt="clown trigger" border="0" width="150" height="115"> <h3>clown trigger</h3> <p> our clown trigger is a bold little fish, though for a few weeks he slept a lot and didn't look well in general. he's much better now. </p> </div> basically, that's all that was needed. the reason for the...
...rd img {float: left; margin: 4px 0 0 0; border: 1px solid #339;} div.card h3 {border: 1px solid #339; border-left: 5px double #339; background: #eec url(body-bg-tan.jpg) bottom left no-repeat fixed; color: #339;} finishing the style adding the background to the heading containing the name of the fish created three problems: the double border was completely covered up by the image. the
text of the h3 was basically touching the right side of the floated image... ...or it would have been, except in some browsers the heading was drawn over the floated image, in contradiction to the css specification. getting the image back on top of the heading turned out to be a matter of relatively positioning the floated image, and then giving it a z-index value. in order to create visual appeal,...
...div.card h3 {margin: 0 0 0 4px; padding: 0.2em 0 1px 150px; border: 1px solid #339; border-left: 5px double #339; background: #eec url(body-bg-tan.jpg) bottom left no-repeat fixed; color: #339;} note how the image is pushed downward four pixels, while the h3 is pushed rightward four pixels. at the same time, the heading's padding was set to that it had 150 pixels of left padding. thus, the
text starts 159 pixels from the leftmost edge of the card (4px left margin plus 5px left border plus 150px left padding). since all the fish images are 150 pixels wide, that's a good interval between image and
text. the last thing to do was style the paragraphs of
text in each card. in most cases, there is only one paragraph per card, but a few have two. therefore, i just added a half-em margins on c...
...t border plus 150px left padding). since all the fish images are 150 pixels wide, that's a good interval between image and
text. the last thing to do was style the paragraphs of
text in each card. in most cases, there is only one paragraph per card, but a few have two. therefore, i just added a half-em margins on card paragraphs, and then changed the left margin to be 160px, which makes sure the
text in the paragraphs won't wrap under the floated images. this is desirable for the cases where only one word would wrap under an image. it's better to keep the
text as if it's in a column of its own. div.card {float: left; width: 45%; margin: 1em 2% 0 2%;} div.card img {float: left; position: relative; z-index: 10; margin: 4px 0 0 0; border: 1px solid #339;} div.card h3 {margin: 0 0 0 4px; paddi...
XForms Custom Controls - Archive of obsolete content
ntvalue() should return the current value of the control as seen by a user. the current value of a control could differ from the value of the bound node in cases where @incremental='false'. disable() is called by the xforms processor to indicate to a submit element that it needs to disable/enable due to the beginning/ending of the submission process. currently it has no meaning outside of this con
text. focus() is used by the processor to tell the control that it is getting focus through one of a variety of ways (i.e. through xf:setfocus action) and that the control needs to ensure that the proper widget is given focus. with rare exception, your control should only need to implement the nsixformsuiwidget interface. but certain xforms controls need to implement additional interfaces. such eleme...
...*/ boolean hasboundnode(); /** * return the bound instance node. */ nsidomnode getboundnode(); /** * set the content of the instance node. if aforceupdate is true then the * xforms model will rebuild/recalculate/revalidate/refresh. */ void setcontent(in nsidomnode anode, in boolean aforceupdate); } note: setcontent() can be used to set place complexcontent (mixture of
text and element nodes) under the control's bound node. please see the comments in the source .idl file for more information on using this method. xbl bindings most xforms control elements have at least two bindings applied to themselves. one is the base binding that implements the core behavior of the xforms control. the other is the implementation binding that adds the host-language specific represe...
...ontrolfile-xul.xml contains the implementation bindings for when this control is hosted in a xul document. the following list shows where the base bindings for our xforms controls are defined: xforms.xml - contains the base bindings for output, label, trigger, submit, case, message, hint, help, alert, upload and repeat xforms controls. input.xml - contains the base bindings for input, secret and
textarea xforms controls. select.xml - contains the base bindings for select and select1 xforms controls (except minimal/default select1 that is hosted in select1.xml file) range.xml - contains the base bindings for the range xforms control. xforms.xml also defines the few base bindings that are common for all xforms controls. these are: xformswidget-general - defines utility properties and methods ...
...g></curimg> <img label="firefox">http://www.mozilla.com/images/firefox-logo-64x64.png</img> <img label="thunderbird">http://www.mozilla.com/images/thunderbird-logo-64x64.png</img> <img label="bugzilla">http://www.mozilla.org/images/p-bugz.gif</img> <img label="mozilla">http://www.mozilla.org/images/mozhead-80x64.gif</img> </data> </xf:instance> </xf:model> <style type="
text/css"> @namespace xf url(http://www.w3.org/2002/xforms); xf|output[mediatype="image/*"] { -moz-binding: url('#output-image'); } </style> </head> <body> <h1>custom control sample</h1> <xf:select1 ref="curimg"> <xf:label>select image to display: </xf:label> <xf:itemset nodeset="../img"> <xf:label ref="@label"/> <xf:value ref="."/> </xf:...
Building up a basic demo with PlayCanvas editor - Game development
here's how the scene looks initially in the editor. even though it's a blank new project we don't have to start entirely from scratch — the camera and directional light are prepared already, so you don't have to worry about them. now onto the creative part. to add an entity to the scene you have to click on the big plus button located in the top left area of the editor, next to the hierarchy
text. when hovering over that button with your mouse the label will say 'add entity' — that's exactly what we want to do. an entity is any object used in the scene — it cna be an object like a box, cylinder or cone, but it can also be a camera, light or sound source. after clicking the button you'll see a dropdown list containing a lot of various entities to choose from. go ahead and click box —...
...n the right panel. to add some colors to the scene we need a new material that will be used on the newly created box. click on the plus button in the assets tab, and click on the material option in the dropdown list that appears to create a new material. click on your new material in the assets tab and its entity inspector will appear on the right hand side of the display. ...
... note: yes, you read that right — you need to enter the hex value without the hash/pound symbol. ...
...his material is for — we will add more later! to change its color we'll use the diffuse option in the entity inspector. click diffuse, then select the colored box next to the color label — it will open a color wheel. from here you can click your desired color or enter it in the bottom
text field as a hex value. we've chosen a blue color with a hex value of 0095dd — enter this code in the
text field and press return for it to be accepted. note: yes, you read that right — you need to enter the hex value without the hash/pound symbol. now we can apply the colored material to the shape by clicking and dragging its icon from the bottom part of the screen (the little dot on the left hand side of the material's name — it can be a bit fiddly to select; just persevere) onto the box o...
The score - Game development
the gamedev phaser tutorial. you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson11.html. having a score can also make the game more interesting — you can try to beat your own highscore, or your friend's. in this article we'll add a scoring system to our game. ...
...esson11.html. having a score can also make the game more interesting — you can try to beat your own highscore, or your friend's. in this article we'll add a scoring system to our game. we will use a separate variable for storing the score and phaser's
text() method to print it out onto the screen. new variables add two new variables right after the previously defined ones: // ... var score
text; var score = 0; adding score
text to the game display now add this line at the end of the create() function: score
text = game.add.
text(5, 5, 'points: 0', { font: '18px arial', fill: '#0095dd' }); the
text() method can take four parameters: the x and y coordinates to draw the
text at. the actual
text that will be rendered. the font style to render the
text with. the last parameter loo...
...ay now add this line at the end of the create() function: score
text = game.add.
text(5, 5, 'points: 0', { font: '18px arial', fill: '#0095dd' }); the
text() method can take four parameters: the x and y coordinates to draw the
text at. the actual
text that will be rendered. the font style to render the
text with. the last parameter looks very similar to css styling. in our case the score
text will be blue, sized at 18 pixels, and use the arial font. updating the score when bricks are destroyed we will increase the number of points every time the ball hits a brick and update the score
text to display the current score. ...
...l be rendered. the font style to render the
text with. the last parameter looks very similar to css styling. in our case the score
text will be blue, sized at 18 pixels, and use the arial font. updating the score when bricks are destroyed we will increase the number of points every time the ball hits a brick and update the score
text to display the current score. this can be done using the set
text() method — add the two new lines seen below to the ballhitbrick() function: function ballhitbrick(ball, brick) { brick.kill(); score += 10; score
text.set
text('points: '+score); } that's it for now — reload your index.html and check that the score updates on every brick hit. compare your code you can check the finished code for this lesson in the live demo below, and play with...
2D maze game with device orientation - Game development
}, startgame: function() { this.game.state.start('howto'); } }; to create a new button there's add.button method with the following list of optional arguments: top absolute position on canvas in pixels. left absolute position on canvas in pixels. name of the image asset the button is using. function that will be executed when someone clicks the button. the execution con
text. frame from the image asset used as the button's "hover" state. frame from the image asset used as the button's "normal" or "out" state. frame from the image asset used as the button's "click" or "down" state. the anchor.set is setting up the anchor point on the button for which all the calculations of the position are applied. in our case it's anchored half the way from the left edge and at...
...n time. to implement this we have to create a variable for storing the actual number of seconds elapsed from the start of the game, and to show it for the player in the game. let’s define the variables in the create function first: this.timer = 0; // time elapsed in the current level this.totaltimer = 0; // time elapsed in the whole game then, right after that, we can initialize the necessary
text objects to display this information to the user: this.timer
text = this.game.add.
text(15, 15, "time: "+this.timer, this.fontbig); this.totaltime
text = this.game.add.
text(120, 30, "total time: "+this.totaltimer, this.fontsmall); we’re defining the top and left positions of the
text, the content that will be shown and the styling applied to the
text. we have this printed out on the screen, but i...
...ood to update the values every second: this.time.events.loop(phaser.timer.second, this.updatecounter, this); this loop, also in the create function, will execute the updatecounter function every single second from the beginning of the game, so we can apply the changes accordingly. this is how the complete updatecounter function looks: updatecounter: function() { this.timer++; this.timer
text.set
text("time: "+this.timer); this.totaltime
text.set
text("total time: "+(this.totaltimer+this.timer)); }, as you can see we’re incrementing the this.timer variable and updating the content of the
text objects with the current values on each iteration, so the player sees the elapsed time. finishing the level and the game the ball is rolling on the screen, the timer is working and we have ...
...is.level >= this.maxlevels) { this.totaltimer += this.timer; alert('congratulations, game completed!\ntotal time of play: '+this.totaltimer+' seconds!'); this.game.state.start('mainmenu'); } else { alert('congratulations, level '+this.level+' completed!'); this.totaltimer += this.timer; this.timer = 0; this.level++; this.timer
text.set
text("time: "+this.timer); this.totaltime
text.set
text("total time: "+this.totaltimer); this.level
text.set
text("level: "+this.level+" / "+this.maxlevels); this.ball.body.x = this.ballstartpos.x; this.ball.body.y = this.ballstartpos.y; this.ball.body.velocity.x = 0; this.ball.body.velocity.y = 0; this.showlevel(); } }, if the current l...
Visual typescript game engine - Game development
luanch debugger configuration comes with this project. physics engine based on matter.js. multiplatform video chat (for all browsers) implemented. socketio used for session staff. multirtc2 used for data transfer also for video chat. multirtc3 alias 'broadcaster' used for video chat. ...
..."frame"; /** * aspectratio default value, can be changed in run time. */ private aspectratio: number = 1.333; /** * domain is simple url address, * recommendent to use for local propose lan ip * like : 192.168.0.xxx if you wanna run ant test app with server. */ private domain: string = "maximumroulette.com"; /** * networkdeeplogs control of dev logs for webrtc con
text only. */ private networkdeeplogs: boolean = false; /** * masterserverkey is channel access id used to connect * multimedia server channel. */ private masterserverkey: string = "multi-platformer-sever1.maximum"; /** * rtcserverport port used to connect multimedia server. * default value is 12034 */ private rtcserverport: number = 12034; /** * connectorport is...
... | | ├── linkify.js | | | | | ├── gethtmlmediaelement.js | | | | | ├── socket.io.js | | | | ├── broadcaster-media.ts | | | | ├── broadcaster.ts | | | | ├── connector.ts | | | | ├── network.ts | | | ├── visual-methods/ | | | | ├── sprite-animation.ts | | | | ├──
text.ts | | | | ├──
texture.ts | | | ├── browser.ts | | | ├── math.ts | | | ├── position.ts | | | ├── resources.ts | | | ├── sound.ts | | | ├── system.ts | | | ├── view-port.ts | | | ├── visual-render.ts | | ├── interface/ | | | ├── drawi.ts | | | ├── global.t...
...ver looks like this : mongod --dbpath ./server/database/data fix: "failed: address already in use" : netstat -ano | findstr :27017 taskkill /pid typeyourpidhere /f also important "run visual studio code as administrator". - a command for killing all node.js process for window users : taskkill /im node.exe /f networking multimedia communication: websocketserver running on node.js
text-based protocol sip (session initiation protocol) used for signalling and controlling multimedia sessions. general networking config: config property defined in constructor from serverconfig class. this.networkdeeplogs = false; this.rtcserverport = 12034; this.rtc3serverport = 12034; this.connectorport = 1234; this.domain = "192.168.0.14"; this.masterserverkey = "multi-p...
Input method editor - MDN Web Docs Glossary: Definitions of Web-related terms
an input method editor (ime) is a program that provides a specialized user interface for
text input. ...
... an input method editor (ime) is a program that provides a specialized user interface for
text input. ...
... an input method editor (ime) is a program that provides a specialized user interface for
text input. ...
... an input method editor (ime) is a program that provides a specialized user interface for
text input. ...
Texel - MDN Web Docs Glossary: Definitions of Web-related terms
a texel is a single-pixel within a
texture map, which is an image that gets used (in whole or in part) as the image presented on a polygon's surface within a 3d rendered image. it is not to be confused with pixel which is the unit of screen space. this is one of the main differences between texel’s and pixels, pixels are image data. texel components are made up of subjective data, therefore they can be an image as well as a depth map. the process of mapping the appropriate texel’s to their corresponding points on a polygon is called
texture mapping, which is a stage of the process of rendering a 3d image for display. ...
... of screen space. this is one of the main differences between texel’s and pixels, pixels are image data. texel components are made up of subjective data, therefore they can be an image as well as a depth map. the process of mapping the appropriate texel’s to their corresponding points on a polygon is called
texture mapping, which is a stage of the process of rendering a 3d image for display.
texture mapping is typically done prior to lighting the scene; however, in webgl, lighting is performed as part of the
texture mapping process.
textures are characterised by collections of texel’s, as how images are characterised by collections of pixels. when
texture mapping occurs the renderer maps texel’s to the appropriate pixels. learn more general knowledge texel (graphics) on wikipedi...
...e prior to lighting the scene; however, in webgl, lighting is performed as part of the
texture mapping process.
textures are characterised by collections of texel’s, as how images are characterised by collections of pixels. when
texture mapping occurs the renderer maps texel’s to the appropriate pixels. ...
..., lighting is performed as part of the
texture mapping process.
textures are characterised by collections of texel’s, as how images are characterised by collections of pixels. when
texture mapping occurs the renderer maps texel’s to the appropriate pixels. ...
caret - MDN Web Docs Glossary: Definitions of Web-related terms
a caret (sometimes called a "
text cursor") is an indicator displayed on the screen to indicate where
text input will be inserted. most user interfaces represent the caret using a thin vertical line or a character-sized box that flashes, but this can vary. this point in the
text is called the insertion point. the word "caret" differentiates the
text insertion point from the mouse cursor. on the web, a caret is used to represent the insertion point in <input> and <
textarea> elements, as well as any elements whose contenteditable attribute is set, thereby allowing the contents of the element to be edited by the user. learn more general knowledge caret navigation on wikipedia css related to the caret you can set the color of the caret for a given element's editable content by sett...
...ribute is set, thereby allowing the contents of the element to be edited by the user. learn more general knowledge caret navigation on wikipedia css related to the caret you can set the color of the caret for a given element's editable content by setting the element's css caret-color property to the appropriate <color> value. ...
...user. learn more general knowledge caret navigation on wikipedia css related to the caret you can set the color of the caret for a given element's editable content by setting the element's css caret-color property to the appropriate <color> value. html elements that may present a caret these elements provide
text entry fields or boxes and therefore make use of the caret. ...
... that may present a caret these elements provide
text entry fields or boxes and therefore make use of the caret. ...
Assessment: Accessibility troubleshooting - Learn web development
help — see the assessment or further help section at the bottom of this page. project brief for this project, you are presented with a fictional nature site displaying a "factual" article about bears. as it stands, it has a number of accessibility issues — your task is to explore the existing site and fix them to the best of your abilities, answering the questions given below. ...
...ct, you are presented with a fictional nature site displaying a "factual" article about bears. as it stands, it has a number of accessibility issues — your task is to explore the existing site and fix them to the best of your abilities, answering the questions given below. color the
text is difficult to read because of the current color scheme. ...
...which one should it be updated to? make the update. ...
... player isn't accessible to hearing impaired (deaf) people — can you add some kind of accessible alternative for these users? the <audio> player isn't accessible to those using older browsers that don't support html5 audio. how can you allow them to still access the audio? the forms the <input> element in the search form at the top could do with a label, but we don't want to add a visible
text label that would potentially spoil the design and isn't really needed by sighted users. how can you add a label that is only accessible to screenreaders? the two <input> elements in the comment form have visible
text labels, but they are not unambiguously associated with their labels — how do you achieve this? note that you'll need to update some of the css rule as well. the show/hide commen...
Backgrounds and borders - Learn web development
ground image shorthand values, for example: a background-color may only be specified after the final comma. the value of background-size may only be included immediately after background-position, separated with the '/' character, like this: center/80%. take a look at the mdn page for background to see all of the considerations. accessibility considerations with backgrounds when placing
text on top of a background image or color, you should take care that you have enough contrast for the
text to be legible for your visitors. if specifying an image, and
text will be placed on top of that image, you should also specify a background-color that will allow the
text to be legible if the image does not load. screen readers cannot parse background images, therefore they should be purely dec...
...hese shorthands would be: .box { border-width: 1px; border-style: solid; border-color: black; } and for the longhands: .box { border-top-width: 1px; border-top-style: solid; border-top-color: black; } note: these top, right, bottom, and left border properties also have mapped logical properties that relate to the writing mode of the document (e.g. left-to-right or right-to-left
text, or top-to-bottom). we'll be exploring these in the next lesson, which covers handling different
text directions. there are a variety of styles that you can use for borders. in the example below we have used a different border style for the four sides of my box. play with the border style, width, and color to see how borders work. rounded corners rounding corners on a box is achieved by usi...
...hat there is quite a lot to adding a background or a border to a box. do explore the different property pages if you want to find out more about any of the features we have discussed. each page on mdn has more examples of usage for you to play with and enhance your knowledge. in the next lesson, we will find out how the writing mode of your document interacts with your css. ...
...writing mode of your document interacts with your css. ...
Overflowing content - Learn web development
blem! instead, css overflows in visible ways. you are more likely to see there is a problem. at worst, a site visitor will let you know that content is overlapping. if you restrict a box with a width or a height, css trusts you to know what you are doing. css assumes that you are managing the potential for overflow. in general, restricting the block dimension is problematic when the box contains
text. there may be more
text than you expected when designing the site, or the
text may be larger. (for example, if the user has increased their font size) the next two lessons explain different approaches to control sizing in ways that are less prone to overflow. however, if you need a fixed size, you can also control how the overflow behaves. let's read on! the overflow property the overflow pro...
... hidden would set overflow-x to scroll and overflow-y to hidden. if you only want scrollbars to appear when there is more content than can fit in the box, use overflow: auto. this allows the browser to determine if it should display scrollbars. in the example below, remove content until it fits into the box. you should see the scrollbars disappear. overflow establishes a block formatting con
text when you use a value of overflow such as scroll or auto, you create a block formatting con
text (bfc). the content of the box that you have changed the value of overflow for acquires a self-contained layout. content outside the container cannot poke into the container, and nothing can poke out of that container into the surrounding layout. this enables scrolling behavior, as all box content needs...
...h other. this was fragile. in a legacy application, you may encounter a box where content is overlaying other content on the page. now you can recognize that this happens with overflow. ideally, you will refactor the layout to not rely on fixed-height containers. when developing a site, always keep overflow in mind. test designs with large and small amounts of content. increase the font sizes of
text. generally ensure that your css works in a robust way. changing the value of overflow to hide content, or to add scrollbars, is likely to be reserved for a few select use cases. (for example, where you intend to have a scrolling box) test your skills! there is a lot to absorb from this lesson! can you remember the most important information? to check your understanding, see test your skills: ov...
...ial overflow, and also, that you should test work to make sure it does not accidentally cause problematic overflow. ...
Sizing items in CSS - Learn web development
a line on the page. this is the collapsed border on the element — there is no content to hold it open. in our example below, that border stretches to the width of the container, because it is a block level element, a behavior that should be starting to become familiar to you. it has no height (or size in the block dimension) because there is no content. in the example above, try adding some
text inside the empty element. the border now contains that
text because the height of the element is defined by the content. therefore the size of this <div> in the block dimension comes from the size of the content. again, this is the intrinsic size of the element — its size is defined by its content. setting a specific size we can of course give elements in our design a specific size. when a si...
...rowser you are using to view a site — also has a size. in css we have units which relate to the size of the viewport — the vw unit for viewport width, and vh for viewport height. using these units you can size something relative to the viewport of the user. 1vh is equal to 1% of the viewport height, and 1vw is equal to 1% of the viewport width. you can use these units to size boxes, but also
text. in the example below we have a box which is sized as 20vh and 20vw. the box contains a letter a, which has been given a font-size of 10vh. if you change the vh and vw values this will change the size of the box or font; changing the viewport size will also change their sizes because they are sized relative to the viewport. to see the example change when you change the viewport size you will n...
...size will also change their sizes because they are sized relative to the viewport. to see the example change when you change the viewport size you will need to load the example in a new browser window that you can resize (as the embedded <iframe> that contains the example shown above is its viewport). open the example, resize the browser window, and observe what happens to the size of the box and
text. sizing things according to the viewport can be useful in your designs. for example, if you want a full-page hero section to show before the rest of your content, making that part of your page 100vh high will push the rest of the content below the viewport, meaning that it will only appear once the document is scrolled. test your skills! we have covered a lot in this article, but can you remem...
...portant in mastering the different layout methods, so it is worth understanding the concepts here before moving on. ...
Test your skills: floats - Learn web development
teractive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks. if you get stuck, then ask us for help — see the assessment or further help section at the bottom of this page. floats one in this task you need to float the two elements with a class of float1 and float2 left and right respectively. ...
...you can see the desired result in this image. try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor. ...
...ge below. try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor. float two in this example the element with a class of float should be floated left. then we want the first line of
text to display next to that element, but the following line of
text (which has a class of .below) to display underneath it. you can see the desired result in this image. try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor. float three finally, we have a floated element in this example. the box wrapping the f...
...as a class of .below) to display underneath it. you can see the desired result in this image. try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor. float three finally, we have a floated element in this example. the box wrapping the float and
text is displaying behind the float. use the most up to date method available to cause the box background to extend to below the float as in the image. try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor. assessment or further help you can practi...
How CSS works - Learn web development
(this intermediate step is called a render tree). the render tree is laid out in the structure it should appear in after the rules have been applied to it. the visual display of the page is shown on the screen (this stage is called painting). the following diagram also offers a simple view of the process. about the dom a dom has a tree-like structure. each element, attribute, and piece of
text in the markup language becomes a dom node in the tree structure. the nodes are defined by their relationship to other dom nodes. some elements are parents of child nodes, and child nodes have siblings. understanding the dom helps you design, debug and maintain your css because the dom is where your css and the document's content meet up. when you start working with browser devtools you will be n...
...items in order to see which rules apply. a real dom representation rather than a long, boring explanation, let's look at an example to see how a real html snippet is converted into a dom. take the following html code: <p> let's use: <span>cascading</span> <span>style</span> <span>sheets</span> </p> in the dom, the node corresponding to our <p> element is a parent. ...
...n, let's look at an example to see how a real html snippet is converted into a dom. take the following html code: <p> let's use: <span>cascading</span> <span>style</span> <span>sheets</span> </p> in the dom, the node corresponding to our <p> element is a parent. its children are a
text node and the three nodes corresponding to our <span> elements. the span nodes are also parents, with
text nodes as their children: p ├─ "let's use:" ├─ span | └─ "cascading" ├─ span | └─ "style" └─ span └─ "sheets" this is how a browser interprets the previous html snippet —it renders the above dom tree and then outputs it in the browser like so: p {margin:0;} applying css to the dom let's say we added some css to our document, to style it. again, the html...
...a browser encounters a selector that it doesn't understand, it will just ignore the whole rule and move on to the next one. in the example below i have used the british english spelling for color, which makes that property invalid as it is not recognised. so my paragraph has not been colored blue. all of the other css have been applied however; only the invalid line is ignored. <p> i want this
text to be large, bold and blue.</p> p { font-weight: bold; colour: blue; /* incorrect spelling of the color property */ font-size: 200%; } this behavior is very useful. it means that you can use new css as an enhancement, knowing that no error will occur if it is not understood — the browser will either get the new feature or not. coupled with the way that the cascade works, and the fact...
What is CSS? - Learn web development
prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, and html basics (study introduction to html.) objective: to learn what css is. in the introduction to html module we covered what html is, and how it is used to mark up documents. these documents will be readable in a web browser. headings will look larger than regular
text, paragraphs break onto a new line and have space between them. links are colored and underlined to distinguish them from the rest of the
text. what you are seeing is the browser's default styles — very basic styles that the browser applies to html to make sure it will be basically readable even if no explicit styling is specified by the author of the page. however, the web would be a boring ...
... looked like that. using css you can control exactly how html elements look in the browser, presenting your markup using whatever design you like. for more on browser/default styles, check out the following video: what is css for? as we have mentioned before, css is a language for specifying how documents are presented to users — how they are styled, laid out, etc. a document is usually a
text file structured using a markup language — html is the most common markup language, but you may also come across other markup languages such as svg or xml. presenting a document to a user means converting it into a form usable by your audience. browsers, like firefox, chrome, or edge , are designed to present documents visually, for example, on a computer screen, projector or printer. note: a...
...ser is sometimes called a user agent, which basically means a computer program that represents a person inside a computer system. browsers are the main type of user agent we think of when talking about css, however, it is not the only one. there are other user agents available — such as those which convert html and css documents into pdfs to be printed. css can be used for very basic document
text styling — for example changing the color and size of headings and links. it can be used to create layout — for example turning a single column of
text into a layout with a main content area and a sidebar for related information. it can even be used for effects such as animation. have a look at the links in this paragraph for specific examples. css syntax css is a rule-based language — you...
...sidebar for related information. it can even be used for effects such as animation. have a look at the links in this paragraph for specific examples. css syntax css is a rule-based language — you define rules specifying groups of styles that should be applied to particular elements or groups of elements on your web page. for example "i want the main heading on my page to be shown as large red
text." the following code shows a very simple css rule that would achieve the styling described above: h1 { color: red; font-size: 5em; } the rule opens with a selector . this selects the html element that we are going to style. in this case we are styling level one headings (<h1>). we then have a set of curly braces { }. inside those will be one or more declarations, which take the form o...
HTML forms in legacy browsers - Learn web development
neither the browser nor the os can be updated such as on older android phones or iphones, the stock browsers that don't update are also legacy browsers. dealing with this wilderness is part of the job. fortunately, there are a few tricks to know that can help you to solve most of the problems caused by legacy browsers. and html5 <input> types don't fail when not supported: they fall back to type=
text. learn about the issues to understand common patterns, it helps to read browser documentation. if you are reading this on mdn, you are at the right place to start. just check the support of the elements (or dom interface) you want to use. mdn has compatibility tables available for most elements, properties and apis that can be used in a web page. there are other resources that can be amazingly ...
...ork, one way or another, on legacy browsers, you are performing graceful degradation. let's see some examples related to html forms. html input types the input types added in html5 are all useable, even in ancient browsers, because the way they degrade is highly predictable. if a browser does not know the value of the type attribute of an <input> element, it will fall back as if the value were
text. <label for="mycolor"> pick a color <input type="color" id="mycolor" name="color"> </label> supported not supported form buttons there are two ways to define buttons within html forms: the <input> element with its attribute type set to the values button, submit, reset or image the <button> element <input> the <input> element can make things a li...
...and firefox browser, but the color picker widget is the same in all browsers on a device as it opens up the operating system's native color picker. it's generally a good idea to not alter the default appearance of form control because altering one css property value may alter some input types but not others. for example, if you declare input { font-size: 2rem; }, it will impact number, date, and
text, but not color or range. if you alter a property, that may impact the appearance of the widget in unexpected ways. for example, [value] { background-color: #ccc; } may have been used to target every <input> with a value attribute, but changing the background-color or border radius on a <meter> will lead to likely unexpected results that differ across browsers. you can declare appearance: none; to...
...e: as you lose all styling, removing the default look and feel your visitors are used to. to summarize, when it comes to styling form control widgets, the side effects of styling them with css can be unpredictable. so don't. as you can see from the complexity of the property compatibility table for form widgets article, it's very difficult. even if it's still possible to do a few adjustments on
text elements (such as sizing or font color), there are always side effects. the best approach remains to not style html form widgets at all. but you can still apply styles to all the surrounding items. and, if you must alter the default styles of your form widgets, define a style guide to ensure consistency among all your form controls so user experience is not destroyed. you can also investigate som...
Add a hitmap on top of an image - Learn web development
have a mouse. image maps, and their drawbacks when you nest an image inside <a>, the entire image links to one webpage. an image map, on the other hand, contains several active regions (called "hotspots") that each link to a different resource. formerly, image maps were a popular navigation device, but it’s important to thoroughly consider their performance and accessibility ramifications.
text links (perhaps styled with css) are preferable to image maps for several reasons:
text links are lightweight, maintainable, often more seo-friendly, and support accessibility needs (e.g., screen readers,
text-only browsers, translation services). how to insert an image map, properly step 1: the image not just any image is acceptable. the image must make it clear what happens when people fol...
... the image must clearly indicate where hotspots begin and end. hotspots must be large enough to tap comfortably, at any viewport size. how large is large enough? 72 × 72 css pixels is a good minimum, with additional generous gaps between touch targets. ...
..., at any viewport size. how large is large enough? 72 × 72 css pixels is a good minimum, with additional generous gaps between touch targets. the map of the world at 50languages.com (as of time of writing) illustrates the problem perfectly. it’s much easier to tap russia or north america than albania or estonia. you insert your image much the same way as always (with an <img> element and alt
text). if the image is only present as a navigation device, you may write alt="", provided you furnish appropriate alt
text in the <area> elements later on. you will need a special usemap attribute. come up with a unique name, containing no spaces, for your image map. then assign that name (preceded by a hash) as the value for the usemap attribute: <img src="image-map.png" alt="" usemap="#exam...
...corner (so, at least six values). coordinates are given in css pixels. in case of overlap, source order carries the day. href the url of the resource you’re linking to. you may leave this attribute blank if you don’t want the current area to link anywhere (say, if you’re making a hollow circle.) alt a mandatory attribute, telling people where the link goes or what it does. alt
text only displays when the image is unavailable. please refer to our guidelines for writing accessible link
text. you may write alt="" if the href attribute is blank and the entire image already has an alt attribute. <map name="example-map-1"> <area shape="circle" coords="200,250,25" href="page-2.html" alt="circle example" /> <area shape="rect" coords="10, 5, 20, 15" href="page-3.
Introduction to HTML - Learn web development
this module will introduce the first two of these and introduce fundamental concepts and syntax you need to know to understand html. looking to become a front-end web developer? we have put together a course that includes all the essential information you need to work towards your goal. ...
...at’s in the head? metadata in html the head of an html document is the part that is not displayed in the web browser when the page is loaded. it contains information such as the page <title>, links to css (if you want to style your html content with css), links to custom favicons, and metadata (data about the html, such as who wrote it, and important keywords that describe the document). html
text fundamentals one of html's main jobs is to give
text meaning (also known as semantics), so that the browser knows how to display it correctly. this article looks at how to use html to break up a block of
text into a structure of headings and paragraphs, add emphasis/importance to words, create lists, and more. creating hyperlinks hyperlinks are really important — they are what makes the web ...
...nows how to display it correctly. this article looks at how to use html to break up a block of
text into a structure of headings and paragraphs, add emphasis/importance to words, create lists, and more. creating hyperlinks hyperlinks are really important — they are what makes the web a web. this article shows the syntax required to make a link and discusses best practices for links. advanced
text formatting there are many other elements in html for formatting
text that we didn't get to in the html
text fundamentals article. the elements here are less well-known, but still useful to know about. in this article, you'll learn about marking up quotations, description lists, computer code and other related
text, subscript and superscript, contact information, and more. document and website s...
...iting html is fine, but what if something goes wrong, and you can't work out where the error in the code is? this article will introduce you to some tools that can help. assessments the following assessments will test your understanding of the html basics covered in the guides above. marking up a letter we all learn to write a letter sooner or later; it is also a useful example to test out
text formatting skills. in this assessment, you'll be given a letter to mark up. structuring a page of content this assessment tests your ability to use html to structure a simple page of content, containing a header, a footer, a navigation menu, main content, and a sidebar. ...
Making asynchronous programming easier with async and await - Learn web development
the new version shown below. ...
...g this to async/await (see live demo and source code), this now looks like so: async function fetchanddecode(url, type) { let response = await fetch(url); let content; if (!response.ok) { throw new error(`http error! ...
...atus: ${response.status}`); } else { if(type === 'blob') { content = await response.blob(); } else if(type === '
text') { content = await response.
text(); } return content; } } async function displaycontent() { let coffee = fetchanddecode('coffee.jpg', 'blob'); let tea = fetchanddecode('tea.jpg', 'blob'); let description = fetchanddecode('description.txt', '
text'); let values = await promise.all([coffee, tea, description]); let objecturl1 = url.createobjecturl(values[0]); let objecturl2 = url.createobjecturl(values[1]); let desc
text = values[2]; let image1 = document.createelement('img'); let image2 = document.createelement('img'); image1.src = objecturl1; image2.src = objecturl2; document.body.appendchild(image1); document.body.ap...
... let objecturl1 = url.createobjecturl(values[0]); let objecturl2 = url.createobjecturl(values[1]); let desc
text = values[2]; let image1 = document.createelement('img'); let image2 = document.createelement('img'); image1.src = objecturl1; image2.src = objecturl2; document.body.appendchild(image1); document.body.appendchild(image2); let para = document.createelement('p'); para.
textcontent = desc
text; document.body.appendchild(para); } displaycontent() .catch((e) => console.log(e) ); you'll see that the fetchanddecode() function has been converted easily into an async function with just a few changes. see the promise.all() line: let values = await promise.all([coffee, tea, description]); by using await here we are able to get all the results of the three promises ret...
Introducing asynchronous JavaScript - Learn web development
unctionality we have looked at in previous learning area modules is synchronous — you run some code, and the result is returned as soon as the browser can do so. let's look at a simple example (see it live here, and see the source): const btn = document.queryselector('button'); btn.addeventlistener('click', () => { alert('you clicked me!'); let pelem = document.createelement('p'); pelem.
textcontent = 'this is a newly-added paragraph.'; document.body.appendchild(pelem); }); in this block, the lines are executed one after the other: we grab a reference to a <button> element that is already available in the dom. we add a click event listener to it so that when the button is clicked: an alert() message appears. once the alert is dismissed, we create a <p> element. we ...
... a newly-added paragraph.'; document.body.appendchild(pelem); }); in this block, the lines are executed one after the other: we grab a reference to a <button> element that is already available in the dom. we add a click event listener to it so that when the button is clicked: an alert() message appears. once the alert is dismissed, we create a <p> element. we then give it some
text content. finally, we append the paragraph to the document body. while each operation is being processed, nothing else can happen — rendering is paused. this is because as we said in the previous article, javascript is single threaded. only one thing can happen at a time, on a single main thread, and everything else is blocked until an operation completes. so in the example above, aft...
...hing of interest has happened. using callbacks is slightly old-fashioned now, but you'll still see them in use in a number of older-but-still-commonly-used apis. an example of an async callback is the second parameter of the addeventlistener() method (as we saw in action above): btn.addeventlistener('click', () => { alert('you clicked me!'); let pelem = document.createelement('p'); pelem.
textcontent = 'this is a newly-added paragraph.'; document.body.appendchild(pelem); }); the first parameter is the type of event to be listened for, and the second parameter is a callback function that is invoked when the event is fired. when we pass a callback function as an argument to another function, we are only passing the function's reference as an argument, i.e, the callback function is no...
...rce (using the onload event handler) before it passes it to the callback. callbacks are versatile — not only do they allow you to control the order in which functions are run and what data is passed between them, they also allow you to pass data to different functions depending on circumstance. so you could have different actions to run on the response downloaded, such as processjson(), display
text(), etc. note that not all callbacks are async — some run synchronously. an example is when we use array.prototype.foreach() to loop through the items in an array (see it live, and the source): const gods = ['apollo', 'artemis', 'ares', 'zeus']; gods.foreach(function (eachname, index){ console.log(index + '. ' + eachname); }); in this example we loop through an array of greek gods and prin...
Object building practice - Learn web development
ice in building custom javascript objects, with a fun and colorful result. prerequisites: basic computer literacy, a basic understanding of html and css, familiarity with javascript basics (see first steps and building blocks) and oojs basics (see introduction to objects). objective: to get some practice with using objects and object-oriented techniques in a real world con
text. let's bounce some balls in this article we will write a classic "bouncing balls" demo, to show you how useful objects can be in javascript. our little balls will bounce around on the screen, and change color when they touch each other. the finished example will look a little something like this: this example will make use of the canvas api for drawing the balls to the screen, and t...
... styles, which mainly serve to style and position the <h1>, and get rid of any scrollbars or margin around the edge of the page (so that it looks nice and neat). some javascript that serves to set up the <canvas> element and provide a general function that we're going to use. the first part of the script looks like so: const canvas = document.queryselector('canvas'); const ctx = canvas.getcon
text('2d'); const width = canvas.width = window.innerwidth; const height = canvas.height = window.innerheight; this script gets a reference to the <canvas> element, then calls the getcon
text() method on it to give us a con
text on which we can start to draw. the resulting constant (ctx) is the object that directly represents the drawing area of the canvas and allows us to draw 2d shapes on it. next,...
...ually do something in our program. drawing the ball first add the following draw() method to the ball()'s prototype: ball.prototype.draw = function() { ctx.beginpath(); ctx.fillstyle = this.color; ctx.arc(this.x, this.y, this.size, 0, 2 * math.pi); ctx.fill(); } using this function, we can tell the ball to draw itself onto the screen, by calling a series of members of the 2d canvas con
text we defined earlier (ctx). the con
text is like the paper, and now we want to command our pen to draw something on it: first, we use beginpath() to state that we want to draw a shape on the paper. next, we use fillstyle to define what color we want the shape to be — we set it to our ball's color property. next, we use the arc() method to trace an arc shape on the paper. its parameters are: ...
... that's it for object articles — all that remains now is for you to test your skills in the object assessment. ...
Aprender y obtener ayuda - Learn web development
er to fix problem c! it isn't always this simple, but it is also surprising how many times this does happen. this also highlights the importance of taking regular breaks when you are studying in front of the computer. different learning materials it is also worth looking at the different types of learning materials that are available, to see which ones are most effective for you to learn with.
textual articles you'll find a lot of written articles on the web to teach you about web design. like most of this course, for example. some of the articles will be tutorials, to teach you a certain technique or important concept (such as "learn how to create a video player" or "learn the css box model"), and some of the articles will be reference material, to allow you to look up details you may hav...
...uch as "what is the syntax of the css background property"?) mdn web docs is very good for both types — the area you are currently in is great for learning techniques and concepts, and we also have several giant reference sections allowing you to look up any syntax you can't remember. there are also several other great resources on the web, some of which we'll mention below. note: the above
text should have given you an important fact — you aren't expected to remember everything! professional web developers use tools like mdn web docs to look up things they have forgotten all the time. as you'll discover, learning web development is more about problem-solving and learning patterns than it is about learning lots of syntaxes. videos there are also a number of sites that have video lea...
...he time. as you'll discover, learning web development is more about problem-solving and learning patterns than it is about learning lots of syntaxes. videos there are also a number of sites that have video learning content on them. youtube is an obvious one, with channels such as mozilla layout land, mozilladeveloper, and google chromedevelopers providing many useful videos. many people prefer
textual articles for more in-depth learning and reference material, and videos for quick explanations of concepts and new features, but it is really up to you what you prefer to learn from. there is no right and wrong answer here. interactive code playgrounds you might be the kind of person that prefers minimal instructions and would prefer to jump straight in and start playing with code. this is al...
...uld break it down further, for example, "implement horizontal navigation menu" could be written out as: make a list of menu items sit horizontally in a line. remove unneeded defaults, like list spacing and bullet points. style hover/focus/active states of menu items appropriately. make the menu items equally spaced along the line. give the menu items enough vertical spacing. make sure the
text is centered inside each menu item etc. each of these problems doesn't seem nearly as difficult to solve as the one big problem you had initially. now you've just got to go through and solve them all! learn and recognise the patterns as we said before, web design/programming is mostly about problem solving and patterns. once you have written out what you'll need to do to solve a specific prob...
Server-side web frameworks - Learn web development
b framework provides an orm, and refers to the object used to define the structure of a record as the model. the model specifies the field types to be stored, which may provide field-level validation on what information can be stored (e.g. an email field would only allow valid email addresses). the field definitions may also specify their maximum size, default values, selection list options, help
text for documentation, label
text for forms etc. the model doesn't state any information about the underlying database as that is a configuration setting that may be changed separately of our code. the first code snippet below shows a very simple django model for a team object. this stores the team name and team level as character fields and specifies a maximum number of characters to be stored for ...
...case-insensitive, greater than, etc.), and can support complex statements (for example, you can specify a search on u11 teams that have a team name that starts with "fr" or ends with "al"). the second code snippet shows a view function (resource handler) for displaying all of our u09 teams. ...
...these allow you to specify the structure of an output document, using placeholders for data that will be added when a page is generated. ...
...riteria is passed to the filter() function as an argument with field name and match type separated by double underscores: team_level__exact). #best/views.py from django.shortcuts import render from .models import team def youngest(request): list_teams = team.objects.filter(team_level__exact="u09") con
text = {'youngest_teams': list_teams} return render(request, 'best/index.html', con
text) rendering data web frameworks often provide templating systems. these allow you to specify the structure of an output document, using placeholders for data that will be added when a page is generated. templates are often used to create html, but can also create other types of document. web frameworks often provide a mechanism to make it easy to generate other formats from stored data, inc...
Accessibility in React - Learn web development
tton in the view template and one for the edit field in the editing template. const editfieldref = useref(null); const editbuttonref = useref(null); these refs have a default value of null because they will not have value until we attach them to their respective elements. to do that, we'll add an attribute of ref to each element, and set their values to the appropriately named ref objects. ...
...; const editbuttonref = useref(null); these refs have a default value of null because they will not have value until we attach them to their respective elements. to do that, we'll add an attribute of ref to each element, and set their values to the appropriately named ref objects. ...
...ttonref = useref(null); these refs have a default value of null because they will not have value until we attach them to their respective elements. to do that, we'll add an attribute of ref to each element, and set their values to the appropriately named ref objects. ...
...s tab to focus on an element with a tabindex of -1 the same way you could do with a <button> or <a> element (this can be done using tabindex="0", but that's not really appropriate in this case). let's add the tabindex attribute — written as tabindex in jsx — to the heading above our list of tasks, along with our headingref: <h2 id="list-heading" tabindex="-1" ref={listheadingref}> {heading
text} </h2> note: the tabindex attribute is great for accessibility edge-cases, but you should take great care to not overuse it. only apply a tabindex to an element when you're absolutely sure that making it focusable will benefit your user in some way. in most cases, you should be utilizing elements that can naturally take focus, such as buttons, anchors, and inputs. irresponsible usage of tabinde...
Creating our first Vue component - Learn web development
> <ul> <li> <to-do-item></to-do-item> </li> </ul> </div> if you check your rendered app again, you should now see your rendered todoitem, consisting of a checkbox and a label. making components dynamic with props our todoitem component is still not very useful because we can only really include this once on a page (ids need to be unique), and we have no way to set the label
text. nothing about this is dynamic. what we need is some component state. this can be achieved by adding props to our component. you can think of props as being similar to inputs in a function. the value of a prop gives components an initial state that affects their display. registering props in vue, there are two ways to register props: the first way is to just list props out as an array of st...
...component state (or other props). for this component, we’ll use the object registration method. go back to your todoitem.vue file. add a props property inside the export default {} object, which contains an empty object. inside this object, add two properties with the keys label and done. the label key's value should be an object with 2 properties (or props, as they are called in the con
text of being available to the components). the first is a required property, which will have a value of true. this will tell vue that we expect every instance of this component to have a label field. vue will warn us if a todoitem component does not have a label field. the second property we'll add is a type property. set the value for this property as the javascript string type (note the ca...
...e our template. let's start by adding the label prop to the component template. in your <template>, replace the contents of the <label> element with {{label}}. {{}} is a special template syntax in vue, which lets us print the result of javascript expressions defined in our class, inside our template, including values and methods. it’s important to know that content inside {{}} is displayed as
text and not html. in this case, we’re printing the value of the label prop. your component’s template section should now look like this: <template> <div> <input type="checkbox" id="todo-item" checked="false" /> <label for="todo-item">{{label}}</label> </div> </template> go back to your browser and you'll see the todo item rendered as before, but without a label (oh no!). go to your...
...s just an object, all instances of that component would share the same values. this is a side-effect of the way vue registers components and something you do not want. you use this to access a component's props and other properties from inside data, as you may expect. we'll see an example of this shortly. note: because of the way that this works in arrow functions (binding to the parent’s con
text), you wouldn’t be able to access any of the necessary attributes from inside data if you used an arrow function. so don’t use an arrow function for the data property. so let's add a data property to our todoitem component. this will return an object containing a single property that we'll call isdone, whose value is this.done. update the component object like so: export default { props:...
Implementing feature detection - Learn web development
or other feature you are detecting for) exists in its parent object. if("geolocation" in navigator) { ... } property on element create an element in memory using document.createelement() and then check if a property exists on it. the example shown is a way of detecting html5 canvas support. function supports_canvas() { return !!document.createelement('canvas').getcon
text; } if(supports_canvas()) { ... } method on element return value create an element in memory using document.createelement() and then check if a method exists on it. if it does, check what value it returns. see dive into html5 video formats detection test. property on element retains value create an element in memory using document.createelement(), set a prop...
...ax-width: 480px)").matches) { // run javascript in here. } as an example, our snapshot demo makes use of it to selectively apply the brick javascript library and use it to handle the ui layout, but only for the small screen layout (480px wide or less). we first use the media attribute to only apply the brick css to the page if the page width is 480px or less: <link href="dist/brick.css" type="
text/css" rel="stylesheet" media="all and (max-width: 480px)"> we then use matchmedia() in the javascript several times, to only run brick navigation functions if we are on the small screen layout (in wider screen layouts, everything can be seen at once, so we don't need to navigate between different views). if (window.matchmedia("(max-width: 480px)").matches) { deck.shuffleto(1); } using moderni...
...features or not. let's look at an example to show how you'd use those properties. first of all, make a local copy of the modernizr-js.html example file. attach the modernizr library to the html using a <script> element, as we have done in previous demos. put it above the existing <script> element, which is attaching the google maps api to the page. next, fill in the your-api-key placeholder
text in the second <script> element (as it is now) with a valid google maps api key. to get a key, sign in to a google account, go to the get a key/authentication page, then click the blue get a key button and follow the instructions. finally, add another <script> element at the bottom of the html body (just before the </body> tag), and put the following script inside the tags: if (modernizr.geoloc...
...if it is, we run some code that gets your device's current location, and plots it on a google map. summary this article covered feature detection in a reasonable amount of detail, going throu...
Chrome registration
t chrome.manifest is the only manifest used; you can add manifest commands to that file to load secondary manifests. chrome providers a supplier of chrome for a given window type (e.g., for the browser window) is called a chrome provider. the providers work together to supply a complete set of chrome for a particular window, from the images on the toolbar buttons to the files that describe the
text, content, and appearance of the window itself. there are three basic types of chrome providers: content the main source file for a window description comes from the content provider, and it can be any file type viewable from within mozilla. it will typically be a xul file, since xul is designed for describing the contents of windows and dialogs. the javascript files that define the user inte...
...hrome registry that provides mappings from chrome package names to the physical location of chrome packages on disk. this chrome registry is configurable and persistent, and thus a user can install different chrome providers, and select a preferred skin and locale. this is accomplished through xpinstall and the extension manager. in order to inform the chrome registry of the available chrome, a
text manifest is used: this manifest is "chrome.manifest" in the root of an extension, or theme, or xulrunner application. the plain
text chrome manifests are in a simple line-based format. each line is parsed individually; if the line is parsable the chrome registry takes the action identified by that line, otherwise the chrome registry ignores that line (and prints a warning message in the runtime e...
... instructions are supported in bootstrapped extensions: manifest content locale skin override debugging a chrome manifest file the chrome list extension shows all registered chrome. this is very helpful when trying to write a chrome.manifest file as you can inspect where the files are being mapped from (jar files, local directory, etc.) old-style contents.rdf manifests before the plain
text manifests were introduced (which happened in firefox 1.5, toolkit 1.8), rdf manifests named "contents.rdf" were used to register chrome. this format is deprecated; however, seamonkey versions before version 2 do not support the plain
text manifest format yet, so contents.rdf manifests are required for extensions that wish to maintain backwards compatibility with firefox 1.0 or the suite. gecko...
... wish to maintain backwards compatibility with firefox 1.0 or the suite. gecko 1.9.2 note the contents.rdf manifest format is no longer supported at all starting with gecko 1.9.2; add-ons already installed using this format will continue to work but can no longer be installed. be sure to remove your add-on and reinstall it to ensure that it installs correctly after updating it to use a plain
text manifest. official references for toolkit api official references. do not add to this list without contacting benjamin smedberg. note that this page is included from the pages listed below. so: don't add breadcrumbs! structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and xulrunner applications extension packaging: specifi...
Creating Sandboxed HTTP Connections
es.nsiioservice); // create an nsiuri var uri = ioservice.newuri(myurlstring, null, null); once the nsiuri has been created, a nsichannel can be generated from it using nsiioservice's newchannelfromuri method: // get a channel for that nsiuri var channel = ioservice.newchannelfromuri(uri); to initiate the connection, the asyncopen method is called. it takes two arguments: a listener and a con
text that is passed to the listener's methods. channel.asyncopen(listener, null); http notifications the above mentioned listener is a nsistreamlistener, which gets notified about events such as http redirects and data availability. onstartrequest - gets called when a new request is initiated. ondataavailable - new data is available. since this is a stream, it could be called multiple times ...
...or that nsiuri gchannel = ioservice.newchannelfromuri(uri); // get an listener var listener = new streamlistener(callbackfunc); gchannel.notificationcallbacks = listener; gchannel.asyncopen(listener, null); function streamlistener(acallbackfunc) { this.mcallbackfunc = acallbackfunc; } streamlistener.prototype = { mdata: "", // nsistreamlistener onstartrequest: function (arequest, acon
text) { this.mdata = ""; }, ondataavailable: function (arequest, acon
text, astream, asourceoffset, alength) { var scriptableinputstream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); scriptableinputstream.init(astream); this.mdata += scriptableinputstream.read(alength); }, onstoprequ...
... ondataavailable: function (arequest, acon
text, astream, asourceoffset, alength) { var scriptableinputstream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); scriptableinputstream.init(astream); this.mdata += scriptableinputstream.read(alength); }, onstoprequest: function (arequest, acon
text, astatus) { if (components.issuccesscode(astatus)) { // request was successfull this.mcallbackfunc(this.mdata); } else { // request failed this.mcallbackfunc(null); } gchannel = null; }, // nsichanneleventsink onchannelredirect: function (aoldchannel, anewchannel, aflags) { // if redirecting, store the new channel gchannel = anewchannel; }...
...hannel, aflags) { // if redirecting, store the new channel gchannel = anewchannel; }, // nsiinterfacerequestor getinterface: function (aiid) { try { return this.queryinterface(aiid); } catch (e) { throw components.results.ns_nointerface; } }, // nsiprogresseventsink (not implementing will cause annoying exceptions) onprogress : function (arequest, acon
text, aprogress, aprogressmax) { }, onstatus : function (arequest, acon
text, astatus, astatusarg) { }, // nsihttpeventsink (not implementing will cause annoying exceptions) onredirect : function (aoldchannel, anewchannel) { }, // we are faking an xpcom interface, so we need to implement qi queryinterface : function(aiid) { if (aiid.equals(components.interfaces.nsisupports) || a...
Eclipse CDT Manual Setup
indow > preferences, or eclipse > preferences) before creating a project in that workspace: in "general > workspace", disable "build automatically" in "c/c++ > indexer", disable "automatically update the index" turning off automatic indexing prevents the cpu intensive indexer from running at various stages during the steps below before we're ready. select "general > content types", expand "
text > c source file > c++ source file", click "add" and add "*.mm". eclipse cdt doesn't currently understand objective-c files (although there is a project that promises to add objective-c support), so for now, this is the best we can do to give eclipse a chance of expanding its understanding of the source into the objective-c files. select "general > editors >
text editors". if you want line number...
... install it by opening the workspace preferences, selecting "c/c++ > code style > formatter", and then using the "import" button to import that file. the "active profile" field should then automatically change to "mozilla". depending on the area of the code that you work on, you may need to tweak this configuration using the "edit" button. (note that the format settings under "general > editors >
text editors" have no effect in c/c++ views, since the c/c++ settings are more specific and override those settings. however, you may still want to tweak those settings if you'll be editing other file types in eclipse.) select "c/c++ > editor" and set "workspace default" to "doxygen". select "c/c++ > editor > content assist" and set the auto-activation delay to 0 so that autocomplete suggestions don...
... begin with a symbol name like there is in other ides.) select "c/c++ > editor > save actions" and deselect "ensure newline at the end of file". select "c/c++ > editor > scalability" and set "enable scalability mode when the number of lines in the file is more than:" to something larger, like 100000. select "run/debug > console" and deselect "limit console output". if you want to increase the
text size in the editor, select "general > appearance > colors and fonts", select "basic >
text font", and edit the font size. creating an eclipse project to create an eclipse project for your mozilla source tree, select "file > new > makefile project with existing code". in the "import existing code" window that opens, enter a meaningful project name that identifies your mozilla source tree, set th...
...ers to have eclipse ignore certain non-source files and directories. note, you must not make eclipse ignore your (main) object directory. that object directory is needed to resolve include paths to the various headers that the build process generates/copies there. to create resource filters, open the project properties (different to the workspace preferences!) by selecting properties from the con
text menu for the project (root item) in the project explorer tab on the left, or by selecting project > properties from the menubar. select "resource > resource filters" on the left of the window that opens, then use the add button to add the following filters: add an "exclude all" filter for folders with a project relative path matching ".hg". (this directory doesn't show in the project explorer ...
Limitations of chrome scripts
there is an outstan...
... there is an outstanding bug (bug 1108827) to implement a shim here that will make notificationcallbacks a cpow for the objects in the content process. the correct way to access the dom window is through a message manager. ...
...cationcallbacks a cpow for the objects in the content process. the correct way to access the dom window is through a message manager. ...
... correct way to access the dom window is through a message manager. in an http observer, you can get the browser message manager for the window using code like this: observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); var loadcon
text = httpchannel.notificationcallbacks.getinterface(ci.nsiloadcon
text); // topframeelement is the <browser> element var topframeelement = loadcon
text.topframeelement; var browsermm = topframeelement.messagemanager; console.log("browsermm: " + browsermm); } } however, before firefox 38, this technique will not work if multiprocess firefox is disabled: specifically, topframeelement will be null. this means that if you need to write code that works ...
Using the Browser API
when you tap the url bar, you can enter a url using the built-in firefox os keyboard (although note that we haven't implemented anything sophisticated in this app, like autofilling the http://, etc.). when you press the keyboard's return button, the 'submit' event is fired, which we handle like this: urlform.addeventlistener('submit',function(e) { e.preventdefault(); browser.src = u...
... button next, let's talk about the stop/reload button. as in a traditional browser, this is a single button that acts as a reload button when the page has finished loading, and a stop button while the page is loading (each with a different icon displayed). this is implemented in our sample app with the following functions: browser.addeventlistener('mozbrowserloadstart',function() { stopreload.
textcontent = 'x'; }); browser.addeventlistener('mozbrowserloadend',function(e) { canmovebwd(); canmovefwd(); stopreload.
textcontent = 'r'; console.log(e.detail.backgroundcolor); controls.style.background = e.detail.backgroundcolor; }); when the mozbrowserloadstart event fires, the latest page request has started loading, and we change the button to a cross to indicate "stop". when the moz...
...g the icon is nice, but we also need to update the functionality that is invoked when each icon is displayed. we do this with the following function, which runs the htmliframeelement.stop() method to stop the page loading if the button is displaying a cross, and the htmliframeelement.reload() method to reload the page otherwise. stopreload.addeventlistener('touchend',function() { if(stopreload.
textcontent === 'x') { browser.stop(); } else { browser.reload(); } }); implementing the search bar let's now turn our attention to implementing browser search using the browser api. tap the "s" button and try it out. try searching for "firefox" on the default page when the app first loads. so how do we do this? first, we declare a searchactive variable as false, which influences beha...
...and "next" search item buttons so that they don't run anything unless there are search items to cycle between. var searchactive = false; prev.disabled = true; next.disabled = true; next, we add an event listener to the searchform so that when it is submitted, the htmliframeelement.findall() method is used to do a search for the string entered into the search input element (searchbar) within the
text of the current page (the second parameter can be changed to 'case-insensitive' if you want a case-insensitive search.) we then enable the previous and next buttons, set searchactive to true, and blur() the search bar to make the keyboard disappear and stop taking up our screen once the search is submitted. searchform.addeventlistener('submit',function(e) { e.preventdefault(); browser.findall...
mozbrowsercaretstatechanged
tandard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. the mozbrowsercaretstatechanged event is fired when the user selects content in a page loaded in a browser <iframe>. this is used by the embedder to show a con
text menu for clipboard actions. general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the browser iframe type read only domstring the type of event. bubbles read only boolean whethe...
... senddocommandmsg a method allowing you to issue a command via an anonymouse function, i.e. function(command). possible values are cut, copy, paste and selectall. examples var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowsercaretstatechanged", function( event ) { // do stuff with event.detai...
... senddocommandmsg a method allowing you to issue a command via an anonymouse function, i.e. function(command). possible values are cut, copy, paste and selectall. examples var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowsercaretstatechanged", function( event ) { // do stuff with event.details }); ...
... (true) or not (false.) caretvisible a boolean indicating whether the caret is currently visible (true) or not (false.) selectionvisible a boolean indicating whether the current selection is visible (true) or not (false.) selectioneditable a boolean indicating whether the current selection is editable (true) or not (false.) selected
textcon
text a domstring containing the currently-selected
text content. senddocommandmsg a method allowing you to issue a command via an anonymouse function, i.e. function(command). possible values are cut, copy, paste and selectall. examples var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowsercaretstatechanged", function( event ) { // do stuff with event.details }); related events mozbrowserclose mozbrowsercontex...
How Mozilla determines MIME Types
introduction all data handling in mozilla is based on the mime type of the content. this means that every time an uri is loaded, mozilla must find out its mime type. the several ways how this happens are described in this document. content-type "hints" mozilla has a concept of "content-type hints". this means that, for example, if mozilla encounters a <link type="
text/css" rel="stylesheet" href="..."> element, a type of
text/css will be assumed. this is, however, overridden by the actual mime type the server sends (if any). (for this specific example, the server override only happens in standards-compliant mode. see mozilla's quirks mode or web author faq). similar handling happens for <a href="..." type="foo/bar">, starting in mozilla 1.6alpha. http for http uris mozilla usually...
..."foo/bar">, starting in mozilla 1.6alpha. http for http uris mozilla usually gets a mime type sent from the server, and uses it. contrary to internet explorer's mime type guessing, mozilla will generally not sniff the type of the document. however, starting in mozilla 1.7alpha, mozilla does do content sniffing, like this: when the content-type sent by the server is one of (case-sensitively)
text/plain
text/plain; charset=iso-8859-1
text/plain; charset=iso-8859-1 and the server did not send a content-encoding header, mozilla will sniff the first block of data it gets and check for non-
text bytes.
text bytes are 9-13, 27, and 31-255. when encountering a non-
text byte, the helper app dialog will be shown, showing the mime type corresponding to the extension of the file. also, for image...
.../converters/nsunknowndecoder.cpp, the interesting part starts at line 287, the ssnifferentries array together with the determinecontenttype function. it does the following: checks the start of the file for "magic numbers"; this can currently detect pdf and postscript. if the file starts with <?xml, asks the externalhelperappservice for a mime type for the uri. this is done because the generic
text/xml mime type does not work for xul files, and xhtml files get a different dom when interpreted as
text/xml. the image library will be asked for the mime type given the content. this should allow reliable detection of all image types mozilla supports. checks whether the data is html by looking for some common html tags. the uri is handed to the externalhelperappservice for mime type guessing ...
... library will be asked for the mime type given the content. this should allow reliable detection of all image types mozilla supports. checks whether the data is html by looking for some common html tags. the uri is handed to the externalhelperappservice for mime type guessing if all else fails, the buffer (i.e. the first few bytes of the file) is searched for embedded nulls; if none are found,
text/plain will be used, otherwise application/octet-stream. externalhelperappservice (located at uriloader/exthandler/nsexternalhelperappservice.cpp) the file->mime type mapping works like this: on beos, the operating system is asked for the type of the file (not quite yet, bug 217723) on macos, the type and creator code will be used to lookup the type of the file from the os a hardcoded lis...
Localization and Plurals
load.;you have #1 downloads."; let num = 10; // for english, this would display "you have 10 downloads." print(pluralform.get(num, downloads).replace("#1", num); notice in the above example that the code can be written to support placeholders or not use placeholders in some forms of the string. additionally, the localizer has control over where the placeholder is, in relation to the rest of the
text. of course, the strings to be localized will be placed in a separate file, such as yourextension.properties, instead of being hardcoded in the javascript code file. the following 3 file snippets show how to use pluralform with your .xul, .properties, .js files. downloads.xul: <stringbundleset> <stringbundle id="strings" src="chrome://downloads.properties"/> </stringbundleset> downloads.pro...
...so for your extension, specify a pluralrule value in the .properties, and call pluralform.makegetter(pluralr...
...e usage of makegetter: components.utils.import("resource://gre/modules/pluralform.jsm"); // let's get irish (plural rule #11) let [get, numforms] = pluralform.makegetter(11); // make up some values to use with "get" let dummy
text = "form 1;form 2;form 3;form 4;form 5"; let dummynum = 10; // in the case of irish, the value 10 uses plural form #4, so "form 4" is printed print(get(dummynum, dummy
text)); in this example, the irish plural rule was hardcoded, but this could be a value specified in the .properties file. so for your extension, specify a pluralrule value in the .properties, and call pluralform.makegetter(pluralrulefromproperties), making sure to save the 2 returned functions. (you can use destructured assignment in javascript 1.7 to keep things clean.) the returned functions act j...
... ...
Setting up the infrastructure
create a new branch for l10n (optional if starting a new project). create a locale directory in your website (usually something like docroot/locale). ...
... create a new branch for l10n (optional if starting a new project). create a locale directory in your website (usually something like docroot/locale). ...
...pp/locale/ to your locale directory: extract-po.sh will be used to extract all english strings from your application's directories specified in source_dirs, merge the resulting template (*.pot) file with the existing (already containing translations) messages.po files for each locale (if they exist) and merge the new messages.po files to messages.mo files. by default the script looks for get
text calls in *thtml or *.php files, so you may need to adjust that to your code. compile-mo.sh will only compile all locales' messages.po files to message.mo files. this is useful when a localizer submits a new version of the messages.po file. on the staging server you can also choose to set up a cronjob that will run compile-mo.sh every n minutes. this way the localizers will be able to preview t...
...us locale (locale/lc_messages/) in the locale folder. create an empty filed named messages.po in the locale/lc_messages folder. create new locales by repeating steps 4 and 5 for each of them. review the english content following the web content localizability guidelines. review your code following the web applications localizability guidelines. run extract-po.sh. restart apache to reload get
text files (necessary for any
text changes). merge the l10n branch back to main trunk (if the l10n branch was created in step 1). copy files over to svn. set up the staging server. set up a cronjob to svn up every n minutes. set up a cronjob to run compile-mo.sh every m minutes. qa with new locale. fix any layout issues. ...
MathML Demo: <mo> - operator, fence, separator, or accent
in general, the lspace and rspace around the relation should be greater than that around the operation. operator and relations center vertically on the math axis. ...
... ∥ c a ⊵ b ∼ c a ▽ b ≈ c a △ b ≊ c a ⋄ b ⪸ c a † b ⪷ c a ‡ b ∋ c a ⊞ b \vartriangle c arrows the following table contains instances of all arrows found on the swp arrows panel. the symbols occur in the con
text of a simple expression. in general, the lspace and rspace around arrows should be similar to the spacing around relations. there is an issue with the markup of "long" latex arrows in mathml. there are entities from these arrows, ⟵ ⟵ ⟶ etc. but they have no standard unicodes. they can be viewed as stretched versions of short arrows. \longleftarrow can be scripted as <mo>⟵</...
... a - b ⇚ c a + b ↶ c a - b ↷ c a + b ⤏ c a - b ⤎ c a + b ⇒ c a - b ⇐ c a + b ⇔ c negated relations the following table contains instances of all negated relations found on the swp panel. the symbols occur in the con
text of a simple expression. in general, the lspace and rspace around negated relations should be similar to the spacing around relations. a + b ≠ c ⋅ d a + b = c ⋅ d a - b ∉ c * d a - b ∈ c * d a + b ≨︀ c × d a + b ≦ c × d a - b ≩︀ c ÷ d ...
... 1 + | 2 + | 3 + | 4 + | . | + 5 | + 6 | + 7 | + 8 | the size ratio is 3.0 : 2.4 : 1.8 : 1.2. fixed sized fences are useful with nested fences as in the following example [ [ a b ] + [ b a ] ] + [ a b ] latex fences that are built into fractions (\binom, etc.) are not stretchy, but they are taller in displays. emulating this behavior in mathml would require a con
text sensitive transaltion. further, non-stretchy fences aren't usually desirable. hence we script binomial fences as stretchy in mathml. some examples of inline fractions ( 8 - 5 8 ) + [ 1 2 ] + ⌊ 1 2 2 ⌋ + ⌈ 1 x y x + 1 ⌉ + | e - 2 π t θ | with built in fences. same expression in a display. ( 8 - 5 8 ) + [ 1 2 ] + ⌊ 1 2 2 ⌋ ...
Mozilla DOM Hacking Guide
nding to the data passed in. the implementation is detailed in section 1.6. static void shutdown(): releases the interface pointers. static nsiclassinfo* docreate(nsdomclassinfodata* adata): inline function that returns a nsiclassinfo pointer to a new instance of the nsdomclassinfo class. static nsresult wrapnative(...): xpconnect fu, not our problem. static nsresult throwjsexception(jscon
text *cx, nsresult aresult);: help me! static nsresult initdomjsclass(jscon
text *cx, jsobject *obj);: help me! static jsclass sdomjsclass;: help me! protected section: const nsdomclassinfodata* mdata;: help me! static nsresult init(): called only once, it is used to initialize the remaining members of the nsdomclassinfodata structure, as mentioned above. once called, init() sets sisiniti...
...mentioned above. once called, init() sets sisinitialized to true, to remember that the initialization has been performed. the implementation is described in section 1.5. static nsresult registerclassname(print32 adomclassinfoid): help me! static nsresult registerclassprotos(print32 adomclassinfoid): help me! static nsresult registerexternalclasses();: help me! nsresult resolveconstructor(jscon
text *cx, jsobject *obj, jsobject **objp);: help me! static print32 getarrayindexfromid(jscon
text *cx, jsval id, prbool *aisnumber = nsnull): if the js value is an integer, then *aisnumber is true, and the integer is returned. else, *aisnumber is false and -1 is returned. static inline prbool isreadonlyreplaceable(jsval id) { ... }: help me! static inline prbool iswritablereplaceable(jsval id) ...
...structorprotoclass: xpconnect fu to expose the dom objects constructors to javascript. static jsfunctionspec sdomjsclass_methods[];: help me! (bug 91557) static nsixpconnect *sxpconnect: used to call nsixpconnect methods that we need. initialized in init(). static nsiscriptsecuritymanager *ssecman: used by the dom security engine. initialized in init(). static nsresult definestaticjsvals(jscon
text *cx);: used to define all the static jsstring data members of nsdomclassinfo. static prbool sisinitialized: keeps track of wether class info was already initialized, because init() shouldn't be called twice. static jsval *sx_id: strings used in the global resolve methods for comparison with the passed in arguments. they represent special words for the dom. initialized by definestaticjsvals().
...itialized by definestaticjsvals(). static const jsclass *sobjectclass: help me! static prbool sdosecuritycheckinaddproperty;: help me! nsdomclassinfo::init() this method is to be called only once. its purpose is, well, to initialize... it does a lot of different things: fill the blanks in the sclassinfodata array, initialize the sxpconnect and ssecman data members, create a new javascript con
text, define the jsstring data members, and register class names and class prototypes. finally it sets sisinitialized to true. the actions that concern the dom are described below. first, the call to callgetservice() initializes sxpconnect. then the script security manager (ssecman) is initialized. getsafejscon
text() grabs us a cool js con
text to run our javascript code in. the part about componentre...
Mozilla Quirks Mode Behavior
support <pre wrap>, <pre cols>, <pre width>. orphaned dd has generated content :before instead of margin (bug 5119). indent nested dl elements (bug 8749). map acts like an inline, not a block. give floated img a 3px margin (bug 58899). residual style tags' size info does not take precedence over heading tags' size (bug 77352). use box-sizing:border-box for most input types and
textarea. give form a margin-bottom:1em (bug 41806). in quirks mode css class and id names are case insensitive. in standards mode they are case sensitive. (this also applies to getelementsbyclassname.) stylesheets linked in the document with an advisory mime type of
text/css will still be treated as css even if the server gives a content-type header other than
text/css. the css parser ac...
...s, tables, objects, and applets (etc.?) to "work" (the way they did in netscape navigator 4), even though css says that percentage heights should behave like 'auto' heights when the parent element doesn't have a fixed height. see bug 33443#c9. see also bug 41656 and its duplicates. some of these quirks may cause other effects (see bug 54119). in quirks mode, the font element changes the color of
text decorations specified on ancestor elements. proposed to apply in all modes: bug 747517. in quirks mode,
text-decoration is propagated into floating and absolutely positioned elements. (firefox 4 / thunderbird 3.3 / seamonkey 2.1) in quirks mode,
text-decoration is not propagated into tables (bug 572713). maybe (firefox 3) when computing the minimum intrinsic width of an inline flow direct...
... tables td, th, tr, thead, tbody, and tfoot elements have the document background (and color?) applied to them (when the document background is specified in certain ways?) (see also bug 70831). ...
...efox 3) when computing the minimum intrinsic width of an inline flow directly in a table cell (no blocks in between), it is assumed that it is not possible to break before and after an image (when otherwise it would be). obsolete since gecko 8.0 prior to gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5)
text-decoration in quirks mode had line thickness and position adjusted on descendant
text to match the descendant. tables td, th, tr, thead, tbody, and tfoot elements have the document background (and color?) applied to them (when the document background is specified in certain ways?) (see also bug 70831). [this may have been an accurate description when written in june 2001, but no longer appears accurate. should look into tablequirkcolorrule, re-describe, and figure out when it...
Localization Use Cases
brandshortname }} uległo awarii" }> this will give us, depending on the current branding, the following messages: firefox os uległ awarii boot2gecko uległo awarii isolation let's look at how the settings app formats sizes. ...
...r.showformatedsize (sic): function showformatedsize(element, l10nid, size) { if (size === undefined || isnan(size)) { element.
textcontent = ''; return; } // kb - 3 kb (nearest ones), mb, gb - 1.2 mb (nearest tenth) var fixeddigits = (size < 1024 * 1024) ? ...
...etry the example above could benefit from another of l20n's features: local variables. in l20n, localization files can be asymmetrical and have more entities that the source language. you'll notice that devicestoragehelper.showformatedsize passes a localized name of the unit to availablesize: function showformatedsize(element, l10nid, size) { // … var _ = navigator.mozl10n.get; element.
textcontent = _(l10nid, { size: sizeinfo.size, unit: _('byteunit-' + sizeinfo.unit) }); } problem definition even though there's no need to localize the units in english at all, we still need to do it, because in other languages we might need to use localized names. byteunit-b = b byteunit-kb = kb byteunit-mb = mb byteunit-gb = gb byteunit-tb = tb for example in french, the unit abbrev...
... ko byteunit-mb = mo byteunit-gb = go byteunit-tb = to solution in l20n, the french localizer could provide the translation of unit abbreviations locally in the localization file, without impacting the english localization file. ...
Cryptography functions
pk11_algtagtomechanism mxr 3.2 and later pk11_authenticate mxr 3.2 and later pk11_blockdata mxr 3.2 and later pk11_changepw mxr 3.2 and later pk11_checkuserpassword mxr 3.2 and later pk11_cipherop mxr 3.2 and later pk11_clonecon
text mxr 3.2 and later pk11_configurepkcs11 mxr 3.2 and later pk11_convertsessionprivkeytotokenprivkey mxr 3.6 and later pk11_convertsessionsymkeytotokensymkey mxr 3.6 and later pk11_copytokenprivkeytosessionprivkey mxr 3.11 and later pk11_createcon
textbysymkey ...
...s11 mxr 3.2 and later pk11_convertsessionprivkeytotokenprivkey mxr 3.6 and later pk11_convertsessionsymkeytotokensymkey mxr 3.6 and later pk11_copytokenprivkeytosessionprivkey mxr 3.11 and later pk11_createcon
textbysymkey mxr 3.2 and later pk11_createdigestcon
text mxr 3.2 and later pk11_creategenericobject mxr 3.12 and later pk11_createmergelog mxr 3.12 and later pk11_createpbealgorithmid mxr 3.2 and later pk11_createpbev2algorithmid mxr 3.12 and later pk11_deletetokenprivatekey mxr 3.4 and later ...
...y mxr 3.4 and later pk11_deletetokenpublickey mxr 3.4 and later pk11_deletetokensymkey mxr 3.4 and later pk11_derive mxr 3.2 and later pk11_derivewithflags mxr 3.2 and later pk11_derivewithflagsperm mxr 3.9 and later pk11_destroycon
text mxr 3.2 and later pk11_destroygenericobject mxr 3.9.2 and later pk11_destroygenericobjects mxr 3.9.2 and later pk11_destroymergelog mxr 3.12 and later pk11_destroyobject mxr 3.2 and later pk11_destroytokenobject mxr 3.2 and later ...
...hflagsperm mxr 3.9 and later pk11_pubwrapsymkey mxr 3.2 and later pk11_randomupdate mxr 3.2 and later pk11_readrawattribute mxr 3.9.2 and later pk11_referencesymkey mxr 3.2 and later pk11_resettoken mxr 3.4 and later pk11_restorecon
text mxr 3.2 and later pk11_savecon
text mxr 3.2 and later pk11_savecon
textalloc mxr 3.6 and later pk11_setfortezzahack mxr 3.2 and later pk11_setpasswordfunc mxr 3.2 and later pk11_setprivatekeynickname mxr 3.4 and later pk11_setpublick...
certutil
is not used, then the tool assumes that the given databases are in the old format. -e check a certificate's signature during the process of validating a certificate. -f password-file specify a file that will automatically supply the password to include in a certificate or to access a certificate database. this is a plain-
text file containing one password. be sure to prevent unauthorized access to this file. -g keysize set a key size to use when generating new public and private key pairs. the minimum is 512 bits and the maximum is 8192 bits. the default is 1024 bits. any size between the minimum and maximum is allowed. -h tokenname specify the...
... c - valid ca o t - trusted ca to issue client certificates (implies c) o c - trusted ca to issue server certificates (ssl only) (implies c) o u - certificate can be used for authentication or signing o w - send warning (use with other attributes to include a warning when the certificate is used in that con
text) the attribute codes for the categories are separated by commas, and the entire set of attributes enclosed by quotation marks. for example: -t "tcu,cu,tuw" use the -l option to see a list of the current certificates and trust attributes in a certificate database. -u certusage specify a usage con
text to apply when...
..., and the entire set of attributes enclosed by quotation marks. for example: -t "tcu,cu,tuw" use the -l option to see a list of the current certificates and trust attributes in a certificate database. -u certusage specify a usage con
text to apply when validating a certificate with the -v option. the con
texts are the following: o c (as an ssl client) o v (as an ssl server) o s (as an email signer) o r (as an email recipient) o o (as an ocsp status responder) o j (as an object signer) -v valid-months set the number of months a new certificate will be valid. the validity period begins at...
...e over information without performing interim step. certutil --merge -d [sql:]directory [-p dbprefix] --source-dir directory --source-prefix dbprefix [-@ password-file] for example: $ certutil --merge -d sql:/home/my/sharednssdb --source-dir /opt/my-app/alias/ --source-prefix serverapp- running certutil commands from a batch file a series of commands can be run sequentially from a
text file with the -b command option. the only argument for this specifies the input file. $ certutil -b -i /path/to/batch-file nss database types nss originally used berkeleydb databases to store security information. the last versions of these legacy databases are: o cert8.db for certificates o key3.db for keys o secmod.db for pkcs #11 module information berkeleydb...
Rhino Debugger
ion enter will give control to the debugger whenever the execution is entered into a function or script. break on function exit selecting debug->break on function return will give control to the debugger whenever the execution is about to return from a function or script. moving up and down the stack the lower-left (dockable) pane in the debugger main window contains a combo-box labeled "con
text:" which displays the current stack of the executing script. you may move up and down the stack by selecting an entry in the combo-box. when you select a stack frame the variables and watch windows are updated to reflect the names and values of the variables visible at that scope. setting and clearing breakpoints the main desktop of the debugger contains file windows which display the contents o...
...ch displays the properties of the current object and currently visible local variables, respectively. this the properties of the current object are displayed in the this table. if a property is itself a javascript object the property may be expanded to show its sub-properties. ...
...rol returns to the debugger or when you change the stack location in the con
text: window. locals the local variables of the current function are displayed in the locals table. if a variable is itself a javascript object the variable may be expanded to show its sub-properties. the locals table is updated each time control returns to the debugger or when you change the stack location in the con
text: window watch window you may enter arbitrary javascript expressions in the watch: table located in the lower-right (dockable) pane in the debugger main window. the expressions you enter are re-evaluated in the current scope and their current values displayed each time control returns to the debugger or when you change the stack location in the con
text: window. evaluation window the evaluat...
...re re-evaluated in the current scope and their current values displayed each time control returns to the debugger or when you change the stack location in the con
text: window. evaluation window the evaluate pane located in the lower-right (dockable) pane in the debugger main window contains an editable command line where you may enter arbitrary javascript code. the code is evaluated in the con
text of the current stack frame. the window maintains a history of the commands you have entered. you may move backward or forward through the history by pressing the up/down arrow keys on the keyboard. ...
Rebranding SpiderMonkey (1.8.5)
after installing the build pre-requisites and downloading the spidermonkey source tarball issue the following commands at the terminal: cd js/src autoconf-2.13 for the remainder of this document wherever you see the
text $brand you will substitute that
text with the name of your brand. for example the default brand for spidermonkey 1.8.5 is 'mozjs185'. mkdir build-$brand-release cd build-$brand-release configure this build of spidermonkey with the desired options. for example: ../configure --enable-ctypes --with-system-nspr note: your desired configuration may be different. the only required part in this step is the ../configure command. so far, so good. now for the tricky parts. we need to perform a recursive find and replace
text operation on all files in the current directory. in ...
...if you have failed to insert your brand name in any of the previous steps where it is called for, you must delete this build directory and restart this process from the beginning. ...
...ration. if you have failed to insert your brand name in any of the previous steps where it is called for, you must delete this build directory and restart this process from the beginning. this time paying careful attention to the commands you issue to your command shell. the above command has actually changed some information we need changed back so we will re-issue the recursive find and replace
text in files command with some modifications. find ./ -type f -exec sed -i "s/$brand.pc/mozjs185.pc/" {} \; the last recursive search and replace, changes the file name of the static library: find ./ -type f -exec sed -i "s/js_static/$brand_static/" {} \; allright, almost there. now comes the manual editing. using your favorite editor open up the file named makefile for editing. search for this tex...
...pkgconfig file has also been installed for your library at libdir/pkgconfig/$brand.pc. you may wish to manually edit this file. it describes your library package. the script file js-config has not been modified either and still points to mozjs185. if this is not desirable, you can issue the following command on unix systems: sed -i "s/mozjs185/$brand/" /usr/bin/js-config which performs a simple
text replacement of mozjs185 with your branding on the js-config script. you may need administrative rights to run the above command. ...
SpiderMonkey Internals: Thread Safety
ically has only one jsruntime, even if it has many threads. each runtime has one or more jscompartments. the jscompartment is the universe in which js objects live. they can't travel to other jscompartments. crucially, any given compartment may only be accessed by one thread at a time. this means that objects cannot be shared across compartments. all js code and most jsapi calls run within a jscon
text. the jscon
text can be thought of as a machine that knows how to run javascript code, or as an abstraction of the notion of a thread. exception handling, for example, is per-jscon
text. each jscon
text must be used by only one thread at a time. a single jscon
text can run work with code and objects in multiple compartments as long as no other thread is accessing those compartments. objects may be sha...
...thread-safety in spidermonkey is turned on by compiling with -djs_threadsafe. ...
...thread-safety in spidermonkey is turned on by compiling with -djs_threadsafe. in a js_threadsafe build, these operations are handled specially: access to jsruntime data structures garbage collection accesses to jsruntime data structures are serialized with a few mutexes. ...
... with -djs_threadsafe. in a js_threadsafe build, these operations are handled specially: access to jsruntime data structures garbage collection accesses to jsruntime data structures are serialized with a few mutexes. the treatment of gc requires more explanation. making gc thread-safe with js_threadsafe, the api changes slightly. the program must group jsapi calls into "requests": js_setcon
textthread(cx); js_beginrequest(cx); /* ... do stuff ... */ js_endrequest(cx); js_clearcon
textthread(cx); it isn't a bottleneck; multiple threads are allowed to be in requests on the same jsruntime at once. see js_beginrequest. the most obvious effect of a request is: at any given moment there can either be multiple threads in active requests, or one thread doing gc and all requests suspe...
JS::AutoIdArray
ida jsidarray * a pointer to jsidarray to take the ownership. methods method description bool operator!() const return true if this has no owned array. ...
... ida jsidarray * a pointer to jsidarray to take the ownership. methods method description bool operator!() const return true if this has no owned array. ...
... ida jsidarray * a pointer to jsidarray to take the ownership. methods method description bool operator!() const return true if this has no owned array. ...
... ida jsidarray * a pointer to jsidarray to take the ownership. methods method description bool operator!() const return true if this has no owned array. ...
JS::Construct
fun js::handlevalue pointer to the function to call. should be a native function or jsapi-compiled function.. ...
... fun js::handlevalue pointer to the function to call. should be a native function or jsapi-compiled function.. ...
... fun js::handlevalue pointer to the function to call. should be a native function or jsapi-compiled function.. ...
... fun js::handlevalue pointer to the function to call. should be a native function or jsapi-compiled function.. args js::handlevaluearray & arguments you are passing to the function. rval js::mutablehandlevalue out parameter. ...
JS::OrdinaryToPrimitive
obj js::handleobject the object to convert. type jstype the type of converted value. vp js::mutablehandlevalue out parameter. ...
... obj js::handleobject the object to convert. type jstype the type of converted value. vp js::mutablehandlevalue out parameter. ...
... obj js::handleobject the object to convert. type jstype the type of converted value. vp js::mutablehandlevalue out parameter. ...
... obj js::handleobject the object to convert. type jstype the type of converted value. vp js::mutablehandlevalue out parameter. on success, *vp receives the converted value. ...
JS::PropertySpecNameToPermanentId
name const char * jspropertyspec::name or jsfunctionspec::name. idp jsid * out parameter. receives the created id. ...
... name const char * jspropertyspec::name or jsfunctionspec::name. idp jsid * out parameter. receives the created id. ...
... name const char * jspropertyspec::name or jsfunctionspec::name. idp jsid * out parameter. receives the created id. ...
... name const char * jspropertyspec::name or jsfunctionspec::name. idp jsid * out parameter. receives the created id. ...
JS::ProtoKeyToId
key jsprotokey the prototype key to convert. vp js::mutablehandleid out parameter. *idp receives the converted id. description js::protokeytoid converts a specified js prototype key key, to a js id. ...
... key jsprotokey the prototype key to convert. vp js::mutablehandleid out parameter. *idp receives the converted id. description js::protokeytoid converts a specified js prototype key key, to a js id. ...
... key jsprotokey the prototype key to convert. vp js::mutablehandleid out parameter. *idp receives the converted id. description js::protokeytoid converts a specified js prototype key key, to a js id. ...
... key jsprotokey the prototype key to convert. vp js::mutablehandleid out parameter. *idp receives the converted id. description js::protokeytoid converts a specified js prototype key key, to a js id. ...
JS::ToInt32
v js::handlevalue the value to convert. out int32_t * out parameter. on success, *out receives the converted floating-point value. ...
... v js::handlevalue the value to convert. out int32_t * out parameter. on success, *out receives the converted floating-point value. ...
... v js::handlevalue the value to convert. out int32_t * out parameter. on success, *out receives the converted floating-point value. ...
... v js::handlevalue the value to convert. out int32_t * out parameter. on success, *out receives the converted floating-point value. description js::toint32 converts a javascript value to a signed 32bit integer. ...
JS::ToInt64
v js::handlevalue the value to convert. out int64_t * out parameter. on success, *out receives the converted floating-point value. ...
... v js::handlevalue the value to convert. out int64_t * out parameter. on success, *out receives the converted floating-point value. ...
... v js::handlevalue the value to convert. out int64_t * out parameter. on success, *out receives the converted floating-point value. ...
... v js::handlevalue the value to convert. out int64_t * out parameter. on success, *out receives the converted floating-point value. description js::toint64 converts a javascript value to a signed 64bit integer. ...
JS_PutEscapedString
buffer char * a pointer to char buffer to write into. ...
... buffer char * a pointer to char buffer to write into. size size_t the size of buffer in bytes. ...
... buffer char * a pointer to char buffer to write into. size size_t the size of buffer in bytes. ...
... buffer char * a pointer to char buffer to write into. size size_t the size of buffer in bytes. str jsstring * or jsflatstring * a string to write into the file. quote char one of 0, single quote, and double quote. ...
JS_SetBranchCallback
obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. specifies a callback function that is automatically called when a script branches backward during execution, when a function returns, and at the end of the script. replaced with js_setoperationcallback. ...
...ld be removed at any time. try to avoid using it. specifies a callback function that is automatically called when a script branches backward during execution, when a function returns, and at the end of the script. replaced with js_setoperationcallback. syntax jsbranchcallback js_setbranchcallback(jscon
text *cx, jsbranchcallback cb); name type description cx jscon
text * the con
text to hook. ...
...ion, when a function returns, and at the end of the script. replaced with js_setoperationcallback. syntax jsbranchcallback js_setbranchcallback(jscon
text *cx, jsbranchcallback cb); name type description cx jscon
text * the con
text to hook. cb jsbranchcallback pointer to the callback function. callback syntax jsbool (*jsbranchcallback)(jscon
text *cx, jsscript *script); name type description cx jscon
text * pointer to a jscon
text which the callback may use to call into jsapi functions. for example, the callback my call js_maybegc(cx). this is the con
text that is currently executing the code that triggered the callback. provides request. in js_threadsafe builds, the javascript engine calls this callback only ...
...cuting the code that triggered the callback. provides request. in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx. the callback does not need to call js_beginrequest()). script jsscript the script that is running. this is guaranteed to be non-null, unless the jsoption_native_branch_callback option has been enabled for the con
text cx using js_setoptions(). if the callback returns js_true, the js engine continues to execute the script. if the callback raises an exception using js_setpendingexception() and returns js_false, then the javascript engine propagates the exception to the script that was executing at the time. if the callback returns js_false without raising an exception, then the javascript engine immedia...
JS_SetFunctionCallback
e, and is particularly useful for javascript tracers and profilers since it works across all run modes (interpreter, method jit, trace jit). using this function may have a significant performance impact. see function tracing for an example. note: this method is only available if moz_trace_jscalls was defined at compile time using --enable-trace-jscalls. syntax void js_setfunctioncallback(jscon
text *cx, jsfunctioncallback fcb); name type description cx jscon
text * pointer to a js con
text from which to derive runtime information. requires request. in a js_threadsafe build, the caller must be in a request on this jscon
text. fcb jsfunctioncallback the callback to execute when javascript functions are invoked and exited. specify null to stop callin...
... description js_setfunctioncallback sets a c function to be called each time a javascript function is invoked or exits. fcb is a pointer to the c function to call. ...
... entering int true if the callback is being called because the specified function is bein...
...tack traces, and set breakpoints.) callback syntax typedef void (* jsfunctioncallback)(const jsfunction *fun,const jsscript *scr, const jscon
text *cx, int entering); name type description fun const jsfunction * the javascript function being invoked or exited. scr const jsscript * the script being executed. cx jscon
text * the javascript con
text in which the script is being run. entering int true if the callback is being called because the specified function is being invoked or false if the function is exiting. see also mxr id search for js_setfunctioncallback function tracing js_getfunctioncallback bug 1103269 ...
JS_SetGCCallback
the gc callback of the associated jsruntime is set. rt jsruntime * the jsruntime for which to set the gc callback. ...
...the gc callback of the associated jsruntime is set. rt jsruntime * the jsruntime for which to set the gc callback. ...
...the gc callback of the associated jsruntime is set. rt jsruntime * the jsruntime for which to set the gc callback. cb jsgccallback pointer to the new callback function to use. ...
... cb jsgccallback pointer to the new callback function to use. callback syntax typedef enum jsgcstatus { jsgc_begin, jsgc_end, jsgc_mark_end, // obsolete since jsapi 13 jsgc_finalize_end // obsolete since jsapi 13 } jsgcstatus; typedef void (* jsgccallback)(jsruntime *rt, jsgcstatus status, void *data); name type description cx jscon
text * the con
text in which garbage collection is happening. status jsgcstatus one of the jsgcstatus constants, described below, indicating the stage of gc. description js_setgccallback sets a callback function which the garbage collector calls at several points during garbage collection. rt is the runtime in which you specify the callback. cb is a pointer to the new callback f...
JS_SetGlobalObject
obsolete since jsapi 25this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. set a con
text's global object. syntax void js_setglobalobject(jscon
text *cx, jsobject *obj); name type description cx jscon
text * the con
text to configure. requires request. in a js_threadsafe build, the caller must be in a request on this jscon
text. obj jsobject * pointer to the object to set as the global object, or null. ...
...this means that global objects are automatically protected from garbage collection, as are any values reachable from their properties. ...
... cx jscon
text * the con
text to configure. requires request. in a js_threadsafe build, the caller must be in a request on this jscon
text. obj jsobject * pointer to the object to set as the global object, or null. description this function is obsolete; see also js_getglobalobject. js_setglobalobject sets the global object of the con
text cx to obj. if obj is null, the con
text is set to have no global object. each con
text's global object is in the garbage collector's root set. this means that global objects are automatically protected from garbage collection, as are any values reachable from their properties. for full ecmascript standard compliance, obj should be of a jsclass that has the jsclass_global_flags flag. ...
...see the sample code at jsapi user guide. ...
JS_SetOptions
obsolete since jsapi 27this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. enables and disables options on a jscon
text, replacing all previously set options. syntax uint32 js_setoptions(jscon
text *cx, uint32 options); name type description cx jscon
text * a con
text on which to set options. options uint32 the new set of options. this is the logical or of zero or more flags described below. description js_setoptions sets the option flags of a given js con
text cx. this function returns a uint32 value containing the previous values of the flags. to turn individual options on or off, use js_setoptions with js_getoptions: // turn o...
...ag is recommended. without it, the two scripts "x = 1" and "var x = 1", where no variable x is in scope, do two different things. the former creates a property on the global object. the latter creates a property on obj. with this flag, both create a global property. mxr id search for jsoption_varobjfix jsoption_private_is_nsisupports mozilla extension. the con
text's private data points to an xpcom object (see nsisupports). this is only meaningful if spidermonkey is built with xpconnect. mxr id search for jsoption_private_is_nsisupports jsoption_compile_n_go caller of js_compilescript et al promises to execute the compiled script once only, in the same scope object used for compilation. the caller may not modify objects on...
... reports. mxr id search for jsoption_dont_report_uncaught jsoption_relimit added in spidermonkey 1.8 throw an exception if a regular expression backtracks more than n3 times, where n is the length of the input string. mxr id search for jsoption_relimit jsoption_anonfunfix added in spidermonkey 1.8 disallow function () {} in statement con
text, per ecma-262 edition 3. this behavior is the default in releases where this option has been removed. mxr id search for jsoption_anonfunfix jsoption_jit obsolete since jsapi 11 added in spidermonkey 1.8.1 enables the jit compilation of code in the con
text. note that you may currently (jan 2009) experience bugs with this option enabled. mxr id search for jsoption_jit ...
...option_jit jsoption_no_script_rval added in spidermonkey 1.8.1 by setting this option, the application promises to the compiler that a null rval out-param will be passed to each call to js_executescript. mxr id search for jsoption_no_script_rval jsoption_unrooted_global added in spidermonkey 1.8.1 instructs the garbage collector not to consider the con
text's global object a root. the application must ensure that the global object survives as long as the jscon
text. mxr id search for jsoption_unrooted_global see also mxr id search for js_setoptions js_getoptions js_toggleoptions bug 880330 ...
JS_StringEqualsAscii
str jsflatstring * string to compare. asciibytes const char * ascii string to compare with. match bool * (js_stringequalsascii only) out parameter. ...
... str jsflatstring * string to compare. asciibytes const char * ascii string to compare with. match bool * (js_stringequalsascii only) out parameter. ...
... str jsflatstring * string to compare. asciibytes const char * ascii string to compare with. match bool * (js_stringequalsascii only) out parameter. ...
... str jsflatstring * string to compare. asciibytes const char * ascii string to compare with. match bool * (js_stringequalsascii only) out parameter. received the comparison result. ...
JS_ValueToFunction
v js::handlevalue the value to convert. description js_valuetofunction converts a specified javascript value, v, to a function. js_valuetoconstructor is the exactly same function as js_valuetofunction. ...
... v js::handlevalue the value to convert. description js_valuetofunction converts a specified javascript value, v, to a function. js_valuetoconstructor is the exactly same function as js_valuetofunction. ...
... v js::handlevalue the value to convert. description js_valuetofunction converts a specified javascript value, v, to a function. js_valuetoconstructor is the exactly same function as js_valuetofunction. ...
... v js::handlevalue the value to convert. description js_valuetofunction converts a specified javascript value, v, to a function. js_valuetoconstructor is the exactly same function as js_valuetofunction. ...
JS_ValueToString
v jsval the value to convert. ...
... v jsval the value to convert. ...
... v jsval the value to convert. ...
... v jsval the value to convert. description js_valuetostring converts a specified javascript value, v, to a string. it implements the tostring operator specified in ecma 262-3 §9.8. ...
JS_updateMallocCounter
malloc counter measures memory pressure for gc scheduling. it runs from maxmallocbytes down to zero. ...
... malloc counter measures memory pressure for gc scheduling. it runs from maxmallocbytes down to zero. ...
... malloc counter measures memory pressure for gc scheduling. it runs from maxmallocbytes down to zero. ...
... malloc counter measures memory pressure for gc scheduling. it runs from maxmallocbytes down to zero. maxmallocbytes is initialized with maxbytes parameter of js_newruntime, and could be configured later by calling js_getgcparameter with jsgc_max_malloc_bytes. ...
Parser API
terface debuggerstatement <: statement { type: "debuggerstatement"; } a debugger statement. note: the debugger statement is new in ecmascript 5th edition, although spidermonkey has supported it for years. declarations interface declaration <: statement { } any declaration node. note that declarations are considered statements; this is because declarations can appear in any statement con
text in the language recognized by the spidermonkey parser. note: declarations in arbitrary nested scopes are spidermonkey-specific. interface functiondeclaration <: function, declaration { type: "functiondeclaration"; id: identifier; params: [ pattern ]; defaults: [ expression ]; rest: identifier | null; body: blockstatement | expression; generator: boolean; expressi...
... block headers) accept array and object destructuring patterns in addition to plain identifiers. the left-hand sides of assignment expressions can be arbitrary expressions, but in the case where the expression is an object or array literal, it is interpreted by spidermonkey as a destructuring pattern. since the left-hand side of an assignment can in general be any expression, in an assignment con
text, a pattern can be any expression. in binding positions (such as function parameters, variable declarations, and catch headers), patterns can only be identifiers in the base case, not arbitrary expressions. interface objectpattern <: pattern { type: "objectpattern"; properties: [ { key: literal | identifier, value: pattern } ]; } an object-destructuring pattern. a literal property in an...
...ents: [ xml ]; } an e4x literal representing a single xml element. interface xmllist <: xml, expression { type: "xmllist"; contents: [ xml ]; } an e4x literal representing a list of xml elements. xml interface xml <: node { } xml data. interface xmlescape <: xml { type: "xmlescape"; expression: expression; } xml data with an escaped javascript expression. interface xml
text <: xml { type: "xml
text";
text: string; } literal xml
text. interface xmlstarttag <: xml { type: "xmlstarttag"; contents: [ xml ]; } an xml start tag. interface xmlendtag <: xml { type: "xmlendtag"; contents: [ xml ]; } an xml end tag. interface xmlpointtag <: xml { type: "xmlpointtag"; contents: [ xml ]; } an xml point tag. interface xmlname <: xml { ...
...sourcelocation returns: customxml/customexpression callback to produce a custom xml element node. xmllist(contents[, loc]) contents: [ customxml ] loc: sourcelocation returns: customxml/customexpression callback to produce a custom xml list node. xml xmlescape(expr[, loc]) expr: customexpression loc: sourcelocation returns: customxml callback to produce a custom xml escape node. xml
text(
text[, loc])
text: string loc: sourcelocation returns: customxml callback to produce a custom xml
text node. xmlstarttag(contents[, loc]) contents: [ customxml ] loc: sourcelocation returns: customxml callback to produce a custom xml start-tag node. xmlendtag(contents[, loc]) contents: [ customxml ] loc: sourcelocation returns: customxml callback to produce a custom xml end-tag node...
SpiderMonkey 1.8.5
s to specific types. js_addroot has been replaced by js_addobjectroot, js_addvalueroot and js_addstringroot; similar changes were made for js_addnamedroot and js_removeroot. since jsdoubles are now stored in the jsval, instead of on the heap, we no longer need to define roots for them. compartments spidermonkey 1.8.5 introduces the concept of compartments. a compartment is a global object, a con
text, and a set of related objects with no outside references (crosscompartment wrappers excepted). the new garbage collector can perform per-container garbage collection, which can be a significant performance improvement for certain workloads. no compartment may execute js code or call into jsapi on two os threads at the same time. for more information, see spidermonkey compartments. type changes j...
...root js_addnamedstringroot js_addnamedvalueroot js_addobjectroot js_addstringroot js_addvalueroot js_alreadyhasownpropertybyid js_anchorptr js_beginjsonparse (removed in future releases, replaced with js_parsejson) js_compilefilehandleforprincipalsversion js_compilescriptforprincipalsversion js_compileucfunctionforprincipalsversion js_compileucscriptforprincipalsversion js_consumejson
text (removed in future releases, replaced with js_parsejson) js_decompilescriptobject js_deepfreezeobject js_definefunctionbyid js_defineownproperty js_definepropertybyid js_deletepropertybyid js_deletepropertybyid2 js_doubleisint32 js_encodestringtobuffer js_entercrosscompartmentcall js_evaluatescriptforprincipalsversion js_evaluateucscriptforprincipalsversion js_executeregexp js_execu...
...ace is that it no longer counts operations; embedders are expected find another mechanism (such as a watchdog thread) to trigger regular callbacks, via js_triggeroperationcallback. regexp apis js_clearregexpstatics, js_newregexpobject, js_newregucexpobject, and js_setregexpinput now receive a pointer to the global object. this change was made in bug 571355 to move the regexp statics out of the con
text, to simplify cross compartment wrappers. property accessors js_propertystub, js_resolvestub, and user-defined functions of type jspropertyop (e.g. getters and setters) changed from passing jsvals to passing jsid as part of bug 549143. this bug introduced "fat" (64-bit) unboxed valued into the engine. garbage collection js_markgcthing was changed in bug 549143 to mark jsvals rather than void point...
...rincipalsversion js_executescript js_executescriptversion native functions jsnatives now use the "fast native" calling convention; see bug 581263. the js_fs macro has been adjusted, losing its third (unused) argument. js_isconstructing, used to differentiate between calls to native constructors with and without the new keyword, now takes a pointer to the native's vp, along with the native's con
text pointer, to figure out how the function was called. strings js_comparestrings received a new function signature with bug 609440, allowing us to correctly propagate exceptions when the underlying functions to retrieve the characters in the string failed. additionally, js_newstring, js_getstringbytes, and js_getstringchars were removed, replaced by fallible interfaces like js_getstringcharszandleng...
SpiderMonkey 1.8.7
s to specific types. js_addroot has been replaced by js_addobjectroot, js_addvalueroot and js_addstringroot; similar changes were made for js_addnamedroot and js_removeroot. since jsdoubles are now stored in the jsval, instead of on the heap, we no longer need to define roots for them. compartments spidermonkey 1.8.5 introduces the concept of compartments. a compartment is a global object, a con
text, and a set of related objects with no outside references (crosscompartment wrappers excepted). the new garbage collector can perform per-container garbage collection, which can be a significant performance improvement for certain workloads. no compartment may execute js code or call into jsapi on two os threads at the same time. for more information, see spidermonkey compartments. type changes j...
...root js_addnamedstringroot js_addnamedvalueroot js_addobjectroot js_addstringroot js_addvalueroot js_alreadyhasownpropertybyid js_anchorptr js_beginjsonparse (removed in future releases, replaced with js_parsejson) js_compilefilehandleforprincipalsversion js_compilescriptforprincipalsversion js_compileucfunctionforprincipalsversion js_compileucscriptforprincipalsversion js_consumejson
text (removed in future releases, replaced with js_parsejson) js_decompilescriptobject js_deepfreezeobject js_definefunctionbyid js_defineownproperty js_definepropertybyid js_deletepropertybyid js_deletepropertybyid2 js_doubleisint32 js_encodestringtobuffer js_entercrosscompartmentcall js_evaluatescriptforprincipalsversion js_evaluateucscriptforprincipalsversion js_executeregexp js_execu...
...ace is that it no longer counts operations; embedders are expected find another mechanism (such as a watchdog thread) to trigger regular callbacks, via js_triggeroperationcallback. regexp apis js_clearregexpstatics, js_newregexpobject, js_newregucexpobject, and js_setregexpinput now receive a pointer to the global object. this change was made in bug 571355 to move the regexp statics out of the con
text, to simplify cross compartment wrappers. property accessors js_propertystub, js_resolvestub, and user-defined functions of type jspropertyop (e.g. getters and setters) changed from passing jsvals to passing jsid as part of bug 549143. this bug introduced "fat" (64-bit) unboxed valued into the engine. garbage collection js_markgcthing was changed in bug 549143 to mark jsvals rather than void point...
...rincipalsversion js_executescript js_executescriptversion native functions jsnatives now use the "fast native" calling convention; see bug 581263. the js_fs macro has been adjusted, losing its third (unused) argument. js_isconstructing, used to differentiate between calls to native constructors with and without the new keyword, now takes a pointer to the native's vp, along with the native's con
text pointer, to figure out how the function was called. strings js_comparestrings received a new function signature with bug 609440, allowing us to correctly propagate exceptions when the underlying functions to retrieve the characters in the string failed. additionally, js_newstring, js_getstringbytes, and js_getstringchars were removed, replaced by fallible interfaces like js_getstringcharszandleng...
Shell global objects
if the property is omitted or v is null, don't attribute the source to any dom...
...oupof(obj) get the group of obj (an implementation detail). unwrappedobjectshavesameshape(obj1, obj2) returns true iff obj1 and obj2 have the same shape, false otherwise. both objects are unwrapped first, so this can be used on objects from different globals. sleep(dt) sleep for dt seconds. compile(code) compiles a string to bytecode, potentially throwing. parsemodule(code) parses source
text as a module and returns a module object. setmoduleresolvehook(function(module, specifier) {}) set the hostresolveimportedmodule hook to function. this hook is used to look up a previously loaded module object. it should be implemented by the module loader. getmoduleloadpath() return any --module-load-path argument passed to the shell. used by the module loader. parse(code) parses a string, ...
...dule(code) compile code on a helper thread. to wait for the compilation to finish and get the module object, call finishoffthreadmodule. finishoffthreadmodule() wait for off-thread compilation to complete. if an error occurred, throw the appropriate exception; otherwise, return the module object timeout([seconds], [func]) get/set the limit in seconds for the execution time for the current con
text. a negative value (default) means that the execution time is unlimited. if a second argument is provided, it will be invoked when the timer elapses. calling this function will replace any callback set by setinterruptcallback. interruptif(cond) requests interrupt callback if cond is true. if a callback function is set via timeout or setinterruptcallback, it will be called. no-op otherwise. invo...
...e given asm.js module function has been loaded directly from the cache. this function throws an error if fn is not a validated asm.js module. isasmjsfunction(fn) returns whether the given value is a nested function in an asm.js module that has been both compile- and link-time validated. wasmissupported() returns a boolean indicating whether webassembly is supported on the current device. wasm
texttobinary(str) translates the given
text wasm module into its binary encoding. wasmbinaryto
text(bin) translates binary encoding to
text format wasmextractcode(module) extracts generated machine code from webassembly.module. islazyfunction(fun) true if fun is a lazy jsfunction. isrelazifiablefunction(fun) ture if fun is a jsfunction with a relazifiable jsscript. enableshellallocationmetada...
Components.utils.Sandbox
de like: cc["@mozilla.org/nullprincipal;1"].createinstance(ci.nsiprincipal); from firefox 37 onwards, you can also specify the null principal by simply passing null as the principal argument. options the constructor accepts an optional parameter. this parameter is an object with the following optional properties: freshzone if true creates a new gc region separate from both the calling con
text's and the sandbox prototype's region. addons creating sandboxes whose expected lifetime is tied to that of a content window object will want to use samezoneas instead. samezoneas a javascript object in whose garbage collection region the sandbox should be created in. this helps to improve memory usage by allowing sandboxes to be discarded when that zone goes away. content scripts should pass...
...running in the sandbox. the exception is "-promise": the promise constructor is available by default for sandboxes, and you use this option to remove it from the sandbox. note that "-promise" is removed in firefox 37. ...
... the exception is "-promise": the promise constructor is available by default for sandboxes, and you use this option to remove it from the sandbox. note that "-promise" is removed in firefox 37. ...
...age. this example is to be run from scratchpad with environemnt set to browser. it alerts the dollar sign function. this code was tested on twitter.com and gets access to the jquery $. var sandboxscript = 'alert($)'; var options = { sandboxprototype: content, wantxrays: false // only set this to false if you need direct access to the page's javascript. true provides a safer, isolated con
text. }; var sandbox = cu.sandbox(content, options); cu.evalinsandbox(sandboxscript, sandbox); cu.nukesandbox(sandbox); ...
Observer Notifications
been opened and is ready, but has not yet loaded a document. xul-window-destroyed called just before a xul window is destroyed. xul-window-registered nsiappwindow called just after a top level xul window is registered with the window mediator service. xul-window-visible nsiappwindow called just after a xul window is made visible. browsing-con
text-discarded browsingcon
text called while a browsingcon
text is being discarded. by this point, the browsingcon
text will have been detached from its browsingcon
textgroup and parent windowcon
text, and removed from any browsingcon
text tree it was a part of. this is sent before browsingcon
text::closed() is updated. window-global-created windowglobalparent called just after a windowg...
... window-global-created windowglobalparent called just after a windowglobalparent is initialized. a windowglobal actor has a lifetime matching that of an nsglobalwindowinner. window-global-destroyed windowglobalparent called just before a windowglobalparent is destroyed. by this point, the wgp being destroyed will have cleaned up most of its state, including its browsingcon
text children and jswindowactors. additionally, it will have been removed from any windowcon
text tree it was part of. io notifications these topics can be used to watch the io service for useful information. topic description offline-requested called to query whether the application can go offline. the attempt to go offline can be canceled. note: if your code choos...
...anager disconnects from it. by listening for message-manager-disconnect you will be informed when this happens. permission manager topic subject data description perm-changed nsipermission "deleted"/"added"/"changed"/"cleared" this notification is sent when a permission changes. the subject of the notification is the permission object. con
text menu topic subject data description content-con
textmenu an object containing two properties: event the event that triggered the con
text menu. addoninfo an empty object that add-ons can use to send data to the main process. null this notification is sent when the con
text menu is displayed. it is sent, and received, i...
...n object containing two properties: event the event that triggered the con
text menu. addoninfo an empty object that add-ons can use to send data to the main process. null this notification is sent when the con
text menu is displayed. it is sent, and received, in the content process: you can't listen to it in the chrome process. it's used by the con
text-menu module in the add-on sdk, to help send information to the con
text-menu code running in the chrome process when a con
text menu is displayed. ...
imgIContainer
internally, this interface also manages animation of images. ...
...unsigned long palettelength); native code only! obsolete since gecko 2.0 void clear(); obsolete since gecko 1.9.2 gfximagesurface copycurrentframe(); native code only! obsolete since gecko 2.0 gfximagesurface copyframe(in pruint32 awhichframe, in pruint32 aflags); native code only! void decodingcomplete(); obsolete since gecko 2.0 void draw(in gfxcon
text acon
text, in gfxgraphicsfilter afilter, [const] in gfxmatrix auserspacetoimagespace, [const] in gfxrect afill, [const] in nsintrect asubimage, [const] in nsintsize aviewportsize, in pruint32 aflags); native code only! void endframedecode(in unsigned long framenumber); obsolete since gecko 2.0 void ensurecleanframe(in unsigned long aframenum, in print32 ax, in print32 ay, in pri...
...flag_* variety. return value missing description exceptions thrown missing exception missing description decodingcomplete() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) void decodingcomplete(); parameters none. exceptions thrown missing exception missing description native code only!draw draw the current frame on to the con
text specified. void draw( in gfxcon
text acon
text, in gfxgraphicsfilter afilter, [const] in gfxmatrix auserspacetoimagespace, [const] in gfxrect afill, [const] in nsintrect asubimage, [const] in nsintsize aviewportsize, in pruint32 aflags ); parameters acon
text the thebes con
text to draw the image to. afilter the filter to be used if we're scaling the image. ausersp...
...when aflags includes flag_clamp, the image will be extended to this area by clamping image sample coordinates. otherwise, the image will be automatically tiled as necessary. ...
nsIDOMWindowInternal
well documented in window, those articles are linked to rather than re-documented. however, they are not guaranteed to document all available arguments (i.e. see window.prompt). method overview firefox 3.5 note the prompt() and find() methods changed in firefox 3.5 to make all their parameters optional; in previous versions, all parameters were required. ...
...e linked to rather than re-documented. however, they are not guaranteed to document all available arguments (i.e. see window.prompt). method overview firefox 3.5 note the prompt() and find() methods changed in firefox 3.5 to make all their parameters optional; in previous versions, all parameters were required. ...
...top() void print() void moveto(in long xpos, in long ypos) void moveby(in long xdif, in long ydif) void resizeto(in long width, in long height) void resizeby(in long widthdif, in long heightdif) void scroll(in long xscroll, in long yscroll) nsidomwindow window interface's open() method loads the specified resource into the browsing con
text (window, <iframe> or tab) with the specified name. if the name doesn't exist, then a new window is opened and the specified resource is loaded into its browsing con
text.">open(in domstring url, in domstring name, in domstring options) nsidomwindow nsisupports aextraargument) void close() void updatecommands(in domstring action) boolean find([optional] in domstr...
...late various browser security features. pkcs11 nsidompkcs11 obsolete: this property is not supported in newer versions of firefox. controllers nsicontrollers readonly: returns the xul controllers of the chrome window. opener nsidomwindowinternal returns a reference to the window that opened this current window. status domstring sets the
text in the status bar at the bottom of the browser or returns the previously set
text. defaultstatus domstring gets/sets the status bar
text for the given window. location nsidomlocation readonly: returns a nsidomlocation object, which contains information about the url of the document. innerwidth long width of the browser window. innerheight ...
nsILoadGroup
netwerk/base/public/nsiloadgroup.idlscriptable a load group maintains a collection of nsirequest objects. inherits from: nsirequest last changed in gecko 1.7 method overview void addrequest(in nsirequest arequest, in nsisupports acon
text); void removerequest(in nsirequest arequest, in nsisupports acon
text, in nsresult astatus); attributes attribute type description activecount unsigned long returns the count of "active" requests (that is requests without the load_background bit set). read only. defaultloadrequest nsirequest accesses the default load request for the group. each time a number of requests are added to a group, the defaultloadrequest m...
...s a new request to the group. this will cause the default load flags to be applied to the request. if this is a foreground request then the groupobserver's onstartrequest will be called. if the request is the default load request or if the default load request is null, then the load group will inherit its load flags from the request. void addrequest( in nsirequest arequest, in nsisupports acon
text ); parameters arequest the request to be added to the load group. acon
text the con
text to be passed to the onstartrequest notification. removerequest() removes a request from the group. if this is a foreground request then the groupobserver's onstoprequest will be called. by the time this call ends, arequest will have been removed from the loadgroup, even if this fu...
... astatus the status to be passed to the onstoprequest notification. ...
... this is a foreground request then the groupobserver's onstoprequest will be called. by the time this call ends, arequest will have been removed from the loadgroup, even if this function throws an exception. void removerequest( in nsirequest arequest, in nsisupports acon
text, in nsresult astatus ); parameters arequest the request to be removed from the load group. acon
text the con
text to be passed to the onstoprequest notification. astatus the status to be passed to the onstoprequest notification. ...
nsIParentalControlsService
read only. loggingenabled boolean true if the curr...
...read only. loggingenabled boolean true if the current user account has parental controls logging enabled. if this is true, applications should log relevant events...
...hich the content was saved if it was not blocked. requesturioverride() requests that a blocked uri be allowed through parental control filters. this method may block while the operating system presents user interface to handle the override request (such as an "enter an administrator's password" dialog box). boolean requesturioverride( in nsiuri atarget, in nsiinterfacerequestor awindowcon
text optional ); parameters atarget the uri to be overridden. awindowcon
text optional the window generating the event. return value true if the block was successfully overridden, otherwise false. requesturioverrides() requests that a set of uris be allowed through the parental control filters. this method may block while the operating system presents user interface to handle the override...
...successfully overridden, otherwise false. requesturioverrides() requests that a set of uris be allowed through the parental control filters. this method may block while the operating system presents user interface to handle the override request (such as an "enter an administrator's password" dialog box). boolean requesturioverrides( in nsiarray atargets, in nsiinterfacerequestor awindowcon
text optional ); parameters atargets an array of nsiuri objects, each representing a uri for which an override is desired. awindowcon
text optional the window generating the event. return value true if the block was successfully overridden, otherwise false. ...
nsIPrincipal
on the web, for example, a typical principal is comprised of an url scheme, host, and port. inherits from: nsiserializable last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) for details on principals, how they work, and how to get the appropriate one, see security check basics. ...
...lity(in string capability); native code only! void checkmayload(in nsiuri uri, in boolean report); void disablecapability(in string capability, inout voidptr annotation); native code only! void enablecapability(in string capability, inout voidptr annotation); native code only! boolean equals(in nsiprincipal other); jsprincipals getjsprincipals(in jscon
text cx); native code only! void getpreferences(out string prefbranch, out string id, out string subjectname, out string grantedlist, out string deniedlist, out boolean istrusted); boolean iscapabilityenabled(in string capability, in voidptr annotation); native code only! void revertcapability(in string capability, inout voidptr annotation); native code only! void s...
...ey are the same principal, they have the same origin, or have the same certificate fingerprint id. boolean equals( in nsiprincipal other ); parameters other the other principal to compare against. return value true if the two principals are equivalent; otherwise false. native code only!getjsprincipals returns the js equivalent of the principal. jsprincipals getjsprincipals( in jscon
text cx ); parameters cx missing description return value missing description getpreferences() returns the security preferences associated with this principal. void getpreferences( out string prefbranch, out string id, out string subjectname, out string grantedlist, out string deniedlist, out boolean istrusted ); parameters prefbranch on return, contains the preferen...
...al if they are the same object, they have the same origin, or they have the same certificate id. a principal always subsumes itself. note: prior to gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1), this was not available to scripts. the system principal subsumes itself and all other principals. a null principal (corresponding to an unknown, hence assumed minimally privileged, security con
text) is not equal to any other principal (including other null principals), and therefore does not subsume anything but itself. both codebase and certificate principals are subsumed by the system principal, but no codebase or certificate principal yet subsumes() any other codebase or certificate principal. this may change in a future release; note that nsiprincipal is unfrozen, not slated to be froze...
nsIRequestObserver
netwerk/base/public/nsirequestobserver.idlscriptable this interface is used by various streams (such as nsichannel ) to indicate the start and end of a request. ...
... netwerk/base/public/nsirequestobserver.idlscriptable this interface is used by various streams (such as nsichannel ) to indicate the start and end of a request. ...
...nsisupports acon
text); void onstoprequest(in nsirequest arequest, in nsisupports acon
text, in nsresult astatuscode); methods onstartrequest() called to signify the beginning of an asynchronous request. note: an exception thrown from onstartrequest has the side-effect of causing the request to be canceled. void onstartrequest( in nsirequest arequest, in nsisupports acon
text ); parameters arequest request being observed. acon
text user defined con
text. onstoprequest() called to signify the end of an asynchronous request. this call is always preceded by a call to onstartrequest(). note: an exception thrown from onstoprequest is generally ignored. ...
... in nsisupports acon
text ); parameters arequest request being observed. acon
text user defined con
text. onstoprequest() called to signify the end of an asynchronous request. this call is always preceded by a call to onstartrequest(). note: an exception thrown from onstoprequest is generally ignored. void onstoprequest( in nsirequest arequest, in nsisupports acon
text, in nsresult astatuscode ); parameters arequest request being observed. acon
text user defined con
text. astatuscode reason for stopping (ns_ok if completed successfully) see also nsistreamlistener ...
nsIScriptableInputStream
urn value the data from the stream, which will be an empty string if eof has been reached. exceptions thrown ns_error_failure if there are not enough bytes available to read acount amount of data. ns_base_stream_would_block if reading from the input stream would block the calling thread (non-blocking mode only). remarks this interface provides javascript with a way to read ascii
text from a nsiinputstream. however, it does not address the problem of reading arbitrary binary data from a stream. for binary input see nsibinaryinputstream. note: starting in gecko 2.0, you can use the netutils.jsm javascript code module and its readinputstreamtostring() method to read arbitrary binary data into a javascript string. the nsscriptableinputstream component implements this interface...
... readinputstreamtostring() method to read arbitrary binary data into a javascript string. the nsscriptableinputstream component implements this interface. this interface was frozen for gecko 1.2. from gecko 2.0 interfaces are no longer frozen. examples list contents of xpi and read file contents this example here uses the read function. it takes a input stream from the zip reader and outputs the
text in it. full example using the zip interfaces is seen here: list contents of xpi and read file contents. remember: the nsiscriptableinputstream has a contract where `init` should only be called once, and should always be closed. excerpt of the stream for this stream article is here, this is only an excerpt so cannot copy paste this code into scratchpad. var {classes: cc, interfaces: ci, results: c...
...try.realsize); } finally { stream.close(); } example usage in ondataavailable remember: the nsiscriptableinputstream has a contract where `init` should only be called once, and should always be closed. ...
...ndataavailable remember: the nsiscriptableinputstream has a contract where `init` should only be called once, and should always be closed. ...
nsIScriptableUnescapeHTML
siuri baseuri, in nsidomelement element ); parameters fragment a string of html or xml source to parse as a fragment. isxml set this to true if the fragment is an xml string; otherwise set it to false. baseuri pointer to the base uri against which to resolve any uris included in the fragment. this parameter is ignored if isxml is false. ...
... set this to true if the fragment is an xml string; otherwise set it to false. baseuri pointer to the base uri against which to resolve any uris included in the fragment. this parameter is ignored if isxml is false. element the nsidomelement to be used as the con
text node for the purposes of the fragment parsing algorithm. return value an nsidomdocumentfragment of the element with the new
text appended. exceptions thrown ns_error_failure unable to append the
text to the element. unescape() convents html source into plain
text. this is equivalent to calling nsiparserutils::converttoplain
text(src, nsidocumentencoder::outputselectiononly | nsidocumentencoder::outputabsolutelinks, 0). you should call nsiparserutils::converttoplain
text() instead of calling this method. astring une...
... exceptions thrown ns_error_failure unable to convert the string. ...
... exceptions thrown ns_error_failure unable to convert the string. ...
nsISelectionController
selection_find 128 num_selectiontypes 8 9 selection_anchor_region 0 ...
... selection_find 128 num_selectiontypes 8 9 selection_anchor_region 0 selection_focus_region 1 ...
... 1.9.1 - 1.9.2 2.0 selection_none 0 selection_normal 1 selection_spellcheck 2 selection_ime_rawinput 4 selection_ime_selectedraw
text 8 selection_ime_converted
text 16 selection_ime_selectedconverted
text 32 selection_accessibility 64 for accessibility api usage. selection_find 128 num_selectiontypes 8 9 selection_anchor_region 0 selection_focus_region 1 selection_whole_selection 2 ...
...collapsing the selection if the extend = pr_false the "point" of selection that is extended is considered the "focus" point, or the last point adjusted by the selection. void charactermove( in boolean forward, in boolean extend ); parameters forward forward or backward if pr_false. extend should it collapse the selection or extend it? checkvisibility() checks if
textnode and offsets are actually rendered in the current precon
text. boolean checkvisibility( in nsidomnode node, in short startoffset, in short endoffset ); parameters node nsidomnode to test. startoffset offset in dom to first char of
textnode to test. endoffset offset in dom to last char of
textnode to test. return value true if visible, false if ...
nsITaskbarPreviewController
s from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) clients should provide their own implementation of this interface. depending on whether the controller is connected to an nsitaskbartabpreview or nsitaskbarwindowpreview, only certain methods and attributes need to be implemented. method overview boolean drawpreview(in nsidomcanvasrenderingcon
text2d ctx); boolean drawthumbnail(in nsidomcanvasrenderingcon
text2d ctx, in unsigned long width, in unsigned long height); boolean onactivate(); void onclick(in nsitaskbarpreviewbutton button); void onclose(); attributes attribute type description height unsigned long the height in pixels of the preview image. this value may ch...
... drawpreview() for more information. read only. note: although these attributes are read only, that indicates that the previews controlled by an nsitaskbarpreviewcontroller cannot alter these values. the controller and its supporting code, however, may change this values at any time. methods drawpreview() invoked by nsitaskbarpreview when it needs to render the preview. ...
...se values. the controller and its supporting code, however, may change this values at any time. methods drawpreview() invoked by nsitaskbarpreview when it needs to render the preview. the specified con
text is attached to a surface with the controller's width and height, the values of which are obtained immediately prior to calling this method. boolean drawpreview( in nsidomcanvasrenderingcon
text2d ctx ); parameters ctx an nsidomcanvasrenderingcon
text2d object representing the drawing con
text into which the preview is to be rendered. note that this con
text is not actually attached to a canvas element. return value true if you want a frame drawn around the preview, otherwise false. drawthumbnail() invoked by the taskbar preview when it needs to draw the thumbnail in the taskbar'...
...g the drawing con
text into which the preview is to be rendered. note that this con
text is not actually attached to a canvas element. return value true if you want a frame drawn around the preview, otherwise false. drawthumbnail() invoked by the taskbar preview when it needs to draw the thumbnail in the taskbar's application preview window. boolean drawthumbnail( in nsidomcanvasrenderingcon
text2d ctx, in unsigned long width, in unsigned long height ); parameters ctx an nsidomcanvasrenderingcon
text2d object representing the drawing con
text into which the thumbnail is to be rendered. note that this con
text is not actually attached to a canvas element. width the width of the surface backing the drawing con
text. height the height of the surface backing the drawing con
text. n...
nsIURIFixup
fixup_flag_allow_keyword_lookup 1 allow the fixup to use a keyword lookup service to compl...
...p = components.classes["@mozilla.org/docshell/urifixup;1"] .createinstance(components.interfaces.nsiurifixup); method overview nsiuri createexposableuri(in nsiuri auri); nsiuri createfixupuri(in autf8string auri
text, in unsigned long afixupflags); nsiuri keywordtouri(in autf8string akeyword); nsiurifixupinfo getfixupuriinfo(in autf8string auri
text, in unsigned long afixupflags); constants constant value description fixup_flag_none 0 no fixup flags. fixup_flag_allow_keyword_lookup 1 allow the fixup to use a keyword lookup service to complete the uri. the fixup object implementer should honour this flag and only perform any lengthy keyword (or search) operation if it is set. fixup...
... ns_error_unknown_protocol when we can not get a protocol handler service for the uri scheme. ns_error_malformed_uri when the exposable portion of auri is malformed. createfixupuri() converts the specified string into a uri, first attempting to correct any errors in the syntax or other vagaries. returns a well formed uri or nsnull if it cannot. nsiuri createfixupuri( in autf8string auri
text, in unsigned long afixupflags ); parameters auri
text candidate uri. afixupflags flags that govern ways the uri may be fixed up. return value the converted uri. keywordtouri() converts the specified keyword string into a uri. note that it is the caller's responsibility to check whether keywords are enabled and whether akeyword is a sensible keyword. nsiuri keywordtouri( in autf8s...
...rd is a sensible keyword. nsiuri keywordtouri( in autf8string akeyword ); parameters akeyword the keyword to convert into a uri. return value the converted uri. getfixupuriinfo() same as createfixupuri, but returns information about what it corrected (e.g. whether we could rescue the uri or "just" generated a keyword search uri instead). nsiuri createfixupuri( in autf8string auri
text, in unsigned long afixupflags ); parameters auri
text candidate uri. afixupflags flags that govern ways the uri may be fixed up. return value the information as an nsiurifixupinfo see also nsiuri ...
nsIWebSocketChannel
eamonkey 2.5) implemented by: ?????????????????????????????????????. to create an instance, use: var websocketchannel = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsiwebsocketchannel); method overview void asyncopen(in nsiuri auri, in acstring aorigin, in nsiwebsocketlistener alistener, in nsisupports acon
text); void close(in unsigned short acode, in autf8string areason); void sendbinarymsg(in acstring amsg); void sendmsg(in autf8string amsg); attributes attribute type description extensions acstring sec-websocket-extensions response header value. read only. loadgroup nsiloadgroup the load group of the websockets code. ...
...point is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection. 1002 close_protocol_error the endpoint is terminating the connection due to a protocol error. 1003 close_unsupported the connection is being terminated because the endpoint received data of a type it cannot accept (for example, a
text-only endpoint received binary data). 1004 close_too_large the endpoint is terminating the connection because a data frame was received that is too large. 1005 close_no_status reserved. indicates that no status code was provided even though one was expected. 1006 close_abnormal reserved. used to indicate that a connection was closed abnormally (that is...
...pen() and are not called until after asyncopen() returns. if asyncopen() returns successfully, the protocol implementation promises to call at least onstart and onstop of the listener. note: implementations should throw ns_error_already_opened if the websocket connection is reopened. void asyncopen( in nsiuri auri, in acstring aorigin, in nsiwebsocketlistener alistener, in nsisupports acon
text ); parameters auri the uri of the websocket protocol; this may be redirected. aorigin the uri of the originating resource. alistener the nsiwebsocketlistener implementation. acon
text an opaque parameter forwarded to alistener's methods. close() void close( in unsigned short acode, in autf8string areason ); parameters acode the status of the connect...
...hort acode, in autf8string areason ); parameters acode the status of the connection when closed; see status codes for possible values. areason a human-readable string describing the reason the connection closed. sendbinarymsg() sends a binary message to the websocket peer. void sendbinarymsg( in acstring amsg ); parameters amsg the data to send. sendmsg() sends a
text message to the websocket peer. void sendmsg( in autf8string amsg ); parameters amsg the utf-8 string to send. see also websockets websocket ...
nsIWindowWatcher
that each will be visited exactly once. nsisimpleenumerator getwindowenumerator(); parameters none. return value an nsisimpleenumerator which will itself return nsisupports objects which can be nsisupports.queryinterface() (queryinterfaced) to an nsidomwindow. openwindow() creates a new window. it will automatically be added to our list. note: this method may examine the javascript con
text stack for purposes of determining the security con
text to use for the search for a given window named aname. note: this method will try to set the default charset for the new window to the default charset of aparent. this is not guaranteed, however. note: this method may dispatch a "toplevel-window-ready" notification via nsiobserverservice if the window did not already exist. note...
...s aparent the parent window, if any. null if no parent. if it is impossible to get to an nsiwebbrowserchrome from aparent, this method will effectively act as if aparent were null. aurl the url to open in the new window. must already be escaped, if applicable. can be null. aname a window name assigned using window interface's open() method loads the specified resource into the browsing con
text (window, <iframe> or tab) with the specified name. if the name doesn't exist, then a new window is opened and the specified resource is loaded into its browsing con
text.">window.open. can be null. if a window with this name already exists, the openwindow call may just load aurl in it (if aurl is not null) and return it. afeatures window features. see window interface's open() method loads the s...
...can be null. ...
...can be null. list of feature options aarguments extra argument(s) to be attached to the new window as the window.arguments property. ...
Xray vision
gecko runs javascript from a variety of different sources and at a variety of different privilege levels. the javascript code that along with the c++ core, implements the browser itself is called chrome code and runs using system privileges. if chrome-privileged code is compromised, the attacker can take over the user's computer. javascript loaded from normal web pages is called content code. ...
...that includes the code samples in this article. xray semantics for object and array the exceptions are object and array: their interesting state is in javasc...
...; // date objects are xrayed console.log(sandbox.date.getfullyear()); // -> 2014 // but you can waive xray vision console.log(components.utils.waivexrays(sandbox.date).getfullyear()); // -> 1000 to test out examples like this, you can use the scratchpad in browser con
text for the code snippet, and the browser console to see the expected output. because code running in scratchpad's browser con
text has chrome privileges, any time you use it to run code, you need to understand exactly what the code is doing. that includes the code samples in this article. xray semantics for object and array the exceptions are object and array: their interesting state is in javascript, not c++. this means that the semantics of their xrays have to be independently defined: they can't simply be defined as "t...
... is not visible in the xray second, we want to prevent the chrome code from running content code, so functions and accessor properties of the object are not visible in the xray. these rules are demonstrated in the script below, which evaluates a script in a sandbox, then examines the object attached to the sandbox. to test out examples like this, you can use the scratchpad in browser con
text for the code snippet, and the browser console to see the expected output. because code running in scratchpad's browser con
text has chrome privileges, any time you use it to run code, you need to understand exactly what the code is doing. that includes the code samples in this article. /* the sandbox script: * redefines object.prototype.tosource() * creates a person() constructor that: * defi...
The libmime module
the parser is object-oriented. there is a class for each mime type, and each class is responsible for parsing itself, and/or handing the input data off to one of its child objects. the definition of these classes is somewhat idiosyncratic and consists of an internally defined object system, instead of c++. there is one header file and one source file for each class (for example, the mimeinline
text class is defined in "mime
text.h" and "mime
text.c".) each header file follows the following boiler-plate form: typedefs these come first to avoid circular dependencies. typedef struct foobarclass foobarclass; typedef struct foobar foobar; class declaration theis structure defines the callback routines and other per-class data of the class defined in this module. struct foo...
...ass tries to continue on this method. the easiest way to do this is to make use of the mime_superclass macro that was defined at the top of the file, as shown below. the alternative to that involves typing the literal name of the direct superclass of the class defined in this file, which will be a maintenance headache if the class hierarchy changes. if you use the mime_superclass idiom, then a
textual change is required in only one place if this class's superclass changes. static void foobar_finalize (mimeobject *object) { ((mimeobjectclass*)&mime_superclass)->finalize(object); // right parentclass.whatnot.object.finalize(object); // (works...) object->class->superclass->finalize(object); // wrong!! } the class hierarchy ...
... | | | | |--- mimemultipartalternative | | | | | |--- mimemultipartrelated | | | | | |--- mimemultipartappledouble | | | | | |--- mimesunattachment | | | | | |--- mimemultipartsigned (abstract) | | | |--- mimemessage | | | |--- mimeuntyped
text | |--- mimeleaf (abstract) | | | |--- mimeinline
text (abstract) | | | | | |--- mimeinline
textplain | | | | | |--- mimeinline
texthtml | | | | | |--- mimeinline
textrich
text | | | | | | | |--- mimeinline
textenriched | | | | | |--- mimeinlin...
... | |--- mimeleaf (abstract) | | | |--- mimeinline
text (abstract) | | | | | |--- mimeinline
textplain | | | | | |--- mimeinline
texthtml | | | | | |--- mimeinline
textrich
text | | | | | | | |--- mimeinline
textenriched | | | | | |--- mimeinline
textvcard | | | | | |--- mimeinline
textcalendar | | | |--- mimeinlineimage | | | |--- mimeexternalobject | |--- mimeexternalbody ...
Working with windows in chrome code
pened inside a tab of <tabbrowser>. the elements above the chrome document opened in the tab are separate from your chrome document. the following two subsections describe how to cross chrome-content boundaries in either way, i.e. accessing elements which are ancestors of your chrome document, or accessing elements which are descendants of your chrome document (but nevertheless in a different con
text). accessing content documents assume you have a document loaded in a <tabbrowser>, <browser>, or <iframe> element inside your document. you can use browser.contentdocument to access that document and browser.contentwindow to access the window object of that document. you should be aware of xpcnativewrappers when working with untrusted content. with xpcnativewrappers turned on (which is the def...
...ta to window when opening it with opendialog when you open a window using window.opendialog or nsiwindowwatcher.openwindow, you can pass an arbitrary number of arguments to that window. arguments are simple javascript objects, accessible through window.arguments property in the opened window. in this example, we're using window.opendialog to open a progress dialog. we pass in the current status
text as well as the maximum and current progress values. note that using nsiwindowwatcher.openwindow is a bit less trivial . todo: link to how to pass an xpcom object to a new window when it has a more useful example opener code: window.opendialog("chrome://test/content/progress.xul", "myprogress", "chrome,centerscreen", {status: "reading remote data", maxprogress...
...ivial . ...
...etelementbyid("status"); gprogressmeter = document.getelementbyid("progressmeter"); if("arguments" in window && window.arguments.length > 0) { maxprogress = window.arguments[0].maxprogress; setprogress(window.arguments[0].progress); setstatus(window.arguments[0].status); } } function setprogress(value) { gprogressmeter.value = 100 * value / maxprogress; } function setstatus(
text) { gstatus.value = "status: " +
text + "..."; } ]]></script> <label id="status" value="(no status)" /> <hbox> <progressmeter id="progressmeter" mode="determined" /> <button label="cancel" oncommand="close();" /> </hbox> </window> example 2: interacting with the opener sometimes an opened window needs to interact with its opener; for example, it might do so in order to give notice that ...
Working with ArrayBuffers
e following work: //github.com/realityripple/uxp/blob/master/js/src/ctypes/ctypes.cpp#3080 //github.com/realityripple/uxp/blob/master/js/src/vm/arraybufferobject.cpp#1301 example 1 - image data the following example illustrates how to transfer a byte array pointed by ctypes.uint8_t.ptr to imagedata of canvas. ...
... the following example illustrates how to transfer a byte array pointed by ctypes.uint8_t.ptr to imagedata of canvas. this example is based on the fact that the imagedata returned from canvasrenderingcon
text2d.getimagedata is a uint8clampedarray view for an arraybuffer. ...
...strates how to transfer a byte array pointed by ctypes.uint8_t.ptr to imagedata of canvas. this example is based on the fact that the imagedata returned from canvasrenderingcon
text2d.getimagedata is a uint8clampedarray view for an arraybuffer. ...
...ted by ctypes.uint8_t.ptr to imagedata of canvas. this example is based on the fact that the imagedata returned from canvasrenderingcon
text2d.getimagedata is a uint8clampedarray view for an arraybuffer. the following codeblock provides a basic example of getting and setting uint8clampedarray and arraybuffer of imagedata: // con
text is a canvasrenderingcon
text2d of some canvas var imagedata = con
text.getimagedata(x, y, w, h); var array = imagedata.data; // array is a uint8clampedarray var buffer = imagedata.data.buffer; // buffer is a arraybuffer // incomingbuffer is a typedarray var imagedata2 = con
text.createimagedata(w, h); imagedata2.data.set(incomingbuffer); further, if you have a byte array pixelbuffer, and you need to create imagedata from it. the data property holds an array of byt...
Drawing and Event Handling - Plugins
set to either np_full to indicate full-page plug-in printing, or np_embed if this is an embedded plug-in printed as part of the window in which it is embedded. an embedded plug-in shares printing with the browser. the plug-in prints the part of the page it occupies, and the browser handles the rest of the printing process, including displaying print dialog boxes, getting the printer device con
text, and, of course, printing the rest of the page. an embedded plug-in can set the pluginprinted field in its printinfo parameter to false (the default). this is a field of the _npfullprint substructure of the npprint structure. the browser displays the necessary print dialog boxes and calls npp_print again. this time, printinfo->mode should be set to np_embed. a full-page plug-in handles the p...
...npp_print is also called with printinfo->mode equal to np_embed when the instance is embedded. in this case, platformprint->embedprint.window contains the window in which the plug-in should print. on ms windows, note that the coordinates for the window rectangle are in twips format. for this reason, you need to convert the x - and y - coordinates using the windows api call dptolp when you output
text. setting the window the browser calls the npp_setwindow function to set the window in which a plug-in draws or returns an error code. this window is valid for the life of the instance, or until npp_setwindow is called again with a different value. subsequent calls to npp_setwindow for a given instance usually mean that the window has been resized. if either window or window->window is null, th...
...s the npn_getvalue method. nperror npn_getvalue(npp instance, npnvariable variable, void *value); the instance parameter represents the current plug-in. unix and ms windows the queried information is returned in the variable parameter. this parameter is valid only for the unix and ms windows platforms. for unix, the values are either the current display (npnvxdisplay) or the application's con
text (npnvxtappcon
text). for ms windows, the value is the native window on which the plug-in drawing occurs (npnvnetscapewindow). the value parameter contains the name of the plug-in. you can also use npn_getvalue to help create a menu or dialog box for a windowless plug-in. windowed plug-ins the browser gives each windowed plug-in its own native window, often a child window of the the browser win...
...sign possibilities: you can place a windowless plug-in within a section; other sections can exist both above and below it. you can create transparent plug-ins. in this case, the browser draws the part of the page that exists behind the plug-in. the windowless plug-in draws only the parts of itself that are opaque. this way, the plug-in can draw an irregularly shaped area, such as a figure, or
text over the existing background. the browser supports off-screen drawing of plug-ins. this makes it possible to manipulate plug-in contents. for example, a 3d application could use the contents of a plug-in as a
texture map. because windowless plug-ins can be layered or drawn to arbitrary drawables, the browser (as opposed to the native windowing system) is responsible for controlling both their ...
UI Tour - Firefox Developer Tools
all the javascript source files loaded into the page, and enables you to select one to debug. at the top level sources are organized by origin, and under that they're organized by the directory structure from which they are served. you can search for a file using ctrl + p (cmd + p on a mac). web extensions are listed in the source list pane using the extension's name. there are several con
text menu options available for individual files and folders or groups; typically viewed by right-clicking on the item. for files, the following con
text menu options are available: copy source uri copies the full identifier of the file to the clipboard. ignore source causes the debugger to skip the file when "stepping into" functions; this can be helpful for avoiding stepping into libraries use...
...entifier of the file to the clipboard. ignore source causes the debugger to skip the file when "stepping into" functions; this can be helpful for avoiding stepping into libraries used by your code. when a file is ignored, it has a small eye icon next to it in place of its regular icon. download file opens a file dialog so you can save the file locally. for folders and groups, the following con
text menu options are available: collapse all collapses all subfolders of the item. expand all expands all subfolders of the item. set directory root changes the source list view so that only that item and its children are visible. the name of the selected directory is shown at the top of the source list pane; clicking this name reverts the pane to showing all source items. ignore (since firef...
...the function and the filename and line number. clicking a line selects the corresponding line in the source pane. note: if you click step over (f10) after changing the selected line in the source pane, the debugger executes until reaching the line following the newly-selected line (disregarding whatever line the debugger originally stopped at). right-clicking in the call stack pane opens a con
text menu with the following items: restart frame restarts execution at the beginning of the current frame. enable framework grouping collects items belonging to a framework into a collapsible group (for example, jquery in the screenshot above). when grouping is enabled, the menu option changes to disable framework grouping. copy source uri copies the full identifier of the source file to the cli...
...ot above). when grouping is enabled, the menu option changes to disable framework grouping. copy source uri copies the full identifier of the source file to the clipboard. ignore source causes the debugger to skip the file when "stepping into" functions. any stack frames from the ignored source file are hidden in the call stack pane. (to remove this restriction, choose unignore source in the con
text menu of the sources list or the source pane.) copy stack trace copies all items in the call stack (including their uris and line number) to the clipboard. scopes in the right-hand pane you'll see a label "scopes" with a disclosure arrow next to it. when the debugger's paused, you'll be able to expand this section to see all objects that are in scope at this point in the program: objects are ...
Shader Editor - Firefox Developer Tools
ovide 2 programs called shaders which are called at the appropriate stages of the opengl rendering pipeline: a vertex shader, which computes the clip space coordinates of each vertex to be drawn, and a fragment shader, which determines the color for each pixel to be drawn. these shaders are written in opengl shading language, or glsl. in webgl they can be included in a page in several ways: as
text hardcoded in javascript strings, as separate files included using <script> tags, or retrieved from the server as plain
text. javascript code running in the page then sends them for compilation using the webgl apis, and they're executed on the device's gpu when needed. with the shader editor, you can examine and edit the source of the vertex and fragment shaders. here's another screencast, showi...
... editor the shader editor is disabled by default. to enable it, open the toolbox settings and check "shader editor" in the "default firefox developer tools" item. you'll now see "shader editor" appear in the toolbar. click it and the shader editor opens. at first you'll just see a blank window with a button asking you to reload the page: to get started, load a page which creates a webgl con
text and loads a program into it. the screenshots below are from the unreal engine demo. you'll now see a window divided into three panes: a list of all the glsl programs on the left, the vertex shader for the currently selected program in the middle, and the fragment shader for the currently selected program on the right: managing programs the left hand pane lists all programs currently in use b...
...program into it. the screenshots below are from the unreal engine demo. you'll now see a window divided into three panes: a list of all the glsl programs on the left, the vertex shader for the currently selected program in the middle, and the fragment shader for the currently selected program on the right: managing programs the left hand pane lists all programs currently in use by a webgl con
text. if you hover over an entry in the list, the geometry drawn by that program is highlighted in red: if you click the eyeball icon just left of the program's entry, that program is disabled. this is useful for focusing on certain shaders or hiding overlapping geometry: if you click the entry, its vertex and fragment shaders are shown in the other two panes, and you can edit them. editing shaders...
...bled. this is useful for focusing on certain shaders or hiding overlapping geometry: if you click the entry, its vertex and fragment shaders are shown in the other two panes, and you can edit them. editing shaders the middle and right hand panes show the vertex and fragment shaders for the currently selected program. you can edit these programs and see the results the next time the webgl con
text redraws (for example, in the next animation frame). for example, you can modify the colors: the editor highlights syntax errors in your code: if you hover over the cross shown next to a line containing an error, you'll see more details about the problem: ...
View Source - Firefox Developer Tools
if the number is higher than the lines in a file, you receive an error message. wrap long lines (toggle) wraps long lines to the width of the page. ...
...if the number is higher than the lines in a file, you receive an error message. wrap long lines (toggle) wraps long lines to the width of the page. ...
... line from the keyboard, press control + option + l on macos, or alt + shift + l on windows or linux. link to a line number it is possible to link to a particular line, by adding the #linennn anchor to the url the browser will jump to the nnn line. for example view-source:https://www.mozilla.org/#line100 view selection source if you select part of a web page and conext-click, you'll see a con
text menu item labeled "view selection source", that behaves just like "view page source", except you only see the source for the selection. view mathml source if you con
text-click while the mouse is over some mathml, you'll see a con
text menu item labeled "view mathml source": click it to see the mathml source. limitations of view source there are limitations to what view source does for you that...
... though all the reported errors are parse errors according to the html specification, not all parse errors are reported by view source. among the errors that don't get reported: bytes that are illegal according to the document's encoding aren't marked as errors. forbidden characters aren't reported as errors. errors related to the end-of-file aren't reported. tree builder errors relating to
text (as opposed to tags, comments, or doctypes) aren't reported. parse errors related to xmlns attributes aren't reported. xml syntax highlighting view source uses the html tokenizer when highlighting xml source. while the tokenizer has support for processing instructions when highlighting xml source, that's the only xml-specific capability provided. because of this, doctypes that have an interna...
Attr - Web APIs
lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/attr" target="_top"><rect x="266" y="1" width="75" height="50" fil...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/attr" target="_top"><rect x="266" y="1" width="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">attr</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} warning: starting in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4), a number of deprecated properties and methods output warning messages to the c...
... previoussibling this property now always returns null. schematypeinfo read only the type information associated with this attribute. while the type information contained in this attribute is guaranteed to be correct after loading the document or invoking document.normalizedocument, this property may not be reliable if the node was moved. specified this property now always returns true.
textcontent use attr.value instead. the following methods have been deprecated: appendchild() obsolete since gecko 14 modify the value of attr.value instead. clonenode() you shouldn't have been using this in the first place, so you probably don't care that this is going away. createattribute() use element.setattribute() instead. createattributens() use element.setattributens() instead. g...
AudioBuffer - Web APIs
once put into an audiobuffer, the audio can then be played by being passed into an audiobuffersourcenode. objects of these types are designed to hold small audio snippets, typically less than 45 s. for longer sounds, objects implementing the mediaelementaudiosourcenode are more suitable. ...
...he destination array. audiobuffer.copytochannel() copies the samples to the specified channel of the audiobuffer, from the source array. example the following simple example shows how to create an audiobuffer and fill it with random white noise. you can find the full source code at our webaudio-examples repository; a running live version is also available. ...
...uffer.copytochannel() copies the samples to the specified channel of the audiobuffer, from the source array. example the following simple example shows how to create an audiobuffer and fill it with random white noise. you can find the full source code at our webaudio-examples repository; a running live version is also available. ...
...m the source array. example the following simple example shows how to create an audiobuffer and fill it with random white noise. you can find the full source code at our webaudio-examples repository; a running live version is also available. ...
AudioProcessingEvent - Web APIs
target the event target (the topmost target in the dom tree). type read only domstring the type of event. bubbles read only boolean does the event normally bubble? cancelable read only boolean is it possible to cancel the event? playbacktime read only double the time when the audio will be played, as defined by the time of audiocon
text.currenttime inputbuffer read only audiobuffer the buffer containing the input audio data to be processed. the number of channels is defined as a parameter, numberofinputchannels, of the factory method audiocon
text.createscriptprocessor(). note the the returned audiobuffer is only valid in the scope of the onaudioprocess function. outputbuffer read only audiobuffer ...
...eter, numberofinputchannels, of the factory method audiocon
text.createscriptprocessor(). note the the returned audiobuffer is only valid in the scope of the onaudioprocess function. outputbuffer read only audiobuffer the buffer where the output audio data should be written. the number of channels is defined as a parameter, numberofoutputchannels, of the factory method audiocon
text.createscriptprocessor(). note the the returned audiobuffer is only valid in the scope of the onaudioprocess function. example the following example shows basic usage of a scriptprocessornode to take a track loaded via audiocon
text.decodeaudiodata(), process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the audiodestinationnode. fo...
...e in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case. ...
... noise, before setting that result to be the output sample in each case. ...
AudioWorkletNode() - Web APIs
name a string, which represents the name of the audioworkletprocessor this node will be based on. ...
... name a string, which represents the name of the audioworkletprocessor this node will be based on. ...
... name a string, which represents the name of the audioworkletprocessor this node will be based on. ...
... name a string, which represents the name of the audioworkletprocessor this node will be based on. ...
AudioWorkletNode.port - Web APIs
ssage = (e) => { console.log(e.data) this.port.postmessage('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph. ...
... console.log(e.data) this.port.postmessage('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph. ...
...a) this.port.postmessage('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph. ...
...ue } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph. const audiocon
text = new audiocon
text() await audiocon
text.audioworklet.addmodule('ping-pong-processor.js') const pingpongnode = new audioworkletnode(audiocon
text, 'ping-pong-processor') // send the message containing 'ping' string // to the audioworkletprocessor from the audioworkletnode every second setinterval(() => pingpongnode.port.postmessage('ping'), 1000) pingpongnode.port.onmessage = (e) => console.log(e.data) pingpongnode.connect(audiocon
text.destination) this will output "ping" and "pong" strings to the console every second. specifications ...
AudioWorkletProcessor() - Web APIs
n true } } registerprocessor('test-processor', testprocessor) next, in our main script file we'll load the processor, create an instance of audioworkletnode passing it the name of the processor and options object. in the options object we pass processoroptions with a map instance under someusefulvariable key. we don't pass numberofinputs and see how it gets its default value. ...
...terprocessor('test-processor', testprocessor) next, in our main script file we'll load the processor, create an instance of audioworkletnode passing it the name of the processor and options object. in the options object we pass processoroptions with a map instance under someusefulvariable key. we don't pass numberofinputs and see how it gets its default value. ...
...ocessor', testprocessor) next, in our main script file we'll load the processor, create an instance of audioworkletnode passing it the name of the processor and options object. in the options object we pass processoroptions with a map instance under someusefulvariable key. we don't pass numberofinputs and see how it gets its default value. ...
...stance of audioworkletnode passing it the name of the processor and options object. in the options object we pass processoroptions with a map instance under someusefulvariable key. we don't pass numberofinputs and see how it gets its default value. ...
AudioWorkletProcessor.port - Web APIs
ssage = (e) => { console.log(e.data) this.port.postmessage('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph. ...
... console.log(e.data) this.port.postmessage('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph. ...
...a) this.port.postmessage('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph. ...
...ue } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph. const audiocon
text = new audiocon
text() await audiocon
text.audioworklet.addmodule('ping-pong-processor.js') const pingpongnode = new audioworkletnode(audiocon
text, 'ping-pong-processor') // send the message containing 'ping' string // to the audioworkletprocessor from the audioworkletnode every second setinterval(() => pingpongnode.port.postmessage('ping'), 1000) pingpongnode.port.onmessage = (e) => console.log(e.data) pingpongnode.connect(audiocon
text.destination) this will output "ping" and "pong" strings to the console every second. specifications ...
Using the Beacon API - Web APIs
n-blocking request to a web server. beacon requests use http post and do not require a response. beacon requests are guaranteed to be initiated before the page unloads. this document contains examples of the beacon interfaces. see beacon api for an overview. navigator.sendbeacon() the beacon api's navigator.sendbeacon() method sends a beacon request to the server in the global browsing con
text. the method takes two arguments: the url and the data to send. the data argument is optional and its type may be an arraybufferview, blob, domstring, or formdata. if the browser successfully queues the request for delivery, the method returns true and returns false otherwise. the following example specifies a handler for the load and beforeunload events. the handler calls sendbeacon() with the ...
...tics() { var data = json.stringify({ location: location.href, time: date() }); navigator.sendbeacon('/analytics', data); }; workernavigator.sendbeacon() the beacon api's workernavigator.sendbeacon() method works identically to the usual method, but is accessible from worker global scope. in the following example, a worker sends a beacon using the url and data from the global con
text. ...
...ation: location.href, time: date() }); navigator.sendbeacon('/analytics', data); }; workernavigator.sendbeacon() the beacon api's workernavigator.sendbeacon() method works identically to the usual method, but is accessible from worker global scope. in the following example, a worker sends a beacon using the url and data from the global con
text. ...
..."success" : "fail"); } else { postmessage("worker: self.navigator.sendbeacon is unsupported"); } } see also beacon api (overview) beacon standard beacon caniuse data ...
BiquadFilterNode() - Web APIs
options optional options are as follows: type: one of "lowpass", "highpass", "bandpass", "lowshelf", "highshelf", "peaking", "notch", "allpass". the meaning of the other options depends on the value of this one. ...
... options optional options are as follows: type: one of "lowpass", "highpass", "bandpass", "lowshelf", "highshelf", "peaking", "notch", "allpass". the meaning of the other options depends on the value of this one. ...
... options optional options are as follows: type: one of "lowpass", "highpass", "bandpass", "lowshelf", "highshelf", "peaking", "notch", "allpass". the meaning of the other options depends on the value of this one. ...
... options optional options are as follows: type: one of "lowpass", "highpass", "bandpass", "lowshelf", "highshelf", "peaking", "notch", "allpass". the meaning of the other options depends on the value of this one. ...
BiquadFilterNode.Q - Web APIs
the q property of the biquadfilternode interface is an a-rate audioparam, a double representing a q factor, or quality factor. it is a dimensionless value with a default value of 1 and a nominal range of 0.0001 to 1000. syntax var audioctx = new audiocon
text(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.q.value = 100; note: though the audioparam returned is read-only, the value it represents is not. value an audioparam. ...
...y factor. it is a dimensionless value with a default value of 1 and a nominal range of 0.0001 to 1000. syntax var audioctx = new audiocon
text(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.q.value = 100; note: though the audioparam returned is read-only, the value it represents is not. value an audioparam. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
....createbiquadfilter(); biquadfilter.q.value = 100; note: though the audioparam returned is read-only, the value it represents is not. value an audioparam. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
...filter.q.value = 100; note: though the audioparam returned is read-only, the value it represents is not. value an audioparam. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
BiquadFilterNode.frequency - Web APIs
the frequency property of the biquadfilternode interface is a k-rate audioparam, a double representing a frequency in the current filtering algorithm measured in hertz (hz). frequency's default value is 350 with a nominal range of 10 to the nyquist frequency — that is, half of the sample rate. ...
...350 with a nominal range of 10 to the nyquist frequency — that is, half of the sample rate. syntax var audioctx = new audiocon
text(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.frequency.value = 3000; note: though the audioparam returned is read-only, the value it represents is not. value an audioparam. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
...quadfilter(); biquadfilter.frequency.value = 3000; note: though the audioparam returned is read-only, the value it represents is not. value an audioparam. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
...equency.value = 3000; note: though the audioparam returned is read-only, the value it represents is not. value an audioparam. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
BiquadFilterNode.type - Web APIs
type values and their meaning type description frequency q gain lowpass standard second-order resonant lowpass filter with 12db/octave rolloff. frequencies below the cutoff pass through; frequencies above it are attenuated. the cutoff frequency. ...
... the phase-relationship between the various frequencies. the frequency with the maximal group delay, that is, the frequency where the center of the phase transition occurs. controls how sharp the transition is at the medium frequency. the larger this parameter is, the sharper and larger the transition will be. ...
... controls how sharp the transition is at the medium frequency. the larger this parameter is, the sharper and larger the transition will be. not used example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
...nsition is at the medium frequency. the larger this parameter is, the sharper and larger the transition will be. not used example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
BiquadFilterNode - Web APIs
it is an audionode that can represent different kinds of filters, tone control devices, and graphic equalizers. a biquadfilternode always has exactly one input and one output. number of inputs 1 number of outputs 1 channel count mode "max" channel count 2 (not used in the default count mode) channel interpretation "speakers" constructor biquadfilternode() creates a new instance of a biquadfilternode object. properties inherits properties from its parent, audionode. ...
...ameter is, the sharper and larger the transition will be. not used methods inherits methods from its parent, audionode. biquadfilternode.getfrequencyresponse() from the current filter parameter settings this method calculates the frequency response for frequencies specified in the provided array of frequencies. ...
...se() from the current filter parameter settings this method calculates the frequency response for frequencies specified in the provided array of frequencies. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
... parameter settings this method calculates the frequency response for frequencies specified in the provided array of frequencies. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
Blob - Web APIs
blobs can represent data that isn't necessarily in a javascript-native format. the file interface is based on blob, inheriting blob functionality and expanding it to support files on the user's system. using blobs to construct a blob from other non-blob objects and data, use the blob() constructor. to create a blob that contains a subset of another blob's data, use the slice() method. to obtain a blob object for a file on the user's file system, see the file documentation. ...
... blob.prototype.arraybuffer() returns a promise that resolves with an arraybuffer containing the entire contents of the blob as binary data. blob.prototype.slice() returns a new blob object containing the data in the specified range of bytes of the blob on which it's called. blob.prototype.stream() returns a readablestream that can be used to read the contents of the blob. blob.prototype.
text() returns a promise that resolves with a usvstring containing the entire contents of the blob interpreted as utf-8
text. examples creating a blob the blob() constructor can create blobs from other objects. for example, to construct a blob from a json string: const obj = {hello: 'world'}; const blob = new blob([json.stringify(obj, null, 2)], {type : 'application/json'}); creating a url repr...
... can be used in a number of ways, including as the value of the <img> element's src attribute (assuming the data contains an image, of course). function typedarraytourl(typedarray, mimetype) { return url.createobjecturl(new blob([typedarray.buffer], {type: mimetype})) } const bytes = new uint8array(59); for(let i = 0; i < 59; i++) { bytes[i] = 32 + i; } const url = typedarraytourl(bytes, '
text/plain'); const link = document.createelement('a'); link.href = url; link.inner
text = 'open the array url'; document.body.appendchild(link); result click the link in the example to see the browser decode the object url. extracting data from a blob one way to read content from a blob is to use a filereader. the following code reads the content of a blob as a typed array: const reader = new...
...ntent from a blob is to use a filereader. the following code reads the content of a blob as a typed array: const reader = new filereader(); reader.addeventlistener('loadend', () => { // reader.result contains the contents of blob as a typed array }); reader.readasarraybuffer(blob); another way to read content from a blob is to use a response. the following code reads the content of a blob as
text: const
text = await (new response(blob)).
text(); or by using blob.prototype.
text(): const
text = await blob.
text(); by using other methods of filereader, it is possible to read the contents of a blob as a string or a data url. specifications specification status comment file apithe definition of 'the blob interface' in that specification. working draft initial...
CSSPrimitiveValue - Web APIs
value of a css property. this interface represents a single css value. it may be used to determine the value of a specific style property currently set in a block or to set a specific style property explicitly within the block. an instance of this interface might be obtained from the getpropertycssvalue() method of the cssstyledeclaration interface. a cssprimitivevalue object only occurs in a con
text of a css property. conversions are allowed between absolute values (from millimeters to centimeters, from degrees to radians, and so on) but not between relative values. (for example, a pixel value cannot be converted to a centimeter value.) percentage values can't be converted since they are relative to the parent value (or another property value). there is one exception for color percentage va...
...ne-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/cssvalue" target="_top"><rect x="1" y="1" width="80" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="41" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">cssvalue</
text></a><polyline points="81,25 91,20 91,30 81,25" stroke="#d4dde4" fill="none"/><line x1="91" y1="25" x2="121" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/cssprimitivevalue" target="_top"><rect x="121" y="1" width="170" heigh...
...,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">cssvalue</
text></a><polyline points="81,25 91,20 91,30 81,25" stroke="#d4dde4" fill="none"/><line x1="91" y1="25" x2="121" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/cssprimitivevalue" target="_top"><rect x="121" y="1" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="206" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">cssprimitivevalue</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, cssvalue. cssprimitivevalue.primitivetype read only an unsigned short representing the type o...
...btained by using the getrgbcolorvalue() method. css_s the value is a <time> in seconds. the value can be obtained by using the getfloatvalue() method. css_string the value is a <string>. the value can be obtained by using the getstringvalue() method. css_unknown the value is not a recognized css2 value. the value can only be obtained by using the css
text attribute. css_uri the value is a <uri>. the value can be obtained by using the getstringvalue() method. methods cssprimitivevalue.getcountervalue() this method is used to get the counter value. if this css value doesn't contain a counter value, a domexception is raised. modification to the corresponding style property can be achieved using the counter interface. ...
CanvasPattern.setTransform() - Web APIs
es the settransform method to create a canvaspattern with the specified pattern transformation from an svgmatrix. the pattern gets applied if you set it as the current fillstyle and gets drawn onto the canvas when using the fillrect() method, for example. ...
... const matrix = new dommatrix([1, .2, .8, 1, 0, 0]); edit the code below and see your changes update live in the canvas: playable code <canvas id="canvas" width="400" height="200" class="playable-canvas"></canvas> <svg id="svg1" style="display:none"></svg> <div class="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="reset" type="button" value="reset" /> </div> <
textarea id="code" class="playable-code" style="height:120px"> var img = new image(); img.src = 'https://mdn.mozillademos.org/files/222/canvas_createpattern.png'; img.onload = function() { var pattern = ctx.createpattern(img, 'repeat'); pattern.settransform(matrix.rotate(-45).scale(1.5)); ctx.fillstyle = pattern; ctx.fillrect(0, 0, 400, 400); };</
textarea> var canvas = document.getelementbyi...
... style="height:120px"> var img = new image(); img.src = 'https://mdn.mozillademos.org/files/222/canvas_createpattern.png'; img.onload = function() { var pattern = ctx.createpattern(img, 'repeat'); pattern.settransform(matrix.rotate(-45).scale(1.5)); ctx.fillstyle = pattern; ctx.fillrect(0, 0, 400, 400); };</
textarea> var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcon
text('2d'); var
textarea = document.getelementbyid('code'); var reset = document.getelementbyid('reset'); var edit = document.getelementbyid('edit'); var code =
textarea.value; var svg1 = document.getelementbyid('svg1'); var matrix = svg1.createsvgmatrix(); function drawcanvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(
textarea.value); } reset.addeventlistener('click', function(...
...; var
textarea = document.getelementbyid('code'); var reset = document.getelementbyid('reset'); var edit = document.getelementbyid('edit'); var code =
textarea.value; var svg1 = document.getelementbyid('svg1'); var matrix = svg1.createsvgmatrix(); function drawcanvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(
textarea.value); } reset.addeventlistener('click', function() {
textarea.value = code; drawcanvas(); }); edit.addeventlistener('click', function() {
textarea.focus(); })
textarea.addeventlistener('input', drawcanvas); window.addeventlistener('load', drawcanvas); specifications specification status comment html living standardthe definition of 'canvaspattern.settransform' in that specification. living standard ...
Optimizing canvas - Web APIs
rame, consider offloading them to an offscreen canvas. you can then render the offscreen image to your primary canvas as often as needed, without unnecessarily repeating the steps needed to generate it in the first place. mycanvas.offscreencanvas = document.createelement('canvas'); mycanvas.offscreencanvas.width = mycanvas.width; mycanvas.offscreencanvas.height = mycanvas.height; mycanvas.getcon
text('2d').drawimage(mycanvas.offscreencanvas, 0, 0); avoid floating-point coordinates and use integers instead sub-pixel rendering occurs when you render objects on a canvas without whole values. ctx.drawimage(myimage, 0.3, 0.5); this forces the browser to do extra calculations to create the anti-aliasing effect. to avoid this, make sure to round all co-ordinates used in calls to drawimage() us...
...for example, draw a polyline instead of multiple separate lines. avoid unnecessary canvas state changes. render screen differences only, not the whole new state. avoid the shadowblur p...
...eight; var scaletofit = math.min(scalex, scaley); var scaletocover = math.max(scalex, scaley); stage.style.transformorigin = '0 0'; //scale from top left stage.style.transform = 'scale(' + scaletofit + ')'; turn off transparency if your application uses canvas and doesn’t need a transparent backdrop, set the alpha option to false when creating a drawing con
text with htmlcanvaselement.getcon
text(). this information can be used internally by the browser to optimize rendering. var ctx = canvas.getcon
text('2d', { alpha: false }); more tips batch canvas calls together. for example, draw a polyline instead of multiple separate lines. avoid unnecessary canvas state changes. render screen differences only, not the whole new state. avoid the shadowblur property whenever possible. avoid ...
... try different ways to clear the canvas (clearrect() vs. fillrect() vs. resizing the canvas). ...
ChildNode.before() - Web APIs
the childnode.before() method inserts a set of node or domstring objects in the children list of this childnode's parent, just before this childnode. domstring objects are inserted as equivalent
text nodes. syntax [throws, unscopable] void childnode.before((node or domstring)... nodes); parameters nodes a set of node or domstring objects to insert. exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy. ...
...ert. exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy. ...
... element var parent = document.createelement("div"); var child = document.createelement("p"); parent.appendchild(child); var span = document.createelement("span"); child.before(span); console.log(parent.outerhtml); // "<div><span></span><p></p></div>" inserting
text var parent = document.createelement("div"); var child = document.createelement("p"); parent.appendchild(child); child.before("
text"); console.log(parent.outerhtml); // "<div>
text<p></p></div>" inserting an element and
text var parent = document.createelement("div"); var child = document.createelement("p"); parent.appendchild(child); var span = document.createelement("span"); child.before(span, "
text"); console.log(parent.outerhtml); // "<div><span></span>
text<p></p></div>" childnode.before() is unscopable the before()...
... living standard initial definition. ...
Clipboard - Web APIs
pboard functionality by mapping user input such as keybindings, menu selections, etc. to these interfaces. methods clipboard is based on the eventtarget interface, and includes its methods. read() requests arbitrary data (such as images) from the clipboard, returning a promise. when the data has been retrieved, the promise is resolved with a datatransfer object that provides the data. ...
...ity by mapping user input such as keybindings, menu selections, etc. to these interfaces. methods clipboard is based on the eventtarget interface, and includes its methods. read() requests arbitrary data (such as images) from the clipboard, returning a promise. when the data has been retrieved, the promise is resolved with a datatransfer object that provides the data. ...
...s based on the eventtarget interface, and includes its methods. read() requests arbitrary data (such as images) from the clipboard, returning a promise. when the data has been retrieved, the promise is resolved with a datatransfer object that provides the data. read
text() requests
text from the system clipboard; returns a promise which is resolved with a domstring containing the clipboard's
text once it's available. write() writes arbitrary data to the system clipboard. this asynchronous operation signals that it's finished by resolving the returned promise. write
text() writes
text to the system clipboard, returning a promise which is resolved once the
text is fully copied into the clipboard. clipboard availability the asynchronous clipboard api is a relatively recent addition, an...
...he process of integrating this api is happening gradually in most browsers. for example, firefox does not yet support the "clipboard-read" and "clipboard-write" permissions, so access to the methods that access and change the contents of the clipboard are restricted in other ways. for webextensions, you can request the clipboardread and clipboardwrite permissions to be able to use clipboard.read
text() and clipboard.write
text(). content scripts applied on http sites do not have access to the clipboard object. see extensions in firefox 63. in addition, read() and write() are disabled by default and require changing a preference to enable them. check the compatibility tables for each method before using it. specifications specification status comment clipboard api and...
Clipboard API - Web APIs
the active tab. the clipboard-read permission must be requested, which you can do by trying to read data from the clipboard. this api is designed to supersede accessing the clipboard using document.execcommand(). ...
...e clipboard-read permission must be requested, which you can do by trying to read data from the clipboard. this api is designed to supersede accessing the clipboard using document.execcommand(). ...
...which you can do by trying to read data from the clipboard. this api is designed to supersede accessing the clipboard using document.execcommand(). accessing the clipboard instead of creating a clipboard object through instantiation, you access the system clipboard through the navigator.clipboard global: navigator.clipboard.read
text().then( clip
text => document.queryselector(".editor").inner
text += clip
text); this snippet fetches the
text from the clipboard and appends it to the first element found with the class editor. since read
text() (and read(), for that matter) returns an empty string if the clipboard isn't
text, this code is safe. interfaces clipboard secure con
text provides an interface for reading and writing
text and data to or from the system clipboard. the specification...
...ends it to the first element found with the class editor. since read
text() (and read(), for that matter) returns an empty string if the clipboard isn't
text, this code is safe. interfaces clipboard secure con
text provides an interface for reading and writing
text and data to or from the system clipboard. the specification refers to this as the 'async clipboard api.' clipboardevent secure con
text represents events providing information related to modification of the clipboard, that is cut, copy, and paste events. the specification refers to this as the 'clipboard event api'. clipboarditem secure con
text represents a single item format, used when reading or writing data. specifications specification status comment clipboard api and events working draft i...
CompositionEvent - Web APIs
the dom compositionevent represents events that occur due to the user indirectly entering
text. ...
...nline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill=...
...="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="153.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">uievent</
text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#d4dde4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/compositionevent" target="_top"><rect x="231" y="1" width="160"...
...dale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">uievent</
text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#d4dde4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/compositionevent" target="_top"><rect x="231" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="311" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">compositionevent</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor compositionevent() creates a new compositionevent object instance. properties this interface also inherits properties of its pare...
DataTransfer.clearData() - Web APIs
ag in process'; // change target element's border to signify drag has started event.currenttarget.style.border = '1px dashed blue'; // start by clearing existing clipboards; this will affect all types since we // don't give a specific type. ...
...d event.currenttarget.style.border = '1px dashed blue'; // start by clearing existing clipboards; this will affect all types since we // don't give a specific type. ...
...ype. ...
...n dragoverhandler (event) { status.innerhtml = 'drop available'; event.preventdefault(); } function dragleavehandler (event) { status.innerhtml = 'drag in process (drop was available)'; event.preventdefault(); } function drophandler (event) { dropped = true; status.innerhtml = 'drop done'; event.preventdefault(); // get data linked to event format «
text » var _data = event.datatransfer.getdata('
text/plain'); var element = document.getelementbyid(_data); // append drag source element to event's target element event.target.appendchild(element); // change css styles and displayed
text element.style.css
text = 'border: 1px solid black;display: block; color: red'; element.innerhtml = "i'm in the drop zone!"; } }) s...
DataTransferItemList.add() - Web APIs
he item may be a file or a string of a given type. if the item is successfully added to the list, the newly-created datatransferitem object is returned. syntax datatransferitem = datatransferitemlist.add(data, type); datatransferitem = datatransferitemlist.add(file); parameters data a string representing the drag item's data. type a string of the drag item's type. some example types are
text/html and
text/plain. file a file object. no type needs to be given in this case. return value a datatransferitem containing the specified data. if the drag item couldn't be created (for example, if the associated datatransfer object has no data store), null is returned. exceptions notsupportederror a string data parameter was provided, and the list already contains an item whose kind...
...v> css div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree var datalist = ev.datatransfer.items; datalist.add(ev.target.id, "
text/plain"); // add some other items to the drag payload datalist.add("<p>... paragraph ...</p>", "
text/html"); datalist.add("http://www.example.org","
text/uri-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i]...
...rag payload datalist.add("<p>... paragraph ...</p>", "
text/html"); datalist.add("http://www.example.org","
text/uri-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].kind == 'string') && (data[i].type.match('^
text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^
text/html'))) { // drag data item is html data[i].getasstring(function (s){ console.log("... drop: html = " + s); }); } else if ((data[i].kind ...
... target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^
text/html'))) { // drag data item is html data[i].getasstring(function (s){ console.log("... drop: html = " + s); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^
text/uri-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("... drop: uri = " + s); }); } } } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } function dragend_handler(ev) { console.log("dragend"); var datalist = ev.datatransfer.
Document: DOMContentLoaded event - Web APIs
{ console.info('dom loaded'); } if (document.readystate === 'loading') { // loading hasn't finished yet document.addeventlistener('domcontentloaded', dosomething); } else { // `domcontentloaded` has already fired dosomething(); } live example html <div class="controls"> <button id="reload" type="button">reload</button> </div> <div class="event-log"> <label>event log:</label> <
textarea readonly class="event-log-contents" rows="8" cols="30"></
textarea> </div> css body { display: grid; grid-template-areas: "control log"; } .controls { grid-area: control; display: flex; align-items: center; justify-content: center; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } #reload { height: 2rem; } ...
... { grid-area: control; display: flex; align-items: center; justify-content: center; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } #reload { height: 2rem; } js const log = document.queryselector('.event-log-contents'); const reload = document.queryselector('#reload'); reload.addeventlistener('click', () => { log.
textcontent =''; window.settimeout(() => { window.location.reload(true); }, 200); }); window.addeventlistener('load', (event) => { log.
textcontent = log.
textcontent + 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.
textcontent = log.
textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { ...
... living standard html5the definition of 'domcontentloaded' in that specification. recommendation ...
...settimeout(() => { window.location.reload(true); }, 200); }); window.addeventlistener('load', (event) => { log.
textcontent = log.
textcontent + 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.
textcontent = log.
textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.
textcontent = log.
textcontent + `domcontentloaded\n`; }); result specifications specification status comment html living standardthe definition of 'domcontentloaded' in that specification. living standard html5the definition of 'domcontentloaded' in that specification. recommendation ...
Document.caretRangeFromPoint() - Web APIs
cument interface returns a range object for the document fragment under the specified coordinates. syntax var range = document.caretrangefrompoint(float x, float y); parameters x a horizontal position within the current viewport. y a vertical position within the current viewport. returns one of the following: a range. null, if x or y are negative, outside viewport, or there is no
text entry node. example basic demo: when clicking in a paragraph insert a line break at the caret position: html <p>lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. at vero eos et accusam et justo duo dolores et ea rebum. stet clita kasd gubergren, no sea takimata sanctus est lorem ipsum do...
...k at the caret position: html <p>lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. at vero eos et accusam et justo duo dolores et ea rebum. ...
...ore et dolore magna aliquyam erat, sed diam voluptua. at vero eos et accusam et justo duo dolores et ea rebum. ...
...em ipsum dolor sit amet.</p> javascript function insertbreakatpoint(e) { let range; let
textnode; let offset; if (document.caretpositionfrompoint) { range = document.caretpositionfrompoint(e.clientx, e.clienty);
textnode = range.offsetnode; offset = range.offset; } else if (document.caretrangefrompoint) { range = document.caretrangefrompoint(e.clientx, e.clienty);
textnode = range.startcontainer; offset = range.startoffset; } // only split
text_nodes if (
textnode &&
textnode.nodetype == 3) { let replacement =
textnode.split
text(offset); let br = document.createelement('br');
textnode.parentnode.insertbefore(br, replacement); } } let paragraphs = document.getelementsbytagname("p"); for (let i = 0; i < paragraphs.length; i++) { paragrap...
DragEvent - Web APIs
ag and drop interaction. constructors although this interface has a constructor, it is not possible to create a useful datatransfer object from script, since datatransfer objects have a processing and security model that is coordinated by the browser during drag-and-drops. dragevent() creates a synthetic and untrusted dragevent. event types drag this event is fired when an element or
text selection is being dragged. dragend this event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key). dragenter this event is fired when a dragged element or
text selection enters a valid drop target. dragexit this event is fired when an element is no longer the drag operation's immediate selection target. dragleave this event is fired when ...
...ragged. dragend this event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key). dragenter this event is fired when a dragged element or
text selection enters a valid drop target. dragexit this event is fired when an element is no longer the drag operation's immediate selection target. dragleave this event is fired when a dragged element or
text selection leaves a valid drop target. dragover this event is fired continuously when an element or
text selection is being dragged and the mouse pointer is over a valid drop target (every 50 ms when mouse is not moving else much faster between 5 ms (slow movement) and 1ms (fast movement) approximately. this firing pattern is different than mouseover ). dragstart this event is fired when the u...
... globaleventhandlers globaleventhandlers.ondrag a global event handler for the drag event. globaleventhandlers.ondragend a global event handler for the dragend event. ...
... globaleventhandlers globaleventhandlers.ondrag a global event handler for the drag event. globaleventhandlers.ondragend a global event handler for the dragend event. globaleventhandlers.ondragenter a global event handler for the dragenter event. globaleventhandlers.ondragexit a global event handler for the dragexit event. ...
EXT_sRGB - Web APIs
the constants in webgl2 are: gl.srgb, gl.srgb8, gl.srgb8_alpha8 and gl.framebuffer_attachment_color_encoding. constants this extension exposes the following constants, which can be used in the teximage2d(), texsubimage2d(), renderbufferstorage() and getframebufferattachmentparameter() methods. ...
...the constants in webgl2 are: gl.srgb, gl.srgb8, gl.srgb8_alpha8 and gl.framebuffer_attachment_color_encoding. constants this extension exposes the following constants, which can be used in the teximage2d(), texsubimage2d(), renderbufferstorage() and getframebufferattachmentparameter() methods. ...
...the constants in webgl2 are: gl.srgb, gl.srgb8, gl.srgb8_alpha8 and gl.framebuffer_attachment_color_encoding. constants this extension exposes the following constants, which can be used in the teximage2d(), texsubimage2d(), renderbufferstorage() and getframebufferattachmentparameter() methods. ...
...etframebufferattachmentparameter() methods. ext.srgb_ext unsized srgb format that leaves the precision up to the driver. ext.srgb_alpha_ext unsized srgb format with unsized alpha component. ext.srgb8_alpha8_ext sized (8-bit) srgb and alpha formats. ext.framebuffer_attachment_color_encoding_ext returns the framebuffer color encoding (gl.linear or ext.srgb_ext). examples var ext = gl.ge
textension('ext_srgb'); var
texture = gl.create
texture(); gl.bind
texture(gl.
texture_2d,
texture); gl.teximage2d(gl.
texture_2d, 0, ext.srgb_ext, 512, 512, 0, ext.srgb_ext, gl.unsigned_byte, image); specifications specification status comment ext_srgbthe definition of 'ext_srgb' in that specification. recommendation initial definition. ...
EffectTiming.fill - Web APIs
to "none". otherwise, the result is "both". examples here are a few examples. fill mode: none html content the html is pretty simple. we have a <div> named "main" which is a container for the element we'll be animating, which is a <div> with the id "box". below that, another <div> serves as a button that will trigger the animation to begin. ...
...ther <div> serves as a button that will trigger the animation to begin. ...
...that css looks like this: #box { width: 200px; heigh...
...that css looks like this: #box { width: 200px; height: 200px; left: 50px; top: 50px; border: 1px solid #7788ff...
Element: blur event - Web APIs
nt has lost focus. the main difference between this event and focusout is that focusout bubbles while blur does not. the opposite of blur is focus. ...
...the main difference between this event and focusout is that focusout bubbles while blur does not. the opposite of blur is focus. ...
...stener('focus', (event) => { event.target.style.background = 'pink'; }); password.addeventlistener('blur', (event) => { event.target.style.background = ''; }); result event delegation there are two ways of implementing event delegation for this event: by using the focusout event, or by setting the usecapture parameter of addeventlistener() to true. ...
...ent) => { event.target.style.background = 'pink'; }); password.addeventlistener('blur', (event) => { event.target.style.background = ''; }); result event delegation there are two ways of implementing event delegation for this event: by using the focusout event, or by setting the usecapture parameter of addeventlistener() to true. ...
Element: focus event - Web APIs
as received focus. the main difference between this event and focusin is that focusin bubbles while focus does not. the opposite of focus is blur. ...
...the main difference between this event and focusin is that focusin bubbles while focus does not. the opposite of focus is blur. ...
...istener('focus', (event) => { event.target.style.background = 'pink'; }); password.addeventlistener('blur', (event) => { event.target.style.background = ''; }); result event delegation there are two ways of implementing event delegation for this event: by using the focusin event, or by setting the usecapture parameter of addeventlistener() to true. ...
...vent) => { event.target.style.background = 'pink'; }); password.addeventlistener('blur', (event) => { event.target.style.background = ''; }); result event delegation there are two ways of implementing event delegation for this event: by using the focusin event, or by setting the usecapture parameter of addeventlistener() to true. ...
Element: keypress event - Web APIs
are alphabetic, numeric, and punctuation keys. examples of keys that don't produce a character value are modifier keys such as alt, shift, ctrl, or meta. since this event has been deprecated, you should look to use beforeinput or keydown instead. ...
...elable yes default action varies: keypress event; launch
text composition system; blur and focus events; domactivate event; other event examples addeventlistener keypress example this example logs the keyboardevent.code value whenever you press a key after focussing the <input> element. ...
...s default action varies: keypress event; launch
text composition system; blur and focus events; domactivate event; other event examples addeventlistener keypress example this example logs the keyboardevent.code value whenever you press a key after focussing the <input> element. ...
... the keyboardevent.code value whenever you press a key after focussing the <input> element. ...
Element.scrollHeight - Web APIs
vestibulum at laoreet magna. aliquam erat volutpat. praesent molestie, dolor ut eleifend aliquam, mi ligula ultrices sapien, quis cursus neque dui nec risus. duis tincidunt lobortis purus...
...vestibulum at laoreet magna. aliquam erat volutpat. ...
... tortor, nec mollis nisl dolor a tortor. maecenas varius est sit amet elit interdum quis placerat metus posuere. duis malesuada justo a diam vestibulum vel aliquam nisi ornare. integer laoreet nisi a odio ornare non congue turpis eleifend. cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. cras vulputate libero sed arcu iaculis nec lobortis orci fermentum. ...
...r-radius: 5px; } javascript function checkreading () { if (checkreading.read) { return; } checkreading.read = this.scrollheight - this.scrolltop === this.clientheight; document.registration.accept.disabled = document.getelementbyid("nextstep").disabled = !checkreading.read; checkreading.noticebox.innerhtml = checkreading.read ? ...
Element.slot - Web APIs
ill with their own markup (see using templates and slots for more information). syntax var astring = element.slot element.slot = astring value a domstring. examples in our simple-template example (see it live), we create a trivial custom element example called <my-paragraph> in which a shadow root is attached and then populated using the contents of a template that contains a slot named my-
text. ...
... in our simple-template example (see it live), we create a trivial custom element example called <my-paragraph> in which a shadow root is attached and then populated using the contents of a template that contains a slot named my-
text. when <my-paragraph> is used in the document, the slot is populated by a slotable element by including it inside the element with a slot attribute with the value my-
text. ...
...l custom element example called <my-paragraph> in which a shadow root is attached and then populated using the contents of a template that contains a slot named my-
text. when <my-paragraph> is used in the document, the slot is populated by a slotable element by including it inside the element with a slot attribute with the value my-
text. here is one such example: <my-paragraph> <span slot="my-
text">let's have some different
text!</span> </my-paragraph> in our javascript file we get a reference to the <span> shown above, then log a reference to the name of the corresponding <slot> element. ...
... living standard browser compatibility the compatibility table on this page is generated from structured data. ...
Event.composed - Web APIs
at_target phase. you can determine the path the event will follow through the shadow root to the dom root by calling composedpath(). if this value is false, the shadow root will be the last node to be offered the event. examples in our composed-composed-path example (see it live), we define two trivial custom elements, <open-shadow> and <closed-shadow>, both of which take the contents of their
text attribute and insert them into the element's shadow dom as the
text content of a <p> element. the only difference between the two is that their shadow roots are attached with their modes set to open and closed respectively. the first definition looks like this, for example: customelements.define('open-shadow', class extends htmlelement { constructor() { super(); let pelem = d...
...ent's shadow dom as the
text content of a <p> element. the only difference between the two is that their shadow roots are attached with their modes set to open and closed respectively. ...
...ent of a <p> element. the only difference between the two is that their shadow roots are attached with their modes set to open and closed respectively. ...
...tion looks like this, for example: customelements.define('open-shadow', class extends htmlelement { constructor() { super(); let pelem = document.createelement('p'); pelem.
textcontent = this.getattribute('
text'); let shadowroot = this.attachshadow({mode: 'open'}) .appendchild(pelem); } }); we then insert one of each element into our page: <open-shadow
text="i have an open shadow root"></open-shadow> <closed-shadow
text="i have a closed shadow root"></closed-shadow> then include a click event listener on the <html> element: document.queryselector('html').addeventlistener('click',function(e) { console.log(e.composed); console.log(e.composedpath()); }); when you click on the <open-shadow> element and then the <closed-shadow> element, you'll not...
Event.composedPath() - Web APIs
reated with its shadowroot.mode closed. syntax var composed = event.composedpath(); parameters none. return value an array of eventtarget objects representing the objects on which an event listener will be invoked. examples in our composed-composed-path example (see it live), we define two trivial custom elements, <open-shadow> and <closed-shadow>, both of which take the contents of their
text attribute and insert them into the element's shadow dom as the
text content of a <p> element. the only difference between the two is that their shadow roots are attached with their modes set to open and closed respectively. the first definition looks like this, for example: customelements.define('open-shadow', class extends htmlelement { constructor() { super(); let pelem = d...
...ent's shadow dom as the
text content of a <p> element. the only difference between the two is that their shadow roots are attached with their modes set to open and closed respectively. ...
...ent of a <p> element. the only difference between the two is that their shadow roots are attached with their modes set to open and closed respectively. ...
...tion looks like this, for example: customelements.define('open-shadow', class extends htmlelement { constructor() { super(); let pelem = document.createelement('p'); pelem.
textcontent = this.getattribute('
text'); let shadowroot = this.attachshadow({mode: 'open'}) .appendchild(pelem); } }); we then insert one of each element into our page: <open-shadow
text="i have an open shadow root"></open-shadow> <closed-shadow
text="i have a closed shadow root"></closed-shadow> then include a click event listener on the <html> element: document.queryselector('html').addeventlistener('click',function(e) { console.log(e.composed); console.log(e.composedpath()); }); when you click on the <open-shadow> element and then the <closed-shadow> element, you'll not...
EventTarget - Web APIs
many event targets (including elements, documents, and windows) also support setting event handlers via onevent properties and attributes. ...
... methods eventtarget.addeventlistener() registers an event handler of a spec...
... methods eventtarget.addeventlistener() registers an event handler of a specific event type on the eventtarget. eventtarget.removeeventlistener() removes an event listener from t...
...ute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor eventtarget() creates a new eventtarget object instance. methods eventtarget.addeventlistener() registers an event handler of a specific event type on the eventtarget. eventtarget.removeeventlistener() removes an event listener from the eventtarget. eventtarget.dispatchevent() dispatches an ev...
File - Web APIs
nformation about files and allows javascript in a web page to access their content. file objects are generally retrieved from a filelist object returned as a result of a user selecting files using the <input> element, from a drag and drop operation's datatransfer object, or from the mozgetasfile() api on an htmlcanvaselement. a file object is a specific kind of a blob, and can be used in any con
text that a blob can. in particular, filereader, url.createobjecturl(), createimagebitmap(), and xmlhttprequest.send() accept both blobs and files. see using files from web applications for more information and examples. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg st...
...inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/blob" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">blob</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/file" target="_top"><rect x="116" y="1" width="75" height="50" fill="#f4...
...y="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">blob</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/file" target="_top"><rect x="116" y="1" width="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="153.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">file</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor file() returns a newly constructed file. instance properties file.prototype.lastmodified read only returns the last modified time of th...
...ile. instance methods the file interface doesn't define any methods, but inherits methods from the blob interface: blob.prototype.slice([start[, end[, contenttype]]]) returns a new blob object containing the data in the specified range of bytes of the source blob. blob.prototype.stream() transforms the file into a readablestream that can be used to read the file contents. blob.prototype.
text() transforms the file into a stream and reads it to completion. it returns a promise that resolves with a usvstring (
text). blob.prototype.arraybuffer() transforms the file into a stream and reads it to completion. it returns a promise that resolves with an arraybuffer. specifications specification status comment file apithe definition of 'the file interface' in ...
FileHandle API - Web APIs
file api, especially the file and blob interfaces. basic operations create a filehandle because the intent is to allow the storage of files through indexeddb, creating a filehandle instance requires an indexeddb database. var idbreq = indexeddb.open("myfilestoragedatabase"); idbreq.onsuccess = function(){ var db = this.result; var buildhandle = db.mozcreatefilehandle("test.txt", "plain/
text"); buildhandle.onsuccess = function(){ var myfilehandle = this.result; console.log('handle', myfilehandle); }; }; mozcreatefilehandle() takes two arguments: a name and an optional type. both of these are just descriptive and are not used by the database. however, they are important for the filehandle object as it can generate file objects which inherit their own name and type from...
...'some content'); writing.onsuccess = function () { console.log('writing operation successful'); } writing.onerror = function () { console.log('something goes wrong in the writing process: ' + this.error); } reading it's possible to directly write the content of a lockedfile object without using an intermediate file object and a filereader object. the lockedfile interface provides a readas
text method and a readasarraybuffer method. those two methods expect a size to indicate how many bytes must be read starting at the lockedfile.location byte. to read the whole file, it is required to know its size. this information (as well as the date of its last modification) can be retrieved through the lockedfile.getmetadata() method. // get a lockedfile object from the handle var myfile = myfi...
...for example, there are many apis that expect blob or file objects such as f...
...ly the one used to create the filehandle object). ...
GainNode() - Web APIs
options optional options are as follows: gain: the amount of gain to apply. this parameter is a-rate and it's nominal range is (-∞,+∞). the default is 1. return value a new gainnode object instance. ...
... options optional options are as follows: gain: the amount of gain to apply. this parameter is a-rate and it's nominal range is (-∞,+∞). the default is 1. return value a new gainnode object instance. ...
... options optional options are as follows: gain: the amount of gain to apply. this parameter is a-rate and it's nominal range is (-∞,+∞). the default is 1. return value a new gainnode object instance. ...
... options optional options are as follows: gain: the amount of gain to apply. this parameter is a-rate and it's nominal range is (-∞,+∞). the default is 1. return value a new gainnode object instance. ...
GainNode - Web APIs
ds on the audioparam interface. number of inputs 1 number of outputs 1 channel count mode "max" channel count 2 (not used in the default count mode) channel interpretation "speakers" constructor gainnode() creates a new instance of a gainnode object. you shouldn't manually create a gain node; instead, use the method audiocon
text.creategain(). properties inherits properties from its parent, audionode. gainnode.gain read only is an a-rate audioparam representing the amount of gain to apply. you have to set audioparam.value or use the methods of audioparam to change the effect of gain. methods no specific method; inherits methods from its parent, audionode. example the following example shows basic usage of an ...
...ain(). properties inherits properties from its parent, audionode. gainnode.gain read only is an a-rate audioparam representing the amount of gain to apply. you have to set audioparam.value or use the methods of audioparam to change the effect of gain. methods no specific method; inherits methods from its parent, audionode. ...
...e shows basic usage of an audiocon
text to create a gainnode, which is then used to mute and unmute the audio when a mute button is clicked by changing the gain property value. ...
...iocon
text to create a gainnode, which is then used to mute and unmute the audio when a mute button is clicked by changing the gain property value. ...
GeolocationCoordinates - Web APIs
the geolocationcoordinates interface represents the position and altitude of the device on earth, as well as the accuracy with which these properties are calculated. properties the geolocationcoordinates interface doesn't inherit any properties. geolocationcoordinates.latitude read only secure con
text returns a double representing the position's latitude in decimal degrees. geolocationcoordinates.longitude read only secure con
text returns a double representing the position's longitude in decimal degrees. geolocationcoordinates.altitude read only secure con
text returns a double representing the position's altitude in meters, relative to sea level. this value can be null if the implementation cannot provide the data. geolocationcoordinates.accuracy read only secure cont...
...this value, specified in degrees, indicates how far off from heading true north the device is. ...
...this value, specified in degrees, indicates how far off from heading true north the device is. 0 degrees represents true north, and the direction is determined clockwise (which means that east is 90 degrees and west is 270 degrees). ...
... facing. this value, specified in degrees, indicates how far off from heading true north the device is. 0 degrees represents true north, and the direction is determined clockwise (which means that east is 90 degrees and west is 270 degrees). if speed is 0, heading is nan. if the device is unable to provide heading information, this value is null. geolocationcoordinates.speed read only secure con
text returns a double representing the velocity of the device in meters per second. this value can be null. methods the geolocationcoordinates interface neither implements, nor inherits any method. specifications specification status comment geolocation apithe definition of 'geolocationcoordinates' in that specification. recommendation initial specification. ...
GlobalEventHandlers.onanimationend - Web APIs
function to be called when an animationend event occurs indicating that a css animation has begun on the target, where the target object is an html element (htmlelement), document (document), or window (window). the function receives as input a single parameter: an animationevent object describing the event which occurred. ...
...urred. ...
...first is the box itself. we set its size, position, color, and layout. no...
...first is the box itself. we set its size, position, color, and layout. note that there's nothing there about animation. that's because w...
GlobalEventHandlers.onanimationstart - Web APIs
unction to be called when an animationstart event occurs indicating that a css animation has begun on the target, where the target object is an html element (htmlelement), document (document), or window (window). the function receives as input a single parameter: an animationevent object describing the event which occurred. ...
...urred. ...
...first is the box itself. we set its size, position, color, and layout. no...
...first is the box itself. we set its size, position, color, and layout. note that there's nothing there about animation. that's because w...
HTMLCanvasElement.toBlob() - Web APIs
vert a canvas to an ico (mozilla only) this uses -moz-parse to convert the canvas to ico. windows xp doesn't support converting from png to ico, so it uses bmp instead. a download link is created by setting the download attribute. the value of the download attribute is the name it will use as the file name. ...
...e download attribute is the name it will use as the file name. ...
...r a = document.createelement('a'); a.
textcontent = 'download'; document.body.appendchild(a); a.style.display = 'block'; a.download = iconname + '.ico'; a.href = window.url.createobjecturl(b); } } canvas.toblob(blobcallback('passthisstring'), 'image/vnd.microsoft.icon', '-moz-parse-options:format=bmp;bpp=32'); save toblob to disk with os.file (chrome/add-on con
text only) this technique saves it to the desktop and is only useful in firefox chrome con
text or add-on code as os apis are not present on web sites. ...
...('passthisstring'), 'image/vnd.microsoft.icon', '-moz-parse-options:format=bmp;bpp=32'); save toblob to disk with os.file (chrome/add-on con
text only) this technique saves it to the desktop and is only useful in firefox chrome con
text or add-on code as os apis are not present on web sites. var canvas = document.getelementbyid('canvas'); var d = canvas.width; ctx = canvas.getcon
text('2d'); ctx.beginpath(); ctx.moveto(d / 2, 0); ctx.lineto(d, d); ctx.lineto(0, d); ctx.closepath(); ctx.fillstyle = 'yellow'; ctx.fill(); function blobcallback(iconname) { return function(b) { var r = new filereader(); r.onloadend = function () { // r.result contains the arraybuffer. cu.import('resource://gre/modules/osfile.jsm'); var writepath = os.path.join(os.constants.pa...
Option() - Web APIs
for the associated <select> element's value when the form is submitted to the server. ...
...for the associated <select> element's value when the form is submitted to the server. ...
...for the associated <select> element's value when the form is submitted to the server. ...
...for the associated <select> element's value when the form is submitted to the server. defaultselected optional a boolean that sets the selected attribute value, i.e. so that this <option> will be the default value selected in the <select> element when the page is first loaded. if this is not specified, a default value of false is used. ...
IIRFilterNode() - Web APIs
options options are as follows: feedforward: a sequence of feedforward coefficients. feedback: a sequence of feedback coefficients. ...
... options options are as follows: feedforward: a sequence of feedforward coefficients. feedback: a sequence of feedback coefficients. ...
... options options are as follows: feedforward: a sequence of feedforward coefficients. feedback: a sequence of feedback coefficients. ...
...s in the web audio api, the options passed into the iir filter upon creation are not optional. the filter needs these values to work and with the vast range of filters available, there is no default. return value a new iirfilternode object instance. examples let feedforward = [0.00020298, 0.0004059599, 0.00020298]; let feedbackward = [1.0126964558, -1.9991880801, 0.9873035442]; const audiocon
text = window.audiocon
text || window.webkitaudiocon
text; const audioctx = new audiocon
text(); const iirfilter = new iirfilternode(audioctx, { feedforward: feedforward, feedback: feedbackward }); specifications specification status comment web audio apithe definition of 'iirfilternode()' in that specification. working draft initial definition. browser compatibili...
InputEvent - Web APIs
nline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill=...
...="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="153.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">uievent</
text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#d4dde4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/inputevent" target="_top"><rect x="231" y="1" width="100" heigh...
...aco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">uievent</
text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#d4dde4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/inputevent" target="_top"><rect x="231" y="1" width="100" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="281" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">inputevent</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor inputevent() creates an inputevent object. properties this interface inherits properties from its parents, uievent and event. inpute...
...ent-baseline="middle">inputevent</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor inputevent() creates an inputevent object. properties this interface inherits properties from its parents, uievent and event. inputevent.dataread only returns a domstring with the inserted characters. this may be an empty string if the change doesn't insert
text (such as when deleting characters, for example). inputevent.datatransferread only returns a datatransfer object containing information about rich
text or plain
text data being added to or removed from editable content. inputevent.inputtyperead only returns the type of change for editable content such as, for example, inserting, deleting, or formatting
text. see the property page for a complet...
MediaElementAudioSourceNode - Web APIs
the mediaelementaudiosourcenode interface represents an audio source consisting of an html5 <audio> or <video> element. it is an audionode that acts as an audio source. a mediaelementsourcenode has no inputs and exactly one output, and is created using the audiocon
text.createmediaelementsource() method. the amount of channels in the output equals the number of channels of the audio referenced by the htmlmediaelement used in the creation of the node, or is 1 if the htmlmediaelement has no audio. number of inputs 0 number of outputs 1 channel count defined by the media in the htmlmediaelement passed to the audiocon
text.createmediaelementsource method that created it. constructor mediaelementaudiosourcenode() creates a new mediaelementaudiosourc...
...yback. when the mouse pointer is moved, the updatepage() function is invoked, which calculates the current gain as a ratio of mouse y position divided by overall window height. you can therefore increase and decrease the volume of the playing music by moving the mouse pointer up and down. note: you can also view this example running live, or view the source. ...
... is moved, the updatepage() function is invoked, which calculates the current gain as a ratio of mouse y position divided by overall window height. you can therefore increase and decrease the volume of the playing music by moving the mouse pointer up and down. note: you can also view this example running live, or view the source. ...
...so playing/pausing the media can still be done through the media element api and the player controls. specification specification status comment web audio apithe definition of 'mediaelementaudiosourcenode' in that specification. working draft ...
MediaStreamAudioSourceNode - Web APIs
f audionode which operates as an audio source whose media is received from a mediastream obtained using the webrtc or media capture and streams apis. this media could be from a microphone (through getusermedia()) or from a remote peer on a webrtc call (using the rtcpeerconnection's audio tracks). a mediastreamaudiosourcenode has no inputs and exactly one output, and is created using the audiocon
text.createmediastreamsource() method. the mediastreamaudiosourcenode takes the audio from the first mediastreamtrack whose kind attribute's value is audio. see track ordering for more information about the order of tracks. the number of channels output by the node matches the number of tracks found in the selected audio track. number of inputs 0 number of outputs 1 ...
...rom the first mediastreamtrack whose kind attribute's value is audio. see track ordering for more information about the order of tracks. the number of channels output by the node matches the number of tracks found in the selected audio track. number of inputs 0 number of outputs 1 channel count defined by the first audio mediastreamtrack passed to the audiocon
text.createmediastreamsource() method that created it. constructor new mediastreamaudiosourcenode() creates a new mediastreamaudiosourcenode object instance with the specified options. properties in addition to the following properties, mediastreamaudiosourcenode inherits the properties of its parent, audionode. mediastream read only the mediastream used when constructing this media...
...usermedia supported.'); navigator.mediadevices.getusermedia ({audio: true, video: true}) .then(function(stream) { video.srcobject = stream; video.onloadedmetadata = function(e) { video.play(); video.muted = true; }; // create a mediastreamaudiosourcenode // feed the htmlmediaelement into it var audioctx = new audiocon
text(); var source = audioctx.createmediastreamsource(stream); // create a biquadfilter var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = range.value; // connect the audiobuffersourcenode to the gainnode // and the gainnode to the destination,...
...so playing/pausing the stream can still be done through the media element api and the player controls. specification specification status comment web audio apithe definition of 'mediastreamaudiosourcenode' in that specification. working draft ...
MediaStreamTrackAudioSourceNode - Web APIs
esents a source of audio data taken from a specific mediastreamtrack obtained through the webrtc or media capture and streams apis. the audio itself might be input from a microphone or other audio sampling device, or might be received through a rtcpeerconnection, among other posible options. ...
... constructor new mediastreamtrackaudiosourcenode() creates a new mediastreamtrackaudiosourcenode object instance with the specified options. properties the mediastreamtrackaudiosourcenode interface has no properties of its own; however, it inherits the properties of its parent, audionode. ...
...usermedia supported.'); navigator.mediadevices.getusermedia ({audio: true, video: true}) .then(function(stream) { video.srcobject = stream; video.onloadedmetadata = function(e) { video.play(); video.muted = true; }; // create a mediastreamaudiosourcenode // feed the htmlmediaelement into it var audioctx = new audiocon
text(); var source = audioctx.createmediastreamsource(stream); // create a biquadfilter var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = range.value; // connect the audiobuffersourcenode to the gainnode // and the gainnode to the destination,...
...so playing/pausing the stream can still be done through the media element api and the player controls. specification specification status comment web audio apithe definition of 'mediastreamtrackaudiosourcenode' in that specification. working draft ...
MouseEvent.relatedTarget - Web APIs
= document.getelementbyid('red'), blue = document.getelementbyid('blue'); red.addeventlistener('mouseover', overlistener); red.addeventlistener('mouseout', outlistener); blue.addeventlistener('mouseover', overlistener); blue.addeventlistener('mouseout', outlistener); function outlistener(event) { let related = event.relatedtarget ? ...
... working draft document ...
... working draft document object model (dom) level 3 events specificationthe definition of 'mouseevent.relatedtarget' in that specification. obsolete ...
...stener); function outlistener(event) { let related = event.relatedtarget ? event.relatedtarget.id : "unknown"; mouseoutlog.inner
text = `\nfrom ${event.target.id} into ${related} ${mouseoutlog.inner
text}`; } function overlistener(event) { let related = event.relatedtarget ? event.relatedtarget.id : "unknown"; log.inner
text = `\ninto ${event.target.id} from ${related} ${mouseoutlog.inner
text}`; } result specifications specification status comment ui eventsthe definition of 'mouseevent.relatedtarget' in that specification. working draft document object model (dom) level 3 events specificationthe definition of 'mouseevent.relatedtarget' in that specification. obsolete no change from document object model (dom) level 2 events specifica...
Navigator.clipboard - Web APIs
oard. this permission must be obtained from the permissions api using the "clipboard-read" and/or "clipboard-write" permissions. syntax theclipboard = navigator.clipboard; value the clipboard object used to access the system clipboard. examples the following code uses navigator.clipboard to access the system clipboard in order to read the contents of the clipboard. navigator.clipboard.read
text().then( clip
text => document.queryselector(".clip
text").inner
text = clip
text); this snippet replaces the contents of the element whose class is "clip
text" with the
text contents of the clipboard. perhaps this code is being used in a browser extension that displays the current clipboard contents, automatically updating periodically or when specific events fire. if the clipboard is empty or doe...
... specifications specification status comment clipboard api and eventsthe definition of 'navigator.clipboard' in that specification. working draft initial definition. ...
... specifications specification status comment clipboard api and eventsthe definition of 'navigator.clipboard' in that specification. ...
...ppet replaces the contents of the element whose class is "clip
text" with the
text contents of the clipboard. perhaps this code is being used in a browser extension that displays the current clipboard contents, automatically updating periodically or when specific events fire. if the clipboard is empty or doesn't contain
text, the "clip
text" element's contents are cleared. this happens because read
text() returns an empty string if the clipboard is empty or doesn't contain
text. specifications specification status comment clipboard api and eventsthe definition of 'navigator.clipboard' in that specification. working draft initial definition. ...
Node.firstChild - Web APIs
in the list of its direct children. syntax var childnode = node.firstchild; example this example demonstrates the use of firstchild and how whitespace nodes might interfere with using this property. ...
...ts direct children. syntax var childnode = node.firstchild; example this example demonstrates the use of firstchild and how whitespace nodes might interfere with using this property. ...
...itespace nodes might interfere with using this property. <p id="para-01"> <span>first span</span> </p> <script> var p01 = document.getelementbyid('para-01'); console.log(p01.firstchild.nodename); </script> in the above, the console will show '#
text' because a
text node is inserted to maintain the whitespace between the end of the opening <p> and <span> tags. any whitespace will create a #
text node, from a single space to multiple spaces, returns, tabs, and so on. another #
text node is inserted between the closing </span> and </p>tags. if this whitespace is removed from the source, the #
text nodes are not inserted and the span element becomes the paragraph's first child. <p id="para-01"><span>first span</span></p> <script> var p01 = document.getelementbyid('para-01'); console.l...
...however, node.firstelementchild requires a shim for internet explorer 9 and earlier. specifications specification status comment domthe definition of 'node.firstchild' in that specification. ...
Node.nodeType - Web APIs
node.cdata_section_node 4 a cdatasection, such as <!cdata[[ … ]]>. ...
... node.cdata_section_node 4 a cdatasection, such as <!cdata[[ … ]]>. node.processing_instruction_node 7 a processinginstruction of an xml document, such as <?xml-stylesheet … ?>. ...
... node.cdata_section_node 4 a cdatasection, such as <!cdata[[ … ]]>. node.processing_instruction_node 7 a processinginstruction of an xml document, such as <?xml-stylesheet … ?>. node.comment_node 8 a comment node, such as <!-- … -->. ...
...!entity …> node. removed in dom4. node.notation_node 12 an xml <!notation …> node. removed in dom4. examples different types of nodes document.nodetype === node.document_node; // true document.doctype.nodetype === node.document_type_node; // true document.createdocumentfragment().nodetype === node.document_fragment_node; // true var p = document.createelement("p"); p.
textcontent = "once upon a time…"; p.nodetype === node.element_node; // true p.firstchild.nodetype === node.
text_node; // true comments this example checks if the first node inside the document element is a comment, and displays a message if not. var node = document.documentelement.firstchild; if (node.nodetype !== node.comment_node) { console.warn("you should comment your code!"); } specif...
Node.normalize() - Web APIs
the node.normalize() method puts the specified node and all of its sub-tree into a "normalized" form. in a normalized sub-tree, no
text nodes in the sub-tree are empty and there are no adjacent
text nodes. ...
... the node.normalize() method puts the specified node and all of its sub-tree into a "normalized" form. in a normalized sub-tree, no
text nodes in the sub-tree are empty and there are no adjacent
text nodes. ...
... the node.normalize() method puts the specified node and all of its sub-tree into a "normalized" form. in a normalized sub-tree, no
text nodes in the sub-tree are empty and there are no adjacent
text nodes. ...
...malized" form. in a normalized sub-tree, no
text nodes in the sub-tree are empty and there are no adjacent
text nodes. syntax element.normalize(); example let wrapper = document.createelement("div"); wrapper.appendchild( document.create
textnode("part 1 ") ); wrapper.appendchild( document.create
textnode("part 2 ") ); // at this point, wrapper.childnodes.length === 2 // wrapper.childnodes[0].
textcontent === "part 1 " // wrapper.childnodes[1].
textcontent === "part 2 " wrapper.normalize(); // now, wrapper.childnodes.length === 1 // wrapper.childnodes[0].
textcontent === "part 1 part 2 " specifications specification status comment domthe definition of 'node: normalize' in that specification. living standard ...
OscillatorNode.detune - Web APIs
ode interface is an a-rate audioparam representing detuning of oscillation in cents. syntax var oscillator = audioctx.createoscillator(); oscillator.detune.setvalueattime(100, audioctx.currenttime); // value in cents note: though the audioparam returned is read-only, the value it represents is not. value an a-rate audioparam. ...
...ueattime(100, audioctx.currenttime); // value in cents note: though the audioparam returned is read-only, the value it represents is not. value an a-rate audioparam. example the following example shows basic usage of an audiocon
text to create an oscillator node. for applied examples/information, check out our violent theremin demo (see app.js for relevant code). ...
...value in cents note: though the audioparam returned is read-only, the value it represents is not. value an a-rate audioparam. example the following example shows basic usage of an audiocon
text to create an oscillator node. for applied examples/information, check out our violent theremin demo (see app.js for relevant code). ...
... the audioparam returned is read-only, the value it represents is not. value an a-rate audioparam. example the following example shows basic usage of an audiocon
text to create an oscillator node. for applied examples/information, check out our violent theremin demo (see app.js for relevant code). ...
OscillatorNode.start() - Web APIs
tart method of the oscillatornode interface specifies the exact time to start playing the tone. its parameter is optional and default to 0. ...
...illator at the point in time specified by when parameters when optional an optional double representing the time (in seconds) when the oscillator should start, in the same coordinate system as audiocon
text's currenttime attribute. if a value is not included or is less than currenttime, the oscillator starts playing immediately. example the following example shows basic usage of an audiocon
text to create an oscillator node. for an applied example, check out our violent theremin demo (see app.js for relevant code). ...
...ld start, in the same coordinate system as audiocon
text's currenttime attribute. if a value is not included or is less than currenttime, the oscillator starts playing immediately. example the following example shows basic usage of an audiocon
text to create an oscillator node. for an applied example, check out our violent theremin demo (see app.js for relevant code). ...
...as audiocon
text's currenttime attribute. if a value is not included or is less than currenttime, the oscillator starts playing immediately. example the following example shows basic usage of an audiocon
text to create an oscillator node. for an applied example, check out our violent theremin demo (see app.js for relevant code). // create web audio api con
text var audioctx = new (window.audiocon
text || window.webkitaudiocon
text)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(3000, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'start' in that specification. working draft ...
OscillatorNode.stop() - Web APIs
the stop method of the oscillatornode interface specifies the time to stop playing the tone. its parameter is optional and defaults to 0. syntax oscillator.stop(when); // stop playing oscillator at when parameters when optional an optional double representing the audio con
text time when the oscillator should stop. if a value is not included, it defaults to 0. if the time is equal to or before the current audio con
text time, the oscillator will stop playing immediately. ...
... oscillator.stop(when); // stop playing oscillator at when parameters when optional an optional double representing the audio con
text time when the oscillator should stop. if a value is not included, it defaults to 0. if the time is equal to or before the current audio con
text time, the oscillator will stop playing immediately. example the following example shows basic usage of an audiocon
text to create an oscillator node. for an applied example, check out our violent theremin demo (see app.js for relevant code). ...
...cillator should stop. if a value is not included, it defaults to 0. if the time is equal to or before the current audio con
text time, the oscillator will stop playing immediately. example the following example shows basic usage of an audiocon
text to create an oscillator node. for an applied example, check out our violent theremin demo (see app.js for relevant code). ...
...included, it defaults to 0. if the time is equal to or before the current audio con
text time, the oscillator will stop playing immediately. example the following example shows basic usage of an audiocon
text to create an oscillator node. for an applied example, check out our violent theremin demo (see app.js for relevant code). // create web audio api con
text var audioctx = new (window.audiocon
text || window.webkitaudiocon
text)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.connect(audioctx.destination); oscillator.start(); oscillator.stop(audioctx.currenttime + 2); // stop 2 seconds after the current time specifications specification status comment web audio apithe definition of 'stop' in that specification. working dr...
PannerNode.positionX - Web APIs
ax var positionx = pannernode.positionx; pannernode.positionx.value = newpositionx; value an audioparam whose value is the x coordinate of the audio source's position, in 3d cartesian coordinates. the default value is 0. example the following example starts an oscillator, and pans it to the left after 1 second, to the right after 2 seconds, and back to the center after 3 seconds. ...
... pannernode.positionx; pannernode.positionx.value = newpositionx; value an audioparam whose value is the x coordinate of the audio source's position, in 3d cartesian coordinates. the default value is 0. example the following example starts an oscillator, and pans it to the left after 1 second, to the right after 2 seconds, and back to the center after 3 seconds. ...
...x.value = newpositionx; value an audioparam whose value is the x coordinate of the audio source's position, in 3d cartesian coordinates. the default value is 0. example the following example starts an oscillator, and pans it to the left after 1 second, to the right after 2 seconds, and back to the center after 3 seconds. ...
...oparam whose value is the x coordinate of the audio source's position, in 3d cartesian coordinates. the default value is 0. example the following example starts an oscillator, and pans it to the left after 1 second, to the right after 2 seconds, and back to the center after 3 seconds. const con
text = new audiocon
text(); const osc = new oscillatornode(con
text); const panner = new pannernode(con
text); panner.positionx.setvalueattime(-1, con
text.currenttime + 1); panner.positionx.setvalueattime(1, con
text.currenttime + 2); panner.positionx.setvalueattime(0, con
text.currenttime + 3); osc.connect(panner) .connect(con
text.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'positionx' in that specification. ...
ParentNode.append() - Web APIs
differences from node.appendchild(): parentnode.append() allows you to also append domstring objects, whereas node.appendchild() only accepts node objects. parentnode.append() has no return value, whereas node.appendchild() returns the appended node object. parentnode.append() can append several nodes and strings, whereas node.appendchild() can only append one node. ...
...domstrings) // returns undefined parameters nodes a set of node or domstring objects to insert. exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy. ...
... or domstring objects to insert. exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy. examples appending an element let parent = document.createelement("div") let p = document.createelement("p") parent.append(p) console.log(parent.childnodes) // nodelist [ <p> ] appending
text let parent = document.createelement("div") parent.append("some
text") console.log(parent.
textcontent) // "some
text" appending an element and
text let parent = document.createelement("div") let p = document.createelement("p") parent.append("some
text", p) console.log(parent.childnodes) // nodelist [ #
text "some
text", <p> ] parentnode.append() is unscopable the append() method is not scoped into the with statement. see symbol.unscopables for more informatio...
... living standard initial definition. ...
PasswordCredential - Web APIs
the interface of the credential management api provides information about a username/password pair. in supporting browsers an instance of this class may be passed in the credential member of the init object for global fetch. note: this interface is restricted to top-level con
texts and cannot be used from an <iframe>. constructor passwordcredential()secure con
text creates a new passwordcredential object. properties inherits properties from its ancestor, credential. ...
...stance of this class may be passed in the credential member of the init object for global fetch. note: this interface is restricted to top-level con
texts and cannot be used from an <iframe>. constructor passwordcredential()secure con
text creates a new passwordcredential object. properties inherits properties from its ancestor, credential. passwordcredential.additionaldata secure con
text one of a formdata instance, a urlsearchparams instance, or null. the data in the objects will be added to the request body and sent to the remote endpoint with the credentials. passwordcredential.iconurl read only secure con
text a usvstring containing a url pointing to an image for an icon. this image is intended for display in a credential chooser. the url must be accessible without authentic...
...ms instance, or null. the data in the objects will be added to the request body and sent to the remote endpoint with the credentials. passwordcredential.iconurl read only secure con
text a usvstring containing a url pointing to an image for an icon. this image is intended for display in a credential chooser. the url must be accessible without authentication. passwordcredential.idname secure con
text a usvstring containing the name that will be used for the id field when submitting the current object to a remote endpoint via fetch. this property defaults to 'username', but may be overridden to match whatever the backend service expects. passwordcredential.name read only secure con
text a usvstring containing a human-readable public name for display in a credential chooser. passwordcredenti...
...e that will be used for the id field when submitting the current object to a remote endpoint via fetch. this property defaults to 'username', but may be overridden to match whatever the backend service expects. passwordcredential.name read only secure con
text a usvstring containing a human-readable public name for display in a credential chooser. passwordcredential.password read only secure con
text a usvstring containing the password of the credential. passwordcredential.passwordname secure con
text a usvstring representing the name that will be used for the password field when submitting the current object to a remote endpoint via fetch. this property defaults to 'password', but may be overridden to match whatever the backend service expects. event handlers none. methods none. exa...
Using the Payment Request API - Web APIs
nts. in the following snippet we do just this — depending on whether the user can make a fast payment or needs to add payment credentials first, the title of the checkout button changes between "fast checkout with w3c" and "setup w3c checkout". in both cases, the checkout button calls paymentrequest.show(). ...
...utton calls paymentrequest.show(). const checkoutbutton = document.getelementbyid('checkout-button'); checkoutbutton.inner
text = "loading..."; if (window.paymentrequest) { let request = new paymentrequest(buildsupportedpaymentmethodnames(), buildshoppingcartdetails()); request.canmakepayment().then(function(canmakeafastpayment) { if (canmakeafastpayment) { checkoutbutton.inner
text = "fast checkout with w3c"; } else { checkoutbutton.inner
text = "setup w3c checkout"; } }).catch(function(error) { // the user may have turned off the querying functionality in their // privacy settings. ...
...nmakeafastpayment) { checkoutbutton.inner
text = "fast checkout with w3c"; } else { checkoutbutton.inner
text = "setup w3c checkout"; } }).catch(function(error) { // the user may have turned off the querying functionality in their // privacy settings. the website does not know whether they can make // a fast payment, so pick a generic title. checkoutbutton.inner
text = "checkout with w3c"; }); } note: see our customizing the payment button demo for the full code. checking before all prices are known if the checkout flow needs to know whether paymentrequest.canmakepayment() will return true even before all line items and their prices are known, you can instantiate paymentrequest with dummy data and pre-query .canmakepayment(). if you call .canmakepayme...
... = 'none'; legacypanel.style.display = 'block'; } }); }); note: see our recommending a payment app when user has no apps demo for the full code. showing additional user interface after successful payments if the merchant desires to collect additional information not part of the api (e.g., additional delivery instructions), the merchant can show a page with additional <input type="
text"> fields after the checkout. request.show() .then(function(paymentresponse) { // process payment here. // close the ui: paymentresponse.complete('success').then(function() { // request additional shipping address details. const additionaldetailscontainer = document.getelementbyid('additional-details-container'); additionaldetailscontainer.style.display = 'bloc...
PluginArray - Web APIs
var pluginslength = navigator.plugins.length; doc...
... var pluginslength = navigator.plugins.length; document.write( pluginslength.tostring() + " plugin(s)<br>" + ...
... var pluginslength = navigator.plugins.length; document.write( pluginslength.tostring() + " plugin(s)<br>" + "name | filename | description<br>" ); for(var i = 0; i < pluginsl...
.../th></tr>' +'</thead><tbody></tbody></table>'; var table = document.getelementbyid('plugintable'); for(var i = 0; i < pluginslength; i++) { let newrow = table.insertrow(); newrow.insertcell().
textcontent = navigator.plugins[i].name; newrow.insertcell().
textcontent = navigator.plugins[i].filename; newrow.insertcell().
textcontent = navigator.plugins[i].description; newrow.insertcell().
textcontent = navigator.plugins[i].version?navigator.plugins[i].version:""; } the following example displays information about the installed plugin(s). var pluginslength = navigator.plugins.length; document.write( pluginslength.tostring() + " plugin(s)<br>" + "name | filename | description<br>" ); for(var i = 0; i < pluginslength; i++) { document.write( navigator.plugins[i].name + " ...
ProcessingInstruction - Web APIs
isplay: inline-block; position: relative; width: 100%; padding-bottom: 10%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 700 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/characterdata" target="_top"><rect x="266" y="1" width="130" heigh...
...monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/characterdata" target="_top"><rect x="266" y="1" width="130" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="331" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">characterdata</
text></a><polyline points="396,25 406,20 406,30 396,25" stroke="#d4dde4" fill="none"/><line x1="406" y1="25" x2="436" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/processinginstruction" target="_top"><rect x="436" y="1" wi...
...onospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">characterdata</
text></a><polyline points="396,25 406,20 406,30 396,25" stroke="#d4dde4" fill="none"/><line x1="406" y1="25" x2="436" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/processinginstruction" target="_top"><rect x="436" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="541" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">processinginstruction</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties target (domstring) read only a name identifying the application to which the instruction is targeted, specification ...
SVGAnimateColorElement - Web APIs
methods this interface has no met...
... methods this interface has no methods but inherits methods from its parent, svganimationelement. specifications specification ...
... methods this interface has no methods but inherits methods from its parent, svganimationelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second e...
...ectratio="xminymin meet"><a xlink:href="/docs/web/api/svganimatecolorelement" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svganimatecolorelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svganimationelement. methods this interface has no methods but inherits methods from its parent, svganimationelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganima...
SVGElement - Web APIs
lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" ...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...aco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">element</
text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties also inherits properties from: documentandelementeventhandlers, element, elementcssinlinestyle, globaleventhandlers, htmlorforeignelement, svg...
SVGFontFaceElement - Web APIs
methods this interface has no methods but inher...
... methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment ...
... methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definit...
...eserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfaceelement" target="_top"><rect x="1" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="91" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgfontfaceelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement. methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfaceelement' in tha...
SVGGlyphRefElement - Web APIs
...
... svgglyphrefelement.glyphref a domstring corresponding to the glyphref attribute of the given element. ...
... svgglyphrefelement.glyphref a domstring corresponding to the glyphref attribute of the given element. svgglyphrefelement.format a domstring corresponding to the format at...
...eserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgglyphrefelement" target="_top"><rect x="1" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="91" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgglyphrefelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svgelement and implements properties from svgurireference and svgstylable. svgglyphrefelement.glyphref a domstring corresponding to the glyphref attribute of the given element. svgglyphrefelement.format a domstring corresponding to the format attribute of the given element. svg...
SVGHKernElement - Web APIs
methods this interface has no methods but inherits...
... methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment ...
... methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definit...
...40" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svghkernelement" target="_top"><rect x="1" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svghkernelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement. methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svghkernelement' in that s...
SVGMissingGlyphElement - Web APIs
...
... methods this interface has no methods but inherits methods from its parent, svgelement and implements me...
... methods this interface has no methods but inherits methods from its parent, svgelement and implements methods from svgstylable. specifications specification status...
...ectratio="xminymin meet"><a xlink:href="/docs/web/api/svgmissingglyphelement" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgmissingglyphelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement and implements properties from svgstylable. methods this interface has no methods but inherits methods from its parent, svgelement and implements methods from svgstylable. specifications specification status comment scalable vect...
SVGSolidcolorElement - Web APIs
methods t...
... methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svg...
... methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement. ...
... methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement. ...
SVGUnitTypes - Web APIs
it is invalid to attempt...
...it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. svg...
...it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. svg_unit_type_userspaceonuse 1 corresponds to the value user...
...0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgunittypes" target="_top"><rect x="1" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="61" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgunittypes</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constants name value description svg_unit_type_unknown 0 the type is not one of predefined types. it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. svg_unit_type_userspaceonuse 1 corresponds to the value userspaceonuse. svg_unit_type...
SVGVKernElement - Web APIs
methods this interface has no methods but inherits...
... methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment ...
... methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definit...
...40" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgvkernelement" target="_top"><rect x="1" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgvkernelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement. methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgvkernelement' in that s...
SVGZoomAndPan - Web APIs
it is invalid to attem...
...it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. s...
...it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. svg_zoomandpan_disable 1 corresponds to the value disable. ...
...600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgzoomandpan" target="_top"><rect x="1" y="1" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="66" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgzoomandpan</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constants name value description svg_zoomandpan_unknown 0 the type is not one of predefined types. it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. svg_zoomandpan_disable 1 corresponds to the value disable. svg_zoomandpan_magnify ...
ScriptProcessorNode - Web APIs
two buffers, one containing the input audio data, one containing the processed output audio data. an event, implementing the audioprocessingevent interface, is sent to the object each time the input buffer contains new data, and the event handler terminates when it has filled the output buffer with data. the size of the input and output buffer are defined at the creation time, when the audiocon
text.createscriptprocessor() method is called (both are defined by audiocon
text.createscriptprocessor()'s buffersize parameter). the buffer size must be a power of 2 between 256 and 16384, that is 256, 512, 1024, 2048, 4096, 8192 or 16384. small numbers lower the latency, but large number may be necessary to avoid audio breakup and glitches. if the buffer size is not defined, which is recommended, th...
... listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of this interface: audioprocess fired when an input buffer of a scriptprocessornode is ready to be processed. also available via the onaudioprocess event handler property. examples the following example shows basic usage of a scriptprocessornode to take a track loaded via audiocon
text.decodeaudiodata(), process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the audiodestinationnode. for each channel and each sample frame, the scriptnode.onaudioprocess function takes the associated audioprocessingevent and uses it to loop through each channel of the input buffer, and each sample in each channel, and add a small amount of whi...
... sample in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case. ...
... white noise, before setting that result to be the output sample in each case. ...
Sensor APIs - Web APIs
tlistener('reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }) magsensor.addeventlistener('error', event => { console.log(event.error.name, event.error.message); }) magsensor.start(); interfaces absoluteorientationsensorsecure con
text describes the device's physical orientation in relation to the earth's reference coordinate system. accelerometersecure con
text provides the acceleration applied to the device along all three axes. ambientlightsensorsecure con
text returns the current light level or illuminance of the ambient light around the hosting device. gyroscopesecure con
text provides the angular velocity of the devic...
...o the earth's reference coordinate system. accelerometersecure con
text provides the acceleration applied to the device along all three axes. ambientlightsensorsecure con
text returns the current light level or illuminance of the ambient light around the hosting device. gyroscopesecure con
text provides the angular velocity of the device along all three axes. linearaccelerationsensorsecure con
text provides the acceleration applied to the device along all three axes, but without the contribution of gravity. magnetometersecure con
text provides information about the magnetic field as detected by the device’s primary magnetometer sensor. orientationsensorsecure con
text the base class for the absoluteorientationsensor. this interface cannot be used directly, instead it provides propertie...
...ution of gravity. magnetometersecure con
text provides information about the magnetic field as detected by the device’s primary magnetometer sensor. orientationsensorsecure con
text the base class for the absoluteorientationsensor. this interface cannot be used directly, instead it provides properties and methods accessed by interfaces that inherit from it. relativeorientationsensorsecure con
text describes the device's physical orientation without regard to the earth's reference coordinate system. sensorsecure con
text the base class for all the other sensor interfaces. this interface cannot be used directly. instead it provides properties, event handlers, and methods accessed by interfaces that inherit from it. ...
... specifications specification status comment generic sensor api candidate recommendation initial definition. accelerometer candidate recommendation defines accelerometer and linearaccerationsensor. ...
SharedWorker - Web APIs
constructors sharedworker() creates a shared web worker that executes the script at the specified url. properties inherits properties from its parent, eventtarget, and implements properties from abstractworker. ...
... constructors sharedworker() creates a shared web worker that executes the script at the specified url. properties inherits properties from its parent, eventtarget, and implements properties from abstractworker. ...
... constructors sharedworker() creates a shared web worker that executes the script at the specified url. properties inherits properties from its parent, eventtarget, and implements properties from abstractworker. ...
...the ports associated with that worker are accessible in the connect event's ports property — we then use messageport start() method to start the port, and the onmessage handler to deal with messages sent from the m...
SpeechSynthesisEvent - Web APIs
esisevent interface of the web speech api contains information about the current state of speechsynthesisutterance objects that have been processed in the speech service. properties the speechsynthesisevent interface also inherits properties from its parent interface, event. ...
...ies the speechsynthesisevent interface also inherits properties from its parent interface, event. speechsynthesisevent.charindex read only returns the index position of the character in the speechsynthesisutterance.
text that was being spoken when the event was triggered. speechsynthesisevent.elapsedtime read only returns the elapsed time in milliseconds after the speechsynthesisutterance.
text started being spoken that the event was triggered at. speechsynthesisevent.name read only returns the name associated with certain types of events occuring as the speechsynthesisutterance.
text is being spoken: the name of the ssml marker reached in the case of a mark event, or the type of boundary reached in the case of a boundary event. speechsynthesisevent.utterance read only returns the ...
...ed in the case of a mark event, or the type of boundary reached in the case of a boundary event. speechsynthesisevent.utterance read only returns the speechsynthesisutterance instance that the event was triggered on. methods the speechsynthesisevent interface also inherits methods from its parent interface, event. ...
...erance read only returns the speechsynthesisutterance instance that the event was triggered on. methods the speechsynthesisevent interface also inherits methods from its parent interface, event. examples utterthis.onpause = function(event) { var char = event.utterance.
text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.
text + '", which is "' + char + '".'); } utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speechsynthesisevent' in that specification. draft ...
SpeechSynthesisVoice - Web APIs
hat represents the voice. speechsynthesisvoice.voiceuri read only returns the type of uri and location of the speech synthesis service for this voice. examples the following snippet is excerpted from our speech synthesiser demo. ...
...ion of the speech synthesis service for this voice. examples the following snippet is excerpted from our speech synthesiser demo. ...
... draft ...
... draft ...
Using writable streams - Web APIs
called if the app signals that it has finished writing chunks to the stream. it should do whatever is necessary to finalize writes to the underlying sink, and release access to it. abort(reason) — a method that will be called if the app signals that it wishes to abruptly close the stream and put it in an errored state. ...
... highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.
textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.
textcontent = "[message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); the write() method contains a promi...
...write content to the stream we call the sendmessage() function, passing it a message to be written and the stream to write to: sendmessage("hello, world.", writablestream); the sendmessage() definition looks like so: function sendmessage(message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new
textencoder(); const encoded = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all ch...
...g the writer. defaultwriter.ready .then(() => { defaultwriter.close(); }) .then(() => { console.log("all chunks written"); }) .catch((err) => { console.log("stream error:", err); }); } so here we create a writer to write the chunks to the stream using writablestream.getwriter(). this creates a writablestreamdefaultwriter instance. we also create a new
textencoder instance using the relevant constructor to encode the message into chunks to be put into the stream. with the chunks encoded, we then call array/foreach on the resulting array. inside this block we use writablestreamdefaultwriter.ready to check whether the writer is ready to have another chunk written to it. ready returns a promise that fulfills when this is the case, inside of which we c...
SubtleCrypto.exportKey() - Web APIs
r containing the bytes for the key. see the complete code on github. /* export the given key and write it into the "exported-key" space. */ async function exportcryptokey(key) { const exported = await window.crypto.subtle.exportkey( "raw", key ); const exportedkeybuffer = new uint8array(exported); const exportkeyoutput = document.queryselector(".exported-key"); exportkeyoutput.
textcontent = `[${exportedkeybuffer}]`; } /* generate an encrypt/decrypt secret key, then set up an event listener on the "export" button. */ window.crypto.subtle.generatekey( { name: "aes-gcm", length: 256, }, true, ["encrypt", "decrypt"] ).then((key) => { const exportbutton = document.queryselector(".raw"); exportbutton.addeventlistener("click", () => { exportcryptokey(key);...
...*/ window.crypto.subtle.generatekey( { name: "rsa-pss", // consider using a 4096-bit key for systems that require long-term security moduluslength: 2048, publicexponent: new uint8array([1, 0, 1]), hash: "sha-256", }, true, ["sign", "verify"] ).then((keypai...
...*/ window.crypto.subtle.generatekey( { name: "rsa-oaep", // consider using a 4096-bit key for systems that require long-term security moduluslength: 2048, publicexponent: new uint8array([1, 0, 1]), hash: "sha-256", }, true, ["encrypt", "decrypt"] ).th...
...n web key import this code exports an ecdsa private signing key as a json web key object. see the complete code on github. /* export the given key and write it into the "exported-key" space. */ async function exportcryptokey(key) { const exported = await window.crypto.subtle.exportkey( "jwk", key ); const exportkeyoutput = document.queryselector(".exported-key"); exportkeyoutput.
textcontent = json.stringify(exported, null, " "); } /* generate a sign/verify key pair, then set up an event listener on the "export" button. */ window.crypto.subtle.generatekey( { name: "ecdsa", namedcurve: "p-384" }, true, ["sign", "verify"] ).then((keypair) => { const exportbutton = document.queryselector(".jwk"); exportbutton.addeventlistener("click", () => { exportcrypt...
SubtleCrypto.verify() - Web APIs
n trying to use an algorithm that is either unknown or isn't suitable for a verify operation. supported algorithms the verify() method supports the same algorithms as the sign() method. examples note: you can try the working examples out on github. rsassa-pkcs1-v1_5 this code uses a public key to verify a signature. see the complete code on github. /* fetch the contents of the "message"
textbox, and encode it in a form we can use for sign operation. */ function getmessageencoding() { const messagebox = document.queryselector(".rsassa-pkcs1 #message"); let message = messagebox.value; let enc = new
textencoder(); return enc.encode(message); } /* fetch the encoded message-to-sign and verify it against the stored signature. * if it checks out, set the "valid" class on the signat...
...e.classlist.remove("valid", "invalid"); let encoded = getmessageencoding(); let result = await window.crypto.subtle.verify( "rsassa-pkcs1-v1_5", publickey, signature, encoded ); signaturevalue.classlist.add(result ? "valid" : "invalid"); } rsa-pss this code uses a public key to verify a signature. see the complete code on github. /* fetch the contents of the "message"
textbox, and encode it in a form we can use for sign operation. */ function getmessageencoding() { const messagebox = document.queryselector(".rsa-pss #message"); let message = messagebox.value; let enc = new
textencoder(); return enc.encode(message); } /* fetch the encoded message-to-sign and verify it against the stored signature. * if it checks out, set the "valid" class on the signature. ...
...valid"); let encoded = getmessageencoding(); let result = await window.crypto.subtle.verify( { name: "rsa-pss", saltlength: 32, }, publickey, signature, encoded ); signaturevalue.classlist.add(result ? "valid" : "invalid"); } ecdsa this code uses a public key to verify a signature. see the complete code on github. /* fetch the contents of the "message"
textbox, and encode it in a form we can use for sign operation. */ function getmessageencoding() { const messagebox = document.queryselector(".ecdsa #message"); let message = messagebox.value; let enc = new
textencoder(); return enc.encode(message); } /* fetch the encoded message-to-sign and verify it against the stored signature. * if it checks out, set the "valid" class on the signature. * ...
...); let encoded = getmessageencoding(); let result = await window.crypto.subtle.verify( { name: "ecdsa", hash: {name: "sha-384"}, }, publickey, signature, encoded ); signaturevalue.classlist.add(result ? "valid" : "invalid"); } hmac this code uses a secret key to verify a signature. see the complete code on github. /* fetch the contents of the "message"
textbox, and encode it in a form we can use for sign operation. */ function getmessageencoding() { const messagebox = document.queryselector(".hmac #message"); let message = messagebox.value; let enc = new
textencoder(); return enc.encode(message); } /* fetch the encoded message-to-sign and verify it against the stored signature. * if it checks out, set the "valid" class on the signature.
SubtleCrypto.wrapKey() - Web APIs
w wrap this example wraps an aes key. it uses "raw" as the export format and aes-kw, with a password-derived key, to encrypt it. see the complete code on github. let salt; /* get some key material to use as input to the derivekey method. the key material is a password supplied by the user. */ function getkeymaterial() { const password = window.prompt("enter your password"); const enc = new
textencoder(); return window.crypto.subtle.importkey( "raw", enc.encode(password), {name: "pbkdf2"}, false, ["derivebits", "derivekey"] ); } /* given some key material and some random salt derive an aes-kw key using pbkdf2. */ function getkey(keymaterial, salt) { return window.crypto.subtle.derivekey( { "name": "pbkdf2", salt: salt, "iterations": 100000...
...an rsa private signing key. it uses "pkcs8" as the export format and aes-gcm, with a password-derived key, to encrypt it. see the complete code on github. let salt; let iv; /* get some key material to use as input to the derivekey method. the key material is a password supplied by the user. */ function getkeymaterial() { const password = window.prompt("enter your password"); const enc = new
textencoder(); return window.crypto.subtle.importkey( "raw", enc.encode(password), {name: "pbkdf2"}, false, ["derivebits", "derivekey"] ); } /* given some key material and some random salt derive an aes-gcm key using pbkdf2. */ function getkey(keymaterial, salt) { return window.crypto.subtle.derivekey( { "name": "pbkdf2", salt: salt, "iterations": 10000...
...n rsa public encryption key. it uses "spki" as the export format and aes-cbc, with a password-derived key, to encrypt it. see the complete code on github. let salt; let iv; /* get some key material to use as input to the derivekey method. the key material is a password supplied by the user. */ function getkeymaterial() { const password = window.prompt("enter your password"); const enc = new
textencoder(); return window.crypto.subtle.importkey( "raw", enc.encode(password), {name: "pbkdf2"}, false, ["derivebits", "derivekey"] ); } /* given some key material and some random salt derive an aes-cbc key using pbkdf2. */ function getkey(keymaterial, salt) { return window.crypto.subtle.derivekey( { "name": "pbkdf2", salt: salt, "iterations": 10000...
...an ecdsa private signing key. it uses "jwk" as the export format and aes-gcm, with a password-derived key, to encrypt it. see the complete code on github. let salt; let iv; /* get some key material to use as input to the derivekey method. the key material is a password supplied by the user. */ function getkeymaterial() { const password = window.prompt("enter your password"); const enc = new
textencoder(); return window.crypto.subtle.importkey( "raw", enc.encode(password), {name: "pbkdf2"}, false, ["derivebits", "derivekey"] ); } /* given some key material and some random salt derive an aes-gcm key using pbkdf2. */ function getkey(keymaterial, salt) { return window.crypto.subtle.derivekey( { "name": "pbkdf2", salt: salt, "iterations": 10000...
getTrackById() - Web APIs
if no match is found, this method returns null. the tracks are searched in their natural order; that is, in the order defined by the media resource itself, or, if the resource doesn't define an order, the relative order in which the tracks are declared by the media resource. ...
...if no match is found, this method returns null. the tracks are searched in their natural order; that is, in the order defined by the media resource itself, or, if the resource doesn't define an order, the relative order in which the tracks are declared by the media resource. ...
...if no match is found, this method returns null. the tracks are searched in their natural order; that is, in the order defined by the media resource itself, or, if the resource doesn't define an order, the relative order in which the tracks are declared by the media resource. ...
...d string. if no match is found, this method returns null. the tracks are searched in their natural order; that is, in the order defined by the media resource itself, or, if the resource doesn't define an order, the relative order in which the tracks are declared by the media resource. specifications specification status comment html living standardthe definition of '
texttracklist.gettrackbyid()' in that specification. living standard ...
TrackEvent - Web APIs
nt interface, which is used for tracks which are part of an rtcpeerconnection. events based on trackevent are always sent to one of the media track list types: events involving video tracks are always sent to the videotracklist found in htmlmediaelement.videotracks events involving audio tracks are always sent to the audiotracklist specified in htmlmediaelement.audiotracks events affecting
text tracks are sent to the
texttracklist object indicated by htmlmediaelement.
texttracks. constructor trackevent() creates and initializes a new trackevent object with the event type specified, as well as optional additional properties. properties trackevent is based on event, so properties of event are also available on trackevent objects. track read only the dom track object the ev...
...reates and initializes a new trackevent object with the event type specified, as well as optional additional properties. properties trackevent is based on event, so properties of event are also available on trackevent objects. track read only the dom track object the event is in reference to. if not null, this is always an object of one of the media track types: audiotrack, videotrack, or
texttrack). methods trackevent has no methods of its own; however, it is based on event, so it provides the methods available on event objects. example this example sets up a function, handletrackevent(), which is callled for any addtrack or removetrack event on the first <video> element found in the document. var videoelem = document.queryselector("video"); videoelem.videotracks.addeventlisten...
...t found in the document. ...
...videoelem.videotracks.addeventlistener("addtrack", handletrackevent, false); videoelem.videotracks.addeventlistener("removetrack", handletrackevent, false); videoelem.audiotracks.addeventlistener("addtrack", handletrackevent, false); videoelem.audiotracks.addeventlistener("removetrack", handletrackevent, false); videoelem.
texttracks.addeventlistener("addtrack", handletrackevent, false); videoelem.
texttracks.addeventlistener("removetrack", handletrackevent, false); function handletrackevent(event) { var trackkind; if (event.target instanceof(videotracklist)) { trackkind = "video"; } else if (event.target instanceof(audiotracklist)) { trackkind = "audio"; } else if (event.target instanceof(
texttracklist)) { trackkind = "
text"; } else { trackkind = "unknown"; } sw...
VTTCue - Web APIs
the vttcue interface—part of the api for handling webvtt (
text tracks on media presentations)—describes and controls the
text track associated with a particular <track> element. constructor vttcue(starttime, endtime,
text) returns a newly created vttcue object that covers the given time range and has the given
text. param starttime the time, in seconds and fractions of a second, that describes the beginning of the range of the media data to which the cue applies. endtime the time, in seconds and fractions of a second, that describes the end of the range of the media data to which the cue applies.
text the raw
text of the cue, and rules for its interpretation. properties this interface also inherits properties from
texttrackcue. vttcue.region a vttregion ...
... be the string auto or a number representing the percentage of the vttcue.region, or the video size if vttcue.region is null. vttcue.positionalign returns an enum representing the alignment of the cue. this is used to determine what the vttcue.position is anchored to. the default is auto. vttcue.size returns a double representing the size of the cue, as a percentage of the video size. vttcue.
textalign returns an enum representing the alignment of all the lines of
text within the cue box. vttcue.
text returns a domstring with the contents of the cue. methods getcueashtml() returns the cue
text as a documentfragment. example html <video controls src="https://udn.realityripple.com/samples/c6/f8a3489533.webm"></video> css video { width: 320px; height: 180px; } javascript l...
... domstring with the contents of the cue. methods getcueashtml() returns the cue
text as a documentfragment. example html <video controls src="https://udn.realityripple.com/samples/c6/f8a3489533.webm"></video> css video { width: 320px; height: 180px; } javascript let video = document.queryselector('video'); video.addeventlistener('loadedmetadata', () => { const track = video.add
texttrack("captions", "简体中文subtitles", "zh_cn"); track.mode = "showing"; const cuecn = new vttcue(0, 2.500, '字幕会在0至2.5秒间显示'); track.addcue(cuecn); const cueen = new vttcue(2.6, 4, 'subtitles will display between 2.6 and 4 seconds'); track.addcue(cueen); }); result chrome: please open in jsfiddle to view the live sample. embed live sample can not show subtitl...
...0, 2.500, '字幕会在0至2.5秒间显示'); track.addcue(cuecn); const cueen = new vttcue(2.6, 4, 'subtitles will display between 2.6 and 4 seconds'); track.addcue(cueen); }); result chrome: please open in jsfiddle to view the live sample. embed live sample can not show subtitles in chrome. specifications specification status comment webvtt: the web video
text tracks format candidate recommendation ...
WebGLActiveInfo - Web APIs
the webglactiveinfo interface is part of the webgl api and represents the information returned by calling the webglrenderingcon
text.getactiveattrib() and webglrenderingcon
text.getactiveuniform() methods. properties webglactiveinfo.name the read-only name of the requested variable. webglactiveinfo.size the read-only size of the requested variable. webglactiveinfo.type the read-only type of the requested variable. ...
...calling the webglrenderingcon
text.getactiveattrib() and webglrenderingcon
text.getactiveuniform() methods. properties webglactiveinfo.name the read-only name of the requested variable. webglactiveinfo.size the read-only size of the requested variable. webglactiveinfo.type the read-only type of the requested variable. ...
...veattrib() and webglrenderingcon
text.getactiveuniform() methods. properties webglactiveinfo.name the read-only name of the requested variable. webglactiveinfo.size the read-only size of the requested variable. webglactiveinfo.type the read-only type of the requested variable. ...
...uniform() methods. properties webglactiveinfo.name the read-only name of the requested variable. webglactiveinfo.size the read-only size of the requested variable. webglactiveinfo.type the read-only type of the requested variable. examples a webglactiveinfo object is returned by: webglrenderingcon
text.getactiveattrib() webglrenderingcon
text.getactiveuniform() or webgl2renderingcon
text.gettransformfeedbackvarying() webglactiveinfo? getactiveattrib(webglprogram? program, gluint index); webglactiveinfo? getactiveuniform(webglprogram? program, gluint index); webglactiveinfo? gettransformfeedbackvarying(webglprogram? program, gluint index) specifications specification status comment webgl 1.0the definition of 'webglactiveinfo' in that specification. ...
WebGLFramebuffer - Web APIs
the webglframebuffer interface is part of the webgl api and represents a collection of buffers that serve as a rendering destination. description the webglframebuffer object does not define any methods or properties of its own and its content is not directly accessible. ...
...the webglframebuffer interface is part of the webgl api and represents a collection of buffers that serve as a rendering destination. description the webglframebuffer object does not define any methods or properties of its own and its content is not directly accessible. ...
... the webgl api and represents a collection of buffers that serve as a rendering destination. description the webglframebuffer object does not define any methods or properties of its own and its content is not directly accessible. ...
...of buffers that serve as a rendering destination. description the webglframebuffer object does not define any methods or properties of its own and its content is not directly accessible. when working with webglframebuffer objects, the following methods of the webglrenderingcon
text are useful: webglrenderingcon
text.bindframebuffer() webglrenderingcon
text.createframebuffer() webglrenderingcon
text.deleteframebuffer() webglrenderingcon
text.isframebuffer() examples creating a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcon
text('webgl'); var buffer = gl.createframebuffer(); specifications specification status comment webgl 1.0the definition of 'webglframebuffer' in that specification. recommendation initial definition. ...
WebGLRenderbuffer - Web APIs
the webglrenderbuffer interface is part of the webgl api and represents a buffer that can contain an image, or can be source or target of an rendering operation. description the webglrenderbuffer object does not define any methods or properties of its own and its content is not directly accessible. ...
...e is part of the webgl api and represents a buffer that can contain an image, or can be source or target of an rendering operation. description the webglrenderbuffer object does not define any methods or properties of its own and its content is not directly accessible. ...
...a buffer that can contain an image, or can be source or target of an rendering operation. description the webglrenderbuffer object does not define any methods or properties of its own and its content is not directly accessible. ...
...e source or target of an rendering operation. description the webglrenderbuffer object does not define any methods or properties of its own and its content is not directly accessible. when working with webglrenderbuffer objects, the following methods of the webglrenderingcon
text are useful: webglrenderingcon
text.bindrenderbuffer() webglrenderingcon
text.createrenderbuffer() webglrenderingcon
text.deleterenderbuffer() webglrenderingcon
text.isrenderbuffer() examples creating a render buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcon
text('webgl'); var buffer = gl.createrenderbuffer(); specifications specification status comment webgl 1.0the definition of 'webglrenderbuffer' in that specification. recommendation initial definit...
Canvas size and WebGL - Web APIs
o draw a square in the center of the canvas, by specifying its position and size in pixels. in the first canvas, we get the desired result. in the second, the square has the wrong shape, size, and position. ...
..." + "your browser or device may not support webgl."; return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.enable(gl.scissor_test); gl.scissor(30, 10, 60, 60); gl.clearcolor(1.
..." + "your browser or device may not support webgl."; return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.enable(gl.scissor_test); gl.scissor(30, 10, 60, 60); gl.clearcolor(1.0, 1.0, 0.0, 1.0); gl.clear(gl.c...
... secondcanvas = document.getelementsbytagname("canvas")[1]; firstcanvas.width = firstcanvas.clientwidth; firstcanvas.height = firstcanvas.clientheight; [firstcanvas, secondcanvas].foreach(function(canvas) { var gl = canvas.getcon
text("webgl") || canvas.getcon
text("experimental-webgl"); if (!gl) { document.queryselector("p").innerhtml = "failed to get webgl con
text. " + "your browser or device may not support webgl."; return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.enable(gl.scissor_test); gl.scissor(30, 10, 60, 60); gl.clearcolor(1.0, 1.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); }); }, false); the source code of this example is also available on github. « previousnext...
Simple color animation - Web APIs
ly, every frame; in this case, once per second). ...
...ck", startanimation, false); verb.innerhtml="start"; // stop animation by clearing the timer. clearinterval(timer); } // call stopanimation() once to setup the initial event // handlers for canvas and button. stopanimation({type: "click"}); var gl; function drawanimation () { if (!gl) { var canvas = document.getelementbyid("canvas-view"); gl = canvas.getcon
text("webgl") ||canvas.getcon
text("experimental-webgl"); if (!gl) { clearinterval(timer); alert("failed to get webgl con
text.\n" + "your browser or device may not support webgl."); return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); } // get a random color value using a helper function. var color =...
... gl.clear(gl.color_buffer_bit); } // random color helper function. ...
...ur browser or device may not support webgl."); return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); } // get a random color value using a helper function. var color = getrandomcolor(); // set the webglrenderingcon
text clear color to the // random color. gl.clearcolor(color[0], color[1], color[2], 1.0); // clear the con
text with the newly set color. gl.clear(gl.color_buffer_bit); } // random color helper function. function getrandomcolor() { return [math.random(), math.random(), math.random()]; } }, false); the source code of this example is also available on github. « previousnext » ...
Fundamentals of WebXR - Web APIs
d vr controllers or specialized mixed reality gamepads. webxr is not a rendering technology, and provides no features for actually managing 3d data or rendering it to the display. this is an important fact to keep in mind; while webxr manages the timing, scheduling, and the various points of view relevant when drawing the scene, it does not actually know how to load and manage models, render and
texture them, and so forth. that part is entirely up to you. fortunately, webgl and the various webgl-based frameworks and libraries are available to make it much easier to deal with all of that. how is webxr different from webvr? webvr was generally considered to be an experimental api designed to help specification writers determine the best approaches to creating an api for virtual reality on the...
...l of artifacts being left behind. some platforms may provide previously-cleared frames to you, while others may optimize performance by not erasing the framebuffers in order to avoid having to touch each pixel twice per frame. there are two vr session modes available in webxr: inline and immersive. the former, specified by the session mode string inline, presents the rendered scene within the con
text of a document in a web browser, and doesn't require special xr hardware to view. the immersive session mode is indicated using the session mode immersive-vr. this session mode requires an xr device such as a headset, and replaces the entire world with the rendered scene using the displays shown to each of the user's eyes. augmented reality in augmented reality (ar), the user sees the imagery yo...
...u're using, and the rendering process is almost exactly the same as for vr, except you don't erase the background or skybox before rendering each frame. for more information about using webxr to create augmented reality experiences, see augmented reality with webxr. types of webxr hardware the simplest xr presentation involves rendering the scene directly to the user's screen, either in the con
text of a web document, or in full screen mode. this is most common when the user either doesn't have a dedicated xr device, or when the user is viewing the ar or vr app on a phone or other handheld device. simpler and lower-priced xr devices typically use an integrated computer or connect to a smartphone, essentially using the mobile cpu and gpu to run apps, render images, and display them to the us...
...bgl is used for rendering the 3d world into the webxr session, you should first be familiar with webgl's general usage, and with the basics of 3d graphics in general. general-purpose 3d frameworks these frameworks are good for general-purpose programming as well as for game development when you want to do the logic yourself. they're designed for creating and animating 3d scenes regardless of con
text. a-frame (specifically designed for creating webxr-based apps) babylon.js three.js game toolkits the game toolkits are designed for game developers and often include gaming-specific features such as physics models, input control systems, asset management, 3d sound playback, and the like. playcanvas next steps with these basic facts in hand, you're ready to take those next steps int...
WheelEvent - Web APIs
nline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill=...
...="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="153.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">uievent</
text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#d4dde4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/mouseevent" target="_top"><rect x="231" y="1" width="100" heigh...
...monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">uievent</
text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#d4dde4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/mouseevent" target="_top"><rect x="231" y="1" width="100" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="281" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">mouseevent</
text></a><polyline points="331,25 341,20 341,30 331,25" stroke="#d4dde4" fill="none"/><line x1="341" y1="25" x2="371" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/wheelevent" target="_top"><rect x="371" y="1" width="100" heig...
...,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">mouseevent</
text></a><polyline points="331,25 341,20 341,30 331,25" stroke="#d4dde4" fill="none"/><line x1="341" y1="25" x2="371" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/wheelevent" target="_top"><rect x="371" y="1" width="100" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="421" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">wheelevent</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor wheelevent() creates a wheelevent object. properties this interface inherits properties from its ancestors, mouseevent, uievent, and ev...
Window.getComputedStyle() - Web APIs
t an element or the pseudoelt is not a valid pseudo-element selector or is ::part() or ::slotted(). note: valid pseudo-element selector refers to syntactic validity, e.g. ::unsupported is considered valid, even though the pseudo-element itself is not supported. ...
...ector refers to syntactic validity, e.g. ::unsupported is considered valid, even though the pseudo-element itself is not supported. examples in this example we style a <p> element, then retrieve those styles using getcomputedstyle(), and print them into the
text content of the <p>. ...
... style a <p> element, then retrieve those styles using getcomputedstyle(), and print them into the
text content of the <p>. html <p>hello</p> css p { width: 400px; margin: 0 auto; padding: 20px; font: 2rem/2 sans-serif;
text-align: center; background: purple; color: white; } javascript let para = document.queryselector('p'); let compstyles = window.getcomputedstyle(para); para.
textcontent = 'my computed font-size is ' + compstyles.getpropertyvalue('font-size') + ',\nand my computed line-height is ' + compstyles.getpropertyvalue('line-height') + '.'; result description the returned object is the same cssstyledeclaration type as the object returned from the element's style property. however, the two objects have different purposes: the object from getc...
...e object from getcomputedstyle is read-only, and should be used to inspect the element's style — including those set by a <style> element or an external stylesheet. the element.style object should be used to set styles on that element, or inspect styles directly added to it from javascript manipulation or the global style attribute. the first argument must be an element. non-elements, like a
text node, will throw an error. defaultview in many code samples, getcomputedstyle is used from the document.defaultview object. in nearly all cases, this is needless, as getcomputedstyle exists on the window object as well. it's likely the defaultview pattern was a combination of folks not wanting to write a testing spec for window and making an api that was also usable in java. use with pseudo-el...
window.postMessage() - Web APIs
example /* * in window a's scripts, with a being on <http://example.com:8080>: */ var popup = window.open(/* popup details */); // when the popup has fully loaded, if not blocked by a popup...
... the origin and possibly source properties enables cross-site scripting attacks. as with any asynchronously-dispatched script (timeouts, user-generated events), it is not possible for the caller of postmessage to detect when an event handler listening for events sent by postmessage throws an exception. postmessage() schedules the messageevent to be dispatched only after all pending execution con
texts have finished. for example, if postmessage() is invoked in an event handler, that event handler will run to completion, as will any remaining handlers for that same event, before the messageevent is dispatched. the value of the origin property of the dispatched event is not affected by the current value of document.domain in the calling window. for idn host names only, the value of the origin ...
...or data: url is the origin of the script that loaded the url. using window.postmessage in extensions window.postmessage is available to javascript running in chrome code (e.g., in extensions and privileged code), but the source property of the dispatched event is always null as a security restriction. (the other properties have their expected values.) it is not possible for content or web con
text scripts to specify a targetorigin to communicate directly with an extension (either the background script or a content script). web or content scripts can use window.postmessage with a targetorigin of "*" to broadcast to every listener, but this is discouraged, since an extension cannot be certain the origin of such messages, and other listeners (including those you do not control) can listen in.
... script or a content script). web or content scripts can use window.postmessage with a targetorigin of "*" to broadcast to every listener, but this is discouraged, since an extension cannot be certain the origin of such messages, and other listeners (including those you do not control) can listen in. content scripts should use runtime.sendmessage to communicate with the background script. web con
text scripts can use custom events to communicate with content scripts (with randomly generated event names, if needed, to prevent snooping from the guest page). lastly, posting a message to a page at a file: url currently requires that the targetorigin argument be "*". file:// cannot be used as a security restriction; this restriction may be modified in the future. specifications specific...
WorkerGlobalScope - Web APIs
the workerglobalscope interface of the web workers api is an interface representing the scope of any worker. workers have no browsing con
text; this scope contains the information usually conveyed by window objects — in this case event handlers, the console or the associated workernavigator object. each workerglobalscope has its own event loop. this interface is usually specialized by each worker type: dedicatedworkerglobalscope for dedicated workers, sharedworkerglobalscope for shared workers, and serviceworkerglobalscope for serviceworker. the self property returns the specialized scope for each con
text. properties this interface inherits properties from the eventtarget interface and windoworworkerglobalscope and windoweventhandlers mixins. standard properties workerglobalscope.naviga...
...the performance associated with the worker. it is a regular performance object, except that only a subset of its property and methods are available to workers. workerglobalscope.console read only returns the console associated with the worker. properties implemented from elsewhere windoworworkerglobalscope.caches read only returns the cachestorage object associated with the current con
text. ...
... windoworworkerglobalscope.origin read only returns the global object's origin, serialized as a string. (this does not yet appear to be implemented in any browser.) events error fired when an error occured. ...
...s object enables functionality such as storing assets for offline use, and generating custom responses to requests. windoworworkerglobalscope.indexeddb read only provides a mechanism for applications to asynchronously access capabilities of indexed databases; returns an idbfactory object. windoworworkerglobalscope.issecurecon
text read only returns a boolean indicating whether the current con
text is secure (true) or not (false). windoworworkerglobalscope.origin read only returns the global object's origin, serialized as a string. (this does not yet appear to be implemented in any browser.) events error fired when an error occured. also available via the workerglobalscope.onerror property. offline fired when the browser has lost access to the network and the value of navigator.
init() - Web APIs
globalobject the object to use as the global for our request. often, this is the outer window, but it may also be a sandbox or backstage pass. ...
... globalobject the object to use as the global for our request. often, this is the outer window, but it may also be a sandbox or backstage pass. ...
... globalobject the object to use as the global for our request. often, this is the outer window, but it may also be a sandbox or backstage pass. ...
... globalobject the object to use as the global for our request. often, this is the outer window, but it may also be a sandbox or backstage pass. ...
XPathExpression.evaluate() - Web APIs
type optional specifies the type of result to be returned by evaluating the expression. this must be one of the xpathresult.constants. result optional allows to specify a result object which may be reused and returned by this method. ...
... type optional specifies the type of result to be returned by evaluating the expression. this must be one of the xpathresult.constants. result optional allows to specify a result object which may be reused and returned by this method. ...
...athevaluator, an xpathexception of type invalid_expression_err is raised. type_err in case result cannot be converted to the specified type, an xpathexception of type type_err is raised. namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a domexception of type namespace_error is raised. wrong_document_err if the provided con
text node is from a document that is not supported by the xpathevaluator, a domexception of type wrong_document_err is raised. not_supported_err if the provided con
text node is not a type permitted as an xpath con
text node or the request type is not permitted by the xpathevaluator, a domexception of type not_supported_err is raised. example the following example shows the use of the evaluate() met...
...example the following example shows the use of the evaluate() method. html <div>xpath example</div> <div>number of <div>s: <output></output></div> javascript var xpath = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression("//div"); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").
textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexpression.evaluate()' in that specification. recommendation initial definition ...
XRWebGLLayer - Web APIs
the xrwebgllayer interface of the webxr device api provides a linkage between the webxr device (or simulated xr device, in the case of an inline session) and a webgl con
text used to render the scene for display on the device. in particular, it provides access to the webgl framebuffer and viewport to ease access to the con
text. although xrwebgllayer is currently the only type of framebuffer layer supported by webgl, it's entirely possible that future updates to the webxr specification may allow for other layer types and corresponding image sources. constructor new xrwebgllayer() creates and returns a new xrwebgllayer object for use by the specified xrsession, using a particular webglrenderingcon
text or webgl2renderingcon
text as the destination con
text. properties antialias...
...the specific type of anti-aliasing is determined by the user agent. ...
...amebuffer. framebufferheight read only returns the height of the layer's framebuffer. ignoredepthvalues read only a boolean which indicates whether or not the webxr compositor should make use of the contents of the layer's depth buffer while compositing the scene. methods getviewport() returns a new xrviewport instance representing the position, width, and height to which the webgl con
text's viewport must be set to contain drawing to the area of the framebuffer designated for the specified view's contents. in this way, for example, the rendering of the left eye's point of view and of the right eye's point of view are each placed into the correct parts of the framebuffer. static methods getnativeframebufferscalefactor() returns the scaling factor that can be used to scale the ...
...e rendering of the left eye's point of view and of the right eye's point of view are each placed into the correct parts of the framebuffer. static methods getnativeframebufferscalefactor() returns the scaling factor that can be used to scale the resolution of the recommended webgl framebuffer resolution to the rendering device's native resolution. examples binding the layer to a webgl con
text this snippet, taken from drawing a frame in movement, orientation, and motion: a webxr example, shows how the xrwebgllayer is obtained from the xrsession object's rendering state and is then bound as the current rendering webgl framebuffer by calling the webgl bindframebuffer() function. let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); re...
XSLT Basic Example - Web APIs
figure 1 shows the source of the basic xslt example. the xml document (example.xml) contains the information about the article. using the ?xml-stylesheet? processing instruction, it links to the xslt stylesheet (example.xsl) via its href attribute. ...
...e in figure 1 has two templates - one that matches the root node and one that matches author nodes. the template that matches the root node outputs the article's title and then says to process all templates (via apply-templates) that match author nodes which are children of the authors node. ...
...ys to process all templates (via apply-templates) that match author nodes which are children of the authors node. figure 1 : simple xslt example xml document (example.xml) : <?xml version="1.0"?> <?xml-stylesheet type="
text/xsl" href="example.xsl"?> <article> <title>my article</title> <authors> <author>mr. foo</author> <author>mr. ...
...ersion="1.0"?> <?xml-stylesheet type="
text/xsl" href="example.xsl"?> <article> <title>my article</title> <authors> <author>mr. foo</author> <author>mr. bar</author> </authors> <body>this is my article
text.</body> </article> xsl stylesheet (example.xsl) : <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:output method="
text"/> <xsl:template match="/"> article - <xsl:value-of select="/article/title"/> authors: <xsl:apply-templates select="/article/authors/author"/> </xsl:template> <xsl:template match="author"> - <xsl:value-of select="." /> </xsl:template> </xsl:stylesheet> browser output : article - my article authors: - mr. foo - mr. bar ...
Using the aria-required attribute - Accessibility
note that this attribute will not automatically change the presentation of the field. note: opinions may differ on how assistive technology should handle this technique. the information provided above is one of those opinions and therefore not normative. ...
...ow assistive technology should handle this technique. the information provided above is one of those opinions and therefore not normative. ...
...ive. ...
... <label for="lastname">last name:</label> <input id="lastname" type="
text" aria-required="true" /> <br/> <label for="streetaddress">street address:</label> <input id="streetaddress" type="
text" /> </form> working examples: tooltip example (includes the use of the aria-required attribute) notes used in aria roles combobox gridcell listbox radiogroup spinbutton
textbox tree related aria techniques using the aria-invalid attribute compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for aria-required wai-aria authoring practices for forms constraint validation in html5 ...
Using the progressbar role - Accessibility
aria-describedby to point to the status, and set the aria-busy attribute to true on the region until it is finished loading. it is not possible for the user to alter the value of a progressbar because it is always readonly. note: assistive technologies generally will render the value of aria-valuenow as a percent of the range between the value of aria-valuemin and aria-valuemax, unless aria-value
text is specified. it is best to set the values for aria-valuemin, aria-valuemax, and aria-valuenow in a manner that is appropriate for this calculation. note: elements with the role progressbar have an implicit aria-readonly value of true. possible effects on user agents and assistive technology screen readers should announce the progress updates as they occur. if the progress bar is labeled, the...
...cified. it is best to set the values for aria-valuemin, aria-valuemax, and aria-valuenow in a manner that is appropriate for this calculation. note: elements with the role progressbar have an implicit aria-readonly value of true. possible effects on user agents and assistive technology screen readers should announce the progress updates as they occur. ...
...labeled, the label
text should be mentioned as well. note: opinions may differ on how assistive technology should handle this. the information provided above is one of those opinions and therefore not normative. examples example 1: basic progressbar with percentage values <div role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">20 %</div> example 2: using aria-value
text <div role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-value
text="step 2: copying files... " aria-valuemax="100"> step 2: copying files... ...
...essbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">20 %</div> example 2: using aria-value
text <div role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-value
text="step 2: copying files... " aria-valuemax="100"> step 2: copying files... ...
ARIA: Comment role - Accessibility
n role="mark">. the related comment is marked up using an html structure wrapped with a <div> containing role="comment". <p>the last half of the song is a slow-rising crescendo that peaks at the <span role="mark" aria-details="thread-1">end of the guitar solo</span>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-
text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> to associate the comment with the
text being commented, we need to wrap the commented
text with an element containing the aria-details attribute, the value of which should be the id of the comment. multiple comments since aria-details can now accept multiple ids...
...ments since aria-details can now accept multiple ids, we can associate multiple comments with the same annotation, like so: <p>the last half of the song is a slow-rising crescendo that peaks at the <mark aria-details="thread-1 thread-2">end of the guitar solo</mark>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-
text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> <div role="comment" id="thread-2" data-author="chris"> <h3>marcus said</h3> <p class="comment-
text">the guitar solo could do with a touch more chorus, and a slightly lower volume.</p> <p><time datetime="2019-03-29t15:35">march 29 2019, 15:35</time></p> <...
... i think the cowbell could distract from the solo.</p> <p><time datetime="2019-03-30t21:02">march 30 2019, 21:02</time></p> </div> </di...
...aria annotations — simply nest the comments inside one another, like so: <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-
text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> <div role="comment" data-author="marcus"> <h3>marcus replied</h3> <p class="comment-
text">i don't know about that. i think the cowbell could distract from the solo.</p> <p><time datetime="2019-03-30t21:02">march 30 2019, 21:02</time></p> </div> </div> accessibility concerns landmark roles are intended to be used sparingly, to identify larger overall sections of the document. using too many landmark roles can create "noise" in screen readers, making it difficult to unde...
ARIA: document role - Accessibility
generally used in complex composite widgets or applications, the document role can inform assistive technologies to switch con
text to a reading mode: the document role tells assistive technologies with reading or browse modes to use the document mode to read the content contained within this element. <div role="dialog"> ... <div id="info
text" role="document" tabindex="0"> <p>some informational
text goes here.</p> </div> ... <button>close</button> </div> this example shows a dialog widget with some controls and a section with some informational
text that the assistive technology user can read when tabbing to it. description by default, web pages are treated as documents; assistive technologies (at) enter browse or read mode when entering a new web page. this mode can be altered thr...
...sed to indicate a section of a complex composit widget that an assistive technology user should read using its browse or virtual reading mode, if available. because ats with reading mode default to that mode for all elements except for those with a widget or application role set, document role is only useful for focusable elements within a widget or application that should be read as static rich
text. ...
...hnology user should read using its browse or virtual reading mode, if available. because ats with reading mode default to that mode for all elements except for those with a widget or application role set, document role is only useful for focusable elements within a widget or application that should be read as static rich
text. ...
...at mode for all elements except for those with a widget or application role set, document role is only useful for focusable elements within a widget or application that should be read as static rich
text. adding role="document" and tabindex="0" to the element containing the
text within a widget enables the screen reader user to press the tab key to place focus on the document element and read the
text with the screen reader's reading cursor. assistive technologies should switch con
text back to document mode, possibly intercepting from controls rewired for the parent's dynamic con
text, re-enabling the standard input events, such as up or down arrow keyboard events, to control the reading cursor. in contrast to the article role, the document role does not have any relation to other elements wi...
ARIA: grid role - Accessibility
30 </td> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td>6</td> </tr> </tbody> </table> css body { margin: 2rem; font-family: "helvetica neue", sans-serif; } table { margin: 0; border-collapse: collapse; font-variant-numeric: tabular-nums; } tbody th, tbody td { padding: 5px; } tbody td { border: 1px solid #000;
text-align: right; color: #767676; } tbody td[role="gridcell"] { color: #000; } tbody td[role="gridcell"]:hover, tbody td[role="gridcell"]:focus { background-color: #f6f6f6; outline: 3px solid blue; } } javascript var selectables = document.queryselectorall('table td[role="gridcell"]'); selectables[0].setattribute('tabindex', 0); var trs = document.queryselectorall('table tbody tr'...
...se "pageup": var i = 0; var result; do { result = moveto(i, event.target.dataset.col); i++; } while (result == false); break; case "pagedown": var i = maxrow; var result; do { result = moveto(i, event.target.dataset.col); i--; } while (result == false); break; case "enter": alert(event.target.
textcontent); break; } event.preventdefault(); }); html <table role="grid" aria-labelledby="calendarheader"> <caption id="calendarheader">september 2018</caption> <thead role="rowgroup"> <tr role="row"> <td></td> <th role="columnheader" aria-label="sunday">s</th> <th role="columnheader" aria-label="monday">m</th> <th role="columnheader" aria-label="tuesd...
...ex="-1"> 6 </td> <td role="gridcell" tabindex="-1"> 7 </td> <td role="gridcell" tabindex="-1"> 8 </td> </tr> <!-- … additional rows … --> </tbody> </table> css table { margin: 0; border-collapse: collapse; font-variant-numeric: tabular-nums; } tbody th, tbody td { padding: 5px; } tbody td { border: 1px solid #000;
text-align: right; color: #767676; } tbody td[role="gridcell"] { color: #000; } tbody td[role="gridcell"]:hover, tbody td[role="gridcell"]:focus { background-color: #f6f6f6; outline: 3px solid blue; } javascript var selectables = document.queryselectorall('table td[role="gridcell"]'); selectables[0].setattribute('tabindex', 0); var trs = document.queryselectorall('table tbody tr'), ro...
...make sure that the functionality and interaction needed can be best achieved using the grid role. specifications...
ARIA: row role - Accessibility
nd top to botton navigation is provided, or if the user interface allows the rearranging of cell order or otherwise changing individual cell order such as through drag and drop, use grid or treegrid instead. note: using the native html table element (<table>) along with the table row element (<tr>) whenever possible is strongly encouraged. ...
... the user interface allows the rearranging of cell order or otherwise changing individual cell order such as through drag and drop, use grid or treegrid instead. note: using the native html table element (<table>) along with the table row element (<tr>) whenever possible is strongly encouraged. ...
... along with the table row element (<tr>) whenever possible is strongly encouraged. associated wai-aria roles, states, and properties con
text roles role="rowgroup" an optional con
textual row parent, it establishes a relationship between descendant rows. it is a structural equivalent to the thead, tfoot, and tbody elements in an html table element. role="table" one of the three possible con
texts (along with grid and treegrid) in which you'll find a row, it identifies the row as being part of a non-interactive table structure containing data arranged in rows and columns, similar to the native <table> html element. ...
...ctural equivalent to the thead, tfoot, and tbody elements in an html table element. role="table" one of the three possible con
texts (along with grid and treegrid) in which you'll find a row, it identifies the row as being part of a non-interactive table structure containing data arranged in rows and columns, similar to the native <table> html element. role="grid" one of the three possible con
texts (along with table and treegrid) in which you'll find a row, it identifies the row as being part of a non-interactive table structure containing data arranged in rows and columns, similar to the native <table> html element. role="treegrid" similar to a grid, but with rows that can be expanded and collapsed in the same manner as for a tree. descendant roles role="cell" a cell in a row with...
HTML To MSAA - Accessibility
stem_ whitespace '\n' (new line char) state_system_ readonly n/a n/a n/a button role_system_ pushbutton from child nodes n/a state_system_ focusable state_system_ default if @type attribute has value "submit" n/a "press" n/a caption bstr role n/a n/a n/a description_for (0x100f), points to table element div bstr role n/a n/a n/a n/a n/a n/a fieldset role_system_ grouping
text equivalent from child legend element n/a n/a labelled_by (1003), points to legend element n/a n/a hr role_system_ separator n/a n/a n/a n/a n/a n/a img, input @type=image role_system_ graphic from @alt attribute, empty @alt attribute means name can't be calculated at all n/a state_system_ animated if image has more than one frame n/a "showlongdesc" if @longdesc attribute is presented n/a ...
...e than one frame n/a "showlongdesc" if @longdesc attribute is presented n/a if @usemap attribute is used then image accessible has children for each map item input @type=button, submit, reset role_system_ pushbutton from @value attribute, @alt attribute, default label, @src attribute, @data attribute n/a state_system_ default if @type attribute has value "submit" n/a "press" n/a input @type=
text,
textarea role_system_
text n/a value property of input dom element state_system_ readonly if @readonly attribute is used n/a "activate" n/a input @type=password role_system_
text n/a n/a state_system_ readonly if @readonly attribute is used state_system_ protected n/a "activate" n/a input type="checkbox" role_system_ checkbutton n/a n/a state_system_ marqueed used as state checkable ...
...property of dom element returns true n/a "check"/"uncheck"/"cycle" depending on state event_object_ statechange when state is changed input type="radio" role_system_ radiobutton n/a n/a state_system_ marqueed used as state checkable state_system_ checked if checked property of dom element returns true n/a "select" event_object_ statechange when state is changed label role_system_ static
text from child nodes n/a n/a n/a n/a n/a legend role_system_ static
text n/a n/a n/a label_for (0x1002), points to caption element n/a n/a li and others role_system_ listitem n/a n/a state_system_ readonly n/a n/a n/a contains child accessible for list bullet ol, ul and others role_system_ list n/a n/a state_system_ readonly n/a n/a n/a optgroup bstr role n/a n/a n/a n/a n/a n/a opti...
...m_ static
text n/a n/a n/a label_for (0x1002), points to caption element n/a n/a li and others role_system_ listitem n/a n/a state_system_ readonly n/a n/a n/a contains child accessible for list bullet ol, ul and others role_system_ list n/a n/a state_system_ readonly n/a n/a n/a optgroup bstr role n/a n/a n/a n/a n/a n/a option role_system_ listitem from @label attribute, from child
text nodes n/a state_system_ selected if option is selected n/a "select" event_object_ selectionwithin event_object_ selectionadd if selected event_object_ selectionremove if unselected select @size > 1 role_system_ list n/a n/a state_system_ multiselectable if multiselectable n/a n/a n/a select @size = 1 role_system_ combobox n/a name of focused option state_system_ expanded if combobox op...
:first-child - CSS: Cascading Style Sheets
-child css pseudo-class represents the first element among a group of sibling elements. /* selects any <p> that is the first element among its siblings */ p:first-child { color: lime; } note: as originally defined, the selected element had to have a parent. beginning with selectors level 4, this is no longer required. ...
...ts the first element among a group of sibling elements. /* selects any <p> that is the first element among its siblings */ p:first-child { color: lime; } note: as originally defined, the selected element had to have a parent. beginning with selectors level 4, this is no longer required. ...
...ents. /* selects any <p> that is the first element among its siblings */ p:first-child { color: lime; } note: as originally defined, the selected element had to have a parent. beginning with selectors level 4, this is no longer required. ...
... among its siblings */ p:first-child { color: lime; } note: as originally defined, the selected element had to have a parent. beginning with selectors level 4, this is no longer required. ...
:last-child - CSS: Cascading Style Sheets
:last-child css pseudo-class represents the last element among a group of sibling elements. /* selects any <p> that is the last element among its siblings */ p:last-child { color: lime; } note: as originally defined, the selected element had to have a parent. beginning with selectors level 4, this is no longer required. ...
...ents the last element among a group of sibling elements. /* selects any <p> that is the last element among its siblings */ p:last-child { color: lime; } note: as originally defined, the selected element had to have a parent. beginning with selectors level 4, this is no longer required. ...
... elements. /* selects any <p> that is the last element among its siblings */ p:last-child { color: lime; } note: as originally defined, the selected element had to have a parent. beginning with selectors level 4, this is no longer required. ...
...is the last element among its siblings */ p:last-child { color: lime; } note: as originally defined, the selected element had to have a parent. beginning with selectors level 4, this is no longer required. ...
CSS Fonts - CSS: Cascading Style Sheets
css fonts is a module of css that defines font-related properties and how font resources are loaded. it lets you define the style of a font, such as its family, size and weight, line height, and the glyph variants to use when multiple are available for a single character. basic example the following example shows a simple use of basic font properties to style a paragraph of
text. p { width: 600px; margin: 0 auto; font-family: "helvetica neue", "arial", sans-serif; font-style: italic; font-weight: 100; font-variant-ligatures: normal; font-size: 2rem; letter-spacing: 1px; } <p>three hundred years ago<br> i thought i might get some sleep<br> i stretched myself out onna antique bed<br> an' my spirit did a midnite creep</p> the result is as follows: variable fonts exa...
... opentype font features guide font features or variants refer to different glyphs or character styles contained within an opentype font. these ...
... opentype font features guide font features or variants refer to different glyphs or character styles contained within an opentype font. these include things like ligatures (special glyphs that combine characters like 'fi' or 'ffl'), kerning (adj...
... opentype font features guide font features or variants refer to different glyphs or character styles contained within an opentype font. ...
Grid template areas - CSS: Cascading Style Sheets
s can be especially nice as it is easy to see in the code what your element looks like. as a very simple example we can create a “media object”. this is a component with space for an image or other media on one side and content on the other. the image might be displayed on the right or left of the box. our grid is a two-column track grid, with the column for the image sized at 1fr and the
text 3fr. if you wanted a fixed width image area, then you could set the image column as a pixel width, and assign the
text area 1fr. a single column track of 1fr would then take up the rest of the space. we give the image area a grid area name of img and the
text area content, then we can lay those out using the grid-template-areas property. * {box-sizing: border-box;} .media { border: 2px so...
... using the grid-template-areas property. * {box-sizing: border-box;} .media { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; max-width: 400px; } .media { display: grid; grid-template-columns: 1fr 3fr; grid-template-areas: "img content"; margin-bottom: 1em; } .media .image { grid-area: img; background-color: #ffd8a8; } .media .
text { grid-area: content; padding: 10px; } <div class="media"> <div class="image"></div> <div class="
text">this is a media object example. we can use grid-template-areas to switch around the image and
text part of the media object. </div> </div> displaying the image on the other side of the box we might want to be able to display our box with the image the other way ...
... </div> </div> grid definition shorthands having looked at various ways of placing items on our grids and many of the properties u...
...id-template-columns: 1fr 3fr; grid-template-areas: "img content"; margin-bottom: 1em; } .media.flipped { grid-template-columns: 3fr 1fr; grid-template-areas: "content img"; } .media .image { grid-area: img; background-color: #ffd8a8; } .media .
text { grid-area: content; padding: 10px; } <div class="media flipped"> <div class="image"></div> <div class="
text">this is a media object example. we can use grid-template-areas to switch around the image and
text part of the media object. </div> </div> grid definition shorthands having looked at various ways of placing items on our grids and many of the properties used to define grid, this is a good time to take a look at a couple of shorthands that are available for defining the grid and man...
Logical properties for floating and positioning - CSS: Cascading Style Sheets
ction. logical property or value physical property or value float: inline-start float: left float: inline-end float: right clear: inline-start clear: left clear: inline-end clear: right inset-inline-start left inset-inline-end right inset-block-start top inset-block-end bottom
text-align: start
text-align: left
text-align: end
text-align: right in addition to these mapped properties there are some additional shorthand properties made possible by being able to address block and inline dimensions. these have no mapping to physical properties, aside from the inset property. logical property purpose inset-inline sets both of th...
...lly inset the item relative to where it would fall based on normal flow. to do this we have historically used the physical properties top, right, bottom and left. these properties take a length or a percentage as a value, and relate to the user's screen dimensions. new properties have been created in the logical properties specification for when you want the positioning to relate to the flow of
text in your writing mode. these are as follows: inset-block-start, inset-block-end, inset-inline-start and inset-inline-end. in the below example i have used the inset-block-start and inset-inline-end properties to position the blue box using absolute positioning inside the area with the grey dotted border, which has position: relative. change the writing-mode property to vertical-rl, or add directi...
...tart, inset-block-end, inset-inline-start and inset-inline-end. in the below example i have used the inset-block-start and inset-inline-end properties to position the blue box using absolute positioning inside the area with the grey dotted border, which has position: relative. change the writing-mode property to vertical-rl, or add direction: rtl, and see how the flow relative box stays with the
text direction. new two- and four-value shorthands as with other properties in the specification we have some new shorthand properties, which give the ability to set two or four values at once. inset — sets all four sides together with physical mapping. inset-inline — sets both logical inline insets. inset-block — sets both logical block insets. note: the browsers that have implement...
...h physical mapping. inset-inline — sets both logical inline insets. inset-block — sets both logical block insets. note: the browsers that have implemented the logical properties specification have so far implemented the direct mappings and not the new shorthands. look to the browser compatibility data section on each property page reference for more details. example: logical values for
text-align the
text-align property has logical values that relate to
text direction — rather than using left and right we can use start and end. in the below example i have set
text-align: right in the first block and
text-align: end in the second. if you change the value of direction to rtl you will see that the alignment stays to the right for the first block, but goes to the logical end on the ...
color-adjust - CSS: Cascading Style Sheets
r-adjust: economy; color-adjust: exact; the color-adjust property's value must be one of the following keywords. values economy the user agent is allowed to make adjustments to the element as it deems appropriate and prudent in order to optimize the output for the device it's being rendered for. for example, when printing, a browser might opt to leave out all background images and to adjust
text colors to be sure the contrast is optimized for reading on white paper. this is the default. exact the element's content has been specifically and carefully crafted to use colors, images, and styles in a thoughtful and/or important way, such that being altered by the browser might actually make things worse rather than better. the appearance of the content should not be changed except by the us...
...nt should not be changed except by the user's request. for example, a page might include a list of information with rows whose background colors alternate between white and a light grey. removing the background color would decrease the legibility of the content. usage notes there are a number of reasons a browser might wish to deviate from the specified appearance, such as: the content uses
text and background colors that will be too similar on the output device for legibility purposes. if the output device is a printer, and to save ink, dark or extremely dense background images might be removed. when printing a page, the browser might want to replace light-colored
text on a dark background with dark
text on a white background. any options the user agent offers the user to allow them...
...in any given situation. formal definition initial valueeconomyapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax economy | exact examples preserving low contrast in this example, a box is shown which uses a background-image and a translucent linear-gradient() function atop a black background color to have a dark blue gradient behind medium red
text. for whatever reason, this is the desired appearance in any rendering environment, including on paper, so we also use color-adjust: exact to tell the browser not to make color or style adjustments to the box when rendering it. css .my-box { background-color: black; background-image: linear-gradient(rgba(0, 0, 180, 0.5), rgba(70, 140, 220, 0.5)); color: #900; width: 15rem; height: 6rem...
...r whatever reason, this is the desired appearance in any rendering environment, including on paper, so we also use color-adjust: exact to tell the browser not to make color or style adjustments to the box when rendering it. css .my-box { background-color: black; background-image: linear-gradient(rgba(0, 0, 180, 0.5), rgba(70, 140, 220, 0.5)); color: #900; width: 15rem; height: 6rem;
text-align: center; font: 24px "helvetica", sans-serif; display: flex; align-items: center; justify-content: center; color-adjust: exact; } html <div class="my-box"> <p>need more contrast!</p> </div> result specifications specification status comment css color adjustment module level 1the definition of 'color-adjust' in that specification. editor's dr...
font-kerning - CSS: Cascading Style Sheets
in the image below, for instance, the examples on the left do not use kerning, while the ones on the right do: syntax the font-kerning property is specified as one of the keyword values listed below. values auto the browser determines whether font kerning should be used or not. for example, some browsers will disable kerning on small fonts, since applying it could harm the readability of
text. normal font kerning information stored in the font must be applied. none font kerning information stored in the font is disabled. formal definition initial valueautoapplies toall elements. it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | normal | none examples enabling and disabling kerning html <div...
...in the font must be applied. none font kerning information stored in the font is disabled. formal definition initial valueautoapplies toall elements. ...
...none font kerning information stored in the font is disabled. formal definition initial valueautoapplies toall elements. it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | normal | none examples enabling and disabling kerning html <div id="kern"></div> <div id="nokern"></div> <
textarea id="input">av t. ...
...v> <div id="nokern"></div> <
textarea id="input">av t. ij</
textarea> css div { font-size: 2rem; font-family: serif; } #nokern { font-kerning: none; } #kern { font-kerning: normal; } javascript let input = document.getelementbyid('input'); let kern = document.getelementbyid('kern'); let nokern = document.getelementbyid('nokern'); input.addeventlistener('keyup', function() { kern.
textcontent = input.value; /* update content */ nokern.
textcontent = input.value; }); kern.
textcontent = input.value; /* initialize content */ nokern.
textcontent = input.value; specifications specification status comment css fonts module level 3the definition of 'font-kerning' in that specification. candidate recommendation initial definition. ...
font-size-adjust - CSS: Cascading Style Sheets
nt so that its lowercase letters (as determined by the x-height of the font) are the specified number times the font-size. the number specified should generally be the aspect ratio (ratio of x-height to font size) of the first choice font-family. this means that the first-choice font, when available, will appear the same size in browsers, whether or not they support font-size-adjust. ...
...ters (as determined by the x-height of the font) are the specified number times the font-size. the number specified should generally be the aspect ratio (ratio of x-height to font size) of the first choice font-family. this means that the first-choice font, when available, will appear the same size in browsers, whether or not they support font-size-adjust. 0 yields
text of zero height (hidden
text). ...
...the same size in browsers, whether or not they support font-size-adjust. 0 yields
text of zero height (hidden
text). formal definition initial valuenoneapplies toall elements. ...
...ight (hidden
text). formal definition initial valuenoneapplies toall elements. ...
font-weight - CSS: Cascading Style Sheets
terror/mutatorsans) and is used here under the terms of its license: https://github.com/letterror/mutatorsans/blob/master/license */ @font-face { src: url('https://mdn.mozillademos.org/files/16011/mutatorsans.ttf'); font-family:'mutatorsans'; font-style: normal; } label { font: 1rem monospace; white-space: nowrap; } .container { max-height: 150px; overflow-y: auto; } .sample {
text-transform: uppercase; font: 1.5rem 'mutatorsans', sans-serif; } html, body { max-height: 100vh; max-width: 100vw; overflow: hidden; } body { display: flex; flex-direction: column; } header { margin-bottom: 1.5rem; } .container { flex-grow: 1; } .container > p { margin-top: 0; margin-bottom: 0; } javascript let weightlabel = document.queryselector('label[for="weight"...
... html, body { max-height: 100vh; max-width: 100vw; overflow: hidden; } body { display: flex; flex-direction: column; } header { margin-bottom: 1.5rem; } .container { flex-grow: 1; } .container > p { margin-top: 0; margin-bottom: 0; } javascript let weightlabel = document.queryselector('label[for="weight"]'); let weightinput = document.queryselector('#weight'); let sample
text = document.queryselector('.sample'); function update() { weightlabel.
textcontent = `font-weight: ${weightinput.value};`; sample
text.style.fontweight = weightinput.value; } weightinput.addeventlistener('input', update); update(); accessibility concerns people experiencing low vision conditions may have difficulty reading
text set with a font-weight value of 100 (thin/hairline) or 200 (e...
...*/ span { font-weight: lighter; } result specifications specification status comment css fonts module level 4the definition of 'font-weight' in tha...
...r sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, "and what is the use of a book," thought alice "without pictures or conversations?" </p> <div>i'm heavy<br/> <span>i'm lighter</span> </div> css /* set paragraph
text to be bold. */ p { font-weight: bold; } /* set div
text to two steps heavier than normal but less than a standard bold. */ div { font-weight: 600; } /* set span
text to be one step lighter than its parent. */ span { font-weight: lighter; } result specifications specification status comment css fonts module level 4the definition of 'font-weight' in that specification. working draft defines font-weight to...
hyphens - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. hyphenation rules are language-specific. in html, the language is determined by the lang attribute, and browsers will hyphenate only if this attribute is present and the appropriate hyphenation dictionary is available. ...
...hen present. note: the auto setting's behavior depends on the language being properly tagged to select the appropriate hyphenation rules. you must specify a language using the lang html attribute to guarantee that automatic hyphenation is applied in that language. suggesting line break opportunities there are two unicode characters used to manually specify potential line break points within
text: u+2010 (hyphen) the "hard" hyphen character indicates a visible line break opportunity. even if the line is not actually broken at that point, the hyphen is still rendered. u+00ad (shy) an invisible, "soft" hyphen. this character is not rendered visibly; instead, it marks a place where the browser should break the word if hyphenation is necessary. in html, use ­ to insert a soft hyphen...
...bly; instead, it marks a place where the browser should break the word if hyphenation is necessary. in html, use ­ to insert a soft hyphen. when the html <wbr> element leads to a line break, no hyphen is added. formal definition initial valuemanualapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | manual | auto examples specifying
text hyphenation this example uses three classes, one for each possible configuration of the hyphens property. html <dl> <dt><code>none</code>: no hyphen; overflow if needed</dt> <dd lang="en" class="none">an extreme­ly long english word</dd> <dt><code>manual</code>: hyphen only at &hyphen; or &shy; (if needed)</dt> <dd lang="en" class="manual">an extreme­ly long english wor...
... working draft initial definition ...
ime-mode - CSS: Cascading Style Sheets
this property is obsolete. /* keyword values */ ime-mode: auto; ime-mode: normal; ime-mode: active; ime-mode: inactive; ime-mode: disabled; /* global values */ ime-mode: inherit; ime-mode: initial; ime-mode: unset; the ime-mode property is only partially and inconsistently implemented in browsers. it was introduced by microsoft with internet explorer 5 as a proprietary extension: -ms-ime-mode attribute | imemode property. note: in general, it's not appropriate for a public web site to change the ime mode. ...
...he ime-mode property is specified using one of the keyword values listed below. values auto no change is made to the current input method editor state. this is the default. normal the ime state should be normal; this value can be used in a user style sheet to override the page's setting. this value is not supported by internet explorer. active the input method editor is initially active;
text entry is performed through it unless the user specifically dismisses it. not supported on linux. inactive the input method editor is initially inactive, but the user may activate it if they wish. not supported on linux. disabled the input method editor is disabled and may not be activated by the user. description unlike internet explorer, firefox's implementation of ime-mode allows this pr...
...ites that don't follow this recommendation by placing the following css into their user stylesheet: input[type=password] { ime-mode: auto !important; } the mac version of gecko 1.9 (firefox 3) can't recover the previous state of the ime when a field for which it is disabled loses focus, so mac users may get grumpy when you use the disabled value. ...
...even with ime disabled, users can still paste extended characters into your form's fields. ...
inset-inline-start - CSS: Cascading Style Sheets
the inset-inline-start css property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and
text orientation. it corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and
text-orientation. /* <length> values */ inset-inline-start: 3px; inset-inline-start: 2.4em; /* <percentage>s of the width or height of the containing block */ inset-inline-start: 10%; /* keyword value */ inset-inline-start: auto; /* global values */ inset-inline-start: inherit; inset-inline-start: initial; inset-inline-start: unset; the shorthand for inset-inline-start and inset-inline-end is inset-inline. syntax values the inset-inline-start property takes the sa...
...ame values as the left property. ...
...the left property. ...
... editor's draft initial definition ...
inset - CSS: Cascading Style Sheets
it has the same multi-value syntax of the margin shorthand. it is a shorthand that corresponds to the top, right, bottom, and/or left properties. ...
...as the left property. ...
...operty. ...
... editor's draft initial definition ...
letter-spacing - CSS: Cascading Style Sheets
positive values of letter-spacing causes characters to spread farther apart, while negative values of letter-spacing bring characters closer together. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...d value */ letter-spacing: normal; /* <length> values */ letter-spacing: 0.3em; letter-spacing: 3px; letter-spacing: .3px; /* global values */ letter-spacing: inherit; letter-spacing: initial; letter-spacing: unset; values normal the normal letter spacing for the current font. unlike a value of 0, this keyword allows the user agent to alter the space between characters in order to justify
text. <length> specifies extra inter-character space in addition to the default space between characters. values may be negative, but there may be implementation-specific limits. user agents may not further increase or decrease the inter-character space in order to justify
text. accessibility concerns a large positive or negative letter-spacing value will make the word(s) the styling is applied t...
...fies extra inter-character space in addition to the default space between characters. values may be negative, but there may be implementation-specific limits. user agents may not further increase or decrease the inter-character space in order to justify
text. accessibility concerns a large positive or negative letter-spacing value will make the word(s) the styling is applied to unreadable. for
text styled with a very large positive value, the letters will be so far apart that the word(s) will appear like a series of individual, unconnected letters. for
text styled with a very large negative value, the letters will overlap each other to the point where the word(s) may be unrecognizable. legible letter-spacing must be determined on a case-by-case basis, as different font families have differ...
... working draft no change. css level 2 (revision 1)the definition of 'letter-spacing' in that specification. recommendation no change. scalable vector graphics (svg) 1.1 (second edition)the definition of 'letter-spacing' in that specification. recommendation initial svg definition. c...
margin-block-end - CSS: Cascading Style Sheets
the margin-block-end css property defines the logical block end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and
text orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...ing mode, directionality, and
text orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... it relates to margin-block-start, margin-inline-start, and margin-inline-end, which define the other margins of the element. values the margin-block-end property takes the same values as the margin-left property. ...
...ues as the margin-left property. formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples setting block end margin html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-rl; margin-block-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-block-end' in that specification. editor's...
margin-block-start - CSS: Cascading Style Sheets
the margin-block-start css property defines the logical block start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and
text orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...mode, directionality, and
text orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... it relates to margin-block-end, margin-inline-start, and margin-inline-end, which define the other margins of the element. values the margin-block-start property takes the same values as the margin-left property. formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute ...
...s as the margin-left property. formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples setting block start margin html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; margin-block-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-block-start' in that specification. edit...
margin-inline - CSS: Cascading Style Sheets
the margin-inline css shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and
text orientation. ...
... the margin-inline css shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and
text orientation. ...
... constituent properties this property is a shorthand for the following css properties: margin-inline-end margin-inline-start syntax values the margin-inline property takes the same values as the margin-left property. formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding...
...-left property. formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typediscrete formal syntax <'margin-left'>{1,2} examples setting inline start and end margins html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-rl; margin-inline: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline' in that specification. editor's ...
opacity - CSS: Cascading Style Sheets
lid). description opacity applies to the element as a whole, including its contents, even though the value is not inherited by child elements. thus, the element and its children all have the same opacity relative to the element's background, even if they have different opacities relative to one another. using opacity with a value other than 1 places the element in a new stacking con
text. ...
...t and its children all have the same opacity relative to the element's background, even if they have different opacities relative to one another. using opacity with a value other than 1 places the element in a new stacking con
text. if you do not want to apply opacity to child elements, use the background property instead. for example: background: rgba(0, 0, 0, 0.4); accessibility concerns if
text opacity is adjusted, it is important to ensure that the contrast ratio between the color of the
text and the background the
text is placed over is high enough that people experiencing low vision conditions will be able to read the content of the page. color contrast ratio is determined by comparing the luminosity of the opacity-adjusted
text and background color values. in order to meet current ...
...n the color of the
text and the background the
text is placed over is high enough that people experiencing low vision conditions will be able to read the content of the page. color contrast ratio is determined by comparing the luminosity of the opacity-adjusted
text and background color values. in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for
text content and 3:1 for larger
text such as headings. large
text is defined as 18.66px and bold or larger, or 24px or larger. webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial value1.0applies toall elementsinheritednocomputed valuethe specified value, clipped in the ran...
...ipped in the range [0,1]animation typea number formal syntax <alpha-value>where <alpha-value> = <number> | <percentage> examples setting background opacity html <div class="light">you can barely see this.</div> <div class="medium">this is easier to see.</div> <div class="heavy">this is very easy to see.</div> css div { background-color: yellow; } .light { opacity: 0.2; /* barely see the
text over the background */ } .medium { opacity: 0.5; /* see the
text more clearly over the background */ } .heavy { opacity: 0.9; /* see the
text very clearly over the background */ } result setting opacity on hover html <img src="//developer.mozilla.org/static/img/opengraph-logo.png" alt="mdn logo" width="128" height="146" class="opacity"> css img.opacity { opacity: 1; filter: a...
overflow-y - CSS: Cascading Style Sheets
bottom edges. hidden content is clipped if necessary to fit vertically in the padding box. no scrollbars are provided. clip like for hidden, the content is clipped to the element's padding box. the difference between clip and hidden is that the clip keyword also forbids all scrolling, including programmatic scrolling. the box is not a scroll container, and does not start a new formatting con
text. if you wish to start a new formatting con
text, you can use display: flow-root to do so. scroll content is clipped if necessary to fit vertically in the padding box. browsers display scrollbars whether or not any content is actually clipped. (this prevents scrollbars from appearing or disappearing when the content changes.) printers may still print overflowing content. auto depends on the use...
...ary to fit vertically in the padding box. browsers display scrollbars whether or not any content is actually clipped. (this prevents scrollbars from appearing or disappearing when the content changes.) printers may still print overflowing content. auto depends on the user agent. if content fits inside the padding box, it looks the same as visible, but still establishes a new block-formatting con
text. desktop browsers provide scrollbars if content overflows. formal definition initial valuevisibleapplies toblock-containers, flex containers, and grid containersinheritednocomputed valueas specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typediscrete formal syntax visible | hidden | clip | scroll...
...ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. </div> </li> <li...
... dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. </div> </li> <li><code>overflow-y:visible</code> — displays the
text outside the box if needed <div id="div3"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. </div> </...
perspective - CSS: Cascading Style Sheets
ty. the parts of the 3d elements that are behind the user — i.e. their z-axis coordinates are greater than the value of the perspective css property — are not drawn. the vanishing point is by default placed at the center of the element, but its position can be changed using the perspective-origin property. using this property with a value different than 0 and none creates a new stacking con
text. ...
...how quick the cube shrinks is defined by the perspective property. the smaller its value is, the deeper the perspective is. ...
... width: 200px; height: 200px; margin: 75px 0 0 75px; border: none; } .cube { width: 100%; height: 100%; backface-visibility: visible; perspective-origin: 150% 150%; transform-style: preserve-3d; } .face { display: block; position: absolute; width: 100px; height: 100px; border: none; line-height: 100px; font-family: sans-serif; font-size: 60px; color: white;
text-align: center; } /* define each face based on direction */ .front { background: rgba(0, 0, 0, 0.3); transform: translatez(50px); } .back { background: rgba(0, 255, 0, 1); color: black; transform: rotatey(180deg) translatez(50px); } .right { background: rgba(196, 0, 0, 0.7); transform: rotatey(90deg) translatez(50px); } .left { background: rgba(0, 0, 196, 0.7); transform: rot...
... editor's draft initial definition ...
shape-outside - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository. ...
...sometimes you don't notice. </p> </div> css .main { width: 530px; } .left, .right { width: 40%; height: 12ex; background-color: lightgray; ...
...sometimes you don't notice. </p> </div> css .main { width: 530px; } .left, .right { width: 40%; height: 12ex; background-color: lightgray; } .left { -webkit-shape-outside: polygon(0 0, 100% 100%, 0 100%); shape-outside: polygon(0 0, 100% 100%, 0 100%); ...
... candidate recommendation initial definition. css shapes module level 2the definition of 'shape-outside' in that specification. editor's draft adds the path() value ...
word-break - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax /* keyword values */ word-break: normal; word-break: break-all; word-break: keep-all; word-break: break-word; /* deprecated */ /* global values */ word-break: inherit; word-break: initial; word-break: unset; the word-break property is specified as a single keyword chosen from the list of values below. values normal use the default line break rule. ...
...; word-break: break-word; /* deprecated */ /* global values */ word-break: inherit; word-break: initial; word-break: unset; the word-break property is specified as a single keyword chosen from the list of values below. values normal use the default line break rule. break-all to prevent overflow, word breaks should be inserted between any two characters (excluding chinese/japanese/korean
text). keep-all word breaks should not be used for chinese/japanese/korean (cjk)
text. non-cjk
text behavior is the same as for normal. break-word has the same effect as word-break: normal and overflow-wrap: anywhere, regardless of the actual value of the overflow-wrap property. note: in contrast to word-break: break-word and overflow-wrap: break-word (see overflow-wrap), word-break: break-al...
... formal definition initial valuenormalapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | break-all | keep-all | break-word examples html <p>1. ...
... working draft initial definition ...
Media buffering, seeking, and time ranges - Developer guides
nges we can write a little bit of html: <p> <audio id="my-audio" controls> <source src="music.mp3" type="audio/mpeg"> </audio> </p> <p> <canvas id="my-canvas" width="300" height="20"> </canvas> </p> and a little bit of javascript: window.onload = function(){ var myaudio = document.getelementbyid('my-audio'); var mycanvas = document.getelementbyid('my-canvas'); var con
text = mycanvas.getcon
text('2d'); con
text.fillstyle = 'lightgray'; con
text.fillrect(0, 0, mycanvas.width, mycanvas.height); con
text.fillstyle = 'red'; con
text.strokestyle = 'white'; var inc = mycanvas.width / myaudio.duration; // display timeranges myaudio.addeventlistener('seeked', function() { for (i = 0; i < myaudio.buffered.length; i++) { var startx =...
...each red filled white rectangle represents a time range. ...
...each red filled white rectangle represents a time range. note: you can see the timerange code running live on js bin. seekable the seekable attribute ret...
...each red filled white rectangle represents a time range. note: you can see the timerange code running live on js bin. seekable the seekable attribute returns a timeranges object and tells us which parts of the ...
Accept-Patch - HTTP
mplete list of official content encodings. two others content encoding, bzip and bzip2, are sometimes used, though not standard. they implement the algorithm used by these two unix programs. note that the first one was discontinued due to patent licensing problems. ...
...tent encodings. two others content encoding, bzip and bzip2, are sometimes used, though not standard. they implement the algorithm used by these two unix programs. note that the first one was discontinued due to patent licensing problems. ...
...sed by these two unix programs. note that the first one was discontinued due to patent licensing problems. ...
...ms. note that the first one was discontinued due to patent licensing problems. ...
Cross-Origin-Opener-Policy - HTTP
coop will process-isolate your document and potential attackers can't access to your global object if they were opening it in a popup, preventing a set of cross-origin attacks dubbed xs-leaks. if a cross-origin document with coop is opened in a new window, the opening document will not have a reference to it, and the window.opener property of the new window will be null. this allows you to have more control over references to a window than rel=noopener, which only affects outgoing navigations. ...
... to have more control over references to a window than rel=noopener, which only affects outgoing navigations. header type response header forbidden header name no syntax cross-origin-opener-policy: unsafe-none | same-origin-allow-popups | same-origin directives unsafe-none this is the default value. allows the document to be added to its opener's browsing con
text group unless the opener itself has a coop of same-origin or same-origin-allow-popups. same-origin-allow-popups retains references to newly opened windows or tabs which either don't set coop or which opt out of isolation by setting a coop of unsafe-none. same-origin isolates the browsing con
text exclusively to same-origin documents. cross-origin documents are not loaded in the same browsing co...
...group unless the opener itself has a coop of same-origin or same-origin-allow-popups. same-origin-allow-popups retains references to newly opened windows or tabs which either don't set coop or which opt out of isolation by setting a coop of unsafe-none. same-origin isolates the browsing con
text exclusively to same-origin documents. cross-origin documents are not loaded in the same browsing con
text. examples certain features depend on cross-origin isolation certain features like sharedarraybuffer objects or performance.now() with unthrottled timers are only available if your document has a coop header with the value same-origin value set. cross-origin-opener-policy: same-origin cross-origin-embedder-policy: require-corp see also the cross-origin-embedder-policy header which you'll ne...
...ly available if your document has a coop header with the value same-origin value set. cross-origin-opener-policy: same-origin cross-origin-embedder-policy: require-corp see also the cross-origin-embedder-policy header which you'll need to set as well. to check if cross-origin isolation has been successful, you can test against the crossoriginisolated property available to window and worker con
texts: if (crossoriginisolated) { // post sharedarraybuffer } else { // do something else } specifications specification html living standardthe definition of 'cross-origin-opener-policy header' in that specification. ...
Feature-Policy: fullscreen - HTTP
eby the fullscreen directive didn't work unless the allowfullscreen attribute was also present, but this has been fixed as of firefox 80 (bug 1608358). syntax feature-policy: fullscreen <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the default value is 'self'. examples g...
...it can do so by delivering the following http response header to define a feature policy: feature-policy: fullscreen 'self' https://example.com with an <iframe> element fastcorp inc. wants to disable fullscreen for all cross-origin child frames, except for a specific <iframe>. ...
Feature-Policy: geolocation - HTTP
and their same-origin child frames. this directive allows or prevents cross-origin frames from accessing geolocation. this includes same-origin frames. syntax feature-policy: geolocation <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. the default value is 'self'. examples general example se...
...it can do so by delivering the following http response header to define a feature policy: feature-policy: geolocation 'self' https://example.com with an <iframe> element fastcorp inc. wants to disable geolocation for all cross-origin child frames, except for a specific <iframe>. ...
Index - HTTP
http, http header, reference, request header the accept request http header advertises which content types, expressed as mime types, the client is able to understand. using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the content-type response header. browsers set adequate values for this header depending on the con
text where the request is done: when fetching a css stylesheet a different value is set for the request than when fetching an image, video or a script. 3 accept-charset content negotiation, http, http header, reference, request header the accept-charset request http header advertises which character set the client is able to understand. using content negotiation, the server then s...
...content, reference, security the http content-security-policy (csp) block-all-mixed-content directive prevents loading any assets using http when the page is loaded using https. 31 csp: child-src csp, directive, http, reference, security the deprecated http content-security-policy (csp) child-src directive defines the valid sources for web workers and nested browsing con
texts loaded using elements such as <frame> and <iframe>. for workers, non-compliant requests are treated as fatal network errors by the user agent. 32 csp: connect-src csp, directive, http, reference, security the http content-security-policy (csp) connect-src directive restricts the urls which can be loaded using script interfaces. the apis that are restricted are: 33 ...
...font-src csp, directive, http, reference, security the http content-security-policy (csp) font-src directive specifies valid sources for fonts loaded using @font-face. 35 csp: form-action csp, directive, http, security the http content-security-policy (csp) form-action directive restricts the urls which can be used as the target of a form submissions from a given con
text. 36 csp: frame-ancestors csp, directive, http, security the http content-security-policy (csp) frame-ancestors directive specifies valid parents that may embed a page using <frame>, <iframe>, <object>, <embed>, or <applet>. 37 csp: frame-src csp, directive, http, reference, security the http content-security-policy (csp) frame-src directive specifies vali...
...ors csp, directive, http, security the http content-security-policy (csp) frame-ancestors directive specifies valid parents that may embed a page using <frame>, <iframe>, <object>, <embed>, or <applet>. 37 csp: frame-src csp, directive, http, reference, security the http content-security-policy (csp) frame-src directive specifies valid sources for nested browsing con
texts loading using elements such as <frame> and <iframe>. 38 csp: img-src csp, directive, http, reference, security the http content-security-policy img-src directive specifies valid sources of images and favicons. 39 csp: manifest-src csp, directive, http, reference, security the http content-security-policy: manifest-src directive specifies which manifest c...
Warning - HTTP
bout possible problems with the status of the message. more than one warning header may appear in a response. warning header fields can in general be applied to any message, however some warn-codes are specific to caches and can only be applied to response messages. header type general header forbidden header name no syntax warning: <warn-code> <warn-agent> <warn-
text> [<warn-date>] directives <warn-code> a three-digit warning number. the first digit indicates whether the warning is required to be deleted from a stored response after validation. 1xx warn-codes describe the freshness or validation status of the response and will be deleted by a cache after deletion. 2xx warn-codes describe some aspect of the representation that is not rectified ...
...atus of the response and will be deleted by a cache after deletion. 2xx warn-codes describe some aspect of the representation that is not rectified by a validation and won't be deleted by a cache after validation unless a full response is sent. <warn-agent> the name or pseudonym of the server or software adding the warning header (might be "-" when the agent is unknown). ...
...onse and will be deleted by a cache after deletion. 2xx warn-codes describe some aspect of the representation that is not rectified by a validation and won't be deleted by a cache after validation unless a full response is sent. <warn-agent> the name or pseudonym of the server or software adding the warning header (might be "-" when the agent is unknown). <warn-
text> advisory
text describing the error. <warn-date> optional. if more than one warning header is sent, include a date that matches the date header. warning codes the http warn codes registry at iana.org defines the namespace for warn codes. code
text description 110 response is stale a response provided by a cache is stale (the expiration time set for it has passed). ...
...ntent-coding, media-type or the like. ...
HTTP headers - HTTP
oprietary headers have historically been used with an x- prefix, but this convention was deprecated in june 2012 because of the inconveniences it caused when nonstandard fields became standard in rfc 6648; others are listed in an iana registry, whose original content was defined in rfc 4229. iana also maintains a registry of proposed new http headers. headers can be grouped according to their con
texts: general headers apply to both requests and responses, but with no relation to the data transmitted in the body. request headers contain more information about the resource to be fetched, or about the client requesting the resource. response headers hold additional information about the response, like its location or about the server providing it. entity headers contain information about t...
...st requested that a client used to connect to your proxy or load balancer. x-forwarded-proto identifies the protocol (http or https) that a client used to connect to your proxy or load balancer. via added by proxies, both forward and reverse proxies, and can appear in the request headers and the response headers. redirects location indicates the url to redirect a page to. request con
text from contains an internet email address for a human user who controls the requesting user agent. host specifies the domain name of the server (for virtual hosting), and (optionally) the tcp port number on which the server is listening. referer the address of the previous web page from which a link to the currently requested page was followed. referrer-policy governs which referrer infor...
...wed. referrer-policy governs which referrer information sent in the referer header should be included with requests made. user-agent contains a characteristic string that allows the network protocol peers to identify the application type, operating system, software vendor or software version of the requesting software user agent. see also the firefox user agent string reference. response con
text allow lists the set of http request methods supported by a resource. server contains information about the software used by the origin server to handle the request. range requests accept-ranges indicates if the server supports range requests, and if so in which unit the range can be expressed. range indicates the part of a document that the server should return. if-range creates a...
...rective. x-content-type-options disables mime sniffing and forces browser to use the type given in content-type. x-download-options the x-download-options http header indicates that the browser (internet explorer) should not display the option to "open" a file that has been downloaded from an application, to prevent phishing attacks as the file otherwise would gain access to execute in the con
text of the application. (note: related ms edge bug). x-frame-options (xfo) indicates whether a browser should be allowed to render a page in a <frame>, <iframe>, <embed> or <object>. x-permitted-cross-domain-policies specifies if a cross-domain policy file (crossdomain.xml) is allowed. the file may define a policy to grant clients, such as adobe's flash player, adobe acrobat, microsoft silverligh...
HTTP Messages - HTTP
http messages are how data is exchanged between a server and a client. there are two types of messages: requests sent by the client to trigger an action on the server, and responses, the answer from the server. http messages are composed of
textual information encoded in ascii, and span over multiple lines. in http/1.1, and earlier versions of the protocol, these messages were openly sent across the connection. in http/2, the once human-readable message is now divided up into http frames, providing optimization and performance improvements. web developers, or webmasters, rarely craft these
textual http messages themselves: software, a web browser, proxy, or web server, perform this action. they provide http messages through config files (for proxies or servers), apis (for browsers), or othe...
...oun (like head or options), that describes the action to be performed. for example, get indicates that a resource should be fetched or post means that data is pushed to the server (creating or modifying a resource, or generating a temporary document to send back). the request target, usually a url, or the absolute path of the protocol, port, and domain are usually characterized by the request con
text. the format of this request target varies between different http methods. it can be an absolute path, ultimately followed by a '?' and query string. this is the most common form, known as the origin form, and is used with get, post, head, and options methods. post / http/1.1 get /background.png http/1.0 head /test.html?query=alibaba http/1.1 options /anypage.html http/1.0 ...
...ture depends upon the header. the whole header, including the value, consist of one single line, which can be quite long. there are numerous request headers available. they can be divided in several groups: general headers, like via, apply to the message as a whole. request headers, like user-agent, accept-type, modify the request by specifying it further (like accept-language), by giving con
text (like referer), or by conditionally restricting it (like if-none). entity headers, like content-length which apply to the body of the request. obviously, there is no such header transmitted if there is no body in the request. body the final part of the request is its body. not all requests have one: requests fetching resources, like get, head, delete, or options, usually don't need one. som...
...g of a multipart body, each containing a different bit of information. this is typically associated with html forms. http responses status line the start line of an http response, called the status line, contains the following information: the protocol version, usually http/1.1. a status code, indicating success or failure of the request. common status codes are 200, 404, or 302 a status
text. a brief, purely informational,
textual description of the status code to help a human understand the http message. a typical status line looks like: http/1.1 404 not found. headers http headers for responses follow the same structure as any other header: a case-insensitive string followed by a colon (':') and a value whose structure depends upon the type of the header. the whole header, incl...
JavaScript data types and data structures - JavaScript
n use the operators +, *, -, **, and % with bigints—just like with numbers. a bigint is not strictly equal to a number, but it is loosely so. a bigint behaves like a number in cases where it is converted to boolean: if, ||, &&, boolean, !. bigints cannot be operated on interchangeably with numbers. instead a typeerror will be thrown. string type javascript's string type is used to represent
textual data. it is a set of "elements" of 16-bit unsigned integer values. each element in the string occupies a position in the string. the first element is at index 0, the next at index 1, and so on. the length of a string is the number of elements in it. unlike some programming languages (such as c), javascript strings are immutable. this means that once a string is created, it is not possible to ...
...typing" your code! it can be tempting to use strings to represent complex data. doing this comes with short-term benefits: it is easy to build complex strings with concatenation. strings are easy to debug (what you see printed is always what is in the string). strings are the common denominator of a lot of apis (input fields, local storage values, xmlhttprequest responses when using response
text, etc.) and it can be tempting to only work with strings. with conventions, it is possible to represent any data structure in a string. this does not make it a good idea. for instance, with a separator, one could emulate a list (while a javascript array would be more suitable). unfortunately, when the separator is used in one of the "list" elements, then, the list is broken. an escape character ...
...ructure in a string. this does not make it a good idea. for instance, with a separator, one could emulate a list (while a javascript array would be more suitable). unfortunately, when the separator is used in one of the "list" elements, then, the list is broken. an escape character can be chosen, etc. all of this requires conventions and creates an unnecessary maintenance burden. use strings for
textual data. when representing complex data, parse strings, and use the appropriate abstraction. symbol type a symbol is a unique and immutable primitive value and may be used as the key of an object property (see below). in some programming languages, symbols are called "atoms". for more details see symbol and the symbol object wrapper in javascript. objects in computer science, an object is a ...
...n", for instance), look-up performance would necessarily be linear. native implementations of them (including weakmaps) can have look-up performance that is approximately logarithmic to constant time. usually, to bind data to a dom node, one could set properties directly on the object, or use data-* attributes. this has the downside that the data is available to any script running in the same con
text. maps and weakmaps make it easy to privately bind data to an object. structured data: json json (javascript object notation) is a lightweight data-interchange format, derived from javascript, but used by many programming languages. json builds universal data structures. see json and json for more details. more objects in the standard library javascript has a standard library of built-in obje...
JavaScript modules - JavaScript
d on modules javascript programs started off pretty small — most of its usage in the early days was to do isolated scripting tasks, providing a bit of interactivity to your web pages where needed, so large scripts were generally not needed. fast forward a few years and we now have complete applications being run in browsers with a lot of javascript, as well as javascript being used in other con
texts (node.js, for example). it has therefore made sense in recent years to start thinking about providing mechanisms for splitting javascript programs up into separate modules that can be imported when needed. node.js has had this ability for a long time, and there are a number of javascript libraries and frameworks that enable module usage (for example, other commonjs and amd-based module systems ...
...the above should start getting pretty familiar. the modules directory's two modules are described below: canvas.js — contains functions related to setting up the canvas: create() — creates a canvas with a specified width and height inside a wrapper <div> with a specified id, which is itself appended inside a specified parent element. returns an object containing the canvas's 2d con
text and the wrapper's id. createreportlist() — creates an unordered list appended inside a specified wrapper element, which can be used to output report data into. returns the list's id. square.js — contains: name — a constant containing the string 'square'. draw() — draws a square on a specified canvas, with a specified size, position, and color. returns an object containin...
...les, and which are regular javascript. it ensures that your module files are parsed as a module by runtimes such as node.js, and build tools such as babel. however, we decided to keep to using .js, at least for the moment. to get modules to work correctly in a browser, you need to make sure that your server is serving them with a content-type header that contains a javascript mime type such as
text/javascript. if you don't, you'll get a strict mime type checking error along the lines of "the server responded with a non-javascript mime type" and the browser won't run your javascript. most servers already set the correct type for .js files, but not yet for .mjs files. servers that already serve .mjs files correctly include github pages and http-server for node.js. this is ok if you are using...
...is then made a subfeature of the object, hence we now need to access the constructor with module. prepended to it, e.g. module.square( ... ). troubleshooting here are a few tips that may help you if you are having trouble getting your modules to work. feel free to add to the list if you discover more! we mentioned this before, but to reiterate: .js files need to be loaded with a mime-type of
text/javascript (or another javascript-compatible mime-type, but
text/javascript is recommended), otherwise you'll get a strict mime type checking error like "the server responded with a non-javascript mime type". if you try to load the html file locally (i.e. with a file:// url), you'll run into cors errors due to javascript module security requirements. you need to do your testing through a server.
Unicode property escapes - JavaScript
ies are used to classify unicode characters and subcategories are available to define a more precise categorization. it is possible to use both short or long forms in unicode property escapes. they can be used to match letters, numbers, symbols, punctuations, spaces, etc. for a more exhaustive list of general categories, please refer to the unicode specification. ...
...ups: undefined] unicode property escapes vs. character classes with javascript regular expressions, it is also possible to use character classes and especially \w or \d to match letters or digits. however, such forms only match characters from the latin script (in other words, a to z and a to z for \w and 0 to 9 for \d). ...
...s. however, such forms only match characters from the latin script (in other words, a to z and a to z for \w and 0 to 9 for \d). as shown in this example, it might be a bit clumsy to work with non latin
texts. unicode property escapes categories encompass much more characters and \p{letter} or \p{number} will work for any script. ...
...nicode property escapes categories encompass much more characters and \p{letter} or \p{number} will work for any script. // trying to use ranges to avoid \w limitations: const nonenglish
text = "Приключения Алисы в Стране чудес"; const regexpbmpword = /([\u0000-\u0019\u0021-\uffff])+/gu; // bmp goes through u+0000 to u+ffff but space is u+0020 console.table(nonenglish
text.match(regexpbmpword)); // using unicode property escapes instead const regexpupe = /\p{l}+/gu; console.table(nonenglish
text.match(regexpupe)); specifications specification ecmascript (ecma-262)the definition of 'regexp: unicode property escapes' in that specification. ...
TypeError: can't define property "x": "obj" is not extensible - JavaScript
the javascript exception "can't define property "x": "obj" is not extensible" occurs when object.preven
textensions() marked an object as no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible. message typeerror: cannot create property for a non-extensible object (edge) typeerror: can't define property "x": "obj" is not extensible (firefox) typeerror: cannot define property: "x", object is not extensible. (chrome) error type typeerror what went wrong? usually, an object is extensible and new properties can be added to it. however, in this case object.preven
textensions() marked an object as no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible. ...
... no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible. examples adding new properties to a non-extensible objects in strict mode, attempting to add new properties to a non-extensible object throws a typeerror. in sloppy mode, the addition of the "x" property is silently ignored. ...
...ct throws a typeerror. in sloppy mode, the addition of the "x" property is silently ignored. 'use strict'; var obj = {}; object.preven
textensions(obj); obj.x = 'foo'; // typeerror: can't define property "x": "obj" is not extensible in both, strict mode and sloppy mode, a call to object.defineproperty() throws when adding a new property to a non-extensible object. var obj = { }; object.preven
textensions(obj); object.defineproperty(obj, 'x', { value: "foo" } ); // typeerror: can't define property "x": "obj" is not extensible to fix this error, you will either need to remove the call to object.preven
textensions() entirely, or move it to a position so that the property is added earlier and only later the object is marked as non-extensible. of course you can also remove the property that...
...either need to remove the call to object.preven
textensions() entirely, or move it to a position so that the property is added earlier and only later the object is marked as non-extensible. of course you can also remove the property that was attempted to be added, if you don't need it. ...
RegExp.prototype.exec() - JavaScript
the exec() method executes a search for a match in a specified string. returns a result array, or null. javascript regexp objects are stateful when they have the global or sticky flags set (e.g. /foo/g or /foo/y). they store a lastindex from the previous match. using this internally, exec() can be used to iterate over multiple matches in a string of
text (with capture groups), as opposed to getting just the matching strings with string.prototype.match(). a newer function has been proposed to simplify matching multiple parts of a string (with capture groups): string.prototype.matchall(). if you are executing a match simply to find true or false, use regexp.prototype.test() method or string.prototype.search() instead. the source for this interactive example is stored in a github repositor...
.../github.com/mdn/interactive-examples and send us a pull request. syntax regexobj.exec(str) parameters str the string against which to match the regular expression. return value if the match succeeds, the exec() method returns an array (with extra properties index and input; see below) and updates the lastindex property of the regular expression object. the returned array has the matched
text as the first item, and then one item for each parenthetical capture group of the matched
text. if the match fails, the exec() method returns null, and sets lastindex to 0. description consider the following example: // match "quick brown" followed by "jumps", ignoring characters in between // remember "brown" and "jumps" // ignore case let re = /quick\s(brown).+?(jumps)/ig; let result = re.ex...
...index the index at which to start the next match. if g is absent, this will always be 0. 25 ignorecase indicates if the i flag was used to ignore case. true global indicates if the g flag was used for a global match. true multiline indicates if the m flag was used to search across multiple lines. false source the
text of the pattern. "quick\s(brown).+?(jumps)" examples finding successive matches if your regular expression uses the "g" flag, you can use the exec() method multiple times to find successive matches in the same string. when you do so, the search starts at the substring of str specified by the regular expression's lastindex property (test() will also advance the lastindex property). not...
... not be reset when searching a different string, it will start its search at its existing lastindex . for example, assume you have this script: let myre = /ab*/g; let str = 'abbcdefabh'; let myarray; while ((myarray = myre.exec(str)) !== null) { let msg = 'found ' + myarray[0] + '. '; msg += 'next match starts at ' + myre.lastindex; console.log(msg); } this script displays the following
text: found abb. next match starts at 3 found ab. next match starts at 9 warning: do not place the regular expression literal (or regexp constructor) within the while condition! it will create an infinite loop if there is a match, due to the lastindex property being reset upon each iteration. also, be sure that the global flag ("g") is set, or it will also cause an infinite loop. using exec()...
SharedArrayBuffer - JavaScript
in one agent will eventually become visible in the other agent. var sab = new sharedarraybuffer(1024); worker.postmessage(sab); updating and synchronizing shared memory with atomic operations shared memory can be created and updated simultaneously in workers or the main thread. depending on the system (the cpu, the os, the browser) it can take a while until the change is propagated to all con
texts. to synchronize, atomic operations are needed. apis which use sharedarraybuffer objects webglrenderingcon
text.bufferdata() webglrenderingcon
text.buffersubdata() webgl2renderingcon
text.getbuffersubdata() security requirements shared memory and high-resolution timers were effectively disabled at the start of 2018 in light of spectre. in 2020, a new, secure approach has been standardized t...
...memory and high-resolution timers were effectively disabled at the start of 2018 in light of spectre. in 2020, a new, secure approach has been standardized to re-enable shared memory. with a few security measures, postmessage() will no longer throw for sharedarraybuffer objects and shared memory across threads will be available: as a baseline requirement, your document needs to be in a secure con
text. for top-level documents, two headers will need to be set to cross-origin isolate your site: cross-origin-opener-policy with same-origin as value (protects your origin from attackers) cross-origin-embedder-policy with require-corp as value (protects victims from your origin) cross-origin-opener-policy: same-origin cross-origin-embedder-policy: require-corp to check if cross origin isolat...
...calling a sharedarraybuffer constructor as a functio...
... ...
OpenSearch description format
ing. ...
..." value="{searchterms}"/> <!-- other params if you need them… --> <param name="[other key name]" value="[parameter value]"/> </url> <url type="application/x-suggestions+json" template="[suggestionurl]"/> <moz:searchform>[https://example.com/search]</moz:searchform> </opensearchdescription> shortname a short name for the search engine. it must be 16 or fewer characters of plain
text, with no html or other markup. description a brief description of the search engine. it must be 1024 or fewer characters of plain
text, with no html or other markup. inputencoding the character encoding to use when submitting input to the search engine. image uri of an icon for the search engine. when possible, include a 16×16 image of type image/x-icon (such as /favicon.ico) and a 64×6...
...ugins/ folder). http: and https: urls are converted to data: uris when this is done. note: for icons loaded remotely (that is, from https:// uris as opposed to data: uris), firefox will reject icons larger than 10 kilobytes. url describes the url or urls to use for the search. the template attribute indicates the base url for the search query. firefox supports three url types: type="
text/html" specifies the url for the actual search query. type="application/x-suggestions+json" specifies the url for fetching search suggestions. in firefox 63 onwards, type="application/json" is accepted as an alias of this. type="application/x-moz-keywordsearch" specifies the url used when a keyword search is entered in the location bar. this is supported only in firefox. for these url type...
...ription+xml. be sure that your search plugin xml is well formed. you can check by loading the file directly into firefox. ampersands (&) in the template url must be escaped as &, and tags must be closed with a trailing slash or matching end tag. the xmlns attribute is important — without it you could get the error message "firefox could not download the search plugin". you must include a
text/html url — search plugins including only atom or rss url types (which is valid, but firefox doesn't support) will also generate the "could not download the search plugin" error. remotely fetched favicons must not be larger than 10kb (see bug 361923). in addition, the search plugin service provides a logging mechanism that may be useful to plugin developers. use about:config to set the pref '...
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
ulting subscription object to complete the whole process. in the registration part, the code looks like this: if(subscription) { return subscription; } if the user has already subscribed, we then return the subscription object and move to the subscription part. if not, we initialize a new subscription: const response = await fetch('./vapidpublickey'); const vapidpublickey = await response.
text(); const convertedvapidkey = urlbase64touint8array(vapidpublickey); the app fetches the server's public key and converts the response to
text; then it needs to be converted to a uint8array (to support chrome). to learn more about vapid keys you can read the sending vapid identified webpush notifications via mozilla’s push service blog post. the app can now use the pushmanager to subscribe the...
... now, onto the next javascript file. server.js the server part is written in node.js and needs to be hosted somewhere suitable, which is a subj...
... feel free to...
...t file we will look at is the service worker: self.addeventlistener('push', function(event) { const payload = event.data ? event.data.
text() : 'no payload'; event.waituntil( self.registration.shownotification('serviceworker cookbook', { body: payload, }) ); }); all it does is add a listener for the push event, create the payload variable consisting of the
text taken from the data (or create a string to use if data is empty), and then wait until the notification is shown to the user. feel free to explore the rest of the examples in the service worker cookbook if you want to know how they are handled — the full source code is available on github. there's a big collection of working examples showing general use, but also web push, caching strategies, p...
display - SVG: Scalable Vector Graphics
e child has a value for display other than none. when the display attribute is set to none, then the given element does not become part of the rendering tree. it has implications for the <tspan>, <tref>, and <altglyph> elements, event processing, for bounding box calculations and for calculation of clipping paths: if display is set to none on a <tspan>, <tref>, or <altglyph> element, then the
text string is ignored for the purposes of
text layout. regarding events, if display is set to none, the element receives no events. the geometry of a graphics element with display set to none is not included in bounding box and clipping paths calculations. the display attribute only affects the direct rendering of a given element, whereas it does not prevent elements from being referenced by othe...
...is not included in bounding box and clipping paths calculations. the display attribute only affects the direct rendering of a given element, whereas it does not prevent elements from being referenced by other elements. for example, setting it to none on a <path> element will prevent that element from getting rendered directly onto the canvas, but the <path> element can still be referenced by a <
textpath> element; furthermore, its geometry will be used in
text-on-a-path processing even if the <path> has a display value of none. this attribute also affects direct rendering into offscreen canvases, such as occurs with masks or clip paths. thus, setting display="none" on a child of a <mask> will prevent the given child element from being rendered as part of the mask. similarly, setting display=...
... specifications specification status comment scalable vector graphics (svg) 2the definition o...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'display' in that specification.
fill-opacity - SVG: Scalable Vector Graphics
ribute is a presentation attribute defining the opacity of the paint server (color, gradient, pattern, etc) applied to a shape. note: as a presentation attribute fill-opacity can be used as a css property. ...
...s a presentation attribute defining the opacity of the paint server (color, gradient, pattern, etc) applied to a shape. note: as a presentation attribute fill-opacity can be used as a css property. ...
... samsung internet android ? ...
...own specifications specification status comment scalable vector graphics (svg) 2the definition of 'fill-opacity' in that specification. ...
font-size - SVG: Scalable Vector Graphics
the font-size attribute refers to the size of the font from baseline to baseline when multiple lines of
text are set solid in a multiline layout environment. note: as a presentation attribute, font-size can be used as a css property. see the css font-size property for more information. ...
...ute refers to the size of the font from baseline to baseline when multiple lines of
text are set solid in a multiline layout environment. note: as a presentation attribute, font-size can be used as a css property. see the css font-size property for more information. ...
...rs to the size of the font from baseline to baseline when multiple lines of
text are set solid in a multiline layout environment. note: as a presentation attribute, font-size can be used as a css property. see the css font-size property for more information. ...
...as a presentation attribute, font-size can be used as a css property. see the css font-size property for more information. as a presentation attribute, it can be applied to any element but it has effect only on the following eight elements: <altglyph>, <
text>, <
textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 200 30" xmlns="http://www.w3.org/2000/svg"> <
text y="20" font-size="smaller">smaller</
text> <
text x="100" y="20" font-size="2em">2em</
text> </svg> usage notes value <absolute-size> | <relative-size> | <length-percentage> default value medium animatable yes for a description of the values, please refer to the css font-size property. specifications specification status comment ...
font-style - SVG: Scalable Vector Graphics
the font-style attribute specifies whether the
text is to be rendered using a normal, italic, or oblique face. note: as a presentation attribute, font-style can be used as a css property. see the css font-style property for more information. ...
... the font-style attribute specifies whether the
text is to be rendered using a normal, italic, or oblique face. note: as a presentation attribute, font-style can be used as a css property. see the css font-style property for more information. ...
... the font-style attribute specifies whether the
text is to be rendered using a normal, italic, or oblique face. note: as a presentation attribute, font-style can be used as a css property. see the css font-style property for more information. ...
...s a presentation attribute, font-style can be used as a css property. see the css font-style property for more information. as a presentation attribute, it can be applied to any element but only has an effect on the following five elements: <altglyph>, <
text>, <
textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 250 30" xmlns="http://www.w3.org/2000/svg"> <
text y="20" font-style="normal">normal font style</
text> <
text x="150" y="20" font-style="italic">italic font style</
text> </svg> usage notes value normal | italic | oblique default value normal animatable yes for a description of the values, please refer to the css font-style property. specifications specification status comment ...
font-weight - SVG: Scalable Vector Graphics
the font-weight attribute refers to the boldness or lightness of the glyphs used to render the
text, relative to other fonts in the same font family. note: as a presentation attribute, font-weight can be used as a css property. see the css font-weight property for more information. ...
...attribute refers to the boldness or lightness of the glyphs used to render the
text, relative to other fonts in the same font family. note: as a presentation attribute, font-weight can be used as a css property. see the css font-weight property for more information. ...
...e refers to the boldness or lightness of the glyphs used to render the
text, relative to other fonts in the same font family. note: as a presentation attribute, font-weight can be used as a css property. see the css font-weight property for more information. ...
... presentation attribute, font-weight can be used as a css property. see the css font-weight property for more information. as a presentation attribute, it can be applied to any element but it has effect only on the following eight elements: <altglyph>, <
text>, <
textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 200 30" xmlns="http://www.w3.org/2000/svg"> <
text y="20" font-weight="normal">normal
text</
text> <
text x="100" y="20" font-weight="bold">bold
text</
text> </svg> usage notes value normal | bold | bolder | lighter | <number> default value normal animatable yes for a description of the values, please refer to the css font-weight property. specifications specification status comment ...
fr - SVG: Scalable Vector Graphics
candidate recommendation initial definition ...
... candidate recommendation initial definition ...
... candidate recommendation initial definition ...
... candidate recommendation initial definition ...
fx - SVG: Scalable Vector Graphics
candidate recommendation no change scalable vec...
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fx' in that specification...
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fx' in that specification. reco...
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fx' in that specification. recommendation initial definition ...
fy - SVG: Scalable Vector Graphics
candidate recommendation no change scalable vec...
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fy' in that specification...
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fy' in that specification. reco...
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fy' in that specification. recommendation initial definition ...
glyph-orientation-horizontal - SVG: Scalable Vector Graphics
the glyph-orientation-horizontal attribute affects the amount that hte current
text position advances as each glyph is rendered. when the reference orientation direction is horizontal and the glyph-orientation-horizontal results in an orientation angle that is a multiple of 180 degrees, then the current
text position is incremented according to the horizontal metrics of the glyph. otherwise, if the value of this attribute is not a multiple of 180 degrees, then the current
text position is incremented according to the vertical metrics of the glyph. this attribute is applied only to
text written in a horizontal writing-mode. note: as a presentation attribute, glyph-orientation-horizontal can be used as a css property. as a presentation attribute, it can be applied to any element but it has...
...if another angle is specified, it is rounded to the closest of the permitted values. ...
...if another angle is specified, it is rounded to the closest of the permitted values. ...
...if another angle is specified, it is rounded to the closest of the permitted values. ...
kerning - SVG: Scalable Vector Graphics
vant font (i.e., enable auto-kerning) or instead disable auto-kerning and set the spacing between them to a specific length (typically, zero). note: as a presentation attribute kerning can be used as a css property. in css the property is called font-kerning, though. ...
....e., enable auto-kerning) or instead disable auto-kerning and set the spacing between them to a specific length (typically, zero). note: as a presentation attribute kerning can be used as a css property. in css the property is called font-kerning, though. ...
...as a css property. in css the property is called font-kerning, though. ...
...s called font-kerning, though. as a presentation attribute, it can be applied to any element but it has effect only on the following four elements: <altglyph>, <
textpath>, <
text>, <tref>, and <tspan> html, body, svg { height: 100%; font: 36px verdana, helvetica, arial, sans-serif; } <svg viewbox="0 0 150 125" xmlns="http://www.w3.org/2000/svg"> <
text x="10" y="30" kerning="auto">auto</
text> <
text x="10" y="70" kerning="0">number</
text> <
text x="10" y="110" kerning="20px">length</
text> </svg> usage notes value auto | <length> default value auto animatable yes auto this value indicates that the spacing between glyphs is adjusted based on kerning tables that are included in the font that will be used. <length> if a length is p...
stroke-dasharray - SVG: Scalable Vector Graphics
e is a presentation attribute defining the pattern of dashes and gaps used to paint the outline of the shape; note: as a presentation attribute, stroke-dasharray can be used as a css property. ...
...resentation attribute defining the pattern of dashes and gaps used to paint the outline of the shape; note: as a presentation attribute, stroke-dasharray can be used as a css property. ...
... samsung internet android ? ...
...ecification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-dasharray' in that specification. ...
stroke-dashoffset - SVG: Scalable Vector Graphics
dashoffset attribute is a presentation attribute defining an offset on the rendering of the associated dash array. note: as a presentation attribute stroke-dashoffset can be used as a css property. ...
...et attribute is a presentation attribute defining an offset on the rendering of the associated dash array. note: as a presentation attribute stroke-dashoffset can be used as a css property. ...
...samsung internet android ? ...
...ification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-dashoffset' in that specification. ...
stroke-linecap - SVG: Scalable Vector Graphics
the stroke-linecap attribute is a presentation attribute defining the shape to be used at the end of open subpaths when they are stroked. note: as a presentation attribute stroke-linecap can be used as a css property. ...
... the stroke-linecap attribute is a presentation attribute defining the shape to be used at the end of open subpaths when they are stroked. note: as a presentation attribute stroke-linecap can be used as a css property. ...
... samsung internet android ? ...
... specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-linecap' in that specification. ...
stroke-linejoin - SVG: Scalable Vector Graphics
the stroke-linejoin attribute is a presentation attribute defining the shape to be used at the corners of paths when they are stroked. note: as a presentation attribute stroke-linejoin can be used as a css property. ...
... the stroke-linejoin attribute is a presentation attribute defining the shape to be used at the corners of paths when they are stroked. note: as a presentation attribute stroke-linejoin can be used as a css property. ...
... the arcs value indicates that an arcs corner is to be used to join path segments. the arcs shape is formed by extending the outer edges o...
...="0.025" /> <circle cx="1" cy="5" r="0.05" fill="pink" /> <circle cx="3" cy="2" r="0.05" fill="pink" /> <circle cx="5" cy="5" r="0.05" fill="pink" /> </g> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'stroke-linejoin' in that specification. candidate recommendation definition for shapes and
texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-linejoin' in that specification. recommendation initial definition for shapes and
texts ...
stroke-opacity - SVG: Scalable Vector Graphics
attribute defining the opacity of the paint server (color, gradient, pattern, etc) applied to the stroke of a shape. note: as a presentation attribute stroke-opacity can be used as a css property. ...
...te defining the opacity of the paint server (color, gradient, pattern, etc) applied to the stroke of a shape. note: as a presentation attribute stroke-opacity can be used as a css property. ...
... samsung internet android ? ...
... specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-opacity' in that specification. ...
xlink:arcrole - SVG: Scalable Vector Graphics
the xlink:arcrole attribute specifies a con
textual role for the element and corresponds to the rdf primer notion of a property. this con
textual role can differ from the meaning of the resource when taken outside the con
text of this particular arc. ...
... the xlink:arcrole attribute specifies a con
textual role for the element and corresponds to the rdf primer notion of a property. this con
textual role can differ from the meaning of the resource when taken outside the con
text of this particular arc. ...
...he xlink:arcrole attribute specifies a con
textual role for the element and corresponds to the rdf primer notion of a property. this con
textual role can differ from the meaning of the resource when taken outside the con
text of this particular arc. ...
...c it might have the role of "mother" and in the con
text of a different arc it might have the role of "daughter." twentytwo elements are using this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <color-profile>, <cursor>, <feimage>, <filter>, <font-face-uri>, <glyphref>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <set>, <
textpath>, <tref>, <use> usage notes value <iri> default value none animatable no <iri> this value specifies an iri reference that identifies some resource that describes the intended property. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xlink:arcrole' in...
xlink:href - SVG: Scalable Vector Graphics
the xlink:href attribute defines a reference to a resource as a reference iri. the exact meaning of that link depends on the con
text of each element using it. note: svg 2 removed the need for the xlink namespace, so instead of xlink:href you should use href. ...
...lement using it. note: svg 2 removed the need for the xlink namespace, so instead of xlink:href you should use href. 22 elements are using this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <color-profile>, <cursor>, <feimage>, <filter>, <font-face-uri>, <glyphref>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <set>, <
textpath>, <tref>, and <use>} html, body, svg { height: 100%; } <svg viewbox="0 0 160 40" xmlns="http://www.w3.org/2000/svg"> <a xlink:href="https://developer.mozilla.org/"><
text x="10" y="25">mdn web docs</
text></a> </svg> a for <a>, xlink:href defines the location of the referenced object. value <iri> default value none animatable yes altglyp...
...stops due to its own xlink:href attribute, then the current element can inherit those attributes or gradient stops. value <iri> default value none animatable yes script for <script>, xlink:href defines a reference to an external resource containing the script code. value <iri> default value none animatable no
textpath for <
textpath>, xlink:href defines a reference to the <path> element onto which the glyphs will be rendered. value <iri> default value none animatable yes use for <use>, xlink:href defines the location of the referenced object. value <iri> default value none animatable yes tref for <tref>, xlink:href de...
...inition of 'href for <radialgradient>' in that specification. recommendation defines href for the <radialgradient> element. scalable vector graphics (svg) 1.1 (second edition)the definition of 'href for <script>' in that specification. recommendation defines href for the <script> element. scalable vector graphics (svg) 1.1 (second edition)the definition of 'href for <
textpath>' in that specification. recommendation defines href for the <
textpath> element. scalable vector graphics (svg) 1.1 (second edition)the definition of 'href for <use>' in that specification. recommendation defines href for the <use> element. scalable vector graphics (svg) 1.1 (second edition)the definition of 'href for <tref>' in that specification. recommendat...
<feColorMatrix> - SVG: Scalable Vector Graphics
ack image redder, we can make the r5 a positive real number x, boosting the redness on every pixel of the new image by x. an identity matrix looks like this: r g b a w r' | 1 0 0 0 0 | g' | 0 1 0 0 0 | b' | 0 0 1 0 0 | a' | 0 0 0 1 0 | in it, every new value is exactly 1 times its old value, with nothing else added. it is recommended to start manipulating the matrix from here. usage con
text categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes in type values dom interface this element implements the svgfecolormatrixelement interface. example svg <svg width="100%" height...
...meet" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- ref --> <defs> <g id="circles"> <circle cx="30" cy="30" r="20" fill="blue" fill-opacity="0.5" /> <circle cx="20" cy="50" r="20" fill="green" fill-opacity="0.5" /> <circle cx="40" cy="50" r="20" fill="red" fill-opacity="0.5" /> </g> </defs> <use href="#circles" /> <
text x="70" y="50">reference</
text> <!-- identity matrix --> <filter id="colormethesame"> <fecolormatrix in="sourcegraphic" type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0" /> </filter> <use href="#circles" transform="translate(0 70)" filter="url(#colormethesame)" /> <
text x="70" y="120">identity matrix</
text...
...ormethesame)" /> <
text x="70" y="120">identity matrix</
text> <!-- combine rgb into green matrix --> <filter id="colormegreen"> <fecolormatrix in="sourcegraphic" type="matrix" values="0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0" /> </filter> <use href="#circles" transform="translate(0 140)" filter="url(#colormegreen)" /> <
text x="70" y="190">rgbtogreen</
text> <!-- saturate --> <filter id="colormesaturate"> <fecolormatrix in="sourcegraphic" type="saturate" values="0.2" /> </filter> <use href="#circles" transform="translate(0 210)" filter="url(#colormesaturate)" /> <
text x="70" y="260">saturate</
text> <!-- huerotate --> <filter id="colormehuerotate"> <fecolormatrix in="sourcegraphi...
... values="0.2" /> </filter> <use href="#circles" transform="translate(0 210)" filter="url(#colormesaturate)" /> <
text x="70" y="260">saturate</
text> <!-- huerotate --> <filter id="colormehuerotate"> <fecolormatrix in="sourcegraphic" type="huerotate" values="180" /> </filter> <use href="#circles" transform="translate(0 280)" filter="url(#colormehuerotate)" /> <
text x="70" y="330">huerotate</
text> <!-- luminancetoalpha --> <filter id="colormelta"> <fecolormatrix in="sourcegraphic" type="luminancetoalpha" /> </filter> <use href="#circles" transform="translate(0 350)" filter="url(#colormelta)" /> <
text x="70" y="400">luminancetoalpha</
text> </svg> result screenshotlive sample specifications specification status comment...
<glyph> - SVG: Scalable Vector Graphics
a <glyph> defines a single glyph in an svg font. usage con
text categories
text content elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <
text>, <view> attributes global attributes core attributes presentation attributes class style specific attributes d horiz-adv-x vert-origin-x vert-origin-y vert-adv-y unicode glyph-name orientation arabic-form lang dom interface this element implements the svgglyphelement interface. example svg <svg width="400px" height="300px" version="1.1" ...
... recommendation initial definit...
... recommendation initial definition ...
... recommendation initial definition ...
<title> — the SVG accessible name element - SVG: Scalable Vector Graphics
note: for backward compatibility with svg 1.1, <title> elements should be the first child element of their parent. ...
... note: for backward compatibility with svg 1.1, <title> elements should be the first child element of their parent. ...
... note: for backward compatibility with svg 1.1, <title> elements should be the first child element of their parent. ...
... note: for backward compatibility with svg 1.1, <title> elements should be the first child element of their parent. ...
Example - SVG: Scalable Vector Graphics
. combined, we get this very natural-looking behavior. this is done completely in w3c standards–xhtml, svg, and javascript–no flash or any vendor-specific extensions. this example should work in firefox 1.5 and above. ...
...or any vendor-specific extensions. this example should work in firefox 1.5 and above. view the example <?xml version='1.0'?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <title>a swarm of motes</title> <style type='
text/css'> <![cdata[ label, input { width: 150px; display: block; float: left; margin-bottom: 10px; } label {
text-align: right; width: 75px; padding-right: 20px; } br { clear: left; } ]]> </style> </head> <body onload='update()'> <svg:svg id='display' width='400' height='300'> <svg:circle id='cursor' cx='200' cy='150' r='7' fill='#0000ff' fill-opacity='0.5'/> </svg:svg> <p>a swarm of motes, governed by two simple principles. first, each mote tries to move towards the cursor, ...
...tries to move away from the average mote position. combined, we get this very natural looking behavior. </p> <p> this is done completely in w3c standards–xhtml, svg and javascript–no flash or any vendor specific extensions. currently, this will work in mozilla firefox version 1.5 and above. </p> <div> (c) 2006 <a id='emailme' href='#'>nick johnson</a> <script type='
text/javascript'> <![cdata[ // foil spam bots var email = '@riovia.net'; email ='nick' + email; document.getelementbyid('emailme').href = 'mailto:'+email; ]]> </script> this software is free for you to use in any way whatsoever, and comes with no warranty at all. </div> <form action="" onsubmit="return false;"> <p> <label>number of motes:</label> <input id='num_mot...
...se;"> <p> <label>number of motes:</label> <input id='num_motes' value='5'/> <br/> <label>max. velocity:</label> <input id='max_velocity' value='15'/> <br/> <label>attraction to cursor:</label> <input id='attract_cursor' value='6'/> <br/> <label>repulsion from peers:</label> <input id='repel_peer' value='5'/> <br/> </p> </form> <script type='
text/javascript'> <![cdata[ // array of motes var motes; // get the display element. function display() { return document.getelementbyid('display'); } // determine dimensions of the display element. // return this as a 2-tuple (x,y) in an array function dimensions() { // our rendering element var display = display(); var width = parseint( display.getattributens(null...
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
es: normalizedpathseglist, animatednormalizedpathseglist rect implemented. circle implemented. line implemented. ellipse implemented. polyline implemented. polygon implemented. ...
...list, animatednormalizedpathseglist rect implemented. circle implemented. line implemented. ellipse implemented. polyline implemented. polygon implemented. ...
... implemented.
text module
text implemented. various presentation attributes don't work (alignment-baseline, baseline-shift, dominant-baseline, kerning, letter-spacing, word-spacing, writing-mode, glyph-orientation-horizontal, glyph-orientation-vertical) recently implemented presentation attributes: direction, unicode-bidi, font-variant,
text-decoration svg
textelement recently imlemented bindings: selectsubstring recently implemented attributes:
textlength, lengthadjust tspan implemented. various presentation attributes don't work (alignment-baseline, baseline-shift, dominant-baseline, kerning, letter-spacing, word-spacing, writing-mode, glyph-orientation-h...
...tes:
textlength, lengthadjust tspan implemented. various presentation attributes don't work (alignment-baseline, baseline-shift, dominant-baseline, kerning, letter-spacing, word-spacing, writing-mode, glyph-orientation-horizontal, glyph-orientation-vertical) recently implemented presentation attributes: direction, unicode-bidi, font-variant,
text-decoration svgtspanelement recently implemented bindings: selectsubstring recently implemented attributes:
textlength, lengthadjust tref this feature, present in early draft of the spec, has been removed from it and is therefor not implemented (bug 273171).
textpath implemented. recently ...
SVG as an Image - SVG: Scalable Vector Graphics
external resources (e.g. images, stylesheets) cannot be loaded, though they can be used if inlined through data: uris. :visited-link styles aren't rendered. ...
... external resources (e.g. images, stylesheets) cannot be loaded, though they can be used if inlined through data: uris. :visited-link styles aren't rendered. ...
... external resources (e.g. images, stylesheets) cannot be loaded, though they can be used if inlined through data: uris. :visited-link styles aren't rendered. ...
...urposes, gecko places some restrictions on svg content when it's being used as an image: javascript is disabled. external resources (e.g. images, stylesheets) cannot be loaded, though they can be used if inlined through data: uris. :visited-link styles aren't rendered. platform-native widget styling (based on os theme) is disabled. note that the above restrictions are specific to image con
texts; they don't apply when svg content is viewed directly, or when it's embedded as a document via the <iframe>, <object>, or <embed> elements. specifications specification status comment html5the definition of 'svg within <img> element' in that specification. recommendation defines the usage of svg within <img> elements. css backgrounds and borders modul...
Getting started - SVG: Scalable Vector Graphics
« previousnext » a simple example let us dive straight in with a simple example. take a look at the following code. <svg version="1.1" baseprofile="full" width="300" height="200" xmlns="http://www.w3.org/2000/svg"> <rect width="100%" height="100%" fill="red" /> <circle cx="150" cy="100" r="80" fill="green" /> <
text x="150" y="125" font-size="60"
text-anchor="middle" fill="white">svg</
text> </svg> copy the code and paste it in a file demo1.svg. then open the file in firefox. it will render as shown in the following screenshot. (firefox users: click here) the rendering process involves the following: we start with the <svg> root element: a doctype declaration as known from (x)html should be left off because dtd based svg validation lead...
... bind the namespaces correctly (in the xmlns attribute). see the namespaces crash course page for more info. the background is set to red by drawing a rectangle <rect> that covers the complete image area. a green circle <circle> with a radius of 80px is drawn atop the center of the red rectangle (center of circle offset 150px to the right, and 100px downward from the top left corner). the
text "svg" is drawn. the interior of each letter is filled in with white. the
text is positioned by setting an anchor where we want the midpoint to be: in this case, the midpoint should correspond to the center of the green circle. fine adjustments can be made to the font size and vertical position to ensure the final result is aesthetically pleasing. basic properties of svg files the first impor...
... can be created dynamically with javascript and injected into the html dom. with this method, replacement technologies can be implemented for browsers which normally can't process svg. see this dedicated article which deals with the topic in-depth. how svg handles sizes and units will be explained on the next page. svg file types svg files come in two flavors. normal svg files are simple
text files containing svg markup. the recommended filename extension for these files is ".svg" (all lowercase). due to the potentially massive size svg files can reach when used for some applications (e.g., geographical applications), the svg specification also allows for gzip-compressed svg files. the recommended filename extension for these files is ".svgz" (all lowercase). unfortunately, it is ver...
...e their servers for svg, there may be ways to do it yourself. see the server configuration page on the w3.org for a range of simple solutions. server misconfiguration is a very common reason for svg failing to load, so make sure you check yours. if your server is not configured to send the correct headers with the svg files it serves, then firefox will most likely show the markup of the files as
text or encoded garbage, or even ask the viewer to choose an application to open them. « previousnext » ...
Tutorials
g started with the web getting started with the web is a concise series introducing you to the practicalities of web development. you'll set up the tools you need to construct a simple webpage and publish your own simple code. html tutorials introductory level introduction to html this module sets the stage, getting you used to important concepts and syntax, looking at applying html to
text, how to create hyperlinks, and how to use html to structure a webpage. mdn html element reference a comprehensive reference for html elements, and how the different browsers support them. creating a simple web page with html an html guide for beginners that includes explanations of common tags, including html5 tags. also includes a step-by-step guide to creating a basic web page with co...
...or authoring fast-loading html pages optimize web pages to provide a more responsive site for visitors and reduce the load on your web server and internet connection. css tutorials introductory level css basics css (cascading style sheets) is the code you use to style your webpage. css basics takes you through what you need to get started. we'll answer questions like: how do i make my
text black or red? how do i make my content show up in such-and-such a place on the screen? how do i decorate my webpage with background images and colors? css first steps css (cascading style sheets) is used to style and lay out web pages — for example, to alter the font, color, size, and spacing of your content, split it into multiple columns, or add animations and other decorative features. t...
...c experience with using it, its time to dive a bit deeper. this module looks at the cascade and inheritance, all the selector types we have available, units, sizing, styling backgrounds and borders, debugging, and lots more. the aim here is to provide you with a toolkit for writing competent css and help you understand all the essential theory, before moving on to more specific disciplines like
text styling and css layout. styling
text here we look at
text styling fundamentals, including setting font, boldness, and italics, line and letter spacing, and drop shadows and other
text features. we round off the module by looking at applying custom fonts to your page, and styling lists and links. common css questions common questions and answers for beginners. intermediate level css...
...now it's time to look at how to place your boxes in the right place in relation to the viewport, and one another. ...
Using templates and slots - Web Components
late> now we can use it by just adding it to our html document: <my-paragraph></my-paragraph> note: templates are well-supported in browsers; the shadow dom api is supported by default in firefox (version 63 onwards), chrome, opera, safari, and edge (starting with version 79). adding flexibility with slots so far so good, but the element isn't very flexible. we can only display one bit of
text inside it, meaning that at the moment it is even less useful than a regular paragraph! we can make it possible to display different
text in each element instance in a nice declarative way using the <slot> element. this has more limited support than <template>, available since chrome 53, opera 40, safari 10, firefox 59, and edge 79. slots are identified by their name attribute, and allow you to d...
...ailable since chrome 53, opera 40, safari 10, firefox 59, and edge 79. slots are identified by their name attribute, and allow you to define placeholders in your template that can be filled with any markup fragment you want when the element is used in the markup. so, if we want to add a slot into our trivial example, we could update our template's paragraph element like this: <p><slot name="my-
text">my default
text</slot></p> if the slot's content isn't defined when the element is included in the markup, or if the browser doesn't support slots, <my-paragraph> just contains the fallback content "my default
text". to define the slot's content, we include an html structure inside the <my-paragraph> element with a slot attribute whose value is equal to the name of the slot we want it to fill...
...uded in the markup, or if the browser doesn't support slots, <my-paragraph> just contains the fallback content "my default
text". to define the slot's content, we include an html structure inside the <my-paragraph> element with a slot attribute whose value is equal to the name of the slot we want it to fill. as before, this can be anything you like, for example: <my-paragraph> <span slot="my-
text">let's have some different
text!</span> </my-paragraph> or <my-paragraph> <ul slot="my-
text"> <li>let's have some different
text!</li> <li>in a list!</li> </ul> </my-paragraph> note: elements that can be inserted into slots are known as slotable; when an element has been inserted in a slot, it is said to be slotted. note: an unnamed <slot> will be filled with all of the custom...
... and that's it for our trivial example. if you want to play with it some more, you can find it on github (see it running live also). a more involved example to finish off the article, let's look at something a little less trivial. ...
XPath snippets - XPath
of document.evaluate() for cases when it is not required as well as the need to use the special iterators on xpathresult (by returning an array instead). ...
...s the need to use the special iterators on xpathresult (by returning an array instead). ...
... to use the special iterators on xpathresult (by returning an array instead). ...
...ead). example: defining a simple docevaluatearray() utility function // example usage: // var els = docevaluatearray('//a'); // alert(els[0].nodename); // gives 'a' in html document with at least one link function docevaluatearray (expr, doc, con
text, resolver) { var i, result, a = []; doc = doc || (con
text ? con
text.ownerdocument : document); resolver = resolver || null; con
text = con
text || doc; result = doc.evaluate(expr, con
text, resolver, xpathresult.ordered_node_snapshot_type, null); for(i = 0; i < result.snapshotlength; i++) { a[i] = result.snapshotitem(i); } return a; } getxpathforelement the following function allows one to pass an element and an xml document to find a unique string xpath expression leading back to that element. exam...
Index - XSLT: Extensible Stylesheet Language Transformations
1 xslt: extensible stylesheet language transformations landing, web, xslt extensible stylesheet language transformations (xslt) is an xml-based language used, in conjunction with specialized processing software, for the transformation of xml documents. 2 common xslt errors xslt your server needs to send both the source and the stylesheet with a xml mime type,
text/xml or application/xml. to find out the current type, load the file in mozilla and look at the page info. or use a download tool, those usually tell the mime type. 3 index index, reference, xslt found 54 pages: 4 pi parameters xslt no summary! 5 the xslt/javascript interface in gecko xslt no summary! 6 advanced example ...
...> element invokes a named template. 25 <xsl:choose> element, reference, xslt, choose the <xsl:choose> element defines a choice among a number of alternatives. it behaves like a switch statement in procedural languages. 26 <xsl:comment> comment, element, reference, xslt the <xsl:comment> element writes a comment to the output document. it must include only
text. 27 <xsl:copy-of> element, reference, xslt, copy-of the <xsl:copy-of> element makes a deep copy (including descendant nodes) of whatever the select attribute specifies to the output document. 28 <xsl:copy> element, reference, xslt, copy the <xsl:copy> element transfers a shallow copy (the node and any associated namespace node) of the current node to the ...
...on that should be taken when none of the <xsl:when> conditions apply. it is similar to the else or default case in other programing languages. 41 <xsl:output> element, reference, xslt, output the <xsl:output> element controls the characteristics of the output document. to function correctly in netscape, this element, with the method attribute, must be used. as of 7.0, method="
text" works as expected. 42 <xsl:param> element, reference, xslt, param the <xsl:param> element establishes a parameter by name and, optionally, a default value for that parameter. when used as a top-level element, the parameter is global . when used inside an <xsl:template> element, the parameter is local to that template. in this case it must be the first child element of the te...
...t> element, reference, stylesheet, xslt the <xsl:stylesheet> element (or the equivalent <xsl:transform> element) is the outermost element of a stylesheet. 48 <xsl:template> element, reference, template, xslt the <xsl:template> element defines an output producing template. this element must have either the match attribute or the name attribute set. 49 <xsl:
text> element, reference,
text, xslt the <xsl:
text> element writes literal
text to the output tree. it may contain #pcdata, literal
text, and entity references. 50 <xsl:transform> element, reference, xslt, transform the <xsl:transform> element is exactly equivalent to the <xsl:stylesheet> element. 51 <xsl:value-of> element, reference, xslt, value-of ...
An Overview - XSLT: Extensible Stylesheet Language Transformations
nding on the parser and the processor. :netscape's uses a structure similar to the w3c dom as its tree structure, but others are possible. the only requirements concern the disposition of objects in the tree, their properties, and their relationships. the tree consists of a hierarchical framework of nodes. it can be made up of seven different types of nodes: the single root node, element nodes,
text nodes, attribute nodes, comment nodes, processing instruction nodes, and namespace nodes. at the top of the tree is the root node. the root node does not correspond to any individual part of the xml document: it represents the document as whole. below the root node are its children, which can be elements, comments, processing instructions and so on. some of those children may also have children...
... node. the root node does not correspond to any individual part of the xml document: it represents the document as whole. below the root node are its children, which can be elements, comments, processing instructions and so on. some of those children may also have children. and this can continue for several levels. there are certain constraints on which type of nodes can occur where: for example,
text nodes can have no children. the result of the processor's action is also a tree. netscape uses this tree to render the contents in the browser window. xslt is a high-level declarative language. in essence, an xslt stylesheet is a set of rules, called templates, which declare that any node that matches this specific pattern should be manipulated in this specific way and end up in this specif...
...guaranteed, xslt does not support any functionality that produces side-effects. in this it is like lisp or scheme. locations on the tree are specified using xpath, another w3c recommendation. transformations depend on the processor's being able to pinpoint individual nodes on the tree. to facilitate this, the w3c decided to use a separate language, xpath, which also has uses outside the xslt con
text. as its name implies, xpath defines a "path" the processor must take through the tree to arrive at the desired node. this path consists of xpath-specific expressions to be evaluated, expressions which may include a number of conditions to be matched, a way of associating nodes, and/or an indication of directionality within the tree. a fuller description of the parts of xpath most commonly used in...
...a processing instruction. the simplest way to indicate which xslt stylesheet should be used to process a particular xml document is to include a processing instruction in the xml document itself. for example, if the stylesheet is called inventory.xsl and resides in the same directory as the xml document, the processing instruction in the xml document would look like this: <?xml-stylesheet type="
text/xml" href="inventory.xsl"?> this must be placed in the prolog section of the xml document. to learn more about xslt and xpath, see the for further reading section at the end of this article. ...
Interacting with page scripts - Archive of obsolete content
object defined by content script console.log(window.contentscriptobject.greeting); // "hello from add-on" }, false); after firefox 30, you can still do this for primitive values, but can no longer do it for objects. instead, you need to use the global cloneinto() function to clone the object into the page script's scope. cloneinto() creates a structured clone of the object in the target con
text, and returns a reference to the clone. you can then assign that to a property of the target window, and the page script can access it. here's an example. the "main.js" opens the local file "page.html" and attaches a content script to it: // main.js var tabs = require("sdk/tabs"); var self = require("sdk/self"); tabs.open({ url: self.data.url("page.html"), onready: attachscript }); funct...
... "page.html" and attaches a content script to it: // main.js var tabs = require("sdk/tabs"); var self = require("sdk/self"); tabs.open({ url: self.data.url("page.html"), onready: attachscript }); function attachscript(tab) { tab.attach({ contentscriptfile: self.data.url("content-script.js") }); } the content script defines a function greetme() and exports it to the page script con
text. note that the function's closure will be exported, too: // content-script.js var salutation = "hello, "; function greetme(user) { return salutation + user; } exportfunction(greetme, unsafewindow, {defineas: "greetme"}); finally, the "page.html" file adds a button and a page script that calls the exported function when the user pushes the button: <html> <head> </head> <body> <in...
...elf.data.url("page.html") var pagemod = mod.pagemod({ include: pageurl, contentscriptfile: self.data.url("content-script.js"), contentscriptwhen: "ready" }) tabs.open(pageurl); the target web page "page.html" includes a button and a page script: <html> <head> <meta charset="utf-8"> </head> <body> <input id="message" type="button" value="send a message"/> <script type="
text/javascript" src="page-script.js"></script> </body> </html> the content script "content-script.js" adds an event listener to the button, that sends a custom event containing a message: var messenger = document.getelementbyid("message"); messenger.addeventlistener("click", sendcustomevent, false); function sendcustomevent() { var greeting = {"greeting" : "hello world"}; var event = new cus...
High-Level APIs - Archive of obsolete content
the web, and interacting with the browser. unless the documentation explicitly says otherwise, all these modules are "stable": we'll avoid making incompatible changes to them. addon-page create a page that does not contain navigational elements. base64 data encoding and decoding using base64 algorithms. clipboard interact with the system clipboard, setting and getting its contents. ...
...xplicitly says otherwise, all these modules are "stable": we'll avoid making incompatible changes to them. addon-page create a page that does not contain navigational elements. base64 data encoding and decoding using base64 algorithms. clipboard interact with the system clipboard, setting and getting its contents. con
text-menu adds items, submenus, and menu separators to the page's con
text menu. hotkeys assign hotkey combinations to functions in your add-on. indexed-db exposes the indexeddb api to add-ons. l10n localize strings appearing in the add-on's javascript code. notifications display transient, toaster-style desktop messages to the user. page-mod run scripts in the con
text of web pages whose url matches a given pattern. page-worker create a permanent, invisible ...
...ent dialogs to implement part of an add-on's user interface. passwords interact with firefox's password manager to add, retrieve and remove stored credentials. private-browsing check whether a given object is private, so an add-on can respect private browsing querystring utility functions for working with query strings. request make simple network requests. selection get and set
text and html selections in the current web page. self access data that is bundled with the add-on, and add-on metadata. simple-prefs store preferences across application restarts. simple-storage lets an add-on store data so that it's retained across firefox restarts. system query the add-on's environment and access arguments passed to it. tabs open, manipulate, and access tabs, and receive ...
dev/panel - Archive of obsolete content
{ this.postmessage("message from the add-on"); } }); // export the constructor exports.mypanel = mypanel; // create a new tool, initialized // with the new constructor const mytool = new tool({ panels: { mypanel: mypanel } }); in the panel document script: // my-panel.js window.addeventlistener("message", function(event) { var content = document.getelementbyid("content"); content.
textcontent = event.data; }); note that at the moment you have to pass an array of ports into postmessage, even if you don't need to use them: // main.js // require the sdk modules const { panel } = require("dev/panel"); const { tool } = require("dev/toolbox"); const { class } = require("sdk/core/heritage"); const mypanel = class({ extends: panel, label: "my panel", tooltip: "my new devtool...
... volcan.js: a javascript api for the debugging protocol communicating with the debugger server by exchanging json messages can be cumbersome. so we've also provided a library ca...
...cript that uses volcan.js to get the selected tab and display its url: // my-panel.js var content = document.getelementbyid("content"); window.addeventlistener("message", function(event) { var debuggee = event.ports[0]; volcan.connect(debuggee). then(listtabs). then(writetablist); }); function listtabs(root) { return root.listtabs(); } function writetablist(tablist) { content.
textcontent = tablist.tabs[tablist.selected].url; } we don't have detailed documentation for volcan.js, but it's coming soon. in the meantime, here's a quick guide. connecting volcan.js provides a global connect() function that takes a messageport connected to the debugger server, and returns a promise which is fulfilled with an object representing the root actor: volcan.connect(debuggee).then(got...
ui/sidebar - Archive of obsolete content
write the above code like this: var sidebar = require("sdk/ui/sidebar").sidebar({ id: 'my-sidebar', title: 'my sidebar', url: "./sidebar.html" }); you can include javascript and css from the html as you would with any web page, for example using <script> and <link> tags containing a path relative to the html file itself. <!doctype html> <html> <head> <link href="stuff.css" type="
text/css" rel="stylesheet"> </head> <body> <script type="
text/javascript" src="stuff.js"></script> </body> </html> you can update the sidebar's content by setting the sidebar's url property. this will change the sidebar's content across all windows. communicating with sidebar scripts you can't directly access your sidebar's content from your main add-on code, but you can send messages be...
...idebar script right away: however, you can start listening to messages from the script. here's a simple but complete add-on that shows how to set up communication between main.js and a script in a sidebar, in the case where the sidebar script initiates communication: the html file includes just a script, "sidebar.js": <!doctype html> <html> <body> content for my sidebar <script type="
text/javascript" src="sidebar.js"></script> </body> </html> the "sidebar.js" file sends a ping message to main.js using port.emit() as soon as it loads, and adds a listener to the pong message. addon.port.emit("ping"); addon.port.on("pong", function() { console.log("sidebar script got the reply"); }); the "main.js" file creates a sidebar object and adds a listener to its attach event. on atta...
... they will not be lost. listen to this event if your add-on initiates the conversation. here's a simple but complete add-on that shows how to set up communication between main.js and a script in a sidebar, in the case where the main.js script initiates communication: the html file includes just a script, "sidebar.js": <!doctype html> <html> <body> content for my sidebar <script type="
text/javascript" src="sidebar.js"></script> </body> </html> the "sidebar.js" file listens to the ping message from main.js, and responds with a pong message. addon.port.on("ping", function() { console.log("sidebar script got the message"); addon.port.emit("pong"); }); the "main.js" file creates a sidebar object and adds a listener to its attach event. on attach, "main.js" sends the ping mess...
Release notes - Archive of obsolete content
removed isprivatebrowsing from browserwindow. details github commits made between firefox 34 and firefox 35. this will not include any uplifts made after this release entered aurora. bugs fixed between firefox 34 and firefox 35. this will not include any uplifts made after this release entered aurora. firefox 34 highlights new api: dev/panel enables you to extend the firefox developer tools. jpm beta released. "./my-file" introduced everywhere as an alias for require("sdk/self").data.url("my-file") added the ability to attach stylesheets to individual tabs. details github commits made between firefox 33 and firefox 34. ...
...dk/self").data.url("my-file") added the ability to attach stylesheets to individual tabs. details github commits made between firefox 33 and firefox 34. this will not include any uplifts made after this release entered aurora. bugs fixed between firefox 33 and firefox 34. this will not include any uplifts made after this release entered aurora. firefox 33 highlights added support for con
text menus in panels via a new option in the panel constructor. added tab.readystate. added a browserwindow parameter to sidebar.show() and sidebar.hide(), to control the window for which the sidebar will be shown or hidden. details github commits made between firefox 32 and firefox 33. this will not include any uplifts made after this release entered aurora. bugs fixed between firefox 32 and fi...
...and firefox 30. this will not include any uplifts made after this release entered aurora. bugs fixed between firefox 29 and firefox 30. this will not include any uplifts made after this release entered aurora. firefox 29 highlights added new ui modules for australis: actionbutton, togglebutton, frame and toolbar. made the preferences branch for simple-prefs configurable. added predicatecon
text to sdk/con
text-menu. deprecated widget in favor of the new ui modules. removed tab-browser, app-strings and api-utils.publicconstructor details github commits made between firefox 28 and firefox 29. this will not include any uplifts made after this release entered aurora. bugs fixed between firefox 28 and firefox 29. this will not include any uplifts made after this release entered aurora. ...
Developing for Firefox Mobile - Archive of obsolete content
on.xpi the browser should open the xpi and ask if you want to install it. afterwards you can delete it using adb as follows: adb shell cd /mnt/sdcard rm my-addon.xpi module compatibility modules not supported in firefox mobile are marked in the tables below. ...
... self supported simple-prefs supported simple-storage supported system supported tabs supported timers supported ui not supported url supported widget not supported windows supported low-level apis /loader supported chrome supported console/plain-
text supported console/traceback supported content/content supported content/loader supported content/mod supported content/worker supported core/heritage supported core/namespace supported core/promise supported event/core supported event/target supported frame/hidden-fr...
... content/mod supported content/worker supported core/heritage supported core/namespace supported core/promise supported event/core supported event/target supported frame/hidden-frame supported frame/utils supported io/byte-streams supported io/file supported io/
text-streams supported lang/functional supported lang/type supported loader/cuddlefish supported loader/sandbox supported net/url supported net/xhr supported places/bookmarks not supported places/favicon not supported places/history not supported platform/xpcom supported ...
Boxes - Archive of obsolete content
a div as a container and when the div changes size, the contents will wrap or adjust the layout. this does not happen with xul box (or hbox and vbox) by default. however, you can easily add this capability with a style change. ...
...ue="ttt"/> <label value="uuu"/> <label value="vvv"/> <label value="www"/> <label value="xxx"/> <label value="yyy"/> <label value="zzz"/> </hbox> </window> images if you put image in the contents, you should probably add align="start" attribute to the box. ...
... you should probably add align="start" attribute to the box. ...
Dialogs and Prompts - Archive of obsolete content
r keyboard accessibility. add ok and cancel buttons in an order that is consistent with os default (but the button set and layout is highly customizable, see below). simple dialog code the following xul code defines a simple dialog with two buttons, ok and cancel (buttons="accept,cancel" attribute on dialog). <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="
text/css"?> <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="..." title="..." buttons="accept,cancel" ondialogaccept="return onaccept();" ondialogcancel="return oncancel();"> <script src="chrome://..."/> <!-- content --> </dialog> you need to implement onaccept and oncancel functions in your script. if they return anything but false, the dialog will be closed.
...d values for dlgtype are the six button types listed above. be sure to use ondialog* attributes on dialog element instead of putting oncommand on the button with dlgtype, because button's oncommand is executed only when the button is pressed, and ondialog* handlers are executed for keyboard and other events too. ...
...aster/gatekeeper/there.is.only.xul" id="mydialogid" title="my dialog" ondialogaccept="return onok();" onload="onload();" persist="screenx screeny width height" windowtype="mydialogwindowtype"> <script type="application/javascript" src="chrome://myext/content/mydialog.js"/> <grid> <columns><column/><column/></columns> <rows> <row align="center"><label value="name:"/><
textbox id="name"/></row> <row align="center"><label value="description:"/><
textbox id="description"/></row> <row align="center"><spacer/><checkbox id="enabled" label="check to enable"/></row> </rows> </grid> </dialog> mydialog.js: // called once when the dialog displays function onload() { // use the arguments passed to us by the caller document.getelementbyid("name").value =...
Drag & Drop - Archive of obsolete content
ue); here, elem could be a window or an xul element. ...
...mponents.interfaces.nsiioservice); var uris = new array(); // if sourcenode is not null, then the drop was from inside the application if (dragsession.sourcenode) return; // setup a transfer item to retrieve the file data var trans = components.classes["@mozilla.org/widget/transferable;1"].createinstance(components.interfaces.nsitransferable); trans.adddataflavor("
text/x-moz-url"); trans.adddataflavor("application/x-moz-file"); for (var i=0; i<dragsession.numdropitems; i++) { var uri = null; dragsession.getdata(trans, i); var flavor = {}, data = {}, length = {}; trans.getanytransferdata(flavor, data, length); if (data) { try { var str = data.value.queryinterface(components.interfaces.nsisupportsstring); ...
...if the file types are present in the drag data, the function returns that dropping the data is allowed. the _dragdrop function retrieves the file uri data from the drag session and creates an array of file uris that the xul application can use. ...
File I/O - Archive of obsolete content
// open an input stream from file var istream = components.classes["@mozilla.org/network/file-input-stream;1"]. createinstance(components.interfaces.nsifileinputstream); istream.init(file, 0x01, 0444, 0); istream.queryinterface(components.interfaces.nsilineinputstream); // re...
.../ you can use another encoding here if you wish let (str = {}) { let read = 0; do { read = cstream.readstring(0xffffffff, str); // read as much as we can and put it in str.value data += str.value; } while (read != 0); } cstream.close(); // this closes fstream alert(data); reading line by line note: the sample code below does not handle
text with non-ascii characters. see reading
textual data details on how to read
text from other character sets. // open an input stream from file var istream = components.classes["@mozilla.org/network/file-input-stream;1"]. createinstance(components.interfaces.nsifileinputstream); istream.init(file, 0x01, 0444, 0); istream.queryinterface(components.interfaces.nsilineinputstream); // read lines into array var line = {}, lines = [...
...k/file-output-stream;1"]. createinstance(components.interfaces.nsifileoutputstream); // use 0x02 | 0x10 to open file for appending. fostream.init(file, 0x02 | 0x08 | 0x20, 0666, 0); // write, create, truncate // in a c file operation, we have no need to set file mode with or operation, // directly using "r" or "w" usually. // if you are sure there will never ever be any non-ascii
text in data you can // also call fostream.write(data, data.length) directly var converter = components.classes["@mozilla.org/intl/converter-output-stream;1"]. createinstance(components.interfaces.nsiconverteroutputstream); converter.init(fostream, "utf-8", 0, 0); converter.writestring(data); converter.close(); // this closes fostream note: the file status flags used in the nsifileou...
HTML in XUL for rich tooltips - Archive of obsolete content
this example demonstrates the dynamic injection of html into a xul element. specifically, we create a rich tooltip that uses html instead of plain
text. dynamic html in xul tooltip insert the appropriate code from below into your xul overlay. ...
...l overlay. ...
...nt assigned to each element that you wish to have a rich tooltip with. you should write the html straight into the xul. ...
Install Manifests - Archive of obsolete content
y repackage your add-on and correct or reject malformed version strings. optional property reference you may need to supply these properties, depending on the capabilities of your add-on. abouturl the chrome:// url of the extension's about dialog box. this is only useful to extensions. if this property is specified, in the about:addons extensions list, the about... link in the extension's con
text menu will show this dialog, rather than the default. note: as of gecko 2.0, the dialog receives the addon object representing your add-on as a parameter. examples <em:abouturl>chrome://myext/content/about.xul</em:abouturl> bootstrap a boolean value that tells the application whether the extension is boot-strappable. at the moment this only works for add-ons with em:type="2". the default va...
...em:contributor> <em:contributor>elvis presley</em:contributor> creator the name of the creator/principal developer - intended for display in the user interface. examples <em:creator>john doe</em:creator> or <em:creator>coolextension team</em:creator> description a short description of the add-on - intended for display in the user interface. this description should fit on one short line of
text. examples <em:description>advanced foo tools.</em:description> developer the name(s) of co-developers. you may specify more than one of this value to specify multiple developers. examples <em:developer>jane doe</em:developer> <em:developer>koos van der merwe</em:developer> hasembeddedwebextension if present and given the value "true", this indicates that this add-on contains an embedded w...
... malicious update.rdf file, enabling malware to infiltrate the user's computer. alternatively, you could host your extension on amo and leave out the updateurl completely. this provides secure updates automatically. for security reasons, gecko 1.9 applications require that if you specify an updateurl, it must be an https url, or you must include an updatekey. your server must send this file as
text/rdf,
text/xml or application/rdf+xml or the update checker may not work. the add-on manager will substitute the following values into this url in case you wish to generate the response rdf dynamically, such as using php or cgi: %req_version% the version of the request. currently 1 %item_id% the id of the add-on being updated %item_version% the version of the ...
Appendix: What you should know about open-source software licenses - Archive of obsolete content
shed under a dual license: gpl and a commercial license. oss license can duplicate can distribute can modify commercial license install on one machine only unauthorized copies prohibited no modifications payment required certain uses are permitted depending on which license you choose english version is the official
text nearly all oss licenses take english as their official
texts. japanese versions, for example, are mentioned only as reference translations. thanks to the internet, published source code can be used all over the world, so the language that the most people will be able to understand is chosen as the language for the license (although this may reflect a western bias). applying an oss license in t...
...cipating in open-source projects. circumstances of application first i’ll explain what kind of license to use depending on whether you are modifying existing oss source code or writing original software. check the license if you are working from existing code, first check its license. if you have the source code at hand, open it and take a look. almost all module files will give the license
text or license declaration at the top. source code using modified bsd or mpl will give the
text of the license at the top; if it’s gpl or lgpl, there will be a license declaration. the full
text of the license should also appear packaged in the same archive as the source code. if you’ve modified existing source code if you are modifying existing source code, you need to judge whether or not to ...
...n the january 2007 edition of softbank’s open source magazine.) if a company is considering releasing its own software as open source, it should consider dual-licensing or the cpl. applying a license to original works if you want to release your own code as open-source, here’s what you do next. insert the license declaration in the top of every file in your source code; include the full
text of the license in your source-code archive; place the source code on a website or otherwise make it accessible; tell all your friends. if you are using the modified bsd license or mpl, place the full
text in the top, not just the license declaration. if you are using the gpl or lgpl, use the declaration at the end of the license’s full
text as a template and insert that. see below. gpl lic...
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
open windows:quicknote.xul:files on the top-left of the screen. double-click on quicknote.js to open it in source-code view (figure 2). fixme: figure 2: selecting source code inserting breakpoints now you’ll want to set some breakpoints. try inserting one within the quicknote_savenote function, around line 345 (figure 3). fixme: figure 3: inserting a breakpoint start debugger type in some
text into the quicknote screen, and then select save current tab from the menu. this should halt the program at the spot where you inserted the breakpoint with venkman, and start the debugger. the local variables screen should always display variables and objects during step-by-step execution. with functions that include a lot of variables, this will be hard to read, so you can point out specific var...
...ion(func) { // correct pop order b = this.pop(); a = this.pop(); this.push(func(a, b)); }, understanding source code in the open-source community, you can learn a lot about how software works by studying its source code; with a massive project like firefox, people typically use special source-code browsing tools to make sense of it. mozilla cross-reference mozilla cross-reference is a full-
text searchable source-code listing hosted at mozilla.org. we’re going to use mxr (http://mxr.mozilla.org), a linux source-code browser. getting started visit this url: http://mxr.mozilla.org . in the left-hand sidebar, you should see a link to a search starting point and a search form (figure 5). fixme: figure 5: mxr.mozilla.org usage what am i looking for? if you just start poking through th...
...king at initwithpath, we can see how the path-validation process works. conclusion in this chapter, we looked at some tools beyond the introductory level. if you had any “aha!” moments while reading this, then i hope you’ll take the next step and actually put them to work. i hope you’ll find that this chapter helps make you a more effective extension developer. gonzui gonzui is a full-
text source-code search engine from satoru takabayashi, the well-known developer of the namazu search engine software. fixme: not sure we should talk about this tool installation windows users can take advantage of a self-contained version created by soutaro matsumoto called “gonzui for win32” http://soutaro.com/gonzui-win32/ run it as follows: download gonzui-win32-1.2.2.zip and expand it ...
Adding sidebars - Archive of obsolete content
n different circumstances. for instance, you could have a window that is used for two different purposes, and the only difference between the two cases is a label that has a value in one case and something else in another. using a .properties file and a string bundle is a viable option, but it involves a lot of code for something so simple, specially if that's the only case where you need dynamic
text. the alternative is to use a deck with the two labels, and change the selected index depending on the purpose of the window. this way you can still use dtd, and the code remains simple. a stack is like a deck, except that all of its children are always on display, one of top of the other. it allows you to decompose complex ui into individual layers, broadening the layout possibilities. one commo...
...we would use data from a datasource such as a database or a remote api. this tree is not much of a tree because it only has one level of depth. a more elaborate tree would look like this: <tree flex="1"> <treecols> <treecol label="&xulschoolhello.namecolumn.label;" flex="1" /> <treecol labe...
...m> <treerow> <treecell label="peter" /> <treecell label="hey, what's up?" /> </treerow> </treeitem> <treeitem> <treerow> <treecell label="john"/> <treecell label="good evening, how are you doing?" /> </treerow> </treeitem> </treechildren> </tree> the
text in the rows of the tree is hardcoded because we wouldn't generally use
text from locale files. we would use data from a datasource such as a database or a remote api. this tree is not much of a tree because it only has one level of depth. a more elaborate tree would look like this: <tree flex="1"> <treecols> <treecol label="&xulschoolhello.namecolumn.label;" flex="1" /> <treecol label="&xulschoolhello.greetingcolumn.label;" flex="3" /> </treecols> <treec...
Custom XUL Elements with XBL - Archive of obsolete content
e applied to any xml language. xbl was submitted to the w3c for standardization, but for now it's used in xul almost exclusively. with xbl you can define new elements and define their properties, attributes, methods and event handlers. many complex elements such as tabs, buttons and input controls are implemented using xbl and simpler xul elements. as explained earlier, xul is really just boxes,
text and images. we'll look into xbl using a modified version of the hello world extension. download the hello world xbl project, build it and test it for a while. you should see a new item in the hello world menu, that opens a binding test window where you can add "persons" to a list. xbl basics in order to create an xbl binding you'll need 2 files: the xbl file and a css file that binds an elemen...
...here are a couple of important things to notice: the "xul:" namespace must be used for all xul tags you have in your content. the xbl:inherits attribute lets your inner xul use the attributes that are set on the node. so, if you have this: <xshelloperson name="pete" greeting="good morning" image="" />, then those attribute values are "inherited" to the content nodes that h...
...ref.fieldname just like with js objects, all fields are publicly accessible, and we use a "_" to indicate a field is "private". a property is a little more robust. it is defined using a getter and setter method, allowing read-only and write-only properties, as well as more complex behavior. there are two properties defined in our binding, which are just meant for easier access to the two
text attributes in the element. we use the shorthand version of the property tag: <property name="name" onget="return this.getattribute('name');" onset="this.setattribute('name', val);" /> there's a less compact version of the property tag that should be used if the getter or setter code involves more than one line of code: <property name="name"> <getter><![cdata[ return this.getattri...
Intercepting Page Loads - Archive of obsolete content
ents.results.ns_binding_aborted); } } } this example shows how you can obtain the url for the request, analyze it using regular expressions, and perform actions on it such as modifying http headers, or even canceling the request. http observers are great for load detection, and filtering by url. you can also use these in conjunction with nsitraceablechannel to get and modify the response
text before it gets to the original requester. you won't be able to make dom modifications like with the load events, since these notifications are triggered before the response arrives and is parsed into dom tree, so this is not the best approach for the typical greasemonkey-style extensions. notes on usage: efficiency is very important when adding http observers. remember that your observe method...
...using the nsicategorymanager. the nsicontentpolicy.shouldload() method is the only one in this interface that is really useful. it actually allows for cleaner-looking code than most of the previously seen solutions, because you get the content uri directly as an argument, and you indicate if the content should be loaded or not with the return value, which has well-defined possible values. the con
text parameter gives you access to the window loading the content. as with all other solutions, you need to be efficient, and a good way to do this is to filter out unneeded cases right from the start. shouldload is called for every load operation firefox tries to do, including images, scripts and xul documents. a good filter would look like this: shouldload : function(acontenttype, acontentlocation...
...ccess to the window loading the content. as with all other solutions, you need to be efficient, and a good way to do this is to filter out unneeded cases right from the start. shouldload is called for every load operation firefox tries to do, including images, scripts and xul documents. a good filter would look like this: shouldload : function(acontenttype, acontentlocation, arequestorigin, acon
text, amimetypeguess, aextra) { let result = components.interfaces.nsicontentpolicy.accept; // we should check for type_subdocument as well if we want frames. if ((components.interfaces.nsicontentpolicy.type_document == acontenttype) && some_regular_expression.test(acontentlocation.spec)) { // do stuff here, possibly changing result. } return result; } the content policy is app...
Security best practices in extensions - Archive of obsolete content
call back into the web browser and run malicious code. the main way to do this is by creating an iframe or browser element in the sidebar, and loading your content there. give the element a type="content" attribute, which essentially sandboxes the code there and blocks callback rights into chrome. using eval() in an extension using the built-in javascript eval function is frowned upon in the con
text of extensions. while there are some legitimate use-cases, most of the time there are safer alternatives. this blog post offers some excellent reasons not to use eval(). sandboxed http connections the main purpose of sandboxed http connections is to interact with a web service, without interfering with the cookies set in the browser by that service/site. for example, if you are loading pictures ...
...vices. be sure to read using native json to find out the correct way to handle it. apis can't be used with self-signed certificates. remote javascript and content there are a number of ways of remote scripts being used in extensions. they can be included in content, or downloaded at intervals. non-chrome urls in chrome xul or html such as the following example are not allowed: <script type="
text/javascript" src="http://mysite.greatsite.com/js/wow-content.js" /> in general, scripts that are from remote sources that run in the chrome con
text are not acceptable, as many times the source of the script can never be 100% guaranteed, and they are vulnerable to man-in-the-middle attacks. the only legitimate environment for remote scripts is to run in a sandbox. for more information, refer to th...
...ndbox. for more information, refer to the evalinsandbox() section. evalinsandbox the evalinsandbox document explains very well how it works, so there will be no repetition here. the usefulness of it and power of how it works is best illustrated by the popular greasemonkey extension, which works on the premise of scripts being downloaded and stored locally, to be injected into the web content con
text via the sandbox. many extensions use the greasemonkey compiler to bundle it in their extension for convenience. if you choose to do so, beware when making edits to the bundled files so as not to break the well thought out security architecture. third-party javascript in the con
text of web sites, using javascript written by others is very common. it is not unheard of in add-ons as well, and can ...
Setting up an extension development environment - Archive of obsolete content
ascript.options.strict = true. enables strict javascript warnings in the error console. note that since many people have this setting turned off when developing, you will see lots of warnings for problems with their code in addition to warnings for your own extension. you can filter those with console2. devtools.chrome.enabled = true. this enables to run javascript code snippets in the chrome con
text of the scratchpad from the tools menu. don't forget to switch from content to browser as con
text. devtools.debugger.remote-enabled = true. this adds a "browser debugger" entry to the "web developer" submenu of the "tools" menu. the browser debugger can be used to debug the javascript code of extensions. the devtools.chrome.enabled preference must also be set to true for the browser debugger to ...
... chrome list navigate and view files in chrome:// (firefox version, thunderbird version) chrome edit plus a user file editor (firefox and thunderbird) firebug a variety of development tools (firefox) pentadactyl, a general purpose extension with builtin tools for extension development, including a command line with chrome javascript...
...'s extension a suite of tools for extension development (firefox) extension test an add-on which makes it easier to detect problems which will lead to rejection by addons.mozilla.org console² enhanced javascript console (firefox version, thunderbird version) javascript command for writing/testing javascript on firefox windows inspect con
text open dom inspector at this node from inspect on con
text menu. chrome list navigate and view files in chrome:// (firefox version, thunderbird version) chrome edit plus a user file editor (firefox and thunderbird) firebug a variety of development tools (firefox) pentadactyl, a general purpose extension with builtin tools for extension development, including a command line with chrome javascript evaluation (including property and function argument co...
Signing an XPI - Archive of obsolete content
nerate a new private key and code signing request (csr) in the background without you necessarily realising it. the csr will be uploaded to the issuer. later, you must use the same browser when installing the new certificate because the key and certificate pair must be together. hint: when applying for a certificate ensure that the organisation (o) contains your name and not the issuer's default
text, because this is what is displayed to users. for this guide i applied for a free certificate from unizeto certum. after completing the application process where i entered my details into the online application, i received an automated email requesting documentary evidence of my id in the form of a photo-id or similar. i have hi-resolution scanned images of my passport and drivers license for the...
...web-server temporarily in a hidden location and emailed unizeto certum with the details and location of the files. within a few hours i received a confirmation email from a human accepting the id images and giving me a hyperlink to the certifcate download area. install the certificate into mozilla firefox (which goes with the private key created earlier), and copy/paste the displayed certificate
text into a new file called c:\projects\codesigning\certum code signing.cer. installing real certificate there are two steps required to install the new certificate in the code signing nss certificate database. 1. install the issuer's certificate authority root 2. install your key and certificate the root ca establishes the trust of your certificate. many issuer's have multiple root cas for dif...
... by common name (unizeto certum's free certificate ca is certum level iii ca). download the root ca and any intermediate certificates used to sign your certificate from the issuer; their web site will have a link somewhere to their root cas and public certificates. (certum public key page). i downloaded the certum root ca and certum level iii ca digital id for web and ssl/tls servers, copied the
text and saved them to the files c:\projects\codesigning\certum root ca.cer and c:\projects\codesigning\certum level iii ca.cer. open a command prompt (ensure the paths to the nss tools are set as described above) in the codesigning folder, install the issuer ca certificates, and check they have been added correctly. c:\projects\codesigning> certutil -a -n "certum root ca" -t "tc,tc,tc" -d . -i "cer...
Promises - Archive of obsolete content
it is also available for use off-main-thread in workers as a synchronous api. this interface replaces the previous, complicated xpcom nsifile and streams apis, and their related javascript helper modules. these older interfaces should be avoided, even in their asynchronous forms, due to their performance penalties and needless complexity. representative example usage componen...
...append("id", data.id); form.append("content", data.content); // make the second request. resp = yield new promise((resolve, reject) => { let xhr = new xmlhttprequest; xhr.onload = resolve; xhr.onerror = reject; xhr.open("post", updateurl); xhr.send(form); }); // use the response of the second request. notifyuser(resp.target.response
text); }); example using promise-based helper the following example relies on the helper function defined below. task.spawn(function* () { // make the initial request. let xhr = yield request(dataurl, { responsetype: "json" }); let data = xhr.response; // use the response to construct form data object for the // second request. let form = new formdata; form.append("id"...
...onsetype: "json" }); let data = xhr.response; // use the response to construct form data object for the // second request. let form = new formdata; form.append("id", data.id); form.append("content", data.content); // make the second request. xhr = yield request(updateurl, { data: form }); // use the response of the second request. notifyuser(xhr.response
text); }); downloading remote files nearly all previous methods of downloading remote files have been superseded by the much simpler downloads.jsm module. the downloads object provides a promise-based api for downloading remote files, with full support for progress tracking, pause and resume, and, optionally, integration with the download manager ui. representative example usage components.utils.i...
Search Extension Tutorial (Draft) - Archive of obsolete content
the following file, for instance, would change the default keyword search engine, assuming that an engine with the name example engine is installed, as described below: // this is a localizable preference, so it must contain a url which // points at a properties file containing the preference name as a // property. we use a data: url for simplicity. pref("browser.search.defaultenginename", "data:
text/plain,browser.search.defaultenginename=example engine"); in the case or restartless extensions, the preferences need to be changed manually, and reverted when the extension is disabled if they have not been changed in the meantime. while changes to default preference values will not persist across sessions, restartless extensions must nevertheless restore them for the balance of the session after...
...tbranch(""); // save the original values. var savedprefs = {} // change the default value of the preference *name* to *value*. // a default for this preference must exist, and it must be a // character preference. function setpref(name, value, localized) { // if this is a localized preference, transform the value into an // appropriate data: url. if (localized) value = "data:
text/plain," + encodeuricomponent(name + "=" + value.replace(/ /g, "\\u0020")); // save the original and new values. savedprefs[name] = [defaultprefs.getcharpref(name), value]; // change the default defaultprefs.setcharpref(name, value); // clear the user value if this is the first run, or the // new default is the same as the user value. if (firstrun || userprefs.getcha...
...<shortname>example engine</shortname> <description>example search engine</description> <inputencoding>utf-8</inputencoding> <image width="16" height="16" type="image/png">data:image/png;base64, ... ...
Creating reusable content with CSS and XBL - Archive of obsolete content
arkup languages and css is not ideal for complex applications where parts need to be self-contained and reusable. you can place stylesheets in separate files, and you can place scripts in separate files. but you must link those files from the document as a whole. another structural limitation concerns content. you can use css to provide content for selected elements, but the content is limited to
text and images, and its positioning is limited to before or after the selected element. mozilla provides a mechanism that overcomes these limitations: xbl (xml bindings language). you can use xbl to link selected elements to their own: stylesheets content properties and methods event handlers because you avoid linking everything at the document level, you can make self-contained parts that are ...
... are easy to maintain and reuse. more details for more information about xbl bindings, see the xbl page in this wiki. action: an xbl demonstration make a new html document, doc6.html. copy and paste the content from here: <!doctype html public "-//w3c//dtd html 4.0//en"> <html> <head> <title>mozilla css getting started - xbl demonstration</title> <link rel="stylesheet" type="
text/css" href="style6.css"> </head> <body> <h1>xbl demonstration</h1> <div id="square">click me</div> </body> </html> make a new css file, style6.css. this stylesheet contains the document style. copy and paste the content from here: /*** xbl demonstration ***/ #square { -moz-binding: url("square.xbl#square"); } make a new
text file, square.xbl. this file contains the xbl binding. copy an...
...e button. this wiki does not support javascript in pages, so it is not possible to show the demonstration here. it looks something like this, before and after you press the button: notes about this demonstration: the html document links the document stylesheet as usual, but it does not link any javascript code. the document does not contain any buttons. it only contains the
text of the button's label. the button is added by the binding. the document stylesheet links the binding. the binding links its own stylesheet, and it supplies its own content and javascript code. so the binding is self-contained. challenges change the xbl file so that the square doubles in width when it changes color, instead of jumping to the right. use the dom inspector tool ...
Case Sensitivity in class and id Names - Archive of obsolete content
e used to the bugs of browsers that don't fully support open standards. the most common case is where the name uses different case in the document source than is found in the css or javascript. for example, there might be this css: p.warning {color: red; background: yellow;} ...coupled with this html: <p class="warning">warning!</p> in netscape 6, the paragraph in question will have neither red
text nor a yellow background. as far as netscape 6 is concerned, warning and warning are two different identifiers, because html 4.01 defines class and id names to be case-sensitive. (for a detailed explanation of what html 4.01 says, see the following section, "why so case-sensitive?") the only way to avoid this particular problem is to make sure that your class and id names have consistent case thro...
... same thing. therefore, authors should not rely on case-sensitivity as a way of creating distinct identifiers, unless they are designing solely for a truly standards-compliant browser such as netscape 6. why so case-sensitive? netscape 6's unusual sensitivity to case is based on a close reading of the html 4.01 specification. in section 7.5.2, which defines class and ids, we find the following
text: id = name [cs] this attribute assigns a name to an element. this name must be unique in a document. class = cdata-list [cs] this attribute assigns a class name or set of class names to an element. any number of elements may be assigned the same class name or names. multiple class names must be separated by white space characters. the marker "[cs]" means "case sensitive," as defined in sectio...
...riting, netscape 6 is the only browser to honor this defined behavior; other browsers treat both class and id names as case-insensitive. id uniqueness there is a further restriction, however, on the use of id names. section 12.2.1 makes it illegal for the name and id attributes to use values which are a case-insensitive match. an "illegal" example is given in the specification, preceded by the
text: "the following example is illegal with respect to uniqueness since the two names are the same except for case." <p><a name="xxx">...</a> <p><a name="xxx">...</a> we could freely substitute id for name and the point would be the same, since name and id share the same name space (see section 12.2.3). thus, even though class and id values are defined to be case-sensitive, there is an aspect of cas...
Localizing an extension - Archive of obsolete content
n larger applications you might need to use entities from several locale files in a single xul file. using multiple dtds describes how to do it. note that the urls of the dtd files don't actually include the name of the localization to use. the chrome registry resolves the uris based on the user's current locale setting and the data you provide in your chrome manifest. then we simply replace each
text string in our xul files with the corresponding entity. for example, in stockwatcher2.xul, we change this line: <menuitem label="refresh now" oncommand="stockwatcher.refreshinformation()"/> to <menuitem label="&menu_refresh_now.label;" oncommand="stockwatcher.refreshinformation()"/> do this for every string used in each xul file. update the chrome manifest to let firefox know about the locale ...
...l:property files. create a properties file the first thing we do is create a property file for the literal strings used by the javascript code in stockwatcher2.js: changestring=chg: openstring=open: lowstring=low: highstring=high: volumestring=vol: the stockwatcher2.properties file shown above maps five keys (changestring, openstring, lowstring, highstring, and volumestring) to the corresponding
text in english. create the string bundle the next step is to modify the stockwatcher2.xul file to reference this property file. we do this by creating a string bundle, using the following code: <stringbundleset id="stringbundleset"> <stringbundle id="string-bundle" src="chrome://stockwatcher2/locale/stockwatcher2.properties"/> </stringbundleset> this establishes a new string bundle, referenced ...
...s we need from the bundle, one by one, by calling the string bundle's getstring() method, passing the appropriate key for each string. in this case, we're also appending a space to the end of each string. that's just how this particular program works, and isn't something that you have to do. then we replace any occurrences of the literal strings with the appropriate variables: samplepanel.tooltip
text = changestring + fieldarray[4] + " | " + openstring + fieldarray[5] + " | " + lowstring + fieldarray[6] + " | " + highstring + fieldarray[7] + " | " + volumestring + fieldarray[8]; localizing the description in install.rdf see localizing extension descriptions. adding more localizations to add another localization for a new language, all you need to do is add another line to ...
Creating a Firefox sidebar extension - Archive of obsolete content
.commandkey "e"> <!entity openemptysidebar.modifierskey "shift accel"> the content folder includes our sidebar, the emptysidebar.xul is shown in example 3. it creates a page holding one label. other elements can be included, please read the xul tutorials for more information. example 3. ...
... content folder includes our sidebar, the emptysidebar.xul is shown in example 3. it creates a page holding one label. other elements can be included, please read the xul tutorials for more information. example 3. ...
...ic/1.0 chrome/skin/ overlay chrome://browser/content/browser.xul chrome://emptysidebar/content/firefoxoverlay.xul test while you're developing your sidebar, you will need to test it frequently from firefox. there is a simple way to do this. first, we need to tell firefox about your extension. open your profile folder open the extensions folder (create it if it doesn't exist) create a new
text file, and put the path to your extension folder inside, e.g. c:\extensions\myextension or ~/extensions/myextension. save the file with the id of your extension as its name, e.g. emptysidebar@yourdomain.com now you're ready to test your extension! restart firefox and the sidebar is included in the menu. you can now go back and make changes to the xul file, close and restart firefox and they s...
In-Depth - Archive of obsolete content
appearance makes a widget look like it's from your operating system. possible are (this is probably an incomplete list): none - (!important may be needed) will override the operating system default. use this when you want one or two controls to look different from the operating systems defaults. ...
...our operating system. possible are (this is probably an incomplete list): none - (!important may be needed) will override the operating system default. use this when you want one or two controls to look different from the operating systems defaults. ...
...each colour is one pixel in the border. if yo...
Fast Graphics Performance With HTML - Archive of obsolete content
make content that has scrolling content underneath it opaque e.g. use <div><div style="background:white; position:fixed">simple</div>lots of
text...</div> instead of <div><div style="position:fixed">simple</div>lots of
text...</div> make the content of scrollable sub frames opaque e.g. ...
...ontent that has scrolling content underneath it opaque e.g. use <div><div style="background:white; position:fixed">simple</div>lots of
text...</div> instead of <div><div style="position:fixed">simple</div>lots of
text...</div> make the content of scrollable sub frames opaque e.g. ...
...ite; position:fixed">simple</div>lots of
text...</div> instead of <div><div style="position:fixed">simple</div>lots of
text...</div> make the content of scrollable sub frames opaque e.g. ...
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
ues. it calls douriload(). douriload() creates a channel, massages it to have the right post data, load flags, cache key, referrer, etc. it then passes the channel to dochannelload, which does some more flag massaging and then calls into the uriloader. nsuriloader::openuri gets a channel to open, a boolean indicating whether this load is the result of a link click, and an nsisupports "window con
text" (the docshell triggering the load, actually, but in drag and heavy makeup). it immediately hands off to nsuriloader::openchannel. nsuriloader::openchannel notifies the nsiuricontentlistener hanging off the window con
text, if any, of the start of the load; this gives embedders a chance to abort the load if this uri type is something they want to handle in the embedding app. if the load is not a...
...nnel. nsuriloader::openchannel notifies the nsiuricontentlistener hanging off the window con
text, if any, of the start of the load; this gives embedders a chance to abort the load if this uri type is something they want to handle in the embedding app. if the load is not aborted, we create an nsdocumentopeninfo object for this load, passing it the "this is a link click" boolean and the window con
text. we then set the channel's nsiloadgroup to the one from the window con
text. nsdocumentopeninfo::prepare is passed the channel to open. it calls getinterface on the window con
text to get and save that con
text's nsiuricontentlistener. openchannel returns to openuri which just opens the channel, setting the nsdocumentopeninfo as the stream listener. onstartrequest notification comes back from ...
...ed and canhandlecontent functions on nsiuricontentlistener and calls docontent() on the listener if it claims to handle the data, as well as hooking up a stream converter if the listener asks for one. if any of those steps fails, the function returns false so that another content listener will be looked for. the first content listener we check is the content listener associated with our window con
text (the docshell that initiated the load). if this can't handle the content type, we loop over our stored list of possible listeners (previously registered via registercontentlistener) and ask each one in turn whether it can handle the data. if we still have not found an nsiuricontentlistener, we ask the category manager whether it has an entry for the desired content type under the ns_content_lis...
Code snippets - Archive of obsolete content
let collection = "forms"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/record.js"); let recordtype = weave.engines.get(collection)._recordobj; let coll = new collection(weave.service.storageurl + collection, recordtype); coll.full = true; coll.recordhandler = function(item) { item.
...orms"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/record.js"); let recordtype = weave.engines.get(collection)._recordobj; let coll = new collection(weave.service.storageurl + collection, recordtype); coll.full = true; coll.recordhandler = function(item) { item.collection = collection; item.decrypt(); console.log(item.clear
text); }; coll.get(); print an individual record let collection = "history"; let id = "guid_goes_here"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/record.js"); let recordtype = weave.engines.get(collection)._recordobj; let coll = new collection(weave.service.storageurl + collection, recordtype); coll.full = true; coll.ids = [id]; c...
...s.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/record.js"); let recordtype = weave.engines.get(collection)._recordobj; let coll = new collection(weave.service.storageurl + collection, recordtype); coll.full = true; coll.ids = [id]; coll.recordhandler = function(item) { item.collection = collection; item.decrypt(); console.log(item.clear
text); }; coll.get(); count types of bookmark records components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/record.js"); let deleted = 0; let items = {}; let collection = "bookmarks"; let recordtype = weave.engines.get(collection)._recordobj; let coll = new collection(weave.service.storageurl + collection, recordtype); col...
Simple Storage - Archive of obsolete content
e.log(elt)); var bar = mystorage.heimelfarbs.bar; jetpack.notifications.show(bar.baz); that's all there is to it! note that these examples create a mystorage variable to emphasize the fact that jetpack.storage.simple is just a normal javascript object. they could have simply used jetpack.storage.simple directly. here's a complete real-world example. it's a simple note-taking jetpack. select some
text on the page, right-click, and select note. the
text will be remembered across browser restarts as a note. all notes are shown in the tools menu. you can install this example from the jetpack gallery. jetpack.future.import("menu"); jetpack.future.import("selection"); jetpack.future.import("storage.simple"); // create the persistent notes array if it doesn't already exist. jetpack.storage.simple.n...
... notes. we'll add a notes menu with // a submenu, which lists all the notes. if there are no notes, we'll show a // disabled "(empty)" menuitem. ...
...length > 0 ? notes : [{ label: "(empty)", disabled: true }]) }); } // modify the page's con
text menu by sneaking in before it's shown. if there's // a selection, add a note menuitem that makes a new note. otherwise, don't // modify the menu at all. we'll limit the number of notes to 20. old notes // will be forgotten. :( jetpack.menu.con
text.page.beforeshow = function (menu) { menu.reset(); if (jetpack.selection.
text) menu.add({ label: "note", command: function () { notes.unshift(jetpack.selection.
text); if (notes.length > 20) notes.pop(); updatejetpackmenu(); } }); }; // initialize the jetpack menu with the current notes. updatejetpackmenu(); see also settings jep 11...
Microsummary topics - Archive of obsolete content
ps users create custom generators for their favorite sites -- obtain a reference to the nsimicrosummaryservice interface implemented by the nsimicrosummaryservice component, then call its installgenerator() method, passing it an xml document containing the generator. ...
... createinst...
...generator xmlns="http://www.mozilla.org/microsummaries/0.1" \ name="firefox download count" \ uri="urn:{835daeb3-6760-47fa-8f4f-8e4fdea1fb16}"> \ <template> \ <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> \ <output method="
text"/> \ <template match="/"> \ <value-of select="id(\'download-count\')"/> \ <
text> fx downloads</
text> \ </template> \ </transform> \ </template> \ <pages> <include>http://(www\.)?spreadfirefox\.com/(index\.php)?</include> </pages> </generator> \ '; var domparser = components.classes["@mozilla.org/xmlextras/domparser;1"]. createinstance(components.interfaces.nsidomparser); var generatordoc = domparser.parsefromstring(generator
text, "
text...
Mozilla Application Framework in Detail - Archive of obsolete content
ur own application. related: xulrunner:what xulrunner provides, xulrunner hall of fame ui in mozilla mozilla's philosophy of using "the right tool for the right job" is manifested most prominently in the design of the user interface. we provide an xml-based language called xul for defining the user interface of your application. css is used to style these ui's and dtd's are used to localize the
textual information - making your application extremely flexible and able to be utilized across the globe. javascript, considered by many to be the best scripting language ever designed is ideal for specifying the behavior of your interface widgets. where speed is the foremost consideration, we provide c++ libraries with multi-language interfaces for comprehensive, performant access to networking, fil...
...of your interface widgets. where speed is the foremost consideration, we provide c++ libraries with multi-language interfaces for comprehensive, performant access to networking, filesystem, content, rendering, and much more. what this means to you as the developer is this: you can take advantage of skills you already have with xml or web technologies to design and implement anything from a simple
text editor to a comprehensive ide - complete with all of the interface widgets that you would find in virtually any major application framework. another benefit of this standards-based approach to ui development is that your application is cross-platform "out of the box". imagine not having to re-write your application 3 times, or not supporting a less popular platform simply because you do not have ...
...meeting the needs of developers and companies who are working to provide consumers with new interactive applications, solutions and services, gecko will become a key catalyst for new growth and innovation and for delivering anytime, anywhere access to millions of new users. as the heart of a browser, the browser engine software component is responsible for interpreting and rendering the graphics,
text and script on the web. with gecko, mozilla has cleanly separated the browser engine component from the rest of the client software so it can be embedded and used to interpret, display and run web content, applications and services on any computing platform or device. open source and freely available, gecko is small in size and modular and achieves rendering speed superior to all other browser eng...
Mozilla Crypto FAQ - Archive of obsolete content
is licensed under the mozilla public license (version 1.1), with the gnu general public license (version 2.0 or later) available as an alternate license. you may choose to use the code either under the terms of the mpl or under the terms of the gpl. this form of licensing was chosen to allow the released personal security manager and network security services source code to be used in as many con
texts as possible; for example, the psm and nss code can be used in mozilla under mpl terms, and can also be used in gnu and other projects under gpl terms. if you create and distribute modifications to the original psm and nss code, we ask that you in turn make such modifications available under both the mpl and gpl. (note that mozilla.org will not accept contributed modifications into future psm/nss...
...regulations", which contains copies of the export administration act of 1979 (as amended), the international emergency economic powers act (as amended), and related legislation and executive orders. i thought export of encryption software from the u.s. was governed by the international traffic in arms regulations. what happened to the itar? the itar still exist, but are no longer used in the con
text of export control of encryption software; for this purpose they have been replaced by the ear. authority for non-military encryption export was transferred from the u.s. state department to the u.s. department of commerce by presidential executive order 13026 on november 15, 1996, for regulation under the export administration regulations (ear), along with all other export-controlled commercial ...
...onic privacy information center (epic). the encryption page maintained by the center for democracy and technology (cdt). the following books may also be of interest if you want to know more about the history and politics of u.s. export control of encryption software: privacy on the line: the politics of wiretapping and encryption, by whitfield diffie and susan landau. provides historical con
text and technical background for the recent political battles around encryption and privacy issues. technology and privacy: the new landscape, by philip agre and marc rotenberg (ed.). a set of ten essays on various aspects of privacy and technological developments affecting it. the electronic privacy papers: documents on the battle for privacy in the age of surveillance, by bruce schneier and david...
Space Manager High Level Design - Archive of obsolete content
frameinfo (private struct) nsbandtrapezoid outside of the space manager itself, the clients of the space manager also play an important part in the management of he available and used space. the primary classes that interact with the space manager are: nsblockreflowstate nsblockframe nsboxtoblockadaptor the general interaction model is to create a space manager for a block frame in the con
text of a reflow, and to associate it with the blockreflowstate so it is passed down to child frames' reflow methods. after reflow, the space manager is destroyed. during reflow, the space manager stores the space taken up by floats (updatespacemanager in nsblockframe) and provides information about the space available for other elements (getavailablespace in nsblockreflowstate). additionally, there i...
...already had a space manager instance associated with it, it is stored off before being replaced, and the returned to the blockreflowstate instance after the new one has been destroyed. thus, space managers are effectively 'nested' during reflow, with each new block introducing its own space manager. use case 2: float is added to the space manager after a space manager is created for a block con
text's reflow chain, a floated block may be added to it. this happens in the method nsblockreflowstate::recoverfloats and nsblockreflowstate::flowandplacefloat (formerly this was done in nsblockframe::updatespacemanager). the general algorithm in nsblockreflowstate::recoverfloats is: for each line in the block, see if it has floated blocks if floats are in the line, iterate over the floats and add ...
...e in the block, see if it has floated blocks if floats are in the line, iterate over the floats and add each one to the space manager via the addrectregion method. the actual rect for the frame is cached in an nsfloatcache so it does not have to be recomputed. if the block has any block children, then translate the space manager to the child block's origin and update the space manager in the con
text for the child block, recursively. when done with the child, restore the space managers coordinates by translating by the negative of the child block's origin. the general algorithm in nsblockreflowstate::flowandplacefloat is: the region that the float currently occupies is recorded. the band of available space is searched (with nsblockreflowstate::getavailablespace); the float frame that is ...
Table Layout Regression Tests - Archive of obsolete content
st.lst (see: nsregressiontester::dumpframemodel). their name is generated by replacing the old extension .html or .xml with .rgd. for appendcells1.html a file appendcells1.rgd will be created in the baseline or verify subdirectory. ...
...ttom: null left: null top: null right: null bottom: null left: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: null top: null right: null bottom: null left: null top: null right: null bottom: null 1[0x1]enum 0" /> <list data="100 100 " /> <position data="left: auto top: auto right: auto bottom: auto auto 0[0x0]tw null auto 0[0x0]tw null 0 auto " /> <
text data="0 0 0 normal normal 0[0x0]tw normal " /> <
textreset data="0 10[0xa]enum " /> <display data="0 1 0 0 0 0 0 0 0 0 0 0 " /> <visibility data="0 1 1.000000" /> <table data="0 0 4 -1 1 " /> <tableborder data="1 null null 0 2 " /> <content data="0 0 0 null " /> <quotes data="0 " /> <ui data="3 0 0 1 " /> <uireset data="7 0 4" /> <xul data="0 0 0 0 ...
...++webshell == 1 ++domwindow == 1 ++webshell == 2 ++domwindow == 2 note: styleverifytree is disabled note: frameverifytree is disabled note: verifyreflow is disabled ++webshell == 3 ++domwindow == 3 running baseline test for e:\moz_src\m...
Venkman Internals - Archive of obsolete content
set the breakpoint right from the jsdscript instead, you wouldn't see it in the venkman ui, and you might confuse venkman when the actual breakpoint was hit and it couldn't find a matching breakpoint object. you can see the prototype for this object at http://lxr.mozilla.org/mozilla/sourc...ebugger.js#914 scriptwrapper.jsdscript is the reference to the jsdiscript object for the function. sourcecon
text is the 5 lines of source
text before the last instance of the word "function" on the line where this function starts. (not in 2006, seems to be computed on the fly in getsourcecon
text()). the full
text of the file can be found in an array located at scriptwrapper.scriptinstance.source
text.lines. this array is 0 based, of course. the starting line of the function is scriptwrapper.jsdscript.baselin...
... scriptinstance all scriptwrappers are parented by a single scriptinstance, which holds all of the scriptwrappers for a particular url. ...
... scriptinstance all scriptwrappers are parented by a single scriptinstance, which holds all of the scriptwrappers for a particular url. from here, you can set and clear breakpoints by line number (instead of by program counter), locate a scriptwrapper for a given line number, and do a few other useful things. ...
Using Breakpoints in Venkman - Archive of obsolete content
p in code—especially code you have authored yourself and are responsible for troubleshooting—you're going to need breakpoints. types of breakpoints venkman has two types of breakpoints. the first, and most common, is called the "hard" breakpoint. a hard breakpoint represents an actual trap instruction included in the pseudocode of a compiled function. hard breakpoints can only exist in the con
text of a function currently "live" in the browser. hard breakpoints are the ones that actually stop program execution. the second type of breakpoint, the "future" breakpoint, represents a promise from venkman to set a hard breakpoint as soon as it is possible. future breakpoints are used when you want to stop in a script that has not yet been compiled. the most common use of future breakpoints is to ...
...fish. when you set a breakpoint at line 81, you can start animation on the web page in the browser window and see venkman stop execution as it enters the onflipx function. stopped there, venkman displays the value of the newsign variable as "1" in the local variables view. using breakpoints and the interactive view, you can change the values of the variables that venkman displays (only in the con
text of the debugging environment itself) and see how these changes affect the execution of the code. for more information about the sorts of actions you can take in venkman when you're at a breakpoint, see the debugging basics section of the introductory venkman article. clearing breakpoints to clear the breakpoint, click on the margin twice. the first click will clear the hard breakpoint and leave ...
... the script that follows and stop if the result is true. the //@jsd_eval command will insert a breakpoint which is set to execute the script that follows without stopping and without logging the result. these meta comments can be used to insert debug-only code in your scripts with zero impact on production code. to enable meta comments in a script, select "scan for meta comments" from the con
text menu of the file in the loaded scripts view. when you add a meta comment, a normal breakpoint is created. you can change or delete this breakpoint just as you would a breakpoint created by hand. resources venkman introduction—previous article on venkman. venkman's home page on devmo. original document information authors: robert ginda, ian oeschger published 02 may 2003 ...
A XUL Bestiary - Archive of obsolete content
at detail but to define what they are in simple terms. i selected items for this group because they seemed to be either shrouded in mystery, misused as concepts or terms, or underestimated according to their role in xul and cross-platform development. in contrast to the mozilla jargon file, this article describes items of specific interest to the web or content developer looking to establish a con
text for understanding mozilla's new technologies -- and in particular mozilla's xml-based user interface language, xul. chrome some of the most powerful and frequently misunderstood features of xul and the mozilla browser have to do with chrome. the term chrome is used in different con
texts to mean different things. in general, chrome refers to a xul interface and all of its supporting files; chrom...
...t is just the xul. the chrome url this concept of a chrome as an integrated, dynamic thing in some way divorced from the "appcore" is realized in the use of the chrome url to point to chunks of xul and their related files. the chrome url, which appears in place of the http url in pointers like the following global skin processing instruction: <?xml-stylesheet href="chrome://global/skin/" type="
text/css"?> specifies a chrome to be loaded by the gecko rendering engine. in the example above, the chrome is simply a skin file to be loaded into the xul file, but the chrome can also be used to load whole chromes, as when a <menuitem> in one window brings up a new chrome: <menuitem value="mozilla help" oncommand="window.opendialog('chrome://help/content/help.xul', ...
...see in mozilla (and whose absence from your own xul files can make your work look strange, senseless, or invisible altogether), a xul.css file is loaded which provides some very basic presentational information for the widgets in the toolkit. so css is a lot of what makes xul xul, especially with the advent of css2 and its new positioning capabilities. skinning is most often brought up in the con
text of dynamic changes to the overall look of an application. though this is not yet in the browser, very soon it will be possible to change the look of a whole application dynamically, but only to the extent that the skin is actually defined in the main global.css, or global skin. when you create styles in <style> tags, as style attributes for individual elements, or in custom css files, you break t...
treecol.type - Archive of obsolete content
if you are using type="checkbox", then the tree and each treecol must be editable. you need to apply css to make the checkbox toggle. here is an example css style using the current theme's checkboxes: treechildren::-moz-tree-checkbox { /* unchecked checkbox treecells. ...
... if you are using type="checkbox", then the tree and each treecol must be editable. you need to apply css to make the checkbox toggle. here is an example css style using the current theme's checkboxes: treechildren::-moz-tree-checkbox { /* unchecked checkbox treecells. ...
... if you are using type="checkbox", then the tree and each treecol must be editable. you need to apply css to make the checkbox toggle. here is an example css style using the current theme's checkboxes: treechildren::-moz-tree-checkbox { /* unchecked checkbox treecells. ...
value - Archive of obsolete content
« xul reference home value type: string the string attribute allows you to associate a data value with an element. it is not used for any specific purpose, but you can access it with a script for your own use. be aware, however, that some elements, such as
textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable). for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.
...e setuserdata() (future-proof and clean, but not easily serializable). ...
... (future-proof and clean, but not easily serializable). ...
Deprecated and defunct markup - Archive of obsolete content
tion) <scrollbarbutton> (button at end of scrollbar; had been only within larger <scrollbar>) so, not deprecated, but internal use only? ...
...of scrollbar; had been only within larger <scrollbar>) so, not deprecated, but internal use only? ...
... not true, still in use --neil 03 march 2011 <slider> (clickable tray in <scrollbar> which holds <thumb>; do not use alone) also used as part of <scale> --neil 03 march 2011 <spinner> (spinbox; <spinbuttons> with a
textbox whereby spinning affects value in
textbox; not usable) <spring> (use @flex instead) <strut> (replaced by @debug?) <tabcontrol> (contained tabbox and tabpanel) <
text> (like <label> or <description> but does not wrap; like <label crop="end">; had been used in menus/toolbars) <
textfield> (like <
textbox>) <thumb> (<button> with deprecated <gripper>; implements sliding box in center of scrolbar) <title> (to add a caption on a <titledbox> <titledbox> (box with a frame) <titledbutton> (attempt to combine
text and images before <button>) <toolbarpa...
Popup Guide - Archive of obsolete content
space for a button for each command. a menu is normally hidden, and when activated, a popup appears containing the list of commands. the user may select a command and the menu disappears again. a menu is created using the menupopup element. it displays items in a list, can display submenus, and provides keyboard navigation between the items. a menu should only contain menu related elements. con
text menus a con
text menu is like a regular menu except that the commands it contains apply to what the user had clicked on to open the con
text menu. often, depending on what was clicked on, certain commands may be hidden if not applicable to that element. panels a panel can contain any type of content. it is useful when you wish to display some controls temporarily over the existing ui. for exampl...
...ry window. usually it would contain tools related to the main window, or an inspector which displays properties of a selected element. tooltips when the mouse is positioned over a ui control, a tooltip provides a small box with descriptive help about that control. when the mouse is moved away from the control, the tooltip automatically disappears. a tooltip can be created by setting the tooltip
text attribute on an element or by using the tooltip element. working with popups the following additional information is available about manipulating menus and popups. opening a menu or popup most menus and popups are opened automatically when they are associated with an element. to open a popup using script use the openpopup method or the openpopupatscreen method. for detailed information abo...
...how keys are handled within menus and panels, see handling keys within popups. platform specific menu considerations see special per-platform menu considerations for some notes about handling menus on certain platforms, for instance creating the application menu on a macintosh. using popups in extensions extensions may add additional menuitems either to a menu on the menu bar or to the con
text menu. in addition, an extension may add an entirely new menu. for example, an extension might wish to add a new command on the tools menu to open a dialog specific to the extension. another common task is to create an extension which adds an item to the browser's con
text menu. see using menus and popups in extensions for details. ...
value - Archive of obsolete content
« xul reference value type: string gets and sets the value of the value attribute. ...
... « xul reference value type: string gets and sets the value of the value attribute. ...
... « xul reference value type: string gets and sets the value of the value attribute. ...
SQLite Templates - Archive of obsolete content
ctory is located. the file within this directory is specified after the colon, in this case 'filename.sqlite'. sqlite files typically have the 'sqlite' extension. as with xml datasources, the ref attribute isn't currently used for sqlite sources, so you should just set the ref attribute to a dummy value; '*' is typically used. the query for an sqlite datasource is just an sql select statement, as
text inside the query element. this simple example shows how to display a listbox containing the values in one column in a database table. <listbox datasources="profile:userdata.sqlite" ref="*" querytype="storage"> <template> <query> select name from myfriends </query> <action> <listitem uri="?" label="?name"/> </action> </template> </listbox> the query returns the li...
...x element is required on one element within the action body. for sqlite queries it will almost always be on the outermost node. note also that the query statement has a where clause which restricts the rows to those with an age greater or equal to 30. query parameters sometimes, you will want to adjust the query depending on certain criteria. one possibility is to simply use methods to adjust the
text within the query element and rebuild the template. however, this can become unweidly for more complex queries, and would be more error prone if values were not escaped properly to ensure that extraneous quotes, semicolons and other characters didn't appear in the values. this is especially important when you are taking values that were entered by the user. the solution is to use query parameters,...
...integer number, so the type attribute is set to integer. integers are 32-bit values, but you can use the value int64 for 64-bit integers. you can also use the value double for double precision floating point values. if no type is specified, a string is assumed. we could later change the age to use in the query with a short script: function adjustage(min, max) { document.getelementbyid("minage").
textcontent = min; document.getelementbyid("maxage").
textcontent = max; document.getelementbyid("friends").builder.rebuild(); } this function takes two arguments, the minimum and maximum values to use. we retrieve the param elements and set their
textcontent properties to the desired value. finally, we rebuild the entire template. « previousnext » ...
Complete - Archive of obsolete content
is known as a locale. locales are named with a two-part code. for example, the code en-us means english language (en) for the united states (us). to make it eaiser to support different locales, developers usually place anything that might depend on the locale in separate files in a separate directory. ...
...to make it eaiser to support different locales, developers usually place anything that might depend on the locale in separate files in a separate directory. in the custom toolbar button extension, the only things that might depend on the locale are the
text strings displayed in the user interface. these are in the files button.xul and button.js. xul and javascript each have mechanisms for loading
text strings from the correct locale directory. this extension only uses the xul method. its javascript code gets the
text strings it needs from the xul. for more information about working with locales, see the main localization page here. how a
text sting gets localized when you press button 1 you see an message in english or french, depending on your application's locale. this is how it happens: for...
...irefox, etc.) or in installed-chrome.txt and chrome.rdf (seamonkey). when the xul file, allcustom.xul is loaded, the doctype declaration near the top loads a dtd from chrome://allcustom/locale/. the application's chrome registry converts this url to the correct dtd file for the locale you are using. the xul toolbarbutton tag contains an entity &allcustom.alert.1;. the dtd resolves this into a
text string in the appropriate language. when you press the button, the code in the xul element sends the
text string to the extension's javascript code in allcustom.js. the extension's javascript code displays the
text. file structure in the new file structure, there is a locale directory for all the locales. each locale has its own directory there. in each locale's directory, there is an allcusto...
Creating a Skin - Archive of obsolete content
olor: #0088cc; } xul: <vbox class="findfilesbox" orient="vertical" flex="100%"> <toolbox> rounding on the tabs next, let's modify the tabs. we will make the selected tab bold and change the rounding on the tabs. tab:first-child { -moz-border-radius: 4px 0px 0px 0px; } tab:last-child { -moz-border-radius: 0px 4px 0px 0px; } tab[selected="true"] { color: #000066; font-weight: bold;
text-decoration: underline; } two rules change the normal tab appearance, the first sets the rounding on the first tab and the second sets the rounding on the last tab. used here is a special mozilla style rule, -moz-border-radius, that creates rounded border corners. the upper left border of the first tab and the upper right border of the second tab are rounded by four pixels and the other corner...
...orners. the upper left border of the first tab and the upper right border of the second tab are rounded by four pixels and the other corners have a round corner of zero pixels, which is equivalent to no rounding. increase the values here for more rounding and decrease them for a more rectangular look. the last rule only applies to tabs that have their selected attribute set to true. it makes the
text in the selected tab appear bold, underlined and dark blue. note in the image that this style has applied only to the first tab, because it's the selected one. adding toolbar icons it is somewhat difficult to distinguish the buttons on the toolbar from the commands on the menu. we could add some icons to the buttons to make them clearer. mozilla composer provides some icons for open and save but...
...n, just copy the files to your new skin and change the urls accordingly. #find-button { list-style-image: url("chrome://global/skin/checkbox/images/cbox-check.jpg"); font-weight: bold; } #cancel-button { list-style-image: url("chrome://global/skin/icons/images/close-button.jpg"); } button:hover { color: #000066; } we add some images to the buttons and make the find button have bold
text to indicate that it is the default button. the last rule applies to buttons when the mouse is hovering over them. we set the
text color to dark blue in this case. finally, some minor changes to the spacing around the items, by setting margins: tabbox { margin: 4px; } toolbarbutton { margin-left: 3px; margin-right: 3px; } after those changes, the find files dialog now looks like the imag...
Grids - Archive of obsolete content
f you wanted one particular cell to contain multiple elements, you can use a nested hbox or other box element. an hbox is a single element but you can put as many elements that you want inside it. for example: example 2 : source view <grid flex="1"> <columns> <column/> <column flex="1"/> </columns> <rows> <row> <label control="doctitle" value="document title:"/> <
textbox id="doctitle" flex="1"/> </row> <row> <label control="docpath" value="path:"/> <hbox flex="1"> <
textbox id="docpath" flex="1"/> <button label="browse..."/> </hbox> </row> </rows> </grid> notice in the image how the first column of elements containing the labels has only a single element in each row. the second column contains a box in its se...
... <label control="docpath" value="path:"/> <hbox flex="1"> <
textbox id="docpath" flex="1"/> <button label="browse..."/> </hbox> </row> </rows> </grid> notice in the image how the first column of elements containing the labels has only a single element in each row. the second column contains a box in its second row, which in turn contains two elements, a
textbox and a button. you could add additional nested boxes or even another grid inside a single cell. if you resize the window of the last example, you will see that the
textboxes resize, but no other elements do. this is because of the flex attributes added to the
textboxes and the second column. the first column does not need to be flexible as the labels do not need to change size. the initial wi...
...s instead of the rows. if you do this, the rows are just declared to specify how many rows there are. example 3 : source view <grid> <rows> <row/> <row/> <row/> </rows> <columns> <column> <label control="first" value="first name:"/> <label control="middle" value="middle name:"/> <label control="last" value="last name:"/> </column> <column> <
textbox id="first"/> <
textbox id="middle"/> <
textbox id="last"/> </column> </columns> </grid> this grid has three rows and two columns. the row elements are just placeholders to specify how many there are. you may add the flex attribute to a row to make it flexible. the content is placed inside in each column. the first element inside each column element is placed in the first row...
Introduction - Archive of obsolete content
cifically for building portable user interfaces. it takes a long time to build an application even for only one platform. the time required to compile and debug can be lengthy. with xul, an interface can be implemented and modified quickly and easily. xul has all the advantages of other xml languages. for example xhtml or other xml languages such as mathml or svg can be inserted within it. ...
...ml languages such as mathml or svg can be inserted within it. also,
text displayed with xul is easily localizable, which means that it can be translated into other languages with little effort. what kinds of user interfaces can be made with xul? xul provides the ability to create most elements found in modern graphical interfaces. some elements that can be created are: input controls such as
textboxes and checkboxes toolbars with buttons or other content menus on a menu bar or pop up menus tabbed dialogs trees for hierarchical or tabular information keyboard shortcuts the displayed content can be created from the contents of a xul file or with data from a datasource. in mozilla, such datasources include a user's mailbox, their bookmarks and search results. the contents of menus, tr...
...ata from a datasource. in mozilla, such datasources include a user's mailbox, their bookmarks and search results. the contents of menus, trees and other elements can be populated with this data, or with your own data supplied in an rdf file. there are several ways you can use xul: firefox extension an extension adds functionality to the browser itself, often in the form of extra toolbars, con
text menus, or customizations to the browser's user interface. this is done using a feature of xul called an overlay, which allows the ui provided from one source, in this case, the firefox browser, to be merged together with the ui from the extension. extensions may also be applied to other mozilla based products such as thunderbird. standalone xulrunner application xulrunner is a packaged version ...
More Event Handlers - Archive of obsolete content
as soon as a mouse button is pressed, even if it hasn't been released yet. mouseup called when a mouse button is released on an element. mouseover called when the mouse pointer is moved onto an element. you could use this to highlight the element, however css provides a way to do this automatically so you shouldn't do it with an event. you might, however, want to display some help
text on a status bar. mousemove called when the mouse pointer is moved while over an element. the event may be called many times as the user moves the mouse so you should avoid performing lengthy tasks from this handler. mouseout called when the mouse pointer is moved off of an element. you might then unhighlight the element or remove status
text. there are also a set of drag related ...
...tion where the event occurred. there are two sets of coordinates. the first is the screenx and screeny properties and are relative to the top left corner of the screen. the second set, clientx and clienty, are relative to the top left corner of the document. here is an example which displays the current mouse coordinates: example 4 : source view <script> function updatemousecoordinates(e){ var
text = "x:" + e.clientx + " y:" + e.clienty; document.getelementbyid("xy").value =
text; } </script> <label id="xy"/> <hbox width="400" height="400" onmousemove="updatemousecoordinates(event);"/> in this example, the size of the box has been set explicitly so the effect is easier to see. the event handler gets the clientx and clienty properties and creates a string from them. this string is then a...
...the top level outside of a function. this is because the xul elements may not have loaded or fully initialized yet, so some things may not work as expected. to use a load event, place an onload attribute on the window tag. call code within the load handler which will initialize the interface as necessary. there is also an unload event which is called once the window has closed, or in a browser con
text, when the page is switched to another url. you can use this event to save any changed information, for example. next, we'll find out how to add keyboard shortcuts. « previousnext » ...
Tabboxes - Archive of obsolete content
ere the contents of the tabs along the top go. each tabpanel element becomes a page on the tabbed display. the first panel corresponds to the first tab, the second panel corresponds to the second tab, and so on. there is a one-to-one relationship between the tab and tabpanel elements. when determining the size of the tabbox, the size of the largest page is used. that means that if there are ten
textboxes on one tab page and only one on another, the tab page will be sized to fit the one with the ten on it as this takes up more room. the area taken up by the tab area does not change when the user switches to a new tab page. tabbox example example 1 : source view <tabbox> <tabs> <tab label="mail"/> <tab label="news"/> </tabs> <tabpanels> <tabpanel id="mailtab"> <che...
...you can see the two ta...
...you can see the two tabs, search and op...
Tree Box Objects - Archive of obsolete content
treechildren> <treeitem label="row 0"/> <treeitem label="row 1"/> <treeitem label="row 2"/> <treeitem label="row 3"/> <treeitem label="row 4"/> <treeitem label="row 5"/> <treeitem label="row 6"/> <treeitem label="row 7"/> <treeitem label="row 8"/> <treeitem label="row 9"/> </treechildren> </tree> <hbox align="center"> <label value="scroll to row:"/> <
textbox id="tbox"/> <button label="scroll" oncommand="doscroll();"/> </hbox> note that we use the rows attribute on the tree to specify that only four rows are displayed at a time. this makes it easier to see how the example works. also, notice that the first row is 0. the doscroll() function gets the box object and calls the scrolltorow() function with an argument set to the value of the
textbox...
... earlier, but for later versions we get the column id from the column object. if you are writing code for multiple versions, you should check for this as above. the last argument to getcellat() is the child type which is filled in with a string depending on what part of the cell the coordinate is at. if you move the mouse around in the previous example, you might notice the label change between '
text' and 'cell'. the value '
text' indicates the area where the
text would be drawn and the value 'cell' indicates the area around the
text, for example, the margin on the left side where the open and close twisties are normally drawn. if there was a twisty, however, the value would be 'twisty' instead. this is convenient since you could determine whether the user clicked on a twisty instead of anothe...
...s != "undefined") column = tree.columns[column]; tree.boxobject.getcoordsforcellitem( row, column, part, x, y, width, height ); the row, column, and part arguments are similar to those returned from the getcellat() function. again, the column should be either a string or a column object depending on which version you are using. the cell part type may be used to get the coordinates of either the
text, the entire cell, the twisty or the image in the cell. the same values as the getcellat() function are used. the getcoordsforcellitem() function returns the x and y coordinates in addition to the width and height, all as out parameters. next, we'll look at rdf which can be used to automatically populate trees and other elements. « previousnext » ...
Using Spacers - Archive of obsolete content
add some spacing in between the elements we have created. adding spacers one of the problems with developing user interfaces is that each user has a different display. some users may have larger displays with higher resolutions and others may have lower resolutions. in addition, different platforms may have special requirements on the user interface. if adding support for multiple languages, the
text for one language may require more room than another. applications that need to support multiple platforms and languages usually have their windows laid out with lots of space to allow for this. some platforms and user interface toolkits provide components that are smart enough to resize and re-position themselves to fit the needs of the user. (java uses layout managers for example.) xul provides ...
...indow is changed. we'll add a spacer to our find file dialog soon. first, let's take a look at what happens when the current dialog is resized. if you change the size of the find files window, you can see that the elements have remained where they started. none of them have been moved or resized even though the window has more room in it. let's see what happens when a spacer is added between the
text box and the find button. by adding a spacer and resizing the window, you can see that the spacer has expanded to fill the space. the buttons have been pushed over. our find file example the code to add a spacer is shown below. insert it just before the find button. <spacer flex="1"/> <button id="find-button" label="find"/> more about flexibility xul lays out elements on a window by cal...
...> more about flexibility xul lays out elements on a window by calculating suitable widths and heights for the elements and then adding space where they are flexible. unless you specify information about the width and height of an element, the default size of an element is determined by its contents. you'll notice that the cancel button in the dialogs has always set its width so that it fits the
text inside it. if you create a button with a very long label, the button's default size will be large enough to hold the entire label. other elements, such as the
text box have chosen a suitable default size. the flex attribute is used to specify if an element can change size to fit the box (in this case, the window) it is in. we've already seen the flex attribute applied to spacers, but it can be ap...
Using Visual Studio as your XUL IDE - Archive of obsolete content
as you are already there, you can do the same for "xbl". 2. using xml schemas for validation and intellisense visual studio needs the xml schema for xul files. ...
... when writing xul: intellisense / autocompletion for elements and attributes validation syntax coloring (okay, more sophisticated editors like notepad++ provide this as well) before you can use all of this, you have to adjust visual studio a little. 1. setting the correct editor as xul files are nothing but xml, you can use the normal xml-editor for writing xul. go to tools > options... >
text editor > file extension and add the extension "xul" with "xml editor". as you are already there, you can do the same for "xbl". 2. using xml schemas for validation and intellisense visual studio needs the xml schema for xul files. there is a very nice schema created by mihailo lalevic. you can download it at xulschema.codeplex.com under the downloads tab. you should be able to use the schema in ...
...< !doctype window system "chrome://loomo/locale/main.dtd"> visual studio doesn't recognize the chrome uri prefix, what will give you an error at the previous line ("the uri prefix is not recognized"). as vs doesn't know how the chrome protocol works it can't detect where the dtd file is really located and thus will give you errors wherever you use the entities that are declared in this file. 5.2
text preprocessor the mozilla build system includes a
text preprocessor. as preprocessor directives are not valid xml, visual studio will mark them as errors in your xul files. 5.3 javascript related you will get validation errors for javascript code whenever using the keywords "const" and "let". these keywords are mozilla-specific at the moment. vs just supports ecmascript 3rd edition and thus doesn'...
Writing Skinnable XUL and CSS - Archive of obsolete content
rest of skin file ... css files for a skin fall into two categories: base skin files and derived skin files. css files that import another skin file are calledderived skin files. css files that don't import another skin file are calledbase skin files. there is one notable exception to this rule. skin files that don't import any other skin files, but that are only intended to be used in the con
text of another component's skin are also considered derived skin files, since they are implicitly importing information from the other component's skin. these sorts of files are typically used with reusable overlayable widgets (e.g., the sidebar). your css file should never import another skin file if your file is loaded by a xul overlay. css files that are used by xul overlays should never import t...
... files are typically used with reusable overlayable widgets (e.g., the sidebar). your css file should never import another skin file if your file is loaded by a xul overlay. css files that are used by xul overlays should never import the global skin (or any other skin for that matter). they are already derived skins and therefore should not inherit from global. they should instead rely on the con
text in which they will appear for color, font, and border information. for example, the sidebar should not import the global skin, since it could appear in messenger and in navigator (which could have two completely different color schemes). if it imported the global skin, then when it was overlayed into navigator, it would potentially clash (if the user's current chosen navigator skin were not inher...
... inefficient and you should just use the class notation (the dot notation) instead. writing skinnable xul a xul file that describes a window always imports the master skin file for its package. for example, all xul files that describe windows in the navigator package should contain a line explicitly importing navigator.css. xul overlays, however, should not, since they will be used in the con
text of other skins. a xul file never imports skin files from outside its package. it is a flagrant and hideous violation (punishable by a public flogging in front of the netscape fountain) to load a skin file from xul that is not found in your package. for example, a navigator xul file should never load the global skin or a sidebar skin. xul files never explicitly load files from other packages unl...
arrowscrollbox - Archive of obsolete content
low"/> <button label="orange"/> <button label="silver"/> <button label="lavender"/> <button label="gold"/> <button label="turquoise"/> <button label="peach"/> <button label="maroon"/> <button label="black"/> </arrowscrollbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-...
...cursor, width clicktoscroll type: boolean clicktoscroll, if true, the arrows must be clicked to scroll the scrollbox content. if false, the mouse must be hovered over the arrows to scroll automatically. disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
...mooth scrolling supports horizontal arrowscrollboxes only. tabindex type: integer the tab order of the element. the tab order is the order in which the focus is moved when the user presses the "tab" key. elements with a higher tabindex are later in the tab sequence. properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width disabled type: boolean gets and sets the value of the disabled attribute. scrollboxobjec...
dialog - Archive of obsolete content
tonlabelaccept, buttonlabelcancel, buttonlabeldisclosure, buttonlabelextra1, buttonlabelextra2, buttonlabelhelp, buttonorient, buttonpack, buttons, defaultbutton, title properties buttons, defaultbutton methods acceptdialog, canceldialog, centerwindowonscreen, getbutton, movetoalertposition examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="
text/css"?> <dialog id="donothing" title="dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" buttons="accept,cancel" buttonlabelcancel="cancel" buttonlabelaccept="save"> <dialogheader title="options" description="my preferences"/> <groupbox> <caption label="colour"/> <radiogroup> <radio label="red"/> <radio label="green" selected="tru...
...moreover this hides separator between titlebar and window contents. this only affects mac os x. buttonaccesskeyaccept type: string the access key to use for the "accept" button. buttonaccesskeycancel type: string t...
...button will be activated when the enter key is pressed. this should be set to one of the same values as those for the buttons attribute. inactivetitlebarcolor type: color string specify background color of the window's titlebar when it is inactive (background). moreover this hides separator between titlebar and window contents. this affects only on mac os x. title type: string the
text to appear in the title bar of the window. properties buttons type: comma-separated list of the values below a comma-separated list of buttons to appear on the dialog box. the buttons will be placed in suitable locations for the user's platform and basic event handling will be performed automatically. the following values can be used in the list: accept: the ok button, which will acce...
grid - Archive of obsolete content
e columns element appears in the grid first. more information is available in the xul tutorial. example <!-- groupbox containing a grid. ...
... <menupopup> <menuitem label="accounts"/> <menuitem label="sales" selected="true"/> <menuitem label="support"/> </menupopup> </menulist> </row> </rows> </grid> </groupbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-...
...u, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition,...
image - Archive of obsolete content
hould be reloaded. never the image will be loaded from the cache if possible. properties accessibletype type: integer a value indicating the type of accessibility object for the element. src type: url gets and sets the value of the src attribute. ...
...ype: url gets and sets the value of the src attribute. ...
...e of the src attribute. ...
notification - Archive of obsolete content
pe, value methods close examples <notification label="this is a warning"/> attributes image type: uri the uri of the image to appear on the element. if this attribute is empty or left out, no image appears. the position of the image is determined by the dir and orient attributes. label type: string the label that will appear on the element. if this is left out, no
text appears. for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. persistence type: integer the persistence may be set to a non-zero value so that the notificationbox's removetransientnotifications method does not remove them. this may be used to close a set of notifications as a group without affecting o...
...e priority. info a notification that is of lesser importance. warning a normal warning notification. critical a critical notification. value type: string the string attribute allows you to associate a data value with an element. it is not used for any specific purpose, but you can access it with a script for your own use. ...
... gets and sets the value of the label attribute. persistence type: integer gets and sets the value of the persistence attribute. priority type: string gets and sets the value of the priority attribute. type type: string gets and sets the value of the type attribute. value type: string gets and sets the value of the value attribute. for
textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the
textbox.value and menulist.value syntax. methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect...
param - Archive of obsolete content
for more information, see query_parameters. attributes index, name, type attributes index type: integer the index within the sql statement of the parameter. name type: string the name of a parameter within the sql statement. this name should appear within the query preceded by a colon. ...
...pear within the query preceded by a colon. ...
...g string literal, the default value properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), get...
prefwindow - Archive of obsolete content
reaccept, ondialogaccept, ondialogcancel, ondialogdisclosure, ondialoghelp, onload, onunload, title, type properties buttons, currentpane, defaultbutton, lastselected, preferencepanes, type methods acceptdialog, addpane, canceldialog, centerwindowonscreen, getbutton, opensubdialog, openwindow, showpane examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="
text/css"?> <prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="saveoptions" label="backups"> <preferences> <preference id="pref-backup" name="myapp.mybackups" type="bool"/> <preference id="pref-backupduration" name="myapp.mybackups.duration" type="int"/> </preferences> <checkbox label="automatically save backups" preference="pref-...
...moreover this hides separator between titlebar and window contents. this only affects mac os x. buttonalign type: string the value of the align att...
.... ondialogdisclosure type: script code the code in this attribute is called when the "disclosure" button is pressed. ondialoghelp type: script code the code in this attribute is called when the "help" button is pressed. prefwindow.onload type: script code when a window finishes loading, it calls this event handler on the prefwindow element. title type: string the
text to appear in the title bar of the window. type type: string set this attribute to child for preference dialogs that are child dialogs of a main preferences window. this ensures that the preferences are only saved when the main dialog is closed, if this is the appropriate behaviour for the platform. properties buttons type: comma-separated list of the values below a comma...
radiogroup - Archive of obsolete content
matindex, insertitemat, removeitemat examples <radiogroup> <radio id="orange" label="red"/> <radio id="violet" label="green" selected="true"/> <radio id="yellow" label="blue"/> </radiogroup> attributes disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
...the tab order is the order in which the focus is moved when the user presses the "tab" key. elements with a higher tabindex are later in the tab sequence. value type: string the string attribute allows you to associate a data value with an element. it is not used for any specific purpose, but you can access it with a script for your own use. ...
...nt to the controlling container (i.e. the listbox, richlistbox, radiogroup, etc., not the list item that was selected) when it is changed either via this property, the selectedindex property, or changed by the user. tabindex type: integer gets and sets the value of the tabindex attribute. value type: string gets and sets the value of the value attribute. for
textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the
textbox.value and menulist.value syntax. methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect...
rule - Archive of obsolete content
et, the rule will only match the corresponding tag. this may be used to have separate rules for leaf and container nodes with different tags. parsetype type: string if this attribute is set to integer, the rule will only match rdf nodes with a parse type of integer. ...
...h rdf nodes with a parse type of integer. ...
... integer. ...
scale - Archive of obsolete content
left (for horizontal scales) or from bottom to top (for vertical scales). for other elements, they are placed right to left or bottom to top. this is reverse of the order in which they appear in the xul code. disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
...the tab order is the order in which the focus is moved when the user presses the "tab" key. elements with a higher tabindex are later in the tab sequence. value type: string the string attribute allows you to associate a data value with an element. it is not used for any specific purpose, but you can access it with a script for your own use. ...
... the min attribute. max type: integer gets and sets the value of the max attribute. pageincrement type: integer gets and sets the value of the pageincrement attribute. tabindex type: integer gets and sets the value of the tabindex attribute. value type: string gets and sets the value of the value attribute. for
textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the
textbox.value and menulist.value syntax. methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect...
scrollbar - Archive of obsolete content
pageincrement type: integer the amount by which the value of the curpos or value attribute changes when the tray of the scroll bar (the area in which the scroll bar thumb moves) is clicked, or when the page up or page down keys are pressed. the default value is 10. ...
...eys are pressed. the default value is 10. ...
...ue is 10. ...
toolbaritem - Archive of obsolete content
[ examples | attributes | properties | methods | related ] firefox only an item that appears on a toolbar. this element should wrap all customizable items (unless they're instances of toolbarbutton). if you don't need the thing you're placing in the toolbar to be customized then it doesn't need to be in a toolbaritem element. the element is used, for example, to hold the location bar's
textbox in firefox. it is also used to group buttons together so they can be added and removed all at once like firefox's unified-back-forward-button. examples <toolbaritem> <menulist label="bus"> <menupopup> <menuitem label="car"/> <menuitem label="taxi"/> <menuitem label="bus" selected="true"/> <menuitem label="train"/> </menupopup> </menulist> <...
... <toolbaritem id="sample-toolbutton-unified"> <toolbarbutton id="myext-button1" class="toolbarbutton-1" label="label1" /> <toolbarbutton id="myext-button2" class="toolbarbutton-1" label="labe2l" /> </toolbaritem> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-...
...u, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition,...
treeitem - Archive of obsolete content
d begin. thus, it should be placed on an element that is a descendant of a template. the value should be set to rdf:*. elements that appear inside the element with the attribute will be repeated for each node in the rdf datasource. elements outside will appear only once. ...
.... elements outside will appear only once. ...
...nly once. ...
wizard - Archive of obsolete content
tion is available in the xul tutorial. ...
...moreover this hides separator between titlebar and window contents. ...
...is inactive (background). moreover this hides separator between titlebar and window contents. this affects only on mac os x. lastpage type: boolean true if the wizard is on the last page. use the cancancel property to indicate to the user (by disabling the cancel button) that they cannot can pagestep type: integer the index of the current page. title type: string the
text to appear in the title bar of the window. windowtype type: string set to a string which can be used to identify the type of window. this might be used, for example, to distinguish between a browser window and an editor window. some of mozilla's window handling functions use this attribute to group windows of the same type together. values for window type as found on mxr: http://mxr.moz...
Getting started with XULRunner - Archive of obsolete content
specifying startup chrome window. the debugging preferences are discussed in debugging a xulrunner application step 7: create some xul finally, we need to create a simple xul window, which is described in the file main.xul. nothing fancy here, just the minimum we need to make a window. no menus or anything. ...
...xul is simple to use and quite powerful and can even be used on mobile devices.</description> </window> note: make sure there is no extra whitespace at the beginning of the xml/xul file the application also has a javascript file. ...
...n even be used on mobile devices.</description> </window> note: make sure there is no extra whitespace at the beginning of the xml/xul file the application also has a javascript file. most xul applications will include some external javascript, so the sample application does too, just to show how to include it into the xul file. main.js: function showmore() { document.getelementbyid("more-
text").hidden = false; } for more information about xul see: xul. for information about mixing html elements into your xul read adding html elements. step 8: run the application the moment of truth. we need to get xulrunner to launch the bare-bones application. windows from a windows command prompt opened to the myapp folder, we should be able to execute this: c:\path\to\xulrunner.exe appli...
Windows and menus in XULRunner - Archive of obsolete content
s and dtd, which i will discuss in a moment. <window> is the basic windowing element in xul. it has attributes to set the title/caption as well as to control its width and height. although i have not seen it mentioned yet, i am assuming that you can only have one <window> element per xul file. here is an example: <?xml version="1.0"?> <?xml-stylesheet href="chrome://basicapp/skin/main.css" type="
text/css"?> <!doctype window system "chrome://basicapp/locale/main.dtd"> <window id="main" title="&title;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script src="main.js"/> ... </window> notice the references to css and dtd files. the css is used to apply formatting to elements, just as it would in html. the dtd is used to create entity references so strings ...
..." title="&title;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script src="main.js"/> ... </window> notice the references to css and dtd files. the css is used to apply formatting to elements, just as it would in html. the dtd is used to create entity references so strings for titles and labels are not stored directly in the xul file; this makes updating the
text -- and localization of the application -- much easier. the window title is done this way in the above example. also notice the <script> element which is used to include the window’s javascript into the xul file. keeping css, dtd and javascript out of the xul file is considered a best practice. when you launch your xul application, you’ll notice that xulrunner gives your windows a default ico...
...ow icons. menus and toolbars most desktop applications are complex enough to require some sort of menu and/or toolbar to structure the application’s available commands. xul provides elements to support both menus and toolbars. ...
Extentsions FAQ - Archive of obsolete content
ls/x...dommodify.html request for a thunderbird extension that can automatically detect the default domain when composing e-mails via autodetect. <https://bugzilla.mozilla.org/show_bug.cgi?id=312818> "thunderbird requires domain in addresses and doesn't always add default" there is an extension that allows what you want attached to one of the comments in this bug. how to get the value of a
text box when a button is clicked? read http://developer.mozilla.org/en/docs/extension_faq and check if there are any errors in js console. friday, september 29 - october 6, 2006 (↑ top) is there anyway, via plugin or extension, for firefox to mimic the functionality of ie in this respect? the ietab (opens ie in a firefox tab) should be able do this if you set it to always open "file://*" urls...
...functionality of ie in this respect? the ietab (opens ie in a firefox tab) should be able do this if you set it to always open "file://*" urls in an ie tab. the appearance with a firefox tab isn't quite the same as having a completely separate explorer window. however, it's functional and does allow for the explorer to be handling the display of the folder contents, and all of the right-click con
text menu support is present so it should meet my needs. what is the valid location and things needed to to release a mozilla extension on mozallia site? you must remove updateurl from the install.rdf and use a known to amo minversion/maxversion. no confirmation that the answer given worked yet. is it possible to open the url in a new tab? var tab = gbrowser.addtab( url ); // and if you wa...
... asking about the feasibility of making an extension that has the same functionality as “trace route”. friday, september 29 - october 6, 2006 (↑ top) how can we programmatically extract the subject, sender, date and the body of an e- mail when you are reading one (in thunderbird presumably)? could someone make an addressbook enhancer extension that has the ability to put pict...
XForms Output Element - Archive of obsolete content
result is used as the output's value. if binding attributes are present on the control then the value attribute is is ignored. type restrictions the output element can be bound to a node containing simple content of any data type. ...
...ontrol then the value attribute is is ignored. type restrictions the output element can be bound to a node containing simple content of any data type. representations the xforms output element can be represented by the following widgets for the specified data types (or types derived from these data types):
text - default representation for instance data of most types, especially static
text (xhtml/xul). calendar - used to represent instance data of type date (xhtml/xul). image - if the instance node contains an image, then an output element can be used in combination with the mediatype element to display the image (fx 3.0 only, xhtml/xul).
text displaying the data as
text is the default presentation. xforms output is most often used when a form author needs to render simple tex...
...data of type date (xhtml/xul). image - if the instance node contains an image, then an output element can be used in combination with the mediatype element to display the image (fx 3.0 only, xhtml/xul).
text displaying the data as
text is the default presentation. xforms output is most often used when a form author needs to render simple
text of an instance node (xhtml/xul). characteristics
text is presented to the user when there is no type given for the bound node or a type is specified that is not handled by one of the other widgets (as documented below). analogous widgets are <xhtml:span/> and <xul:description/> calendar a form author may notice a xforms output element represented by a calendar widget in the mozilla xforms processor if the control meets the following criteria (xh...
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
will appear to ignore inheritance of font styles into tables from parent elements. find out why this happens and how to fix it in documents that have to remain in quirks mode. in version 4 browsers such as netscape navigator 4.x and internet explorer 4.x, tables generally "broke" the inheritance of font styling. if the author had set a font size on the body element, for example, the font size of
text within a table would match the user's default, not the body style. this led to a number of workarounds which were designed to cater to these bugs, and also to gecko-based browsers emulating the behavior in some cases. fortunately, the behavior can be overcome in all cases with a single css2 rule. tables and inheritance in css terms, tables are like any other element when it comes to inheritance...
... the behavior in some cases. fortunately, the behavior can be overcome in all cases with a single css2 rule. tables and inheritance in css terms, tables are like any other element when it comes to inheritance. if a css property can be inherited, then table elements and their components (tr, td, etc.) should inherit just as any other element would. for example, if an author writes: <style type="
text/css"> body {font-size: 11px;} </style> ...then the
text inside table cells should also be 11 pixels in size. browsers from the version-four era, however, treated tables differently. in these browsers, a table's
text would be the same size as the user's default settings, regardless of the css assigned to ancestor elements such as body. this represented a violation of css inheritance rules, and l...
...ide table cells should also be 11 pixels in size. browsers from the version-four era, however, treated tables differently. in these browsers, a table's
text would be the same size as the user's default settings, regardless of the css assigned to ancestor elements such as body. this represented a violation of css inheritance rules, and led many authors to create workarounds such as: <style type="
text/css"> body, table, td {font-size: 11px;} </style> recreating legacy behavior to avoid "breaking" older pages that were authored with old-browser behaviors in mind, mozilla and related browsers will mimic old browsers when in "quirks" mode. to do this, the gecko rendering engine uses the following rule in the quirk.css user agent file: /* quirk: cut off all font inheritance in tables and captio...
Issues Arising From Arbitrary-Element hover - Archive of obsolete content
led to some sloppy authoring practices that are now causing problems for some web sites. this technote explains the source of the problems and how to avoid encountering them. many authors make use of the css2 pseudo-class :hover to style their links. this innovation, first introduced by microsoft® internet explorer and later adopted into the css specification, is very popular for the styling of
text links, particularly those that are supposed to look and act like javascript-driven "rollovers." however, advancing css support in browsers has caused some unexpectedly aggressive hovering behavior on some pages. hover and non-link elements section 5.11.3 of css2 defines the three dynamic pseudo-classes (:hover, :active, and :focus) and then goes on to say: css doesn't define which elements may...
... the second piece of the problem comes when we consider the effects of a "bare" pseudo-class in a selector. for example: :hover {color: red;} this is equivalent to the css2 rule: *:hover {color: red;} ..which translates as "any element that is being hovered should have its foreground colored red." thus, hovering over paragraphs, tables, headings, and any other element in a document will cause
text to become red. a common variant is to use a bare class and hover pseudo-class together, like this: .nav:hover {color: red;} in situations where the only instances of the class value nav are applied to hyperlinks, this will work fine. however, rules of this type are usually seen in conjunction with markup like this: <td class="nav"> <a href="one.html" class="nav">one</a> | <a href="two.html" c...
...t, there is the problem of authors who open a named anchor but do not close it. for example: <a name="pagetop"> <h2>my page</h2> without a </a>, this name will effectively enclose the rest of the document. this generally means that the rest of the document will take hover styles. consider the effects of the following rule: a:hover {color: red;} in a document with an unclosed named anchor, any
text that follows the anchor's open tag will be colored red (unless another css rule intervenes). this brings up the second common problem, which is that named anchors can accept hover styles. although authors may intend the selector a:hover to apply only to hyperlinks, it will also apply to named anchors, since the selector merely states that any a element which is in a hover state will be styled. i...
Mozilla's DOCTYPE sniffing - Archive of obsolete content
ctype declaration to determine strict mode vs. quirks mode. the code that makes this determination is currently in determineparsemode() in nsparser.cpp. see bug 1312 and bug 55264 for some of the history of the mode determination. see bug 153032 for the creation of the almost-standards mode around mozilla 1.0. the goals that led to choosing this behavior were the following: almost all existing
text/html pages on the web that need to be in quirks mode to be displayed correctly should be displayed using quirks mode. (almost all, rather than all, to allow for the following points as well.) authors writing web pages to current standards should be able to trigger strict mode. pages written using any public identifiers in doctype declarations that appear in the future should be displayed using ...
...ny public identifiers in doctype declarations that appear in the future should be displayed using strict mode. in other words, the algorithm is the best approximation we can find for determining which pages were written after mozilla became a known important user-agent on the web. full standards mode the following trigger full standards mode: any document sent with an xml mime type such as
text/xml, application/xml, or application/xhtml+xml (since sniffing only occurs for documents sent as
text/html). any "doctype html system" as opposed to "doctype html public", except for the ibm doctype noted below a doctype declaration without a dtd, i.e., <!doctype html>. a doctype declaration with an internal subset. any unknown doctype, which should include the following (technically known) d...
... without a dtd, i.e., <!doctype html>. a doctype declaration with an internal subset. any unknown doctype, which should include the following (technically known) doctypes: the public identifier "-//w3c//dtd html 4.01//en". the public identifier "-//w3c//dtd html 4.0//en". the public identifier "-//w3c//dtd xhtml 1.0 strict//en". the public identifier "iso/iec 15445:2000//dtd hyper
text markup language//en". the public identifier "iso/iec 15445:2000//dtd html//en". the public identifier "-//ietf//dtd html i18n//en". almost standards mode the following trigger almost standards mode. almost standards mode was created after 1.0 and 1.1alpha, but before 1.0.1 and 1.1beta. before almost standards mode was created these doctypes triggered full standards mode. the publ...
Index - Game development
with three.js 3d, animation, beginner, canvas, games, tutorial, webgl, camera, lighting, rendering, three.js in this article we'll take you through the real basics of using three, including setting up a development environment, structuring the necessary html, the fundamental objects of three, and how to build up a basic demo. ...
...glsl is executed directly by the graphics pipeline. ...
......
2D collision detection - Game development
1.x + rect1.width > rect2.x && rect1.y < rect2.y + rect2.height && rect1.y + rect1.height > rect2.y) { // collision detected! } // filling in the values => if (5 < 30 && 55 > 20 && 5 < 20 && 55 > 10) { // collision detected! } rect code <div id="cr-stage"></div> <p>move the rectangle with arrow keys. ...
.... circle collision another simple shape for collision detection is between two circles. this algorithm works by taking the centre points of the two circles and ensuring the distance between the centre points are less than the two radii added together. playable code <div id="cr-stage"></div> <p>move the circle with arrow keys. ...
...px !important; } crafty.init(200, 200); var dim1 = {x: 5, y: 5} var dim2 = {x: 20, y: 20} crafty.c("circle", { circle: function(radius, color) { this.radius = radius; this.w = this.h = radius * 2; this.color = color || "#000000"; this.bind("move", crafty.drawmanager.drawall) return this; }, draw: function() { var ctx = crafty.canvas.con
text; ctx.save(); ctx.fillstyle = this.color; ctx.beginpath(); ctx.arc( this.x + this.radius, this.y + this.radius, this.radius, 0, math.pi * 2 ); ctx.closepath(); ctx.fill(); ctx.restore(); } }); var circle1 = crafty.e("2d, canvas, circle").attr(dim1).circle(15, "red"); var circle2 = c...
Track the score and win - Game development
ally you can impress your friends. you need a variable to record the score. add the following into your javascript, after the rest of your variables: var score = 0; you also need a drawscore() function, to create and update the score display. ...
...ed a variable to record the score. add the following into your javascript, after the rest of your variables: var score = 0; you also need a drawscore() function, to create and update the score display. ...
... after the collisiondetection() function: function drawscore() { ctx.font = "16px arial"; ctx.fillstyle = "#0095dd"; ctx.fill
text("score: "+score, 8, 20); } drawing
text on a canvas is similar to drawing a shape. the font definition looks exactly like the one in css — you can set the size and font type in the font() method. then use fillstyle() to set the color of the font and fill
text() to set the actual
text that will be placed on the canvas, and where it will be placed. the first parameter is the
text itself — the code above shows the current number of points — and the last two parameters are the coordinates where the
text will be placed on the canvas. to award a score each time a brick is hit, add a line to the collisiondetection() function to increment the value of th...
Selector (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
h. the matching elements will have the rule's specified style applied to them. ...
...ectors here are "p" (which applies the color green to the
text inside any <p> element), "div.warning" (which makes any <div> element with the class "warning" look like a warning box), and "#customized", which sets the base font of the element with the id "customized" to 16-pixel tall lucida grande or one of a few fallback fonts. ...
...ning" look like a warning box), and "#customized", which sets the base font of the element with the id "customized" to 16-pixel tall lucida grande or one of a few fallback fonts. ...
Intrinsic Size - MDN Web Docs Glossary: Definitions of Web-related terms
, if no external factors were applied to it. for example, inline elements are sized intrinsically: width, height, and vertical margin and padding have no impact, though horizontal margin and padding do. how intrinsic sizes are calculated is defined in the css intrinsic and extrinsic sizing specification. intrinsic sizing takes into account the min-content and max-content size of an element. for
text the min-content size would be if the
text wrapped as small as it can in the inline direction without causing an overflow, doing as much soft-wrapping as possible. for a box containing a string of
text, the min-content size would be defined by the longest word. the keyword value of min-content for the width property will size an element according to the min-content size. the max-content size is t...
...the keyword value max-content exposes this behavior. ...
...ll as it can in the inline direction without causing an overflow, doing as much soft-wrapping as possible. for a box containing a string of
text, the min-content size would be defined by the longest word. the keyword value of min-content for the width property will size an element according to the min-content size. the max-content size is the opposite — in the case of
text, this would have the
text display as wide as possible, doing no soft-wrapping, even if an overflow was caused. the keyword value max-content exposes this behavior. ...
Cascade and inheritance - Learn web development
e again have two rules that could apply to the h1. the below h1 ends up being colored red — the class selector gives its rule a higher specificity, and so it will be applied even though the rule with the element selector appears further down in the source order. we'll explain specificity scoring and other such things later on. inheritance inheritance also needs to be understood in this con
text — some css property values set on parent elements are inherited by their child elements, and some aren't. for example, if you set a color and font-family on an element, every element inside it will also be styled with that color and font, unless you've applied different color and font values directly to them. some properties do not inherit — for example if you set a width of 50% on an el...
...d as you'll notice, we have included their specificity values in a comment before each one. the first two selectors are competing over the styling of the link's background color — the second one wins and makes the background color blue because it has an extra id selector in the chain: its specificity is 201 vs. 101. the third and fourth selectors are competing over the styling of the link's
text color — the second one wins and makes the
text white because although it has one less element selector, the missing selector is swapped out for a class selector, which is worth ten rather than one. so the winning specificity is 113 vs. 104. selectors 5–7 are competing over the styling of the link's border when hovered. selector six clearly loses to five with a specificity of 23 vs. 24 — it...
...r back here if you start to come across strange issues with styles not applying as expected. it could be a specificity issue. ...
Organizing your CSS - Learn web development
elements, they can come in this section. /* || utilities */ .nobullets { list-style: none; margin: 0; padding: 0; } ... then we can add everything that is used sitewide. that might be things like the basic page layout, the header, navigation styling, and so on. /* || sitewide */ .main-nav { ... } .logo { ... } finally we will include css for specific things, broken down by the con
text, page or even component in which they are used. /* || store pages */ .product-listing { ... } .product-box { ... } by ordering things in this way, we at least have an idea in which part of the stylesheet we will be looking for something that we want to change. avoid overly-specific selectors if you create very specific selectors you will often find that you need to duplicate chunks of your...
...lock it is in. a modifier is a flag on a block or element that changes the styling or behavior. you will be able to recognise code that uses bem due to the extensive use of dashes and underscores in the css classes. for example, look at the classes applied to this html from the page about bem naming conventions: <form class="form form--theme-xmas form--simple"> <input class="form__input" type="
text" /> <input class="form__submit form__submit--disabled" type="submit" /> </form> the additional classes are similar to those used in the oocss example, however they use the strict naming conventions of bem. bem is widely used in larger web projects and many people write their css in this way. it is likely that you will come across examples, even in tutorials, that use bem syntax, witho...
...e our css cookbook for patterns to use, and read more in some of the specific guides such as our guide to css grid layout. ...
Multiple-column layout - Learn web development
cursus viverra quis vestibulum sem. aliquam tincidunt eget purus in interdum. cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> </div> .container { column-width: 200px; } styling the columns the columns created by multicol cannot be styled individually. there is no way to make one column bigger than other columns, or to change the background or
text color of a single column. you have two opportunities to change the way that columns display: changing the size of the gap between columns using the column-gap. adding a rule between columns with column-rule. using your example above, change the size of the gap by adding a column-gap property: .container { column-width: 200px; column-gap: 20px; } you can play around with different valu...
...nt behaves in paged media — such as when you print a webpage. when you turn your content into a multicol container it is fragmented into columns, and the content breaks to allow this to happen. sometimes, this breaking will happen in places that lead to a poor reading experience. in the live example below, i have used multicol to lay out a series of boxes, each of which have a heading and some
text inside. the heading becomes separated from the
text if the columns fragment between the two. cards example body { width: 90%; max-width: 900px; margin: 2em auto; font: .9em/1.2 arial, helvetica, sans-serif; } <div class="container"> <div class="card"> <h2>i am the heading</h2> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit. nulla luctus aliqu...
...rder: 2px solid rgb(79, 185, 227); padding: 10px; margin: 0 0 1em 0; } to control this behavior we can use properties from the css fragmentation specification. this specification gives us properties to control breaking of content in multicol and in paged media. for example, add the property break-inside with a value of avoid to the rules for .card. this is the container of the heading and
text, and therefore we do not want to fragment this box. at the present time it is also worth adding the older property page-break-inside: avoid for best browser support. .card { break-inside: avoid; page-break-inside: avoid; background-color: rgb(207,232,220); border: 2px solid rgb(79,185,227); padding: 10px; margin: 0 0 1em 0; } reload the page and your boxes should stay in one piece...
Normal Flow - Learn web development
l-tb) — each one will appear on a new line below the last one, and they will be separated by any margin that is set on them. in english therefore, or any other horizontal, top to bottom writing mode, block-level elements are laid out vertically. inline elements behave differently — they don't appear on new lines; instead, they sit on the same line as one another and any adjacent (or wrapped)
text content, as long as there is space for them to do so inside the width of the parent block level element. if there isn't space, then the overflowing
text or elements will move down to a new line. if two adjacent elements both have the margin set on them and the two margins touch, the larger of the two remains, and the smaller one disappears — this is called margin collapsing, and we have met th...
...of our parent element, and we are as tall as our child content. our total width and height is our content + padding + border width/height.</p> <p>we are separated by our margins. ...
...>we are separated by our margins. because of margin collapsing, we are separated by the width of one of our margins, not both.</p> <p>inline elements <span>like this one</span> and <span>this one</span> sit on the same line as one another, and adjacent
text nodes, if there is space on the same line. ...
What is a URL? - Learn web development
this article discusses uniform resource locators (urls), explaining what they are and how they're structured. prerequisites: you need to first know how the internet works, what a web server is and the concepts behind links on the web. objective: you will learn what a url is and how it works on the web. summary with hyper
text and http, url is one of the key concepts of the web. it is the mechanism used by browsers to retrieve any published resource on the web. url stands for uniform resource locator. a url is nothing more than the address of a given unique resource on the web. in theory, each valid url points to a unique resource. such resources can be an html page, a css document, an image, etc. in practice, there are some exceptions, the most common...
...nger supported by modern browsers. other technologies, such as css or javascript, use urls extensively, and these are really the heart of the web. absolute urls vs relative urls what we saw above is called an absolute url, but there is also something called a relative url. let's examine what that distinction means in more detail. the required parts of a url depend to a great extent on the con
text in which the url is used. in your browser's address bar, a url doesn't have any con
text, so you must provide a full (or absolute) url, like the ones we saw above. you don't need to include the protocol (the browser uses http by default) or the port (which is only required when the targeted web server is using some unusual port), but all the other parts of the url are necessary. when a url is use...
...ready has the document's own url, it can use this information to fill in the missing parts of any url available inside that document. we can differentiate between an absolute url and a relative url by looking only at the path part of the url. if the path part of the url starts with the "/" character, the browser will fetch that resource from the top root of the server, without reference to the con
text given by the current document. let's look at some examples to make this clearer. examples of absolute urls full url (the same as the one we used before) https://developer.mozilla.org/docs/learn implicit protocol //developer.mozilla.org/docs/learn in this case, the browser will call that url with the same protocol as the one used to load the document hosting that url. implicit d...
What is accessibility? - Learn web development
stomers. what can the people in brazil do with your english website? can the people with smartphones browse a heavy, cluttered website designed for a large desktop monitor and unlimited bandwidth? they'll go somewhere else. in general, we must think about our product from the viewpoints of all our target customers, and adapt accordingly. hence accessibility. web accessibility in the specific con
text of the web, accessibility means that anyone can benefit from your content, regardless of disability, location, technical limitations, or other circumstances. let's consider video: hearing impairment how does a hearing-impaired person benefit from a video? you have to provide subtitles —or even better, a full
text transcript. also, make sure people can adjust the volume to accommodate thei...
...fit from your content, regardless of disability, location, technical limitations, or other circumstances. let's consider video: hearing impairment how does a hearing-impaired person benefit from a video? you have to provide subtitles —or even better, a full
text transcript. also, make sure people can adjust the volume to accommodate their unique needs. visual impairment again, provide a
text transcript that a user can consult without needing to play the video, and an audio-description (an off-screen voice that describes what is happening in the video). pausing capacity users may have trouble understanding someone in a video. let them pause the video to read the subtitles or process the information. keyboard capacity let the user tab into/out of a video, play it, and pause it with...
...ity users may have trouble understanding someone in a video. let them pause the video to read the subtitles or process the information. keyboard capacity let the user tab into/out of a video, play it, and pause it without being trapped in it. the basics of web accessibility a few necessities for basic web accessibility include: whenever your site needs an image to convey meaning, include
text as an alternative for visually-challenged users or those with slow connections. make sure all users can operate graphical interfaces (like unfolding menus) solely with a keyboard (e.g., with tab and the return key). provide an attribute explicitly specifying your content's language, so that screen readers read your
text properly. make sure that a user can navigate to all widgets on a page sole...
Example 1 - Learn web development
5px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap;
text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box;
text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; ...
...5px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap;
text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box;
text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; ...
... 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0, 0, 0, .45); /* 0 1px 2px */ background : #f0f0f0; background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap;
text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; box-sizing : border-box;
text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optlis...
Sending form data - Learn web development
ctionality yourself from scratch, and will save you a lot of time. note: it is beyond the scope of this article to teach you any server-side languages or frameworks. the links above will give you some help, should you wish to learn them. a special case: sending files sending files with html forms is a special case. files are binary data — or considered as such — whereas all other data is
text data. because http is a
text protocol, there are special requirements for handling binary data. the enctype attribute this attribute lets you specify the value of the content-type http header included in the request generated when the form is submitted. this header is very important because it tells the server what kind of data is being sent. by default, its value is application/x-www-form-urle...
...orm-urlencoded. in human terms, this means: "this is form data that has been encoded into url parameters." if you want to send files, you need to take three extra steps: set the method attribute to post because file content can't be put inside url parameters. set the value of enctype to multipart/form-data because the data will be split into multiple parts, one for each file plus one for the
text data included in the form body (if
text is also entered into the form). include one or more <input type="file"> controls to allow your users to select the file(s) that will be uploaded. for example: <form method="post" action="https://www.foo.com" enctype="multipart/form-data"> <div> <label for="file">choose a file</label> <input type="file" id="file" name="myfile"> </div> <div>...
... far beyond this guide, but there are a few rules to keep in mind. the most important rule is: never ever trust your users, including yourself; even a trusted user could have been hijacked. all data that comes to your server must be checked and sanitized. always. no exception. escape potentially dangerous characters. the specific characters you should be cautious with vary depending on the con
text in which the data is used and the server platform you employ, but all server-side languages have functions for this. things to watch out for are character sequences that look like executable code (such as javascript or sql commands). limit the incoming amount of data to allow only what's necessary. sandbox uploaded files. store them on a different server and allow access to the file only throug...
Dealing with files - Learn web development
when you're building a website, you need to assemble these files into a sensible structure on your local computer, make sure they can talk to one another, and get all your content looking right before you eventually upload them to a server. dealing with files discusses some issues you should be aware of so you can set up a sensible file structure for your website. ...
...ewer problems later down the road. what structure should your website have? next, let's look at what structure our test site should have. the most common things we'll have on any website project we create are an index html file and folders to contain images, style files, and script files. let's create these now: index.html: this file will generally contain your homepage content, that is, the
text and images that people see when they first go to your site. using your
text editor, create a new file called index.html and save it just inside your test-site folder. images folder: this folder will contain all the images that you use on your site. create a folder called images, inside your test-site folder. styles folder: this folder will contain the css code used to style your content (for ex...
...create a folder called styles, inside your test-site folder. scripts folder: this folder will contain all the javascript code used to add interactive functionality to your site (e.g. buttons that load data when clicked). create a folder called scripts, inside your test-site folder. ...
Installing basic software - Learn web development
c software, we show you what tools you need to do simple web development and how to install them properly. what tools do the professionals use? a computer. maybe that sounds obvious to some people, but some of you are reading this article on your phone or a library computer. for serious web development, it's better to invest in a desktop or laptop computer running windows, macos or linux. a
text editor, to write code in. this could be a
text editor (e.g. visual studio code, notepad++, sublime
text, atom, gnu emacs, or vim), or a hybrid editor (e.g. dreamweaver or webstorm). office document editors are not suitable for this use, as they rely on hidden elements that interfere with the rendering engines used by web browsers. web browsers, to test code in. currently, the most-used browsers ...
...his use, as they rely on hidden elements that interfere with the rendering engines used by web browsers. web browsers, to test code in. currently, the most-used browsers are firefox, chrome, opera, safari, internet explorer and microsoft edge. you should also test how your site performs on mobile devices and on any old browsers your target audience may still be using (such as ie 8–10.) lynx, a
text-based terminal web browser, is great for seeing how your site is experienced by visually-impaired users. a graphics editor, like gimp, figma, paint.net, photoshop, or xd, to make images or graphics for your web pages. a version control system, to manage files on servers, collaborate on a project with a team, share code and assets and avoid editing conflicts. right now, git is the most popular v...
.... a framework tend to take this idea further, offering a complete system with some custom syntaxes for you to write a web app on top of. more tools besides! what tools do i actually need, right now? that looks like a scary list, but fortunately, you can get started in web development without knowing anything about most of these. in this article, we'll just set you up with a bare minimum — a
text editor and some modern web browsers. installing a
text editor you probably already have a basic
text editor on your computer. by default windows includes notepad and macos comes with
textedit. linux distros vary; ubuntu comes with gedit by default. for web development, you can probably do better than notepad or
textedit. we recommend starting with visual studio code, which is a free editor, th...
Getting started with the Web - Learn web development
to begin some basic web development. what will your website look like? before you start writing the code for your website, you should plan it first. what information are you showcasing? what fonts and colors are you using? what will your website look like? we outline a simple method you can follow to plan out your site's content and design. ...
...esign. dealing with files a website consists of many files:
text content, code, stylesheets, media content, and so on. when you're building a website, you need to assemble these files into a sensible structure and make sure they can talk to one another. dealing with files explains how to set up a sensible file structure for your website and what issues you should be aware of. html basics hyper
text markup language (html) is the code that you use to structure your web content and give it meaning and purpose. for example, is my content a set of paragraphs or a list of bullet points? do i have images inserted on my page? do i have a data table? without overwhelming you, html basics provides enough information to make you familiar with html. css basics cascading stylesheets (css) is the code ...
...r web content and give it meaning and purpose. for example, is my content a set of paragraphs or a list of bullet points? do i have images inserted on my page? do i have a data table? without overwhelming you, html basics provides enough information to make you familiar with html. css basics cascading stylesheets (css) is the code that you use to style your website. for example, do you want the
text to be black or red? where should content be drawn on the screen? what background images and colors should be used to decorate your website? css basics takes you through what you need to get started. javascript basics javascript is the programming language that you use to add interactive features to your website. some examples could be games, things that happen when buttons are pressed or data i...
Define terms with HTML - Learn web development
sunny day. the clear blue sky of a subtle sadness, melancholy. i'm feeling blue but we're constantly defining keywords informally, as here: firefox is the web browser created by the mozilla foundation. to deal with these use cases, html provides tags to mark descriptions and words described, so that your meaning gets across properly to your readers. how to mark informal description in
textbooks, the first time a keyword occurs, it's common to put the keyword in bold and define it right away. we do that in html too, except html is not a visual medium and so we don't use bold. we use <dfn>, which is a special element just for marking the first occurrence of keywords. note that <dfn> tags go around the word to be defined, not the definition (the definition consists of the entire para...
...lf is a concept foreign to html, but there are tags for indicating emphasis. special case: abbreviations it's best to mark abbreviations specially with <abbr>, so that screen readers read them appropriately and so that you can operate on all abbreviations uniformly. just as with any new keyword, you should define your abbreviations the first time they occur. <p> <dfn><abbr>html</abbr> (hyper
text markup language)</dfn> is a description language used to structure documents on the web. </p> the html spec does indeed set aside the title attribute for expanding the abbreviation. however, this is not an acceptable alternative for providing an inline expansion. the contents of title are completely hidden from your users, unless they're using a mouse and they happen to hover over the abbrev...
... than the whole paragraph, you can use the aria-describedby attribute to associate a term more formally with its definition: <p> <span id="ff"> <dfn aria-describedby="ff">firefox</dfn> is the web browser created by the mozilla foundation. </span> you can download it at <a href="http://www.mozilla.org">mozilla.org</a> </p> assistive technology can often use this attribute to find a
text alternative to a given term. you can use aria-describedby on any tag enclosing a keyword to be defined (not just the <dfn> element). aria-describedby references the id of the element containing the description. how to build a description list description lists are just what they claim to be: a list of terms and their matching descriptions (e.g., definition lists, dictionary entries, faqs, and k...
Use HTML to solve common problems - Learn web development
the following links point to solutions to common everyday problems you'll need to solve with html. basic structure the most basic application of html is document structure. if you're new to html you should start with this. ...
...de a webpage into logical sections how to set up a proper structure of headings and paragraphs basic
text-level semantics html specializes in providing semantic information for a document, so html answers many questions you might have about how to get your message across best in your document. ...
...ed tabular data, needs to be organized into tables with columns and rows. it's one of the most complex html structures, and mastering it is not easy: how to create a data table how to make html tables accessible data representation how to represent numeric and code values with html — see superscript and subscript, and representing computer code. how to use data attributes advanced
text semantics how to take control of html line breaking how to mark changes (added and removed
text) — see the <ins> and <del> elements. advanced images & multimedia how to add a responsive image to a webpage how to add vector image to a webpage how to add a hit map on top of an image internationalization html is not monolingual. it provides tools to handle common internationalization...
Structuring a page of content - Learn web development
ments to it so it can have a page layout applied to it. it needs to have: a header spanning the full width of the site containing the main title for the page, the site logo, and the navigation menu. the title and logo appear side by side once styling is applied, and the navigation appears below those two items. a main content area containing two columns — a main block to contain the welcome
text, and a sidebar to contain image thumbnails. a footer containing copyright information and credits. you need to add a suitable wrapper for: the header the navigation menu the main content the welcome
text the image sidebar the footer you should also: apply the provided css to the page by adding another <link> element just below the existing one provided at the start. hints and ti...
...itor (as mentioned in step 1 above). this is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code. ...
...od practice to get into — it's very hard to help someone with a coding problem if you can't see their code. ...
Test your skills: Multimedia and embedding - Learn web development
this page. multimedia and embedding 1 in this task we want you to embed a simple audio file onto the page. you need to: add the path to the audio file to an appropriate attribute to embed it on the page. the audio is called audio.mp3, and it is in a folder inside the current folder called media. add an attribute to make browsers display some default controls. add some appropriate fallback
text for browsers that don't support <audio>. try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online editor. multimedia and embedding 2 in this task we want you to mark up a slightly more complex video player, with multiple sources, subtitles, and other features besides. you need to: add an att...
...te the finished example: download the starting point for this task to work in your own editor or in an online editor. multimedia and embedding 2 in this task we want you to mark up a slightly more complex video player, with multiple sources, subtitles, and other features besides. you need to: add an attribute to make browsers display some default controls. add some appropriate fallback
text for browsers that don't support <video>. add multiple sources, containing the paths to the video files. the files are called video.mp4 and video.webm, and are in a folder inside the current folder called media. let the browser know in advance what video formats the sources point to, so it can make an informed choice of which one to download ahead of time. give the <video> a width and height eq...
...ideo files. the files are called video.mp4 and video.webm, and are in a folder inside the current folder called media. let the browser know in advance what video formats the sources point to, so it can make an informed choice of which one to download ahead of time. give the <video> a width and height equal to its intrinsic size (320 by 240 pixels). make the video muted by default. display the
text tracks contained in the media folder, in a file called subtitles_en.vtt, when the video is playing. you must explicitly set the type as subtitles, and the subtitle language to english. try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online editor. multimedia and embedding 3 for this final tas...
Test your skills: Functions - Learn web development
there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascript console, in the case of the downloadable version). dom manipulation: considered useful some of the questions below require you to write some dom manipulation code to complete them — such as creating new html elements, setting their
text contents to equal specific string values, and nesting them inside existing elements on the page — all via javascript. we haven't explicitly taught this yet in the course, but you'll have seen some examples that make use of it, and we'd like you to do some research into what dom apis you need to successfully answer the questions. a good starting place is our manipulating documents tutorial. fu...
...d array (names) to the provided paragraph (para), and then run it once. try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online editor. functions 2 for our second functions-related task, you need to create a function that draws a rectangle on the provided <canvas> (reference variable canvas, con
text available in ctx), based on the five provided input variables: x — the x coordinate of the rectangle. y — the y coordinate of the rectangle. width — the width of the rectangle. height — the height of the rectangle. color — the color of the rectangle. you'll want to clear the canvas before drawing, so that when the code is updated in the case of the live version, you don't get l...
...m number into a separate function called random(), which takes as parameters two generic bounds that the random number should be between, and returns the result. update the choosename() function so that it makes use of the random number function, takes the array to choose from as a parameter (making it more flexible), and returns the result. print the returned result into the paragraph (para)'s
textcontent. try updating the live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online editor. assessment or further help you can practice these examples in the interactive editors above. if you would like your work assessed, or are stuck and want to ask for help: put your work into an online shareable editor s...
JavaScript object basics - Learn web development
'hazel'; person.farewell = function() { alert("bye everybody!"); } you can now test out your new members: person['eyes'] person.farewell() one useful aspect of bracket notation is that it can be used to set not only member values dynamically, but member names too. let's say we wanted users to be able to store custom value types in their people data, by typing the member name and value into two
text inputs. we could get those values like this: let mydataname = nameinput.value; let mydatavalue = namevalue.value; we could then add this new member name and value to the person object like this: person[mydataname] = mydatavalue; to test this, try adding the following lines into your code, just below the closing curly brace of the person object: let mydataname = 'height'; let mydatavalue = '1...
... what is "this"? you may have noticed something slightly strange in our methods. look at this one for example: greeting: function() { alert('hi! i\'m ' + this.name.first + '.'); } you are probably ...
...ring what "this" is. the this keyword refers to the current object the code is being written inside — so in this case this is equivalent to person. so why not just write person instead? as you'll see in the object-oriented javascript for beginners article, when we start creating constructors and so on, this is very useful — it always ensures that the correct values are used when a member's con
text changes (for example, two different person object instances may have different names, but we want to use their own name when saying their greeting). let's illustrate what we mean with a simplified pair of person objects: const person1 = { name: 'chris', greeting: function() { alert('hi! i\'m ' + this.name + '.'); } } const person2 = { name: 'deepti', greeting: function() { al...
Test your skills: JSON - Learn web development
ll be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascript console, in the case of the downloadable version). json 1 the one and only task in this article concerns accessing json data and using it in your page. json data about some mother cats and their kittens is available in sample.json. the json is loaded into the page as a
text string and made available in the catstring parameter of the displaycatinfo() function, called when the provided promise chain (which starts by fetching the json data) is fulfilled. your task is to fill in the missing parts of the displaycatinfo() function to store: the names of the three mother cats, separated by commas, in the motherinfo variable. the total number of kittens, and how many ar...
...ur task is to fill in the missing parts of the displaycatinfo() function to store: the names of the three mother cats, separated by commas, in the motherinfo variable. the total number of kittens, and how many are male and female, in the kitteninfo variable. the values of these variables are then printed to the screen inside paragraphs. some hints/questions: the json data is provided as
text inside the displaycatinfo() function. you'll need to parse it into json before you can get any data out of it. you'll probably want to use an outer loop to loop through the cats and add their names to the motherinfo variable string, and an inner loop to loop through all the kittens, add up the total of all/male/female kittens, and add those details to the kitteninfo variable string. the last mo...
...gh the cats and add their names to the motherinfo variable string, and an inner loop to loop through all the kittens, add up the total of all/male/female kittens, and add those details to the kitteninfo variable string. the last mother cat name should have an "and" before it, and a full stop after it. how do you make sure this can work, no matter how many cats are in the json? why are the para1.
textcontent = motherinfo; and para2.
textcontent = kitteninfo; lines inside the displaycatinfo() function, and not at the end of the script? this has something to do with async code. try updating the live code below to recreate the finished example: warning: to answer this question, you'll need to write your code into the live code window above. the example won't work locally, or in an environmen...
Perceived performance - Learn web development
ex. first paint is reported by the browser and provides the time, in ms, of when the page starts changing; but this change can be a simple background color update or something even less noticable. it doesn’t indicate completeness and may report a time when nothing visible is painted. first contentful paint (fcp) reports the time when the browser first rendered anything of signifigance, be that
text, foreground or background image, or a canvas or svg; capturing the very beginning of the loading experience. but, just because there's content, doesn't mean it's useful content or that the user has content to consume. the first meaningful paint, or fmp, is the when content appears on the screen that is actually meaningful; which is a better metric for user-perceived loading experience, but still ...
...nd, the weight of all your assets hasn't improved -- in fact, you may need to add some code -- but because the download of non-immediately necessary assets are delayed in a manner that is not perceptible the the user, the user will feel like the download was faster. to minimize the assets required for initial load, separate interactive functionality from content so that required content -- the
text, styles, and images visible at initial load -- can be loaded first. delay, or lazy load, the rest of the assets. don't load images or scripts that aren’t used or visible on the initial page load. either delay their load, loading them when the page becomes usable, or, loading them when they become necessary. loading additional assets and resources after initial page load improves perceived perf...
...resize, especially after the site has become interactive. avoid font file delays font use can both help and harm user experience. selecting the right fonts is an art form, and can greatly improve the user experience. fonts can also harm user experience, especially if the fonts used need to be imported, and if the importing is not optimal, or if comic sans is used (kidding). flicker of unstyled
text and missing
text both harm performance. make fallback fonts the same size and weight so that when fonts load the page change is less noticeable. interactive elements are interactive make sure visible interactive elements are always interactive and responsive. if input elements are visible, the user should be able to interact with them without a lag. users feel that something is laggy when they...
Framework main features - Learn web development
wn as dependency injection, which is a way to get certain data directly to the components that need it, without passing it through intervening levels. each framework implements dependency injection under a different name, and in a different way, but the effect is ultimately the same. angular calls this process dependency injection; vue has provide() and inject() component methods; react has a con
text api; ember shares state through services. lifecycle in the con
text of a framework, a component’s lifecycle is a collection of phases a component goes through from the time it is rendered by the browser (often called mounting) to the time that it is removed from the dom (often called unmounting). each framework names these lifecycle phases differently, and not all give developers access to the...
...ting alike. testing library is a suite of testing utilities that has tools for many javascript environments, including react, vue, and angular. the ember docs cover the testing of ember apps. ...
...and 2 times: import react from "react"; import { render, fireevent } from "@testing-library/react"; import "@testing-library/jest-dom/extend-expect"; import counterbutton from "./counterbutton"; it("renders a semantic with an initial state of 0", () => { const { getbyrole } = render(<counterbutton />); const btn = getbyrole("button"); expect(btn).tobeinthedocument(); expect(btn).tohave
textcontent("clicked 0 times"); }); it("increments the count when clicked", () => { const { getbyrole } = render(<counterbutton />); const btn = getbyrole("button"); fireevent.click(btn); expect(btn).tohave
textcontent("clicked 1 times"); fireevent.click(btn); expect(btn).tohave
textcontent("clicked 2 times"); }); summary at this point you should have more of an idea about the actual la...
Componentizing our React app - Learn web development
t = props.tasks.map(task => task.name); let’s try replacing all the children of the <ul> with tasklist: <ul role="list" classname="todo-list stack-large stack-exception" aria-labelledby="list-heading" > {tasklist} </ul> this gets us some of the way towards showing all the components again, but we’ve got more work to do: the browser currently renders each task's name as unstructured
text. we’re missing our html structure — the <li> and its checkboxes and buttons! to fix this, we need to return a <todo /> component from our map() function — remember that jsx allows us to mix up javascript and markup structures! let's try the following instead of what we have already: const tasklist = props.tasks.map(task => <todo />); look again at your app; now our tasks look more lik...
...p.js, and paste them inside form()’s return statement. export form at the end of the file. ...
...the file. ...
Introduction to automated testing - Learn web development
applications is that the company that runs each one has a huge server farm that can run many different tests. when you use this service, you provide a url of the page you want to test along with information, such as what browsers you want it tested in. the app then configures a new vm with the os and browser you specified, and returns the test results in the form of screenshots, videos, logfiles,
text, etc. you can then step up a gear, using an api to access functionality programmatically, which means that such apps can be combined with task runners, such as your own local selenium environments and others, to create automated tests. note: there are other commercial browser testing systems available but in this article, we'll focus on lambdatest, sauce labs, and browserstack. we're not sayin...
...ing the combination you chose. when loading has finished, you can then start to remotely test the web site running in the chosen browser. from here you can see the layout as it would look in the browser you are testing, move the mouse around and try clicking buttons, etc. the top menu allows you to: stop the session give someone else a url so they can observe the test remotely. copy
text/notes to a remote clipboard. take a screenshot. test in full screen mode. once you stop the session, you'll return to the manual tests tab, where you'll see an entry for each of the previous manual sessions you started. clicking on one of these entries shows more data for the session. in here you can download any screenshots you took, watch a video of the session, view data logs, and...
...h spins up a virtual machine running the combination you chose. when loading has finished, you can then start to remotely test the web site running in the chosen browser. from here you can see the layout as it would look in the browser you are testing, move the mouse around and try clicking buttons, etc. the side menu allows you to: stop the session change the screen resolution copy
text/notes to a remote clipboard take, edit, and download screenshots test in full screen mode. once you stop the session, you'll return to the live web testing page, where you'll see an entry for each of the previous manual sessions you started. clicking on one of these entries shows more data for the session. here you can download any screenshots you took, watch a video of the test, and...
Package management basics - Learn web development
else and ideally solves a single problem for you. a web project can have any number of dependencies, ranging from none to many, and your dependencies might include sub-dependencies that you didn't explicitly install — your dependencies may have their own dependencies. a simple example of a useful dependency that your project might need is some code to calculate relative dates as human-readable
text. you could certainly code this yourself, but there's a strong chance that someone else has already solved this problem — why waste time reinventing the wheel? moreover, a reliable third-party dependency will likely have been tested in a lot of different situations, making it more robust and cross-browser compatible than your own solution. a project dependency can be an entire javascript librar...
...ge content. let's say we want to show human-readable relative dates, such as "2 hours ago", "4 days ago" and so on. the date-fns package’s formatdistancetonow() method is useful for this (there's other packages that do the same thing too). in the index.js file, add the following code and save it: import { formatdistancetonow } from 'date-fns' const date = '1996-09-13 10:00:00'; document.body.
textcontent = formatdistancetonow(new date(date)) + ' ago'; go back to http://localhost:1234 and you'll see how long ago it is since the author turned 18. what's particularly special about the code above is that it is using the formatdistancetonow() function from the date-fns package, which we didn’t install! parcel has spotted that you need the module, searched for it in the npmjs.com package reg...
...ist/index.html 288 b 806ms again, the destination for our production files is the dist directory. reducing your app's file size however, as with all tools that "help" developers there's often a trade off. in this particular case it's the file size. the javascript bundle my-project.fb76efcf.js is a whopping 195k — very large, given that all it does is print a line of
text. sure there's some calculation, but we definitely don’t need 195k worth of javascript to do this!. when you use development tooling it's worth questioning whether they're doing the right thing for you. in this case, the bundle is nearly 200k because it has in fact included the entire date-fns library, not just the function we're using. if we had avoided any development tools and pointed a <sc...
Links and Resources
rts errors or warnings. webxact™ from watchfire® corporation webxact™ is a free and complete online accessibility validation service that can test single pages for quality, accessibility and privacy issues. the accessibility report will contain errors and warnings for "automatic checkpoints" and "manual checkpoints"; detailed and useful information (line numbers, instances/occurences,
textual references to guidelines) will be included for web authors. cynthia says™ from hisoftware® company "cynthia says™" is a free online webpage accessibility validation service that identifies accessibility errors in webpage related to section 508 standards and/or the wcag guidelines. just like webxact, it can also perform a "complete webpage quality check" for accessibility, privacy...
...ncluded for web authors. cynthia says™ from hisoftware® company "cynthia says™" is a free online webpage accessibility validation service that identifies accessibility errors in webpage related to section 508 standards and/or the wcag guidelines. just like webxact, it can also perform a "complete webpage quality check" for accessibility, privacy, searchability, metadata and even alt
text attribute quality. accessibility valet from webthing description and summary to be written. wave 3.0 (web accessibility versatile evaluator) from webaim and sponsored by temple university institute on disabilities wave 3.0 is another powerful, mature, free online webpage accessibility validation service that identifies accessibility errors and reports accessibility warnings abou...
...ons with disabilities). home of lars (linux accessibility resource site) at university of toronto. dive into accessibility - another great, easy-to-understand resource on accessible website authoring. color contrast analyzer by juicy studio: an excellent tool for checking if webpages use/have sufficient color contrast, sufficient brightness difference by comparing background and foreground (
text) colors. this tool will measure accurately the degree of legibility of a webpage. ...
Accessibility and Mozilla
ves to make its software accessible; the documents below cover the ways in which we do so. these articles provide mozilla-specific details about accessibility. accessibility api cross-referencethis cross-reference helps us see the difference between today's accessibility api's. all accessibility apis to date define a list of possible object roles, or general types, such as button, menu item,
text, etc. they also define a list of possible object states, such as focused, read-only, checked, etc.accessibility features in firefoxfirefox works with popular screen readers, with the best support currently coming from gw micro's window-eyes 5.5. we are optimistic that jaws support will catch up this year. in recent articles from both afb's access world and nfb's voice of the nation's blind, revi...
... ...
... ...
mozbrowserloadend
und of the controls ui bar is changed to the background color of the site that has just loaded, to provide a more integrated experience. when the front page of https://developer.mozilla.org is loaded, for example, the e.detail.backgroundcolor value reported is rgb(0, 83, 159). ...
... loaded, for example, the e.detail.backgroundcolor value reported is rgb(0, 83, 159). ...
...ser = document.queryselector("iframe"); browser.addeventlistener('mozbrowserloadend',function(e) { stopreload.
textcontent = 'r'; console.log(e.detail.backgroundcolor); controls.style.background = e.detail.backgroundcolor; }); browser.addeventlistener('mozbrowserloadend',function() { stopreload.
textcontent = 'r'; }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercon
textmenu mozbrowsererror mozbrowsericonchange mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserloadstart
cancelable read only boolean whether the event is cancellable or not. example in this example the mozbrowserloadend and mozbrowserloadstart events are used to change the icon shown on the stop/reload button between stop (x) and reload (r), as appropriate. ...
...le in this example the mozbrowserloadend and mozbrowserloadstart events are used to change the icon shown on the stop/reload button between stop (x) and reload (r), as appropriate. ...
... icon shown on the stop/reload button between stop (x) and reload (r), as appropriate. ...
Embedding the editor
lity, problems with the existing implementation, some possible embedding scenarios that we need to deal with, and an embedding solution that will fulfill them. finally, steps towards that final solution are described. embedding applications here are some embedding scenarios that editor needs to deal with. note here that i use the term 'composer' to mean an html-savvy compose widget that does rich
text editing, and 'editor' to mean a plain
text editor (as well as the underlying technology for composer). <htmlarea> is intended as a shorthand for a rich-
text multiline
text widget embedded in an html document, and is not meant to infer that future versions of mozilla will support this specific tag. composer embedded in a xul application developers need to embed composer widgets in their xul applic...
...re versions of mozilla will support this specific tag. composer embedded in a xul application developers need to embed composer widgets in their xul applications, by using the <editor> tag as we do today. they should need to do as little work as possible to get basic editing functionality, be able to have any number of <editor>s per window, and control whether those <editor>s are in html or plain
text mode. composer embedded in a native application in this application, the <iframe> on which the editor lives is embedded directly in the native application; this is equivalent to embedding the browser via nsiwebbrowser, but instead having an editable document. the composer chrome (toolbars etc) may be implemented by the embedder using native widgets, or using some amount of xul. that chrome needs ...
...table <iframe>. this will involve: making a new interface, nsieditorframe, that is implemented by nsdocshell or a related class. you should be able to qi from nsidocshell to one of these; if this succeeds, it indicates that the frame is editable. nsieditorframe should contain methods for getting the editing session, and doing some generic editor-related stuff (probably common to html and plain
text editing). a subset of nsieditorshell will probably move into this interface. (this would be analogous to the nsiwebnavigation interface used for a browser.) when we have one editor per docshell, loading a frameset document, or a page with an <iframe> in composer, will instantiate more than one low-level editor. we need a concept of an "editing session" - a single top-level document which is e...
Embedding Tips
s? you need to implement and register your own prompt service. how do i get the dom document from the web browser object? nscomptr<nsidomdocument> doc; nscomptr<nsidomwindow> window; webbrowser->getcontentdomwindow(getter_addrefs(window)); if (window) { window->getdocument(getter_addrefs(doc)); } what is the docshell? a description of the docshell may be found here. ...
...rvice. how do i get the dom document from the web browser object? nscomptr<nsidomdocument> doc; nscomptr<nsidomwindow> window; webbrowser->getcontentdomwindow(getter_addrefs(window)); if (window) { window->getdocument(getter_addrefs(doc)); } what is the docshell? a description of the docshell may be found here. how do i implement con
text menus? make your chrome object implement the nsicon
textmenulistener or nsicon
textmenulistener2. the nsicon
textmenulistener::onshowcon
textmenu() method will be called with the dom node that the con
text applies, the dom event plus some flag combinations that assist in determining what menu to display (document, link, image, selected
text etc.) how do i implement tool tips? make your chrome object implement the nsitooltiplistener interface. methods to ...
...the contract id is defined here. for an example, see browserimpl.cpp in mfcembed and its simple cbrowsertooltip class implemented in mfc. how do i disable drag/drop support? when setting up your browser add a hook to the command manager which points to your nsiwebbrowserchrome implementation. this implementation should also implement nsiclipboarddragdrophooks. ...
Widget Wrappers
or wrappers around single widget nodes source for api-provided widgets, whether they are built-in to firefox or add-on-provided disabled for api-provided widgets, whether the widget is currently disabled. nb: this property is writable, and will toggle all the widgets' nodes' disabled states label for api-provided widgets, the label of the widget tooltip
text for api-provided widgets, the tooltip of the widget showinprivatebrowsing for api-provided widgets, whether the widget is visible in private browsing single wrapper properties all of a wrapper's properties are read-only unless otherwise indicated. attribute description id the widget's id type the type of widget (button, view, custom). for x...
...note that you may prefer to use the group wrapper's getter/setter instead. ...
...note that you may prefer to use the group wrapper's getter/setter instead. ...
Index
ices apps, extensions, internationalization, localization, mozilla, l10n, l12y this document provides best practices for developers to create localizable code, and describes how to avoid some localizability (l12y) common mistakes. 10 localization notes guide, internationalization, localization, mozilla localizers usually work on the localizable files without the con
text of the source files including the localized strings; it is important to add comments to the localizable files themselves, too. these comments are generally referred to as localization notes. there is an established format for those, which is described in this document. 11 localization prerequisites internationalization, localization, delete to work on localization, you need a...
...ery mozilla translator should know internationalization, localization l10n stands for localization = l + another 10 letters + n 41 writing localizable code internationalization, localization this page tells you about best practices and guidelines when dealing with ui code with respect to localization. it is aimed at mozilla and extension developers. 42 get
text internationalization, localizability, localization get
text lets you define and use singular and plural forms of a string. to take advantage of this functionality, you need to use a different keyword (i.e. different get
text function name) for string which are supposed to support plurals. for instance, in php the default keyword for regular messages is get
text() and _(). for messages with...
...ocalization get
text lets you define and use singular and plural forms of a string. to take advantage of this functionality, you need to use a different keyword (i.e. different get
text function name) for string which are supposed to support plurals. for instance, in php the default keyword for regular messages is get
text() and _(). for messages with plural support, the default keyword is nget
text(). ...
Mozilla Content Localized in Your Language
e. additional discussions can be found here. voice what is the appropriate form of expressing voice in your language? how should emphasis be made in your language? character styles how are bold, italics, underlines, etc. used to express certain concepts in your language? if these are not applicable styles, what are some of the corresponding ways to express, emphasis or highlight some of the
texts. address format what is the format in your language? ex: most asian countries start from big to small: [country] [postal code][state/province][city][district][street number and name][building and suite numbers][addressee] countries of european languages start from small to big: [addressee][street number and name][building and suite numbers][district][city][state/province][postal code][cou...
...localization team's process for identifying and creating new terminology? currency currency and symbol. what are other widely used currency and symbols used in your country/language for paid apps. user interface elements titles should be brief and precise. localizers can assume that source content reaches 2/3 of the total available line space. this allows localization
text to expand and not be truncated or resolved through ellipsis. title on the final page (meaning no more click through) should allow enough room to display full
text. buttons capitalize the first letter of each word. limit to one or two words. use verbs that precisely describe the button's action. for example, "cancel", "clear history", "add email", "select all", etc. ...
...lector lists capitalize the first letter of the first word and the first letter of any proper nouns. limit to one or two words. note: if this doesn't apply to your language, indicate so as n/a. articles -- avoid them articles (such as the word "the" in english) should be avoided wherever possible. user interface elements have limited space available for
text. avoiding articles will help ensure that your translations will be accommodated within the user interface. note: if this doesn't apply to your language, indicate so as n/a. ellipsis ellipsis are often inserted automatically in the ui where strings are truncated. ellipsis should only be used at high level of ui pages, but not be on the final page (after a seri...
Localization technical reviews
al accuracy and completion of l10n work, not translation quality. is only performed on the first revision a new locale wants to have released to the public. must be approved prior to migrating your revision from aurora to beta. technical review evaluation criteria in principal, a technical review's criteria looks for localization issues common to localizing software but within the mozilla con
text. since it is performed on the first revision a l10n team proposes for release, this first revision requires a very detailed and comprehensive form of review. that being the case, there are some criteria in a technical review that will only ever be considered once, as all reviews after this only evaluate the changes you're adding on top of this revision from release to release. here is some of th...
... the file for each app (like browser/defines.inc) contains the names of all contributors that a localization team would like to credit the work to. localizers can specify the team responsible for the work by listing the name just after the moz_langpack_creator. the team can also wrap contributors with <em:contributor> tags just after the moz_langpack_contributors section. make sure that the the
text content is wrapped with emptylines. leading comments are ok, but watch out for #filter emptylines #define ... # comment #define ... #unfilter emptylines in toolkit/defines.inc, the native name of the language is specified, which is used as description for the built language packs. region.properties though locales might like to specify changes from the beginning, the region.properties fi...
...your work. so before you request your technical review, be sure that it is as ready as it can be. there is a specific process to follow in bugzilla for requesting these reviews: file a bug requesting the review. attach your files to the bug. once attached, open the attachment details. in the attachment details, select the ? from the dropdown menu next to the review flag. this will display a
text box to assign the review to someone. enter :pike as the requestee. we will perform a technical review of your work and provide you with feedback. we're happy to work with you to make sure that your work is fully functional. tracking your progress you can track your reviews progress two ways: within the bug and through your team's dashboard. if your work is approved, you'll see a + review fl...
Creating localizable web content
e.g.: a new page is announced with only 100 words but it is actually content added to an existing page in english. happens for things like faq, or video pages for example. for video, use the code to display the video in an overlayed video player on the page instead of linking to a video section in english. ...
...e.g.: a new page is announced with only 100 words but it is actually content added to an existing page in english. happens for things like faq, or video pages for example. for video, use the code to display the video in an overlayed video player on the page instead of linking to a video section in english. ...
...nks for localized pages (e.g., links to mdn, addons.mozilla.org, or other external resources, are there translated equivalents we can use). if there are alternatives, use them by adding the $lang; parameter in the urls evaluate the impact of new pages on all our web properties, especially links to community sites and redirects. sometimes you can leave some freedom of modification for a block of
text so that the localizers link to relevant local resources. images check that images are not going to be a problem for the audience (cultural references, positionning, mirroring for rtl,
text in images...) and spot what sizes/margins can be tweaked by css or have to be fixed for all locales but english don't use
text in icons images 1&2. bad: image 3. good: image 4. good: this icon...
Mozilla MathML Status
t listed at all. if only the main features of an element are implemented then its section is marked as supported but details of unsupported attributes are specified below. the top-level math element see § 2.2. attribute notes display implemented. maxwidth, overflow not implemented. see bug 534962. altimg, altimg-width, altimg-height, altimg-valign, alt
text accepted, but do not have any effect on the rendering. mathml is always enabled since bug 660762. cdgroup accepted, but does not have any effect on the rendering. attributes shared by all mathml elements see § 2.1.6 and § 3.1.10. attribute notes id, class, style implemented. xref accepted, but does not have any effect on the rendering. ...
...und implemented. token elements element [- attribute] notes mi implemented. the mathvariant attribute is fully supported starting with (firefox 28.0 / thunderbird 28.0 / seamonkey 2.25). see bug 114365. mn implemented. mo implemented. mo - linebreaking attributes, indentation attributes not implemented. see bug 534962. m
text implemented. mspace implemented. mspace - linebreak not implemented. see bug 534962. ms implemented. general layout schemata element notes mrow implemented. mfrac implemented. msqrt implemented. mroot implemented. mstyle implemented. we are only interested in supporting attributes ...
... implemented. mspace - linebreak not implemented. see bug 534962. ms implemented. general layout schemata element notes mrow implemented. mfrac implemented. msqrt implemented. mroot implemented. mstyle implemented. we are only interested in supporting attributes "inherited from the surrounding con
text", which are those effectively used in practice. see bug 838509. merror implemented. mpadded implemented. mphantom implemented. mfenced implemented. menclose implemented. script and limit schemata element [- attribute] notes msub implemented. msup implemented. msubsup implemented. ...
TraceMalloc
pe count bytes count bytes count bytes %total total 48942 4754774 76136 6566453 27194 1811679 100.00 nstokenallocator 17 110007 60 388260 43 278253 15.36 nsimagegtk 476 2197708 341 2366564 -135 168856 9.32 nsmemcacherecord 843 45767 2328 124767 1485 79000 4.36 ns
textnode 209 11704 1614 90384 1405 78680 4.34 htmlattributesimpl 482 14288 2824 88400 2342 74112 4.09 nsscanner 58 76824 94 146300 36 69476 3.83 nsscripterror 253 25070 842 91548 589 66478 3.67 nshtmldocument.mreferrer 177 21550 691 85460 514 63910 3.53 nsht...
...eded for other platforms. # run application with shutdown logging # note: tinderbox leak tests use: python leaktest.py -- --trace-malloc malloc.log --shutdown-leaks=sdleak.log # note 2: it appears that the shutdown log is not recorded if --trace-malloc is given the - argument. build/dist/minefield.app/contents/macos/firefox --trace-malloc /dev/null --shutdown-leaks=sdleak.log # convert raw log to
text representation of call trees perl source/tools/trace-malloc/diffbloatdump.pl --depth=15 --use-address /dev/null sdleak.log > sdleak.tree.raw # frobulate trees to remove extraneous junk perl source/tools/rb/fix-macosx-stack.pl sdleak.tree.raw > sdleak.tree you can also use the leakstats program to analyze a log for shutdown leaks. it will produce a report like the following. leaks: 382739 bytes, 3...
... it will produce a report like the following. leaks: 382739 bytes, 3465 allocations maximum heap size: 7751799 bytes 62095212 bytes were allocated in 391091 allocations. detecting memory usage growth in a running process to do this, dump the existing allocations to a file by calling the function tracemallocdumpallocations from javascript. you can use the following web page to do so. <script type="
text/javascript"> var filename = window.prompt("filename to log: "); if (filename) tracemallocdumpallocations(filename); </script> one can then use the script tools/trace-malloc/diffbloatdump.pl to compare trace-malloc dumps before and after doing an action that might leak. if there are significant differences, it might be worth examining the call stacks for the destructors of the objec...
Certificate functions
4 and later cert_filtercertlistforusercerts mxr 3.6 and later cert_findcertbydercert mxr 3.2 and later cert_findcertbyissuerandsn mxr 3.2 and later cert_findcertbynickname mxr 3.2 and later cert_findcertbynicknameoremailaddr mxr 3.2 and later cert_findcertbysubjectkeyid mxr 3.7 and later cert_findcer
textension mxr 3.4 and later cert_findcertissuer mxr 3.3 and later cert_findkeyusageextension mxr 3.4 and later cert_findsmimeprofile mxr 3.2 and later cert_findsubjectkeyidextension mxr 3.7 and later cert_findusercertbyusage mxr 3.4 and later cert_findusercertsbyusage mxr 3.4 and later cert_finish...
...rt_formatname mxr 3.2 and later cert_freedistnames mxr 3.2 and later cert_freenicknames mxr 3.2 and later cert_getavatag mxr 3.2 and later cert_getcertchainfromcert mxr 3.4 and later cert_getcertemailaddress mxr 3.2 and later cert_getcertificatenames mxr 3.10 and later cert_getcertificatereques
textensions mxr 3.10 and later cert_getcertissuerandsn mxr 3.2 and later cert_getcertnicknames mxr 3.2 and later cert_getcerttrust mxr 3.2 and later cert_getcertuid mxr 3.2 and later cert_getclassicocspdisabledpolicy mxr 3.12 and later cert_getclassicocspenabledhardfailurepolicy mxr 3.12 and later ...
...rtlistnode mxr 3.6 and later cert_rfc1485_escapeandquote mxr 3.2 and later cert_savesmimeprofile mxr 3.2 and later cert_setsloptime mxr 3.2 and later cert_setocspfailuremode mxr 3.11.7 and later cert_setocsptimeout mxr 3.12 and later cert_setusepkixforvalidation mxr 3.12 and later cert_startcer
textensions mxr 3.5 and later cert_startcertificaterequestattributes mxr 3.10 and later cert_startcrlentryextensions mxr 3.10 and later cert_startcrlextensions mxr 3.10 and later cert_uncachecrl mxr 3.10 and later cert_verifycertname mxr 3.2 and later cert_verifycacertforusage mxr 3.6 and later cer...
NSS 3.45 release notes
the experimental function ssl_initantireplay is removed. bug 1546477 - various changes in response to the ongoing fips review note: the source package size has increased substantially due to the new fips test vectors. this will likely prompt follow-on work, but please accept our apologies in the meantime. certifica...
... the experimental function ssl_initantireplay is removed. bug 1546477 - various changes in response to the ongoing fips review note: the source package size has increased substantially due to the new fips test vectors. this will likely prompt follow-on work, but please accept our apologies in the meantime. certificate authority changes th...
... the experimental function ssl_initantireplay is removed. ...
NSS Sample Code Sample_2_Initialization of NSS
clude <pk11func.h> #include "util.h" /* print a usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -d <dbdirpath> [-p <plainpasswc>]" " [-f <passwdffile>]\n\n", progname); fprintf(stderr, "%-15s specify a db directory path\n\n", "-d <dbdirpath>"); fprintf(stderr, "%-15s specify a plain
text password\n\n", "-p <plainpasswc>"); fprintf(stderr, "%-15s specify a password file\n\n", "-f <plainpasswc>"); exit(-1); } /* initialize the slot password */ char *initslotpassword(pk11slotinfo *slot, prbool retry, void *arg) { file *input; file *output; char *p0 = null; char *p1 = null; secupwdata *pwd...
...ialize the slot password */ char *initslotpassword(pk11slotinfo *slot, prbool retry, void *arg) { file *input; file *output; char *p0 = null; char *p1 = null; secupwdata *pwdata = (secupwdata *) arg; if (pwdata->source == pw_fromfile) { return filepasswd(slot, retry, pwdata->data); } if (pwdata->source == pw_plain
text) { return pl_strdup(pwdata->data); } /* open terminal */ input = fopen("/dev/tty", "r"); if (input == null) { pr_fprintf(pr_stderr, "error opening input terminal for read\n"); return null; } /* we have no password, so initialize database with one */ pr_fprintf(pr_stderr, "enter a password which will be used to encrypt your keys.\n" "the pa...
...rt_free(p1); } fclose(input); fclose(output); return p0; } /* change the password */ secstatus changepw(pk11slotinfo *slot, char *oldpass, char *newpass, char *oldpwfile, char *newpwfile) { secstatus rv; secupwdata pwdata; secupwdata newpwdata; char *oldpw = null; char *newpw = null; if (oldpass) { pwdata.source = pw_plain
text; pwdata.data = oldpass; } else if (oldpwfile) { pwdata.source = pw_fromfile; pwdata.data = oldpwfile; } else { pwdata.source = pw_none; pwdata.data = null; } if (newpass) { newpwdata.source = pw_plain
text; newpwdata.data = newpass; } else if (newpwfile) { newpwdata.source = pw_fromfile; newpwdata.data = n...
NSS Sample Code Utilities_1
nss sample code common: utilities this is a library of utilities used by many of the samples. this code shows the following: extract seed from noise file read der encoding from a file extract the password from a
text file get the module password print as ascii or hexadecimal sample code #include <prlog.h> #include <termios.h> #include <base64.h> #include <unistd.h> #include <sys/stat.h> #include <prprf.h> #include "util.h" /* * these utility functions are adapted from those found in * the sectool library used by the nss security tools and * other nss test applications. */ /* * newline */ static void newline(prfiledesc* out) { pr_fprintf(out, "\n"); } /* * printasascii */ void printasascii(prfiledesc* out, const unsigned char *data, unsigned int len) { ch...
... * * this function supports password extraction from files with * multiple passwords, one for each token. in the single password * case a line would just have the password whereas in the multi- * password ...
...r_stderr, "incorrect password/pin entered.\n"); return null; } switch (pwdata->source) { case pw_none: sprintf(prompt, "enter password or pin for \"%s\":", pk11_gettokenname(slot)); return getpassword(stdin, stdout, prompt, checkpassword); case pw_fromfile: pw = filepasswd(slot, retry, pwdata->data); pwdata->source = pw_plain
text; pwdata->data = pl_strdup(pw); return pw; case pw_plain
text: return pl_strdup(pwdata->data); default: break; } pr_fprintf(pr_stderr, "password check failed: no password found.\n"); return null; } /* * generaterandom */ secstatus generaterandom(unsigned char *rbuf, int rsize) { char meter[] = { "\r| ...
Initialize NSS database - sample 2
base. the nss sample code below demonstrates how to initialize the nss database. ...
.../* * initslotpassword */ char * initslotpassword(pk11slotinfo *slot, prbool retry, void *arg) { file *input; file *output; char *p0 = null; char *p1 = null; secupwdata *pwdata = (secupwdata *) arg; if (pwdata->source == pw_fromfile) { return filepasswd(slot, retry, pwdata->data); } if (pwdata->source == pw_plain
text) { return pl_strdup(pwdata->data); } /* open terminal */ input = fopen("/dev/tty", "r"); if (input == null) { pr_fprintf(pr_stderr, "error opening input terminal for read\n"); return null; } /* we have no password, so initialize database with one */ pr_fprintf(pr_stderr, "enter a password which will be used to encrypt your keys.\n" "the pa...
...(p1)); port_free(p1); } fclose(input); fclose(output); return p0; } /* * changepw */ secstatus changepw(pk11slotinfo *slot, char *oldpass, char *newpass, char *oldpwfile, char *newpwfile) { secstatus rv; secupwdata pwdata; secupwdata newpwdata; char *oldpw = null; char *newpw = null; if (oldpass) { pwdata.source = pw_plain
text; pwdata.data = oldpass; } else if (oldpwfile) { pwdata.source = pw_fromfile; pwdata.data = oldpwfile; } else { pwdata.source = pw_none; pwdata.data = null; } if (newpass) { newpwdata.source = pw_plain
text; newpwdata.data = newpass; } else if (newpwfile) { newpwdata.source = pw_fromfile; newpwdata.data = n...
NSS tools : pk12util
tes and keys. pk12util supports two types of databases: the legacy security databases (cert8.db, key3.db, and secmod.db) and new sqlite databases (cert9.db, key4.db, and pkcs11.txt). if the prefix sql: is not used, then the tool assumes that the given databases are in the old format. -h tokenname specify the name of the token to import into or export from. -k slotpasswordfile specify the
text file containing the slot's password. -k slotpassword specify the slot's password. -m | --key-len keylength specify the desired length of the symmetric key to be used to encrypt the private key. -n | --cert-key-len certkeylength specify the desired length of the symmetric key to be used to encrypt the certificates and other meta-data. -n certname specify the nickname of the cert and priv...
.... changing the names of the certificate and key databases is not recommended. -r dumps all of the data in raw (binary) form. this must be saved as a der file. the default is to return information in a pretty-print ascii format, which displays the information about the certificates and public keys in the p12 file. -v enable debug logging when importing. -w p12filepasswordfile specify the
text file containing the pkcs #12 file password. -w p12filepassword specify the pkcs #12 file password. return codes o 0 - no error o 1 - user cancelled o 2 - usage error o 6 - nls init error o 8 - certificate db open error o 9 - key db open error o 10 - file initialization error o 11 - unicode conversion error o 12 - temporary file creation error o 13 - pkcs11 get slot error o 14 - pkcs...
...ort file o 16 - pkcs12 decode error o 17 - pkcs12 decoder verify error o 18 - pkcs12 decoder validate bags error o 19 - pkcs12 decoder import bags error o 20 - key db conversion version 3 to version 2 error o 21 - cert db conversion version 7 to version 5 error o 22 - cert and key dbs patch error o 23 - get default cert db error o 24 - find cert by nickname error o 25 - create export con
text error o 26 - pkcs12 add password itegrity error o 27 - cert and key safes creation error o 28 - pkcs12 add cert and key error o 29 - pkcs12 encode error examples importing keys and certificates the most basic usage of pk12util for importing a certificate or key is the pkcs#12 input file (-i) and some way to specify the security database being accessed (either -d for a directory or -h for...
NSS tools : ssltab
03 00 00 df |....ß type = 23 (application_data) version = { 3,0 } length = 223 (0xdf) < encrypted > } sslrecord { 0: 15 03 00 00 12 |..... type = 21 (alert) version = { 3,0 } length = 18 (0x12) < encrypted > } ] server socket closed. example 2 the -s option turns on ssl parsing. because the -x option is not used in this example, undecoded values are output as raw data. the output is routed to a
text file. $ ssltap -s -p 444 interzone.mcom.com:443 > s.txt output connected to interzone.mcom.com:443 --> [ alloclen = 63 bytes [ssl2] clienthellov2 { version = {0x03, 0x00} cipher-specs-length = 36 (0x24) sid-length = 0 (0x00) challenge-length = 16 (0x10) cipher-suites = { (0x010080) ssl2/rsa/rc4-128/md5 (0x020080) ssl2/rsa/rc4-40/md5 (0x030080) ssl2/rsa/rc2cbc128/md5 (0x060040) ssl2/rsa/des64cbc/m...
...n_data) version = { 3,0 } length = 160 (0xa0) > encrypted > } ] >-- [ sslrecord { type = 23 (application_data) version = { 3,0 } length = 223 (0xdf) > encrypted > } sslrecord { type = 21 (alert) version = { 3,0 } length = 18 (0x12) > encrypted > } ] server socket closed. example 3 in this example, the -h option turns hex/ascii format. there is no ssl parsing or decoding. the output is routed to a
text file. $ ssltap -h -p 444 interzone.mcom.com:443 > h.txt output connected to interzone.mcom.com:443 --> [ 0: 80 40 01 03 00 00 27 00 00 00 10 01 00 80 02 00 | .@....'......... 10: 80 03 00 80 04 00 80 06 00 40 07 00 c0 00 00 04 | .........@...... 20: 00 ff e0 00 00 0a 00 ff e1 00 00 09 00 00 03 00 | ........á....... 30: 00 06 9b fe 5b 56 96 49 1f 9f ca dd d5 ba b9 52 | ..þ[v.i.\xd9 ...º¹r 40: ...
... e0: 74 69 66 69 63 61 74 65 20 53 65 72 76 65 72 20 | tificate server f0: 49 49 30 1e 17 0d 39 38 30 35 31 36 30 31 30 33 | ii0...9805160103 <additional data lines> ] <additional records in same format> server socket closed. example 4 in this example, the -s option turns on ssl parsing, and the -h option turns on hex/ascii format. both formats are shown for each record. the output is routed to a
text file. $ ssltap -hs -p 444 interzone.mcom.com:443 > hs.txt output connected to interzone.mcom.com:443 --> [ 0: 80 3d 01 03 00 00 24 00 00 00 10 01 00 80 02 00 | .=....$......... 10: 80 03 00 80 04 00 80 06 00 40 07 00 c0 00 00 04 | .........@...... 20: 00 ff e0 00 00 0a 00 ff e1 00 00 09 00 00 03 03 | ........á....... 30: 55 e6 e4 99 79 c7 d7 2c 86 78 96 5d b5 cf e9 |u..yÇ\xb0 ,.x.]µÏé allocl...
NSS tools : ssltap
03 00 00 df |....ß type = 23 (application_data) version = { 3,0 } length = 223 (0xdf) < encrypted > } sslrecord { 0: 15 03 00 00 12 |..... type = 21 (alert) version = { 3,0 } length = 18 (0x12) < encrypted > } ] server socket closed. example 2 the -s option turns on ssl parsing. because the -x option is not used in this example, undecoded values are output as raw data. the output is routed to a
text file. $ ssltap -s -p 444 interzone.mcom.com:443 > s.txt output connected to interzone.mcom.com:443 --> [ alloclen = 63 bytes [ssl2] clienthellov2 { version = {0x03, 0x00} cipher-specs-length = 36 (0x24) sid-length = 0 (0x00) challenge-length = 16 (0x10) cipher-suites = { (0x010080) ssl2/rsa/rc4-128/md5 (0x020080) ssl2/rsa/rc4-40/md5 (0x030080) ssl2/rsa/rc2cbc128/md5 (0x060040) ssl2/rsa/des64cbc/m...
...n_data) version = { 3,0 } length = 160 (0xa0) > encrypted > } ] >-- [ sslrecord { type = 23 (application_data) version = { 3,0 } length = 223 (0xdf) > encrypted > } sslrecord { type = 21 (alert) version = { 3,0 } length = 18 (0x12) > encrypted > } ] server socket closed. example 3 in this example, the -h option turns hex/ascii format. there is no ssl parsing or decoding. the output is routed to a
text file. $ ssltap -h -p 444 interzone.mcom.com:443 > h.txt output connected to interzone.mcom.com:443 --> [ 0: 80 40 01 03 00 00 27 00 00 00 10 01 00 80 02 00 | .@....'......... 10: 80 03 00 80 04 00 80 06 00 40 07 00 c0 00 00 04 | .........@...... 20: 00 ff e0 00 00 0a 00 ff e1 00 00 09 00 00 03 00 | ........á....... 30: 00 06 9b fe 5b 56 96 49 1f 9f ca dd d5 ba b9 52 | ..þ[v.i.\xd9 ...º¹r 40: ...
... e0: 74 69 66 69 63 61 74 65 20 53 65 72 76 65 72 20 | tificate server f0: 49 49 30 1e 17 0d 39 38 30 35 31 36 30 31 30 33 | ii0...9805160103 <additional data lines> ] <additional records in same format> server socket closed. example 4 in this example, the -s option turns on ssl parsing, and the -h option turns on hex/ascii format. both formats are shown for each record. the output is routed to a
text file. $ ssltap -hs -p 444 interzone.mcom.com:443 > hs.txt output connected to interzone.mcom.com:443 --> [ 0: 80 3d 01 03 00 00 24 00 00 00 10 01 00 80 02 00 | .=....$......... 10: 80 03 00 80 04 00 80 06 00 40 07 00 c0 00 00 04 | .........@...... 20: 00 ff e0 00 00 0a 00 ff e1 00 00 09 00 00 03 03 | ........á....... 30: 55 e6 e4 99 79 c7 d7 2c 86 78 96 5d b5 cf e9 |u..yÇ\xb0 ,.x.]µÏé allocl...
Utility functions
objectbyoidtag mxr 3.8 and later hash_gethashtypebyoidtag mxr 3.8 and later hash_gettype mxr 3.12 and later hash_hashbuf mxr 3.10 and later hash_resultlen mxr 3.4 and later hash_resultlenbyoidtag mxr 3.10 and later hash_resultlencon
text mxr 3.10 and later hash_update mxr 3.4 and later nss_init mxr 3.2 and later nss_initialize mxr 3.2 and later nss_initreadwrite mxr 3.2 and later nss_initwithmerge mxr 3.12 and later nss_isinitialized mxr 3.9.2 and later...
...getalgorithmtag mxr 3.2 and later secoid_setalgorithmid mxr 3.2 and later sgn_begin mxr 3.2 and later sgn_comparedigestinfo mxr 3.2 and later sgn_copydigestinfo mxr 3.2 and later sgn_createdigestinfo mxr 3.2 and later sgn_destroycon
text mxr 3.2 and later sgn_destroydigestinfo mxr 3.2 and later sgn_digest mxr 3.2 and later sgn_end mxr 3.2 and later sgn_newcon
text mxr 3.2 and later sgn_update mxr 3.2 and later vfy_begin mxr 3.2 and later ...
... 3.2 and later sgn_destroydigestinfo mxr 3.2 and later sgn_digest mxr 3.2 and later sgn_end mxr 3.2 and later sgn_newcon
text mxr 3.2 and later sgn_update mxr 3.2 and later vfy_begin mxr 3.2 and later vfy_createcon
text mxr deprecated 3.12 use vfy_createcon
textdirect or vfy_createcon
textwithalgorithmid vfy_createcon
textdirect mxr 3.12 and later vfy_createcon
textwithalgorithmid mxr 3.12 and later vfy_destroycon
text mxr 3.2 and later vfy_end mxr 3.2 and later vfy_update ...
NSS_3.12.3_release_notes.html
in secmod.h: public_mech_seed_flag in secmodt.h: secmod_seed_flag in secoidt.h: sec_oid_seed_cbc in sslproto.h: tls_rsa_with_seed_cbc_sha in sslt.h: ssl_calg_seed new structure for seed support: (see blapit.h) seedcon
textstr seedcon
text new functions in the nss shared library: cert_rfc1485_escapeandquote (see cert.h) cert_comparecerts (see cert.h) cert_registeralternateocspaiainfocallback (see ocsp.h) pk11_getsymkeyhandle (see pk11pqg.h) util_setforkstate (see secoid.h) nss_getalgorithmpolicy (see secoid.h) ...
...ot implemented on windows 32-bit bug 441321: tolerate incorrect encoding of dsa signatures in ssl 3.0 handshakes bug 444404: libpkix reports unknown issuer for nearly all certificate errors bug 452391: certutil -k incorrectly reports ec private key as an orphan bug 453234: support for seed cipher suites to tls rfc4010 bug 453364: improve pk11_cipherop error reporting (was: pk11_createcon
textbysymkey returns null bug 456406: slot list leaks in symkeyutil bug 461085: rfe: export function cert_comparecerts bug 462293: crash on fork after softoken is dlclose'd on some unix platforms in nss 3.12 bug 463342: move some headers to freebl/softoken bug 463452: sql db creation does not set files protections to 0600 bug 463678: need to add rpath to 64-bit libraries on hp-ux bug 464...
... assertion failure in ocsp tests. bug 484425: need accessor function to retrieve symkey handle bug 484466: sec_error_invalid_args with nss_enable_pkix_verify=1 bug 485127: bltest crashes when attempting rc5_cbc or rc5_ecb bug 485140: wrong command line flags used to build intel-aes.s with solaris gas for x86_64 bug 485370: crash bug 485713: files added by red hat recently have missing
texts in license headers. bug 485729: remove lib/freebl/mapfile.solaris bug 485837: vc90.pdb files are output in source directory instead of objdir bug 486060: sec_asn1d_parse_leaf uses argument uninitialized by caller pbe_pk11algidtoparam documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation. new and revised documents available since the releas...
NSS Tools certutil
ided as a special case. changing the names of the certificate and key databases is not recommended. -e check a certificate's signature during the process of validating a certificate. -f password-file specify a file that will automatically supply the password to include in a certificate or to access a certificate database. this is a plain-
text file containing one password. be sure to prevent unauthorized access to this file. -g keysize set a key size to use when generating new public and private key pairs. the minimum is 512 bits and the maximum is 8192 bits. the default is 1024 bits. any size that is a multiple of 8 between the minimum and maximum is allowed. -h tokenname spe...
... prohibited (explicitly distrusted) p trusted peer c valid ca t trusted ca to issue client certificates (implies c) c trusted ca to issue server certificates (ssl only) (implies c) u certificate can be used for authentication or signing w send warning (use with other attributes to include a warning when the certificate is used in that con
text) the attribute codes for the categories are separated by commas, and the entire set of attributes enclosed by quotation marks. for example: -t "tcu,cu,tuw" use the -l option to see a list of the current certificates and trust attributes in a certificate database. -u certusage specify a usage con
text to apply when validating a certificate with the -v op...
...tribute codes for the categories are separated by commas, and the entire set of attributes enclosed by quotation marks. for example: -t "tcu,cu,tuw" use the -l option to see a list of the current certificates and trust attributes in a certificate database. -u certusage specify a usage con
text to apply when validating a certificate with the -v option. the con
texts are the following: c (as an ssl client) v (as an ssl server) s (as an email signer) r (as an email recipient) -v valid-months set the number of months a new certificate will be valid. the validity period begins at the current system time unless an offset is added or subtracted with the -w option. if this argument is not used, the default validity...
NSS Tools pk12util
vironment). -p prefix specify the prefix used on the cert8.db and key3.db files (for example, my_cert8.db and my_key3.db). this option is provided as a special case. changing the names of the certificate and key databases is not recommended. ...
...). this option is provided as a special case. changing the names of the certificate and key databases is not recommended. ...
...error 15 - error read from import file 16 - pkcs12 decode error 17 - pkcs12 decoder verify error 18 - pkcs12 decoder validate bags error 19 - pkcs12 decoder import bags error 20 - key db conversion version 3 to version 2 error 21 - cert db conversion version 7 to version 5 error 22 - cert and key dbs patch error 23 - get default cert db error 24 - find cert by nickname error 25 - create export con
text error 26 - pkcs12 add password itegrity error 27 - cert and key safes creation error 28 - pkcs12 add cert and key error 29 - pkcs12 encode error ...
NSS tools : signtool
tells signtool to sign only files with the given extension; for example, use -e".class" to sign only java class files. note that with netscape signing tool version 1.1 and later this option can appear multiple times on one command line, making it possible to specify multiple file types or classes to include. -f commandfile specifies a
text file containing netscape signing tool options and arguments in keyword=value format. all options and arguments can be expressed through this file. for more information about the syntax used with this file, see "tips and techniques". -i scriptname specifies the name of an installer script for smartupdate. this script installs files from t...
...st files (required by the jar format) considerably smaller, but they contain slightly less information. --outfile outputfile specifies a file to receive redirected output from netscape signing tool. -p password specifies a password for the private-key database. note that the password entered on the command line is displayed as plain
text. -s keysize specifies the size of the key for generated certificate. use the -m option to find out what tokens are available. the -s option can be used with the -g option only. -t token specifies which available token should generate the key and receive the certificate. use the -m option to find out what tokens are availa...
...han pkzip.exe, which cannot handle long filenames. you can use a zip utility instead of the -z option to package a signed archive into a jar file after you have signed it: cd signdir zip -r ../myjar.jar * adding: meta-inf/ (stored 0%) adding: meta-inf/manifest.mf (deflated 15%) adding: meta-inf/signtool.sf (deflated 28%) adding: meta-inf/signtool.rsa (stored 0%) adding:
text.txt (stored 0%) generating the keys and certificate the signtool option -g generates a new public-private key pair and certificate. it takes the nickname of the new certificate as an argument. the newly generated keys and certificate are installed into the key and certificate databases in the directory specified by the -d option. with the nt version of netscape signing tool, y...
NSS tools : ssltap
ncrypted > } sslrecord { 0: 15 03 00 00 12 |..... type = 21 (alert) version = { 3,0 } length = 18 (0x12) < encrypted > } ] server socket closed. example 2 the -s option turns on ssl parsing. because the -x option is not used in this example, undecoded values are output as raw data. the output is routed to a
text file. $ ssltap -s -p 444 interzone.mcom.com:443 > s.txt output connected to interzone.mcom.com:443 --> [ alloclen = 63 bytes [ssl2] clienthellov2 { version = {0x03, 0x00} cipher-specs-length = 36 (0x24) sid-length = 0 (0x00) challenge-length = 16 (0x10) cipher-suites = { (0x010080) ssl2/rsa/rc4-128...
...{ type = 23 (application_data) version = { 3,0 } length = 223 (0xdf) > encrypted > } sslrecord { type = 21 (alert) version = { 3,0 } length = 18 (0x12) > encrypted > } ] server socket closed. example 3 in this example, the -h option turns hex/ascii format. there is no ssl parsing or decoding. the output is routed to a
text file. $ ssltap -h -p 444 interzone.mcom.com:443 > h.txt output connected to interzone.mcom.com:443 --> [ 0: 80 40 01 03 00 00 27 00 00 00 10 01 00 80 02 00 | .@....'......... 10: 80 03 00 80 04 00 80 06 00 40 07 00 c0 00 00 04 | .........@...... 20: 00 ff e0 00 00 0a 00 ff e1 00 00 09 00 00 03 00 | ........á....... 30: 00 06 9b fe 5b 56 96 49 1f 9f ca dd ...
... 20 53 65 72 76 65 72 20 | tificate server f0: 49 49 30 1e 17 0d 39 38 30 35 31 36 30 31 30 33 | ii0...9805160103 <additional data lines> ] <additional records in same format> server socket closed. example 4 in this example, the -s option turns on ssl parsing, and the -h option turns on hex/ascii format. both formats are shown for each record. the output is routed to a
text file. $ ssltap -hs -p 444 interzone.mcom.com:443 > hs.txt output connected to interzone.mcom.com:443 --> [ 0: 80 3d 01 03 00 00 24 00 00 00 10 01 00 80 02 00 | .=....$......... 10: 80 03 00 80 04 00 80 06 00 40 07 00 c0 00 00 04 | .........@...... 20: 00 ff e0 00 00 0a 00 ff e1 00 00 09 00 00 03 03 | ........á....... 30: 55 e6 e4 99 79 c7 d7 2c 86 78 96 5d ...
Necko walkthrough
treamlistener pointer, 'loader' to nsuriloader::openchannel - it creates an nsdocumentopeninfo object, which implements nsistreamlistener, i.e. has onstartrequest, onstoprequest, ondataavailable, the three functions in which channel responses are received asynchronously. nshttpchannel::asyncopen called from openuri; openchannel isn't named the best, since the opening happens in the con
text of openuri, its calling function. this is where it hits necko code. but the interface for clients of necko is important to consider: send request uri helps creates channel setup channel (headers, request data, response callback...) channel->asyncopen. receive response get a callback to each of these: nsistreamlistener::onstartrequest (header info) ns...
... this is the global nshttphandler object, which adds the transaction to the nshttpconnectionmgr (one of these per nshttphandler). nshttpconnectionmgr::postevent creates an nsconnevent with params including the handler function, nshttpconnectionmgr::onmsgnewtransaction, and the recently created nshttptransaction. dispatches the nsconnevent to the socket thread back to the con
text of nshttpchannel::continueconnect: nsinputstreampump->asyncread this pump calls nsiasyncinputstream::asyncwait (the input for the response stream pipe created with the nshttptransaction, i.e. nspipeinputstream::asyncwait), with target thread set to the current thread, i.e. main. so, subsequent callbacks will be dispatched to the main thread. nspipeinputstream::asyncwait sets t...
...n) tells the transaction to now wait (`resumerecv) nshttpconnection::resumerecv nshttptransaction::readsegments readrequestsegment is passed to mrequeststream->readsegments - this function pointer is called and used to read the request bytes, which in turn calls ... nshttpconnection::onreadsegment passes bytes read from request to msocketout->write back to the con
text of onsocketwritable: nsiasyncinputstream::asyncwait (i.e. msocketin) sets the callback and waits. the http request is now written to the socket, which has a callback to the nshttpconnection... note: from what i can tell, there are some cases where the transaction is queued up to be written to the socket later if it's not writable now, or in the case of pipelining or spdy where it's ...
Invariants
e stays within a single compartment (indeed, a single global object) end-to-end. lifetime invariants in some places, pointers to jsobjects and jsstrings must refer to live heap objects, but this is not a hard fast rule, especially for strings. some jsstrings are allocated on the stack for quick operations. some commonly used strings are allocated statically; see jsstring::isstatic(). most jscon
text pointers must point to live con
texts, but jstitle::ownercx may point to one that has been destroyed! so code must check js_validcon
textpointer(ownercx) before dereferencing it. shape invariants the shape guarantees hold whenever the property cache is enabled. also, we never change the shape of the global object on trace. (here "the global object" refers to the object at the end of the scope c...
...inter(ownercx) before dereferencing it. shape invariants the shape guarantees hold whenever the property cache is enabled. also, we never change the shape of the global object on trace. (here "the global object" refers to the object at the end of the scope chain of the function object we're executing.) requests many functions require a request. that is, they take a parameter cx of type jscon
text *, and require that cx is in a request on the current thread. see js_threadsafe. "are we in a request on cx?", where cx is any variable of type jscon
text *, is a static yes for most lines of code where such a variable exists. occasionally it's a static no; other times we don't care. almost all jsapi callbacks provide a request; that is, when we call a callback with a cx argument, we know stat...
...ng for with and eval "nearby" in the parse tree.) if a nested function contains a nameexpression that refers to a variable in an enclosing scope which the function can outlive (i.e. the function can be called after control exits that enclosing scope) then upvar instructions cannot be used for that nameexpression. (wrong results or a potentially exploitable crash. the upvar ops depend on a per-con
text display of currently active stack frames. once the enclosing stack frame is removed from the stack, and thus from the display, the upvar lookup will no longer work correctly and can crash or read off the end of a different stack frame.) ...
JS::CallArgs
ion call. syntax js::callargs js::callargsfromvp(unsigned argc, js::value *vp); name type description args unsigned number of argument. (2nd argument of jsnative) vp js::value * a pointer to the argument value array. (3nd argument of jsnative) methods methods of js::callargs method description bool requireatleast(jscon
text *cx, const char *fnname, unsigned required) returns true if there are at least required arguments passed in. if false, it reports an error message on the con
text. methods inherited from js::callargsbase method description unsigned length() const returns the number of arguments.. js::mutablehandlevalue operator[](unsigned i) const returns the i-th zer...
...ng called, as a value. must not be called after rval() has been used! js::handlevalue thisv() const returns the this value passed to the function. this method must not be called when the function is being called as a constructor via new. the value may or may not be an object: it is the individual function's responsibility to box the value if needed. js::value computethis(jscon
text *cx) const returns the this value if this is an object, otherwise calls js_computethis and returns it. bool isconstructing() const returns true if the function is called via new. mutablehandlevalue rval() const returns the currently-set return value. the initial contents of this value are unspecified. once this method has been called, callee() and calleev() can no ...
...ll require changing methods' signatures but won't require invasive changes to the methods' implementations, potentially under time pressure. js::callargs encapsulates access to the callee, this, the function call's arguments, and eventual return value for a function call. the principal way to create a callargs is like so, using js::callargsfromvp: static bool functionreturningargctimesarg0(jscon
text *cx, unsigned argc, js::value *vp) { js::callargs args = js::callargsfromvp(argc, vp); // guard against no arguments or a non-numeric arg0. if (args.length() == 0 || !args[0].isnumber()) { args.rval().setint32(0); return true; } // access to the callee must occur before accessing/setting // the return value. jsobject &callee = rec.callee(); // it...
JS::CompileOffThread
this article covers features introduced in spidermonkey 31 compile a script off thread for execution. syntax bool js::cancompileoffthread(jscon
text *cx, const js::readonlycompileoptions &options, size_t length); bool js::compileoffthread(jscon
text *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::offthreadcompilecallback callback, void *callbackdata); jsscript * js::finishoffthreadscript(jscon
text *maybecx, jsruntime *rt, void *token); typedef void (*js::offthreadcompilecallback)(void *token, void *callbackdata); name type description cx / maybe jscon
text * pointer to a js con
text from which to derive runtime information. requires request. in ...
... rt jsruntime * pointer to a js runtime. options js::readonlycompileoptions & compile options. chars const char16_t * string containing the script to compile. length size_t the length of chars or bytes, in characters. ...
... size_t the length of chars or bytes, in characters. callback js::offthreadcompilecallback a callback function invoked when the compilation. callbackdata / token void * pointer to application-defined data. description js::compileoffthread compiles a script, chars for execution. the script is associated with a js object. chars is the string containing the
text of the script. length indicates the size of the
text version of the script in characters. after successfully triggering an off thread compile of a script, the callback will eventually be invoked with the specified data and a token for the compilation. the callback will be invoked while off the main thread, so its operations must be thread safe. afterwards, js::finishoffthreadscript must be invok...
JSDeletePropertyOp
provides request. in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx. the callback does not need to call js_beginrequest()). obj js::handleobject the object whose properties are being deleted. ...
...provides request. in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx. the callback does not need to call js_beginrequest()). obj js::handleobject the object whose properties are being deleted. ...
...provides request. in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx. the callback does not need to call js_beginrequest()). obj js::handleobject the object whose properties are being deleted. ...
JSErrorReport
handler) for juicy morsels of its contents. to counter this attack, html5 specifies that script errors should be sanitized ("muted") when the script is not same-origin with the global for which it is loaded. callers should set this flag for cross-origin scripts, and it will be propagated appropriately to child scripts and passed back in jserrorreports. linebuf const char *
text of the line that caused the error, minus the trailing newline character. tokenptr const char * pointer to the error token in *linebuf. uclinebuf const char16_t * unicode line buffer. this is the buffer that contains the original data. uctokenptr const char16_t * pointer to the error token in *uclinebuf. flags unsigned the logical or...
...set, since the exception may be caught and handled by javascript code. jsreport_strict this error is only being reported because the engine is in strict mode. jsreport_strict_mode_error this condition is an error in strict mode code, a warning if js_has_strict_option(cx), and otherwise should not be reported at all. we check the strictness of the con
text's top frame's script; where that isn't appropriate, the caller should do the right checks itself instead of using this flag. the constant jsreport_error is 0 and can be used to indicate an error report without any of the above flags. errornumber unsigned the error number. ucmessage const char16_t * the default unicode error message. messageargs ...
...nter to a user-defined buffer into which js copies the unicode (original) version of the offending line of script. uctokenptr is a pointer into uclinebuf that identifies the precise location line of the problem within the offending unicode (original) version of the offending line. to use jserrorreport, your application must define a variable of type jserrorreport and allocate a buffer to hold the
text that generated the error condition. set linebuf to point at the buffer before your application executes a script. for unicode scripts, define a second buffer that holds the unicode version of the
text the generated the error. for application that do not use unicode, set uclinebuf and uctokenptr to null. macros name description jsreport_is_warning(flags) returns true if fla...
JSReserveSlotsOp
obj jsobject * the new object. ...
... obj jsobject * the new object. ...
... obj jsobject * the new object. ...
JS_AddArgumentFormatter
obsolete since jsapi 18this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. add or remove a format string handler for js_convertarguments, js_pusharguments, js_convertargumentsva, and js_pushargumentsva. syntax jsbool js_addargumentformatter(jscon
text *cx, const char *format, jsargumentformatter formatter); void js_removeargumentformatter(jscon
text *cx, const char *format); name type description cx jscon
text * the con
text in which to install the formatter. format const char * the format string prefix that should be handled by formatter, or whose handler should be removed. formatter jsargumentformatter t...
... string prefix that should be handled by formatter, or whose handler should be removed. formatter jsargumentformatter the function to be used to convert arguments described by the given format. this function is described in more detail below. description js_addargumentformatter establishes formatter as the conversion function for format strings beginning with format in the con
text cx. on success, it returns js_true. otherwise it returns js_false. (at the moment, js_addargumentformatter fails only if there is no memory available to record the registration.) js_addargumentformatter does not copy format, it points at the string storage allocated by the caller, which is typically a string constant. if format is in dynamic storage, the caller must keep the string alive until js...
...ration.) js_addargumentformatter does not copy format, it points at the string storage allocated by the caller, which is typically a string constant. if format is in dynamic storage, the caller must keep the string alive until js_removeargumentformatter is called. js_removeargumentformatter removes any conversion functions associated with format. callback syntax jsbool (*jsargumentformatter)(jscon
text *cx, const char *format, jsbool fromjs, jsval **vpp, va_list *app); name type description cx jscon
text * the con
text in which the conversion is being performed. format const char * the tail of the format string whose prefix is associated with this formatting function. fromjs jsbool js_true if the conversion functi...
JS_CheckForInterrupt
description js_checkforinterrupt checks for the interrupt, and handle it if it's pending. js_checkforinterrupt returns false if interrupt callback returns false. ...
... description js_checkforinterrupt checks for the interrupt, and handle it if it's pending. js_checkforinterrupt returns false if interrupt callback returns false. ...
... description js_checkforinterrupt checks for the interrupt, and handle it if it's pending. js_checkforinterrupt returns false if interrupt callback returns false. ...
JS_CompileFunction
obsolete since jsapi 36this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. creates a javascript function from a
text string. syntax jsfunction * js_compilefunction(jscon
text *cx, jsobject *obj, const char *name, unsigned int nargs, const char **argnames, const char *body, size_t length, const char *filename, unsigned int lineno); jsfunction * js_compileucfunction(jscon
text *cx, jsobject *obj, const char *name, unsigned int nargs, const char **argnames, const jschar *body, size_t length, const char *filename, unsigned int lineno); name type description cx jscon
text * the con
text in which to compile the function. require...
... obj jsobject * object with which the function is associated. name const char * name to assign the newly compiled function. nargs unsigned int number of arguments to pass to the function. argnames const char ** names to assign to the arguments passed to the function. ...
...ion to compile. length size_t the length, in characters, of body. filename const char * name of file or url containing the function. used to report filename or url in error messages. lineno unsigned int line number. used to report the offending line in the file or url if an error occurs. description js_compilefunction compiles a function from a
text string, bytes, and optionally associates it with a js object, obj. js_compileucfunction is the unicode version of the function. name is the name to assign to the newly created function. nargs is the number of arguments the function takes, and argnames is a pointer to the first element of an array of names to assign each argument. the number of argument names should match the number of arguments ...
JS_ConstructObject
js_new. a less-preferred short-term solution might be to use this reimplementation of the method, but note that this reimplementation is not guaranteed to continue working across spidermonkey releases. create a new object of the specified class, with the specified prototype and parent, then invokes a constructor function to initialize the new object. syntax jsobject * js_constructobject(jscon
text *cx, jsclass *clasp, jsobject *proto, jsobject *parent); jsobject * js_constructobjectwitharguments(jscon
text *cx, jsclass *clasp, jsobject *proto, jsobject *parent, unsigned int argc, jsval *argv); name type description cx jscon
text * the con
text in which to create the new object. requires request. in a js_threadsafe build, the caller must be in a request...
... clasp jsclass * pointer to the class to use for the new object. if this is null, an ordinary javascript object is created. proto jsobject * the object to serve as the new object's prototype, or null. ...
...null if argc is zero. otherwise, the first argc elements of this array must be populated with valid jsval values. the caller does not need to ensure that the array elements are rooted. description js_constructobject creates a new object of the specified class, with the specified prototype and parent, then invokes a constructor function to initialize the new object. cx is a pointer to a con
text associated with the runtime in which to create the new object. clasp is a pointer to the class of object to create. proto and parent may specify objects to be used as the new object's prototype and parent. if either is null, the engine tries to find reasonable defaults. js_constructobjectwitharguments is the same but additionally passes zero or more arguments to the constructor. neither of thes...
JS_ConvertArguments
obsolete since jsapi 38this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. converts a series of js values, passed in an argument array, to their corresponding js types. syntax bool js_convertarguments(jscon
text *cx, const js::callargs &args, const char *format, ...); // added in spidermonkey 31 bool js_convertarguments(jscon
text *cx, unsigned argc, jsval *argv, const char *format, ...); // obsolete since jsapi 30 name type description cx jscon
text * the con
text in which to perform any necessary conversions. cx also affects the interpretation of format, if js_addargumentformatter has been called. ...
... args const js::callargs & reference to the arguments to convert. added in spidermonkey 31 argc unsigned the number of arguments to convert. ...
...itten back to argv, which is rooted.) description js_convertarguments provides a convenient way to translate a series of js values into their corresponding js types with a single function call. it saves you from having to write separate tests and elaborate if...else statements in your function code to retrieve and translate multiple js values for use with your own functions. cx is the con
text for the call. argc indicates the number of js values you are passing in for conversion. argv is a pointer to the array of js values to convert. format is a null-terminated c string. each element of the array indicates the c type into which to convert the next available js value. format can contain one or more instances of the following characters, as appropriate: character c type ...
JS_DeepFreezeObject
obj js::handle<jsobject*> an object to freeze. description js_deepfreezeobject freezes obj, and all objects it refers to, recursively. ...
... obj js::handle<jsobject*> an object to freeze. description js_deepfreezeobject freezes obj, and all objects it refers to, recursively. ...
... obj js::handle<jsobject*> an object to freeze. description js_deepfreezeobject freezes obj, and all objects it refers to, recursively. ...
JS_DefineFunction
create a native function and assign it as a property to a specified js object. ...
... create a native function and assign it as a property to a specified js object. ...
...finefunction(jscon
text *cx, js::handle<jsobject*> obj, const char *name, jsnative call, unsigned nargs, unsigned attrs); jsfunction * js_defineucfunction(jscon
text *cx, js::handle<jsobject*> obj, const char16_t *name, size_t namelen, jsnative call, unsigned nargs, unsigned attrs); jsfunction * js_definefunctionbyid(jscon
text *cx, js::handle<jsobject*> obj, js::handle<jsid> id, jsnative call, unsigned nargs, unsigned attrs); // added in spidermonkey 17 name type description cx jscon
text * the con
text in which to define the function. requires request. in a js_threadsafe build, the caller must be in a request on this jscon
text. obj js...
JS_DeleteProperty2
obsolete since jsapi 39this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. removes a specified property from an object. renamed to js_deleteproperty from jsapi 39. ...
...e is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. removes a specified property from an object. renamed to js_deleteproperty from jsapi 39. syntax bool js_deleteproperty2(jscon
text *cx, js::handleobject obj, const char *name, bool *succeeded); bool js_deleteucproperty2(jscon
text *cx, js::handleobject obj, const char16_t *name, size_t namelen, bool *succeeded); bool js_deletepropertybyid2(jscon
text *cx, js::handleobject obj, js::handleid id, bool *succeeded); // added in spidermonkey 1.8.1 name type description cx jscon
text * pointer to a js con
text from which to derive runtime information. requi...
... obj js::handleobject object from which to delete a property. name or id const char * or const char16_t or js::handleid name of the property to delete. namelen size_t (only in js_deleteucproperty2) the length of name in characters; or -1 to indicate that name is null-terminated. ...
nsIDOMXPathEvaluator
note: prior to gecko 1.9, you could call this method on documents other than the one you planned to run the xpath against; starting with gecko 1.9, however, you must call it on the same documen...
...ich resolves name spaces with respect to the definitions in scope for a specified node. it is used to resolve prefixes within the xpath itself, so that they can be matched with the document. null is common for html documents or when no name space prefixes are used. ...
.... null is common for html documents or when no name space prefixes are used. nsidomxpathnsresolver creatensresolver( in nsidomnode noderesolver ); parameters noderesolver the node to be used as a con
text for name space resolution. return value a name space resolver. evaluate() evaluate the specified xpath expression. nsisupports evaluate( in domstring expression, in nsidomnode con
textnode, in nsidomxpathnsresolver resolver, in unsigned short type, in nsisupports result ); parameters expression a string representing the xpath to be evaluated. con
textnode a dom node to evaluate the xpath expression against. to evaluate against a whole document, use the document.documentelement. resolver a name space resolver created by creatensresolver(), or a use...
nsIDOMXULElement
cess to additional properties not normally available from script. builder nsixultemplatebuilder read only. retrives the element's template builder, if it has a template. classname domstring gets/sets the value of the element's class attribute. collapsed boolean true if the element's collapsed attribute is the string "true", otherwise false. removes the attribute if you set it to false. con
textmenu domstring gets/sets the value of the element's con
textmenu attribute. controllers nsicontrollers read only. returns an nsicontrollers object that additional controllers may be appended to so as to provide focus-specific actions for commands. database nsirdfcompositedatasource read only. returns the template builder's database, if it is an rdf template. datasources domstring gets/sets th...
...ets/sets the value of the element's orient attribute. pack domstring gets/sets the value of the element's pack attribute. persist domstring gets/sets the value of the element's persist attribute. ref domstring gets/sets the value of the element's ref attribute. resource nsirdfresource read only. returns the nsirdfresource corresponding to the element's ref or id attribute, if any. ...
...ck domstring gets/sets the value of the element's pack attribute. persist domstring gets/sets the value of the element's persist attribute. ref domstring gets/sets the value of the element's ref attribute. resource nsirdfresource read only. returns the nsirdfresource corresponding to the element's ref or id attribute, if any. status
text domstring gets/sets the value of the element's status
text attribute. style nsidomcssstyledeclaration read only. obsolete since gecko 1.9 returns an object that may be used to read or write individual css style properties for the element. tooltip domstring gets/sets the value of the element's tooltip attribute. tooltip
text domstring gets/sets the value of the element's tooltip
text attribute. top domstring gets/sets the value of the element's top ...
nsIDispatchSupport
js/src/xpconnect/idl/nsidispatchsupport.idlnot scriptable please add a summary to this article. inherits from: nsisupports last changed in gecko 1.7 method overview void comvariant2jsval(in comvariantptr comvar, out jsval val); unsigned long gethostingflags(in string acon
text); boolean isclassmarkedsafeforscripting(in nscidref cid, out boolean classexists); boolean isclasssafetohost(in jscon
textptr cx, in nscidref cid, in boolean capscheck, out boolean classexists); boolean isobjectsafeforscripting(in voidptr theobject, in nsiidref id); void jsval2comvariant(in jsval var, out comvariant comvar); methods comvariant2jsval() converts a com variant to a jsval. void comvariant2jsval( in comvariantptr comvar, out jsval val ); parameters comvar the com variant to...
...var); methods comvariant2jsval() converts a com variant to a jsval. void comvariant2jsval( in comvariantptr comvar, out jsval val ); parameters comvar the com variant to be converted. val the jsval to receive the converted value. gethostingflags() return the activex security and hosting flags. see nsiactivexsecuritypolicy for list of flags. unsigned long gethostingflags( in string acon
text ); parameters acon
text return value isclassmarkedsafeforscripting() test if the specified class is marked safe for scripting. boolean isclassmarkedsafeforscripting( in nscidref cid, out boolean classexists ); parameters cid the nsid representation of the clsid to test. classexists returns containing pr_false if the class is not registered. return value isclasssafetohost() test if the...
...rscripting() test if the specified class is marked safe for scripting. boolean isclassmarkedsafeforscripting( in nscidref cid, out boolean classexists ); parameters cid the nsid representation of the clsid to test. classexists returns containing pr_false if the class is not registered. return value isclasssafetohost() test if the class is safe to host. boolean isclasssafetohost( in jscon
textptr cx, in nscidref cid, in boolean capscheck, out boolean classexists ); parameters cx cid capscheck classexists returns containing pr_false if the class is not registered. return value isobjectsafeforscripting() test if the instantiated object is safe for scripting on the specified interface. boolean isobjectsafeforscripting( in voidptr theobject, in nsiidref id ); parameters ...
nsIExternalProtocolService
specifically, this looks to see whether there are any known possible application handlers in either the nsihandlerservice datastore or registered with the os. boolean e...
...ut boolean afound ); parameters aprotocolscheme the scheme from a url: http, ftp, mailto, and so on. afound was an os default handler for this scheme found? return value an nsihanderinfo for the protocol. isexposedprotocol() check whether a handler for a specific protocol is "exposed" as a visible feature of the current application. an exposed protocol handler is one that can be used in all con
texts. a non-exposed protocol handler is one that can only be used internally by the application. for example, a non-exposed protocol would not be loaded by the application in response to a link click or a x-remote openurl command. instead, it would be deferred to the system's external protocol handler. boolean isexposedprotocol( in string aprotocolscheme ); parameters aprotocolscheme the scheme f...
...osedprotocol( in string aprotocolscheme ); parameters aprotocolscheme the scheme from a url: http, ftp, mailto, and so on. return value true if the protocol is exposed, false otherwise. loaduri() used to load a uri via an external application. might prompt the user for permission to load the external application. void loaduri( in nsiuri auri, [optional] in nsiinterfacerequestor awindowcon
text ); parameters auri the uri to load. awindowcon
text the window to parent the dialog against, and, if a web handler is chosen, it is loaded in this window as well. this parameter may be ultimately passed nsiuriloader.openuri() in the case of a web handler, and awindowcon
text is null or not present, web handlers will fail. loadurl() used to load a url via an external protocol handler (if one exis...
nsIFilePicker
t show(); obsolete since gecko 57.0 attributes attribute type description addtorecentdocs boolean if true, the file is added to the operating system's "recent documents" list (if the operating system has one; nothing happens if there is no such concept on the user's platform). this attribute has no effect if private browsing mode is in effect. defaul
textension astring the extension for the type of files you want to work with. on some platforms, this is automatically appended to filenames the user enters, if required. specify it without a leading dot, for example "jpg". defaultstring astring the filename, including extension, that should be suggested to the user as a default. this should be set before calling open() or show()...
... to create filters for commonly-used file types. for the most up to date list see filepicker.properties. constant value description filterall 0x001 corresponds to the *.* filter for file extensions. all files will pass through the filter. filterhtml 0x002 corresponds to the *.html, *.htm, *.shtml and *.xhtml filters for file extensions. filter
text 0x004 corresponds to the *.txt and *.
text filter for file extensions. filterimages 0x008 corresponds to the *.jpe, *.jpg, *.jpeg, *.gif, *.png, *.bmp, *.ico, *.svg, *.svgz, *.tif, *.tiff, *.ai, *.drw, *.pct, *.psp, *.xcf, *.psd and *.raw filters for file extensions. filterxml 0x010 corresponds to the *.xml filter for file extensions. filterxul 0x020...
... modally. short show(); parameters none. return value one of the return constants. example here's an example: const nsifilepicker = components.interfaces.nsifilepicker; var fp = components.classes["@mozilla.org/filepicker;1"] .createinstance(nsifilepicker); fp.init(window, "dialog title", nsifilepicker.modeopen); fp.appendfilters(nsifilepicker.filterall | nsifilepicker.filter
text); fp.open(function (rv) { if (rv == nsifilepicker.returnok || rv == nsifilepicker.returnreplace) { var file = fp.file; // get the path as string. note that you usually won't // need to work with the string paths. var path = fp.file.path; // work with returned nsilocalfile... } }); if your code is a component and window is not defined, you can get one using nsiwindowmedia...
nsIIOService
s from an addon or from internal browser features, pass the system principal. this principal should almost always be the system principal if aloadingnode is null. the only exception to this is for loads from webworkers since they don't have any nodes to be passed as aloadingnode. please note, aloadingprincipal is *not* the principal of the resource being loaded. but rather the principal of the con
text where the resource will be used. atriggeringprincipal the triggeringprincipal of the load. the triggeringprincipal is the principal of the resource that caused this particular url to be loaded. most likely the triggeringprincipal and the loadingprincipal are identical, in which case the triggeringprincipal can be left out. in some cases the loadingprincipal and the triggeringprincipal are diffe...
...s from an addon or from internal browser features, pass the system principal. this principal should almost always be the system principal if aloadingnode is null. the only exception to this is for loads from webworkers since they don't have any nodes to be passed as aloadingnode. please note, aloadingprincipal is *not* the principal of the resource being loaded. but rather the principal of the con
text here the resource will be used. atriggeringprincipal the triggeringprincipal of the load. the triggeringprincipal is the principal of the resource that caused this particular url to be loaded. most likely the triggeringprincipal and the loadingprincipal are identical, in which case the triggeringprincipal can be left out. in some cases the lo...
...s from an addon or from internal browser features, pass the system principal. this principal should almost always be the system principal if aloadingnode is null. the only exception to this is for loads from webworkers since they don't have any nodes to be passed as aloadingnode. please note, aloadingprincipal is *not* the principal of the resource being loaded. but rather the principal of the con
text where the resource will be used. atriggeringprincipal the triggeringprincipal of the load. the triggeringprincipal is the principal of the resource that caused this particular url to be loaded. most likely the triggeringprincipal and the loadingprincipal are identical, in which case the triggeringprincipal can be left out. in some cases the loadingprincipal and the triggeringprincipal are diffe...
nsILoginManagerCrypto
toolkit/components/passwordmgr/public/nsiloginmanagercrypto.idlscriptable please add a summary to this article. 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview astring decrypt(in astring cipher
text); astring encrypt(in astring plain
text); attributes attribute type description isloggedin boolean current login state of the token used for encryption. if the user is not logged in, performing a crypto operation will result in a master password prompt. read only. uibusy boolean true when a master password prompt is being displayed. read only. methods decrypt() decrypts the specified string, returning the plain
text value. can throw if the user cancels ent...
...in state of the token used for encryption. if the user is not logged in, performing a crypto operation will result in a master password prompt. read only. uibusy boolean true when a master password prompt is being displayed. read only. methods decrypt() decrypts the specified string, returning the plain
text value. can throw if the user cancels entry of their master password, or if the cipher
text value can not be successfully decrypted (for example, if it was encrypted with some other key). astring decrypt( in astring cipher
text ); parameters cipher
text the string to be decrypted. return value the decrypted string. encrypt() encrypts the specified string, returning the cipher
text value. note: the current implemention of this inferface simply uses nss/psm's "secret decoder ring" serv...
...e string to be decrypted. return value the decrypted string. encrypt() encrypts the specified string, returning the cipher
text value. note: the current implemention of this inferface simply uses nss/psm's "secret decoder ring" service. it is not recommended for general purpose encryption/decryption. can throw if the user cancels entry of their master password. astring encrypt( in astring plain
text ); parameters plain
text the string to be encrypted. return value the encrypted string. ...
nsIMsgCustomColumnHandler
inherits from: nsitreeview this interface is meant to be implemented by extensions, as shown in the tutorial. the interface inherits from nsitreeview, however when you're implementing a custom handler in javascript its not necessary to implement all of nsitreeview's methods. you must implement: nsitreeview.iseditable() nsitreeview.getcellproperties() nsitreeview.getimagesrc() nsitreeview.getcell
text() nsitreeview.cyclecell() nsimsgcustomcolumnhandler.getsortstringforrow() nsimsgcustomcolumnhandler.getsortlongforrow() nsimsgcustomcolumnhandler.isstring() and optionally: nsitreeview.getrowproperties() from c++ you must implement all of nsitreeview and nsimsgcustomcolumnhandler. example implementation an example javascript implementation that does nothing: var columnhandler = { iseditable: ...
...olumnhandler.getsortlongforrow() nsimsgcustomcolumnhandler.isstring() and optionally: nsitreeview.getrowproperties() from c++ you must implement all of nsitreeview and nsimsgcustomcolumnhandler. ...
...w(in nsimsgdbhdr ahdr); parameters ahdr the message's nsimsgdbhdr. return value the long value that sorting will be done with. isstring() boolean isstring(); parameters none. return value true if the column displays a string value. false otherwise. this affects whether getsortstringforrow or getsortlongforrow is used to determine the sort key for the column. it does not affect whether getcell
text vs. getimagesrc is used to determine what to display. see also extensions:thunderbird:creating_a_custom_column ...
nsIRadioInterfaceLayer
iinterfacerequestor) .createinstance(components.interfaces.nsiradiointerfacelayer); method overview void answercall(in unsigned long callindex); void deactivatedatacall(in domstring cid, in domstring reason); void dial(in domstring number); void enumeratecalls(in nsiriltelephonycallback callback); void getdatacalllist(); unsigned short getnumberofmessagesfor
text(in domstring
text); void hangup(in unsigned long callindex); void registercallback(in nsiriltelephonycallback callback); void registerdatacallcallback(in nsirildatacallback callback); void rejectcall(in unsigned long callindex); void sendsms(in domstring number, in domstring message, in long requestid, in unsigned long long processid); void setupdatacall(in long radiotech, in domstrin...
...eratecalls() will continue calling callback.enumeratecallstate until the callback returns false. void enumeratecalls( in nsiriltelephonycallback callback ); parameters callback missing description exceptions thrown missing exception missing description getdatacalllist() void getdatacalllist(); parameters none. exceptions thrown missing exception missing description getnumberofmessagesfor
text() returns the number of multi-part sms needed for a given
text (160 characters for one sms). unsigned short getnumberofmessagesfor
text( in domstring
text ); parameters
text the body
text of an sms. return value unsigned short. number of sms needed. hangup() void hangup( in unsigned long callindex ); parameters callindex missing description exceptions thrown missing exception missing de...
... void rejectcall( in unsigned long callindex ); parameters callindex missing description exceptions thrown missing exception missing description sendsms() sends a message to a specified number. void sendsms( in domstring number, in domstring message, in long requestid, in unsigned long long processid ); parameters number a domstring with a telephone number to send to. message the
text message as a domstring. requestid missing description processid missing description setupdatacall() pdp apis. void setupdatacall( in long radiotech, in domstring apn, in domstring user, in domstring passwd, in long chappap, in domstring pdptype ); parameters radiotech missing description apn missing description user missing description passwd missing description chappap missing des...
nsIScriptError
type description category string a string indicating the category of error that occurred see categories for a list. read only. columnnumber pruint32 the column number where the error occurred. this is used to draw the arrow pointing to the problem character. read only. errormessage astring the error message in a string format without any con
text/line number information. note: nsiconsolemessage.message will return the error formatted with file/line information. read only. flags pruint32 flags; see flag constants for a list. read only. innerwindowid unsigned long long the inner window id with which the error is associated. this is zero if the error was initialized by calling nsiscripterror.
...f the flags declared in nsiscripterror. infoflag 0x8 just a log message methods init() initializes the object with information describing the error which occurred. void init( in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category ); parameters message the
text of the message to add to the log. sourcename the url of the file in which the error occurred. this will be a hyperlink in the javascript console, so you should use a real url. you may pass null if it's not applicable. sourceline the line number in the source file on which the error occurred. you are responsible for providing that line. you may pass null if you are lazy; that will prevent show...
...'s id. note: prior to gecko 12.0, this method was provided by the nsiscripterror2 interface, which has now been merged into this one. void initwithwindowid( in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category, in unsigned long long innerwindowid ); parameters message the
text of the message to add to the log. sourcename the url of the file in which the error occurred. this will be a hyperlink in the javascript console, so you should use a real url. you may pass null if it's not applicable. sourceline the line number in the source file on which the error occurred. you are responsible for providing that line. you may pass null if you are lazy; that will prevent show...
nsIScriptableUnicodeConverter
intl/uconv/idl/nsiscriptableuconv.idlscriptable this interface is a unicode encoder for use by scripts. ...
... intl/uconv/idl/nsiscriptableuconv.idlscriptable this interface is a unicode encoder for use by scripts. ...
...id converttobytearray(in astring astring, out unsigned long alen, optional [array, size_is(alen),retval] out octet adata ); converttoinputstream() converts a unicode string to an input stream. the bytes in the stream are encoded according to the charset attribute. the returned stream is non-blocking. nsiinputstream converttoinputstream( in astring astring ); parameters astring the
text to encode to the stream. the
text is encoded into the character set specified by the charset attribute. return value an nsiinputstream that will present the
text specified in astring as its data. examples see reading
textual data and writing
textual data for examples. ...
nsISmsDatabaseService
nsismsdatabaseservice dom/sms/interfaces/nsismsdatabaseservice.idlscriptable used to store and manage sms
text messages for the websms api 1.0 66 introduced gecko 13.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsdatabaseservice;1. to create an instance, use: var smsservice = components.classes["@mozilla.org/sms/smsdatabaseservice;1"] .createinstance(components.interfaces.nsismsdatabaseservice); method overview long savereceivedmessage(in domstring asender, in domstring abody, in unsigned long long adate); long savesentmessage(in domstring areceiver, in domstring abody, in unsigned long long adate); void getmessage(in long messageid, i...
...adate the timestamp of the message. ge...
...rmessagelist(in long listid); void markmessageread(in long messageid, in boolean value, in long requestid, [optional] in unsigned long long processid) methods savereceivedmessage() void savereceivedmessage( in domstring asender, in domstring abody, in unsigned long long adate ); parameters asender a domstring with the sender of the
text message. abody a domstring containing the body
text of the message. adate the timestamp of the message. savesentmessage() void savesentmessage( in domstring a receiver, in domstring abody, in unsigned long long adate ); parameters areceiver a domstring with the receiver of the
text message. abody a domstring containing the body
text of the message. adate the timestamp of the message. getmessage() void getmessage( in long messageid, i...
nsIStreamConverter
you could implement this interface to allow everyone else to use your conversion logic using a standard api. stream converter users there are currently two ways to use a stream converter: synchronous: stream to stream. ...
...nvert) nsistreamlistener callbacks asynchronously. void asyncconvertdata( in string afromtype, in string atotype, in nsistreamlistener alistener, in nsisupports actxt ); parameters afromtype the mime type of the original/raw data. atotype the mime type of the converted data. alistener the listener who receives the converted data. actxt either an opaque con
text, or a converter specific con
text (implementation specific). convert() synchronous version: converts a stream of one type, to a stream of another type. use this method when you have a stream you want to convert. nsiinputstream convert( in nsiinputstream afromstream, in string afromtype, in string atotype, in nsisupports actxt ); parameters afromstream the stream representing the...
... this method when you have a stream you want to convert. nsiinputstream convert( in nsiinputstream afromstream, in string afromtype, in string atotype, in nsisupports actxt ); parameters afromstream the stream representing the original/raw data. afromtype the mime type of afromstream. atotype the mime type of the returned stream. actxt either an opaque con
text, or a converter specific con
text (implementation specific). return value the converted stream. note: the returned stream may not already be converted. an efficient stream converter implementation will converter data on demand rather than buffering the converted data until it is used. ...
nsIStringBundle
ace provides functions for retrieving both formatted and unformatted strings from a properties file. inherits from: nsisupports last changed in gecko 1.7 this interface is used by xul:stringbundle to retrieve strings. it is recommended that you use the methods of xul:stringbundle to access these functions unless necessary. alternatively, a string bundle can be created within a javascript con
text with nsistringbundleservice. method overview wstring formatstringfromid(in long aid, [array, size_is(length)] in wstring params, in unsigned long length); wstring formatstringfromname(in wstring aname, [array, size_is(length)] in wstring params, in unsigned long length); nsisimpleenumerator getsimpleenumeration(); wstring getstringfromid(in long aid); ...
...ence of %s (uppercase) is replaced by each successive element in the supplied array. you may also use other formatting codes. you can only pass unicode strings in. the id should refer to a string in the bundle that uses %s, and the number of strings you pass must be the same here and in the properties file (that is you can't omit %1 and use only %2). do not try to use any other types. this uses ns
textformatter::smprintf. wstring formatstringfromid( in long aid, [array, size_is(length)] in wstring params, in unsigned long length ); parameters aid the id of the string to retrieve. params parameters to pass in to the string. length the length of the parameter list. return value returns the formatted string. formatstringfromname() returns a formatted string with the given key...
...ce of %s (uppercase) is replaced by each successive element in the supplied array. you may also use other formatting codes, but can only pass unicode strings in. the name should refer to a string in the bundle that uses %s, and the number of strings you pass must be the same here and in the properties file (that is you can't omit %1 and use only %2). do not try to use any other types. this uses ns
textformatter::smprintf to do the dirty work. wstring formatstringfromname( in wstring aname, [array, size_is(length)] in wstring params, in unsigned long length ); parameters aname the name of the string to retrieve. params parameters to pass in to the string. length the length of the parameter list. return value returns the formatted string. getsimpleenumeration() nsisimpleenum...
nsITXTToHTMLConv
netwerk/streamconv/public/nsitxttohtmlconv.idlscriptable this interface allows you to modify the conversion from plain
text to html. inherits from: nsistreamconverter last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by "@mozilla.org/streamconv;1?from=
text/plain&to=
text/html". you should normally obtain an instance via the nsistreamconverterservice interface. method overview void preformathtml(in boolean value); void settitle(in wstring
text); prior versions of the interface named the methods using the initialcaps style instead of the intercaps style. methods preformathtml() specifies whether or not to wrap the resulting html in an <pre> block. void preformathtml( in boolean value ); parameters value true to wrap the resulting ht...
... ...
... named the methods using the initialcaps style instead of the intercaps style. methods preformathtml() specifies whether or not to wrap the resulting html in an <pre> block. void preformathtml( in boolean value ); parameters value true to wrap the resulting html in a <pre> block. settitle() sets the title to use on the resulting html document. void settitle( in wstring
text ); parameters
text title to set for the html document. ...
nsIWebBrowserChrome2
embedding/browser/webbrowser/nsiwebbrowserchrome2.idlscriptable an extension to nsiwebbrowserchrome. 1.0 66 introduced gecko 1.9 inherits from: nsiwebbrowserchrome last changed in gecko 1.9 (firefox 3) method overview void setstatuswithcon
text(in unsigned long statustype, in astring status
text, in nsisupports statuscon
text); methods setstatuswithcon
text() called when the status
text in the chrome needs to be updated. ...
...iew void setstatuswithcon
text(in unsigned long statustype, in astring status
text, in nsisupports statuscon
text); methods setstatuswithcon
text() called when the status
text in the chrome needs to be updated. this method may be called instead of nsiwebbrowserchrome.setstatus(). an implementor of this method, should still implement nsiwebbrowserchrome.setstatus(). void setstatuswithcon
text( in unsigned long statustype, in astring status
text, in nsisupports statuscon
text ); parameters statustype indicates what is setting the
text. status
text status string. null is an acceptable value meaning no status. statuscon
text an object that provides con
text pertaining to the status type. if statustype is status_link, then this may be a dom node corresponding to...
...supports statuscon
text ); parameters statustype indicates what is setting the
text. status
text status string. null is an acceptable value meaning no status. statuscon
text an object that provides con
text pertaining to the status type. if statustype is status_link, then this may be a dom node corresponding to the source of the link. this value can be null if there is no con
text. see also nsiwebbrowserchrome ...
nsIWebProgressListener
inherits from: nsisupports last changed in gecko 15 (firefox 15 / thunderbird 15 / seamonkey 2.12) nsiwebprogress describes the parent-child relationship of nsiwebprogress instances. ...
...ress the nsiwebprogress instance that fired the notification. arequest the nsirequest that has new status. astatus this value is not an error code. instead, it is a numeric value that indicates the current status of the request. this interface does not define the set of possible status codes. note: some status values are defined by nsitransport and nsisockettransport. amessage localized
text corresponding to astatus. example the nsiwebprogresslistener for each tab: gbrowser.mtabprogresslistener can be used in the parent to listen for most nsiwebprogresslistener events, but in browser code, will not have access to the nsiwebprogress's domwindow property. see the example below on how to use an nsiwebprogresslistener in a frame script to get access to the dom window. this example...
...tener events, but in browser code, will not have access to the nsiwebprogress's domwindow property. see the example below on how to use an nsiwebprogresslistener in a frame script to get access to the dom window. this example here shows you how to detect what flags are popping up where. it puts the messages into the browser console. /** * this example assumes that it's being run within the con
text of a browser * window, and uses a frame script that will be loaded into every * browser tab. */ let mm = window.getgroupmessagemanager("browsers"); mm.loadframescript("chrome://path/to/some/example-framescript.js", true); mm.addmessagelistener("myaddonmessage", (message) => { let data = message.data; let browser = message.target; let outerwindowid = data.outerwindowid; // browser is n...
nsIXULTemplateQueryProcessor
rence point. there is a one-to-one relationship between a template builder and a query processor. the template builder creates the query processor, and there is no other means to retrieve it. a template query is the contents inside a <query> element within the template. the actual syntax is opaque to the template builder and defined by a query processor. the query is expected to consist of either
text or dom nodes that, when executed by a call to the generateresults() method, will allow the generation of a list of results. the template builder will supply two variables, the reference variable and the member variable to further indicate what part of the datasource is to be examined in addition to the query itself. the reference is always a placeholder for the starting point and the member is al...
...ll also be called when the template is going to be rebuilt. void done(); parameters none. generateresults() generate the results of a query and return them in an enumerator. the enumerator must contain nsixultemplateresult objects. if there are no results, an empty enumerator must be returned. the datasource will be the same as the one passed to the earlier initializeforbuilding() method. the con
text reference aref is a reference point used when calculating results. the value of aquery must be the result of a previous call to compilequery() from this query processor. this method may be called multiple times, typically with different values for aref. nsisimpleenumerator generateresults( in nsisupports adatasource, in nsixultemplateresult aref, in nsisupports aquery ); parameters adatas...
...ed when calculating results. the value of aquery must be the result of a previous call to compilequery() from this query processor. this method may be called multiple times, typically with different values for aref. nsisimpleenumerator generateresults( in nsisupports adatasource, in nsixultemplateresult aref, in nsisupports aquery ); parameters adatasource datasource for the data. aref con
text reference value used as a starting point. aquery the compiled query returned from query compilation. return value an enumerator of nsixultemplateresult objects as the results. exceptions thrown ns_error_invalid_arg if aquery is invalid. getdatasource() retrieve the datasource to use for the query processor. the list of datasources in a template is specified using the datasources attribute as a...
nsIZipWriter
exceptions thrown ns_error_not_initialized if no zip file has been opened. file nsifile the zip file being written to.
...en the last operation completes. any failures are passed to the observer. the zip writer will be busy until the queue is complete or an error halts processing of the queue early. in the event of an early failure, the remaining items stay in the queue; calling processqueue() again will continue where operations left off. void processqueue( in nsirequestobserver aobserver, in nsisupports acon
text ); parameters aobserver the observer to receive notifications from the queue. acon
text the con
text to pass to the observer. exceptions thrown ns_error_not_initialized no zip file is open. ns_error_in_progress the queue is already in progress. removeentry() removes an entry from the zip file. void removeentry( in autf8string azipentry, in boolean aqueue ); parameters a...
...but note that if dir doesnt exist zw.open throws problems //var path = fp.file.path; //returns c:\users\3k2kyc1\documents\prefs\prefs var xpi = fu.file(dir.path + '\\' + dir.leafname + '.zip'); zw.open(xpi, pr.pr_rdwr | pr.pr_create_file | pr.pr_truncat...
Address Book examples
the * onsave method is responsible for analyzing the photo of this * type requested by the user, and storing it, as well as the * other fields required by onload/onshow to retrieve and display * the photo again. returns true on success. if the function * returns false, the generic photo handler onsave function will * be called. */ photo handlers are registered within the con
text of the contact editor dialog using the registerphotohandler function, as follows: registerphotohandler(atype, aphotohandler) ...where atype is a string with a unique identifier for that particular photo type. in order for a photo handler to be used for a contact, the phototype property of the contact must return a string equal to atype. the address book defaults with three photo handler types...
...overridden by calling registerphotohandler with these identifiers and a custom photo handler. photo display handlers a photo display handler determines how a contact photo can be extracted from a contact and displayed in an img element. this is useful in the contact viewer within the address book. photo display handlers are registered with the registerphotodisplayhandler function within the con
text of the address book card view overlay. a photo display handler is a function that behaves as follows: /* * function(acard, aimg): * the function is responsible for determining how to retrieve * the photo from nsiabcard acard, and for displaying it in img * img element aimg. returns true if successful. if it returns * false, the generic photo display handler will be called. *...
...er @bar.com, entering foo would become foo@bar.com "addrbook" - use to autocomplete from a local address book, e.g. a mork based local store or a os x address book ldap - use for searching in ldap address books. mydomain and addrbook autocomplete "mydomain" and "addrbook" both use the toolkit interfaces to provide autocomplete facilities. to use them in code all you need to do is set up your
text box as follows: <
textbox id="myautocomplete
textbox" type="autocomplete" autocompletesearch="mydomain addrbook"/> the attributes of the toolkit autocomplete element can also be used here. the "mydomain" and "addrbook" behaviours can be changed by passing an identity key (see nsimsgidentity.key) via an attribute autocompletesearchparam on the
textbox element. ldap autocomplete ldap autocompl...
Index
aces this page contains a list of the interfaces that you'll will most likely use when writing extensions that affect the folder pane. see working with the folder pane for examples and code snippets. 28 gloda thunderbird 3, thunderbird thunderbird includes a new message indexing and search system (gloda) that improves search performance, provides sophisticated full-
text search capabilities and categorized search results. "gloda" is short for the thunderbird "global database". 29 gloda debugging the gloda code has log4moz logging statements spread throughout. the following preferences are supported to control how this gets logged: 30 gloda examples thunderbird 3, thunderbird this page provides some examples for using g...
...gfilterhitnotify interface to handle filter hits. e.g., imap, pop3. 39 mailnews protocols mailnews, thunderbird these are all implemented in c++, except for rss. rss is implemented in js and doesn't follow the same pattern as the c++ protocols. 40 mailnews fakeserver mailnews, seamonkey, thunderbird fakeserver is a testing server that implements a generic
text-based protocol common to all major mailnews protocols (pop, imap, smtp, and nntp) designed for use in automated tests. it can also be used in manual qa tests. 41 mailnews xpcshell-tests automated testing, developing mozilla, mailnews, seamonkey, thunderbird mailnews xpcshell-tests are written and run in the same manner as the core xpcshell-tests. this page describes additiona...
...ring timer events and much more. the window api will give you the complete details. since window is a global variable you can use it directly from your javascript file. 96 access window area needsupdate, missing, thunderbird this page has no content. enrich mdc by contributing. 97 add new tab missing, thunderbird no summary! 98 add option to con
text menu incomplete, thunderbird assuming this on chrome.manifest: 99 add tab needsupdate, missing, thunderbird this page has no content. enrich mdc by contributing. 100 add toolbar button example xul overlay file: 101 create custom column thunderbird the article "creating a custom column" will get you well on the road to creat...
Thunderbird Configuration Files
the config editor, go to tools > options or do thunderbird > preferences. if you are on mac os x, and on linux do edit > preferences on, select the advanced options panel, click on the general tab, and click on config editor. this will display a list of used preferences, as well as a search bar at the top. double-click on a preference to change its value. to do add a new preference, open the con
text menu (right-click) on any existing preference, go to the new menu, and select the type of preference. some preferences may require that you restart thunderbird in order to take effect. configuration files some tips and tricks require that you edit configuration files manually. there are three files you should know about: userchrome.css used to change the appearance of the browser. usercon...
...uire that you restart thunderbird in order to take effect. configuration files some tips and tricks require that you edit configuration files manually. there are three files you should know about: userchrome.css used to change the appearance of the browser. usercontent.css used to change the appearance of web pages. user.js used to change various preferences. all these files are plain
text files you need to create in your profile folder and can be edited using a standard
text editor, such as notepad on windows and gedit or kate on linux. locate your profile folder before the configuration files are presented, you should know how to find your profile folder, which is where thunderbird saves all your settings on your hard drive. on windows vista/xp/2000, the path is usually %app...
...f you know how to create a file, just skip this section. before you can create the file, you must make sure that you can see the file type extensions in windows. start explorer (just click on the my computer icon on your desktop) and select tools > folder options. click the view tab and uncheck the hide extensions for known file types option. now, go to your profile folder and select file > new >
text document. the default name new
text document.txt should be displayed. change the name to user.js (click yes on the file type warning that appears). linux users: use your own preferred method to create user.js in the profile folder. if you don't already have one, consider running the following code in a terminal. $ cd $profile # where $profile is your profile folder $ touch user.js # create ...
Building a Thunderbird extension 3: install manifest
warning: this content is for older versions of thunderbird. much of it may no longer be relevant. see developer.thunderbird.net for newer information. the install.rdf file is an xml file that provides general information about the extension. ...
...ovides general information about the extension. ...
...the first portion is the short name of the extension and must be in lowercase; the last portion is a two-part period-delimited value such as your first and last name or the top-level domain of your website. while this value is in email address format, it is not an email address. it should, however, be a unique value so that it does not conflict wi...
customDBHeaders Preference
tutorial, i'll describe the process i went through in developing a custom column to display a 'superfluous' column within thunderbird's main view. the data will come from a custom header labeled x-superfluous. setting the preferences although there are various ways to set preferences, i tend to just navigate to the directory where my profile is stored and edit the user.js file with my favorite
text editor. in addition to the preference outlined in setting up extension development environment, you'll want to add the following preferences: // this allows you to add extra headers while composing messages user_pref("mail.compose.other.header", "x-superfluous,x-other,x-whatever"); // this enables the preservation of custom headers as incoming mail is processed user_pref( "mailnews.customdbheade...
...gdbview.addcolumnhandler("colsuperfluous",columnhandler)). javascript code once again, other tutorials have demonstrated the general javascript code used to populated columns with data from a message...
..."colsuperfluous",columnhandler)). javascript code once again, other tutorials have demonstrated the general javascript code used to populated columns with data from a message header, so i'm just including my file for reference. ...
Zombie compartments
...
...exts │ │ │ │ ├──0.01 mb (00.00%) ── line-boxes │ │ │ │ └──0.00 mb (00.00%) ──
text-runs │ │ │ ├──3.78 mb (00.76%) ++ js-compartment(https://www.google.de/?gws_rd=ssl) │ │ │ ├──0.51 mb (00.10%) ── style-sheets │ │ │ ├──0.33 mb (00.07%) -- dom │ │ │ │ ├──0.17 mb (00.04%) ──
text-nodes │ │ │ │ ├──0.13 mb (00.03%) ── element-nodes │ │ │ │ ├──0.02 mb (00.00%) ── other │ │ │ │ ├──0.01 mb (00.00%) ── orphan-nodes │ │ │ │ └──0.00 mb (00.00%) ── event-targets │ │ │ └──0.00 mb (00.00%) ── property-tables │ │ └───5.93 mb (01.19%) -- js-zone(0x13ffa00...
...hese steps to do some basic checking of an add-on. create a new profile. install and enable the add-on. restart the browser. browse one or more pages and do something that exercises the add-on. for example, for an add-on that remembers passwords, visit a site that requires a password; for an add-on that performs an operation involving a specific page element such as an image or a chunk of
text, perform that operation. the more you exercise the add-on, the more thorough the testing will be, but in practice a lot of problems show up quickly. open about:memory and close all other pages. return to about:memory and minimize memory and remeasure, multiple times if necessary. if only system compartments are present, and there are no ghost windows, congratulations! that's a good sign that...
DOM Inspector FAQ - Firefox Developer Tools
t in the inspect chrome document menu. why do some nodes in the document dom nodes viewer appear in red? these nodes are anonymous content nodes, meaning they are not in the dom generated by the original document. okay, what if i don't want to see those anonymous nodes? you can hide anonymous nodes in inspector by unchecking the view > show anonymous content menu item. i see a lot of empty #
text nodes that i don't see in the original document. what are they, why are they there, and how can i get rid of them? those
text nodes are actually the newlines and spacing between the elements. please see bug 26179 for a lengthy discussion of why they are there. the good news is, you can hide these whitespace nodes in inspector by unchecking the view > show whitespace nodes menu item. note that n...
...those nodes whose white-space css property value prevents the user-agent from collapsing sequences of whitespace will not be hidden. i'm having trouble finding a specific node in the dom tree. isn't there is a faster way to find it than navigating the tree? sure. ...
...e select-by-click toolbar button, and then click on the element you wish to inspect. the edit menu also includes a select element by click menu item. how do i inspect pseudo-classes and pseudo-elements in the css rules viewer? dom inspector allows you to force the :hover, :active, and :focus pseudo-classes to apply to a given node. from the dom nodes viewer, select the node and bring up the con
text menu. you should notice the set pseudo-classes menu item, which will allow you to set the content state for the aforementioned pseudo-classes. there is currently no way to inspect dynamically-applied rules for other pseudo-classes or any pseudo-elements from the dom inspector ui. you can, however, find any rule in its parent style sheet (e.g., to modify it) by using the style sheets viewer in th...
Introduction to DOM Inspector - Firefox Developer Tools
s a class simple selector and uses a list-style-image property to point to a file in the current theme. the list of viewers available from the viewer menu gives you some idea about how extensive the dom inspector's inspecting capabilities are. the following descriptions provide an overview of what these viewers are about: the dom nodes viewer shows attributes of nodes that can take them, or the
text content of
text nodes, comments, and processing instructions. the attributes and
text contents may also be edited. the box model viewer gives various metrics about xul and html elements, including placement and size. the xbl bindings viewer lists the xbl bindings attached to elements. if a binding extends another binding, the binding menulist will list them in descending order to to "root" bind...
...tion with the style sheets viewer, the css rules viewer lists all recognized rules from that style sheet in order. properties may be also be edited. rules applying to pseudo-elements do not appear. the javascript object viewer gives a hierarchical tree of the object pane's subject. the javascript object viewer also allows javascript to be evaluated by selecting the appropriate menuitem in the con
text menu. basic actions of the dom nodes viewer selecting elements by click another powerful interactive feature of the dom inspector is that when you have the dom inspector open and have enabled this functionality by choosing edit > select element by click or by clicking the little magnifying glass icon in the upper left portion of the dom inspector application, you can click anywhere in a loaded...
...ou to dynamically update information reflected in the dom about web pages, user interface, and other elements. note that when the dom inspector displays information about a particular node or subtree, it presents individual nodes and their values (in the dom, attributes are subnodes of elements, typically) in an active list. you can perform actions on the individual items in this list from the con
text menu and the edit menu, both of which contain menutimes that allow you edit the values of those attributes. this interactivity allows you to shrink and grow element size, change icons, and do other layout-tweaking updates—all without actually changing the dom as it is defined in the file on disk. loving the inspector the dom inspector can take some figuring out, but once you get used to it...
Debugger.Frame - Firefox Developer Tools
r" frames. it is also not called when unwinding a frame due to an over-recursion or out-of-memory exception. function properties of the debugger.frame prototype object the functions described below may only be called with a this value referring to a debugger.frame instance; they may not be used as methods of other kinds of objects. eval(code, [options]) evaluatecode in the execution con
text of this frame, and return a completion value describing how it completed.code is a string. if this frame’s environment property is null or type property is wasmcall, throw a typeerror. all extant handler methods, breakpoints, and so on remain active during the call. this function follows the invocation function conventions. codeis interpreted as strict mode code when it contains a use strict ...
...this function follows the invocation function conventions. codeis interpreted as strict mode code when it contains a use strict directive, or the code executing in this frame is strict mode code. ifcode is not strict mode code, then variable declarations incode affect the environment of this frame. (in the terms used by the ecmascript specification, the variableenvironment of the execution con
text for the eval code is the variableenvironment of the execution con
text that this frame represents.) if implementation restrictions prevent spidermonkey from extending this frame’s environment as requested, this call throws an error exception. if given,options should be an object whose properties specify details of how the evaluation should occur. the eval method recognizes the following proper...
...ggee code and which refer to debugger-held debuggee values, and do so without mutating any existing debuggee environment. note that, like eval, declarations in thecode passed to evalwithbindings affect the environment of this frame, even as that environment is extended by bindings visible withincode. (in the terms used by the ecmascript specification, the variableenvironment of the execution con
text for the eval code is the variableenvironment of the execution con
text that this frame represents, and thebindings appear in a new declarative environment, which is the eval code’s lexicalenvironment.) if implementation restrictions prevent spidermonkey from extending this frame’s environment as requested, this call throws an error exception. theoptions argument is as for debugger.frame.prot...
Debugger.Object - Firefox Developer Tools
ent’s display name, if the referent is a function with a display name. if the referent is not a function, or if it has no display name, this is undefined. if a function has a given name, its display name is the same as its given name. in this case, the displayname and name properties are equal. if a function has no name, spidermonkey attempts to infer an appropriate name for it given its con
text. for example: function f() {} // display name: f (the given name) var g = function () {}; // display name: g o.p = function () {}; // display name: o.p var q = { r: function () {} // display name: q.r }; note that the display name may not be a proper javascript identifier, or even a proper expression: we attempt to find helpful names even when the function is not immediate...
...o be sealed is implicit and in a different compartment from the caller.) freeze() prevent properties from being added to or deleted from the referent, and mark each property as non-writable. return this debugger.object instance. (this function behaves like the standard object.freeze function, except that the object to be sealed is implicit and in a different compartment from the caller.) preven
textensions() prevent properties from being added to the referent. (this function behaves like the standard object.preven
textensions function, except that the object to operate on is implicit and in a different compartment from the caller.) issealed() return true if the referent is sealed—that is, if it is not extensible, and all its properties have been marked as non-configurable. (this function...
...iven debuggee code and which refer to debugger-held debuggee values, and do so without mutating any existing debuggee environment. note that, like executeinglobal, any declarations it contains affect the referent global object, even ascode is evaluated in an environment extended according tobindings. (in the terms used by the ecmascript specification, the variableenvironment of the execution con
text forcode is the referent, and thebindings appear in a new declarative environment, which is the eval code’s lexicalenvironment.) theoptions argument is as for debugger.frame.prototype.eval. asenvironment() if the referent is a global object, return the debugger.environment instance representing the referent’s global lexical scope. the global lexical scope’s enclosing scope is the globa...
Debugger.Script - Firefox Developer Tools
module; it protects the module it refers to from being garbage collected. please note at the time of this writing, support for webassembly is very preliminary. many properties and methods below throw. convention for descriptions of properties and methods below, if the behavior of the property or method differs between the instance referring to a jsscript or to a block of webassembly code, the
text will be split into two sections, headed by “if the instance refers to a jsscript” and “if the instance refers to webassembly code”, respectively. if the behavior does not differ, no such emphasized headings will appear. accessor properties of the debugger.script prototype object a debugger.script instance inherits the following accessor properties from its prototype: isgeneratorfunct...
...fers to a jsscript, this is the script’s display name, if it has one. if the script has no display name — for example, if it is a top-level eval script — this is undefined. if the script’s function has a given name, its display name is the same as its function’s given name. if the script’s function has no name, spidermonkey attempts to infer an appropriate name for it given its con
text. for example: function f() {} // display name: f (the given name) var g = function () {}; // display name: g o.p = function () {}; // display name: o.p var q = { r: function () {} // display name: q.r }; note that the display name may not be a proper javascript identifier, or even a proper expression: we attempt to find helpful names even when the function is not immediate...
...jsscript, the number of lines this script’s code occupies, within the file or document named by url. source if the instance refers to a jsscript, the debugger.source instance representing the source code from which this script was produced. this is null if the source code was not retained. if the instance refers to webassembly code, the debugger.source instance representing the serialized
text format of the webassembly code. sourcestart if the instance refers to a jsscript, the character within the debugger.source instance given by source at which this script’s code starts; zero-based. if this is a function’s script, this is the index of the start of the function token in the source code. if the instance refers to webassembly code, throw a typeerror. sourcelength if t...
Tutorial: Set a breakpoint - Firefox Developer Tools
the firefox developer tools, click on the options gear at the upper right of the toolbox, and make sure that both “enable browser chrome and add-on debugging toolboxes” and “enable remote debugging” are checked. these are located at the bottom right of the options panel; you may need to scroll to see them. once they’re checked, you can close the developer tools. save the following
text to an html file: <div onclick="report('the best div');">click me!</div> <div onclick="report('another great div');">or me!</div> <script> function report(what) { console.log('clicked: ' + what); } </script> visit the html file in your browser, and open the browser content toolbox by opening the firefox menu, choosing “web developer”, and then “browser content toolbox”. if that ...
...ar reportdo = windowdo.getownpropertydescriptor('report').value; // set a breakpoint at the entry point of `report`. reportdo.script.setbreakpoint(0, { hit: function (frame) { console.log('hit breakpoint in ' + frame.callee.name); console.log('what = ' + frame.eval('what').return); } }); console.log('finished setting breakpoint!'); in the scratchpad, ensure that no
text is selected, and press the “run” button. now, click on the
text that says “click me!” in the web page. this runs the div element’s onclick handler. when control reaches the start of the report function, debugger calls the breakpoint handler’s hit method, passing a debugger.frame instance. the hit method logs the breakpoint hit to the browser content toolbox’s console. then it eva...
... handler. when control reaches the start of the report function, debugger calls the breakpoint handler’s hit method, passing a debugger.frame instance. the hit method logs the breakpoint hit to the browser content toolbox’s console. then it evaluates the expression what in the given stack frame, and logs its result. the toolbox’s console now looks like this: you can also click on the
text that says “or me!”, to see report called from a different handler. if debugger is unable to find the report function, or the console output does not appear, evaluate the expression tabs[0].content.document.location in the console to make sure that tabs[0] indeed refers to the html file you visited. if you have more than one tab visiting a file: url, they all share a single content process,...
Style Editor - Firefox Developer Tools
sheets being used by the current document. you can quickly toggle the use of a given sheet on and off by clicking the eyeball icon to the left of the sheet's name. you can save any changes you've made to the style sheet to your local computer by clicking the save button in the bottom-right corner of each sheet's entry in the list. from firefox 40 onwards, the style sheet pane also includes a con
text menu that lets you open the selected style sheet in a new tab. the editor pane on the right is the editor pane. this is where the source for the selected style sheet is available for you to read and edit. any changes you make are immediately applied to the page. this makes it easy to experiment with, revise, and test changes. once you're satisfied with your changes, you can save a copy locally ...
...it will offer you a list of suggestions. you can switch autocomplete off in the style editor settings. the media sidebar the style editor displays a sidebar on the right-hand side whenever the current sheet contains any @media rules. the sidebar lists the rules and provides a link to the line of the sheet where the rule is defined. click an item to jump to that rule in the sheet. the condition
text of the rule is greyed-out if the media query doesn’t currently apply. the media sidebar works especially well with responsive design view for creating and debugging responsive layouts: from firefox 46 onwards, if an @media rule contains a screen size in a condition, then it is made clickable: clicking it then resizes the screen to that size using the responsive design view: creating and ...
...o the file, and saving it over the original file. now when you make changes to the source file in the style editor the css is regenerated and you can see the changes right away. keyboard shortcuts source editor shortcuts this table lists the default shortcuts for the source editor. in the editor preferences section of the developer tools settings, you can choose to use vim, emacs, or sublime
text key bindings instead. to select these, visit about:config, select the setting devtools.editor.keymap, and assign "vim" or "emacs", or "sublime" to that setting. if you do this, the selected bindings will be used for all the developer tools that use the source editor. you need to reopen the editor for the change to take effect. from firefox 33 onwards, the key binding preference is exposed in th...
Web Audio Editor - Firefox Developer Tools
notice: this tool has been deprecated and will soon be removed from firefox. for details, see deprecated tools. with the web audio api, developers create an audio con
text. within that con
text they then construct a number of audio nodes, including: nodes providing the audio source, such as an oscillator or a data buffer source nodes performing transformations such as delay and gain nodes representing the destination of the audio stream, such as the speakers each node has zero or more audioparam properties that configure its operation. for example, the gainnode has a single gain property, while the oscillatornode has frequency and detune properties. the developer connects the nodes in a graph, and the complete graph defines the behavior of the audio stream. the web audio editor e...
...nation of the audio stream, such as the speakers each node has zero or more audioparam properties that configure its operation. for example, the gainnode has a single gain property, while the oscillatornode has frequency and detune properties. the developer connects the nodes in a graph, and the complete graph defines the behavior of the audio stream. the web audio editor examines an audio con
text constructed in the page and provides a visualization of its graph. this gives you a high-level view of its operation, and enables you to ensure that all the nodes are connected in the way you expect. you can then examine and edit the audioparam properties for each node in the graph. some non-audioparam properties, like an oscillatornode's type property, are displayed, and you can edit these as we...
...ck or suggestions for new features, dev-developer-tools or twitter are great places to register them. opening the web audio editor the web audio editor is not enabled by default in firefox 32. to enable it, open the developer tool settings and check "web audio". now there should be an extra tab in the toolbox toolbar labeled "web audio". click the tab and load a page that constructs an audio con
text. two good demos are: the voice-change-o-matic, which can apply various effects to the microphone input and also provides a visualisation of the result the violent theremin, which changes the pitch and volume of a sine wave as you move the mouse pointer visualizing the graph the web audio editor will now display the graph for the loaded audio con
text. here's the graph for the violent therem...
Web Console Helpers - Firefox Developer Tools
ocument. this is like for document.queryselectorall(), but returns an array instead of a nodelist. $0 the currently-inspected element in the page. $_ stores the result of the last expression executed in the console's command line. for example, if you type "2+2 <enter>", then "$_ <enter>", the console will print 4. $x(xpath, element, resulttype) evaluates the xpath xpath expression in the con
text of element and returns an array of matching nodes. if unspecified, element defaults to document. the resulttype parameter specifies the type of result to return; it can be an xpathresult constant, or a corresponding string: "number", "string", "bool", "node", or "nodes"; if not provided, any_type is used. :block (starting in firefox 80) followed by an unquoted string, blocks requests where the ...
...onstant, or a corresponding string: "number", "string", "bool", "node", or "nodes"; if not provided, any_type is used. :block (starting in firefox 80) followed by an unquoted string, blocks requests where the url contains that string. in the network monitor, the string now appears and is selected in the request blocking sidebar. unblock with :unblock. cd() switches javascript evaluation con
text to a different iframe in the page. this helper accepts multiple different ways of identifying the frame to switch to. you can supply any of the following: a selector string to be passed to document.queryselector to locate the iframe element the iframe element itself the content window inside the iframe see working with iframes. clear() clears the console output area. clearhistor...
...rs the commands you've typed. use this function to clear the console's command history. copy() copies the argument to the clipboard. if the argument is a string, it's copied as-is. if the argument is a dom node, its outerhtml is copied. otherwise, json.stringify will be called on the argument, and the result will be copied to the clipboard. help()deprecated since gecko 62 :help displays help
text. actually, in a delightful example of recursion, it brings you to this page. inspect() given an object, generates rich output for that object. once you select the object in the output area, you can use the arrow keys to navigate the object. keys() given an object, returns a list of the keys (or property names) on that object. this is a shortcut for object.keys. pprint() obsolete since gecko ...
AnalyserNode.getByteFrequencyData() - Web APIs
fic frequency. the frequencies are spread linearly from 0 to 1/2 of the sample rate. for example, for 48000 sample rate, the last item of the array will represent the decibel value for 24000 hz. if the array has fewer elements than the analysernode.frequencybincount, excess elements are dropped. if it has more elements than needed, excess elements are ignored. syntax var audioctx = new audiocon
text(); var analyser = audioctx.createanalyser(); var dataarray = new uint8array(analyser.frequencybincount); // uint8array should be the same length as the frequencybincount void analyser.getbytefrequencydata(dataarray); // fill the uint8array with data returned from getbytefrequencydata() parameters array the uint8array that the frequency domain data will be copied to. for any sample which ...
... parameters array the uint8array that the frequency domain data will be copied to. for any sample which is silent, the value is -infinity. if the array has fewer elements than the analysernode.frequencybincount, excess elements are dropped. if it has more elements than needed, excess elements are ignored. return value none. ...
... example the following example shows basic usage of an audiocon
text to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input. for more examples/information, check out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code). var audioctx = new (window.audiocon
text || window.webkitaudiocon
text)(); var analyser = audioctx.createanalyser(); ... analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyl...
AnalyserNode.getByteTimeDomainData() - Web APIs
the getbytetimedomaindata() method of the analysernode interface copies the current waveform, or time-domain, data into a uint8array (unsigned byte array) passed into it. if the array has fewer elements than the analysernode.fftsize, excess elements are dropped. if it has more elements than needed, excess elements are ignored. syntax const audioctx = new audiocon
text(); const analyser = audioctx.createanalyser(); const dataarray = new uint8array(analyser.fftsize); // uint8array should be the same length as the fftsize analyser.getbytetimedomaindata(dataarray); // fill the uint8array with data returned from getbytetimedomaindata() parameters array the uint8array that the time domain data will be copied to. if the array has fewer elements than the analysernode.fftsize, excess elements...
...ll the uint8array with data returned from getbytetimedomaindata() parameters array the uint8array that the time domain data will be copied to. if the array has fewer elements than the analysernode.fftsize, excess elements are dropped. if it has more elements than needed, excess elements are ignored. ...
...lowing example shows basic usage of an audiocon
text to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input. for more complete applied examples/information, check out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code). const audioctx = new (window.audiocon
text || window.webkitaudiocon
text)(); const analyser = audioctx.createanalyser(); ... analyser.fftsize = 2048; const bufferlength = analyser.fftsize; const dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // draw an oscilloscope of the current audio source function draw() { drawvisual = requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray);...
AnalyserNode.getFloatTimeDomainData() - Web APIs
the getfloattimedomaindata() method of the analysernode interface copies the current waveform, or time-domain, data into a float32array array passed into it. if the array has fewer elements than the analysernode.fftsize, excess elements are dropped. if it has more elements than needed, excess elements are ignored. syntax var audioctx = new audiocon
text(); var analyser = audioctx.createanalyser(); var dataarray = new float32array(analyser.fftsize); // float32array needs to be the same length as the fftsize analyser.getfloattimedomaindata(dataarray); // fill the float32array with data returned from getfloattimedomaindata() parameters array the float32array that the time domain data will be copied to. if the array has fewer elements than the analysernode.frequencybincount, excess ele...
...t32array with data returned from getfloattimedomaindata() parameters array the float32array that the time domain data will be copied to. if the array has fewer elements than the analysernode.frequencybincount, excess elements are dropped. if it has more elements than needed, excess elements are ignored. return value none. ...
...ple the following example shows basic usage of an audiocon
text to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input. for more complete applied examples/information, check out our voice-change-o-matic-float-data demo (see the source code too). var audioctx = new (window.audiocon
text || window.webkitaudiocon
text)(); var analyser = audioctx.createanalyser(); ... analyser.fftsize = 1024; var bufferlength = analyser.fftsize; console.log(bufferlength); var dataarray = new float32array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getfloattimedomaindata(dataarray); canvasctx.fillstyle = 'r...
AudioBuffer.getChannelData() - Web APIs
equal to audiobuffer.numberofchannels, an index_size_err exception will be thrown. return value a float32array. example in the following example we create a two second buffer, fill it with white noise, and then play it via an audiobuffersourcenode. the comments should clearly explain what is going on. you can also run the code live, or view the source. ...
...fchannels, an index_size_err exception will be thrown. return value a float32array. example in the following example we create a two second buffer, fill it with white noise, and then play it via an audiobuffersourcenode. the comments should clearly explain what is going on. you can also run the code live, or view the source. ...
...so run the code live, or view the source. ...
AudioNode.channelCountMode - Web APIs
plicit the number of channels is defined by the value of channelcount. audiodestinationnode, analysernode, channelsplitternode in older versions of the spec, the default for a channelsplitternode was max. syntax var oscillator = audioctx.createoscillator(); oscillator.channelcountmode = 'explicit'; value a enumerated value representing a channelcountmode. ...
...f channels is defined by the value of channelcount. audiodestinationnode, analysernode, channelsplitternode in older versions of the spec, the default for a channelsplitternode was max. syntax var oscillator = audioctx.createoscillator(); oscillator.channelcountmode = 'explicit'; value a enumerated value representing a channelcountmode. ...
...value of channelcount. audiodestinationnode, analysernode, channelsplitternode in older versions of the spec, the default for a channelsplitternode was max. syntax var oscillator = audioctx.createoscillator(); oscillator.channelcountmode = 'explicit'; value a enumerated value representing a channelcountmode. example var audiocon
text = window.audiocon
text || window.webkitaudiocon
text; var audioctx = new audiocon
text(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); oscillator.channelcountmode = 'explicit'; specifications specification status comment web audio apithe definition of 'channelcountmode' in that specification. working draft ...
AudioNode.channelInterpretation - Web APIs
down-mix discrete channels. fill each output channel with its input counterpart, that is the input channel with the same index. input channels with no corresponding output channels are dropped. syntax var oscillator = audioctx.createoscillator(); oscillator.channelinterpretation = 'discrete'; value an enumerated value representing a channelinterpretation. ...
...channels. fill each output channel with its input counterpart, that is the input channel with the same index. input channels with no corresponding output channels are dropped. syntax var oscillator = audioctx.createoscillator(); oscillator.channelinterpretation = 'discrete'; value an enumerated value representing a channelinterpretation. ...
...t channel with its input counterpart, that is the input channel with the same index. input channels with no corresponding output channels are dropped. syntax var oscillator = audioctx.createoscillator(); oscillator.channelinterpretation = 'discrete'; value an enumerated value representing a channelinterpretation. example var audiocon
text = window.audiocon
text || window.webkitaudiocon
text; var audioctx = new audiocon
text(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); oscillator.channelinterpretation = 'discrete'; specifications specification status comment web audio apithe definition of 'channelinterpretation' in that specification. workin...
AudioParam - Web APIs
-rate or k-rate in the spec. each audioparam has a list of events, initially empty, that define when and how values change. when this list is not empty, changes using the audioparam.value attributes are ignored. this list of events allows us to schedule changes that have to happen at very precise times, using arbitrary timelime-based automation curves. the time used is the one defined in audiocon
text.currenttime. properties audioparam.defaultvalue read only represents the initial volume of the attribute as defined by the specific audionode creating the audioparam. audioparam.maxvalue read only represents the maximum possible value for the parameter's nominal (effective) range. audioparam.minvalue read only represents the minimum possible value for the parameter's nominal (effecti...
...ge. audioparam.minvalue read only represents the minimum possible value for the parameter's nominal (effective) range. audioparam.value represents the parameter's current value as of the current time; initially set to the value of defaultvalue. methods audioparam.setvalueattime() schedules an instant change to the value of the audioparam at a precise time, as measured against audiocon
text.currenttime. the new value is given by the value parameter. audioparam.linearramptovalueattime() schedules a gradual linear change in the value of the audioparam. the change starts at the time specified for the previous event, follows a linear ramp to the new value given in the value parameter, and reaches the new value at the time given in the endtime parameter. audioparam.exponentialramptova...
... audioparam.cancelandholdattime() cancels all scheduled future changes to the audioparam but holds its value at a given time until further changes are made using other methods. examples first, a basic example showing a gainnode having its gain value set. gain is an example of an a-rate audioparam, as the value can potentially be set differently for each sample frame of the audio. var audiocon
text = window.audiocon
text || window.webkitaudiocon
text; var audioctx = new audiocon
text(); var gainnode = audioctx.creategain(); gainnode.gain.value = 0; next, an example showing a dynamicscompressornode having some param values maniuplated. these are examples of k-rate audioparam's, as the values are set for the entire audio block at once. var compressor = audioctx.createdynamicscompressor(); com...
AudioScheduledSourceNode.start() - Web APIs
hod on audioscheduledsourcenode schedules a sound to begin playback at the specified time. if no time is specified, then the sound begins playing immediately. syntax audioscheduledsourcenode.start([when [, offset [, duration]]]); parameters when optional the time, in seconds, at which the sound should begin to play. this value is specified in the same time coordinate system as the audiocon
text is using for its currenttime attribute. a value of 0 (or omitting the when parameter entirely) causes the sound to start playback immediately. offset optional a floating-point number indicating the offset, in seconds, into the audio buffer where playback should begin. if 0 is passed then the playback will start from the beginning. duration optional a floating-point number indicating the durat...
... already been started. this error occurs even if the node is no longer running because of a prior call to stop(). rangeerror the value specified for when is negative. example this example demonstrates how to create an oscillatornode which is scheduled to start playing in 2 seconds and stop playing 1 second after that. ...
...if the node is no longer running because of a prior call to stop(). rangeerror the value specified for when is negative. example this example demonstrates how to create an oscillatornode which is scheduled to start playing in 2 seconds and stop playing 1 second after that. the times are calculated by adding the desired number of seconds to the con
text's current time stamp returned by audiocon
text.currenttime. con
text = new audiocon
text(); osc = con
text.createoscillator(); osc.connect(con
text.destination); /* schedule the start and stop times for the oscillator */ osc.start(con
text.currenttime + 2); osc.stop(con
text.currenttime + 3); specifications specification status comment web audio apithe definition of 'start()' in that specification. working draft ...
AuthenticatorAttestationResponse - Web APIs
uthentication api is returned by credentialscontainer.create() when a publickeycredential is passed, and provides a cryptographic root of trust for the new key pair that has been generated. this response should be sent to the relying party's server to complete the creation of the credential. this interface inherites from authenticatorresponse. ...
... for the new key pair that has been generated. this response should be sent to the relying party's server to complete the creation of the credential. this interface inherites from authenticatorresponse. note: this interface is restricted to top-level con
texts. use from within an <iframe> element will not have any effect. properties authenticatorattestationresponse.clientdatajson secure con
textread only client data for the authentication, such as origin and challenge. the clientdatajson property is inherited from the authenticatorresponse. authenticatorattestationresponse.attestationobject secure con
textread only an arraybuffer containing authenticator data and an attestation statement for a newly-created key pair. methods authenticatorattestationresponse.gettransports()secure...
...usb, nfc) are believed to be supported with the authenticator. ...
BasicCardResponse - Web APIs
the basiccardresponse dictionary (related to the payment request api, although defined in the basic card payment spec) defines an object structure for payment response details such as the number/expiry date of the card used to make the payment, and the billing address. properties basiccardresponse.cardnumber read only secure con
text contains the number of the card used to make the payment. ...
...nt request api, although defined in the basic card payment spec) defines an object structure for payment response details such as the number/expiry date of the card used to make the payment, and the billing address. properties basiccardresponse.cardnumber read only secure con
text contains the number of the card used to make the payment. basiccardresponse.cardholdername read only secure con
text optional contains the cardholder name of the card used to make the payment. basiccardresponse.cardsecuritycode read only secure con
text optional contains the security code of the card used to make the payment. basiccardresponse.expirymonth read only secure con
text optional contains the expiry month of the card used to make the payment. basiccardresponse.expiryyear read only secure contex...
...e con
text optional contains the security code of the card used to make the payment. basiccardresponse.expirymonth read only secure con
text optional contains the expiry month of the card used to make the payment. basiccardresponse.expiryyear read only secure con
text optional contains the expiry year of the card used to make the payment. basiccardresponse.billingaddress read only secure con
text optional contains the billing address of the card used to make the payment. examples in the following example, the paymentrequest() constructor is used to create a new payment request, which takes three objects as parameters — one containing details of the payment methods that can be used for the payment, one containing details of the actual order (such as items bought and shipping options)...
BatteryManager.onlevelchange - Web APIs
ttery.onlevelchange = funcref where battery is a batterymanager object, and funcref is a function to be called when the levelchange event occurs. ...
...e called when the levelchange event occurs. ...
...ng state unknown)</div> javascript navigator.getbattery().then(function(battery) { battery.onlevelchange = function(){ document.queryselector('#level').
textcontent = battery.level; if(battery.charging) { document.queryselector('#statebaterry').
textcontent = "charging time: " + (battery.chargingtime / 60); } else { document.queryselector('#statebaterry').
textcontent = "discharging time: " + (battery.dischargingtime / 60); } }; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BiquadFilterNode.detune - Web APIs
the detune property of the biquadfilternode interface is an a-rate audioparam representing detuning of the frequency in cents. syntax var audioctx = new audiocon
text(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.detune.value = 100; note: though the audioparam returned is read-only, the value it represents is not. value an a-rate audioparam. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
...dfilter(); biquadfilter.detune.value = 100; note: though the audioparam returned is read-only, the value it represents is not. value an a-rate audioparam. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
...e.value = 100; note: though the audioparam returned is read-only, the value it represents is not. value an a-rate audioparam. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
BiquadFilterNode.gain - Web APIs
the gain property of the biquadfilternode interface is a a-rate audioparam, a double representing the gain used in the current filtering algorithm. when it takes a positive value it is a real gain, when negative it is an attenuation. it is expressed in db, has a default value of 0 and can take a value in a nominal range of -40 to 40. syntax var audioctx = new audiocon
text(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.gain.value = 25; note: though the audioparam returned is read-only, the value it represents is not. value an audioparam. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). var audioctx = new (windo...
...reatebiquadfilter(); biquadfilter.gain.value = 25; note: though the audioparam returned is read-only, the value it represents is not. value an audioparam. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
...lter.gain.value = 25; note: though the audioparam returned is read-only, the value it represents is not. value an audioparam. example the following example shows basic usage of an audiocon
text to create a biquad filter node. for a complete working example, check out our voice-change-o-matic demo (look at the source code too). ...
Body.json() - Web APIs
syntax response.json().then(data => { // do something with your data }); parameters none. return value a promise that resolves to a javascript object. this object could be anything that can be represented by json — an object, an array, a string, a number... example in our fetch json example (run fetch json live), we create a new request using the request() constructor, then use it to fetch a .json file. ...
... and insert them into list items to display our product data. ...
... .then(data => { for (const product of data.products) { let listitem = document.createelement('li'); listitem.appendchild( document.createelement('strong') ).
textcontent = product.name; listitem.append( ` can be found in ${ product.location }. cost: ` ); listitem.appendchild( document.createelement('strong') ).
textcontent = `£${product.price}`; mylist.appendchild(listitem); } }) .catch(console.error); specifications specification status comment fetchthe definition of 'body.json()' in that specification. living standard initial definition ...
BroadcastChannel - Web APIs
it allows communication between different documents (in different windows, tabs, frames or iframes) of the same origin. messages are broadcasted via a message event fired at all broadcastchannel objects listening to the channel. note: this feature is available in web workers. ...
...lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/broadcastchannel" target="_top"><rect x="151" y="1" width="160...
... mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/broadcastchannel" target="_top"><rect x="151" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="231" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">broadcastchannel</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor broadcastchannel() creates an object linking to the named channel. properties this interface also inherits properties from its pa...
Hit regions and accessibility - Web APIs
it region api allows you to define an area of your canvas and provides another possibility to expose interactive content on a canvas to accessibility tools. it allows you to make hit detection easier and lets you route events to dom elements. the api has the following three methods (which are still experimental in current web browsers; check the browser compatibility tables). canvasrenderingcon
text2d.addhitregion() adds a hit region to the canvas. canvasrenderingcon
text2d.removehitregion() removes the hit region with the specified id from the canvas. canvasrenderingcon
text2d.clearhitregions() removes all hit regions from the canvas. you can add a hit region to your path and check for the mouseevent.region property to test if your mouse is hitting your region, for example. <can...
...es the hit region with the specified id from the canvas. canvasrenderingcon
text2d.clearhitregions() removes all hit regions from the canvas. you can add a hit region to your path and check for the mouseevent.region property to test if your mouse is hitting your region, for example. ...
...o an element (that is a descendant of the canvas): ctx.addhitregion({control: element}); this can be useful for routing to <input> elements, for example. see also this codepen demo. focus rings when working with the keyboard, focus rings are a handy indicator to help navigating on a page. to draw focus rings on a canvas drawing, the drawfocusifneeded property can be used. canvasrenderingcon
text2d.drawfocusifneeded() if a given element is focused, this method draws a focus ring around the current path. additionally, the scrollpathintoview() method can be used to make an element visible on the screen if focused, for example. canvasrenderingcon
text2d.scrollpathintoview() scrolls the current path or a given path into the view. ...
Canvas API - Web APIs
essing. the canvas api largely focuses on 2d graphics. the webgl api, which also uses the <canvas> element, draws hardware-accelerated 2d and 3d graphics. basic example this simple example draws a green rectangle onto a canvas. html <canvas id="canvas"></canvas> javascript the document.getelementbyid() method gets a reference to the html <canvas> element. next, the htmlcanvaselement.getcon
text() method gets that element's con
text—the thing onto which the drawing will be rendered. the actual drawing is done using the canvasrenderingcon
text2d interface. the fillstyle property makes the rectangle green. the fillrect() method places its top-left corner at (10, 10), and gives it a size of 150 units wide by 100 tall. const canvas = document.getelementbyid('canvas'); const ctx = canvas.ge...
...ethod gets that element's con
text—the thing onto which the drawing will be rendered. the actual drawing is done using the canvasrenderingcon
text2d interface. the fillstyle property makes the rectangle green. the fillrect() method places its top-left corner at (10, 10), and gives it a size of 150 units wide by 100 tall. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); ctx.fillstyle = 'green'; ctx.fillrect(10, 10, 150, 100); result reference htmlcanvaselement canvasrenderingcon
text2d canvasgradient canvasimagesource canvaspattern imagebitmap imagedata renderingcon
text textmetrics offscreencanvas path2d imagebitmaprenderingcon
text note: the interfaces related to the webglrenderingcon
text are referenced under webgl. canvasc...
... manipulating 2d canvas elements. the zim framework provides conveniences, components, and controls for coding creativity on the canvas — includes accessibility and hundreds of colorful tutorials. note: see the webgl api for 2d and 3d libaries that use webgl. specifications specification status comment html living standardthe definition of 'the 2d rendering con
text' in that specification. living standard ...
Channel Messaging API - Web APIs
note: this feature is available in web workers. channel messaging concepts and usage a message channel is created using the messagechannel() constructor. ...
... created using the messagechannel() constructor. ...
... the channel uses port1, and the app at the other end of the port uses port2 — you send a message to port2, and transfer the port over to the other browsing con
text using window.postmessage along with two arguments (the message to send, and the object to transfer ownership of, in this case the port itself.) when these transferable objects are transferred, they are 'neutered' on the previous con
text — the one they previously belonged to. for instance a port, when is sent, cannot be used anymore by the original con
text. the other browsing con
text can listen for the message using messageport.onmessage, and grab the contents of the message using the event's data attribute. you could then respond by sending a message back to the original document using messageport.postmessage. when you want ...
Constraint validation API - Web APIs
however, you may want to impose more complex constraints, or to provide clearer reporting of validation failures than the defaults. this can be done using the constraint validation api. ...
... satisfy its constraints. extensions to other interfaces the constraint validation api extends the interfaces for the form-associated elements listed below with a number of new properties and methods (elements that can have a form attribute that indicates their form owner): htmlbuttonelement htmlfieldsetelement htmlinputelement htmlobjectelement htmloutputelement htmlselectelement html
textareaelement properties validity a read-only property that returns a validitystate object, whose properties represent validation errors for the value of that element. validationmessage a read-only property that returns an empty string if the element is not a candidate for constraint validation, or if the element's value is valid. if the element's value is not valid, it returns a localized v...
...valid — when a message is set, the validity state is set to invalid. to clear this state, invoke the function with an empty string passed as its argument. in this case the custom error message is cleared, the element is considered valid, and no message is shown. examples take the following form: <form> <label for="name">enter username (upper and lowercase letters): </label> <input type="
text" name="name" id="name" required pattern="[a-za-z]+"> <button>submit</button> </form> the basic html form validation features will cause this to produce a default error message if you try to submit the form with either no valid filled in, or a value that does not match the pattern. if you wanted to instead display custom error messages, you could use javascript like the following: const namei...
CredentialsContainer - Web APIs
the credentialscontainer interface of the the credential management api exposes methods to request credentials and notify the user agent when events such as successful sign in or sign out happen. this interface is accessible from navigator.credentials. properties none. event handlers none. ...
...ut happen. this interface is accessible from navigator.credentials. properties none. event handlers none. methods credentialscontainer.create()secure con
text returns a promise that resolves with a new credential instance based on the provided options, or null if no credential object can be created. in exceptional circumstances, the promise may reject. credentialscontainer.get()secure con
text returns a promise that resolves with the credential instance that matches the provided parameters. credentialscontainer.preventsilentaccess()secure con
text sets a flag that specifies whether automatic log in is allowed for future visits to the current origin, then returns an empty promise. for example, you might call this, after a user signs out of a website to ensure that he/she isn't automat...
...matic log in is allowed for future visits to the current origin, then returns an empty promise. for example, you might call this, after a user signs out of a website to ensure that he/she isn't automatically signed in on the next site visit. earlier versions of the spec called this method requireusermediation(). see browser compatibility for support details. credentialscontainer.store()secure con
text stores a set of credentials for a user, inside a provided credential instance and returns that instance in a promise. examples // tbd specifications specification status comment credential management level 1 working draft initial definition. web authentication: an api for accessing public key credentials level 1 recommendation initial definition.
Crypto - Web APIs
methods this interface implements methods defined on randomsource. ...
...tures available in the current con
text. it allows access to a cryptographically strong random number generator and to cryptographic primitives. note: this feature is available in web workers. the web crypto api is accessed through the window.crypto property, which is a crypto object. properties this interface implements properties defined on randomsource. crypto.subtle read only secure con
text returns a subtlecrypto object providing access to common cryptographic primitives, like hashing, signing, encryption, or decryption. methods this interface implements methods defined on randomsource. crypto.getrandomvalues() fills the passed typedarray with cryptographically sound random values. ...
...d only secure con
text returns a subtlecrypto object providing access to common cryptographic primitives, like hashing, signing, encryption, or decryption. methods this interface implements methods defined on randomsource. crypto.getrandomvalues() fills the passed typedarray with cryptographically sound random values. usage notes you should avoid using the web crypto api on insecure con
texts, even though the crypto interface is present on insecure con
texts, as is the window.crypto property. in addition, the crypto method getrandomvalues() is available on insecure con
texts, but the subtle property is not. in general, you probably should just treat crypto as available only on secure con
texts. specifications specification status comment web cryptography a...
DOMTokenList - Web APIs
rough all keys of the key/value pairs contained in this object. domtokenlist.values() returns an iterator, allowing you to go through all values of the key/value pairs contained in this object. ...
...e following simple example, we retrieve the list of classes set on a <p> element as a domtokenlist using element.classlist, add a class using domtokenlist.add(), and then update the node.
textcontent of the <p> to equal the domtokenlist. first, the html: <p class="a b c"></p> now the javascript: let para = document.queryselector("p"); let classes = para.classlist; para.classlist.add("d"); para.
textcontent = `paragraph classlist is "${classes}"`; the output looks like this: trimming of whitespace and removal of duplicates methods that modify the domtokenlist (such as domtokenlist.add()) automatically trim any excess whitespace and remove duplicate values from the list. for example: <span class=" d d e f"></span> let span = document.queryselector("span"); let classes = span.classl...
...${classes}"`; the output looks like this: trimming of whitespace and removal of duplicates methods that modify the domtokenlist (such as domtokenlist.add()) automatically trim any excess whitespace and remove duplicate values from the list. for example: <span class=" d d e f"></span> let span = document.queryselector("span"); let classes = span.classlist; span.classlist.add("x"); span.
textcontent = `span classlist is "${classes}"`; the output looks like this: specifications specification status comment domthe definition of 'domtokenlist' in that specification. living standard initial definition ...
DataTransfer.setData() - Web APIs
data to the specified data and type. if data for the given type does not exist, it is added at the end of the drag data store, such that the last item in the types list will be the new type. if data for the given type already exists, the existing data is replaced in the same position. that is, the order of the types list is not changed when replacing data of the same type. example data types are
text/plain and
text/uri-list. syntax void datatransfer.setdata(format, data); arguments format a domstring representing the type of the drag data to add to the drag object. data a domstring representing the data to add to the drag object. return value void example this example shows the use of the datatransfer object's getdata(), setdata() and cleardata() methods. <!doctype html> <h...
...rce { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; // set the drag's format and data. ...
...yle.border = "dashed"; // set the drag's format and data. ...
DataTransferItem.webkitGetAsEntry() - Web APIs
l establishes the drop zone itself, which is a <div> element with the id "dropzone", and an unordered list element with the id "listing". <p>drag files and/or directories to the box below!</p> <div id="dropzone"> <div id="boxtitle"> drop files here </div> </div> <h2>directory tree:</h2> <ul id="listing"> </ul> css content the styles used by the example are shown here. ...
...d="dropzone"> <div id="boxtitle"> drop files here </div> </div> <h2>directory tree:</h2> <ul id="listing"> </ul> css content the styles used by the example are shown here. #dropzone {
text-align: center; width: 300px; height: 100px; margin: 10px; padding: 10px; border: 4px dashed red; border-radius: 10px; } #boxtitle { display: table-cell; vertical-align: middle;
text-align: center; color: black; font: bold 2em "arial", sans-serif; width: 300px; height: 100px; } body { font: 14px "arial", sans-serif; } javascript content first, let's look at the recursive scanfiles() function. this function takes as input a filesystementry representing an entry in the file system to be scanned and processed (the item parameter), and an element into which to insert...
...the container is always a list element in this example, as you'll see shortly. once the current item is in the list, the item's isdirectory property is checked. if the item is a directory, we need to recurse into that directory. the first step is to create a filesystemdirectoryreader to handle fetching the directory's contents. that's done by callin...
DataTransferItemList.clear() - Web APIs
argin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree var datalist = ev.datatransfer.items; datalist.add(ev.target.id, "
text/plain"); // add some other items to the drag payload datalist.add("<p>... paragraph ...</p>", "
text/html"); datalist.add("http://www.example.org","
text/uri-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i]...
...rag payload datalist.add("<p>... paragraph ...</p>", "
text/html"); datalist.add("http://www.example.org","
text/uri-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].kind == 'string') && (data[i].type.match('^
text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^
text/html'))) { // drag data item is html data[i].getasstring(function (s){ console.log("... drop: html = " + s); }); } else if ((data[i].kind ...
... target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^
text/html'))) { // drag data item is html data[i].getasstring(function (s){ console.log("... drop: html = " + s); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^
text/uri-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("... drop: uri = " + s); }); } } } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } function dragend_handler(ev) { console.log("dragend"); var datalist = ev.datatransfer.
DelayNode.delayTime - Web APIs
value an audioparam. ...
... value an audioparam. ...
...eated a simple example that allows you to play three different samples on a constant loop — see create-delay (you can also view the source code). if you just press the play buttons, the loops will start immediately; if you slide the sliders up to the right, then press the play buttons, a delay will be introduced, so the looping sounds don't start playing for a short amount of time. var audiocon
text = window.audiocon
text || window.webkitaudiocon
text; var audioctx = new audiocon
text(); var synthdelay = audioctx.createdelay(5.0); ... var synthsource; playsynth.onclick = function() { synthsource = audioctx.createbuffersource(); synthsource.buffer = buffers[2]; synthsource.loop = true; synthsource.start(); synthsource.connect(synthdelay); synthdelay.connect(destination); this...
Document: drag event - Web APIs
the drag event is fired every few hundred milliseconds as an element or
text selection is being dragged by the user. bubbles yes cancelable yes default action continue the drag & drop operation. interface dragevent event handler property ondrag examples see this code in a jsfiddle demo or interact with it below. ...
...ng dragged by the user. bubbles yes cancelable yes default action continue the drag & drop operation. interface dragevent event handler property ondrag examples see this code in a jsfiddle demo or interact with it below. ...
... ondrag examples see this code in a jsfiddle demo or interact with it below. html <div class="dropzone"> <div id="draggable" draggable="true" ondragstart="event.datatransfer.setdata('
text/plain',null)"> this div is draggable </div> </div> <div class="dropzone"></div> <div class="dropzone"></div> <div class="dropzone"></div> css #draggable { width: 200px; height: 20px;
text-align: center; background: white; } .dropzone { width: 200px; height: 20px; background: blueviolet; margin-bottom: 10px; padding: 10px; } javascript var dragged; /* events fired on the draggable target */ document.addeventlistener("drag", function(event) { }, false); document.addeventlistener("dragstart", function(event) { // store a ref. on the dragged elem dragged = event...
Document.execCommand() - Web APIs
ng that information. for example, insertimage requires the url of the image to insert. specify null if no argument is needed. commands backcolor changes the document background color. in stylewithcss mode, it affects the background color of the containing block instead. this requires a <color> value string to be passed in as a value argument. note that internet explorer uses this to set the
text background color. bold toggles bold on/off for the selection or at the insertion point. internet explorer uses the <strong> tag instead of <b>. clearauthenticationcache clears all authentication credentials from the cache. contentreadonly makes the content document either read-only or editable. this requires a boolean true/false as the value argument. (not supported by internet explorer.) ...
...t to the clipboard. when this behavior is enabled varies between browsers, and its conditions have evolved over time. check the compatibility table for usage details. decreasefontsize adds a <small> tag around the selection or at the insertion point. (not supported by internet explorer.) defaultparagraphseparator changes the paragraph separator used when new paragraphs are created in editable
text regions. see differences in markup generation for more details. delete deletes the current selection. enableabsolutepositioneditor enables or disables the grabber that allows absolutely-positioned elements to be moved around. the grabber is disabled by default since firefox 64 (bug 1490641). enableinlinetableediting enables or disables the table row/column insertion and deletion controls. t...
... the same as createlink. insertorderedlist creates a numbered ordered list for the selection or at the insertion point. insertunorderedlist creates a bulleted unordered list for the selection or at the insertion point. insertparagraph inserts a paragraph around the selection or the current line. (internet explorer inserts a paragraph at the insertion point and deletes the selection.) insert
text inserts the given plain
text at the insertion point (deletes selection). italic toggles italics on/off for the selection or at the insertion point. (internet explorer uses the <em> element instead of <i>.) justifycenter centers the selection or insertion point. justifyfull justifies the selection or insertion point. justifyleft justifies the selection or insertion point to the left. jus...
Document.getElementsByClassName() - Web APIs
tml> multiple classes example document.getelementsbyclassname works very similarly to document.queryselector and document.queryselectorall. only elements with all of the classnames specified are selected. ...
...assname works very similarly to document.queryselector and document.queryselectorall. only elements with all of the classnames specified are selected. ...
...resultarea" style="width:98%;height:7em"></
textarea> javascript // getelementsbyclassname only selects elements that have both given classes var allorangejuicebyclass = document.getelementsbyclassname('orange juice'); var result = "document.getelementsbyclassname('orange juice')"; for (var i=0, len=allorangejuicebyclass.length|0; i<len; i=i+1|0) { result += "\n " + allorangejuicebyclass[i].
textcontent; } // queryselector only selects full complete matches var allorangejuicequery = document.queryselectorall('.orange.juice'); result += "\n\ndocument.queryselectorall('.orange.juice')"; for (var i=0, len=allorangejuicequery.length|0; i<len; i=i+1|0) { result += "\n " + allorangejuicequery[i].
textcontent; } document.getelementbyid("resultarea").value = result; result specificatio...
Document.queryCommandState() - Web APIs
the querycommandstate() method will tell you if the current selection has a certain document.execcommand() command applied. syntax querycommandstate(string command) parameters command is a command from document.execcommand() return value querycommandstate() can return a boolean value or null if the state is unknown. ...
...an return a boolean value or null if the state is unknown. ...
...ple html <div contenteditable="true">select a part of this
text!</div> <button onclick="makebold();">test the state of the 'bold' command</button> javascript function makebold() { var state = document.querycommandstate("bold"); switch (state) { case true: alert("the bold formatting will be removed from the selected
text."); break; case false: alert("the selected
text will be displayed in bold."); break; case null: alert("the state of the 'bold' command is indeterminable."); break; } document.execcommand('bold'); } result specifications specification status comment execcommand ...
DocumentFragment - Web APIs
lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/documentfragment" target="_top"><rect x="266" y="1" width="160" he...
...,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/documentfragment" target="_top"><rect x="266" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="346" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">documentfragment</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor documentfragment() creates and returns a new documentfragment object. properties this interface has no specific properties, but i...
DocumentOrShadowRoot.caretPositionFromPoint() - Web APIs
demo html content <p>lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. at vero eos et accusam et justo duo dolores et ea rebum. ...
...olore magna aliquyam erat, sed diam voluptua. at vero eos et accusam et justo duo dolores et ea rebum. ...
... dolor sit amet.</p> javascript content function insertbreakatpoint(e) { var range; var
textnode; var offset; if (document.caretpositionfrompoint) { range = document.caretpositionfrompoint(e.clientx, e.clienty);
textnode = range.offsetnode; offset = range.offset; } else if (document.caretrangefrompoint) { range = document.caretrangefrompoint(e.clientx, e.clienty);
textnode = range.startcontainer; offset = range.startoffset; } // only split
text_nodes if (
textnode.nodetype == 3) { var replacement =
textnode.split
text(offset); var br = document.createelement('br');
textnode.parentnode.insertbefore(br, replacement); } } window.onload = function (){ var paragraphs = document.getelementsbytagname("p"); for (i=0 ; i < paragraphs.length; ...
DocumentOrShadowRoot.elementsFromPoint() - Web APIs
ot interface returns an array of all elements at the specified coordinates (relative to the viewport). it operates in a similar way to the elementfrompoint() method. syntax const elements = document.elementsfrompoint(x, y); parameters x the horizontal coordinate of a point. y the vertical coordinate of a point. return value an array of element objects. ...
...nt. y the vertical coordinate of a point. return value an array of element objects. ...
...s. example html <div> <p>some
text</p> </div> <p>elements at point 30, 20:</p> <div id="output"></div> javascript let output = document.getelementbyid("output"); if (document.elementsfrompoint) { let elements = document.elementsfrompoint(30, 20); for (var i = 0; i < elements.length; i++) { output.
textcontent += elements[i].localname; if (i < elements.length - 1) { output.
textcontent += " < "; } } } else { output.innerhtml = "<span style=\"color: red;\">" + "browser does not support <code>document.elementsfrompoint()</code>" + "</span>"; } specifications specification status shadow domthe definition of 'elementsfrompoint()' in that specification. obsolete css object model (cssom) view modulethe definition of 'e...
DocumentType - Web APIs
lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50"...
...as,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/documenttype" target="_top"><rect x="266" y="1" width="120" height...
...naco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">node</
text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/documenttype" target="_top"><rect x="266" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="326" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">documenttype</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, node, and implements the childnode interface. documenttype.entities read only a namednodemap of ...
EXT_blend_minmax - Web APIs
the ext_blend_minmax extension is part of the webgl api and extends blending capabilities by adding two new blend equations: the minimum or maximum color components of the source and destination colors. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is only available to webgl1 con
texts. in webgl2, the functionality of this extension is available on the webgl2 con
text by default. ...
...n
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is only available to webgl1 con
texts. in webgl2, the functionality of this extension is available on the webgl2 con
text by default. the constants in webgl2 are gl.min and gl.max. constants this extension adds two new constants, which can be used in webglrenderingcon
text.blendequation() and webglrenderingcon
text.blendequationseparate(): ext.min_ext produces the minimum color components of the source and destination colors. ext.max_ext produces the maximum color components of the source and destination colors. ...
...ebgl2 are gl.min and gl.max. constants this extension adds two new constants, which can be used in webglrenderingcon
text.blendequation() and webglrenderingcon
text.blendequationseparate(): ext.min_ext produces the minimum color components of the source and destination colors. ext.max_ext produces the maximum color components of the source and destination colors. examples var ext = gl.ge
textension('ext_blend_minmax'); gl.blendequation(ext.min_ext); gl.blendequation(ext.max_ext); gl.blendequationseparate(ext.min_ext, ext.max_ext); specifications specification status comment ext_blend_minmaxthe definition of 'ext_blend_minmax' in that specification. recommendation initial definition. ...
EXT_color_buffer_half_float - Web APIs
the ext_color_buffer_half_float extension is part of the webgl api and adds the ability to render to 16-bit floating-point color buffers. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is available to webgl 1 con
texts only. for webgl 2, use the ext_color_buffer_float extension. the oes_
texture_half_float extension implicitly enables this extension. constants ext.rgba16f_ext rgba 16-bit floating-point color-renderable format. ...
...xt_color_buffer_float extension. the oes_
texture_half_float extension implicitly enables this extension. constants ext.rgba16f_ext rgba 16-bit floating-point color-renderable format. ext.rgb16f_ext rgb 16-bit floating-point color-renderable format. ext.framebuffer_attachment_component_type_ext ? ext.unsigned_normalized_ext ? ...
... rgba 16-bit floating-point color-renderable format. ext.rgb16f_ext rgb 16-bit floating-point color-renderable format. ext.framebuffer_attachment_component_type_ext ? ext.unsigned_normalized_ext ? extended methods this extension extends webglrenderingcon
text.renderbufferstorage(): the internalformat parameter now accepts ext.rgba16f_ext and ext.rgba16f_ext. examples var ext = gl.ge
textension('ext_color_buffer_half_float'); gl.renderbufferstorage(gl.renderbuffer, ext.rbga16f_ext, 256, 256); specifications specification status comment ext_color_buffer_half_floatthe definition of 'ext_color_buffer_half_float' in that specification. recommendation initial definition. ...
Element: error event - Web APIs
vent or uievent event handler property onerror the event object is a uievent instance if it was generated from a user interface element, or an event instance otherwise. ...
...the event object is a uievent instance if it was generated from a user interface element, or an event instance otherwise. ...
...center; justify-content: center; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } button { height: 2rem; margin: .5rem; } img { width: 0; height: 0; } js const log = document.queryselector('.event-log-contents'); const badimg = document.queryselector('.bad-img'); badimg.addeventlistener('error', (event) => { log.
textcontent = log.
textcontent + `${event.type}: loading image\n`; console.log(event) }); const imgerror = document.queryselector('#img-error'); imgerror.addeventlistener('click', () => { badimg.setattribute('src', 'i-dont-exist'); }); result specifications specification status ui events working draft ...
Element.insertAdjacentHTML() - Web APIs
the insertadjacenthtml() method of the element interface parses the specified
text as html or xml and inserts the resulting nodes into the dom tree at a specified position. it does not reparse the element it is being used on, and thus it does not corrupt the existing elements inside that element. this avoids the extra step of serialization, making it much faster than direct innerhtml manipulation. syntax element.insertadjacenthtml(position,
text); parameters position a domstring representing the position relative to the element; must be one of the following strings: 'beforebegin': before the element itself. 'afterbegin': just inside the element, before its first child. ...
... visualization of position names <!-- beforebegin --> <p> <!-- afterbegin --> foo <!-- beforeend --> </p> <!-- afterend --> note: the beforebegin and afterend positions work only if the node is in the dom tree and has a parent element. ...
...lementbyid('one'); d1.insertadjacenthtml('afterend', '<div id="two">two</div>'); // at this point, the new structure is: // <div id="one">one</div><div id="two">two</div> notes security considerations when inserting html into a page by using insertadjacenthtml(), be careful not to use user input that hasn't been escaped. it is not recommended you use insertadjacenthtml() when inserting plain
text; instead, use the node.
textcontent property or the element.insertadjacent
text() method. this doesn't interpret the passed content as html, but instead inserts it as raw
text. specification specification status comment dom parsing and serializationthe definition of 'element.insertadjacenthtml()' in that specification. working draft ...
Element.name - Web APIs
note: the name property doesn't exist for other elements; unlike tagname and nodename, it is not a property of the node, element or htmlelement interfaces. name can be used in the document.getelementsbyname() method, a form and with the form elements collection. ...
...ument.getelementsbyname() method, a form and with the form elements collection. when used with a form or elements collection, it may return a single element or a collection. ...
...nd with the form elements collection. when used with a form or elements collection, it may return a single element or a collection. ...
Element: paste event - Web APIs
the paste event is fired when the user has initiated a "paste" action through the browser's user interface. bubbles yes cancelable yes interface clipboardevent event handler property onpaste if the cursor is in an editable con
text (for example, in a <
textarea> or an element with contenteditable attribute set to true) then the default action is to insert the contents of the clipboard into the document at the cursor position. a handler for this event can access the clipboard contents by calling getdata() on the event's clipboarddata property. to override the default behavior (for example to insert some different data or a transformation of the clipboard contents) an event handler must cancel the default action using event.preventdefault(...
...to insert some different data or a transformation of the clipboard contents) an event handler must cancel the default action using event.preventdefault(), and then insert its desired data manually. it's possible to construct and dispatch a synthetic paste event, but this will not affect the document's contents. ...
...s="target" contenteditable="true">...and pasting it into this one</div> css div.source, div.target { border: 1px solid gray; margin: .5rem; padding: .5rem; height: 1rem; background-color: #e9eef1; } js const target = document.queryselector('div.target'); target.addeventlistener('paste', (event) => { let paste = (event.clipboarddata || window.clipboarddata).getdata('
text'); paste = paste.touppercase(); const selection = window.getselection(); if (!selection.rangecount) return false; selection.deletefromdocument(); selection.getrangeat(0).insertnode(document.create
textnode(paste)); event.preventdefault(); }); result specifications specification status clipboard api and events working draft ...
GainNode.gain - Web APIs
the gain property of the gainnode interface is an a-rate audioparam representing the amount of gain to apply. syntax var audioctx = new audiocon
text(); var gainnode = audioctx.creategain(); gainnode.gain.value = 0.5; value an audioparam. note: though the audioparam returned is read-only, the value it represents is not. example the following example shows basic usage of an audiocon
text to create a gainnode, which is then used to mute and unmute the audio when a mute button is clicked by changing the gain property value. ...
...e shows basic usage of an audiocon
text to create a gainnode, which is then used to mute and unmute the audio when a mute button is clicked by changing the gain property value. ...
...iocon
text to create a gainnode, which is then used to mute and unmute the audio when a mute button is clicked by changing the gain property value. ...
GeolocationCoordinates.longitude - Web APIs
andard used by the global positioning system (gps). examples in this simple example, we fetch the user's location and display the resulting coordinates once they're returned. javascript the javascript code below creates an event listener so that when the user clicks on a button, the location information is retrieved and displayed. ...
... examples in this simple example, we fetch the user's location and display the resulting coordinates once they're returned. javascript the javascript code below creates an event listener so that when the user clicks on a button, the location information is retrieved and displayed. ...
...information is retrieved and displayed. let button = document.getelementbyid("get-location"); let lat
text = document.getelementbyid("latitude"); let long
text = document.getelementbyid("longitude"); button.addeventlistener("click", function() { navigator.geolocation.getcurrentposition(function(position) { let lat = position.coords.latitude; let long = position.coords.longitude; lat
text.inner
text = lat.tofixed(2); long
text.inner
text = long.tofixed(2); }); }); after setting up variables to more conveniently reference the button element and the two elements into which the latitude and logitude will be drawn, the event listener is established by calling addeventlistener() on the <button> element. when the user clicks the button, we'll fetch and display the location informati...
GlobalEventHandlers.oninput - Web APIs
the oninput property of the globaleventhandlers mixin is an eventhandler that processes input events on the <input>, <select>, and <
textarea> elements. it also handles these events on elements where contenteditable or designmode are turned on. note: unlike oninput, the onchange event handler is not necessarily called for each alteration to an element's value. syntax target.oninput = functionref; value functionref is a function name or a function expression. the function receives an inputevent object as its sole argument. example this example logs the number of characters in an <input> element, every time you modify its contents. ...
..., the onchange event handler is not necessarily called for each alteration to an element's value. syntax target.oninput = functionref; value functionref is a function name or a function expression. the function receives an inputevent object as its sole argument. example this example logs the number of characters in an <input> element, every time you modify its contents. ...
...ts sole argument. example this example logs the number of characters in an <input> element, every time you modify its contents. html <input type="
text" placeholder="type something here to see its length." size="50"> <p id="log"></p> javascript let input = document.queryselector('input'); let log = document.getelementbyid('log'); input.oninput = handleinput; function handleinput(e) { log.
textcontent = `the field's value is ${e.target.value.length} character(s) long.`; } result specifications specification status comment html living standardthe definition of 'oninput' in that specification. living standard initial definition ...
HTMLDetailsElement - Web APIs
htmldetailselement.open is a boolean reflecting the open html attribute, indicati...
... htmldetailselement.open is a boolean reflecting the open html attribute, indicating whether or not the element’s contents (not counting the <summary>) is to be shown to the user. me...
...ft: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/htmldetailselement" target="_top"><rect x="1" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="91" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">htmldetailselement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmldetailselement.open is a boolean reflecting the open html attribute, indicating whether or not the element’s contents (not counting the <summary>) is to be shown to the user. methods no specific method; inherits methods from its parent, htmlelem...
HTMLDialogElement - Web APIs
htmldialogelement.open a boolean reflecting the open html attribute, indicating wh...
... htmldialogelement.open a boolean reflecting the open html attribute, indicating whether the dialog is available for interaction. htmldialogelement.returnvalue a domstring that sets or ...
...left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/htmldialogelement" target="_top"><rect x="1" y="1" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="86" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">htmldialogelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmldialogelement.open a boolean reflecting the open html attribute, indicating whether the dialog is available for interaction. htmldialogelement.returnvalue a domstring that sets or returns the return value for the dialog. methods inherits methods...
HTMLElement: animationcancel event - Web APIs
%) scalex(3); } to { transform: translatex(0) scalex(1); } } js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iterationcount = 0; animation.addeventlistener('animationstart', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation started' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation ended'...
...d' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation ended'`; animation.classlist.remove('active'); applyanimation.
textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.
textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (acti...
...tion"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.
textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.
textcontent = "cancel animation"; } else { applyanimation.
textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationend event - Web APIs
width: 300%; } to { margin-left: 0%; width: 100%; } } js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iterationcount = 0; animation.addeventlistener('animationstart', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation started' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation ended'...
...d' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation ended'`; animation.classlist.remove('active'); applyanimation.
textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.
textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (acti...
...tion"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.
textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.
textcontent = "cancel animation"; } else { applyanimation.
textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationiteration event - Web APIs
%) scalex(3); } to { transform: translatex(0) scalex(1); } } js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iterationcount = 0; animation.addeventlistener('animationstart', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation started' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation ended'...
...d' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation ended'`; animation.classlist.remove('active'); applyanimation.
textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.
textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (acti...
...tion"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.
textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.
textcontent = "cancel animation"; } else { applyanimation.
textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationstart event - Web APIs
%) scalex(3); } to { transform: translatex(0) scalex(1); } } js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iterationcount = 0; animation.addeventlistener('animationstart', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation started' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation ended'...
...d' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation ended'`; animation.classlist.remove('active'); applyanimation.
textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.
textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (acti...
...tion"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.
textcontent = `${animationeventlog.
textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.
textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.
textcontent = "cancel animation"; } else { applyanimation.
textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: input event - Web APIs
bubbles yes cancelable no interface inputevent event handler property globaleventhandlers.oninput the event also applies to elements with contenteditable enabled, and to any element when designmode is turned on. in the case of contenteditable and designmode, the event target is the editing host. if these properties apply to multiple elements, the editing host is the nearest ancestor element whose parent isn't editable. for <input> elements with type=checkbox or type=radio, the input event should fire whenever a user toggles the control, per the html5 specification. ...
...nts of these types. note: the input event is fired every time the value of the element changes. this is unlike the change event, which only fires when the value is committed, such as by pressing the enter key, selecting a value from a list of options, and the like. examples this example logs the value whenever you change the value of the <input> element. ...
...ue from a list of options, and the like. examples this example logs the value whenever you change the value of the <input> element. html <input placeholder="enter some
text" name="name"/> <p id="values"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('values'); input.addeventlistener('input', updatevalue); function updatevalue(e) { log.
textcontent = e.target.value; } result specifications specification status html living standardthe definition of 'input event' in that specification. living standard document object model (dom) level 3 events specificationthe definition of 'input event' in that specification. obsolete ...
HTMLElement: transitioncancel event - Web APIs
ransitionend events fire. in this example, to cancel the transition, stop hovering over the transitioning box before the transition ends. for the transition end event to fire, stay hovered over the transition until the transition ends. ...
...g box before the transition ends. for the transition end event to fire, stay hovered over the transition until the transition ends. ...
...til the transition ends. const message = document.queryselector('.message'); const el = document.queryselector('.transition'); el.addeventlistener('transitionrun', function() { message.
textcontent = 'transitionrun fired'; }); el.addeventlistener('transitionstart', function() { message.
textcontent = 'transitionstart fired'; }); el.addeventlistener('transitioncancel', function() { message.
textcontent = 'transitioncancel fired'; }); el.addeventlistener('transitionend', function() { message.
textcontent = 'transitionend fired'; }); the transitioncancel event is fired if the transition is cancelled in either direction after the transitionrun event occurs and before the transitionend is fired. if there is no transition delay or duration, if both are 0s or neither is declared, there ...
HTMLFormElement: submit event - Web APIs
n any <button> or <input type="submit"> inside it. however, the submitevent which is sent to indicate the form's submit action has been triggered includes a submitter property, which is the button that was invoked to trigger the submit request. the submit event fires when the user clicks a submit button (<button> or <input type="submit">) or presses enter while editing a field (e.g. <input type="
text">) in a form. the event is not sent to the form when calling the form.submit() method directly. note: trying to submit a form that does not pass validation triggers an invalid event. in this case, the validation prevents form submission, and thus there is no submit event. examples this example uses eventtarget.addeventlistener() to listen for form submit, and logs the current event.timestamp...
... not pass validation triggers an invalid event. in this case, the validation prevents form submission, and thus there is no submit event. examples this example uses eventtarget.addeventlistener() to listen for form submit, and logs the current event.timestamp whenever that occurs, then prevents the default action of submitting the form. ...
...mples this example uses eventtarget.addeventlistener() to listen for form submit, and logs the current event.timestamp whenever that occurs, then prevents the default action of submitting the form. html <form id="form"> <label>test field: <input type="
text"></label> <br><br> <button type="submit">submit form</button> </form> <p id="log"></p> javascript function logsubmit(event) { log.
textcontent = `form submitted! time stamp: ${event.timestamp}`; event.preventdefault(); } const form = document.getelementbyid('form'); const log = document.getelementbyid('log'); form.addeventlistener('submit', logsubmit); result specifications specification status comment html living standardthe definition of 'submit' in that specification. working draft no ...
HTMLImageElement.align - Web APIs
property to float the image to the left or right margin. the align property reflects the html align content attribute. syntax htmlimageelement.align = alignmode; alignmode = htmlimageelement.align; value a domstring specifying one of the following strings which set the alignment mode for the image. baseline alignment these three values specify the alignment of the element relative to the
text baseline. these should be replaced by using the css vertical-align property. bottom the bottom edge of the image is to be aligned vertically with the current
text baseline. default value. middle the center of the object should be aligned vertically with the current baseline. top the top edge of the object should be aligned vertically with the current baseline. it may be worth noting tha...
...d vertically with the current baseline. it may be worth noting that vertical-align offers several additional options for its value; you may wish to consider these when changing your code to use it. floating images horizontally the left and right properties don't affect the baseline-relative alignment. ...
...s horizontally the left and right properties don't affect the baseline-relative alignment. instead, they cause the image to "float" to the left or right margin, allowing the following
text to flow around the image. you should instead use the css float property, specifying as the value either left or right. left floats the image over to place the left edge flush against the curent margin. any
text that follows will flow against the image's right edge. right floats the image to place its right edge flush against the right margin. subsequent
text will flow along the image's left edge. specifications specification status comment html living standardthe definition of 'htmlimageelement.align' in that specification. living standard html 4.01 speci...
HTMLMediaElement: loadstart event - Web APIs
fired when the browser has started to load a resource. ...
...esource. ...
...n { grid-area: button; width: 10rem; margin: .5rem 0; } video { grid-area: video; } .event-log { grid-area: log; } .event-log>label { display: block; } js const loadvideo = document.queryselector('button'); const video = document.queryselector('video'); const eventlog = document.queryselector('.event-log-contents'); let source = null; function handleevent(event) { eventlog.
textcontent = eventlog.
textcontent + `${event.type}\n`; } video.addeventlistener('loadstart', handleevent); video.addeventlistener('progress', handleevent); video.addeventlistener('canplay', handleevent); video.addeventlistener('canplaythrough', handleevent); loadvideo.addeventlistener('click', () => { if (source) { document.location.reload(); } else { loadvideo.
textcontent ...
HTMLMediaElement: progress event - Web APIs
t is fired periodically as the browser loads a resource. ...
...resource. ...
...id-area: button; width: 10rem; margin: .5rem 0; } video { grid-area: video; } .event-log { grid-area: log; } .event-log>label { display: block; } javascript const loadvideo = document.queryselector('button'); const video = document.queryselector('video'); const eventlog = document.queryselector('.event-log-contents'); let source = null; function handleevent(event) { eventlog.
textcontent = eventlog.
textcontent + `${event.type}\n`; } video.addeventlistener('loadstart', handleevent); video.addeventlistener('progress', handleevent); video.addeventlistener('canplay', handleevent); video.addeventlistener('canplaythrough', handleevent); loadvideo.addeventlistener('click', () => { if (source) { document.location.reload(); } else { loadvideo.
textcontent ...
HTMLSelectElement.add() - Web APIs
st), the new element is appended to the end of the collection. exceptions a domerror of the type hierarchyrequesterror if the item passed to the method is an ancestor of the htmlselectelement. examples creating elements from scratch var sel = document.createelement("select"); var opt1 = document.createelement("option"); var opt2 = document.createelement("option"); opt1.value = "1"; opt1.
text = "option: value 1"; opt2.value = "2"; opt2.
text = "option: value 2"; sel.add(opt1, null); sel.add(opt2, null); /* produces the following, conceptually: <select> <option value="1">option: value 1</option> <option value="2">option: value 2</option> </select> */ the before parameter is optional. so the following is accepted. ... sel.add(opt1); sel.add(opt2); ... append to an e...
...lowing, conceptually: <select> <option value="1">option: value 1</option> <option value="2">option: value 2</option> </select> */ the before parameter is optional. so the following is accepted. ... sel.add(opt1); sel.add(opt2); ... ...
... <option value="1">option: value 1</option> <option value="2">option: value 2</option> <option value="3">option: value 3</option> </select> */ the before parameter is optional. so the following is accepted. ... sel.add(opt); ... ...
Ajax navigation example - Web APIs
it is shared between all ajax pages.</p> include/before_content.php: <p> [ <a class="ajax-nav" href="first_page.php">first example</a> | <a class="ajax-nav" href="second_page.php">second example</a> | <a class="ajax-nav" href="third_page.php">third example</a> | <a class="aja...
...it is shared between all ajax pages.</p> include/before_content.php: <p> [ <a class="ajax-nav" href="first_page.php">first example</a> | <a class="ajax-nav" href="second_page.php">second example</a> | <a class="ajax-nav" href="third_page.php">third example</a> | <a class="ajax-nav" href="unexisting.php">unexisting page</a> ] </p> include/header.php: <meta http-equiv="content-type" content="
text/html; charset=utf-8" /> <script type="
text/javascript" src="js/ajax_nav.js"></script> <link rel="stylesheet" href="css/style.css" /> js/ajax_nav.js: "use strict"; const ajaxrequest = new (function () { function closereq () { oloadingbox.parentnode && document.body.removechild(oloadingbox); bisloading = false; } function abortreq () { if (!bisloading) { r...
...child(oloadingbox); bisloading = false; } function abortreq () { if (!bisloading) { return; } oreq.abort(); closereq(); } function ajaxerror () { alert("unknown error."); } function ajaxload () { var vmsg, nstatus = this.status; switch (nstatus) { case 200: vmsg = json.parse(this.response
text); document.title = opageinfo.title = vmsg.page; document.getelementbyid(stargetid).innerhtml = vmsg.content; if (bupdateurl) { history.pushstate(opageinfo, opageinfo.title, opageinfo.url); bupdateurl = false; } break; default: vmsg = nstatus + ": " + ...
IDBDatabase - Web APIs
erface of the indexeddb api provides a connection to a database; you can use an idbdatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. the interface provides the only way to get and manage versions of the database. note: this feature is available in web workers. note: everything you do in indexeddb always happens in the con
text of a transaction, representing interactions with data in the database. all objects in indexeddb — including object stores, indexes, and cursors — are tied to a particular transaction. thus, you cannot execute commands, access data, or open anything outside of a transaction. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.66666...
...lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/idbdatabase" target="_top"><rect x="151" y="1" width="110" hei...
...ndale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/idbdatabase" target="_top"><rect x="151" y="1" width="110" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="206" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">idbdatabase</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties idbdatabase.name read only a domstring that contains the name of the connected database. idbdatabase.version read only a 64-bit int...
IDBOpenDBRequest - Web APIs
lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/idbrequest" target="_top"><rect x="151" y="1" width="100" heig...
...co,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/idbrequest" target="_top"><rect x="151" y="1" width="100" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="201" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">idbrequest</
text></a><polyline points="251,25 261,20 261,30 251,25" stroke="#d4dde4" fill="none"/><line x1="261" y1="25" x2="291" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/idbopendbrequest" target="_top"><rect x="291" y="1" width="160...
...e mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">idbrequest</
text></a><polyline points="251,25 261,20 261,30 251,25" stroke="#d4dde4" fill="none"/><line x1="261" y1="25" x2="291" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/idbopendbrequest" target="_top"><rect x="291" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="371" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">idbopendbrequest</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties also inherits methods from its parents idbrequest and eventtarget. methods no methods, but inherits methods from its parents idbreques...
ImageData.data - Web APIs
creates and fills a new imagedata object with colorful pixels. html <canvas id="canvas"></canvas> javascript since each pixel consists of four values within the data array, the for loop iterates by multiples of four. the values associated with each pixel are r (red), g (green), b (blue), and a (alpha), in that order. ...
... specification specification status comment html living standardthe definition of 'imagedata.data' in that specification. living standard initial definition. ...
... specification specification status comment html living standardthe definition of 'imagedata.data' in that specification. living standard initial definition. ...
Basic concepts - Web APIs
w of indexeddb indexeddb lets you store and retrieve objects that are indexed with a "key." all changes that you make to the database happen within transactions. like most web storage solutions, indexeddb follows a same-origin policy. so while you can access stored data within a domain, you cannot access data across different domains. indexeddb is an asynchronous api that can be used in most con
texts, including web workers. it used to include a synchronous version also, for use in web workers, but this was removed from the spec due to lack of interest by the web community. indexeddb used to have a competing spec, websql database, but the w3c deprecated it on november 18, 2010. while both indexeddb and websql are solutions for storage, they do not offer the same functionalities. websql datab...
...nd: indexeddb databases store key-value pairs. the values can be complex structured objects, and keys can be properties of those objects. you can create indexes that use any property of the objects for quick searching, as well as sorted enumeration. keys can be binary objects. indexeddb is built on a transactional database model. everything you do in indexeddb always happens in the con
text of a transaction. the indexeddb api provides lots of objects that represent indexes, tables, cursors, and so on, but each of these is tied to a particular transaction. thus, you cannot execute commands or open cursors outside of a transaction. transactions have a well-defined lifetime, so attempting to use a transaction after it has completed throws exceptions. also, transactions auto-commit and ...
... data that you've read out of the database yourself. note, however, that locale-aware sorting has been allowed with an experimental flag enabled (currently for firefox only) since firefox 43. synchronizing. the api is not designed to take care of synchronizing with a server-side database. you have to write code that synchronizes a client-side indexeddb database with a server-side database. full
text searching. the api does not have an equivalent of the like operator in sql. in addition, be aware that browsers can wipe out the database, such as in the following conditions: the user requests a wipe out. many browsers have settings that let users wipe all data stored for a given website, including cookies, bookmarks, stored passwords, and indexeddb data. the browser is in private browsin...
InputEvent.data - Web APIs
the data read-only property of the inputevent interface returns a domstring with the inserted characters. this may be an empty string if the change doesn't insert
text (such as when deleting characters, for example). syntax var astring = inputevent.data; value a domstring. examples in the following simple example we've set up an event listener on the input event so that when any change is made to the contents of the <input> element (either by typing or pasting), the
text that was added is retrieved via the inputevent.data property and reported in the paragraph below the input. ...
...rs, for example). syntax var astring = inputevent.data; value a domstring. examples in the following simple example we've set up an event listener on the input event so that when any change is made to the contents of the <input> element (either by typing or pasting), the
text that was added is retrieved via the inputevent.data property and reported in the paragraph below the input. ...
...nputevent.data; value a domstring. examples in the following simple example we've set up an event listener on the input event so that when any change is made to the contents of the <input> element (either by typing or pasting), the
text that was added is retrieved via the inputevent.data property and reported in the paragraph below the input. <p>some
text to copy and paste.</p> <input type="
text"> <p class="result"></p> var editable = document.queryselector('input') var result = document.queryselector('.result'); editable.addeventlistener('input', (e) => { result.
textcontent = "inputted
text: " + e.data; }); specifications specification status comment input events level 2the definition of 'data' in that specification. working draft initial definitio...
InstallEvent - Web APIs
inline-block; position: relative; width: 100%; padding-bottom: 8.571428571428571%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/extendableevent" target="_top"><rect x="116" y="1" width="150" height="...
...s,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/extendableevent" target="_top"><rect x="116" y="1" width="150" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="191" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">extendableevent</
text></a><polyline points="266,25 276,20 276,30 266,25" stroke="#d4dde4" fill="none"/><line x1="276" y1="25" x2="306" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/installevent" target="_top"><rect x="306" y="1" width="12...
... mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">extendableevent</
text></a><polyline points="266,25 276,20 276,30 266,25" stroke="#d4dde4" fill="none"/><line x1="276" y1="25" x2="306" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/installevent" target="_top"><rect x="306" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="366" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">installevent</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor installevent.installevent() creates a new installevent object. properties inherits properties from its ancestor, event. installeve...
Intersection Observer API - Web APIs
lid rgb(201, 126, 17); padding: 4px; margin-bottom: 6px; } #box1 { height: 200px; } #box2 { height: 75px; } #box3 { height: 150px; } #box4 { height: 100px; } .label { font: 14px "open sans", "arial", sans-serif; position: absolute; margin: 0; background-color: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.7); width: 3em; height: 18px; padding: 2px;
text-align: center; } .topleft { left: 2px; top: 2px; } .topright { right: 2px; top: 2px; } .bottomleft { bottom: 2px; left: 2px; } .bottomright { bottom: 2px; right: 2px; } let observers = []; startup = () => { let wrapper = document.queryselector(".wrapper"); // options for the observers let observeroptions = { root: null, rootmargin: "0px", threshold: [] ...
... parent block and moving outward, each containing block's clipping (if any) is applied to the intersection rectangle. a block's clipping is determined based on the intersection of the two blocks and the clipping mode (if any) specified by the overflow property. setting overflow to anything but visible causes clipping to occur. if one of the containing elements is the root of a nested browsing con
text (such as the document contained in an <iframe>, the intersection rectangle is clipped to the containing con
text's viewport, and recursion upward through the containers continues with the container's containing block. so if the top level of an <iframe> is reached, the intersection rectangle is clipped to the frame's viewport, then the frame's parent element is the next block recursed through towar...
... setting up first, we need to prepare some variables and install the observer. const numsteps = 20.0; let boxelement; let prevratio = 0.0; let increasingcolor = "rgba(40, 40, 190, ratio)"; let decreasingcolor = "rgba(190, 40, 40, ratio)...
KeyboardEvent: code values - Web APIs
"" 0xe04f "end" "end" 0xe050 "arrowdown" "arrowdown" 0xe051 "pagedown" "pagedown" 0xe052 "insert" "insert" 0xe053 "delete" "delete" 0xe054 ~ 0xe05a "unidentified" "" 0xe05b "metaleft" "osleft" 0xe05c "metaright" "osright" 0xe05d "con
textmenu" "con
textmenu" 0xe05e "power" "" 0xe05f ~ 0xe064 "unidentified" "" 0xe065 "browsersearch" "browsersearch" 0xe066 "browserfavorites" "browserfavorites" 0xe067 "browserrefresh" "browserrefresh" 0xe068 "browserstop" "browserstop" 0xe069 "browserforward" "browserforward" ...
... 0x007e "unidentified" "numpadchangesign" 0x007f "pause" "pause" 0x0080 "unidentified" "" 0x0081 "numpadcomma" "" 0x0082 "lang1" "hangulmode" 0x0083 "lang2" "hanja" 0x0084 "intlyen" "intlyen" 0x0085 "osleft" "osleft" 0x0086 "osright" "osright" 0x0087 "con
textmenu" "con
textmenu" 0x0088 "browserstop" "cancel" 0x0089 "again" "" 0x008a "props" "" 0x008b "undo" "undo" 0x008c "select" "" 0x008d "copy" "copy" 0x008e "open" "" 0x008f "paste" "paste" 0x0090 "find" "" 0x0091 "cut" "cut" 0x0092 "help...
...eup" 0x0074 "power" 0x0075 "numpadequal" 0x0076 "unidentified" 0x0077 "pause" 0x0078 "unidentified" 0x0079 "numpadcomma" 0x007a "lang1" 0x007b "lang2" 0x007c "intlyen" 0x007d "metaleft" 0x007e "metaright" 0x007f "con
textmenu" 0x0080 "browserstop" 0x0081 "again" 0x0082 "props" 0x0083 "undo" 0x0084 "select" 0x0085 "copy" 0x0086 "open" 0x0087 "paste" 0x0088 "find" 0x0089 "cut" 0x008a "help" 0x008b ~ 0x008d "unidentified" 0x008e "sleep" ...
MediaList - Web APIs
the medialist interface represents the media queries of a stylesheet, e.g. those set using a <link> element's media attribute. note: medialist is a live list; updating the list using properties or methods listed below will immediately update the behavior of the document. properties medialist.media
text a stringifier that returns a domstring representing the medialist as
text, and also allows you to set a new medialist. ...
...tring representing the medialist as
text, and also allows you to set a new medialist. medialist.length read only returns the number of media queries in the medialist. methods medialist.appendmedium() adds a media query to the medialist. medialist.deletemedium() removes a media query from the medialist. medialist.item() a getter that returns a cssomstring representing a media query as
text, given the media query's index value inside the medialist. examples the following would log to the console a
textual representation of the medialist of the first stylesheet applied to the current document. ...
...t.item() a getter that returns a cssomstring representing a media query as
text, given the media query's index value inside the medialist. examples the following would log to the console a
textual representation of the medialist of the first stylesheet applied to the current document. const stylesheets = document.stylesheets; let stylesheet = stylesheets[0]; console.log(stylesheet.media.media
text); specifications specification status comment css object model (cssom)the definition of 'medialist' in that specification. working draft ...
MediaSource - Web APIs
lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/mediasource" target="_top"><rect x="151" y="1" width="110" hei...
...ndale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/mediasource" target="_top"><rect x="151" y="1" width="110" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="206" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">mediasource</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor mediasource() constructs and returns a new mediasource object with no associated source buffers. properties mediasource.sourcebuffer...
...ffers read only returns a sourcebufferlist object containing the list of sourcebuffer objects associated with this mediasource. mediasource.activesourcebuffers read only returns a sourcebufferlist object containing a subset of the sourcebuffer objects contained within mediasource.sourcebuffers — the list of objects providing the selected video track, enabled audio tracks, and shown/hidden
text tracks. mediasource.readystate read only returns an enum representing the state of the current mediasource, whether it is not currently attached to a media element (closed), attached and ready to receive sourcebuffer objects (open), or attached but the stream has been ended via mediasource.endofstream() (ended.) mediasource.duration gets and sets the duration of the current media being prese...
MediaStreamAudioSourceNode() - Web APIs
the web audio api's mediastreamaudiosourcenode() constructor creates and returns a new mediastreamaudiosourcenode object which uses the first audio track of a given mediastream as its source. note: another way to create a mediastreamaudiosourcenode is to call theaudiocon
text.createmediastreamsource() method, specifying the stream from which you want to obtain audio. syntax audiosourcenode = new mediastreamaudiosourcenode(con
text, options); parameters con
text an audiocon
text representing the audio con
text you want the node to be associated with. options a mediastreamaudiosourceoptions object defining the properties you want the mediastreamaudiosourcenode to have: mediastream a required property which specifies the mediastream from which to obtain audio for the node. ret...
...rcenode object representing the audio node whose media is obtained from the specified source stream. exceptions invalidstateerror the specified mediastream doesn't have any audio tracks. examples this example uses getusermedia() to obtain access to the user's camera, then creates a new mediastreamaudiosourcenode from its mediastream. ...
...he audio node whose media is obtained from the specified source stream. exceptions invalidstateerror the specified mediastream doesn't have any audio tracks. examples this example uses getusermedia() to obtain access to the user's camera, then creates a new mediastreamaudiosourcenode from its mediastream. ...
Recording a media element - Web APIs
ls to play, pause, and so forth. below the playback element is a button for downloading the recorded video. ...
... setting up...
...let recordingtimems = 5000; most of these are references to elements we need to work with. the last, recordingtimems, is set to 5000 milliseconds (5 seconds); this specifies the length of the videos we'll record. utility functions next, we create some utility functions that will get used later. function log(msg) { logelement.innerhtml += msg + "\n"; } the log() function is used to output
text strings to a <div> so we can share information with the user. not very pretty but it gets the job done for our purposes. function wait(delayinms) { return new promise(resolve => settimeout(resolve, delayinms)); } the wait() function returns a new promise which resolves once the specified number of milliseconds have elapsed. it works by using an arrow function which calls window.settimeout(),...
MerchantValidationEvent - Web APIs
the merchantvalidationevent interface of the the payment request api enables a merchant to verify themselves as allowed to use a particular payment handler. to learn more about merchant validation, see merchant validation in payment processing concepts. constructor merchantvalidationevent() secure con
text creates a new merchantvalidationevent object describing a merchantvalidation event that will be sent to the payment handler to request that it validate the merchant. properties merchantvalidationevent.methodname secure con
text a domstring providing a unique payment method identifier for the payment handler that's requiring validation. this may be either one of the standard payment method identifier strings or a url that both identifies and handles requests for the payment handl...
... merchantvalidationevent.methodname secure con
text a domstring providing a unique payment method identifier for the payment handler that's requiring validation. this may be either one of the standard payment method identifier strings or a url that both identifies and handles requests for the payment handler, such as https://apple.com/apple-pay. merchantvalidationevent.validationurl secure con
text a usvstring specifying a url from which the site or app can fetch payment handler specific validation information. once this data is retrieved, the data (or a promise resolving to the validation data) should be passed into complete() to validate that the payment request is coming from an authorized merchant. ...
... specifications specification status comment payment request apithe definition of 'merchantvalidationevent' in that specification. ...
PeriodicWave.PeriodicWave() - Web APIs
the periodicwave() constructor of the web audio api creates a new periodicwave object instance. syntax var mywave = new periodicwave(con
text, options); parameters inherits parameters from the audionodeoptions dictionary. con
text a baseaudiocon
text representing the audio con
text you want the node to be associated with. options optional a periodicwaveoptions dictionary object defining the properties you want the periodicwave to have (it also inherits the options defined in the periodicwaveconstraints dictionary.): real: a float32array containing the cosine terms that you want to use to form the wave (equivalent to the real parameter of audiocon
text.createperiodicwave). imag: a float32array containing the sine terms that you want to use to form the wave (equivalent to the imag pa...
...e periodicwave to have (it also inherits the options defined in the periodicwaveconstraints dictionary.): real: a float32array containing the cosine terms that you want to use to form the wave (equivalent to the real parameter of audiocon
text.createperiodicwave). imag: a float32array containing the sine terms that you want to use to form the wave (equivalent to the imag parameter of audiocon
text.createperiodicwave). return value a new periodicwave object instance. ...
...se to form the wave (equivalent to the real parameter of audiocon
text.createperiodicwave). imag: a float32array containing the sine terms that you want to use to form the wave (equivalent to the imag parameter of audiocon
text.createperiodicwave). return value a new periodicwave object instance. example var real = new float32array(2); var imag = new float32array(2); var ac = new audiocon
text(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var options = { real : real, imag : imag, disablenormalization : false } var wave = new periodicwave(ac, options); specifications specification status comment web audio apithe definition of 'periodicwave' in that specification. working draft ...
Permissions API - Web APIs
for example, the permissions api can be used to determine if permission to access a particular api has been granted or denied. concepts and usage historically different apis handle their own permissions inconsistently — for example the notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request). ...
...f permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request). the permissions api provides the tools to allow developers to implement a better user experience as far as permissions are concerned. the permissions property has been made available on the navigator object, both in the standard browsing con
text and the worker con
text (workernavigator — so permission checks are available inside workers), and returns a permissions object that provides access to the permissions api functionality. once you have this object you can then perform permission-related tasks, for example querying a permission using the permissions.query() method to return a promise that resolves with the permissionstatus for a ...
...is will gain permissions api support over time. examples we have made a simple example available called location finder. you can run the example live, or view the source code on github. read more about how it works in our article using the permissions api. interfaces navigator.permissions and workernavigator.permissions read only provides access to the permissions object from the main con
text and worker con
text respectively. permissions provides the core permission api functionality, such as methods for querying and revoking permissions. permissionstatus provides access to the current status of a permission, and an event handler to respond to changes in permission status. specification specification status comment permissions working draft initial ...
PositionOptions - Web APIs
the positionoptions dictionary describes an object containing option properties to pass as a parameter of geolocation.getcurrentposition() and geolocation.watchposition(). properties positionoptions.enablehighaccuracy secure con
text is a boolean that indicates the application would like to receive the best possible results. if true and if the device is able to provide a more accurate position, it will do so. note that this can result in slower response times or increased power consumption (with a gps chip on a mobile device for example). ...
...if true and if the device is able to provide a more accurate position, it will do so. note that this can result in slower response times or increased power consumption (with a gps chip on a mobile device for example). on the other hand, if false, the device can take the liberty to save resources by responding more quickly and/or using less power. default: false. ...
...if set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. ...
PromiseRejectionEvent - Web APIs
the promiserejectionevent interface represents events which are sent to the global script con
text when javascript promises are rejected. these events are particularly useful for telemetry and debugging purposes. for details on promise rejection events, see promise rejection events in using promises. ...
...yle="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/promiserejectionevent" target="_top"><rect x="116" y="1" width="210" he...
...andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/promiserejectionevent" target="_top"><rect x="116" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="221" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">promiserejectionevent</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor promiserejectionevent() creates a promiserejectionevent event, given the type of event (unhandledrejection or rejectionhandled)...
Range - Web APIs
a range can be created by using the document.createrange() method. range objects can also be retrieved by using the getrangeat() method of the selection object or the caretrangefrompoint() method of the document object. there also is the range() constructor available. properties there are no inherited properties. range.collapsed read only returns a boolean indicating whether the range's start and end points are at the same position. range.commonancestorcontainer read only returns the deepest node that contains the startcontainer and endcontainer nodes. ...
... insert a node at the start of a range. range.surroundcontents() moves content of a range into a new node. range.compareboundarypoints() compares the boundary points of the range with another range. range.clonerange() returns a range object with boundary points identical to the cloned range. range.detach() releases the range from use to improve performance. range.tostring() returns the
text of the range. range.comparenode() returns a constant representing whether the node is before, after, inside, or surrounding the range. range.comparepoint() returns -1, 0, or 1 indicating whether the point occurs before, inside, or after the range. range.createcon
textualfragment() returns a documentfragment created from a given string of code. range.getboundingclientrect() returns ...
...n. living standard do not use rangeexception anymore, use domexception instead. made the second parameter of collapse() optional. added the methods ispointinrange(), comparepoint(), and intersectsnode(). added the constructor range(). dom parsing and serializationthe definition of 'extensions to range' in that specification. working draft added the method createcon
textualfragment(). css object model (cssom) view modulethe definition of 'extensions to range' in that specification. working draft added the methods getclientrects() and getboundingclientrect(). document object model (dom) level 2 traversal and range specificationthe definition of 'range' in that specification. obsolete initial specification. ...
ReadableStream.getReader() - Web APIs
s read sequentially and output to the ui, until the stream has finished being read, at which point we return out of the recursive function and print the entire stream to another part of the ui. ...
...sreceived = 0; // read() returns a promise that resolves // when a value has been received reader.read().then(function process
text({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data. // value - some data. always undefined when done is true. if (done) { console.log("stream complete"); para.
textcontent = value; return; } // value for fetch streams is a uint8array charsreceived += value.length; const chunk = value; let listitem = document.createelement('li'); listitem.
textcontent = 'received ' + charsreceived + ' characters so far. current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function...
... value for fetch streams is a uint8array charsreceived += value.length; const chunk = value; let listitem = document.createelement('li'); listitem.
textcontent = 'received ' + charsreceived + ' characters so far. current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(process
text); }); } specifications specification status comment streamsthe definition of 'getreader()' in that specification. living standard initial definition. ...
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
s read sequentially and output to the ui, until the stream has finished being read, at which point we return out of the recursive function and print the entire stream to another part of the ui. ...
...sreceived = 0; // read() returns a promise that resolves // when a value has been received reader.read().then(function process
text({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data. // value - some data. always undefined when done is true. if (done) { console.log("stream complete"); para.
textcontent = result; return; } // value for fetch streams is a uint8array charsreceived += value.length; const chunk = value; let listitem = document.createelement('li'); listitem.
textcontent = 'received ' + charsreceived + ' characters so far. current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this functio...
... value for fetch streams is a uint8array charsreceived += value.length; const chunk = value; let listitem = document.createelement('li'); listitem.
textcontent = 'received ' + charsreceived + ' characters so far. current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(process
text); }); } specifications specification status comment streamsthe definition of 'readablestreamdefaultreader()' in that specification. living standard initial definition. ...
ReadableStreamDefaultReader.cancel() - Web APIs
ction and print the entire stream to another part of the ui. when the stream is done (if (done)), we run reader.cancel() to cancel the stream, signalling that we don't need to use it any more. ...
...ad() returns a promise that resolves // when a value has been received reader.read().then(function process
text({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data. // value - some data. always undefined when done is true. if (done) { console.log("stream complete"); reader.cancel(); para.
textcontent = result; return; } // value for fetch streams is a uint8array charsreceived += value.length; const chunk = value; let listitem = document.createelement('li'); listitem.
textcontent = 'received ' + charsreceived + ' characters so far. current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this functio...
... value for fetch streams is a uint8array charsreceived += value.length; const chunk = value; let listitem = document.createelement('li'); listitem.
textcontent = 'received ' + charsreceived + ' characters so far. current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(process
text); }); } specifications specification status comment streamsthe definition of 'cancel()' in that specification. living standard initial definition. ...
SVGAltGlyphDefElement - Web APIs
properties this interface doesn't implement any specific properties, but in...
... properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement. methods this interface doesn't implement any s...
..." viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgaltglyphdefelement" target="_top"><rect x="1" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="106" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgaltglyphdefelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification. properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelem...
SVGAltGlyphItemElement - Web APIs
properties this interface doesn't implement any specific properties, but i...
... properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement. methods this interface doesn't implement any ...
...viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgaltglyphitemelement" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgaltglyphitemelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification. properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelem...
SVGExternalResourcesRequired - Web APIs
properties svgexternalresourcesrequired.externalresourcesrequired ...
... properties svgexternalresourcesrequired.externalresourcesrequired corresponds to the externalresourcesrequired attribute of the given element. note: the svg dom defin...
... 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgexternalresourcesrequired" target="_top"><rect x="1" y="1" width="280" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="141" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgexternalresourcesrequired</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification. properties svgexternalresourcesrequired.externalresourcesrequired corresponds to the externalresourcesrequired attribute of the given element. note: the svg dom defines the attribute externalresourcesrequired as being of type svganimatedboolean,...
SVGFontFaceFormatElement - Web APIs
methods this interface has no methods bu...
... methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comm...
...ox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfaceformatelement" target="_top"><rect x="1" y="1" width="240" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="121" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgfontfaceformatelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement. methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definit...
SVGFontFaceNameElement - Web APIs
methods this interface has no methods but ...
... methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status commen...
...iewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfacenameelement" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgfontfacenameelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement. methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definit...
SVGFontFaceSrcElement - Web APIs
methods this interface has no methods but i...
... methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment...
... viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfacesrcelement" target="_top"><rect x="1" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="106" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgfontfacesrcelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement. methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definit...
SVGFontFaceUriElement - Web APIs
methods this interface has no methods but i...
... methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment...
... viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfaceurielement" target="_top"><rect x="1" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="106" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgfontfaceurielement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement. methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definit...
SVGGlyphElement - Web APIs
properties this interface doesn't implement any specific properties, but inherits ...
... properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement. methods this interface doesn't implement any specifi...
...: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgglyphelement" target="_top"><rect x="1" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgglyphelement</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification. properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelem...
SVGRect - Web APIs
if the attribute is not specified, the effect is as if a value of 0 we...
...if the attribute is not specified, the effect is as if a value of 0 were specified. svgrect.y the exact effect of this coordinate depends on each element.if the attribute is ...
... absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgrect" target="_top"><rect x="1" y="1" width="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgrect</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties svgrect.x the exact effect of this coordinate depends on each element. if the attribute is not specified, the effect is as if a value of 0 were specified. svgrect.y the exact effect of this coordinate depends on each element.if the attribute is not specified, the effect is as if a value of 0 were speci...
SVGRenderingIntent - Web APIs
constants name value description rendering_intent_unkno...
... constants name value description rendering_intent_unknown 0 the type is not one of predefined types. it is invalid to attempt to define a new value of th...
...eft: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgrenderingintent" target="_top"><rect x="1" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="91" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">svgrenderingintent</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification. constants name value description rendering_intent_unknown 0 the type is not one of predefined types. it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. ...
Screen Wake Lock API - Web APIs
ock and if referenced can be manually released and reacquired. get an instance of the object by calling wakelock.request. navigator.wakelock returns a wakelock object instance, from which all other functionality can be accessed. examples feature detection this code checks for wake lock support and updates the ui accordingly. if ('wakelock' in navigator) { issupported = true; statuselem.
textcontent = 'screen wake lock api supported!'; } else { wakebutton.disabled = true; statuselem.
textcontent = 'wake lock is not supported by this browser.'; } requesting a wake lock the following example demonstrates how to request a wakelocksentinel object. the wakelock.request method is promise based and so we can create an asynchronous function, which in turn updates the ui to reflect the w...
... we can create an asynchronous function, which in turn updates the ui to reflect the wake lock is active. // create a reference for the wake lock let wakelock = null; // create an async function to request a wake lock const requestwakelock = async () => { try { wakelock = await navigator.wakelock.request('screen'); // change up our interface to reflect wake lock active statuselem.
textcontent = 'wake lock is active!'; } catch (err) { // if wake lock request fails - usually system related, such as battery statuselem.
textcontent = `${err.name}, ${err.message}`; } } releasing wake lock the following example shows how to release the previously acquired wake lock. wakelock.release() .then(() => { wakelock = null; }); listening for wake lock release this e...
...following example shows how to release the previously acquired wake lock. wakelock.release() .then(() => { wakelock = null; }); listening for wake lock release this example updates the ui if the wake lock has been released for any reason (such as navigating away from the active window/tab). wakelock.addeventlistener('release', () => { // the wake lock has been released statuselem.
textcontent = 'wake lock has been released'; }); reacquiring a wake lock the following code reacquires the wake lock should the visibility of the document change and the wake lock is released. document.addeventlistener('visibilitychange', () => { if (wakelock !== null && document.visibilitystate === 'visible') { wakelock = await navigator.wakelock.request('screen'); } }); putting it all t...
ScriptProcessorNode.bufferSize - Web APIs
e: as of the august 29 2014 web audio api spec publication, this feature has been marked as deprecated, and is soon to be replaced by audio workers. the buffersize property of the scriptprocessornode interface returns an integer representing both the input and output buffer size, in sample-frames. its value can be a power of 2 value in the range 256–16384. syntax var audioctx = new audiocon
text(); var scriptnode = audioctx.createscriptprocessor(4096, 1, 1); console.log(scriptnode.buffersize); value an integer. example the following example shows basic usage of a scriptprocessornode to take a track loaded via audiocon
text.decodeaudiodata(), process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the audiodestinationnode. for each ...
... sample in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case. ...
... white noise, before setting that result to be the output sample in each case. ...
ScriptProcessorNode.onaudioprocess - Web APIs
this feature has been marked as deprecated, and is soon to be replaced by audio workers. the onaudioprocess event handler of the scriptprocessornode interface represents the eventhandler to be called for the audioprocess event that is dispatched to scriptprocessornode node types. an event of type audioprocessingevent will be dispatched to the event handler. syntax var audioctx = new audiocon
text(); var scriptnode = audioctx.createscriptprocessor(4096, 1, 1); scriptnode.onaudioprocess = function() { ... } example the following example shows basic usage of a scriptprocessornode to take a track loaded via audiocon
text.decodeaudiodata(), process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the audiodestinationnode. for each channel a...
...e in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case. ...
... noise, before setting that result to be the output sample in each case. ...
Selection API - Web APIs
the selection api provides functionality for reading and manipulating the range of
text selected by the user. concepts and usage to retrieve the current
text range the user has selected, you can use the window.getselection() or document.getselection() method, storing the return value — a selection object — in a variable for futher use. once your selection is in a variable, you perform a variety of operations on it, for example copying the selection to a
text string using selection.tostring(), adding a range (as represented by a standard range object) to the selection (or removing one) with selection.addrange()/selection.removerange(), or changing the selection to be the entire contents of a dom node using selection.selectallchildren(). you can run code in response to the selection b...
...ange()/selection.removerange(), or changing the selection to be the entire contents of a dom node using selection.selectallchildren(). you can run code in response to the selection being changed, or a new selection being started, using the globaleventhandlers.onselectionchange and globaleventhandlers.onselectstart event handlers. selection api interfaces selection represents the range of
text selected by the user or the current position of the caret. extensions to other interfaces window.getselection(), document.getselection() returns a selection object representing the range of
text selected by the user or the current position of the caret. document.getselection() is basically an alias of window.getselection(). globaleventhandlers.onselectstart represents the event handler th...
... window.getselection(), document.getselection() returns a selection object representing the range of
text selected by the user or the current position of the caret. document.getselection() is basically an alias of window.getselection(). globaleventhandlers.onselectstart represents the event handler that is called when a selectstart event is fired on the current object (i.e. when a new range of
text is about to be selected by the user). globaleventhandlers.onselectionchange represents the event handler that is called when a selectionchange event is fired on the current object (i.e. when the selected
text range changes). specifications specification status comment selection apithe definition of 'selection' in that specification. working draft the selectio...
ServiceWorker.state - Web APIs
yntax someurl = serviceworker.state value a serviceworkerstate definition (see the spec.) examples this code snippet is from the service worker registration-events sample (live demo). the code listens for any change in the serviceworker.state and returns its value. ...
...rvice worker registration-events sample (live demo). the code listens for any change in the serviceworker.state and returns its value. ...
...e. var serviceworker; if (registration.installing) { serviceworker = registration.installing; document.queryselector('#kind').
textcontent = 'installing'; } else if (registration.waiting) { serviceworker = registration.waiting; document.queryselector('#kind').
textcontent = 'waiting'; } else if (registration.active) { serviceworker = registration.active; document.queryselector('#kind').
textcontent = 'active'; } if (serviceworker) { logstate(serviceworker.state); serviceworker.addeventlistener('statechange', function(e) { logstate(e.target.state); }); } specifications specification status comment service workersthe definition of 'state' in that specification. working draft initial definition ...
ServiceWorker - Web APIs
pages, workers, etc.) can be associated with the same service worker, each through a unique serviceworker object. ...
...the code listens for any change in the serviceworker.state and returns its value. ...
...worker.js', { scope: './' }).then(function (registration) { var serviceworker; if (registration.installing) { serviceworker = registration.installing; document.queryselector('#kind').
textcontent = 'installing'; } else if (registration.waiting) { serviceworker = registration.waiting; document.queryselector('#kind').
textcontent = 'waiting'; } else if (registration.active) { serviceworker = registration.active; document.queryselector('#kind').
textcontent = 'active'; } if (serviceworker) { // logstate(serviceworker.state); serviceworker.addeventlistener('statechange', function (e) { // logstate(e.target.state); }); ...
SourceBuffer - Web APIs
lock; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/sourcebuffer" target="_top"><rect x="151" y="1" width="120" he...
...dale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">eventtarget</
text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/sourcebuffer" target="_top"><rect x="151" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="211" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">sourcebuffer</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties sourcebuffer.appendwindowend controls the timestamp for the end of the append window. sourcebuffer.appendwindowstart controls the times...
...read only a list of the audio tracks currently contained inside the sourcebuffer. sourcebuffer.buffered read only returns the time ranges that are currently buffered in the sourcebuffer. sourcebuffer.mode controls how the order of media segments in the sourcebuffer is handled, in terms of whether they can be appended in any order, or they have to be kept in a strict sequence. sourcebuffer.
texttracks read only a list of the
text tracks currently contained inside the sourcebuffer. sourcebuffer.timestampoffset controls the offset applied to timestamps inside media segments that are subsequently appended to the sourcebuffer. sourcebuffer.trackdefaults specifies the default values to use if kind, label, and/or language information is not available in the initialization segment of the ...
SpeechSynthesisUtterance.SpeechSynthesisUtterance() - Web APIs
examples the following snippet is excerpted from our speech synthesizer demo. ...
... examples the following snippet is excerpted from our speech synthesizer demo. ...
... examples the following snippet is excerpted from our speech synthesizer demo. ...
SpeechSynthesisUtterance - Web APIs
erties speechsynthesisutterance also inherits properties from its parent interface, eventtarget. speechsynthesisutterance.lang gets and sets the language of the utterance. speechsynthesisutterance.pitch gets and sets the pitch at which the utterance will be spoken at. speechsynthesisutterance.rate gets and sets the speed at which the utterance will be spoken at. speechsynthesisutterance.
text gets and sets the
text that will be synthesised when the utterance is spoken. speechsynthesisutterance.voice gets and sets the voice that will be used to speak the utterance. speechsynthesisutterance.volume gets and sets the volume that the utterance will be spoken at. events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of t...
...ntroller using window.speechsynthesis. after defining some necessary variables, we retrieve a list of the voices available using speechsynthesis.getvoices() and populate a select menu with them so the user can choose what voice they want. inside the inputform.onsubmit handler, we stop the form submitting with preventdefault(), use the constructor to create a new utterance instance containing the
text from the
text <input>, set the utterance's voice to the voice selected in the <select> element, and start the utterance speaking via the speechsynthesis.speak() method. var synth = window.speechsynthesis; var voices = synth.getvoices(); var inputform = document.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); for(var i =...
...element, and start the utterance speaking via the speechsynthesis.speak() method. ...
StereoPannerNode.pan - Web APIs
note: though the audioparam returned is read-only, the value it represents is not. ...
...nnernode, and connect the two together using the connect() method. we then use an oninput event handler to change the value of the stereopannernode.pan parameter and update the pan value display when the slider is moved. moving the slider left and right while the music is playing pans the music across to the left and right speakers of the output, respectively. ...
... together using the connect() method. we then use an oninput event handler to change the value of the stereopannernode.pan parameter and update the pan value display when the slider is moved. moving the slider left and right while the music is playing pans the music across to the left and right speakers of the output, respectively. ...
StorageEvent - Web APIs
a storageevent is sent to a window when a storage area it has access to is changed within the con
text of another document. ...
...nline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/storageevent" target="_top"><rect x="116" y="1" width="120" height="50"...
...s,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/storageevent" target="_top"><rect x="116" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="176" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">storageevent</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} method overview void initstorageevent( in domstring type, in boolean canbubble, in boolean cancelable, in domstring key, in domstring oldvalu...
Storage Access API - Web APIs
the api provides methods that allow embedded resources to check whether they currently have access to their first-party storage, and to request access to their first-party storage from the user agent. concepts and usage most browsers implement a number of storage access policies that restrict access to cookies and site data for embedded, cross-origin resources. ...
...r first-party storage from the user agent. concepts and usage most browsers implement a number of storage access policies that restrict access to cookies and site data for embedded, cross-origin resources. these restrictions range from giving embedded resources under each top-level origin a unique storage space to outright blocking of storage access when resources are loaded in a third-party con
text. the semantics around third-party cookie blocking policies in particular differ from browser to browser, but the core functionality is similar: cross-origin resources embedded in a third-party con
text are not given access to the same cookies and site storage that they would have access to when loaded in a first-party con
text. these cookie blocking policies are known to break embedded cross-orig...
...ming the browser or user with excessive access requests. origins that have never been interacted with as a first party do not have a notion of first-party storage. from the user’s perspective, they only have a third-party relationship with that origin. access requests are automatically denied if the browser detects that the user hasn’t interacted with the embedded content in a first-party con
text recently (in firefox, "recently" is "within 30 days"). the browser may decide to involve the user in the decision of whether to grant an incoming storage access request. specifics regarding the lifetime of a storage grant and the circumstances under which the browser may decide to inform the user are currently being worked through and will be announced once ready. user prompts when requeststo...
StylePropertyMap - Web APIs
methods inherits methods from its parent, stylepropertymapreadonly. s...
... methods inherits methods from its parent, stylepropertymapreadonly. stylepropertymap.append() adds a new css declaration to the stylepropertymap with the given property and...
...0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/stylepropertymap" target="_top"><rect x="1" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">stylepropertymap</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, stylepropertymapreadonly. methods inherits methods from its parent, stylepropertymapreadonly. stylepropertymap.append() adds a new css declaration to the stylepropertymap with the given property and value. stylepropertymap.clear() removes all declarations in the ...
StylePropertyMapReadOnly - Web APIs
is in the stylepropertymapreadonly object. stylepropertymapreadonly.keys() returns a new array iterator containing the keys for each item in stylepropertymapreadonly. stylepropertymapreadonly.values() returns a new array iterator containing the values for each index in the stylepropertymapreadonly object. examples we have to have an element to observe: <p> this is a paragraph with some
text. we can add some css, or not. the style map will include all the default and inherted css property values. </p> <dl id="output"></dl> we add a touch of css with a custom property to better demonstrate the output: p { --somevariable: 1.6em; --someothervariable: translatex(33vw); --anothervariable: 42; line-height: var(--somevariable); } we add javascript to grab our paragraph and...
... working draft initial definition.
... working draft initial definition. ...
SubtleCrypto.deriveBits() - Web APIs
namedcurve: "p-384", public: publickey }, privatekey, 128 ); const buffer = new uint8array(sharedsecret, 0, 5); const sharedsecretvalue = document.queryselector(".ecdh .derived-bits-value"); sharedsecretvalue.classlist.add("fade-in"); sharedsecretvalue.addeventlistener("animationend", () => { sharedsecretvalue.classlist.remove("fade-in"); }); sharedsecretvalue.
textcontent = `${buffer}...[${sharedsecret.bytelength} bytes total]`; } // generate 2 ecdh key pairs: one for alice and one for bob // in more normal usage, they would generate their key pairs // separately and exchange public keys securely const generatealiceskeypair = window.crypto.subtle.generatekey( { name: "ecdh", namedcurve: "p-384" }, false, ["derivebits"] ); const generatebob...
...air.publickey); }); }); pbkdf2 in this example we ask the user for a password, then use it to derive some bits using pbkdf2. see the complete code on github. let salt; /* get some key material to use as input to the derivebits method. the key material is a password supplied by the user. */ function getkeymaterial() { const password = window.prompt("enter your password"); const enc = new
textencoder(); return window.crypto.subtle.importkey( "raw", enc.encode(password), {name: "pbkdf2"}, false, ["derivebits", "derivekey"] ); } /* derive some bits from a password supplied by the user. */ async function getderivedbits() { const keymaterial = await getkeymaterial(); salt = window.crypto.getrandomvalues(new uint8array(16)); const derivedbits = await window.cr...
... recommendation ...
SubtleCrypto.deriveKey() - Web APIs
bkdf2 in this example we ask the user for a password, then use it to derive an aes key using pbkdf2, then use the aes key to encrypt a message. see the complete code on github. /* get some key material to use as input to the derivekey method. the key material is a password supplied by the user. ...
...some key material to use as input to the derivekey method. the key material is a password supplied by the user. ...
... recommendation initial definition. ...
SyncEvent - Web APIs
inline-block; position: relative; width: 100%; padding-bottom: 8.571428571428571%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/extendableevent" target="_top"><rect x="116" y="1" width="150" height="...
...s,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/extendableevent" target="_top"><rect x="116" y="1" width="150" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="191" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">extendableevent</
text></a><polyline points="266,25 276,20 276,30 266,25" stroke="#d4dde4" fill="none"/><line x1="276" y1="25" x2="306" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/syncevent" target="_top"><rect x="306" y="1" width="90" h...
...dale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">extendableevent</
text></a><polyline points="266,25 276,20 276,30 266,25" stroke="#d4dde4" fill="none"/><line x1="276" y1="25" x2="306" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/syncevent" target="_top"><rect x="306" y="1" width="90" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="351" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">syncevent</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor syncevent.syncevent() creates a new syncevent object. properties inherits properties from its ancestor, event. syncevent.tag read onl...
TouchEvent - Web APIs
nline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill=...
...="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="153.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">uievent</
text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#d4dde4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/touchevent" target="_top"><rect x="231" y="1" width="100" heigh...
...aco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">uievent</
text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#d4dde4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/touchevent" target="_top"><rect x="231" y="1" width="100" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="281" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">touchevent</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor touchevent() creates a touchevent object. properties this interface inherits properties from its parent, uievent and event. toucheve...
TreeWalker.whatToShow - Web APIs
eaningful only when creating a treewalker with a notation node as its root; in this case, it means that the notation node will appear in the first position of the traversal. since entities are not part of the document tree, they do not appear when traversing over the document tree. nodefilter.show_processing_instruction 64 shows processinginstruction nodes. ...
... creating a treewalker with a notation node as its root; in this case, it means that the notation node will appear in the first position of the traversal. since entities are not part of the document tree, they do not appear when traversing over the document tree. nodefilter.show_processing_instruction 64 shows processinginstruction nodes. nodefilter.show_
text 4 shows
text nodes. ...
...ey do not appear when traversing over the document tree. nodefilter.show_processing_instruction 64 shows processinginstruction nodes. nodefilter.show_
text 4 shows
text nodes. ...
UIEvent.layerX - Web APIs
ive to the whole of the document unless the event occurs inside a positioned element, where the returned value is relative to the top left of the positioned element. syntax var xpos = event.layerx xpos is an integer value in pixels for the x-coordinate of the mouse pointer, when the mouse event fired. ...
...pagey & layerx\layery example</title> <script type="
text/javascript"> function showcoords(evt){ var form = document.forms.form_coords; var parent_id = evt.target.parentnode.id; form.parentid.value = parent_id; form.pagexcoords.value = evt.pagex; form.pageycoords.value = evt.pagey; form.layerxcoords.value = evt.layerx; form.layerycoords.value = evt.layery; } </script> <style type="
text/css"> #d1 { border: solid blue 1px; padding: 20px; } #d2 { position: absolute; top: 180px; left: 80%; right:auto; width: 40%; border: solid blue 1px; padding: 20px; } #d3 { position: absolute; top: 240px; left: 20%; width: 50%; border: solid blue 1px; padding: 10px; } </style> </head> <body onmousedown="showcoords(event)"> <p>to display the mouse coordina...
...lling.</span> <span>make the page scroll more! this is a positioned div so clicking it will return layerx/layery values that are relative to the top-left corner of this positioned element. note the pagex\pagey properties still return the absolute position in the document, including page scrolling.</span> </div> <div id="d3"> <form name="form_coords" id="form1"> parent element id: <input type="
text" name="parentid" size="7" /><br /> pagex:<input type="
text" name="pagexcoords" size="7" /> pagey:<input type="
text" name="pageycoords" size="7" /><br /> layerx:<input type="
text" name="layerxcoords" size="7" /> layery:<input type="
text" name="layerycoords" size="7" /> </form> </div> </body> </html> specifications this property is not part of any specification. browser compatibility the ...
UIEvent.layerY - Web APIs
e to the whole of the document, unless the event occurs inside a positioned element, where the returned value is relative to the top left of the positioned element. syntax var ypos = event.layery; ypos is an integer value in pixels for the y-coordinate of the mouse pointer, when the mouse event fired. ...
...pagey & layerx\layery example</title> <script type="
text/javascript"> function showcoords(evt){ var form = document.forms.form_coords; var parent_id = evt.target.parentnode.id; form.parentid.value = parent_id; form.pagexcoords.value = evt.pagex; form.pageycoords.value = evt.pagey; form.layerxcoords.value = evt.layerx; form.layerycoords.value = evt.layery; } </script> <style type="
text/css"> #d1 { border: solid blue 1px; padding: 20px; } #d2 { position: absolute; top: 180px; left: 80%; right:auto; width: 40%; border: solid blue 1px; padding: 20px; } #d3 { position: absolute; top: 240px; left: 20%; width: 50%; border: solid blue 1px; padding: 10px; } </style> </head> <body onmousedown="showcoords(event)"> <p>to display the mouse coordina...
...lling.</span> <span>make the page scroll more! this is a positioned div so clicking it will return layerx/layery values that are relative to the top-left corner of this positioned element. note the pagex\pagey properties still return the absolute position in the document, including page scrolling.</span> </div> <div id="d3"> <form name="form_coords" id="form1"> parent element id: <input type="
text" name="parentid" size="7" /><br /> pagex:<input type="
text" name="pagexcoords" size="7" /> pagey:<input type="
text" name="pageycoords" size="7" /><br /> layerx:<input type="
text" name="layerxcoords" size="7" /> layery:<input type="
text" name="layerycoords" size="7" /> </form> </div> </body> </html> specifications this property is not part of any specification. ...
UIEvent.pageY - Web APIs
vertical coordinate of the event relative to the whole document. syntax var pagey = event.pagey; pagey is an integer value in pixels for the y-coordinate of the mouse pointer, relative to the whole document, when the mouse event fired. this property takes into account any vertical scrolling of the page. ...
...agey & layerx\layery example</title> <script type="
text/javascript"> function showcoords(evt){ var form = document.forms.form_coords; var parent_id = evt.target.parentnode.id; form.parentid.value = parent_id; form.pagexcoords.value = evt.pagex; form.pageycoords.value = evt.pagey; form.layerxcoords.value = evt.layerx; form.layerycoords.value = evt.layery; } </script> <style type="
text/css"> #d1 { border: solid blue 1px; padding: 20px; } #d2 { position: absolute; top: 180px; left: 80%; right:auto; width: 40%; border: solid blue 1px; padding: 20px; } #d3 { position: absolute; top: 240px; left: 20%; width: 50%; border: solid blue 1px; padding: 10px; } </style> </head> <body onmousedown="showcoords(event)"> <p>to display the mouse coordina...
...ng page scrolling.</span> <span>make the page scroll more! this is a positioned div so clicking it will return layerx/layery values that are relative to the top-left corner of this positioned element. note the pagex\pagey properties still return the absolute position in the document, including page scrolling.</span> </div> <div id="d3"> <form name="form_coords"> parent element id: <input type="
text" name="parentid" size="7" /><br /> pagex:<input type="
text" name="pagexcoords" size="7" /> pagey:<input type="
text" name="pageycoords" size="7" /><br /> layerx:<input type="
text" name="layerxcoords" size="7" /> layery:<input type="
text" name="layerycoords" size="7" /> </form> </div> </body> </html> specifications this property is not part of any specification. ...
URLSearchParams.set() - Web APIs
codepen, jsfiddle, or the multi-line javascript interpreter in firefox. line #41: comment out this line to stop dumping the search parameters to the console (debug). line #43: dumps the generated object and it's string representation to the console (info). line #44: tries to automatically open a new window/tab with the generated url (when uncommented). ...
...ne #44: tries to automatically open a new window/tab with the generated url (when uncommented). ...
...tries to automatically open a new window/tab with the generated url (when uncommented). ...
VTTCue() - Web APIs
the vttcue() constructor creates and returns a new vttcue object. syntax vttcue = new vttcue(starttime, endtime,
text); parameters starttime this is a double representing the initial
text track cue start time. this is the time, given in seconds and fractions of a second, denoting the beginning of the range of the media data to which this cue applies. for example, if a cue is to be visible from 50 seconds to a one minute, five and a half seconds in the media's playback, starttime will be 50.0. endtime this is a double representing the ending time for this
text track cue. ...
... be visible from 50 seconds to a one minute, five and a half seconds in the media's playback, starttime will be 50.0. endtime this is a double representing the ending time for this
text track cue. this is the time at which the cue should stop being presented to the user, given in seconds and fractions thereof. given the example cue mentioned under starttime, the value of endtime would be 65.5.
text a domstring providing the
text that will be shown during the time span indicated by starttime and endtime. return value a new vttcue object representing a cue which will be presented during the time span given. ...
...tions thereof. given the example cue mentioned under starttime, the value of endtime would be 65.5.
text a domstring providing the
text that will be shown during the time span indicated by starttime and endtime. return value a new vttcue object representing a cue which will be presented during the time span given. example // create a cue that is shown from 2 to 3 seconds and uses the given
text. var cue = new vttcue(2, 3, 'cool
text to be displayed'); specifications specification status comment webvtt: the web video
text tracks formatthe definition of 'vttcue()' in that specification. candidate recommendation ...
VTTRegion - Web APIs
constructor vttregion() returns a newly created vttregion object. properties vttregion.id a domstring that identifies the region. vttregion.width a double representing the width of the region, as a percentage of the video. vttregion.lines a double representing the height of the region, in number of lines. vttregion.regionanchorx a double representing the region anchor x offset, as a percentage of the region. vttregion.regionanchory a double representing the region anchor y offset, as a percentage of the region. ...
...senting the viewport anchor y offset, as a percentage of the video. vttregion.scroll an enum representing how adding new cues will move existing cues. ...
...on(); region.width = 50; // use 50% of the video width region.lines = 4; // use 4 lines of height. region.viewportanchorx = 25; // have the region start at 25% from the left. ...
WEBGL_color_buffer_float - Web APIs
the webgl_color_buffer_float extension is part of the webgl api and adds the ability to render to 32-bit floating-point color buffers. webgl extensions are available using the webglrenderingcon
text.ge
textension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is available to webgl 1 con
texts only. for webgl 2, use the ext_color_buffer_float extension. the oes_
texture_float extension implicitly enables this extension. constants ext.rgba32f_ext rgba 32-bit floating-point color-renderable format. ...
...ext_color_buffer_float extension. the oes_
texture_float extension implicitly enables this extension. constants ext.rgba32f_ext rgba 32-bit floating-point color-renderable format. ext.rgb32f_ext ( ) rgb 32-bit floating-point color-renderable format. ext.framebuffer_attachment_component_type_ext ? ext.unsigned_normalized_ext ? ...
...32-bit floating-point color-renderable format. ext.rgb32f_ext ( ) rgb 32-bit floating-point color-renderable format. ext.framebuffer_attachment_component_type_ext ? ext.unsigned_normalized_ext ? extended methods this extension extends webglrenderingcon
text.renderbufferstorage(): the internalformat parameter now accepts ext.rgba32f_ext and ext.rgb32f_ext ( ). examples var ext = gl.ge
textension('webgl_color_buffer_float'); gl.renderbufferstorage(gl.renderbuffer, ext.rbga32f_ext, 256, 256); specifications specification status comment webgl_color_buffer_floatthe definition of 'webgl_color_buffer_float' in that specification. recommendation initial definition. ...
WEBGL_debug_shaders.getTranslatedShaderSource() - Web APIs
the webgl_debug_shaders.gettranslatedshadersource() method is part of the webgl api and allows you to debug a translated shader. syntax gl.ge
textension('webgl_debug_shaders').gettranslatedshadersource(shader); parameters shader a webglshader to get the translated source from. return value a string containing the translated shader source. an empty string is returned, if: no source has been defined or, webglrenderingcon
text.compileshader() has not yet been called or, the translation for the shader failed. ...
...der); parameters shader a webglshader to get the translated source from. return value a string containing the translated shader source. an empty string is returned, if: no source has been defined or, webglrenderingcon
text.compileshader() has not yet been called or, the translation for the shader failed. ...
...ed or, webglrenderingcon
text.compileshader() has not yet been called or, the translation for the shader failed. examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcon
text('webgl'); var shader = gl.createshader(gl.fragment_shader); gl.shadersource(shader, 'void main() { gl_fragcolor = vec4(gl_fragcoord.x, 0.0, 0.0, 1.0); }'); gl.compileshader(shader); var src = gl.ge
textension('webgl_debug_shaders').gettranslatedshadersource(shader); console.log(src); // "void main(){ // (gl_fragcolor = vec4(gl_fragcoord.x, 0.0, 0.0, 1.0)); // }" specifications specification status comment webgl_debug_shadersthe definition of 'webgl_debug_shaders.gettranslatedshadersource' in that specification. recommendation initial definition. ...
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
function's bind. example: settimeout(function(arg1){}.bind(undefined, 10), 1000); the "this" problem when you pass a method to settimeout() (or any other function, for that matter), it will be invoked with a this value that may differ from your expectation. this issue is explained in detail in the javascript reference. explanation code executed by settimeout() is called from an execution con
text separate from the function from which settimeout was called. the usual rules for setting the this keyword for the called function apply, and if you have not set this in the call or with bind, it will default to the window (or global) object. it will not be the same as the this value for the function that called settimeout. see the following example: myarray = ['zero', 'one', 'two']; myarray.mym...
...g., every n milliseconds), consider using setinterval(). passing string literals passing a string instead of a function to settimeout() has the same associated problems as using eval. // recommended window.settimeout(function() { alert('hello world!'); }, 500); // not recommended window.settimeout("alert('hello world!');", 500); a string passed to settimeout is evaluated in the global con
text, so local symbols in the con
text where settimeout() was called will not be available when the string is evaluated as code. reasons for delays longer than specified there are a number of reasons why a timeout may take longer to fire than anticipated. this section describes the most common reasons. timeouts throttled to ≥ 4ms in modern browsers, settimeout()/setinterval() calls are throttled ...
...21, the 1000ms constant can be tweaked through the dom.min_background_timeout_value preference). chrome implements this behavior since version 11 (crbug.com/66078). firefox for android uses a timeout value of 15 minutes for background tabs since bug 736602 in firefox 14, and background tabs can also be unloaded entirely. firefox 50 no longer throttles background tabs if a web audio api audiocon
text is actively playing sound. firefox 51 further amends this such that background tabs are no longer throttled if an audiocon
text is present in the tab at all, even if no sound is being played. these resolve a number of issues with apps which play note-based music not being able to time or synchronize the music properly when the tab is in the background. throttling of tracking timeout scripts sin...
WritableStream.WritableStream() - Web APIs
sed to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
...((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer. ...
... highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.
textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.
textcontent = "[message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); sendmessage("hello, world.", writable...
WritableStream.getWriter() - Web APIs
sed to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
...((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer. ...
... highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.
textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.
textcontent = "[message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); sendmessage("hello, world.", writable...
WritableStream - Web APIs
sed to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
...((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer. ...
... highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.
textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.
textcontent = "[message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); sendmessage("hello, world.", writable...
WritableStreamDefaultWriter.WritableStreamDefaultWriter() - Web APIs
sed to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
...((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer. ...
... highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.
textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.
textcontent = "[message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); sendmessage("hello, world.", writable...
WritableStreamDefaultWriter.close() - Web APIs
sed to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
...((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer. ...
... highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.
textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.
textcontent = "[message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); sendmessage("hello, world.", writable...
WritableStreamDefaultWriter.write() - Web APIs
sed to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
...((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer. ...
... highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.
textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.
textcontent = "[message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); sendmessage("hello, world.", writable...
WritableStreamDefaultWriter - Web APIs
rite each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
... console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer. ...
...ark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.
textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.
textcontent = "[message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); sendmessage("hello, wo...
HTML in XMLHttpRequest - Web APIs
tprequest in general, see using xmlhttprequest. limitations to discourage the synchronous use of xmlhttprequest, html support is not available in the synchronous mode. also, html support is only available if the responsetype property has been set to "document". this limitation avoids wasting time parsing html uselessly when legacy code uses xmlhttprequest in the default mode to retrieve response
text for
text/html resources. also, this limitation avoids problems with legacy code that assumes that responsexml is null for http error pages (which often have a
text/html response body). usage retrieving an html resource as a dom using xmlhttprequest works just like retrieving an xml resource as a dom using xmlhttprequest, except you can't use the synchronous mode and you have to explicitly reque...
... the byte order mark is used. failing that, if there is a <meta> element that declares the encoding within the first 1024 bytes of the file, that encoding is used. otherwise, the file is decoded as utf-8. handling html on older browsers xmlhttprequest originally supported only xml parsing. html parsing support is a recent addition. ...
...g support is a recent addition. ...
XMLHttpRequest: abort event - Web APIs
ssevent event handler property onabort examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <
textarea readonly class="event-log"></
textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.x...
...m; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'); const log = document.queryselector('.event-log'); function handleevent(e) { log.
textcontent = log.
textcontent + `${e.type}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent)...
...e}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.
textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlist...
XMLHttpRequest: error event - Web APIs
ssevent event handler property onerror examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <
textarea readonly class="event-log"></
textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.x...
...m; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'); const log = document.queryselector('.event-log'); function handleevent(e) { log.
textcontent = log.
textcontent + `${e.type}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent)...
...e}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.
textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlist...
XMLHttpRequest: load event - Web APIs
essevent event handler property onload examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <
textarea readonly class="event-log"></
textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.x...
...m; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'); const log = document.queryselector('.event-log'); function handleevent(e) { log.
textcontent = log.
textcontent + `${e.type}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent)...
...e}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.
textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlist...
XMLHttpRequest: loadend event - Web APIs
event event handler property onloadend examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <
textarea readonly class="event-log"></
textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.x...
...m; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'); const log = document.queryselector('.event-log'); function handleevent(e) { log.
textcontent = log.
textcontent + `${e.type}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent)...
...e}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.
textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlist...
XMLHttpRequest: loadstart event - Web APIs
ent event handler property onloadstart examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <
textarea readonly class="event-log"></
textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.x...
...m; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'); const log = document.queryselector('.event-log'); function handleevent(e) { log.
textcontent = log.
textcontent + `${e.type}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent)...
...e}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.
textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlist...
XMLHttpRequest.overrideMimeType() - Web APIs
the xmlhttprequest method overridemimetype() specifies a mime type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. this may be used, for example, to force a stream to be treated and parsed as "
text/xml", even if the server does not report it as such. this method must be called before calling send(). syntax xmlhttprequest.overridemimetype(mimetype) parameters mimetype a domstring specifying the mime type to use instead of the one specified by the server. if the server doesn't specify a type, xmlhttprequest assumes "
text/xml". return value undefined. example this example specifies a mime type of "
text/plain", overriding the server's stated type for the data being received. note: if the server doesn't...
... the mime type to use instead of the one specified by the server. if the server doesn't specify a type, xmlhttprequest assumes "
text/xml". return value undefined. example this example specifies a mime type of "
text/plain", overriding the server's stated type for the data being received. note: if the server doesn't provide a content-type header, xmlhttprequest assumes that the mime type is "
text/xml". if the content isn't valid xml, an "xml parsing error: not well-formed" error occurs. you can avoid this by calling overridemimetype() to specify a different type. ...
...xt/plain", overriding the server's stated type for the data being received. note: if the server doesn't provide a content-type header, xmlhttprequest assumes that the mime type is "
text/xml". if the content isn't valid xml, an "xml parsing error: not well-formed" error occurs. you can avoid this by calling overridemimetype() to specify a different type. // interpret the received data as plain
text req = new xmlhttprequest(); req.overridemimetype("
text/plain"); req.addeventlistener("load", callback, false); req.open("get", url); req.send(); specifications specification status comment xmlhttprequestthe definition of 'overridemimetype()' in that specification. living standard whatwg living standard ...
XMLHttpRequest: progress event - Web APIs
vent event handler property onprogress examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <
textarea readonly class="event-log"></
textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.x...
...m; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'); const log = document.queryselector('.event-log'); function handleevent(e) { log.
textcontent = log.
textcontent + `${e.type}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent)...
...e}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.
textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlist...
XMLHttpRequest.response - Web APIs
ponse; value an appropriate object based on the value of responsetype. you may attempt to request the data be provided in a specific format by setting the value of responsetype after calling open() to initialize the request but before calling send() to send the request to the server. the value is null if the request is not yet complete or was unsuccessful, with the exception that when reading
text data using a responsetype of "
text" or the empty string (""), the response can contain the response so far while the request is still in the loading readystate (3). the response types are described below. "" an empty responsetype string is treated the same as "
text", the default type. arraybuffer the response is a javascript arraybuffer containing binary data. blob the response is a blob...
...ffer containing binary data. blob the response is a blob object containing the binary data. document the response is an html document or xml xmldocument, as appropriate based on the mime type of the received data. see html in xmlhttprequest to learn more about using xhr to fetch html content. json the response is a javascript object created by parsing the contents of received data as json.
text the response is a
text in a domstring object. ms-stream the response is part of a streaming download; this response type is only allowed for download requests, and is only supported by internet explorer. example this example presents a function, load(), which loads and processes a page from the server. it works by creating an xmlhttprequest object and creating a listener for readystate...
...pported by internet explorer. example this example presents a function, load(), which loads and processes a page from the server. it works by creating an xmlhttprequest object and creating a listener for readystatechange events such that that when readystate changes to done (4), the response is obtained and passed into the callback function provided to load(). the content is handled as raw
text data (since nothing here is overriding the default responsetype). var url = 'somepage.html'; //a local page function load(url, callback) { var xhr = new xmlhttprequest(); xhr.onreadystatechange = function() { if (xhr.readystate === 4) { callback(xhr.response); } } xhr.open('get', url, true); xhr.send(''); } specifications specification status comment...
XMLHttpRequest.responseType - Web APIs
syntax var type = xmlhttprequest.responsetype; xmlhttprequest.responsetype = type; value a string taken from the xmlhttprequestresponsetype enum which specifies what type of data the response contains. ...
...ins. when setting responsetype to a particular value, the author should make sure that the server is actually sending a response compatible with that format. if the server returns data that is not compatible with the responsetype that was set, the value of response will be null. the values supported by responsetype are the following: "" an empty responsetype string is treated the same as "
text", the default type. arraybuffer the response is a javascript arraybuffer containing binary data. blob the response is a blob object containing the binary data. document the response is an html document or xml xmldocument, as appropriate based on the mime type of the received data. see html in xmlhttprequest to learn more about using xhr to fetch html content. json the response is a javasc...
...ffer containing binary data. blob the response is a blob object containing the binary data. document the response is an html document or xml xmldocument, as appropriate based on the mime type of the received data. see html in xmlhttprequest to learn more about using xhr to fetch html content. json the response is a javascript object created by parsing the contents of received data as json.
text the response is a
text in a domstring object. ms-stream the response is part of a streaming download; this response type is only allowed for download requests, and is only supported by internet explorer. exceptions invalidaccesserror an attempt was made to change the value of responsetype on anxmlhttprequest which is in synchronous mode but not in a worker. for additional details, see ...
XPathResult.singleNodeValue - Web APIs
e the return value is the node value of the xpathresult returned by document.evaluate(). exceptions type_err in case xpathresult.resulttype is not any_unordered_node_type or first_ordered_node_type, an xpathexception of type type_err is thrown. example the following example shows the use of the singlenodevalue property. ...
...e(). exceptions type_err in case xpathresult.resulttype is not any_unordered_node_type or first_ordered_node_type, an xpathexception of type type_err is thrown. example the following example shows the use of the singlenodevalue property. ...
...hrown. example the following example shows the use of the singlenodevalue property. html <div>xpath example</div> <div>tag name of the element having the
text content 'xpath example': <output></output></div> javascript var xpath = "//*[
text()='xpath example']"; var result = document.evaluate(xpath, document, null, xpathresult.first_ordered_node_type, null); document.queryselector("output").
textcontent = result.singlenodevalue.localname; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.singlenodevalue' in that specification. recommendation initial definition ...
Generating HTML - Web APIs
output in the xsl stylesheet will make sure the resulting document will be handled as html. for the xml elements, our own namespace is needed, http://devedge.netscape.com/2002/de, and it is given the prefix myns (xmlns:myns="http://devedge.netscape.com/2002/de"). figure 2 xml file :(example2.xml)view example | view source xml document (example2.xml): <?xml version="1.0"?> <?xml-stylesheet type="
text/xsl" href="example2.xsl"?> <myns:article xmlns:myns="http://devedge.netscape.com/2002/de"> <myns:title>my article</myns:title> <myns:authors> <myns:author company="foopy corp.">mr. foo</myns:author> <myns:author>mr. bar</myns:author> </myns:authors> <myns:body> the <b>rain</b> in <u>spain</u> stays mainly in the plains. </myns:body> </myns:article> the ...
..... </xsl:stylesheet version="1.0"> a template matching the root node of the xml document is created and used to create the basic structure of the html page. figure 4 : creating the basic html document xsl stylesheet (example2.xsl): ... ...
...<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:myns="http://devedge.netscape.com/2002/de"> <xsl:output method="html" /> <xsl:template match="/"> <html> <head> <title> <xsl:value-of select="/myns:article/myns:title"/> </title> <style type="
text/css"> .mybox {margin:10px 155px 0 50px; border: 1px dotted #639ace; padding:0 5px 0 5px;} </style> </head> <body> <p class="mybox"> <span class="title"> <xsl:value-of select="/myns:article/myns:title"/> </span> <br /> authors: <br /> <xsl:apply-templates select="/myns:article/myns:...
ARIA Screen Reader Implementors Guide - Accessibility
are hints: in general live region markup is provided by the author as hints, and the assistive technology may allow for global, site or even region-specific settings, as well as heuristics to help with live changes on pages that have no wai-aria hints. optionally, create a second, additional queue if the user configures a second hardware channel: if there are two channels for presentation (e.g.
text to speech and a braille display), then two queues can be maintained to allow for parallel presentation. the channels could be user configured for presenting live regions based on role or politeness. busy regions: any changes in a region marked with aria-busy="true" should not be added to the queue until that attribute is cleared. politeness (aria-live or from role) takes first precedence,: item...
...t a tiny timeout before presenting atomic region changes, in order to avoid presenting the region twice for two changes that occur quickly one after the other. include labels when presenting changes: if the change occurs in something with a semantic label of some kind, speak the label. this is particularly important for changes in data cells, where the column and row headers provide important con
textual information. ideas for settings and heuristics allow for a different voice (in
text-to-speech) or other varying presentational characteristics to set live changes apart. when no wai-aria markup is present, automatically present some changes unless the user configures all live changes to off. for example, automatically speak changes that are caused by the user's own input, as part of the co...
... allow global settings to turn off the presentation of live changes, present all live changes, use markup, or be "smart" (use heuristics) details for processing via platform accessibility apis we hope browser manufacturers will work to provide consistent implementations. ...
Using the aria-labelledby attribute - Accessibility
list multiple element ids in a space delimited fashion. this idea is similar to how the "for" attribute is used to link a label to an input. assistive technology, such as screen readers, use this attribute to catalog the objects in a document so that users can navigate between them. without an element id, the assistive technology cannot catalog the object. ...
...ment so that users can navigate between them. without an element id, the assistive technology cannot catalog the object. aria-labelledby is very similar to aria-describedby: a label provides essential information about an object, while a description provides extended information that the user might need. in addition to form elements, you can use the aria-labelledby attribute to associate static
text with widgets, groups of elements, panes, regions that have a heading, definitions, and other types of objects. the examples section below provides more information on how to use the attribute this way. to improve compatibility with user agents that do not support aria, you can use aria-labelledby with the <label> element (using the for attribute). this attribute can be used with any typical htm...
...ame property of elements that have both an aria-labelledby attribute and an aria-label attribute, the user agents give precedence to aria-labelledby. examples example 1: multiple labels in the example below, each input field is labelled by both its own individual label and by the label for the group: <div id="mybillingid">billing</div> <div> <div id="mynameid">name</div> <input type="
text" aria-labelledby="mybillingid mynameid"/> </div> <div> <div id="myaddressid">address</div> <input type="
text" aria-labelledby="mybillingid myaddressid"/> </div> example 2: associating headings with regions in the example below, header elements are associated with the content they head. note that the region being referenced is the region that contains the header. <div role="main" aria-...
Using the aria-valuenow attribute - Accessibility
current value for a range widget such as a slider, spinbutton or progressbar. if the current value is not known, the author should not set the aria-valuenow attribute. if the aria-valuenow has a known minimum and maximum value, authors should set the aria-valuemin and aria-valuemax attributes. ...
... aria-valuenow is a required attribute of role slider, scrollbar and spinbutton. ...
...ative. examples example 1: the snippet below shows a simple slider with a current value of 4. ...
Using ARIA: Roles, states, and properties - Accessibility
mantics (via use of an appropriate html element). addition of aria semantics only exposes extra information to a browser's accessibility api, and does not affect a page's dom. roles widget roles button checkbox gridcell link menuitem menuitemcheckbox menuitemradio option progressbar radio scrollbar searchbox separator (when focusable) slider spinbutton switch tab tabpanel
textbox treeitem composite roles the techniques below describe each composite role as well as their required and optional child roles. combobox grid (including row, gridcell, rowheader, columnheader roles) listbox (including option role) menu menubar radiogroup (see radio role) tablist (including tab and tabpanel roles) tree treegrid document structure roles application articl...
...r, columnheader roles) listbox (including option role) menu menubar radiogroup (see radio role) tablist (including tab and tabpanel roles) tree treegrid document structure roles application article cell columnheader definition directory document feed figure group heading img list listitem math none note presentation row rowgroup rowheader separator table term
textbox toolbar tooltip landmark roles banner complementary contentinfo form main navigation region search live region roles alert log marquee status timer window roles alertdialog dialog states and properties widget attributes aria-autocomplete aria-checked aria-current aria-disabled aria-errormessage aria-expanded aria-haspopup aria-hidden aria-inva...
...ies widget attributes aria-autocomplete aria-checked aria-current aria-disabled aria-errormessage aria-expanded aria-haspopup aria-hidden aria-invalid aria-label aria-level aria-modal aria-multiline aria-multiselectable aria-orientation aria-placeholder aria-pressed aria-readonly aria-required aria-selected aria-sort aria-valuemax aria-valuemin aria-valuenow aria-value
text live region attributes aria-live aria-relevant aria-atomic aria-busy drag & drop attributes aria-dropeffect aria-dragged relationship attributes aria-activedescendant aria-colcount aria-colindex aria-colspan aria-controls aria-describedby aria-details aria-errormessage aria-flowto aria-labelledby aria-owns aria-posinset aria-rowcount aria-rowindex aria-rowsp...
ARIA: timer role - Accessibility
sting the amount of elapsed time from a starting point or the remaining time until an end point. <div role="timer" id="eggtimer">0</div> this defines this div element as a timer with no remaining time. description the timer role indicates to assistive technologies that this part of the web content is a live region containing a timer listing the time remaining or elapsed time. a timer's inner
text should be an updating current time measurement. while the value does not necessarily need to be machine parsable, it should continuously update at regular intervals unless the timer is paused or reaches its end-point. associated wai-aria roles, states, and properties aria-label used to provide the name of the timer. aria-live elements with the role timer have an implicit aria-live value of...
...t. associated wai-aria roles, states, and properties aria-label used to provide the name of the timer. aria-live elements with the role timer have an implicit aria-live value of off. aria-describedby used to indicate the idref of an element that contains additional instructions for navigating or operating this element. aria-roledescription used to give the timer a more descriptive role
text for screen readers to speak. this should be localized. keyboard interactions keyboard interaction is xxx. focus is being managed via xxx. the tab , space and enter keys, as well as escape , must be handled by the application. the one exception is if focus xxx. required javascript features keypress used to handle keyboard input and control the focus click, touch handle as appropriate fo...
...lock is updated each minute, with the new remaining time simply overwriting the current content. <div id="clock" role="timer" aria-live="off">20</div> <button onclick="starttimer('clock')">start</button> /* basic javascript to update a timer */ function starttimer(timername) { // get the number of seconds let timer = document.getelementbyid(timername), seconds = parseint(timer.inner
text); // remove a second // updated the content of timer timer.inner
text = --seconds // if timer != 0, settimeout if (seconds) { settimeout( function() { starttimer(timername); }, 1000); } } the first time the function executes, the entirety of the string that is added will be announced. on subsequent calls, only the parts of the content that changed compared to the prev...
ARIA: form role - Accessibility
sible to all users, not just assistive technology users. use the search landmark instead of the form landmark when the form is used for search functionality. use the role="form" to identify a region of the page; do not use it to identify every form field. even if you are using the form landmark instead of <form>, you are encouraged to use native html form controls like button, input, select, and
textarea associated wai-aria roles, states, and properties no role specific states or properties. keyboard interactions no role specific keyboard interactions required javascript features onsubmit the onsubmit event handler handles the event raised when the form is submitted. anything that is not a <form> cannot be submitted, therefore you would have to use javascript to build an alternative ...
...form is submitted. anything that is not a <form> cannot be submitted, therefore you would have to use javascript to build an alternative data submission mechanism, for example with xmlhttprequest. examples <div role="form" id="send-comment" aria-label="add a comment"> <label for="username">username</label> <input id="username" name="username" autocomplete="nickname" autocorrect="off" type="
text"> <label for="email">email</label> <input id="email" name="email" autocomplete="email" autocapitalize="off" autocorrect="off" spellcheck="false" type="
text"> <label for="comment">comment</label> <
textarea id="comment" name="comment"></
textarea> <input value="comment" type="submit"> </div> it is recommended to use <form> instead. <form id="send-comment" aria-label="add a comment"> ...
...omment" aria-label="add a comment"> .... </form> accessibility concerns use sparingly landmark roles are intended to identify larger overall sections of the document. using too many landmark roles can create "noise" in screen readers, making it difficult to understand the overall layout of the page. inputs are not forms you do not need to declare role="form" on every form element (inputs,
text areas, selects, etc.). it should be declared on the html element that wraps the form elements. ideally, use the <form> element as the wrapping element and do not declare role="form". search if a form is used to search, you should use the more specialized role="search" value. labeling landmarks each <form> element and form role that needs to be exposed as a landmark must be given an accessible...
ARIA: Mark role - Accessibility
the mark landmark role semantically denotes html elements containing
text that is marked/highlighted for reference purposes. this is semantically equivalent to the html <mark> element. if possible, you should use this element instead. examples in the following example we have a document section that has been commented. the commented section is marked up using <span role="mark">. ...
... example we have a document section that has been commented. the commented section is marked up using <span role="mark">. ...
...ing away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-
text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> the related comment is marked up using an html structure wrapped with a <div> containing role="comment". to associate the comment with the
text being commented, we need to wrap the commented
text with an element containing the aria-details attribute, the value of which should be the id of the comment. accessibility concerns landmark roles are intended to be used sparingly, to identify larger overall sections of the document. using too many landmark roles can create "noise" in screen readers, making it difficult to understand the overal...
Web applications and ARIA FAQ - Accessibility
sion for basic aria minimum version for live region and alert support nvda 2010.2 (nvda is always a free upgrade) 2011.1 for firefox, no live region support in ie as of 2011.2. orca ? (tbd) ? (tbd) voiceover osx 10.5, ios 4 os x 10.7 ios 5 jaws 8 10 window-eyes 7 no live region support currently zoom
text ? no live region support currently note: early versions of these tools often had partial or buggy aria implementations. for notes on jaws support for aria as of jaws 10, see this article from the paciello group: jaws support for aria. javascript toolkits aria roles, states, and properties have been added to a number of popular javascript user interface toolkits, including: dojo...
...progress(percentcomplete) { if (!supportshtml5progress) { // html5 <progress> isn't supported by this browser, // so we need to update the aria-valuenow attribute progressbar.setattribute("aria-valuenow", percentcomplete); } else { // html5 <progress> is supported, so update the value attribute instead. progressbar.setattribute("value", percentcomplete); } progressbar.
textcontent = percentcomplete + "% complete"; } function initdemo() { setupprogress(); // setup the progress bar. // bind a click handler to the button, which will update the progress bar to 75%. document.getelementbyid("update-button").addeventlistener("click", function (e) { updateprogress(75); e.preventdefault(); }, false); } initdemo(); how do assistive technologies work? assi...
...deventlistener("click", function (e) { updateprogress(75); e.preventdefault(); }, false); } initdemo(); how do assistive technologies work? assistive technologies use an api built into each operating system specifically designed to describe the roles, states, and structure of an application's user interface. for example, a screen reader uses this api to read the user interface with a
text-to-speech engine, a magnifier uses it to highlight important or active areas of the screen, and an onscreen keyboard might use it to provide the most efficient keyboard layout for a given con
text or ui control. assitive technologies often access a page's dom as well through this api in order to understand the semantics and attributes of the page. aria provides a bridge between the world of the d...
Basic form hints - Accessibility
terisks next to the labels), indicating that the name and email fields are required. the second part of the example, a snippet of javascript validates the email format, and sets the aria-invalid attribute of the email field (line 12 of the html) according to the result (in addition to changing the presentation of the element). ...
...et of javascript validates the email format, and sets the aria-invalid attribute of the email field (line 12 of the html) according to the result (in addition to changing the presentation of the element). ...
...g to the result (in addition to changing the presentation of the element). ...
Accessibility and Spacial Patterns - Accessibility
d images that precipitate seizures and optimizing guidelines to prevent them the steps necessary to evaluate material reduce to the following: look at the screen are there more than five stripes? if so, do they last longer than 0.5 s? if so, does the brightness exceed the stated limit? if so, categorize the motion of the pattern are the guidelines contravened? if so, reduce brightness.
text and padding wcag standards for contrast perception do not take into account the effect of padding. for example, blue
text on a gray background is easier to perceive if it is surrounded "locally" by black than by white. there is such a thing as "local" adaptation to colors. the bottom line: padding matters. math spatial reasoning affects math learning; consequently, spatial relationships in...
...e another so as to be readable in a "human" way. the human touch does distinguish with ease braille dots that are too close or too far apart from one another. space has to surround the braille character. a user of braille does not simply lay a finger on "top" of a braille character, the user has to move her finger over the character, in the way that a sighted person must move her eyes across
text written on a page. the nature of space can change depending upon what mime type is being used, and its version. for example, borders on svg can extend both inward and outward from its dimensions, or for newer versions of svg, entirely outward from it, thus reducing the space around the svg to enable perception. see also mdn accessibiltity: what users can do to browse more safely web ac...
... ...
Accessibility Information for Web Authors - Accessibility
it more accessible. automated checking & repair cynthia says™ from hisoftware® company "cynthia says™" is a free online webpage accessibility validation service that is designed to identify errors in webpage related to section 508 standards and/or the wcag guidelines. it can perform a "complete webpage quality check" for accessibility, privacy, searchability, metadata and even alt
text attribute quality. the web author chooses the guidelines (as a basis for errors and warnings) to be used by "cynthia says™": section 508, wcag priorities 1, 2 and 3. the output data report is displayed in a clear and well structured table where each and all checkpoints are identified and described (along with an helpful clickable link to the related reference guideline) into logical groups and ...
... wcag guidelines. its purpose is to aid humans in the web accessibility evaluation process. rather than providing a complex technical report, wave 4.0 shows the original web page with embedded icons and indicators that reveal the accessibility information within your page. you can get accessibity report for errors, warnings. you can view the structure and order view of the document. you can see a
text-only view and and outline view of the document. you can install a custom wave toolbar in firefox for a quick, easy and convenient evaluation of web pages directly within firefox. you can also add a wave bookmarklet in firefox or even wave direct links for checking a webpage. html advanced validator (firefox extension) by marc gueury this html validator (based on w3c tidy and on opensp for...
...ntrast is the perceived difference between two adjacent colors. (...) contrast is extremely important in web design." wheel of color: pump up the contrast, robert hess, msdn "for this year's list of worst design mistakes, (...) i asked readers of my newsletter to nominate the usability problems they found the most irritating. (...) about one-third complained about low contrast between
text and background." top ten web design mistakes of 2005: 1. legibility problems how can a web author establish easily and quickly if the background color and foreground (
text) color in use in his webpages have sufficient color contrast difference and sufficient color brightness difference? color contrast analyzer is an excellent tool for such task. effective color contrast and effective col...
Web accessibility for seizures and physical reactions - Accessibility
th cognitive difficulties, who cannot find the right "button" to change their screen settings. prefers-contrast from w3c's draft document, media queries level 5 section on prefers-contrast: "the prefers-contrast media feature is used to detect if the user has requested the system increase or decrease the amount of contrast between adjacent colors. for example, many users have difficulty reading
text that has a small difference in contrast to the
text background and would prefer a larger contrast." sometimes there can be such a thing as too much contrast; a halo effect around
text can occur in such situations and actually reduce legibility. putting the amount of contrast in the user's control is a definite gift for accessibility. prefers-reduced-transparency the prefers-reduced-transparency...
...tem minimize the amount of transparent or translucent layer effects it uses. mediaquerylist interface section 4.2 from the csswg.org drafts integrates with the event loop defined in html. [html] for the mediaquerylist object. see the mdn document, mediaquerylist for more information. personalization help and support the requirement for the literal property is taken from section 23 non-literal
text and images requirement: some users cannot understand non-literal
text and icons such as metaphors, idioms etc. the literal property is intended to identify
text or images as non-literal and allows the author to explain non-literal
text and images to users. transitions (for css and svg) the following is from the web animations model csswg.org drafts the web animations model is intended to prov...
... web animations model is intended to provide the features necessary for expressing css transitions [css-transitions-1], css animations [css-animations-1], and svg [svg11]. see also mdn accessibility: what users can to to browse more safely accessibility: understanding color and luminance applying svg effects to html content basic animations (canvas tutorial) canvas api canvasrenderingcon
text2d.drawimage() <color> document object model mediaquerylist using dynamic styling information webgl: 2d and 3d graphics for the web color color tutorial: describing color tom jewett. formula to determine brightness of rgb color stack exchange discussion thread how the color red influences our behavior scientific american by susana martinez-conde, stephen l. macknik on november 1, 2014 ...
Custom properties (--*): CSS variables - CSS: Cascading Style Sheets
s, so long as the sequence does not contain an unallowed token. it represents the entirety of what a valid declaration can have as its value. note: custom property names are case sensitive — --my-color will be treated as a separate custom property to --my-color. ...
... of what a valid declaration can have as its value. note: custom property names are case sensitive — --my-color will be treated as a separate custom property to --my-color. ...
...lor will be treated as a separate custom property to --my-color. ...
-moz-user-input - CSS: Cascading Style Sheets
in mozilla applications, -moz-user-input determines if an element will accept user input. /* keyword values */ -moz-user-input: none; -moz-user-input: enabled; -moz-user-input: disabled; /* global values */ -moz-user-input: inherit; -moz-user-input: initial; -moz-user-input: unset; for elements that normally take user input, such as a <
textarea>, the initial value of -moz-user-input is enabled. note: -moz-user-input was one of the proposals leading to the proposed css 3 user-input property, which has not yet reached candidate recommendation (call for implementations). a similar property, user-focus, was proposed in early drafts of a predecessor of the css3 ui specification, but was rejected by the working group. syntax values none the element does not respond to user input, an...
...ss 3 user-input property, which has not yet reached candidate recommendation (call for implementations). a similar property, user-focus, was proposed in early drafts of a predecessor of the css3 ui specification, but was rejected by the working group. syntax values none the element does not respond to user input, and it does not become :active. enabled the element accepts user input. for
textboxes, this is the default behavior. please note that this value is no longer supported in firefox 60 onwards (bug 1405087). disabled the element does not accept user input. however, this is not the same as setting disabled to true, in that the element is drawn normally. please note that this value is no longer supported in firefox 60 onwards (bug 1405087). formal definition initial valueauto...
... that the element is drawn normally. please note that this value is no longer supported in firefox 60 onwards (bug 1405087). formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | none | enabled | disabled examples disabling user input for an element input.example { /* the user will be able to select the
text, but not change it. */ -moz-user-input: disabled; } specifications not part of any standard. ...
::first-letter (:first-letter) - CSS: Cascading Style Sheets
f), and other punctuation (po) classes. some languages have digraphs that are always capitalized together, like the ij in dutch. in these cases, both letters of the digraph should be matched by the ::first-letter pseudo-element. (this is poorly supported by browsers; see the browser compatibility table below.) a combination of the ::before pseudo-element and the content property may inject some
text at the beginning of the element. in that case, ::first-letter will match the first letter of this generated content. css3 introduced the ::first-letter notation (with two colons) to distinguish pseudo-classes from pseudo-elements. browsers also accept :first-letter, introduced in css2. allowable properties only a small subset of css properties can be used with the ::first-letter pseudo-elem...
...e, background-attachment, and background-blend-mode all margin properties: margin, margin-top, margin-right, margin-bottom, margin-left all padding properties: padding, padding-top, padding-right, padding-bottom, padding-left all border properties: the shorthands border, border-style, border-color, border-width, border-radius, border-image, and the longhands properties the color property the
text-decoration,
text-shadow,
text-transform, letter-spacing, word-spacing (when appropriate), line-height,
text-decoration-color,
text-decoration-line,
text-decoration-style, box-shadow, float, vertical-align (only if float is none) css properties syntax /* css3 syntax */ ::first-letter /* css2 syntax */ :first-letter examples simple drop cap in this example we will use the ::first-letter pseu...
...头。</p> <p>《特殊的汉字标点符号开头。</p> <p>“特殊的汉字标点符号开头。</p> css p::first-letter { color: red; font-size: 150%; } result specifications specification status comment css pseudo-elements level 4the definition of '::first-letter' in that specification. working draft generalizes allowed properties to typesetting,
text decoration, inline layout properties, opacity, and box-shadow. css
text decoration module level 3the definition of '
text-shadow with ::first-letter' in that specification. candidate recommendation allows the use of
text-shadow with ::first-letter. selectors level 3the definition of '::first-letter' in that specification. recommendation introduction of the two-colon s...
:defined - CSS: Cascading Style Sheets
block; } syntax :defined examples hiding elements until they are defined the following snippets are taken from our defined-pseudo-class demo (see it live also). ...
...ples hiding elements until they are defined the following snippets are taken from our defined-pseudo-class demo (see it live also). ...
...melements.define('simple-custom', class extends htmlelement { constructor() { super(); let divelem = document.createelement('div'); divelem.
textcontent = this.getattribute('
text'); let shadowroot = this.attachshadow({mode: 'open'}) .appendchild(divelem); } }) then insert a copy of this element into the document, along with a standard <p>: <simple-custom
text="custom element example
text"></simple-custom> <p>standard paragraph example
text</p> in the css we first include the following rules: // give the two elements distinctive backgrounds p { background: yellow; } simple-custom { background: cyan; } // both the custom and the built-in element are given italic
text :defined { font-style: italic; } then provide the following two rules to hi...
:empty - CSS: Cascading Style Sheets
comments, processing instructions, and css content do not affect whether an element is considered empty. note: in selectors level 4 the :empty pseudo-class was changed to act like :-moz-only-whitespace, but no browser currently supports this yet. /* selects any <div> that contains no content */ div:empty { background: lime; } syntax :empty examples html <div class="box"><!-- i will be lime. ...
...mment. --></p> </div> css body { display: flex; justify-content: space-around; } .box { background: pink; height: 80px; width: 80px; } .box:empty { background: lime; } result accessibility concerns assistive technology such as screen readers cannot parse interactive content that is empty. ...
...chnology such as screen readers cannot parse interactive content that is empty. all interactive content must have an accessible name, which is created by providing a
text value for the interactive control's parent element (anchors, buttons, etc.). accessible names expose the interactive control to the accessibility tree, an api that communicates information useful for assistive technologies. the
text that provides the interactive control's accessible name can be hidden using a combination of properties that remove it visually from the screen but keep it parseable by assistive technology. this is commonly used for buttons that rely solely on an icon to convey purpose. what is an accessible name? | the paciello group hidden content for better a11y | go make things mdn understanding wcag, g...
:enabled - CSS: Cascading Style Sheets
the :enabled css pseudo-class represents any enabled element. an element is enabled if it can be activated (selected, clicked on, typed into, etc.) or accept focus. the element also has a disabled state, in which it can't be activated or accept focus. ...
...r accept focus. /* selects any enabled <input> */ input:enabled { color: blue; } syntax :enabled examples the following example makes the color of
text and button <input>s green when enabled, and gray when disabled. this helps the user understand which elements can be interacted with. ...
...following example makes the color of
text and button <input>s green when enabled, and gray when disabled. this helps the user understand which elements can be interacted with. html <form action="url_of_form"> <label for="firstfield">first field (enabled):</label> <input type="
text" id="firstfield" value="lorem"><br> <label for="secondfield">second field (disabled):</label> <input type="
text" id="secondfield" value="ipsum" disabled="disabled"><br> <input type="button" value="submit"> </form> css input:enabled { color: #2b2; } input:disabled { color: #aaa; } result specifications specification status comment html living standardthe definition of ':enabled' in that specification. living standard no change. html5the definition o...
:focus-within - CSS: Cascading Style Sheets
includes descendants in shadow trees.) /* selects a <div> when one of its descendants is focused */ div:focus-within { background: cyan; } this selector is useful, to take a common example, for highlighting an entire <form> container when the user focuses on one of its <input> fields. ...
...ctor is useful, to take a common example, for highlighting an entire <form> container when the user focuses on one of its <input> fields. syntax :focus-within examples in this example, the form will receive special coloring styles when either
text input receives focus. ...
... user focuses on one of its <input> fields. syntax :focus-within examples in this example, the form will receive special coloring styles when either
text input receives focus. html <p>try typing into this form.</p> <form> <label for="given_name">given name:</label> <input id="given_name" type="
text"> <br> <label for="family_name">family name:</label> <input id="family_name" type="
text"> </form> css form { border: 1px solid; color: gray; padding: 4px; } form:focus-within { background: #ff8; color: black; } input { margin: 4px; } result specifications specification status comment selectors level 4the definition of ':focus-within' in that specification. working draft initial definition. ...
:valid - CSS: Cascading Style Sheets
lue; } this pseudo-class is useful for highlighting correct fields for the user. ...
...rent generated content depending on whether the form's data is valid or invalid — a green check or a red cross, respectively. to add a bit of extra urgency to the invalid data, we've also given the inputs a thick red border when invalid. note: we've used ::before to add these labels, as we were already using ::after for the "required" labels. you can try it below: notice how the required
text inputs are invalid when empty, but valid when they have something filled in. the email input on the other hand is valid when empty, as it is not required, but invalid when it contains something that is not a proper email address. accessibility concerns the color green is commonly used to indicate valid input. people who have certain types of color blindness will be unable to determine the input...
..., as it is not required, but invalid when it contains something that is not a proper email address. accessibility concerns the color green is commonly used to indicate valid input. people who have certain types of color blindness will be unable to determine the input's state unless it is accompanied by an additional indicator that does not rely on color to convey meaning. typically, descriptive
text and/or an icon are used. mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.1 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of ':valid' in that specification. living standard no change. html5the definition of ':valid' in that specification. recomme...
aspect-ratio - CSS: Cascading Style Sheets
/1) { div { background: #f9a; /* red */ } } _example used iframe and dataurl to enable this iframe could resize html <label id="wf" for="w">width:165</label> <input id="w" name="w" type="range" min="100" max="250" step="5" value="165"> <label id="hf" for="w">height:165</label> <input id="h" name="h" type="range" min="100" max="250" step="5" value="165"> <iframe id="outer" src="data:
text/html,<style> @media (min-aspect-ratio: 8/5) { div { background: %239af; } } @media (max-aspect-ratio: 3/2) { div { background: %239ff; } } @media (aspect-ratio: 1/1) { div { background: %23f9a; } }</style><div id='inner'> watch this element as you resize your viewport's width and height.</div>"> </iframe> css iframe{ display:block; } javascript outer.style.width=outer.style.height="165px"...
... candidate recommendation no change. media queriesthe definition of 'aspect-ratio' in that ...
... candidate recommendation no change. media queriesthe definition of 'aspect-ratio' in that specification. recommendation initial definition. ...
@supports - CSS: Cascading Style Sheets
:is()) /* this rule won't be applied in browsers which don't support :is() */ :is(ul, ol) > li { ...
......
...:is()) /* this rule won't be applied in browsers which don't support :is() */ :is(ul, ol) > li { … /* css applied when the :is(…) selector is supported */ } @supports not selector(:is(a, b)) { /* fallb...
Using CSS animations - CSS: Cascading Style Sheets
s not specified, the browser starts or finishes the animation using the computed values of all attributes. you can optionally include additional keyframes that describe intermediate steps between the start and end of the animation. examples note: some older browsers (pre-2017) may need prefixes; the live examples you can click to see in your browser include the -webkit prefixed syntax. making
text slide across the browser window this simple example styles the <p> element so that the
text slides in from off the right edge of the browser window. note that animations like this can cause the page to become wider than the browser window. to avoid this problem put the element to be animated in a container, and set overflow:hidden on the container. p { animation-duration: 3s; animation-nam...
...n get additional control over animations — as well as useful information about them — by making use of animation events. these events, represented by the animationevent object, can be used to detect when animations start, finish, and begin a new iteration. each event includes the time at which it occurred as well as the name of the animation that triggered the event. we'll modify the sliding
text example to output some information about each animation event when it occurs, so we can get a look at how they work. adding the css we start with creating the css for the animation. this animation will last for 3 seconds, be called “slidein”, repeat 3 times, and alternate direction each time. in the @keyframes, the width and margin-left are manipulated to make the element slide across the s...
...the animationend event is sent. the html just for the sake of completeness, here’s the html that displays the page content, including the list into which the script inserts information about the received events: <h1 id="watchme">watch me move</h1> <p> this example shows how to use css animations to make <code>h1</code> elements move across the page. </p> <p> in addition, we output some
text each time an animation event fires, so you can see them in action. </p> <ul id="output"> </ul> and here's the live output. note: reload page to see the animation, or click the codepen button to see the animation in the codepen environment. ...
Flow Layout and Overflow - CSS: Cascading Style Sheets
will be added. comparing the next example with the example for overflow: scroll you should see overflow scroll has horizontal and vertical scrollbars when it only needs vertical scrolling. the auto example below only adds the scrollbar in the direct we need to scroll. as we have already learned, using any of these values, other than the default of visible, will create a new block formatting con
text. note: in the working draft of overflow level 3, there is an additional value overflow: clip. this will act like overflow: hidden however it does not allow for programmatic scrolling, the box becomes non-scrollable. in addition it does not create a block formatting con
text. the overflow property is in reality a shorthand for the overflow-x and overflow-y properties. if you specify only one valu...
...g depends on the writing mode of the document. these properties currently do not have implementations in browsers, so you will need to use the physical properties at the present time and adjust for your writing mode. indicating overflow in the level 3 overflow specification we have some properties which can help improve the way content looks in an overflow situation. inline-axis overflow the
text-overflow property deals with
text overflowing in the inline direction. it takes one of two values clip, in which case content is clipped when it overflows, this is the initial value and therefore the default behaviour. we also have ellipsis which renders an ellipsis, which may be replaced with a better character for the language or writing mode in use. block-axis overflow there is also a prop...
...s the initial value and therefore the default behaviour. we also have ellipsis which renders an ellipsis, which may be replaced with a better character for the language or writing mode in use. block-axis overflow there is also a proposal for a block-overflow property, although at the time of writing the name is still up for discussion. this proposal would enable the adding of an ellipsis when
text overflows in the block dimension. this is useful in the situation where you have a listing of articles, for example, and you display the listings in fixed height boxes which only take a limited amount of
text. it may not be obvious to the reader that there is more content to click through to when clicking the box or the title. an ellipsis indicates clearly the fact there is more content. the spe...
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
d item position: absolute it will take as its containing block the grid container or, if the item also has a grid position, the area of the grid it is placed into. in the below example i have a wrapper containing four child items. item three is absolutely positioned and also placed on the grid using line-based placement. the grid container has position: relative and so becomes the positioning con
text of this item. * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3"> this block is abso...
...t rules now place items into the same space. the item also doesn’t cause the additional row to be created to span to row line 3. if we remove position: absolute from the rules for .box3 you can see how it would display without the positioning. a grid container as parent if the absolutely positioned child has a grid container as a parent but that container does not create a new positioning con
text, then it is taken out of flow as in the previous example. the positioning con
text will be whatever element creates a positioning con
text as is common to other layout methods. in our case, if we remove position: relative from the wrapper above, positioning con
text is from the viewport, as shown in this image. once again the item no longer participates in the grid layout in terms of sizing or wh...
...t methods. in our case, if we remove position: relative from the wrapper above, positioning con
text is from the viewport, as shown in this image. once again the item no longer participates in the grid layout in terms of sizing or when other items are auto-placed. with a grid area as the parent if the absolutely positioned item is nested inside a grid area then you can create a positioning con
text on that area. in the below example we have our grid as before but this time i have nested an item inside .box3 of the grid. i have given .box3 position relative and then positioned the sub-item with the offset properties. in this case, the positioning con
text is the grid area. * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6...
Using CSS counters - CSS: Cascading Style Sheets
ter's value can be increased or decreased with counter-increment. the counter's name must not be "none", "inherit", or "initial"; otherwise the declaration is ignored. displaying a counter the value of a counter can be displayed using either the counter() or counters() function in a content property. the counter() function has two forms: 'counter(name)' or 'counter(name, style)'. ...
...the counters are rendered in the specified style (decimal by default). ...
... section counter, and a colon before the content of each h3 */ } html <h3>introduction</h3> <h3>body</h3> <h3>conclusion</h3> result nesting counters a css counter can be especially useful for making outlined lists, because a new instance of the counter is automatically created in child elements. using the counters() function, separating
text can be inserted between different levels of nested counters. example of a nested counter css ol { counter-reset: section; /* creates a new instance of the section counter with each ol element */ list-style-type: none; } li::before { counter-increment: section; /* increments ...
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
ppings for each logical value to a physical counterpart. in the table below i have given these mapped values assuming that the writing-mode in use is horizontal-tb — with a left to right direction. the inline direction therefore runs horizontally — left to right — and margin-inline-start would be equivalent to margin-left. if you were using a horizontal-tb writing mode with a right-to-left
text direction then margin-inline-start would be the same as margin-right, and in a vertical writing mode it would be the same as using margin-top. logical property physical property border-block-end border-bottom border-block-end-color border-bottom-color border-block-end-style border-bottom-style border-block-end-width border-bottom-wi...
...direction property to rtl to cause the boxes to display in a right-to-left direction, the margins on the first box will stay in the same place, while the margins on the inline dimension of the second box will switch. you can also try changing the writing-mode from horizontal-tb to vertical-rl. again, notice how the margins stay in the same place for the first box, but switch around to follow the
text direction in the second. margin shorthands as we can now target both sides of a box — either both inline sides or both block sides — there are new shorthands available, margin-inline and margin-block, which accept two values. the first value will apply to the start of that dimension, the second to the end. if you only use one value it is applied to both. in a horizontal writing mode this...
...tion property to rtl to cause the boxes to display in a right-to-left direction. the padding on the first box will stay in the same place, whereas the padding on the inline dimension of the second box will switch. you can also try changing the writing-mode from horizontal-tb to vertical-rl. again, notice how the padding stays in the same place for the first box, but switches around to follow the
text direction in the second. padding shorthands as with margin, there are two-value shorthands for padding — padding-inline and padding-block — which allow you to set the padding of the two inline, and two block dimensions, respectively. in a horizontal writing-mode this css would apply 5px of padding to the top of the box and 10px of padding to the bottom: .box { padding-block: 5px 10px;...
Stacking with floated blocks - CSS: Cascading Style Sheets
nline elements descendant positioned elements, in order of appearance in the html note: if an opacity value is applied to the non-positioned block (div #4), then something strange happens: the background and border of that block pops up above the floating blocks and the positioned blocks. this is due to a peculiar part of the specification: applying a opacity value creates a new stacking con
text (see what no one told you about z-index). source code for the example html <div id="abs1"> <b>div #1</b><br />position: absolute;</div> <div id="flo1"> <b>div #2</b><br />float: left;</div> <div id="flo2"> <b>div #3</b><br />float: right;</div> <br /> <div id="sta1"> <b>div #4</b><br />no positioning</div> <div id="abs2"> <b>div #5</b><br />position: absolute;</div> css div ...
...d you about z-index). ...
...abs2"> <b>div #5</b><br />position: absolute;</div> css div { padding: 10px;
text-align: center; } b { font-family: sans-serif; } #abs1 { position: absolute; width: 150px; height: 200px; top: 10px; right: 140px; border: 1px dashed #900; background-color: #fdd; } #sta1 { height: 100px; border: 1px dashed #996; background-color: #ffc; margin: 0px 10px 0px 10px;
text-align: left; } #flo1 { margin: 0px 10px 0px 20px; float: left; width: 150px; height: 200px; border: 1px dashed #090; background-color: #cfc; } #flo2 { margin: 0px 20px 0px 10px; float: right; width: 150px; height: 200px; border: 1px dashed #090; background-color: #cfc; } #abs2 { position: absolute; width: 150px; height: 100px; top: 130px; left: 100px; border...
Understanding CSS z-index - CSS: Cascading Style Sheets
in this case, there is a single rendering flow, and all elements are aware of the space taken by others. the z-index attribute lets you adjust the order of the layering of objects when rendering content. in css 2.1, each box has a position in three dimensions. in addition to their horizontal and vertical positions, boxes lie along a "z-axis" and are formatted one on top of the other. z-axis positions are particularly relevant when boxes overlap visually. ...
...s-2.1 appendix e to explain these rules better. this article will try to explain those rules, with some simplification and several examples. stacking without the z-index property: the stacking rules that apply when z-index is not used. stacking with floated blocks: how floating elements are handled with stacking. using z-index: how to use z-index to change default stacking. ...
...se rules better. this article will try to explain those rules, with some simplification and several examples. stacking without the z-index property: the stacking rules that apply when z-index is not used. stacking with floated blocks: how floating elements are handled with stacking. using z-index: how to use z-index to change default stacking. the stacking con
text: notes on the stacking con
text. stacking con
text example 1: 2-level html hierarchy, z-index on the last level stacking con
text example 2: 2-level html hierarchy, z-index on all levels stacking con
text example 3: 3-level html hierarchy, z-index on the second level original document information author(s): paolo lombardi this article is the english translation of an article i wrote in italian for yappy. i grant the righ...
Basic Shapes - CSS: Cascading Style Sheets
ng or decreasing the size of the circle by changing the size of the radius, moving the circle around with the position value, or setting a reference box as we did for inset(). as an additional example, if you use the keywords top left for position, you can make a quarter circle shape in the top left corner of the page. the example below uses generated content to create a quarter circle shape for
text to flow around. the shape will be clipped by the margin box when describing reference boxes i explained that the margin-box will clip the shape. you can see this by moving the centre of our circle towards the content by setting the position to 60%. the centre of the circle is now nearer the content and the circle extends past the margin-box. this means that the extension becomes clipped and s...
...) except that we have to specify two radii x and y in that order. these may then be followed by position values as with circle() to move the centre of the ellipse around. in the example below we have an ellipse with an x radius of 40%, a y radius of 50% and the position being left. this means that the centre of the ellipse is on the left edge of the box giving us a half ellipse shape to wrap our
text around. you can change these values to see how the ellipse changes. the keyword values of closest-side and farthest-side are useful to create a quick ellipse based on the size of the floated element reference box. polygon() the final basic shape is the most complex and enables the creation of many side shapes by way of creating a polygon(). this shape accepts three or more pairs of values ...
...ed on the size of the floated element reference box. polygon() the final basic shape is the most complex and enables the creation of many side shapes by way of creating a polygon(). this shape accepts three or more pairs of values (a polygon must at least draw a triangle). these values are co-ordinates drawn with reference to the reference box. in the example below i have created a shape for
text to follow using the polygon(), you can change any of the values to see how the shape is changed. you may well find the firefox shape inspector very useful here to create your polygon shape. the screenshot below shows the shape highlighted in the tool. another useful resource is clippy - a tool for creating shapes for clip-path, as the values for basic shapes are the same as those used for c...
CSS values and units - CSS: Cascading Style Sheets
every css declaration includes a property / value pair. depending on the property, the value can include a single integer or keyword, to a series of keywords and values with or without units. there are a common set of data types -- values and units -- that css properties accept. below is an overview of most of these data types. refer to the page for each value type for more detailed information.
textual data types <custom-ident> pre-defined keywords as an <ident> <string> <url>
text data types are either <string>, a quoted series of characters, or an <ident>, a "css identifier" which is an unquoted string. a <string> must be quoted with either single or double quotes. css identifiers, listed in the specifications as <ident> or <custom-ident>, must be unquoted. in the css specificatio...
...ed string. a <string> must be quoted with either single or double quotes. css identifiers, listed in the specifications as <ident> or <custom-ident>, must be unquoted. in the css specifications, values that can be defined by the web developer, like keyframe animations, font-family names, or grid areas are listed as a <custom-ident>, <string>, or both. when both quoted and unquoted user defined
text values are permitted, the specification will list <custom-ident> | <string>, meaning quotes are optional, such as is the case with animation names: @keyframe validident { /* keyframes go here */ } @keyframe 'validstring' { /* keyframes go here */ } some
text values are not valid if encompassed in quotes. for example, the value of grid-area can be a <custom-ident>, so if we had a grid area n...
... content: "this is my content."; } while you can generally create any name you want, including using emojis, the identifier can't be none, unset, initial, or inherit, start with a digit or two dashes, and generally you don't want it to be any other pre-defined css keyword. see the <custom-ident> and <string> reference pages for more details. pre-defined keyword values pre-defined keywords are
text values defined by the specification for that property. these keywords are also css identifiers and are therefore used without quotes. when viewing css property value syntax in a css specification or the mdn property page, allowable keywords will be listed in the following form. the following values are the pre-defined keyword values allowed for float. left | right | none | inline-start | inline...
border-block-color - CSS: Cascading Style Sheets
the border-block-color css property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and
text orientation. it corresponds to the border-top-color and border-bottom-color, or border-right-color and border-left-color property depending on the values defined for writing-mode, direction, and
text-orientation. border-block-color: yellow; border-block-color: #f5f6f7; the border color in the other dimension can be set with border-inline-color which sets border-inline-start-color, and border-inline-end-color. syntax values <'color'> the color of the border. see color. formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloran...
...lor in the other dimension can be set with border-inline-color which sets border-inline-start-color, and border-inline-end-color. syntax values <'color'> the color of the border. see color. ...
... with border-inline-color which sets border-inline-start-color, and border-inline-end-color. syntax values <'color'> the color of the border. see color. formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typediscrete formal syntax <'border-top-color'>{1,2} examples border with vertical
text html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; border: 10px solid blue; border-block-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-color' in that specification. editor...
border-block-style - CSS: Cascading Style Sheets
the border-block-style css property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and
text orientation. it corresponds to the border-top-style and border-bottom-style, or border-left-style and border-right-style properties depending on the values defined for writing-mode, direction, and
text-orientation. /* <'border-style'> values */ border-block-style: dashed; border-block-style: dotted; border-block-style: groove; the border style in the other dimension can be set with border-inline-style, which sets border-inline-start-style, and border-inline-end-style. syntax values <'border-style'> the line style of the border. see border-style. formal definition initial v...
...ther dimension can be set with border-inline-style, which sets border-inline-start-style, and border-inline-end-style. syntax values <'border-style'> the line style of the border. see border-style. ...
...-inline-style, which sets border-inline-start-style, and border-inline-end-style. syntax values <'border-style'> the line style of the border. see border-style. formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples dashed border with vertical
text html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; border: 5px solid blue; border-block-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-style' in that specification. edit...
border-block-width - CSS: Cascading Style Sheets
the border-block-width css property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and
text orientation. it corresponds to the border-top-width and border-bottom-width, or border-left-width, and border-right-width property depending on the values defined for writing-mode, direction, and
text-orientation. /* <'border-width'> values */ border-block-width: 5px; border-block-width: thick; the border width in the other dimension can be set with border-inline-width, which sets border-inline-start-width, and border-inline-end-width. syntax values <'border-width'> the width of the border. see border-width. formal definition initial valuemediumapplies toall elementsinheri...
...idth, and border-inline-end-width. syntax values <'border-width'> the width of the border. see border-width. ...
...yntax values <'border-width'> the width of the border. see border-width. formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typediscrete formal syntax <'border-top-width'> examples border width with vertical
text html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; border: 1px solid blue; border-block-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-width' in that specification. editor'...
border-inline-color - CSS: Cascading Style Sheets
the border-inline-color css property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and
text orientation. it corresponds to the border-top-color and border-bottom-color, or border-right-color and border-left-color property depending on the values defined for writing-mode, direction, and
text-orientation. border-inline-color: yellow; border-inline-color: #f5f6f7; the border color in the other dimension can be set with border-block-color which sets border-block-start-color, and border-block-end-color. syntax values <'color'> the color of the border. see color. formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation t...
... in the other dimension can be set with border-block-color which sets border-block-start-color, and border-block-end-color. syntax values <'color'> the color of the border. see color. ...
...th border-block-color which sets border-block-start-color, and border-block-end-color. syntax values <'color'> the color of the border. see color. formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typediscrete formal syntax <'border-top-color'>{1,2} examples border color with vertical
text html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; border: 10px solid blue; border-inline-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline-color' in that specification. edit...
border-inline-end-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository. ...
... the source for this interactive example is stored in a github repository. ...
...r colors of the element. initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color values <'color'> the color of the border. see color. formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; border: 10px solid blue; border-inline-end-color: red; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-color' in that specification. edito...
border-inline-start-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository. ...
... the source for this interactive example is stored in a github repository. ...
...e border-block-start-color, border-block-end-color, and border-inline-end-color, which define the other border colors of the element. values <'color'> the color of the border. see color. formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; border: 10px solid blue; border-inline-start-color: red; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-color' in that specification. e...
border-inline-start-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository. ...
... the source for this interactive example is stored in a github repository. ...
... styles of the element. initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete values <'border-style'> the line style of the border. see border-style. formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; border: 5px solid blue; border-inline-start-style: dashed; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-style' in that specification. ...
border-inline-start-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository. ...
... the source for this interactive example is stored in a github repository. ...
...he other border widths of the element. values <'border-width'> the width of the border. see border-width. formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; border: 1px solid blue; border-inline-start-width: 5px; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-width' in that specification. ed...
calc() - CSS: Cascading Style Sheets
nest calc() functions, in which case the inner ones are treated as simple parentheses. formal syntax calc( <calc-sum> )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <number> ]*where <calc-value> = <number> | <dimension> | <percentage> | ( <calc-sum> ) accessibility concerns when calc() is used for controlling
text size, be sure that one of the values includes a relative length unit, for example: h1 { font-size: calc(1.5rem + 3vw); } this ensures that
text size will scale if the page is zoomed. mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 usage with integers when calc() is used where an <integer> is expected, the value will...
... margin calc() makes it easy to position an object with a set margin. in this example, the css creates a banner that stretches across the window, with a 40-pixel gap between both sides of the banner and the edges of the window: .banner { position: absolute; left: 40px; width: calc(100% - 80px); border: solid black 1px; box-shadow: 1px 2px; background-color: yellow; padding: 6px;
text-align: center; box-sizing: border-box; } <div class="banner">this is a banner!</div> automatically sizing form fields to fit their container another use case for calc() is to help ensure that form fields fit in the available space, without extruding past the edge of their container, while maintaining an appropriate margin. let's look at some css: input { padding: 2px; display: block...
...er: 1px solid black; padding: 4px; } here, the form itself is established to use 1/6 of the available window width. then, to ensure that input fields retain an appropriate size, we use calc() again to establish that they should be the width of their container minus 1em. then, the following html makes use of this css: <form> <div id="formbox"> <label>type something:</label> <input type="
text"> </div> </form> nested calc() with css variables you can also use calc() with css variables. consider the following code: .foo { --widtha: 100px; --widthb: calc(var(--widtha) / 2); --widthc: calc(var(--widthb) / 2); width: var(--widthc); } after all variables are expanded, widthc's value will be calc( calc( 100px / 2) / 2), then when it's assigned to .foo's width property, all i...
column-fill - CSS: Cascading Style Sheets
ial; column-fill: unset; the column-fill property is specified as one of the keyword values listed below. the initial value is balance so the content will be balanced across the columns. values auto columns are filled sequentially. content takes up only the room it needs, this may result in some columns remaining empty. balance content is equally divided between columns. in fragmented con
texts, such as paged media, only the last fragment is balanced. therefore in paged media, only the last page would be balanced. balance-all content is equally divided between columns. in fragmented con
texts, such as paged media, all fragments are balanced. formal definition initial valuebalanceapplies tomulticol elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax a...
...the css `column-fill` property is used to spread the contents evenly across all the columns. ...
...the css `column-fill` property is used to spread the contents evenly across all the columns. ...
direction - CSS: Cascading Style Sheets
the direction css property sets the direction of
text, table columns, and horizontal overflow. use rtl for languages written from right to left (like hebrew or arabic), and ltr for those written from left to right (like english and most other languages). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. note that
text direction is usually defined within a document (e.g., with html's dir attribute) rather than through direct use of the direction property. the property sets the base
text direction of block-level elements and the direction of embeddings created by the unicode-bidi property. it also sets the default alig...
... unlike the dir attribute in html, the direction property is not inherited from table columns into table cells, since css inheritance follows the document tree, and table cells are inside of rows but not inside of columns. ...
...ells, since css inheritance follows the document tree, and table cells are inside of rows but not inside of columns. the direction and unicode-bidi properties are the two only properties which are not affected by the all shorthand property. syntax /* keyword values */ direction: ltr; direction: rtl; /* global values */ direction: inherit; direction: initial; direction: unset; values ltr
text and other elements go from left to right. this is the default value. rtl
text and other elements go from right to left. for the direction property to have any effect on inline-level elements, the unicode-bidi property's value must be embed or override. formal definition initial valueltrapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax ltr | r...
<display-internal> - CSS: Cascading Style Sheets
lements. table-row these elements behave like <tr> html elements. table-cell these elements behave like <td> html elements. table-column-group these elements behave like <colgroup> html elements. table-column these elements behave like <col> html elements. table-caption these elements behave like <caption> html elements. ruby-base these elements behave like <rb> html elements. ruby-
text these elements behave like <rt> html elements. ruby-base-container these elements behave like <rbc> html elements generated as anonymous boxes. ruby-
text-container these elements behave like <rtc> html elements. examples css tables example the following example demonstrates laying out a simple form using css table layout. html <main> <div> <label for="name">name</label> ...
...ents behave like <rt> html elements. ruby-base-container these elements behave like <rbc> html elements generated as anonymous boxes. ruby-
text-container these elements behave like <rtc> html elements. examples css tables example the following example demonstrates laying out a simple form using css table layout. ...
...ml elements generated as anonymous boxes. ruby-
text-container these elements behave like <rtc> html elements. examples css tables example the following example demonstrates laying out a simple form using css table layout. html <main> <div> <label for="name">name</label> <input type="
text" id="name" name="name"> </div> <div> <label for="age">age</label> <input type="
text" id="age" name="age"> </div> </main> css main { display: table; } div { display: table-row; } label, input { display: table-cell; margin: 5px; } result specifications specification status css display module level 3the definition of 'display-internal' in that specification. candidate recommendation ...
<filter-function> - CSS: Cascading Style Sheets
<li> <p>current value: <code></code></p> </li> </ul> css div { width: 300px; height: 300px; background: url(https://media.prod.mdn.mozit.cloud/attachments/2020/07/29/17350/3b4892b7e820122ac6dd7678891d4507/firefox.png) no-repeat center; } li { display: flex; align-items: center; justify-content: center; margin-bottom: 20px; } input { width: 60% } output { width: 5%;
text-align: center; } select { width: 40%; margin-left: 2px; } javascript const selectelem = document.queryselector('select'); const divelem = document.queryselector('div'); const slider = document.queryselector('input'); const output = document.queryselector('output'); const curvalue = document.queryselector('p code'); selectelem.addeventlistener('change', () => { setslider(selectelem.value...
... working draft ...
... working draft ...
font-family - CSS: Cascading Style Sheets
corative fonts that contain playful representations of characters. e.g. papyrus, herculanum, party let, curlz mt, harrington, fantasy. system-ui glyphs are taken from the default user interface font on a given platform. because typographic traditions vary widely across the world, this generic is provided for typefaces that don't map cleanly into the other generics. this is example system-ui
text. ui-serif the default user interface serif font. this is example ui-serif
text. ui-sans-serif the default user interface sans-serif font. this is example ui-sans-serif
text. ui-monospace the default user interface monospace font. this is example ui-monospace
text. ui-rounded the default user interface font that has rounded features. this is example ui-rounded
text. math this i...
...monospace font. this is example ui-monospace
text. ui-rounded the default user interface font that has rounded features. this is example ui-rounded
text. math this is for the particular stylistic concerns of representing mathematics: superscript and subscript, brackets that cross several lines, nesting expressions, and double struck glyphs with distinct meanings. this is some example math
text: ax² + bx + c = 0. emoji fonts that are specifically designed to render emoji. this is some example emoji
text: ✝♾. fangsong a particular style of chinese characters that are between serif-style song and cursive-style kai forms. this style is often used for government documents. ...
... valid family names font family names must either be given quoted as strings, or unquoted as a sequence of one or more identifiers. ...
font-smooth - CSS: Cascading Style Sheets
red. syntax /* keyword values */ font-smooth: auto; font-smooth: never; font-smooth: always; /* <length> value */ font-smooth: 2em; webkit implements a similar property, but with different values: -webkit-font-smoothing. it only works on mac os x/macos. auto - let the browser decide (uses subpixel anti-aliasing when available; this is the default) none - turn font smoothing off; display
text with jagged sharp edges. antialiased - smooth the font on the level of the pixel, as opposed to the subpixel. switching from subpixel rendering to antialiasing for light
text on dark backgrounds makes it look lighter. subpixel-antialiased - on most non-retina displays, this will give the sharpest
text. firefox implements a similar property, but with different values: -moz-osx-font-smoothing...
...ntialiasing for light
text on dark backgrounds makes it look lighter. subpixel-antialiased - on most non-retina displays, this will give the sharpest
text. firefox implements a similar property, but with different values: -moz-osx-font-smoothing. it only works on mac os x/macos. auto - allow the browser to select an optimization for font smoothing, typically grayscale. grayscale - render
text with grayscale antialiasing, as opposed to the subpixel. switching from subpixel rendering to antialiasing for light
text on dark backgrounds makes it look lighter. formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | never | always | <absolute-size> | <length>where <absolute-size> = xx-small | x-small | s...
...nd firefox equivalents that turn on font-smoothing on macos. in both cases the smoothed font should look slightly lighter in weight. for those of you not on a macos system, here is a screenshot (the live version appears later on): html <p>without font smoothing</p> <p class="smoothed">with font smoothing</p> css html { background-color: black; color: white; font-size: 3rem; } p {
text-align: center; } .smoothed { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } result specifications not part of any standard. ...
inset-block-end - CSS: Cascading Style Sheets
the inset-block-end css property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and
text orientation. it corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and
text-orientation. /* <length> values */ inset-block-end: 3px; inset-block-end: 2.4em; /* <percentage>s of the width or height of the containing block */ inset-block-end: 10%; /* keyword value */ inset-block-end: auto; /* global values */ inset-block-end: inherit; inset-block-end: initial; inset-block-end: unset; syntax values the inset-block-end property takes the same values as the left property. formal definition initial valueautoapplies topositioned elementsinherite...
... same values as the left property. ...
...s the left property. formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-height of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'> examples setting block end offset html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-rl; position: relative; inset-block-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-block-end' in that specification. ed...
inset-block-start - CSS: Cascading Style Sheets
the inset-block-start css property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and
text orientation. it corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and
text-orientation. /* <length> values */ inset-block-start: 3px; inset-block-start: 2.4em; /* <percentage>s of the width or height of the containing block */ inset-block-start: 10%; /* keyword value */ inset-block-start: auto; /* global values */ inset-block-start: inherit; inset-block-start: initial; inset-block-start: unset; syntax values the inset-block-start property takes the same values as the left property. formal definition initial valueautoapplies topositio...
...ame values as the left property. ...
...the left property. formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-height of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'> examples setting block start offset html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; position: relative; inset-block-start: 20px; background-color: #c8c800; } specifications specification status comment css logical properties and values level 1the definition of 'inset-block-start' in that specification. editor...
inset-block - CSS: Cascading Style Sheets
the inset-block css property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and
text orientation. it corresponds to the top and bottom, or right and left properties depending on the values defined for writing-mode, direction, and
text-orientation. /* <length> values */ inset-block: 3px 10px; inset-block: 2.4em 3em; inset-block: 10px; /* value applied to start and end */ /* <percentage>s of the width or height of the containing block */ inset-block: 10% 5%; /* keyword value */ inset-block: auto; /* global values */ inset-block: inherit; inset-block: initial; inset-block: unset; constituent properties this property is a shorthand for the following css properties: inset-block-end in...
...the left property. ...
...rty. formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-height of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'>{1,2} examples setting block start and end offsets html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; position: relative; inset-block: 20px 50px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-block' in that specification. edito...
inset-inline-end - CSS: Cascading Style Sheets
the inset-inline-end css property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and
text orientation. it corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and
text-orientation. /* <length> values */ inset-inline-end: 3px; inset-inline-end: 2.4em; /* <percentage>s of the width or height of the containing block */ inset-inline-end: 10%; /* keyword value */ inset-inline-end: auto; /* global values */ inset-inline-end: inherit; inset-inline-end: initial; inset-inline-end: unset; the shorthand for inset-inline-start and inset-inline-end is inset-inline. syntax values the inset-inline-end property takes the same values as the left...
...e same values as the left property. ...
...as the left property. formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-width of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'> examples setting inline end offset html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-rl; position: relative; inset-inline-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-inline-end' in that specification. ...
inset-inline - CSS: Cascading Style Sheets
the inset-inline css property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and
text orientation. it corresponds to the top and bottom, or right and left properties depending on the values defined for writing-mode, direction, and
text-orientation. /* <length> values */ inset-inline: 3px 10px; inset-inline: 2.4em 3em; inset-inline: 10px; /* value applied to start and end */ /* <percentage>s of the width or height of the containing block */ inset-inline: 10% 5%; /* keyword value */ inset-inline: auto; /* global values */ inset-inline: inherit; inset-inline: initial; inset-inline: unset; constituent properties this property is a shorthand for the following css propert...
...the left property. ...
...rty. formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-width of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'>{1,2} examples setting inline start and end offsets html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; position: relative; inset-inline: 20px 50px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-inline' in that specification. edi...
<length> - CSS: Cascading Style Sheets
note: although <percentage> values are also css dimensions, and are usable in some of the same properties that accept <length> values, they are not themselves <length> values. see <length-percentage>. syntax the <length> data type consists of a <number> followed by one of the units listed below. as with all css dimensions, there is no space between the unit literal and the number. the length unit is optional after the number 0. ...
...s described in inches (in), centimeters (cm), or millimeters (mm) don't necessary match the size of the physical unit with the same name. for high-dpi devices, inches (in), centimeters (cm), and millimeters (mm) are the same as their physical counterparts. therefore, the px unit is defined relative to them (1/96 of 1 inch). note: many users increase their user agent's default font size to make
text more legible. absolute lengths can cause accessibility problems, since they are fixed and do not scale according to user settings. for this reason, prefer relative lengths (such as em or rem) when setting font-size. px one pixel. for screen displays, it traditionally represents one device pixel (dot). however, for printers and high-resolution screens, one css pixel implies multiple device pi...
...mparison the following demo provides you with an input field in which you can enter a <length> value (e.g. 300px, 50%, 30vw) to set the width of a result bar that will appear below it once you've pressed return. this allows you to compare and contrast the effect of different length units. ...
line-break - CSS: Cascading Style Sheets
the line-break css property sets how to break lines of chinese, japanese, or korean (cjk)
text when working with punctuation and symbols. /* keyword values */ line-break: auto; line-break: loose; line-break: normal; line-break: strict; line-break: anywhere; /* global values */ line-break: inherit; line-break: initial; line-break: unset; syntax values auto break
text using the default line break rule. loose break
text using the least restrictive line break rule. typically used for short lines, such as in newspapers. normal break
text using the most common line break rule. strict break
text using the most stringent line break rule. anywhere there is a soft wrap opportunity around every typographic character unit, including around any punctuation character or preserved white s...
......
... working draft initial definition ...
margin-inline-end - CSS: Cascading Style Sheets
the margin-inline-end css property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and
text orientation. in other words, it corresponds to the margin-top, margin-right, margin-bottom or margin-left property depending on the values defined for writing-mode, direction, and
text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...ting-mode, direction, and
text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax /* <length> values */ margin-inline-end: 10px; /* an absolute length */ margin-inline-end: 1em; /* relative to the
text size */ margin-inline-end: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-inline-end: auto; /* global values */ margin-inline-end: inherit; margin-inline-end: initial; margin-inline-end: unset; it relates to margin-block-start, margin-block-end, and margin-inline-start, which define the other margins of the element. values the margin-inline-end pr...
...es as the margin-left property. formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples setting inline end margin html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; margin-inline-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline-end' in that specification. editor...
margin-inline-start - CSS: Cascading Style Sheets
the margin-inline-start css property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and
text orientation. it corresponds to the margin-top, margin-right, margin-bottom, or margin-left property depending on the values defined for writing-mode, direction, and
text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...ng-mode, direction, and
text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax /* <length> values */ margin-inline-start: 10px; /* an absolute length */ margin-inline-start: 1em; /* relative to the
text size */ margin-inline-start: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-inline-start: auto; /* global values */ margin-inline-start: inherit; it relates to margin-block-start, margin-block-end, and margin-inline-end, which define the other margins of the element. values the margin-inline-start property takes the same values as the margin-left pr...
...s as the margin-left property. formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples setting inline start margin html <div> <p class="example
text">example
text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .example
text { writing-mode: vertical-lr; margin-inline-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline-start' in that specification. ed...
orphans - CSS: Cascading Style Sheets
er of lines that can stay by themselves at the bottom of a fragment before a fragmentation break. the value must be positive. ...
...nt before a fragmentation break. the value must be positive. formal definition initial value2applies toblock container elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax <integer> examples setting a minimum orphan size of three lines html <div> <p>this is the first paragraph containing some
text.</p> <p>this is the second paragraph containing some more
text than the first one. ...
...heritedyescomputed valueas specifiedanimation typediscrete formal syntax <integer> examples setting a minimum orphan size of three lines html <div> <p>this is the first paragraph containing some
text.</p> <p>this is the second paragraph containing some more
text than the first one. it is used to demonstrate how orphans work.</p> <p>this is the third paragraph. it has a little bit more
text than the first one.</p> </div> css div { background-color: #8cffa0; height: 150px; columns: 3; orphans: 3; } p { background-color: #8ca0ff; } p:first-child { margin-top: 0; } result specifications specification status comment css fragmentation module level 3the definition of 'orphans' in that specification. candidate recommendation extends ...
overflow-block - CSS: Cascading Style Sheets
n the block dimension in the padding box. browsers display scrollbars whether or not any content is actually clipped. (this prevents scrollbars from appearing or disappearing when the content changes.) printers may still print overflowing content. auto depends on the user agent. if content fits inside the padding box, it looks the same as visible, but still establishes a new block-formatting con
text. desktop browsers provide scrollbars if content overflows. formal definition initial valueautoapplies toblock-containers, flex containers, and grid containersinheritednocomputed valueas specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typediscrete formal syntax visible | hidden | clip | scroll | ...
...ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. </div> </li> <li...
...or sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. </div> </li> <li><code>overflow-block:visible</code> — displays the
text outside the box if needed <div id="div3"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. </div> </...
overflow-x - CSS: Cascading Style Sheets
te to auto. hidden content is clipped if necessary to fit horizontally in the padding box. no scrollbars are provided. clip like for hidden, the content is clipped to the element's padding box. the difference between clip and hidden is that the clip keyword also forbids all scrolling, including programmatic scrolling. the box is not a scroll container, and does not start a new formatting con
text. if you wish to start a new formatting con
text, you can use display: flow-root to do so. scroll content is clipped if necessary to fit horizontally in the padding box. browsers display scrollbars whether or not any content is actually clipped. (this prevents scrollbars from appearing or disappearing when the content changes.) printers may still print overflowing content. auto depends on the u...
...y to fit horizontally in the padding box. browsers display scrollbars whether or not any content is actually clipped. (this prevents scrollbars from appearing or disappearing when the content changes.) printers may still print overflowing content. auto depends on the user agent. if content fits inside the padding box, it looks the same as visible, but still establishes a new block-formatting con
text. desktop browsers provide scrollbars if content overflows. formal definition initial valuevisibleapplies toblock-containers, flex containers, and grid containersinheritednocomputed valueas specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typediscrete formal syntax visible | hidden | clip | scroll...
...initial valuevisibleapplies toblock-containers, flex containers, and grid containersinheritednocomputed valueas specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typediscrete formal syntax visible | hidden | clip | scroll | auto examples html <ul> <li><code>overflow-x:hidden</code> — hides the
text outside the box <div id="div1"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> <li><code>overflow-x:scroll</code> — always adds a scrollbar <div id="div2"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> <li><code>overflow-x:visible</code> — displays the
text outside the box if needed <div id="div3"> abcdefghijkl...
resize - CSS: Cascading Style Sheets
in the example below, a resizable <div> contai...
...in the example below, a resizable <div> contains a resizable paragraph (<p> ...
...ther than visible, and optionally replaced elements representing images or videos, and iframesinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | both | horizontal | vertical | block | inline examples disabling resizability of
textareas in many browsers, <
textarea> elements are resizable by default. you may override this behavior with the resize property. html <
textarea>type some
text here.</
textarea> css
textarea { resize: none; /* disables resizability */ } result using resize with arbitrary elements you can use the resize property to make any element resizable. in the example below, a resizable <div> contains a resizable paragraph (<p> element). html <div class="resizable"> <p class="resizable"> this paragraph is resizable in all direct...
ruby-position - CSS: Cascading Style Sheets
sition over the element (over), under it (under), or between the characters, on their right side (inter-character). /* keyword values */ ruby-position: over; ruby-position: under; ruby-position: inter-character; /* global values */ ruby-position: inherit; ruby-position: initial; ruby-position: unset; syntax values over is a keyword indicating that the ruby has to be placed over the main
text for horizontal scripts and right to it for vertical scripts. under is a keyword indicating that the ruby has to be placed under the main
text for horizontal scripts and left to it for vertical scripts. inter-character is a keyword indicating that the ruby has to be placed between the different characters. formal definition initial valueoverapplies toruby annotations containersinheritedyesc...
...the main
text for horizontal scripts and left to it for vertical scripts. inter-character is a keyword indicating that the ruby has to be placed between the different characters. ...
...s. formal definition initial valueoverapplies toruby annotations containersinheritedyescomputed valueas specifiedanimation typediscrete formal syntax over | under | inter-character examples ruby positioned over the
text html <ruby> <rb>超電磁砲</rb> <rp>(</rp><rt>レールガン</rt><rp>)</rp> </ruby> css ruby { ruby-position:over; } result ruby positioned under the
text html <ruby> <rb>超電磁砲</rb> <rp>(</rp><rt>レールガン</rt><rp>)</rp> </ruby> css ruby { ruby-position:under; } result specifications specification status comment css ruby layout module level 1the definition of 'ruby-position' in that specification. working draft initial definition browser compatibility the compatibility tabl...
translate - CSS: Cascading Style Sheets
pectively) of a 3d translation. equivalent to a translate3d() (3d translation) function. none specifies that no translation should be applied. ...
... editor's draft initial definition. initial valuenoneapplies totransformable elementsinheritednopercent...
...status comment css transforms level 2the definition of 'individual transforms' in that specification. editor's draft initial definition. initial valuenoneapplies totransformable elementsinheritednopercentagesrefer to the size of bounding boxcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea transformcreates stacking con
textyes ...
white-space - CSS: Cascading Style Sheets
white-space: initial; white-space: unset; the white-space property is specified as a single keyword chosen from the list of values below. values normal sequences of white space are collapsed. newline characters in the source are handled the same as other white space. lines are broken as necessary to fill line boxes. nowrap collapses white space as for normal, but suppresses line breaks (
text wrapping) within the source. pre sequences of white space are preserved. lines are only broken at newline characters in the source and at <br> elements. pre-wrap sequences of white space are preserved. lines are broken at newline characters, at <br>, and as necessary to fill line boxes. pre-line sequences of white space are collapsed. lines are broken at newline characters, at <br>, and as ...
...ine. a line breaking opportunity exists after every preserved white space character, including between white space characters. such preserved spaces take up space and do not hang, and thus affect the box’s intrinsic sizes (min-content size and max-content size). ...
...m veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> result specifications specification status comment css
text module level 3the definition of 'white-space' in that specification. working draft precisely defines the breaking algorithms. css level 2 (revision 1)the definition of 'white-space' in that specification. recommendation initial definition. ...
widows - CSS: Cascading Style Sheets
> the minimum number of lines that can stay by themselves at the top of a new fragment after a fragmentation break. the value must be positive. ...
... top of a new fragment after a fragmentation break. the value must be positive. formal definition initial value2applies toblock container elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax <integer> examples controlling column widows html <div> <p>this is the first paragraph containing some
text.</p> <p>this is the second paragraph containing some more
text than the first one. ...
...container elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax <integer> examples controlling column widows html <div> <p>this is the first paragraph containing some
text.</p> <p>this is the second paragraph containing some more
text than the first one. it is used to demonstrate how widows work.</p> <p>this is the third paragraph. it has a little bit more
text than the first one.</p> </div> css div { background-color: #8cffa0; columns: 3; widows: 2; } p { background-color: #8ca0ff; } p:first-child { margin-top: 0; } result specifications specification status comment css fragmentation module level 3the definition of 'widows' in that specification. candidate recommendation extends widows to apply to ...
z-index - CSS: Cascading Style Sheets
ller one. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. for a positioned box (that is, one with any position other than static), the z-index property specifies: the stack level of the box in the current stacking con
text. whether the box establishes a local stacking con
text. syntax /* keyword value */ z-index: auto; /* <integer> values */ z-index: 0; z-index: 3; z-index: 289; z-index: -1; /* negative values to lower the priority */ /* global values */ z-index: inherit; z-index: initial; z-index: unset; the z-index property is specified as either the keyword auto or an <integer>. values auto the box d...
...cking con
text. syntax /* keyword value */ z-index: auto; /* <integer> values */ z-index: 0; z-index: 3; z-index: 289; z-index: -1; /* negative values to lower the priority */ /* global values */ z-index: inherit; z-index: initial; z-index: unset; the z-index property is specified as either the keyword auto or an <integer>. values auto the box does not establish a new local stacking con
text. the stack level of the generated box in the current stacking con
text is the same as its parent's box. <integer> this <integer> is the stack level of the generated box in the current stacking con
text. the box also establishes a local stacking con
text in which its stack level is 0. this means that the z-indexes of descendants are not compared to the z-indexes of elements outside this element. ...
...vel of the generated box in the current stacking con
text. the box also establishes a local stacking con
text in which its stack level is 0. this means that the z-indexes of descendants are not compared to the z-indexes of elements outside this element. ...
CSS: Cascading Style Sheets
c experience with using it, its time to dive a bit deeper. this module looks at the cascade and inheritance, all the selector types we have available, units, sizing, styling backgrounds and borders, debugging, and lots more. the aim here is to provide you with a toolkit for writing competent css and help you understand all the essential theory, before moving on to more specific disciplines like
text styling and css layout. styling
text with the basics of the css language covered, the next css topic for you to concentrate on is styling
text — one of the most common things you'll do with css. here we look at
text styling fundamentals, including setting font, boldness, italics, line and letter spacing, drop shadows, and other
text features. we round off the module by looking at applying c...
...now it's time to look at how to place your boxes in the right place concerning the viewport, and one another. ...
...lve common problems when creating a web page. reference css reference: this exhaustive reference for seasoned web developers describes every property and concept of css. css key concepts: the syntax and forms of the language specificity, inheritance and the cascade css units and values box model and margin collapse the containing block stacking and block-formatting con
texts initial, computed, used, and actual values css shorthand properties css flexible box layout css grid layout media queries animation cookbook the css layout cookbook aims to bring together recipes for common layout patterns, things you might need to implement in your sites. in addition to providing code you can use as a starting point in your projects, these recipes high...
Challenge solutions - Developer guides
blue, green, or black. it also supports some more exotic color names like chartreuse, fuschia, or burlywood. see css color value for a complete list as well as other ways of specifying colors. how css works dom inspector challenge in domi, click on a strong node. use domi's right-hand pane to find out where the node's color is set to red, and where its appearance is made bolder than normal
text. solution in the menu above the right-hand pane, choose css rules. you see two items listed, one that references an internal resource and one that references your stylesheet file. the internal resource defines the font-weight property as bolder; your stylesheet defines the color property as red. cascading and inheritance inherited styles challenge change your stylesheet so that only the...
...rce defines the font-weight property as bolder; your stylesheet defines the color property as red. cascading and inheritance inherited styles challenge change your stylesheet so that only the red letters are underlined. solution move the declaration for underlining from the rule for <p> to the one for <strong>. the resulting file looks like this: p {color: blue; } strong {color: orange;
text-decoration: underline;} later sections of this tutorial describe style rules and declarations in greater detail. selectors second paragraph blue challenge without changing your html file, add a single rule to your css file that keeps all the initial letters the same color as they are now, but makes all the other
text in the second paragraph blue. solution add a rule with an id select...
...for the other colors all have more specific selectors, so they override the blue of the paragraph. readable css commenting out a rule challenge comment out part of your stylesheet, without changing anything else, to make the very first letter of your document red. solution one way to do this is to put comment delimiters around the rule for .carrot: /* .carrot { color: orange; } */
text styles big initial letters challenge without changing anything else, make all six initial letters twice the size in the browser's default serif font. solution add the following style declaration to the strong rule: font: 200% serif; if you use separate declarations for font-size and font-family, then the font-style setting on the first paragraph is not overridden. color three-digit...
XHTML - Developer guides
xhtml is a term that was historically used to describe html documents written to conform with xml syntax rules. the following example shows an html document and corresponding "xhtml" document, and the accompanying http content-type headers they should be served with. ...
...8"?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>xhtml</title> </head> <body> <p>i am a xhtml document</p> </body> </html> in practice, very few "xhtml" documents are served over the web with a content-type: application/xhtml+xml header. ...
...ead, even though the documents are written to conform to xml syntax rules, they are served with a content-type:
text/html header — so browsers parse those documents using html parsers rather than xml parsers, which can cause a variety of sometimes-very-surprising problems. ...
User input and controls - Developer guides
nger activity on touch-based user interfaces. for devices providing a mouse/touchpad as a pointing method, the pointer lock api helps you in implementing a first person 3d game or other applications requiring full control of the pointing device. and the fullscreen api helps you in displaying your app in fullscreen mode. using features such as contenteditable elements you can implement fast rich-
text editors and with drag&drop let users moving elements inside your app. when screen orientation matters for your application, through the screen orientation api you can read the screen orientation state and perform other actions. you should always be mindful of keyboard accessibility where appropriate — many web users only use keyboard to navigate web sites and apps, and locking them out of your...
...application, read our documentation about using fullscreen mode. drag & drop drag & drop allows your application’s users to click and hold the mouse button down over an element, drag it to another location, and release the mouse button to drop the element there. here is an example that allows a section of content to be dragged. <div draggable="true" ondragstart="event.datatransfer.setdata('
text/plain', 'this
text may be dragged')">
this
text <strong>may</strong> be dragged.
</div> in which we: set the draggable attribute to true on the element that you wish to make draggable add a listener for the dragstart event and set the drag data within this listener note: you can find more information in the mdn drag & drop documentation. contenteditable in open web apps any d...
...the draggable attribute to true on the element that you wish to make draggable add a listener for the dragstart event and set the drag data within this listener note: you can find more information in the mdn drag & drop documentation. contenteditable in open web apps any dom element can be made directly editable using the contenteditable attribute. <div contenteditable="true">
this
text can be edited by the user. </div> note: compatibility information, examples and other resources can be found in the content editable guide. examples tracking multiple touch points at a time this example tracks multiple touch points at a time, allowing the user to draw in a <canvas> with more than one finger at a time. it will only work on a browser that supports touch events. simple poin...
Developer guides
most of what you see on screen in your browser is described, fundamentally, using html. css learning area cascading style sheets (css) is a stylesheet language used to define the presentation of a document written in html. audio and video delivery we can deliver audio and video on the web in several ways, ranging from 'static' media files to adaptive live streams. ...
...s makes the application faster and more responsive to user actions. graphics on the web modern web sites and applications often need to present graphics of varying sophistication. guide to web apis a list of all web apis and what they do. javascript javascript is the powerful scripting language used to create applications for the web. localizations and character encodings browsers process
text as unicode internally. however, a way of representing characters in terms of bytes (character encoding) is used for transferring
text over the network to the browser. the html specification recommends the use of the utf-8 encoding (which can represent all of unicode), and regardless of the encoding used requires web content to declare that encoding. mobile web development this article provides ...
...y and efficiently. this lets it perform effectively for both powerful desktop systems and weaker handheld devices. parsing and serializing xml the web platform provides different methods of parsing and serializing xml, each with its pros and cons. the web open font format (woff) woff (web open font format) is a font file format that is free for anyone to use on the web. unicode bidirectional
text algorithm (bidi) the unicode® bidi algorithm is part of the unicode
text standard. it describes how the browser should order characters while rendering unicode
text. this guide covers the algorithm in general and how it applies to content you create—especially when you build properly localized and internationalized content. using formdata objects the formdata object lets you compile a set o...
Identifying resources on the Web - HTTP
re complex example might look like this: http://www.example.com:80/path/to/myfile.html?key1=value1&key2=value2#somewhereinthedocument urns a uniform resource name (urn) is a uri that identifies a resource by name in a particular namespace. urn:isbn:9780141036144 urn:ietf:rfc:7230 the two urns correspond to the book nineteen eighty-four by george orwell, the ietf specification 7230, hyper
text transfer protocol (http/1.1): message syntax and routing. syntax of uniform resource identifiers (uris) scheme or protocol http:// is the protocol. it indicates which protocol the browser must use. usually it is the http protocol or its secured version, https. the web requires one of these two, but browsers also know how to handle other protocols such as mailto: (to open a mail client) or...
...web requires one of these two, but browsers also know how to handle other protocols such as mailto: (to open a mail client) or ftp: to handle file transfer, so don't be surprised if you see such protocols. ...
...ough some browsers may delegate loading ftp content to another application. examples https://developer.mozilla.org/docs/learn tel:+1-816-555-1212 git@github.com:mdn/browser-compat-data.git ftp://example.org/resource.txt urn:isbn:9780141036144 mailto:help@supercyberhelpdesk.info specifications specification title rfc 7230, section 2.7: uniform resource identifiers hyper
text transfer protocol (http/1.1): message syntax and routing ...
Accept-Language - HTTP
ed to as a "locale identifier"). this consists of a 2-3 letter base language tag representing the language, optionally followed by additional subtags separated by '-'. the most common extra information is the country or region variant (like 'en-us' or 'fr-ca') or the type of alphabet to use (like 'sr-latn'). ...
...e con
text of this header. * any language; '*' is used as a wildcard. ;q= (q-factor weighting) any value placed in an order of preference expressed using a relative quality value called weight. ...
... used as a wildcard. ...
CSP: style-src - HTTP
e. see unsafe inline script for an example. in csp 2.0, this applied only to inline scripts. csp 3.0 allows it in the case of script-src for external scripts. ...
...</style> <style> @import url("https://not-example.com/styles/print.css") print; </style> as well as styles loaded using the link header: link: <https://not-example.com/styles/stylesheet.css>;rel=stylesheet inline style attributes are also blocked: <div style="display:none">foo</div> as well as styles that are applied in javascript by setting the style attribute directly, or by setting css
text: document.queryselector('div').setattribute('style', 'display:none;'); document.queryselector('div').style.css
text = 'display:none;'; however, styles properties that are set directly on the element's style property will not be blocked, allowing users to safely manipulate styles via javascript: document.queryselector('div').style.display = 'none'; these types of manipulations can be prevented ...
.... <style>#inline-style { background: red; }</style> unsafe style expressions the 'unsafe-eval' source expression controls several style methods that create style declarations from strings. if 'unsafe-eval' isn't specified with the style-src directive, the following methods are blocked and won't have any effect: cssstylesheet.insertrule() cssgroupingrule.insertrule() cssstyledeclaration.css
text specifications specification status comment content security policy level 3the definition of 'style-src' in that specification. working draft no changes. content security policy level 2the definition of 'style-src' in that specification. recommendation initial definition. ...
Content-Security-Policy - HTTP
forbidden header name no syntax content-security-policy: <policy-directive>; <policy-directive> where <policy-directive> consists of: <directive> <value> with no internal punctuation. directives fetch directives fetch directives control the locations from which certain resource types may be loaded. child-src defines the valid sources for web workers and nested browsing con
texts loaded using elements such as <frame> and <iframe>. instead of child-src, if you want to regulate nested browsing con
texts and workers, you should use the frame-src and worker-src directives, respectively. connect-src restricts the urls which can be loaded using script interfaces default-src serves as a fallback for the other fetch directives. font-src specifies valid sources for f...
... img-src specifies valid sources of images and favicons. manifest-src specifies valid sources of application manifest files. media-src specifies valid sources for loading media using the <audio> , <video> and <track> elements. ...
... into a document by limiting the types of resources which can be loaded. sandbox enables a sandbox for the requested resource similar to the <iframe> sandbox attribute. navigation directives navigation directives govern to which locations a user can navigate or submit a form, for example. form-action restricts the urls which can be used as the target of a form submissions from a given con
text. frame-ancestors specifies valid parents that may embed a page using <frame>, <iframe>, <object>, <embed>, or <applet>. navigate-to restricts the urls to which a document can initiate navigation by any means, including <form> (if form-action is not specified), <a>, window.location, window.open, etc. reporting directives reporting directives control the reporting process of csp violations.
Feature-Policy: accelerometer - HTTP
tive controls whether the current document is allowed to gather information about the acceleration of the device through the accelerometer interface. syntax feature-policy: accelerometer <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the default value is 'self'. specificati...
Feature-Policy: ambient-light-sensor - HTTP
ment is allowed to gather information about the amount of light in the environment around the device through the ambientlightsensor interface. syntax feature-policy: ambient-light-sensor <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the default value is 'self'. specificati...
Feature-Policy: autoplay - HTTP
o> and <video> elements will be ignored. for more details on autoplay and autoplay blocking, see the article autoplay guide for media and web audio apis. syntax feature-policy: autoplay <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the default value in google chrome is 'se...
Feature-Policy: battery - HTTP
nt document is allowed to gather information about the acceleration of the device through the batterymanager interface obtained via navigator.getbattery(). syntax feature-policy: battery <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the default value is 'self'. specificati...
Feature-Policy: camera - HTTP
is allowed to use video input devices. when this policy is enabled, the promise returned by mediadevices.getusermedia() will reject with a notallowederror. syntax feature-policy: camera <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the default value is 'self'. specificati...
Feature-Policy: display-capture - HTTP
e screen's contents. if display-capture is disabled in a document, the document will not be able to initiate screen capture via getdisplaymedia(). syntax feature-policy: display-capture <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the default alowlist is 'self'. specific...
Feature-Policy: document-domain - HTTP
t document.domain. when this policy is enabled, attempting to set document.domain will fail and cause a securityerror domexception to be be thrown. syntax feature-policy: document-domain <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the default value is *. specifications ...
Feature-Policy: encrypted-media - HTTP
xtensions api (eme). when this policy is enabled, the promise returned by navigator.requestmediakeysystemaccess() will reject with a domexception. syntax feature-policy: encrypted-media <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the allow list is 'self'. specifications...
Feature-Policy: gyroscope - HTTP
ope directive controls whether the current document is allowed to gather information about the orientation of the device through the gyroscope interface. syntax feature-policy: gyroscope <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. the default value is 'self'. specifications spe...
Feature-Policy: layout-animations - HTTP
the http feature-policy header layout-animations directive controls whether the current document is allowed to show layout animations. syntax feature-policy: layout-animations <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-level and n...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. the default value is 'self'. specifications spe...
Feature-Policy: legacy-image-formats - HTTP
ttp feature-policy header legacy-image-formats directive controls whether the current document is allowed to display images in legacy formats. syntax feature-policy: legacy-image-formats <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. the default value is 'self'. specifications spe...
Feature-Policy: magnetometer - HTTP
rective controls whether the current document is allowed to gather information about the orientation of the device through the magnetometer interface. syntax feature-policy: magnetometer <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. the default value is 'self'. specifications spe...
Feature-Policy: microphone - HTTP
allowed to use audio input devices. when this policy is enabled, the promise returned by mediadevices.getusermedia() will reject with a notallowederror. syntax feature-policy: microphone <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. the default value is 'self'. specifications spe...
Feature-Policy: midi - HTTP
cument is allowed to use the web midi api. when this policy is enabled, the promise returned by navigator.requestmidiaccess() will reject with a domexception. syntax feature-policy: midi <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the allow list is 'self'. specifications...
Feature-Policy: oversized-images - HTTP
the http feature-policy header oversized-images directive controls whether the current document is allowed to download and display large images. syntax feature-policy: oversized-images <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default value the default value is '*'. specification ...
Feature-Policy: payment - HTTP
er the current document is allowed to use the payment request api. when this policy is disabled, the paymentrequest() constructor will throw a syntaxerror. syntax feature-policy: payment <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the payment feature's default allowlist v...
Feature-Policy: picture-in-picture - HTTP
re-in-picture directive controls whether the current document is allowed to play a video in a picture-in-picture mode via the corresponding api. syntax feature-policy: picture-in-picture <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy as of june 2019, the spec draft and googl...
Feature-Policy: publickey-credentials-get - HTTP
redentials.get({publickey: ..., ...}). when this policy is enabled, any attempt to query public key credentials will result in an error. syntax feature-policy: publickey-credentials-get <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the default allowlist is 'self'. specifi...
Feature-Policy: screen-wake-lock - HTTP
k api to indicate that device should not dim or turn off the screen. note: in earlier specification drafts this directive was called wake-lock. syntax feature-policy: screen-wake-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy default allow list for screen-wake-lock i...
Feature-Policy: sync-xhr - HTTP
the http feature-policy header sync-xhr directive controls whether the current document is allowed to make synchronous xmlhttprequest requests. syntax feature-policy: sync-xhr <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-level and n...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy by default the policy is set to *, which ...
Feature-Policy: unoptimized-images - HTTP
feature-policy header unoptimized-images directive controls whether the current document is allowed to download and display unoptimized images. syntax feature-policy: unoptimized-images <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. the default value is 'self'. specifications spe...
Feature-Policy: unsized-media - HTTP
ty" problem caused by providing default dimensions for images whose size is not specified in advance so that image doesn't change size after loading. syntax feature-policy: unsized-media <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default value the default value for unsized-media is '*'...
Feature-Policy: vibrate - HTTP
icy header vibrate directive controls whether the current document is allowed to trigger device vibrations via navigator.vibrate() method of vibration api. syntax feature-policy: vibrate <allowlist>; <vibrate> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. the default value is 'self'. specifications sp...
Feature-Policy: wake-lock - HTTP
e lock api to indicate that device should not enter power-saving mode. note: latest drafts of screen wake lock api defines screen-wake-lock directive. syntax feature-policy: wake-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy default allow list for wake-lock is 'self...
web-share - HTTP
the http feature-policy header web-share directive controls controls whether the current document is allowed to use the navigator.share() of web share api to share
text, links, images, and other content to arbitrary destiations of user's choice. syntax feature-policy: web-share <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the sa...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the default value is 'self'. specificati...
Feature-Policy: xr-spatial-tracking - HTTP
indicate support for sessions supporting spatial tracking via navigator.xr.issessionsupported() and devicechange event on navigator.xr object. syntax feature-policy: xr-spatial-tracking <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing con
texts (iframes) regardless of their origin. 'self': the feature will be allowed in this document, and in all nested browsing con
texts (iframes) in the same origin. 'src': (in an iframe allow attribute only) the feature will be allowed in this iframe, as long as the document loaded into it comes from the same origin as the url in the iframe's src attribute. 'none': the feature is disabled in top-lev...
... <origin(s)>: the feature is allowed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. ...
...wed for specific origins (for example, https://example.com). origins should be separated by a space. the values * (enable for all origins) or 'none' (disable for all origins) may only be used alone, while 'self' and 'src' may be used with one or more origins. features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing con
texts and all nested browsing con
texts (iframes). 'self': the feature is allowed by default in top-level browsing con
texts and in nested browsing con
texts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing con
texts. 'none': the feature is disabled in top-level and nested browsing con
texts. default policy the default allowlist is 'self'. specifi...
Trailer - HTTP
conditionals, like cache-control, max-forwards, or te), authentication headers (e.g., authorization or set-cookie), or content-encoding, content-type, content-range, and trailer itself. examples chunked transfer encoding using a trailing header in this example, the expires header is used at the end of the chunked message and serves as a trailing header. ...
...s example, the expires header is used at the end of the chunked message and serves as a trailing header. ...
...tent-type:
text/plain transfer-encoding: chunked trailer: expires 7\r\n mozilla\r\n 9\r\n developer\r\n 7\r\n network\r\n 0\r\n expires: wed, 21 oct 2015 07:28:00 gmt\r\n \r\n specifications specification title rfc 7230, section 4.4: trailer hyper
text transfer protocol (http/1.1): message syntax and routing rfc 7230, section 4.1.2: chunked trailer part hyper
text transfer protocol (http/1.1): message syntax and routing ...
Upgrade - HTTP
rotocol/2.2 directives any comma-separated list protocol names (each with optional protocol version) one or more protocol names with optional version ("/" separated). the protocols are listed in order of descending preference. ...
...ocol version) one or more protocol names with optional version ("/" separated). the protocols are listed in order of descending preference. ...
...otocols are listed in order of descending preference. ...
Redirections in HTTP - HTTP
pes of redirects, sorted into three categories: permanent redirections temporary redirections special redirections permanent redirections these redirections are meant to last forever. they imply that the original url should no longer be used, and replaced with the new one.search engine robots, rss readers, and other crawlers will update the original url for the resource. code
text method handling typical use case 301 moved permanently get methods unchanged. others may or may not be changed to get.[1] reorganization of a web site. 308 permanent redirect method and body not changed. reorganization of a web site, with non-get links/operations. [1] the specification did not intend to allow method changes, but there are e...
...directions sometimes the requested resource can't be accessed from its canonical location, but it can be accessed from another place. in this case, a temporary redirect can be used. search engine robots and other crawlers don't memorize the new, temporary url. temporary redirections are also used when creating, updating, or deleting resources, to show temporary progress pages. code
text method handling typical use case 302 found get methods unchanged. others may or may not be changed to get.[2] the web page is temporarily unavailable for unforeseen reasons. 303 see other get methods unchanged. others changed to get (body lost). used to redirect after a put or a post, so that refreshing the result page doesn't re-trigger the o...
...hange their method. 307 was created to remove the ambiguity of the behavior when using non-get methods. special redirections 304 (not modified) redirects a page to the locally cached copy (that was stale), and 300 (multiple choice) is a manual redirection: the body, presented by the browser as a web page, lists the possible redirections and the user clicks on one to select it. code
text typical use case 300 multiple choice not many: the choices are listed in an html page in the body. machine-readable choices are encouraged to be sent as link headers with rel=alternate. 304 not modified sent for revalidated conditional requests. indicates that the cached response is still fresh and can be used. alternative way of specifying redirections...
418 I'm a teapot - HTTP
the http 418 i'm a teapot client error response code indicates that the server refuses to brew coffee because it is, permanently, a teapot. a combined coffee/tea pot that is temporarily out of coffee should instead return 503. this error is a reference to hyper
text coffee pot control protocol defined in april fools' jokes in 1998 and 2014. ...
...uses to brew coffee because it is, permanently, a teapot. a combined coffee/tea pot that is temporarily out of coffee should instead return 503. this error is a reference to hyper
text coffee pot control protocol defined in april fools' jokes in 1998 and 2014. ...
...return 503. this error is a reference to hyper
text coffee pot control protocol defined in april fools' jokes in 1998 and 2014. ...
Equality comparisons and sameness - JavaScript
nary + operator). toprimitive(a) attempts to convert its object argument to a primitive value, by attempting to invoke varying sequences of a.tostring and a.valueof methods on a. traditionally, and according to ecmascript, all objects are loosely unequal to undefined and null. but most browsers permit a very narrow class of objects (specifically, the document.all object for any page), in some con
texts, to act as if they emulate the value undefined. loose equality is one such con
text: null == a and undefined == a evaluate to true if, and only if, a is an object that emulates undefined. in all other cases an object is never loosely equal to undefined or null. var num = 0; var obj = new string('0'); var str = '0'; console.log(num == num); // true console.log(obj == obj); // true console.log(st...
...t in rare cases console.log(obj == null); console.log(obj == undefined); in most cases, using loose equality is discouraged. the result of a comparison using strict equality is easier to predict, and may evaluate more quickly due to the lack of type coercion. same-value equality same-value equality addresses a final use case: determining whether two values are functionally identical in all con
texts. (this use case demonstrates an instance of the liskov substitution principle.) one instance occurs when an attempt is made to mutate an immutable property: // add an immutable negative_zero property to the number constructor. object.defineproperty(number, 'negative_zero', { value: -0, writable: false, configurable: false, enumerable: false }); function attemptmutation(v)...
... object.is when the signedness of zeros is not taken into account can be hazardous. of course, when the intent is to distinguish between -0 and +0, it does exactly what's desired. caveat: object.is and nan the object.is specification treats all instances of nan as the same object. however, since typed arrays are available, we can have distinct instances, which don't behave identically in all con
texts. for example: var f2b = x => new uint8array(new float64array([x]).buffer); var b2f = x => new float64array(x.buffer)[0]; var n = f2b(nan); n[0] = 1; var nan2 = b2f(n); nan2; // > nan object.is(nan2, nan); // > true f2b(nan); // > uint8array(8) [0, 0, 0, 0, 0, 0, 248,127) f2b(nan2); // > uint8array(8) [1, 0, 0, 0, 0, 0, 248,127) ...
Indexed collections - JavaScript
e.log(cats) // logs [ <3 empty items> ] iterating over arrays a common operation is to iterate over the values of an array, processing each one in some way. ...
...hod (and others below) that take a callback are known as iterative methods, because they iterate over the entire array in some fashion. each one takes an optional second argument called thisobject. if provided, thisobject becomes the value of the this keyword inside the body of the callback function. if not provided, as with other cases where a function is invoked outside of an explicit object con
text, this will refer to the global object (window) when using arrow function as callback, or undefined when using normal function as callback. the callback function is called with two arguments, that are array's elements. the function below compares two values and returns one of three values: for instance, the following will sort by the last letter of a string: let sortfn = function(a, b) { if ...
...ecture to achieve maximum flexibility and efficiency, javascript typed arrays split the implementation into buffers and views. a buffer (implemented by the arraybuffer object) is an object representing a chunk of data; it has no format to speak of, and offers no mechanism for accessing its contents. in order to access the memory contained in a buffer, you need to use a view. a view provides a con
text — that is, a data type, starting offset, and number of elements — that turns the data into an actual typed array. arraybuffer the arraybuffer is a data type that is used to represent a generic, fixed-length binary data buffer. you can't directly manipulate the contents of an arraybuffer; instead, you create a typed array view or a dataview which represents the buffer in a specific format,...
Quantifiers - JavaScript
r notsolongword = /\b\w{1,6}\b/g; var loooongword = /\b\w{13,}\b/g; var sentence = "why do i have to learn multiplication table?"; console.table(sentence.match(singleletterword)); // ["i"] console.table(sentence.match(notsolongword)); // [ "why", "do", "i", "have", "to", "learn", "table" ] console.table(sentence.match(loooongword)); // ["multiplication"] optional character var british
text = "he asked his neighbour a favour."; var american
text = "he asked his neighbor a favor."; var regexpending = /\w+ou?r/g; // \w+ one or several letters // o followed by an "o", // u? optionally followed by a "u" // r followed by an "r" console.table(british
text.match(regexpending)); // ["neighbour", "favour"] console.table(american
text.match(regexpending)); // ["neighbor", "favor"] gree...
... a favour."; var american
text = "he asked his neighbor a favor."; var regexpending = /\w+ou?r/g; // \w+ one or several letters // o followed by an "o", // u? ...
... by an "r" console.table(british
text.match(regexpending)); // ["neighbour", "favour"] console.table(american
text.match(regexpending)); // ["neighbor", "favor"] greedy versus non-greedy var
text = "i must be getting somewhere near the centre of the earth."; var greedyregexp = /[\w ]+/; // [\w ] a letter of the latin alphabet or a whitespace // + one or several times console.log(
text.match(greedyregexp)[0]); // "i must be getting somewhere near the centre of the earth" // almost all of the
text matches (leaves out the dot character) var nongreedyregexp = /[\w ]+?/; // notice the question mark console.log(
text.match(nongreedyregexp)); // "i" // the match is the smallest one possible specifications specification ecmascript (ecma-262)the definition of 'rege...
Deprecated and obsolete features - JavaScript
affect their use in replacement strings: property description $1-$9 parenthesized substring matches, if any. warning: using these properties can result in problems, since browser extensions can modify them. avoid them! $_ see input. $* see multiline. $& see lastmatch. $+ see lastparen. $` see leftcon
text. $' see rightcon
text. input the string against which a regular expression is matched. lastmatch the last matched characters. lastparen the last parenthesized substring match, if any. leftcon
text the substring preceding the most recent match. rightcon
text the substring following the most recent match. the following are ...
...tion global whether or not to test the regular expression against all possible matches in a string, or only against the first. ignorecase whether or not to ignore case while attempting a match in a string. lastindex the index at which to start the next match. multiline whether or not to search in strings across multiple lines. source the
text of the pattern. regexp methods the compile() method is deprecated. the valueof method is no longer specialized for regexp. use object.valueof(). function properties the caller and arguments properties are deprecated, because they leak the function caller. instead of the arguments property, you should use the arguments object inside function closures. legacy generator legacy g...
...d behaviours when writing new ecmascript code. …" obsolete features these obsolete features have been entirely removed from javascript and can no longer be used as of the indicated version of javascript. object property description __count__ returns the number of enumerable properties directly on a user-defined object. __parent__ points to an object's con
text. object.prototype.eval() evaluates a string of javascript code in the con
text of the specified object. object.observe() asynchronously observing the changes to an object. object.unobserve() remove observers. object.getnotifier() creates an object that allows to synthetically trigger a change. function property description ...
Planned changes to shared memory - JavaScript
these changes provide further isolation between sites and help reduce the impact of attacks with high-resolution timers, which can be created with shared memory. starting with firefox 79, the features described in this document are enabled by default. chrome intends to implement similar restrictions. new http header bonanza as a baseline requirement, documents will need to be in a secure con
text. for top-level documents, two headers will need to be set: cross-origin-opener-policy with same-origin as value (protects your origin from attackers) cross-origin-embedder-policy with require-corp as value (protects victims from your origin) with these two headers set, postmessage() will no longer throw for sharedarraybuffer objects and shared memory across threads is therefore available. ...
...oss-origin (and cross-site) counterparts need to set the same header with cross-origin as value. note that setting the cross-origin-resource-policy header to any other value than same-origin opens up the resource to potential attacks, such as spectre. note that the cross-origin-opener-policy header limits your ability to retain a reference to popups. direct access between two top-level window con
texts will essentially only work if they are same-origin and carry the same two headers with the same two values. api changes as a result of this newly required environment, there are a couple api implications: the atomics object is always available. sharedarraybuffer objects are in principle always available, but unfortunately the constructor on the global object is hidden, unless the two heade...
...e are set, the various postmessage() apis will throw for sharedarraybuffer objects. if they are set, postmessage() on window objects and dedicated workers will function and allow for memory sharing. to avoid having to check whether postmessage() throws, self.crossoriginisolated is being standardized (a getter that returns a boolean; true if the headers are set), available in window and worker con
texts. webassembly shared memory the webassembly threads proposal allows webassembly.memory objects to be created with a new shared constructor flag. when this flag is set to true, the constructed memory object can be shared between workers via postmessage(), just like sharedarraybuffer, and the backing buffer of the memory object is a sharedarraybuffer. therefore, the requirements listed above for...
icons - Web app manifests
for example, they can be used to represent the web application amongst a list of other applications, or to integrate the web application with an os's task switcher and/or system preferences. ...
...o the image file. if src is a relative url, the base url will be the url of the manifest. type a hint as to the media type of the image. the purpose of this member is to allow a user agent to quickly ignore images with media types it does not support. purpose defines the purpose of the image, for example if the image is intended to serve some special purpose in the con
text of the host os (i.e., for better integration). purpose can have one or more of the following values, separated by spaces: monochrome: a user agent can present this icon where a monochrome icon with a solid fill is needed. the color information in the icon is discarded and only the alpha data is used. the icon can then be used by the user agent like a mask over any solid fill. ...
...or information in the icon is discarded and only the alpha data is used. the icon can then be used by the user agent like a mask over any solid fill. maskable: the image is designed with icon masks and safe zone in mind, such that any part of the image outside the safe zone can safely be ignored and masked away by the user agent. any: the user agent is free to display the icon in any con
text (this is the default value). specification specification status comment feedback web app manifestthe definition of 'icons' in that specification. working draft initial definition. web app manifest working group drafts ...
MathML attribute reference - MathML
align <mtable> <munder>, <mover>, <munderover> <mstack> specifies different alignments of several elements (see element pages for details). unimplemented alignmentscope <mtable> a boolean value specifying whether table columns should act as alignment scopes or not. unimplemented altimg altimg-width altimg-height altimg-valign alt
text <math> visual and
textual fall-back options. bevelled <mfrac> specifies the style how the fraction should be displayed. deprecated. use u+2044 (fraction slash) instead. unimplemented charalign <mstack> specifies the horizontal alignment of digits. close <mfenced> a string for the closing delimiter. columnalign <mtable>, <mtd>, <mtr>...
...point <mstyle> if the decimalpoint value is used to specify the alignment, this attribute is specifying the character for the alignment point within <mstack> and <mtable> columns. denomalign <mfrac> the alignment of the denominator under the fraction. depth <mpadded> sets or increments the depth. see length. dir <math>, <mi>, <mo>, <mrow>, <ms>, <m
text> the
text direction. possible values are either ltr (left to right) or rtl (right to left). display <math> specifies the rendering mode. the values block and inline are allowed. displaystyle <mstyle>, <mtable> a boolean value specifying whether more vertical space is used for displayed equations or, if set to false, a more compact layout is used to display formula...
... long division layout. lspace <mo>, <mpadded> the amount of space before the operator (see length for values and units). lquote <ms> the opening quote character (depends on dir) to enclose the content. the default value is """. mathbackground all the background color. you can use #rgb, #rrggbb and html color names. mathcolor all the
text color. you can use #rgb, #rrggbb and html color names. mathsize <mi>, <mn>, <mo>, <ms>, <m
text> the size of the content. mathvariant <mi>, <mn>, <mo>, <ms>, <m
text> the logical class of the identifier, which varies in typography. maxsize <mo> the maximum size of the operator. unimplemented minlabelspacing <mtable> a length value specifin...
<mi> - MathML
you can use #rgb, #rrggbb and html color names. mathsize the size of the content. ...
...you can use #rgb, #rrggbb and html color names. mathsize the size of the content. ...
...you can use #rgb, #rrggbb and html color names. mathsize the size of the content. see length for possible values. deprecated values are: small, normal and big. these will be removed in the future. mathvariant this logical class of the identifier, which varies in typography. ...
MathML documentation index - MathML
ent is used to display non-standard symbols where existing unicode characters are not available. it may be used within token elements. 17 <mi> mathml, mathml reference, mathml:element, mathml:token elements the mathml <mi> element indicates that the content should be rendered as an identifier such as function names, variables or symbolic constants. you can also have arbitrary
text in it to mark up terms. 18 <mlabeledtr> mathml, mathml reference, mathml:element, mathml:tabular math the mathml <mlabeledtr> element is used to represent a label in a row either on the left or on the right side (determined using the side attribute on the <mtable> element). child elements of <mlabeledtr> must be <mtd> elements. the first child is the label whereas all other c...
...to represent square matrices. to learn more about the mathematical background of tensors refer to the entry on wikipedia. 20 <mn> mathml, mathml reference, mathml:element, mathml:token elements the mathml <mn> element represents a numeric literal which is normally a sequence of digits with a possible separator (a dot or a comma). however, it is also allowed to have arbitrary
text in it which is actually a numeric quantity, for example "eleven". 21 <mo> mathml, mathml reference, mathml:element, mathml:token elements the mathml <mo> element represents an operator in a broad sense. besides operators in strict mathematical meaning, this element also includes "operators" like parentheses, separators like comma and semicolon, or "absolute value" bars. ...
... inside a <mtable> only <mtr> and <mtd> elements may appear. these elements are similar to <table> , <tr> and <td> elements of html. 35 <mtd> mathml, mathml reference, mathml:element, mathml:tabular math the mathml <mtd> element represents a cell in a table or a matrix. it may only appear in a <mtr> element. this element is similar to the <td> element of html. 36 <m
text> mathml, mathml reference, mathml:element, mathml:token elements the mathml element is used to render arbitrary
text with no notational meaning, such as comments or annotations. 37 <mtr> mathml, mathml reference, mathml:element, mathml:tabular math the mathml <mtr> element represents a row in a table or a matrix. it may only appear in a <mtable> element. this eleme...
Autoplay guide for media and Web Audio APIs - Web media technologies
and autoplay blocking applies to them. inaudible media are not affected by autoplay blocking. autoplay and autoplay blocking the term autoplay refers to any feature that causes audio to begin to play without the user specifically requesting that playback begin. this includes both the use of html attributes to autoplay media as well as the user of javascript code to start playback outside the con
text of handling user input. that means that both of the following are considered autoplay behavior, and are therefore subject to the browser's autoplay blocking policy: <audio src="/music.mp4" autoplay> and audioelement.play(); the following web features and apis may be affected by autoplay blocking: the html <audio> and <video> elements the web audio api from the user's perspective, a web...
...in a background tab. at this point, your site or app can begin whatever it needs to do that relies upon the video having been started up. note: this approach doesn't differentiate between autoplay and the user starting playback manually. the play() method the term "autoplay" also refers to scenarios in which a script tries to trigger the playback of media that includes audio, outside the con
text of handling a user input event. this is done by calling the media element's play() method. note: it is strongly recommended that you use the autoplay attribute whenever possible, because support for autoplay preferences are more widespread for the autoplay attribute than for other means of playing media automatically. it also lets the browser take responsibility for starting playback, letting i...
...sion issue, such as autoplay being denied. if that's the case, we should present a user interface to let the user manually start playback; that's handled here by a function showplaybutton(). any other errors are handled as appropriate. autoplay using the web audio api in the web audio api, a web site or app can start playing audio using the start() method on a source node linked to the audiocon
text. doing so outside the con
text of handling a user input event is subject to autoplay rules. more content will come soon; autoplay blocking is still being worked on at mozilla. if others have it already, they are welcome to pitch in with this section... the autoplay feature policy in addition to the browser-side management and control over autoplay functionality described above, a web server can...
Digital audio concepts - Web media technologies
much competition for network capacity, especially on slower networks, this amount of data may be too much to viably transmit during any kind of real-time applications. to solve this problem, the audio must be made smaller using compression. note: network bandwidth is obviously not the same thing as audio bandwidth, which is discussed in sampling audio, above. audio compression basics unlike
text and many other kinds of data, audio data tends to be noisy, meaning the data rarely consists of a series of exactly repeated bytes or byte sequences. as a result, audio data is difficult to compress using traditional algorithms such as those used by generral-purpose tools like zip, which usually work by replacing repeating sequences of data with a shorthand representation. there are several tech...
...ou can potentially find special filtering techniques applicable specifically to that kind of sound, that will optimize the encoding. the most commonly-used compression methods for audio apply the science of psychoacoustics. this is the science that studies how humans percieve sound, and what parts of the audio frequencies we hear are most important to how we respond to those sounds, given the con
text and content of the sound. factors such as the ability to sense the change in frequency of a sound, the overall range of human hearing versus the frequencies of the audio signal, audio localization, and so forth all can be considered by a codec. by using a sound (no pun intended) understanding of psychoacoustics, it's possible to design a compression method that will minimize the compressed size ...
...ethod that will minimize the compressed size of the audio while maximizing the percieved fidelity of the sound. an algorithm employing psychoacoustics may use any of the techniques mentioned here, and will almost certainly apply others as well. all of this means there is a fundamental question that has to be asked and answered before choosing a codec: given the content of the sound, the usage con
text, and the target audience, is it acceptable to lose some degree of audio fidelity, and if so, how much; or is it necessary that, upon decoding the data, the result be identical to the source audio? lossy vs lossless compression if loss of detail and potentially fidelity is unacceptable or undesirable, a lossless codec is preferred. on the other hand, if some degree of reduction of audio fidelity...
Performance fundamentals - Web Performance
what is performance? ultimately, user-perceived performance is the only performance that matters. users provide inputs to the system through touch, movement, and speech. in return, they perceive outputs through sight, touch, and hearing. performance is the quality of system outputs in response to user inputs. all other things being equal, code optimized for some target besides user-perceived performance (hereafter upp) loses when competing against code optimized for upp. ...
...pixels displayed to the user. this is a familiar concept: everyone prefers, say, games that display 60 frames per second over ones that display 10 frames per second, even if they can't explain why. framerate is important as a "quality of service" metric. computer displays are designed to "fool" user's eyes, by delivering photons to them that mimic reality. for example, paper covered with printed
text reflects photons to the user's eyes in some pattern. by manipulating pixels, a reader app emits photons in a similar pattern to "fool" the user's eyes. as your brain infers, motion is not jerky and discrete, but rather "updates" smoothly and continuously. (strobe lights are fun because they turn that upside down, starving your brain of inputs to create the illusion of discrete reality). on a com...
...t. to display graphics, developers can use html or css (i.e. high-level declarative languages), or use low-level imperative interfaces offered by the <canvas> element (which includes webgl). somewhere "in between" html/css and canvas is svg, which offers some benefits of both. html and css greatly increase productivity, sometimes at the expense of framerate or pixel-level control over rendering.
text and images reflow automatically, ui elements automatically receive the system theme, and the system provides "built-in" support for some use cases developers may not think of initially, like different-resolution displays or right-to-left languages. the canvas element offers a pixel buffer directly for developers to draw on. this gives developers pixel-level control over rendering and precise con...
class - SVG: Scalable Vector Graphics
n element. you may assign the same class name or names to any number of elements, however, multiple class names must be separated by whitespace characters. an element's class name serves two key roles: as a style sheet selector, for when an author assigns style information to a set of elements. for general use by the browser. you can use this class to style svg content using css. usage con
text categories none value <list-of-class-names> animatable yes normative document svg 1.1 (2nd edition): the class attribute list-of-ts <list-of-ts> (where t is some type.) a list consists of a separated sequence of values. unless explicitly described differently, lists within svg's xml attributes can be either comma-separated (with option...
...<list-of-ts> type are represented by an interface specific for the particular type t. for example, a <list-of-lengths> is represented in the svg dom using an svglengthlist or svganimatedlengthlist object. ...
...iffuselighting> <fedisplacementmap> <feflood> <fegaussianblur> <feimage> <femerge> <femorphology> <feoffset> <fespecularlighting> <fetile> <feturbulence> <filter> <font> <foreignobject> <g> <glyph> <glyphref> <image> <line> <lineargradient> <marker> <mask> <missing-glyph> <path> <pattern> <polygon> <polyline> <radialgradient> <rect> <stop> <svg> <switch> <symbol> <
text> <
textpath> <title> <tref> <tspan> <use> ...
color-rendering - SVG: Scalable Vector Graphics
property. ...
...y. ...
...00%; } <svg viewbox="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient)" color-rendering="optimizequality" /> <
text x="45" y="50%" color-rendering="optimizequality">quality-optimized</
text> <circle cx="100" cy="100" r="100" color-rendering="optimizespeed" fill="url(#gradient)" style="transform: translatex(240px);" /> <
text x="290" y="50%" color-rendering="optimizespeed">speed-optimized</
text> </svg> usage notes value auto | optimizespeed | optimizequality default value a...
direction - SVG: Scalable Vector Graphics
the direction attribute specifies the inline-base direction of a <
text> or <tspan> element. it defines the start and end points of a line of
text as used by the
text-anchor and inline-size properties. it also may affect the direction in which characters are positioned if the unicode-bidi property's value is either embed or bidi-override. it applies only to glyphs oriented perpendicular to the inline-base direction, which includes the usual case of horizontally-oriented latin or arabic
text and the case of narrow-cell latin or arabic characters rotated 90 degrees clockwise relative to a top-to-bottom inline-base direction. in many cases, the bidirectional unicode algorithm produces the desired result automatically, so this attribute doesn't need to be specified in those cases. for other case...
...se relative to a top-to-bottom inline-base direction. in many cases, the bidirectional unicode algorithm produces the desired result automatically, so this attribute doesn't need to be specified in those cases. for other cases, such as when using right-to-left languages, it may be sufficient to add the direction attribute to the outermost <svg> element, and allow that direction to inherit to all
text elements: note: as a presentation attribute, direction can be used as a css property. see css direction for further information. as a presentation attribute, it can be applied to any element but it only has effect on shapes and
text con
text elements, including: <altglyph>, <
textpath>, <
text>, <tref>, and <tspan>. html, body, svg { height: 100%; } <svg viewbox="0 0 600 72" xmlns="http://w...
...on can be used as a css property. see css direction for further information. as a presentation attribute, it can be applied to any element but it only has effect on shapes and
text con
text elements, including: <altglyph>, <
textpath>, <
text>, <tref>, and <tspan>. html, body, svg { height: 100%; } <svg viewbox="0 0 600 72" xmlns="http://www.w3.org/2000/svg" direction="rtl" lang="fa"> <
text x="300" y="50"
text-anchor="middle" font-size="36">داستان svg 1.1 se طولا ني است.</
text> </svg> usage notes value ltr | rtl default value ltr animatable yes specifications specification status comment css writing modes module level 3the definition of 'direction' in that specification. proposed rec...
fill-rule - SVG: Scalable Vector Graphics
the fill-rule attribute is a presentation attribute defining the algorithm to use to determine the inside part of a shape. note: as a presentation attribute, fill-rule can be used as a css property. as a presentation attribute, it can be applied to any element but it has effect only on the following eight elements: <altglyph>, <path>, <polygon>, <polyline>, <
text>, <
textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="-10 -10 220 120" xmlns="http://www.w3.org/2000/svg"> <!-- default value for fill-rule --> <polygon fill-rule="nonzero" stroke="red" points="50,0 21,90 98,35 2,35 79,90"/> <!-- the center of the shape has two path segments (shown by the red stroke) between it and infinity. it is therefore considered outside the shape, and not filled.
... samsung internet android ? ...
...ty unknown specifications specification status comment scalable vector graphics (svg) 2the definition of 'fill-rule' in that specification. ...
font-stretch - SVG: Scalable Vector Graphics
the font-stretch attribute indicates the desired amount of condensing or expansion in the glyphs used to render the
text. note: as a presentation attribute, font-stretch can be used as a css property. see the css font-stretch property for more information. ...
... the font-stretch attribute indicates the desired amount of condensing or expansion in the glyphs used to render the
text. note: as a presentation attribute, font-stretch can be used as a css property. see the css font-stretch property for more information. ...
... the font-stretch attribute indicates the desired amount of condensing or expansion in the glyphs used to render the
text. note: as a presentation attribute, font-stretch can be used as a css property. see the css font-stretch property for more information. ...
href - SVG: Scalable Vector Graphics
the href attribute defines a link to a resource as a reference url. the exact meaning of that link depends on the con
text of each element using it. note: specifications before svg 2 defined an xlink:href attribute, which is now rendered obsolete by the href attribute. fifteen elements are using this attribute: <a>, <animate>, <animatemotion>, <animatetransform>, <discard>, <feimage>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <set>, <
textpath>, and <use> html, body, svg { height: 100%; } <svg viewbox="0 0 160 40" xmlns="http://www.w3.org/2000/svg"> <a href="https://developer.mozilla.org/"><
text x="10" y="25">mdn web docs</
text></a> </svg> in svg a for <a>, href defines the location of the referenced object, expressed as a url reference. ...
...ate gradient element; to be valid, the reference must be to a different <lineargradient> or <radialgradient> element. value <url> default value none animatable yes script for <script>, href defines a url referring to an external resource containing the script code. value <url> default value none animatable no
textpath for <
textpath>, href defines a url referring to the <path> element or basic shape onto which the
text will be rendered if no path attribute is provided. on the <
textpath> element, the href attribute is animatable. value <url> default value none animatable yes use for <use>, href defines a url referring to an element or fragment within an svg docum...
...ics (svg) 2the definition of 'href for <radialgradient>' in that specification. candidate recommendation defines href for the <radialgradient> element. scalable vector graphics (svg) 2the definition of 'href for <script>' in that specification. candidate recommendation defines href for the <script> element. scalable vector graphics (svg) 2the definition of 'href for <
textpath>' in that specification. candidate recommendation defines href for the <
textpath> element. scalable vector graphics (svg) 2the definition of 'href for <use>' in that specification. candidate recommendation defines href for the <use> element. ...
lengthAdjust - SVG: Scalable Vector Graphics
the lengthadjust attribute controls how the
text is stretched into the length defined by the
textlength attribute. four elements are using this attribute: <
text>, <
textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg width="300" height="150" xmlns="http://www.w3.org/2000/svg"> <g font-face="sans-serif"> <
text x="0" y="20"
textlength="300" lengthadjust="spacing"> stretched using spacing only. </
text> <
text x="0" y="50"
textlength="300" lengthadjust="spacingandglyphs"> stretched using spacing and glyphs. </
text> <
text x="0" y="80"
textlength="100" lengthadjust="spacing"> shrunk using spacing only. ...
...http://www.w3.org/2000/svg"> <g font-face="sans-serif"> <
text x="0" y="20"
textlength="300" lengthadjust="spacing"> stretched using spacing only. </
text> <
text x="0" y="50"
textlength="300" lengthadjust="spacingandglyphs"> stretched using spacing and glyphs. </
text> <
text x="0" y="80"
textlength="100" lengthadjust="spacing"> shrunk using spacing only. </
text> <
text x="0" y="110"
textlength="100" lengthadjust="spacingandglyphs"> shrunk using spacing and glyphs. ...
... stretched using spacing only. </
text> <
text x="0" y="50"
textlength="300" lengthadjust="spacingandglyphs"> stretched using spacing and glyphs. </
text> <
text x="0" y="80"
textlength="100" lengthadjust="spacing"> shrunk using spacing only. </
text> <
text x="0" y="110"
textlength="100" lengthadjust="spacingandglyphs"> shrunk using spacing and glyphs. </
text> </g> </svg> usage notes value spacing | spacingandglyphs default value spacing animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'lengthadjust' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second ...
overflow - SVG: Scalable Vector Graphics
it has the same parameter values and meaning as the css overflow property, however, the following additional points apply: if it has a value of visible, the attribute has no effect (i.e., a clipping rectangle is not created). if the overflow property has the value hidden or scroll, a clip of the exact size of the svg viewport is applied. when scroll is specified on an <svg> element, a scrollbar or panner is normally shown for the svg viewport whether or not any of its content is clipped. ...
..., the <pattern> element, and the <marker> element to be hidden by default. note: as a presentation attribute, overflow can be used as a css property. see the css opacity property for more information. ...
...sed as a css property. see the css opacity property for more information. as a presentation attribute, it can be applied to any element but it has effect only on the following eight elements: <foreignobject>, <iframe>, <image>, <marker>, <pattern>, <symbol>, <svg>, and <
text> html, body, svg { height: 100%; } <svg viewbox="0 0 200 30" xmlns="http://www.w3.org/2000/svg" overflow="auto"> <
text y="20">this
text is wider than the svg, so there should be a scrollbar shown.</
text> </svg> usage notes value visible | hidden | scroll | auto default value visible animatable yes for a description of the values, please see the css overflow property. specifications specification status comment css level 2 (revision 1)th...
paint-order - SVG: Scalable Vector Graphics
the paint-order attribute specifies the order that the fill, stroke, and markers of a given shape or
text element are painted. note: as a presentation attribute, paint-order can be used as a css property. as a presentation attribute, it can be applied to any element but it has effect only on the following ten elements: <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, <rect>, <
text>, <
textpath>, and <tspan> usage notes value normal | [ fill || stroke || markers ] default value normal animatable yes normal this value indicates that the fill will be painted first, then the stroke, and finally the markers. [ fill || stroke || markers ] the order of these three keywords indicates the order in which the painting happens, from left to ri...
...g stroke is equivalent to stroke fill markers. ...
...2000/svg" width="400" height="200"> <lineargradient id="g" x1="0" y1="0" x2="0" y2="1"> <stop stop-color="#888"/> <stop stop-color="#ccc" offset="1"/> </lineargradient> <rect width="400" height="200" fill="url(#g)"/> <g fill="crimson" stroke="white" stroke-width="6" stroke-linejoin="round"
text-anchor="middle" font-family="sans-serif" font-size="50px" font-weight="bold"> <
text x="200" y="75">stroke over</
text> <
text x="200" y="150" paint-order="stroke" id="stroke-under">stroke under</
text> </g> </svg> the example would be rendered as follows: the stroke under effect could be achieved via the following css property: #stroke-under { paint-order: stroke; } specifications specification status comment scalable vector graphics (svg)...
writing-mode - SVG: Scalable Vector Graphics
the writing-mode attribute specifies whether the initial inline-progression-direction for a <
text> element shall be left-to-right, right-to-left, or top-to-bottom. the writing-mode attribute applies only to <
text> elements; the attribute is ignored for <tspan>, <tref>, <altglyph> and <
textpath> sub-elements. (note that the inline-progression-direction can change within a <
text> element due to the unicode bidirectional algorithm and properties direction and unicode-bidi.) note: as a presentation attribute, writing-mode can be used as a css property. see the css writing-mode property for more information. ...
...both the writing mode and the typographic mode are horizontal. ...
...both the writing mode and the typographic mode are horizontal. ...
xlink:title - SVG: Scalable Vector Graphics
the xlink:title attribute is used to describe the meaning of a link or resource in a human-readable fashion. the use of this information is highly dependent on the type of processing being done. it may be used, for example, to make titles available to applications used by visually impaired users, or to create a table of links, or to present help
text that appears when a user lets a mouse pointer hover over a starting resource. note: new content should use a <title> child element rather than a xlink:title attribute. these elements are using this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <color-profile>, <cursor>, <feimage>, <filter>, <font-face-uri>, <glyphref>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <s...
...er a starting resource. note: new content should use a <title> child element rather than a xlink:title attribute. these elements are using this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <color-profile>, <cursor>, <feimage>, <filter>, <font-face-uri>, <glyphref>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <set>, <
textpath>, <tref>, and <use> usage con
text value <anything> default value none animatable no <anything> this value specifies the title used to describe the meaning of the link or resource. specifications specification status comment scalable vector graphics (svg) 2the definition of 'seed' in that specification. candidate...
...ing> this value specifies the title used to describe the meaning of the link or resource. specifications specification status comment scalable vector graphics (svg) 2the definition of 'seed' in that specification. candidate recommendation deprecated the attribute and made it only apply to <a>, <image>, <lineargradient>, <pattern>, <radialgradient>, <script>, <
textpath>, and <use> scalable vector graphics (svg) 1.1 (second edition)the definition of 'seed' in that specification. recommendation initial definition ...
<altGlyph> - SVG: Scalable Vector Graphics
the <altglyph> svg element allows sophisticated selection of the glyphs used to render its child character data. usage con
text categories
text content element,
text content child elementpermitted contentany elements or character data attributes x this attribute defines the corresponding absolute x-coordinates for rendering the element. value type: <list-of-coordinates> ; default value: absolute x-coordinate of ancestor <
text> or <tspan>; animatable: yes y this attribute defines the corresponding absolute y-coordinates for rendering the element. value type: <list-of-coordinates> ; default value: absolute y-coordinate of ancestor <
text> or <tspan>; animatable: yes dx this attribute indicates a shift along the x-axis on the position of the element. value type: <list-of-coordinates...
...able: yes y this attribute defines the corresponding absolute y-coordinates for rendering the element. value type: <list-of-coordinates> ; default value: absolute y-coordinate of ancestor <
text> or <tspan>; animatable: yes dx this attribute indicates a shift along the x-axis on the position of the element. value type: <list-of-coordinates> ; default value: relative x-coordinate of ancestor <
text> or <tspan>; animatable: yes dy this attribute indicates a shift along the x-axis on the position of the element. value type: <list-of-coordinates> ; default value: relative y-coordinate of ancestor <
text> or <tspan>; animatable: yes rotate this attribute defines the supplemental rotation that will be applied to the element. value type: <list-of-numbers> ; default value: none; animatable: y...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<altglyph>' in that specif...
<feComponentTransfer> - SVG: Scalable Vector Graphics
e performs color-component-wise remapping of data for each pixel. it allows operations like brightness adjustment, contrast adjustment, color balance or thresholding. the calculations are performed on non-premultiplied color values. the colors are modified by changing each channel (r, g, b, and a) to the result of what the children <fefuncr>, <fefuncb>, <fefuncg>, and <fefunca> return. usage con
text categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<fefunca>, <fefuncr>, <fefuncb>, <fefuncg> attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes in dom interface this element implements the svgfecomponenttransferelement interface. example svg <svg x...
... id="gamma" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="gamma" amplitude="4" exponent="7" offset="0"></fefuncr> <fefuncg type="gamma" amplitude="4" exponent="4" offset="0"></fefuncg> <fefuncb type="gamma" amplitude="4" exponent="1" offset="0"></fefuncb> </fecomponenttransfer> </filter> </defs> <g font-weight="bold"> <
text x="0" y="20">default</
text> <rect x="0" y="30" width="100%" height="20"></rect> <
text x="0" y="70">identity</
text> <rect x="0" y="80" width="100%" height="20" style="filter:url(#identity)"></rect> <
text x="0" y="120">table lookup</
text> <rect x="0" y="130" width="100%" height="20" style="filter:url(#table)"></rect> <
text x="0" y="170">discrete table lookup</
text> <rect...
...> <
text x="0" y="70">identity</
text> <rect x="0" y="80" width="100%" height="20" style="filter:url(#identity)"></rect> <
text x="0" y="120">table lookup</
text> <rect x="0" y="130" width="100%" height="20" style="filter:url(#table)"></rect> <
text x="0" y="170">discrete table lookup</
text> <rect x="0" y="180" width="100%" height="20" style="filter:url(#discrete)"></rect> <
text x="0" y="220">linear function</
text> <rect x="0" y="230" width="100%" height="20" style="filter:url(#linear)"></rect> <
text x="0" y="270">gamma function</
text> <rect x="0" y="280" width="100%" height="20" style="filter:url(#gamma)"></rect> </g> </svg> css rect { fill: url(#rainbow); } result specifications specification status comment filter effe...
<foreignObject> - SVG: Scalable Vector Graphics
the <foreignobject> svg element includes elements from a different xml namespace. in the con
text of a browser, it is most likely (x)html. ...
...nts from a different xml namespace. in the con
text of a browser, it is most likely (x)html. html,body,svg { height:100% } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <style> div { color: white; font: 18px serif; height: 100%; overflow: auto; } </style> <polygon points="5,5 195,10 185,185 10,195" /> <!-- common use case: embed html
text into svg --> <foreignobject x="20" y="20" width="160" height="160"> <!-- in the con
text of svg embedded in an html document, the xhtml namespace could be omitted, but it is mandatory in the con
text of an svg document --> <div xmlns="http://www.w3.org/1999/xhtml"> lorem ipsum dolor sit amet, consectetur adipiscing elit. sed mollis mollis mi ut ultricies.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<foreignobject>' in that specification.
<svg> - SVG: Scalable Vector Graphics
he document requires. value type: <string> ; default value: none; animatable: no contentscripttype deprecated since svg 2 the default scripting language used by the svg fragment. value type: <string> ; default value: application/ecmascript; animatable: no contentstyletype deprecated since svg 2 the default style sheet language used by the svg fragment. value type: <string> ; default value:
text/css; animatable: no height the displayed height of the rectangular viewport. (not the height of its coordinate system.) value type: <length>|<percentage> ; default value: auto; animatable: yes preserveaspectratio how the svg fragment must be deformed if it is displayed with a different aspect ratio. value type: (none| xminymin| xmidymin| xmaxymin| xminymid| xmidymid| xmaxymid| xminymax| xmi...
...a-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-value
text, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <...
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<svg>' in that specification. recommendation initial definition ...
SVG element reference - SVG: Scalable Vector Graphics
<fetile> <feturbulence> <filter> <foreignobject> g <g> h <hatch> <hatchpath> i <image> l <line> <lineargradient> m <marker> <mask> <mesh> <meshgradient> <meshpatch> <meshrow> <metadata> <mpath> p <path> <pattern> <polygon> <polyline> r <radialgradient> <rect> s <script> <set> <solidcolor> <stop> <style> <svg> <switch> <symbol> t <
text> <
textpath> <title> <tspan> u <unknown> <use> v <view> svg elements by category animation elements <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <discard>, <mpath>, <set> basic shapes <circle>, <ellipse>, <line>, <polygon>, <polyline>, <rect> container elements <a>, <defs>, <g>, <marker>, <mask>, <missing-glyph>, <pattern>, <svg>, <switch>, <symbol>, <unkn...
...femergenode>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile>, <feturbulence> font elements <font>, <font-face>, <font-face-format>, <font-face-name>, <font-face-src>, <font-face-uri>, <hkern>, <vkern> gradient elements <lineargradient>, <meshgradient>, <radialgradient>, <stop> graphics elements <circle>, <ellipse>, <image>, <line>, <mesh>, <path>, <polygon>, <polyline>, <rect>, <
text>, <use> graphics referencing elements <mesh>, <use> light source elements <fedistantlight>, <fepointlight>, <fespotlight> never-rendered elements <clippath>, <defs>, <hatch>, <lineargradient>, <marker>, <mask>, <meshgradient>, <metadata>, <pattern>, <radialgradient>, <script>, <style>, <symbol>, <title> paint server elements <hatch>, <lineargradient>, <meshgradient>, <pattern>, <radialgra...
...lineargradient>, <marker>, <mask>, <meshgradient>, <metadata>, <pattern>, <radialgradient>, <script>, <style>, <symbol>, <title> paint server elements <hatch>, <lineargradient>, <meshgradient>, <pattern>, <radialgradient>, <solidcolor> renderable elements <a>, <circle>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <mesh>, <path>, <polygon>, <polyline>, <rect>, <svg>, <switch>, <symbol>, <
text>, <
textpath>, <tspan>, <unknown>, <use> shape elements <circle>, <ellipse>, <line>, <mesh>, <path>, <polygon>, <polyline>, <rect> structural elements <defs>, <g>, <svg>, <symbol>, <use>
text content elements <altglyph>, <altglyphdef>, <altglyphitem>, <glyph>, <glyphref>, <
textpath>, <
text>, <tref>, <tspan>
text content child elements <altglyph>, <
textpath>, <tref>, <tspan> uncategorized ...
SVG and CSS - SVG: Scalable Vector Graphics
this page illustrates the application of css to the specialized language for creating graphics: svg. below you'll create a simple demonstration that runs in your svg-enabled browser. note: elements referenced by <use> elements inherit the styles from that element. so to apply different styles to them you should use css custom properties. example make a new svg document as a plain
text file, doc8.svg. copy and paste the content from here, making sure that you scroll to get all of it: <svg width="600px" height="600px" viewbox="-300 -300 600 600" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>svg demonstration</title> <desc>mozilla css getting started - svg demonstration</desc> <defs> <radialgradient id="fade" cx="0" cy="0" r="...
...s="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>svg demonstration</title> <desc>mozilla css getting started - svg demonstration</desc> <defs> <radialgradient id="fade" cx="0" cy="0" r="200" gradientunits="userspaceonuse"> <stop id="fade-stop-1" offset="33%"/> <stop id="fade-stop-2" offset="95%"/> </radialgradient> </defs> <
text id="heading" x="-280" y="-270">svg demonstration</
text> <
text id="caption" x="-280" y="-250">move your mouse pointer over the flower.</
text> <g id="flower"> <circle id="overlay" cx="0" cy="0" r="200" stroke="none" fill="url(#fade)"/> <g id="outer-petals"> <g class="quadrant"> <g class="segment"> <path class="segment-fill" d="m0,0 v-200 a40,40 0 0,0 -62,10 z"...
... <use xlink:href="#quadrant" transform="rotate(90)"/> <use xlink:href="#quadrant" transform="rotate(180)"/> <use xlink:href="#quadrant" transform="rotate(270)"/> </g> <radialgradient id="fade" cx="0" cy="0" r="200" gradientunits="userspaceonuse"> <stop id="fade-stop-1" offset="33%"/> <stop id="fade-stop-2" offset="95%"/> </radialgradient> </defs> <
text id="heading" x="-280" y="-270">svg demonstration</
text> <
text id="caption" x="-280" y="-250">move your mouse pointer over the flower.</
text> <g id="flower"> <circle id="overlay" cx="0" cy="0" r="200" stroke="none" fill="url(#fade)"/> <use id="outer-petals" xlink:href="#petals"/> <use id="inner-petals" xlink:href="#petals" transform="rotate(9) scale(0.33)"/> </g> </svg> ...
Web Components
om elements defined with customelementregistry.define()). :host: selects the shadow host of the shadow dom containing the css it is used inside. :host(): selects the shadow host of the shadow dom containing the css it is used inside (so you can select a custom element from inside its shadow dom) — but only if the selector given as the function's parameter matches the shadow host. :host-con
text(): selects the shadow host of the shadow dom containing the css it is used inside (so you can select a custom element from inside its shadow dom) — but only if the selector given as the function's parameter matches the shadow host's ancestor(s) in the place it sits inside the dom hierarchy. css pseudo-elements pseudo-elements relating specifically to custom elements: ::part: r...
...nt interface related to shadow dom: the element.attachshadow() method attaches a shadow dom tree to the specified element. the element.shadowroot property returns the shadow root attached to the specified element, or null if there is no shadow root attached. relevant node additions additions to the node interface relevant to shadow dom: the node.getrootnode() method returns the con
text object's root, which optionally includes the shadow root if it is available. the node.isconnected property returns a boolean indicating whether or not the node is connected (directly or indirectly) to the con
text object, e.g. the document object in the case of the normal dom, or the shadowroot in the case of a shadow dom. event extensions extensions to the event interface related to shado...
.... the associated dom interface is htmltemplateelement. <slot> a placeholder inside a web component that you can fill with your own markup, which lets you create separate dom trees and present them together. the associated dom interface is htmlslotelement. the slot global html attribute assigns a slot in a shadow dom shadow tree to an element. slotable a mixin implemented by both element and
text nodes, defining features that allow them to become the contents of an <slot> element. the mixin defines one attribute, slotable.assignedslot, which returns a reference to the slot the node is inserted in. element extensions extensions to the element interface related to slots: element.slot: returns the name of the shadow dom slot attached to the element. css pseudo-elements pseudo-...
current - XPath
or self syntax). the following two are symantically equivalent. ...
...or self syntax). the following two are symantically equivalent. <xsl:value-of select="current()"/> <xsl:value-of select="."/> in an inner expression (e.g. in square brackets), the current node is still the same as it would have been in an outermost expression. ...
...thus in <xsl:value-of select="foo/bar[. = x]"/> the . returns the bar node, which may be different from the current node. defined xslt 1.0 12.4 gecko support supported. ...
<xsl:stylesheet> - XSLT: Extensible Stylesheet Language Transformations
butes exclude-result-prefixes specifies any namespace used in this document that should not be sent to the output document. the list is whitespace separated. extension-element-prefixes specifies a space-separated list of any namespace prefixes for extension elements in this document. default-collation specifies the default collation used by all xpath expressions appearing in attributes or
text value templates that have the element as an ancestor, unless overridden by another default-collation attribute on an inner element. it also determines the collation used by certain xslt constructs (such as <xsl:key> and xsl:for-each-group) within its scope. default-mode defines the default value for the mode attribute of all <xsl:template> and <xsl:apply-templates> elements within its scope. d...
...so determines the collation used by certain xslt constructs (such as <xsl:key> and xsl:for-each-group) within its scope. default-mode defines the default value for the mode attribute of all <xsl:template> and <xsl:apply-templates> elements within its scope. default-validation defines the default value of the validation attribute of all relevant instructions appearing within its scope. expand-
text determines whether descendant
text nodes of the element are treated as
text value templates. id specifies an id for this stylesheet. this is most often used when the stylesheet is embedded in another xml document. input-type-annotations specifies whether type annotations are stripped from the element so the same results are produced whether the source documents have been validated against a ...
...lt-namespace specifies the namespace that will be used if the element name is unprefixed or an unprefixed type name within an xpath expression. type required outermost element of stylesheet. specifications specification status comment xslt 3.0the definition of '<xsl:stylesheet>' in that specification. recommendation added the attributes default-mode, expand-
text, and use-when. xslt 2.0 added the attributes xpath-default-namespace, default-validation, default-collation, and input-type-annotations and made all attributes except version optional. xslt 1.0 initial definition ...
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
ment annotations that follow include a description, a syntax listing, a list of required and optional attributes, a description of type and position, its source in the w3c recommendation and an explanation of the degree of present gecko support. use the {{listsubpages}} macro once the bcd for <xsl:fallback>, <xsl:import>, <xsl:namespace-alias>, <xsl:number>, <xsl:output>, <xsl:stylesheet>, <xsl:
text> and <xsl:value-of> is fully migrated. <xsl:apply-imports><xsl:apply-templates><xsl:attribute-set><xsl:attribute><xsl:call-template><xsl:choose><xsl:comment><xsl:copy-of><xsl:copy><xsl:decimal-format><xsl:element><xsl:fallback><xsl:for-each><xsl:if><xsl:import><xsl:include><xsl:key><xsl:message><xsl:namespace-alias><xsl:number><xsl:otherwise><xsl:output><xsl:param><xsl:preserve-space><xsl:process...
...s><xsl:attribute-set><xsl:attribute><xsl:call-template><xsl:choose><xsl:comment><xsl:copy-of><xsl:copy><xsl:decimal-format><xsl:element><xsl:fallback><xsl:for-each><xsl:if><xsl:import><xsl:include><xsl:key><xsl:message><xsl:namespace-alias><xsl:number><xsl:otherwise><xsl:output><xsl:param><xsl:preserve-space><xsl:processing-instruction><xsl:sort><xsl:strip-space><xsl:stylesheet><xsl:template><xsl:
text><xsl:transform><xsl:value-of><xsl:variable><xsl:when><xsl:with-param> <xsl:apply-imports> <xsl:apply-templates> <xsl:attribute> <xsl:attribute-set> <xsl:call-template> <xsl:choose> <xsl:comment> <xsl:copy> <xsl:copy-of> <xsl:decimal-format> <xsl:element> <xsl:fallback> (not supported) <xsl:for-each> <xsl:if> <xsl:import> (mostly supported) <xsl:include> <xsl:key> <xsl:message>...
...ot supported) <xsl:for-each> <xsl:if> <xsl:import> (mostly supported) <xsl:include> <xsl:key> <xsl:message> <xsl:namespace-alias> (not supported) <xsl:number> (partially supported) <xsl:otherwise> <xsl:output> (partially supported) <xsl:param> <xsl:preserve-space> <xsl:processing-instruction> <xsl:sort> <xsl:strip-space> <xsl:stylesheet> (partially supported) <xsl:template> <xsl:
text> (partially supported) <xsl:transform> <xsl:value-of> (partially supported) <xsl:variable> <xsl:when> <xsl:with-param> ...
WebAssembly Concepts - WebAssembly
ssembly is being created as an open standard inside the w3c webassembly community group with the following goals: be fast, efficient, and portable — webassembly code can be executed at near-native speed across different platforms by taking advantage of common hardware capabilities. be readable and debuggable — webassembly is a low-level assembly language, but it does have a human-readable
text format (the specification for which is still being finalized) that allows code to be written, viewed, and debugged by hand. keep secure — webassembly is specified to be run in a safe, sandboxed execution environment. like other web code, it will enforce the browser's same-origin and permissions policies. don't break the web — webassembly is designed so that it plays nicely with other web te...
...ascript glue code to connect webassembly to the underlying web api. so part of the glue code is implementing the functionality of each respective library used by the c/c++ code. the glue code also contains the logic for calling the above-mentioned webassembly javascript apis to fetch, load and run the .wasm file. the generated html document loads the javascript glue file and writes stdout to a <
textarea>. if the application uses opengl, the html also contains a <canvas> element that is used as the rendering target. it’s very easy to modify the emscripten output and turn it into whatever web app you require. you can find full documentation on emscripten at emscripten.org, and a guide to implementing the toolchain and compiling your own c/c++ app across to wasm at compiling from c/c++ to we...
...ten at emscripten.org, and a guide to implementing the toolchain and compiling your own c/c++ app across to wasm at compiling from c/c++ to webassembly. writing webassembly directly do you want to build your own compiler, or your own tools, or make a javascript library that generates webassembly at runtime? in the same fashion as physical assembly languages, the webassembly binary format has a
text representation — the two have a 1:1 correspondence. you can write or generate this format by hand and then convert it into the binary format with any of several webassemby
text-to-binary tools. for a simple guide on how to do this, see our converting webassembly
text format to wasm article. writing rust targeting webassembly it is also possible to write rust code and compile over to webassem...
Communicating With Other Scripts - Archive of obsolete content
ect and loads several content scripts into the page mod, then only content scripts associated with the same page can interact with each other: if two different matching pages are loaded, content scripts attached to page a cannot interact with those attached to page b. if an add-on loads two or more content scripts into the same page, or panel, using two different method (e.g. a page-mod and a con
text-menu) they can directly communicate by dispatching and listening for customevents on dom objects they can access (e.g. the window object). this is true as long as both con
text scripts have direct access to the same dom objects. the web content has no access to objects created by the content script, unless the content script explicitly makes them available. for more discussion and an example pl...
...elf.data.url("page.html") var pagemod = mod.pagemod({ include: pageurl, contentscriptfile: self.data.url("content-script.js"), contentscriptwhen: "ready" }) tabs.open(pageurl); the target web page "page.html" includes a button and a page script: <html> <head> <meta charset="utf-8"> </head> <body> <input id="message" type="button" value="send a message"/> <script type="
text/javascript" src="page-script.js"></script> </body> </html> the content script "content-script.js" adds an event listener to the button, that sends a custom event containing a message: var messenger = document.getelementbyid("message"); messenger.addeventlistener("click", sendcustomevent, false); function sendcustomevent() { var greeting = {"greeting" : "hello world"}; var event = documen...
Cross-domain Content Scripts - Archive of obsolete content
cross-domain xmlhttprequest the following add-on creates a panel whose content is the summary weather forecast for shetland. if you want to try it out, you'll nee...
...> the "panel-script.js" uses xmlhttprequest to fetch the latest forecast: // panel-script.js var url = "http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/json/500?key=your-api-key"; self.port.on("show", function () { var request = new xmlhttprequest(); request.open("get", url, true); request.onload = function () { var jsonresponse = json.parse(request.response
text); var summary = getsummary(jsonresponse); var element = document.getelementbyid("forecast_summary"); element.
textcontent = summary; }; request.send(); }); function getsummary(forecast) { return forecast.regionalfcst.fcstperiods.period[0].paragraph[0].$; } finally, we need to add the "cross-domain-content" key to "package.json": "permissions": { "cross-domain-content": ["ht...
port - Archive of obsolete content
/ handle the message }); once() often you'll want to receive a message just once, then stop listening. the port object offers a shortcut to do this: the once() method. this example rewrites the content script in the port.removelistener() example so that it uses once(): // content-script.js function getfirstparagraph() { var paras = document.getelementsbytagname('p'); console.log(paras[0].
textcontent); } self.port.once("get-first-para", getfirstparagraph); removelistener() you can use port.on() to listen for messages. to stop listening for a particular message, use port.removelistener(). this takes the same two parameters as port.on(): the name of the message, and the name of the listener function. for example, here's an add-on that creates a page-worker and a button. the page-work...
...ole.log("sending 'get-first-para'"); pageworker.port.emit("get-first-para"); } }); the content script listens for "get-first-para". when it receives this message, the script logs the first paragraph of the document and then calls removelistener() to stop listening. // content-script.js function getfirstparagraph() { var paras = document.getelementsbytagname('p'); console.log(paras[0].
textcontent); self.port.removelistener("get-first-para", getfirstparagraph); } self.port.on("get-first-para", getfirstparagraph); the result is that the paragraph is only logged the first time the button is clicked. due to bug 816272 the page-mod's removelistener() function does not prevent the listener from receiving messages that are already queued. this means that if "main.js" sends the messag...
private-browsing - Archive of obsolete content
ot list any private browser windows, generate any events for private browser windows, or let the add-on open any private browser windows the tabs module will not list any tabs that belong to private browser windows, and the add-on won't receive any events for such tabs any ui components will not be displayed in private browser windows any menus or menu items created using the con
text-menu will not be shown in con
text menus that belong to private browser windows the page-mod module will not attach content scripts to documents belonging to private browser windows any panel objects will not be shown if the active window is a private browser window the selection module will not include any selections made in private browser windows add-ons that have opted in...
... from private windows while they are open, as long as you don't store it after the private browsing windows have been closed. for example, the "downloads" window might want to display all downloads while there are still some private windows open, then clean out all the private data when all private windows have closed. to do this with the sdk, you can listen to the system event named "last-pb-con
text-exited": var events = require("sdk/system/events"); function listener(event) { console.log("last private window closed"); } events.on("last-pb-con
text-exited", listener); globals functions isprivate(object) function to check whether the given object is private. it takes an object as an argument, and returns true only if the object is: a private browserwindow or a tab belonging to a p...
frame/utils - Archive of obsolete content
experimental provides helper functions for working with platform internals like frames and browsers. ...
...require('sdk/window/utils'); let { create } = require('sdk/frame/utils'); let window = open('data:
text/html,foo'); let frame = create(window.document); optionally create can be passed set of options to configure created frame even further. execution of scripts may easily be enabled: let { open } = require('sdk/window/utils'); let { create } = require('sdk/frame/utils'); let window = open('data:
text/html,top'); let frame = create(window.document, { uri: 'data:
text/html,<script>console.log("running");</script>', allowjavascript: true }); } globals functions create(document, options) creates a xul browser element in a privileged document. parameters document : nsidomdocument options : object optional options: name type type string string t...
util/match-pattern - Archive of obsolete content
https, or ftp scheme. for other schemes like file, resource, or data, use a scheme followed by an asterisk, as below. example pattern example matching urls example non-matching urls "*" http://example.com/ https://example.com/ ftp://example.com/ http://bar.com/foo.js http://foo.com/ file://example.js resource://me/my-addon/data/file.html data:
text/html,hi there a domain name prefixed with an asterisk and dot matches any url of that domain or a subdomain, using any of http, https, ftp. example pattern example matching urls example non-matching urls "*.example.com" http://example.com/ http://foo.example.com/ https://example.com/ http://example.com/foo ftp://foo.example.com/ ldap://example...
...owed by an asterisk matches all urls with that scheme. to match local files, use file://*, and to match files loaded from your add-on's data directory, use resource://. example pattern example matching urls "file://*" file://c:/file.html file:///home/file.png "resource://*" resource://my-addon-at-me-dot-org/my-addon/data/file.html "data:*" data:
text/html,hi there regular expressions you can specify patterns using a regular expression: var { matchpattern } = require("sdk/util/match-pattern"); var pattern = new matchpattern(/.*example.*/); the regular expression is subject to restrictions based on those applied to the html5 pattern attribute. in particular: the pattern must match the entire value, not just any subset. for exam...
Low-Level APIs - Archive of obsolete content
vel apis" (for example, windows or request). these modules are still in active development, and we expect to make incompatible changes to them in future releases. /loader create commonjs module loaders. chrome the chrome module gives an add-on sdk add-on access to the components object, which in turn gives it access to a large set of privileged low-level firefox apis. console/plain-
text constructor for a console instance. console/traceback functionality similar to python's traceback module. content/content re-exports three objects from three other modules: loader, worker, and symbiont. content/loader provides one of the building blocks for those modules that use content scripts to interact with web content, such as panel and page-mod. content/mod provides functions to m...
...rame creates firefox frames (i.e. xul <iframe> elements) that are not displayed to the user. frame/utils provides helper functions for working with platform internals like frames and browsers. fs/path provides access to the local filesystem with the nodejs path module api. io/byte-streams provides streams for reading and writing bytes. io/file provides access to the local filesystem. io/
text-streams provides streams for reading and writing
text. lang/functional functional helper methods. lang/type functions for working with type detection. loader/cuddlefish the sdk's module loader. loader/sandbox create javascript sandboxes and execute scripts in them. net/url enables you to read content from a uri. net/xhr provides access to xmlhttprequest functionality. places/bookmar...
Localization - Archive of obsolete content
150, contenturl: require("sdk/self").data.url("my-panel.html") }); given locale files for "en-us" and "fr" which provide translations of hello_id, the panel will now display "hello!" or "bonjour !", according to the current locale: the translation is inserted into the node which has the data-l10n-id attribute set. any previously existing content is just replaced. the string is inserted as
text, so you can't insert html using a statement like: # does not work. html tags are inserted as
text. hello_id= <blink>hello!</blink> localizing element attributes this feature is new in firefox 39 you can localize certain attributes of elements with an l10n-id by setting its value with l10n-id.attributename in the properties file like: hello_id.accesskey= h the following attributes are suppo...
...!</blink> localizing element attributes this feature is new in firefox 39 you can localize certain attributes of elements with an l10n-id by setting its value with l10n-id.attributename in the properties file like: hello_id.accesskey= h the following attributes are supported: accesskey alt label title placeholder further the localization of the aria attributes aria-label, aria-value
text and aria-moz-hint are supported with the same aliases as on firefox os: arialabel ariavalue
text ariamozhint using localized strings in javascript to reference localized strings from your main add-on code, you do this: var _ = require("sdk/l10n").get; console.log(_("hello_id")); assigning to "_" in particular is not required, but is a convention from the get
text tools and will make it po...
More Button Features - Archive of obsolete content
l="find" style="list-style-image: url('happy.png')"/> in this case, the image 'happy.png' is displayed on the button. the style attribute functions similar to its html counterpart. in general, it can be used on all xul elements. note that you really should put the style declarations in a separate style sheet. positioning the images by default, the image on a button will appear to the left of the
text label. there are two attributes that can be used to control this position. the dir attribute controls the direction of the image and
text. by setting this attribute to the value reverse, the image will be placed on the right side of the
text. by using the value normal, or leaving the attribute out entirely, the image will be placed on the left side of the
text. the orient attribute can be used to...
...t can be used to control this position. the dir attribute controls the direction of the image and
text. by setting this attribute to the value reverse, the image will be placed on the right side of the
text. by using the value normal, or leaving the attribute out entirely, the image will be placed on the left side of the
text. the orient attribute can be used to place the image above or below the
text. the default value is horizontal which is used to place the image on the left or right. you can also use the value vertical to place the image above or below. in this case, the dir attribute controls the placement above or below. the same values are used, where normal means place the image above the
text, and reverse means place the image below the
text. example 3 : source view <button label=...
Open and Save Dialogs - Archive of obsolete content
isplaydirectory property of the file picker object to a directory. the directory should be an nsilocalfile object. if you do not set this, a suitable default will be selected for you. to add filters, call the appendfilters() function to set the file types that you wish to have displayed. fp.appendfilters(nsifilepicker.filterhtml | nsifilepicker.filterimages); fp.appendfilters(nsifilepicker.filter
text | nsifilepicker.filterall); the first example will add filters for html and for image files. the user will only be able to select those types of files. the manner in which this is done is platform specific. on some platforms, each filter will be separate and the user can choose between html files and image files. the second example will add filters for
text files and for all files. the user ...
... first example will add filters for html and for image files. the user will only be able to select those types of files. the manner in which this is done is platform specific. on some platforms, each filter will be separate and the user can choose between html files and image files. the second example will add filters for
text files and for all files. the user therefore has the option to display
text files only or all files. you can also use filterxml and filterxul to filter for xml and xul files respectively. if you would like to filter for custom files, you can use the appendfilter() function to do this: fp.appendfilter("all files" ,"*.*"); fp.appendfilter("audio files (*.wav, *.mp3)","*.wav; *.mp3"); this line will add a filter for wave and mp3 audio files. the first argument is the t...
Updating Commands - Archive of obsolete content
ht time, which is described below. command updaters a command updater is a feature of the commandset element which allows it to update commands when certain events happen. you will need to think about when a command is valid and when it is not. in addition, you will need to consider when the state could change and when the commands should be updated. for example, the paste command is valid when a
textbox has the focus and there is something on the clipboard to paste. the command will become enabled whenever a
textbox is focused and when the clipboard contents change. a command updater will listen for these situations and code can be executed which enables and disables commands as necessary. a simple command updater looks like this: <commandset id="updatepasteitem" commandupdater="t...
...r will receive notifications about all focus events on all elements, even if other event handlers respond to the event. essentially, a command updater is like a global event handler. command updaters have a number of events which they can respond to which are listed below. it is also possible to create your own. focus: occurs when the focused element changes. select: occurs when the selected
text changes. undo: occurs when the undo buffer changes. clipboard: occurs when the contents of the clipboard changes. the following example shows the command updaters used in the mozilla browser to update the edit menu commands. the functions used can be found in the 'chrome://communicator/content/utilityoverlay.js' script. <commandset id="globaleditmenuitems" commandupdater="true" ...
Urlbar-icons - Archive of obsolete content
ild elements to add your own items. ...
...bar-icon" img="" level="safe" might="" onclick="godocommand('safebrowsing-show-warning');" page="" style="-moz-user-focus:" tooltip
text="this" type="menu"> <img class="urlbar-icon" id="star-button" onclick="placesstarbutton.onclick(event);" /> <img address="" chromedir="ltr" class="urlbar-icon" id="go-button" in="" location="" onclick="handleurlbarcommand(event);" p="" the="" to="" tooltip
text="go" /> </button> </hbox> ...
XUL Changes for Firefox 1.5 - Archive of obsolete content
ions for firefox 1.5. <scrollcorner> a <scrollcorner> element is added which is used to create the small box in the intersection of the horizontal and vertical scrollbars. <richlistbox> and <richlistitem> the <richlistbox> and <richlistitem> elements are used for creating lists containing arbitrary content. this element works similarly to the <listbox> which is designed primarily for lists of
textual items. the <richlistbox> supports much of the same api as the <listbox> and single items, created with the <richlistitem> element may be selected. see xul:richlistbox for more information. preferences system several elements have been added which may be used for creating preference windows. these windows are special types of dialogs which support several panels, each of which may be containe...
...ance <button icon="help"> will create a button with a help icon. this is used typically on gnome systems where possible values are: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network. <menulist> items in a <menulist> support the description attribute to allow for extra descriptive
text to appear beside an item's label. the menulist modification methods appenditem and insertitemat take an extra description argument when creating items this way. <listbox> the removeitemat method was sometime non zero-based due to a bug (bug 236068). this has been fixed in firefox 1.5 and all code depending on this non zero-based behaviour should be changed. <stringbundle> the <stringbundle> e...
box - Archive of obsolete content
amples <box orient="horizontal"> <label value="zero"/> <box orient="vertical"> <label value="one"/> <label value="two"/> </box> <box orient="horizontal"> <label value="three"/> <label value="four"/> </box> </box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-...
...u, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition,...
browser - Archive of obsolete content
y property is true if there is a page to go forward to in the session history and the forward button should be enabled. contentdocument type: document this read-only property contains the document object in the element. contentprincipal type: nsiprincipal this read-only property contains the principal for the content loaded in the browser, which provides security con
text information. contenttitle type: string this read-only property contains the title of the document object in the browser. contentvieweredit type: nsicontentvieweredit this read-only property contains the nsicontentvieweredit which handles clipboard operations on the document. contentviewerfile type: nsicontentviewerfile refere...
...roperty holds an object which may be used to determine the security level of the loaded document. sessionhistory type: nsishistory this read-only property contains the nsishistory object which holds the session history. webbrowserfind type: nsiwebbrowserfind this read-only property contains an nsiwebbrowserfind object which can be used to search for
text in the document. webnavigation type: nsiwebnavigation this read-only property contains the nsiwebnavigation object for the document. most of its methods are callable directly on the element itself, such as goback and goforward. it also contains the load constants used by reloadwithflags and loaduriwithflags. webprogress type: nsiwebprogress this rea...
listcol - Archive of obsolete content
s> <listcol flex="1"/> <listcol/> </listcols> <listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-...
...u, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition,...
listcols - Archive of obsolete content
istcol flex="1"/> <listcol flex="1"/> </listcols> <listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-...
...u, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, con
textmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , status
text, style, ,, tooltip, tooltip
text, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition,...
notificationbox - Archive of obsolete content
. the notifications may be placed at the bottom by setting the dir attribute to reverse. finding the current notification box within a firefox extension, you can retrieve the current notification box for a specific tab by calling the global function getnotificationbox(): notifybox = chromewin.getnotificationbox(notifywindow) notifybox = getnotificationbox(notifywindow) // applies to current con
text's window object here, chromewin is the xul window (usually just window), and notifywindow is the web content window for the tab you want to find the notification box for. also it is possible to call function with the same name (they are different) of global object gbrowser: notifybox = gbrowser.getnotificationbox() examples <notificationbox flex="1"> <browser src="http://www.mozilla.org"/...
... properties currentnotification, allnotifications, notificationshidden methods appendnotification, getnotificationwithvalue, removeallnotifications, removecurrentnotification, removenotification, removetransientnotifications, attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, con
text, con
textmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, status
text, style, template, tooltip, tooltip
text, top, uri, wait-...
timepicker - Archive of obsolete content
to specify the initial, use the value attribute set to a value of either the form hh:mm:ss or hh:mm. ...
...deseconds, hour, hourleadingzero, increment, is24hourclock, ispm, minute, minuteleadingzero, pmindicator, readonly, second, secondleadingzero, tabindex, value examples <timepicker value="12:05"/> attributes disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out
text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the case of form elements, it will not be submitted. do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case. the disabled attribute is allowed only for form controls. using it with an anchor tag...
Dialogs in XULRunner - Archive of obsolete content
erience across applications. custom dialogs building dialogs in xul is very similar to creating windows. each dialog is described in its own xul file. xul provides a dialog element to act as the container for the dialog. dialog xul files can have dtd, css, and javascript, just like windows. ...
...that could change in future releases. firefox and thunderbird both support nearly native page setup and print dialogs. however, xul does sup...
application/http-index-format specification - Archive of obsolete content
cute. example 100: this is a comment! do not present to the end-user 100: 101: the files in this directory are put forth for public 101: consumption and the provider make no guarentee as 101: as to the functionality of the data or programs 101: presented. ...
...: the files in this directory are put forth for public 101: consumption and the provider make no guarentee as 101: as to the functionality of the data or programs 101: presented. ...
Archived Mozilla and build documentation - Archive of obsolete content
mary"> elements in their <head> elements. generators can also be independently downloaded and installed by users if they include a list of pages to which they apply. creating a mozilla extension a mozilla extension is an installable enhancement to the mozilla browser that provides additional functionality (for example linky, which adds an item to the con
text menu for opening multiple links in a document or selection). this tutorial walks you through the process of building a mozilla extension that adds an icon to mozilla's status bar showing the current status of the mozilla source code (i.e. whether or not the latest version of the code is compiling successfully and passing tests). the extension will access tinderbox, mozilla.org's...
...alling java code from within a firefox extension, you can make use of liveconnect. liveconnect gives your extension's javascript code (linked from or contained in xul code) access to 2 objects: java and packages (note that per this thread, although the new documentation for the liveconnect reimplementation states that these globals will be deprecated (in the con
text of applets), "firefox and the java plug-in will continue to support the global java/packages keywords, in particular in the con
text of firefox extensions."). these 2 objects let you make use of the standard jdk classes, e.g., javascript crypto mozilla defines a special javascript object to allow web pages access to certain cryptographic-related services...
2006-10-13 - Archive of obsolete content
the discussion about the bug: https://bugzilla.mozilla.org/show_bug.cgi?id=300198, regarding middle clicking on a tab. annoying firefox 2 save dialog instead of open/save ones. user questions about a open/saveas bug that already exisits: https://bugzilla.mozilla.org/show_bug.cgi?id=347230 installer for 2.0rc2 ehume gives the developers a thumbs up for the new installer for 2.0rc2 having a
textfield where you can type in the installation directory. a way to recover the toolbars from popup windows that hide it a suggestion for a way to recover toolbars from a popup window that disables it. user suggests 3 ways, and suggests a default. (no responses as of yet) selected tab looks too close to unselected tab discussion about how to change the colour of a selected tab and an unselect...
... firefox. nsapprunner.o compile error: some_const not declared in scope compile error while compiling first build. user was conservative on what libraries they used, but now they have a compile error and can't make sense of it. no responses as of yet. firefox browser problem: width:30ex does not respect font discussion about a font rendering problem with firefox print on the firefox con
text menu user would like discussion about why the bug https://bugzilla.mozilla.org/show_bug.cgi?id=204519 is a wontfix. (user feels print belongs on the con
text menu along with back, reload, etc.) questions about programming for firefox a student questions how to create an extension that changes fonts, and how to capture website content before it is displayed. firefox add-on wanted user is i...
Path2D() - Web APIs
onal when invoked with another path2d object, a copy of the path argument is created. d optional when invoked with a string consisting of svg path data, a new path is created from that description. examples creating and copying paths this example creates and copies a path2d path. <canvas id="canvas"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); let path1 = new path2d(); path1.rect(10, 10, 100,100); let path2 = new path2d(path1); path2.moveto(220, 60); path2.arc(170, 60, 50, 0, 2 * math.pi); ctx.stroke(path2); using svg paths this example creates a path2d path using svg path data. the path will move to point (m10 10) and then move horizontally 80 points to the right (h 80), then 80 points down (v 80), then 80 points to the...
...); ctx.stroke(path2); using svg paths this example creates a path2d path using svg path data. the path will move to point (m10 10) and then move horizontally 80 points to the right (h 80), then 80 points down (v 80), then 80 points to the left (h -80), and then back to the start (z). <canvas id="canvas"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcon
text('2d'); let p = new path2d('m10 10 h 80 v 80 h -80 z'); ctx.fill(p); specification specification status comment html living standardthe definition of 'path2d()' in that specification. living standard initial definition. ...
PaymentRequest: merchantvalidation event - Web APIs
ention. typically, a client should not access the validation url. request.addeventlistener("merchantvalidation", event => { event.complete(async () => { const merchantserverurl = window.location.origin + '/validate?url=' + encodeuricomponent(event.validationurl); // get validation data, and complete validation; return await fetch(merchantserverurl).then(response => response.
text()); }, false); }; const response = await request.show(); how merchant server handles the validation depends on the server implementation and payment method documentation. the content delivered by the validation server is forwarded to the merchant server and is then returned from the fetch() call's fulfillment handler to the complete() method on the event. this response lets the payment handle...
... related events payerdetailchange, paymentmethodchange, shippingaddresschange, and shippingoptionchange specifications specification status comment payment request apithe definition of 'merchantvalidation' in that specification. candi...
PaymentRequestUpdateEvent - Web APIs
the paymentrequestupdateevent interface is used for events sent to a paymentrequest instance when changes are made to shipping-related information for a pending paymentrequest. those events are: shippingaddresschange secure con
text dispatched whenever the user changes their shipping address. also available using the onshippingaddresschange event handler property. shippingoptionchange secure con
text dispatched whenever the user changes a shipping option. also available using the onshippingoptionchange event handler property. constructor paymentrequestupdateevent() secure con
text creates a new paymentrequestupdateevent object. properties provides only the properties inherited from its parent interface, event. methods in addition to methods inherited from the parent interfac...
... handler property. constructor paymentrequestupdateevent() secure con
text creates a new paymentrequestupdateevent object. properties provides only the properties inherited from its parent interface, event. methods in addition to methods inherited from the parent interface, event, paymentrequestupdateevent offers the following methods: paymentrequestupdateevent.updatewith() secure con
text if the event handler determines that information included in the payment request needs to be changed, or that new information needs to be added, it calls updatewith() with the information that needs to be replaced or added. specifications specification status comment payment request apithe definition of 'paymentrequestupdateevent' in that specification. candidate re...
performance.now() - Web APIs
the performance.now() method returns a domhighrestimestamp, measured in milliseconds. note: this feature is available in web workers. the returned value represents the time elapsed since the time origin. bear in mind the following points: in dedicated workers created from a window con
text, the value in the worker will be lower than performance.now() in the window who spawned that worker. it used to be the same as t0 of the main con
text, but this was changed. in shared or service workers, the value in the worker might be higher than that of the main con
text because that window can be created after those workers. it's important to keep in mind that to mitigate potential security threats such as spectre, browsers typically round the returned value by some amount in order to be less pred...
...ing.reducetimerprecision.microseconds, whichever is larger. starting with firefox 79, high resolution timers can be used if you cross-origin isolate your document using the cross-origin-opener-policy and cross-origin-embedder-policy headers: cross-origin-opener-policy: same-origin cross-origin-embedder-policy: require-corp these headers ensure a top-level document does not share a browsing con
text group with cross-origin documents. coop process-isolates your document and potential attackers can't access to your global object if they were opening it in a popup, preventing a set of cross-origin attacks dubbed xs-leaks. specifications specification status comment high resolution time level 2the definition of 'performance.now()' in that specification. recommendatio...
Performance - Web APIs
esolution time api, but is enhanced by the performance timeline api, the navigation timing api, the user timing api, and the resource timing api. an object of this type can be obtained by calling the window.performance read-only attribute. note: this interface and its members are available in web workers, except where indicated below. also, note that performance markers and measures are per con
text. ...
...not available in workers. ...
PerformanceLongTaskTiming - Web APIs
position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performanceentry</
text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performancelongtasktiming" target="_top"><rect x="201" y=...
...e" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performanceentry</
text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performancelongtasktiming" target="_top"><rect x="201" y="1" width="250" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="326" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performancelongtasktiming</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties performancelongtasktiming.attribution read only returns a sequence of taskattributiontiming instances. specifications ...
PerformanceMark - Web APIs
position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performanceentry</
text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performancemark" target="_top"><rect x="201" y="1" width=...
...o,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performanceentry</
text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performancemark" target="_top"><rect x="201" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="276" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performancemark</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but it extends the following performanceentry properties by qualifying/constraining the properties as fo...
PerformanceMeasure - Web APIs
position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performanceentry</
text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performancemeasure" target="_top"><rect x="201" y="1" wid...
...onospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performanceentry</
text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performancemeasure" target="_top"><rect x="201" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="291" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performancemeasure</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but it extends the following performanceentry properties by qualifying/constrainting the properties a...
PerformancePaintTiming - Web APIs
position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performanceentry</
text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performancepainttiming" target="_top"><rect x="201" y="1"...
...pace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performanceentry</
text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performancepainttiming" target="_top"><rect x="201" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="311" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performancepainttiming</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but it extends the following performanceentry properties (for "paint" performance entry types) by...
PerformanceResourceTiming - Web APIs
position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performanceentry</
text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performanceresourcetiming" target="_top"><rect x="201" y=...
...e" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performanceentry</
text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performanceresourcetiming" target="_top"><rect x="201" y="1" width="250" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="326" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">performanceresourcetiming</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} note: this feature is available in web workers. properties this interface extends the following performanceentry properties for resource ...
Performance API - Web APIs
rate to 5 microseconds (because, for example, due to hardware or software constraints), the browser can represent the value as a time in milliseconds accurate to a millisecond. methods the performance interface has two methods. the now() method returns a domhighrestimestamp whose value that depends on the navigation start and scope. if the scope is a window, the value is the time the browser con
text was created and if the scope is a worker, the value is the time the worker was created. the tojson() method returns a serialization of the performance object, for those attributes that can be serialized. properties the performance interface has two properties. the timing property returns a performancetiming object containing latency-related performance information such as the start of navigati...
...e performance interface has two properties. the timing property returns a performancetiming object containing latency-related performance information such as the start of navigation time, start and end times for redirects, start and end times for responses, etc. the navigation property returns a performancenavigation object representing the type of navigation that occurs in the given browsing con
text, such as the page was navigated to from history, the page was navigated to by following a link, etc. interfaces performance provides methods and properties containing timing-related performance information for the given page. performanceentry provides methods and properties the encapsulate a single performance metric that is part of the performance timeline. performanceframetiming provid...
PeriodicWave - Web APIs
the periodicwave interface defines a periodic waveform that can be used to shape the output of an oscillatornode. periodicwave has no inputs or outputs; it is used to define custom oscillators when calling oscillatornode.setperiodicwave(). the periodicwave itself is created/returned by audiocon
text.createperiodicwave(). constructor periodicwave.periodicwave() creates a new periodicwave object instance using the default values for all properties. if you wish to establish custom property values at the outset, use the audiocon
text.createperiodicwave() factory method instead. properties none; also, periodicwave doesn't inherit any properties. methods none; also, periodicwave doesn't inherit any methods. example the following example illustrates simple usage of createperiodicwave(),...
...dicwave() factory method instead. properties none; also, periodicwave doesn't inherit any properties. methods none; also, periodicwave doesn't inherit any methods. example the following example illustrates simple usage of createperiodicwave(), to create a periodicwave object containing a simple sine wave. var real = new float32array(2); var imag = new float32array(2); var ac = new audiocon
text(); var osc = ac.createoscillator(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var wave = ac.createperiodicwave(real, imag, {disablenormalization: true}); osc.setperiodicwave(wave); osc.connect(ac.destination); osc.start(); osc.stop(2); this works because a sound that contains only a fundamental tone is by definition a sine wave here, we create a periodicwave with two values. the ...
ProgressEvent - Web APIs
nline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><
text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/progressevent" target="_top"><rect x="116" y="1" width="130" height="50...
...,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">event</
text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/progressevent" target="_top"><rect x="116" y="1" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><
text x="181" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53"
text-anchor="middle" alignment-baseline="middle">progressevent</
text></a></svg></div> a:hover
text { fill: #0095dd; pointer-events: all;} constructor progressevent() creates a progressevent event with the given parameters. properties also inherits properties from its parent event. ...
PublicKeyCredential.id - Web APIs
the id read-only property of the publickeycredential interface is a domstring, inherited from credential, which represents the identifier of the current publickeycredential instance. this property is a base64url encoded version of publickeycredential.rawid. note: this property may only be used in top-level con
texts and will not be available in an <iframe> for example. syntax id = publickeycredential.id value a domstring being the base64url encoded version of publickeycredential.rawid. examples var publickey = { challenge: new uint8array(26) /* this actually is given from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john do...
...overrides the getter defined in credential. credential management level 1the definition of 'id' in that specification. working draft initial definition. ...