Search completed in 1.25 seconds.
HTML elements reference - HTML: Hypertext Markup Language
this page lists all the html
elements, which are created using tags.
...an alphabetical list of all
elements is provided in the sidebar on every element's page as well as this one.
... for more information about the basics of html
elements and attributes, see the section on
elements in the introduction to html article.
...And 32 more matches
Pseudo-classes and pseudo-elements - Learn web development
previous overview: building blocks next the next set of selectors we will look at are referred to as pseudo-classes and pseudo-
elements.
... a pseudo-class is a selector that selects
elements that are in a specific state, e.g.
...take a look at some other examples on mdn: :last-child :only-child :invalid note: it is valid to write pseudo-classes and
elements without any element selector preceding them.
...And 29 more matches
Images, media, and form elements - Learn web development
previous overview: building blocks next in this lesson we will take a look at how certain special
elements are treated in css.
... images, other media, and form
elements behave a little differently in terms of your ability to style them with css than regular boxes.
... 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 way that some
elements behave unusually when styled with css.
...And 20 more matches
Using custom elements - Web Components
one of the key features of the web components standard is the ability to create custom
elements that encapsulate your functionality on an html page, rather than having to make do with a long, nested batch of
elements that together provide a custom page feature.
... this article introduces the use of the custom
elements api.
... note: custom
elements are supported by default in firefox, chrome, and edge (76).
...And 15 more matches
Document.getElementsByTagName() - Web APIs
the get
elementsbytagname method of document interface returns an htmlcollection of
elements with the given tag name.
...the returned htmlcollection is live, meaning that it updates itself automatically to stay in sync with the dom tree without having to call document.get
elementsbytagname() again.
... syntax var
elements = document.get
elementsbytagname(name);
elements is a live htmlcollection (but see the note below) of found
elements in the order they appear in the tree.
...And 12 more matches
Custom XUL Elements with XBL - Archive of obsolete content
« previousnext » xml binding language (xbl, sometimes also called extensible bindings language) is a language for describing bindings that can be attached to
elements in other documents.
... this somewhat cryptic explanation describes a very simple concept: with xbl you can create your own custom
elements.
... with xbl you can define new
elements and define their properties, attributes, methods and event handlers.
...And 10 more matches
Adding HTML Elements - Archive of obsolete content
« previousnext » now that we've added some buttons, let's add some other
elements.
... adding html
elements to a window in addition to all of the xul
elements that are available, you can also add html
elements directly within a xul file.
...you should avoid using html
elements in xul files if you can.
...And 10 more matches
Adding Methods to XBL-defined Elements - Archive of obsolete content
« previousnext » next, we'll find out how to add custom methods to xbl-defined
elements.
...you can define custom methods for your
elements using the method element.
...the method element contains two type of child
elements, parameter
elements which describe the parameters to the method and body which contains the script for the method.
...And 10 more matches
Element.getElementsByTagName() - Web APIs
the element.get
elementsbytagname() method returns a live htmlcollection of
elements with the given tag name.
...therefore, there is no need to call element.get
elementsbytagname() with the same element and arguments repeatedly if the dom changes in between calls.
... when called on an html element in an html document, get
elementsbytagname lower-cases the argument before searching for it.
...And 10 more matches
Document.getElementsByTagNameNS() - Web APIs
returns a list of
elements with the given tag name belonging to the given namespace.
... syntax
elements = document.get
elementsbytagnamens(namespace, name)
elements is a live nodelist (but see the note below) of found
elements in the order they appear in the tree.
... namespace is the namespace uri of
elements to look for (see element.namespaceuri).
...And 9 more matches
Elements - Archive of obsolete content
bindings contains zero or more binding
elements as children.
... each binding child element defines a unique binding that can be attached to
elements in other documents.
...firefox 2) it is impossible to attach bindings to table sub-
elements (rows, cells etc.) you can attach binding only to the table element itself.
...And 8 more matches
Document.getElementsByClassName() - Web APIs
the get
elementsbyclassname method of document interface returns an array-like object of all child
elements which have all of the given class name(s).
...you may also call get
elementsbyclassname() on any element; it will return only
elements which are descendants of the specified root element with the given class name(s).
... syntax var
elements = document.get
elementsbyclassname(names); // or: var
elements = rootelement.get
elementsbyclassname(names);
elements is a live htmlcollection of found
elements.
...And 7 more matches
Document.getElementsByName() - Web APIs
the get
elementsbyname() method of the document object returns a nodelist collection of
elements with a given name in the document.
... syntax var
elements = document.get
elementsbyname(name);
elements is a live nodelist collection, meaning it automatically updates as new
elements with the same name are added to/removed from the document.
... example <!doctype html> <html lang="en"> <title>example: using document.get
elementsbyname</title> <input type="hidden" name="up"> <input type="hidden" name="down"> <script> var up_names = document.get
elementsbyname("up"); console.log(up_names[0].tagname); // displays "input" </script> </html> notes the name attribute can only be applied in (x)html documents.
...And 7 more matches
Element.getElementsByClassName() - Web APIs
the element method get
elementsbyclassname() returns a live htmlcollection which contains every descendant element which has the specified class name or names.
... the method get
elementsbyclassname() on the document interface works essentially the same way, except it acts on the entire document, starting at the document root.
... syntax var
elements = element.get
elementsbyclassname(names); parameters names a domstring containing one or more class names to match on, separated by whitespace.
...And 6 more matches
Element.getElementsByTagNameNS() - Web APIs
the element.get
elementsbytagnamens() method returns a live htmlcollection of
elements with the given tag name belonging to the given namespace.
... it is similar to document.get
elementsbytagnamens, except that its search is restricted to descendants of the specified element.
... syntax
elements = element.get
elementsbytagnamens(namespaceuri, localname)
elements is a live htmlcollection of found
elements in the order they appear in the tree.
...And 6 more matches
Block-level elements - HTML: Hypertext Markup Language
html (hypertext markup language)
elements historically were categorized as either "block-level"
elements or "inline-level"
elements.
... the following example demonstrates the block-level element's influence: block-level
elements html <p>this paragraph is a block-level element; its background has been colored to display the paragraph's parent element.</p> css p { background-color: #8abb55; } usage block-level
elements may appear only within a <body> element.
...inline there are a couple of key differences between block-level
elements and inline
elements: content model generally, block-level
elements may contain inline
elements and (sometimes) other block-level
elements.
...And 6 more matches
Inline elements - HTML: Hypertext Markup Language
html (hypertext markup language)
elements historically were categorized as either "block-level"
elements or "inline-level"
elements.
... 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.
...And 6 more matches
Window.customElements - Web APIs
the custom
elements read-only property of the window interface returns a reference to the customelementregistry object, which can be used to register new custom
elements and get information about previously registered custom
elements.
... examples the most common example you'll see of this property being used is to get access to the customelementregistry.define() method to define and register a new custom element, e.g.: let customelementregistry = window.custom
elements; customelementregistry.define('my-custom-element', mycustomelement); however, it is usually shortened to something like the following: custom
elements.define('element-details', class extends htmlelement { constructor() { super(); const template = document .getelementbyid('element-details-template') .content; const shadowroot = this.attachshadow({mode: 'open'}) .appendchild(template.clonenode(true)); } } ); see our web-components-examples repo for more usage examples.
... specification specification status comment html living standardthe definition of 'window.custom
elements' in that specification.
...And 5 more matches
Replaced elements - CSS: Cascading Style Sheets
put in simpler terms, they're
elements whose contents are not affected by the current document's styles.
...some replaced
elements, such as <iframe>
elements, may have stylesheets of their own, but they don't inherit the styles of the parent document.
... replaced
elements typical replaced
elements are: <iframe> <video> <embed> <img> some
elements are treated as replaced
elements only in specific cases: <option> <audio> <canvas> <object> <applet> html spec also says that an <input> element can be replaced, because <input>
elements of the "image" type are replaced
elements similar to <img>.
...And 5 more matches
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
with css, there are lots of ways to add color to your html
elements to create just the look you want.
...instead, let's look at things in terms of the kinds of things that are drawn in the
elements, such as text and borders and so forth.
...this is only useful in
elements that are editable, such as <input> and <textarea> or
elements whose html contenteditable attribute is set.
...And 5 more matches
Adding Properties to XBL-defined Elements - Archive of obsolete content
« previousnext » next, we'll find out how to add custom properties to xbl-defined
elements.
... the xbl interface javascript and the dom provide access to get and set the properties of
elements.
... with xbl, you can define your own properties for the
elements you create.
...And 4 more matches
ANGLE_instanced_arrays.drawElementsInstancedANGLE() - Web APIs
the angle_instanced_arrays.draw
elementsinstancedangle() method of the webgl api renders primitives from array data like the gl.draw
elements() method.
... in addition, it can execute multiple instances of a set of
elements.
... note: when using webgl2, this method is available as gl.draw
elementsinstanced() by default.
...And 4 more matches
HTMLSlotElement.assignedElements() - Web APIs
the assigned
elements() property of the htmlslotelement interface returns a sequence of the
elements assigned to this slot (and no other nodes).
... if the flatten option is set to true, it also returns the assigned
elements of any other slots that are descendants of this slot.
... syntax var assigned
elements = htmlslotelement.assigned
elements(options) parameters options optional an object that sets options for the nodes to be returned.
...And 4 more matches
WebGL2RenderingContext.drawElementsInstanced() - Web APIs
the webgl2renderingcontext.draw
elementsinstanced() method of the webgl 2 api renders primitives from array data like the gl.draw
elements() method.
... in addition, it can execute multiple instances of a set of
elements.
... syntax void gl.draw
elementsinstanced(mode, count, type, offset, instancecount); parameters mode a glenum specifying the type primitive to render.
...And 4 more matches
AudioContext.createMediaElementSource() - Web APIs
the createmedia
elementsource() method of the audiocontext interface is used to create a new mediaelementaudiosourcenode object, given an existing html <audio> or <video> element, the audio from which can then be played and manipulated.
... syntax var audioctx = new audiocontext(); var source = audioctx.createmedia
elementsource(mymediaelement); parameters mymediaelement an htmlmediaelement object that you want to feed into an audio processing graph to manipulate.
... example this simple example creates a source from an <audio> element using createmedia
elementsource(), then passes the audio through a gainnode before feeding it into the audiodestinationnode for playback.
...And 3 more matches
HTMLFormElement.elements - Web APIs
the htmlformelement property
elements returns an htmlformcontrolscollection listing all the form controls contained in the <form> element.
... syntax nodelist = htmlformelement.
elements value an htmlformcontrolscollection containing all non-image controls in the form.
... the
elements included by htmlformelement.
elements and htmlformelement.length are the following: <button> <fieldset> <input> (with the exception that any whose type is "image" are omitted for historical reasons) <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.
...And 3 more matches
NonDocumentTypeChildNode.nextElementSibling - Web APIs
the nondocumenttypechildnode.next
elementsibling read-only property returns the element immediately following the specified one in its parent's children list, or null if the specified element is the last one in the list.
... syntax var nextnode = elementnodereference.next
elementsibling; example <div id="div-01">here is div-01</div> <div id="div-02">here is div-02</div> <script type="text/javascript"> var el = document.getelementbyid('div-01').next
elementsibling; console.log('siblings of div-01:'); while (el) { console.log(el.nodename); el = el.next
elementsibling; } </script> this example outputs the following into the console when it loads: siblings of div-01: div script polyfill for internet explorer 8 this property is unsupported prior to ie9, so the following snippet can be used to add support to ie8: // source: https://github.com/alhadis/snippets/blob/master/js/polyfills/ie8-child-
elements.js if(!("next
elementsibling" in document.documentelement)){ object.defineproperty(element.pro...
...totype, "next
elementsibling", { get: function(){ var e = this.nextsibling; while(e && 1 !== e.nodetype) e = e.nextsibling; return e; } }); } polyfill for internet explorer 9+ and safari // source: https://github.com/jserz/js_piece/blob/master/dom/nondocumenttypechildnode/next
elementsibling/next
elementsibling.md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('next
elementsibling')) { return; } object.defineproperty(item, 'next
elementsibling', { configurable: true, enumerable: true, get: function () { var el = this; while (el = el.nextsibling) { if (el.nodetype === 1) { return el; } } return null; ...
...And 3 more matches
Adding more elements - Archive of obsolete content
adding
elements to our find files example we will add some more
elements to the find files dialog now.
...if you resize the window vertically, the
elements do not change size.
...the first spacer adds extra spacing in between the title label and the search criteria
elements.
...And 2 more matches
DocumentOrShadowRoot.msElementsFromRect() - Web APIs
the ms
elementsfromrect method returns the node list of
elements that are under a rectangle defined by left, top, width, and height.
... syntax object.ms
elementsfromrect(left, top, width, height, retval) parameters left [in] type: floating-point top[in] type: floating-point width[in] type: floating-point height [in] type: floating-point retval [out, reval] type: nodelist example to find all of the
elements under a given point, use ms
elementsfrompoint(x, y).
... to find all of the
elements which intersect a rectangle, use ms
elementsfromrect(top, left, width, height).
...And 2 more matches
NonDocumentTypeChildNode.previousElementSibling - Web APIs
the nondocumenttypechildnode.previous
elementsibling read-only property returns the element immediately prior to the specified one in its parent's children list, or null if the specified element is the first one in the list.
... syntax prevnode = elementnodereference.previous
elementsibling; example <div id="div-01">here is div-01</div> <div id="div-02">here is div-02</div> <li>this is a list item</li> <li>this is another list item</li> <div id="div-03">here is div-03</div> <script> let el = document.getelementbyid('div-03').previous
elementsibling; document.write('<p>siblings of div-03</p><ol>'); while (el) { document.write('<li>' + el.nodename + '</li>'); el = el.previous
elementsibling; } document.write('</ol>'); </script> this example outputs the following into the page when it loads: siblings of div-03 1.
...div polyfills polyfill for internet explorer 8 this property is unsupported prior to ie9, so the following snippet can be used to add support to ie8: // source: https://github.com/alhadis/snippets/blob/master/js/polyfills/ie8-child-
elements.js if(!("previous
elementsibling" in document.documentelement)){ object.defineproperty(element.prototype, "previous
elementsibling", { get: function(){ var e = this.previoussibling; while(e && 1 !== e.nodetype) e = e.previoussibling; return e; } }); } polyfill for internet explorer 9+ and safari // source: https://github.com/jserz/js_piece/blob/master/dom/nondocumenttypechildnode/previous
elementsibling/previous
elementsibling.md (function (arr) { arr.foreach(function (item) { if (item.
...And 2 more matches
WebGL2RenderingContext.drawRangeElements() - Web APIs
the webgl2renderingcontext.drawrange
elements() method of the webgl api renders primitives from array data in a given range.
... syntax void gl.drawrange
elements(mode, start, end, count, type, offset); parameters mode a glenum specifying the type primitive to render.
... count a glsizei specifying the number of
elements to be rendered.
...And 2 more matches
WebGLRenderingContext.drawElements() - Web APIs
the webglrenderingcontext.draw
elements() method of the webgl api renders primitives from array data.
... syntax void gl.draw
elements(mode, count, type, offset); parameters mode a glenum specifying the type primitive to render.
... count a glsizei specifying the number of
elements to be rendered.
...And 2 more matches
Pseudo-elements - CSS: Cascading Style Sheets
*/ p::first-line { color: blue; text-transform: uppercase; } note: in contrast to pseudo-
elements, pseudo-classes can be used to style an element based on its state.
...this distinguishes pseudo-classes from pseudo-
elements.
... however, since this distinction was not present in older versions of the w3c spec, most browsers support both syntaxes for the original pseudo-
elements.
...And 2 more matches
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
jank problems when loading images in the olden days of web development, it was always seen as a good practice to add width and height attributes to your html <img>
elements, so that when browsers first loaded the page, they could put a correctly-sized placeholder box in the layout for each image to appear in when it finally loads.
...firefox has added an internal aspect-ratio property (in version 69 onwards) that applies to replaced
elements, and other related
elements that accept width and height attributes.
... note: currently this effect is being limited to actual <img>
elements, as applying to other such
elements may have undesirable results.
...And 2 more matches
getElementsByAttributeNS - Archive of obsolete content
« xul reference home get
elementsbyattributens(ns, attrib, value ) return type: dom nodelist returns an array of all the child
elements of the element that have the attribute namespace given by the first argument, the attribute name given by the second argument, and the value given by the third argument.
... if the namespace (first argument) is set to '*',
elements with any attribute namespace will be retrieved.
... if the third argument is '*', the
elements retrieved may have the attribute (second argument) set to any value.
... note that this method is only available on xul
elements and is not part of the dom.
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
« previousnext » next, we'll find out how to add event handlers to xbl-defined
elements.
... event handlers as you might expect, mouse clicks, key presses and other events are passed to each of the
elements inside the content.
...you can add event handlers to the
elements inside the content if needed.
...handler element however, you may want to add an event handler to the entire contents, that is, all the
elements defined in the content tag.
DocumentOrShadowRoot.elementsFromPoint() - Web APIs
the
elementsfrompoint() method of the documentorshadowroot interface returns an array of all
elements at the specified coordinates (relative to the viewport).
... syntax const
elements = document.
elementsfrompoint(x, y); parameters x the horizontal coordinate of a point.
... 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 '
elementsfrompoint()' in that specification.
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
the html <h1>–<h6>
elements represent six levels of section headings.
... implicit aria role heading permitted aria roles tab, presentation or none dom interface htmlheadingelement attributes these
elements only include the global attributes.
... <h1>heading
elements</h1> <h2>summary</h2> <p>some text here...</p> <h2>examples</h2> <h3>example 1</h3> <p>some text here...</p> <h3>example 2</h3> <p>some text here...</p> <h2>see also</h2> <p>some text here...</p> here is the result of this code: accessibility concerns navigation a common navigation technique for users of screen reading software is jumping from heading to heading to quickly determine the...
getElementsByAttribute - Archive of obsolete content
« xul reference home get
elementsbyattribute( attrib, value ) return type: dom nodelist returns a nodelist of all the child
elements of the element that have the attribute given by the first argument set to the value given by the second argument.
... note that this method is only available on xul
elements; it is not part of the w3c dom.
Locating DOM elements using selectors - Web APIs
selectors the selector methods accept one or more comma-separated selectors to determine what element or
elements should be returned.
... for example, to select all paragraph (p)
elements in a document whose css class is either warning or note, you can do the following: var special = document.queryselectorall( "p.warning, p.note" ); you can also query by id.
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt
elements, exslt functions, xpath functions, xpath axes there are two types of
elements discussed here: top-level
elements and instructions.
... on a related note, any attribute in an lre and some attributes of a limited number of xslt
elements can also include what is known as an attribute value template.
hasMoreElements
documentation is now located at nsisimpleenumerator.hasmore
elements().
Select and highlight elements - Firefox Developer Tools
the highlighted element is the element that's overlaid in the page with a graphic showing the box model, and a tooltip showing its tag and size: with the context menu to open the inspector and select an element immediately, activate the context menu over the element in the page and select "inspect element": with the html pane when the inspector is open, as you move the mouse around the
elements listed in the html pane, the corresponding
elements are highlighted in the page.
Index - Archive of obsolete content
41 addon-page add-on sdk, add-ons, extensions, obsolete, reference create a page that does not contain navigational
elements.
...xul <iframe>
elements) that are not displayed to the user.
... 279 custom xul
elements with xbl no summary!
...And 226 more matches
Index - Web APIs
in addition, it can execute multiple instances of the range of
elements.
... 4 angle_instanced_arrays.draw
elementsinstancedangle() angle_instanced_arrays, api, method, reference, webgl, webgl extension the angle_instanced_arrays.draw
elementsinstancedangle() method of the webgl api renders primitives from array data like the gl.draw
elements() method.
... in addition, it can execute multiple instances of a set of
elements.
...And 205 more matches
Index - Archive of obsolete content
2 <statusbarpanel> deprecated, xul, xul
elements, xul reference an individual element of a statusbar.
... 6 flexgroup "flexgroup" is used to group flexible
elements together and should be set to an integer.
...
elements with a lower flexgroup are flexed first.
...And 193 more matches
HTML documentation index - HTML: Hypertext Markup Language
3 applying color to html
elements using css beginner, css, css colors, guide, html, html colors, html styles, styling html, color with css, there are lots of ways to add color to your html
elements to create just the look you want.
... 4 block-level
elements beginner, development, guide, html, html5, web html (hypertext markup language)
elements historically were categorized as either "block-level"
elements or "inline-level"
elements.
... 6 date and time formats used in html date, element, format, html, iso 8601, input, reference, string, time, week, datetime, datetime-local, del, ins, month, month-year, week-year certain html
elements use date and/or time values.
...And 61 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
because a xul document is also an xml document, it can contain xhtml, svg, mathml, and other
elements; if you use external entity references, the xml document's contents are modularized; combined with other xml-related technologies, such as dom, xlink, or xslt, you can use it for a number of different applications.
... reading in style sheets xul uses css to specify the appearance of its
elements.
...as shown in listing 3,
elements can be laid out horizontally using the hbox (horizontal box) element or vertically using the vbox (vertical box) element.
...And 45 more matches
XUL element attributes - Archive of obsolete content
« xul reference home the following attributes are common to all xul
elements: align type: one of the values below the align attribute specifies how child
elements of the box are aligned, when the size of the box is larger than the total size of the children.
... start child
elements are aligned starting from the left or top edge of the box.
... center extra space is split equally along each side of the child
elements, resulting in the children being placed in the center of the box.
...And 34 more matches
Positioning - Learn web development
previous overview: css layout next positioning allows you to take
elements out of the normal document layout flow, and make them behave differently; for example sitting on top of one another, or always remaining in the same place inside the browser viewport.
... there are a number of different types of positioning that you can put into effect on html
elements.
...this is very similar to static positioning, except that once the positioned element has taken its place in the normal layout flow, you can then modify its final position, including making it overlap other
elements on the page.
...And 28 more matches
SVG documentation index - SVG: Scalable Vector Graphics
3 compatibility sources svg the following sources are used for the compatibility tables on svg
elements and attributes: 4 content type needstechnicalreview, svg, types, data types svg makes use of a number of data types.
... 13 svg attribute reference drawing, landing, needshelp, overview, responsive design, svg, svg attribute, svg reference, vector graphics svg
elements can be modified using attributes that specify details about exactly how the element should be handled or rendered.
... 14 svg conditional processing attributes intermediate, needsexample, property, reference, svg the svg conditional processing attributes are all the attributes that can be specified on some svg
elements to control whether or not the element on which it appears should be rendered.
...And 27 more matches
Content categories - Developer guides
every html element is a member of one or more content categories — these categories group
elements that share common characteristics.
... this is a loose grouping (it doesn't actually create a relationship among
elements of these categories), but they help define and describe the categories' shared behavior and their associated rules, especially when you come upon their intricate details.
... it's also possible for
elements to not be a member of any of these categories.
...And 26 more matches
Element Positioning - Archive of obsolete content
box element positioning so far, we know how to position
elements either horizontally or vertically inside a box.
... we will often need more control over the position and size of
elements within the box.
...some
elements, such as textboxes have a default size, which will be used.
...And 25 more matches
Templates - Archive of obsolete content
« previousnext » in this section, we'll find out how to populate
elements with data.
... populating
elements xul provides a method in which we create
elements from data supplied by rdf, either from an rdf file or from an internal datasource.
... usually,
elements such as treeitems and menuitems will be populated with data.
...And 25 more matches
Text labels and names - Accessibility
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.
... 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.
... 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.
...And 23 more matches
Index - Learn web development
css is what you use to selectively style html
elements.
...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.
... 107 css selectors attribute, beginner, css, class, learn, pseudo, selectors, id in css, selectors are used to target the html
elements on our web pages that we want to style.
...And 22 more matches
Indexed collections - JavaScript
creating an array the following statements create equivalent arrays: let arr = new array(element0, element1, ..., elementn) let arr = array(element0, element1, ..., elementn) let arr = [element0, element1, ..., elementn] element0, element1, ..., elementn is a list of values for the array's
elements.
... when these values are specified, the array is initialized with them as the array's
elements.
...calling arr.length will return arraylength, but the array doesn't contain any
elements.
...And 22 more matches
Getting started with HTML - Learn web development
to get you started, this article defines
elements, attributes, and all the other important terms you may have heard.
...you will learn how html
elements are structured, how a typical html page is structured, and other important basic language features.
... objective: to gain basic familiarity with html, and practice writing a few html
elements.
...And 21 more matches
XUL accessibility guidelines - Archive of obsolete content
by default, the tab order is determined by the order of the
elements in the underlying code.
... ensure that tab order is logical and all interactive
elements can be accessed simply without the use of a mouse.
...consider using context menu items or other xul
elements along with keyboard shortcuts.
...And 20 more matches
WAI-ARIA basics - Learn web development
for example, html5 introduced a number of semantic
elements to define common page features (<nav>, <footer>, etc.) before these were available, developers would simply use <div>s with ids or classes, e.g.
...as a result, developers quite often rely on javascript libraries that generate such controls as a series of nested <div>s or table
elements with classnames, which are then styled using css and controlled using javascript.
... the problem here is that visually they work, but screenreaders can't make any sense of what they are at all, and their users just get told that they can see a jumble of
elements with no semantics to describe what they mean.
...And 20 more matches
XPCOM array guide
for example, you should not delete
elements of an array during the enumeration as this will often confuse the loop which is enumerating the array.
...enumerators are used to access the
elements in an ordered way, without relying on the underlying array type.
...this basic interface only allows querying of existing
elements in the array.
...And 20 more matches
Using HTML sections and outlines - Developer guides
the html5 specification introduced several semantic sectioning
elements to help organize the structure of documents.
... semantic sectioning
elements are specifically designed to communicate structural meaning to browsers and other technologies interpreting the document on behalf of users, such as screen readers and voice assistants.
... semantic sectioning
elements clarify the larger-scale structures within a document.
...And 20 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
id global attribute valid for all
elements, including all the input types, it defines a unique identifier (id) which must be unique in the whole document.
... inputmode global value valid for all
elements, it provides a hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents.
... htmlformelement.
elements when an input element is given a name, that name becomes a property of the owning form element's htmlformelement.
elements property.
...And 20 more matches
Anonymous Content - Archive of obsolete content
xbl content xbl can be used to automatically add a set of
elements inside another element.
... the xul file only needs to specify the outer element while the inner
elements are described in the xbl.
...mechanisms are provided for adding attributes to the inner
elements that were specified on the outer element.
...And 19 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.
... management of media connected to the html media
elements (<audio> and <video>).
...And 19 more matches
display - CSS: Cascading Style Sheets
run-in
elements act like inlines or blocks, depending on the surrounding
elements.
... table these
elements behave like html <table>
elements.
...it behaves like the corresponding html <ruby>
elements.
...And 19 more matches
position - CSS: Cascading Style Sheets
the top, right, bottom, and left properties determine the final location of positioned
elements.
...the offset does not affect the position of any other
elements; thus, the space given for the element in the page layout is the same as if position were static.
...its effect on table-*-group, table-row, table-column, table-cell, and table-caption
elements is undefined.
...And 19 more matches
Layout System Overview - Archive of obsolete content
this paged presentation presents several challenges not present in the galley presentation, namely how to break up
elements that are larger than a single page, and how to handle changes to page dimensions.
...generally frames correspond to the content
elements, though there is often a one-to-many correspondence between content
elements and frames.
...in the case of the html-specific
elements, the frame types that correspond to 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.
...And 18 more matches
Grids - Archive of obsolete content
« previousnext » xul has a set of
elements for creating tabular grids.
... xul tabular layout xul has a set of
elements for doing layout of
elements in a grid-like manner using the grid element.
...the grid does not display anything itself; it is used only to position
elements in a tabular form with rows and columns.
...And 18 more matches
Introduction to CSS layout - Learn web development
css page layout techniques allow us to take
elements contained in a web page and control where they are positioned relative to their default position in normal layout flow, the other
elements around them, their parent container, or the main viewport/window.
...let's look at a quick html example: <p>i love my cat.</p> <ul> <li>buy cat food</li> <li>exercise</li> <li>cheer up friend</li> </ul> <p>the end!</p> by default, the browser will display this code as follows: note here how the html is displayed in the exact order in which it appears in the source code, with
elements stacked up on top of one another — the first paragraph, followed by the unordered list, followed by the second paragraph.
... the
elements that appear one below the other are described as block
elements, in contrast to inline
elements, which appear one beside the other, like the individual words in a paragraph.
...And 18 more matches
StringView - Archive of obsolete content
(nfrstchr - 0xd800 /* 55296 */ << 10) + achars[nidx + 1] + 0x2400 /* 9216 */ : nfrstchr; }; stringview.pututf16charcode = function (atarget, nchar, nputat) { var nidx = nputat; if (nchar < 0x10000 /* 65536 */) { /* one element */ atarget[nidx++] = nchar; } else { /* two
elements */ atarget[nidx++] = 0xd7c0 /* 55232 */ + (nchar >>> 10); atarget[nidx++] = 0xdc00 /* 56320 */ + (nchar & 0x3ff /* 1023 */); } return nidx; }; stringview.getutf16charlength = function (nchar) { return nchar < 0x10000 ?
... startoffset optional a number expressing: the start offset of the new stringview in bytes if the input argument is an arraybuffer the start offset of the new stringview in raw
elements if the input argument is a typed array or other ordered object the start offset of the new stringview in codepoints if the input argument is a stringview or a string if not specified (or specified as null) it will default to 0.
... length optional a number expressing in codepoints the length of the new stringview if the input argument is a string or a stringview, or in raw
elements if the input is a typed array, an arraybuffer or any other kind of ordered object (like array, collections, etc.).
...And 17 more matches
The Box Model - Archive of obsolete content
this is the system that determines how all
elements are laid out visually in a xul document.
... 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.
...And 17 more matches
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
you will learn how to create, access and control, and remove html
elements dynamically.
... example: creating an html table dynamically (sample1.html) html <input type="button" value="generate a table." onclick="generate_table()"> javascript function generate_table() { // get the reference for the body var body = document.get
elementsbytagname("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 ...
...; cell.appendchild(celltext); 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.
...And 17 more matches
Array - JavaScript
neither the length of a javascript array nor the types of its
elements are fixed.
...the array's object properties and list of array
elements are separate, and the array's traversal and mutation operations cannot be applied to these named properties.
... console.log(vegetables) // ["cabbage", "carrot"] (the original array is changed) console.log(removeditems) // ["turnip", "radish"] copy an array let shallowcopy = fruits.slice() // this is how to make a copy // ["strawberry", "mango"] accessing array
elements javascript arrays are zero-indexed.
...And 17 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.
... the behaviour of
elements which have a block or inline formatting context is also defined in this specification.
... for
elements with a block formatting context, the spec says: “in a block formatting context, boxes are laid out one after the other, vertically, beginning at the top of a containing block.
...And 16 more matches
Adding Style Sheets - Archive of obsolete content
« previousnext » we have hardly modified the look of the
elements we have created so far.
... xul uses css (cascading style sheets) to customize
elements.
... style sheets a style sheet is a file which contains style information for
elements.
...And 15 more matches
Box Objects - Archive of obsolete content
various pieces of information are used such as the tag name, the attributes on an element, various css properties, the
elements and layout objects around the element, and the xbl associated with an element (xbl is described in a later section).
... unless you change the style for an element, most xul
elements will usually use the box layout object or one of its subtypes.
... recall that all xul
elements are types of boxes, that is the box is the base of all displayed xul
elements.
...And 15 more matches
The box model - Learn web development
padding, margin and border will cause other
elements to be pushed away from the box unless we decide to change the display type to inline,
elements such as headings (e.g.
... the <a> element, used for links, <span>, <em> and <strong> are all examples of
elements that will display inline by default.
... boxes also have an inner display type, however, which dictates how
elements inside that box are laid out.
...And 15 more matches
Introduction to the DOM - Web APIs
for example, the standard dom specifies that the get
elementsbytagname method in the code below must return a list of all the <p>
elements in the document: const paragraphs = document.get
elementsbytagname("p"); // paragraphs[0] is the first <p> element // paragraphs[1] is the second <p> element, etc.
...that is to say, it's written in javascript, but it uses the dom to access the document and its
elements.
...
elements).
...And 15 more matches
Accessibility documentation index - Accessibility
10 basic form hints aria, accessibility, forms when implementing forms using traditional html form-related
elements, it is important to provide labels for controls, and explicitly associate a label with its control.
...its parameter is a string that consists of the ids of the html
elements you want to concatenate into a single accessible name.
...here's where to file bugs: 13 using aria: roles, states, and properties aria, accessibility, overview, reference aria defines semantics that can be applied to
elements, with these divided into roles (defining a type of user interface element) and states and properties that are supported by a role.
...And 15 more matches
CSS selectors - CSS: Cascading Style Sheets
css selectors define the
elements to which a set of css rules apply.
... basic selectors universal selector selects all
elements.
... syntax: * ns|* *|* example: * will match all the
elements of the document.
...And 15 more matches
Global attributes - HTML: Hypertext Markup Language
global attributes are attributes common to all html
elements; they can be used on all
elements, though they may have no effect on some
elements.
... global attributes may be specified on all html
elements, even those not specified in the standard.
... that means that any non-standard
elements must still permit these attributes, even though using those
elements means that the document is no longer html5-compliant.
...And 15 more matches
Mozilla XForms User Interface - Archive of obsolete content
introduction this article is a quick reference of the xforms user interface
elements.
... mainly this is aimed to document how xforms
elements will be presented in mozilla since the xforms specifications give only a hint of how controls might be rendered.
...the xforms specs define two kinds of xforms ui
elements, called 'form controls' and 'xforms user interface'.
...And 14 more matches
HTML: A good basis for accessibility - Learn web development
previous overview: accessibility next a great deal of web content can be made accessible just by making sure the correct hypertext markup language
elements are used for the correct purpose at all times.
...this means using the correct html
elements for their intended purpose as much as possible.
... there are other issues too beyond accessibility — it is harder to style the content using css, or manipulate it with javascript, for example, because there are no
elements to use as selectors.
...And 14 more matches
HTML: A good basis for accessibility - Learn web development
previous overview: accessibility next a great deal of web content can be made accessible just by making sure the correct hypertext markup language
elements are used for the correct purpose at all times.
...this means using the correct html
elements for their intended purpose as much as possible.
... there are other issues too beyond accessibility — it is harder to style the content using css, or manipulate it with javascript, for example, because there are no
elements to use as selectors.
...And 14 more matches
Normal Flow - Learn web development
previous overview: css layout next this article explains normal flow, or the way that webpage
elements lay themselves out if you have not changed their layout.
... as detailed in the last lesson introducing layout,
elements on a webpage lay out in the normal flow, if you have not applied any css to change the way they behave.
... and, as we began to discover, you can change how
elements behave either by adjusting their position in that normal flow, or removing them from it altogether.
...And 14 more matches
Starting WebLock
this interface allows you to pass a list of
elements between interfaces.
... it has two methods: hasmore
elements() and getnext().
... [scriptable, uuid(d1899240-f9d2-11d2-bdd6-000064657374)] interface nsisimpleenumerator : nsisupports { /** * called to determine whether or not the enumerator has * any
elements that can be returned via getnext().
...And 14 more matches
MathML documentation index - MathML
7 values guide, mathml, mathml reference several mathml presentation
elements have attributes that accept length values used for size or spacing.
... 8 mathml documentation index index, mathml found 40 pages: 9 mathml element reference mathml, mathml reference this is an alphabetical list of mathml presentation
elements.
...in addition you must not nest a second <math> element in another, but you can have an arbitrary number of other child
elements in it.
...And 14 more matches
Anonymous Content - Archive of obsolete content
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.
...
elements and attributes in the xbl namespace are never cloned.
...when anonymous content
elements are built above the bound element, the topmost
elements' parentnode pointers are set to the bound element's parentnode.
...And 13 more matches
Building accessible custom components in XUL - Archive of obsolete content
assistive technologies could only see the generic html markup used to build the control; they had no way of knowing that a particular collection of div and span
elements should be treated as a single cohesive control (such as a tab bar or a treeview).
... by implementing dhtml accessibility techniques, web developers can declare that generic html
elements are really acting as specific gui controls (such as a treeitem within a treeview).
...firefox ships with a tabbox element and a tree element, and these
elements are fully accessible out-of-the-box.
...And 13 more matches
Box Model Details - Archive of obsolete content
example 1 : source view <hbox flex="1"> <button label="left" style="min-width: 100px;" flex="1"/> <spacer flex="1"/> <button label="right" style="min-width: 100px;" flex="1"/> </hbox> in the example above, all three
elements will resize themselves as they are all flexible.
...because all three
elements are flexible, but they don't need any more room, the flexibility adds no extra space.
...you can also prevent this stretching by placing a maximum height on the
elements or, better, on the box itself.
...And 13 more matches
Broadcasters and Observers - Archive of obsolete content
« previousnext » there may be times when you want several
elements to respond to events or changes of state easily.
... command attribute forwarding we've already seen that
elements such as buttons can be hooked up to commands.
... in addition, if you place the disabled attribute on the command element, any
elements hooked up to it will also become disabled automatically.
...And 13 more matches
Skinning XUL Files by Hand - Archive of obsolete content
following the instructions here, you are going to create a skin for a xul file and apply it by specifying classes for all of the interested
elements.
...as you will see, css provides a lot of flexibility for defining styles to individual
elements, to classes of
elements, to pseudo-classes, and to anonymous classes.
... button.plain { border: 0px !important; } the global skin, in which styles for these several button classes and dozens of other
elements are defined, is described in the following section.
...And 12 more matches
The Box Model - Archive of obsolete content
elements inside of a box will orient themselves horizontally or vertically.
... by combining a series of boxes, spacers and
elements with flex and pack attributes, you can control the layout of a window.
...a horizontal box lines up its
elements horizontally and a vertical box orients its
elements vertically.
...And 12 more matches
XUL controls - Archive of obsolete content
button reference related
elements: menupopup menuitem <button type="menu-button"> a button that that has a separate arrow button with a menu attached to it.
... button reference related
elements: menupopup menuitem <checkbox> a control that may be turned on and off, typically used to create options which may be enabled or disabled.
... groupbox reference related
elements: caption <filefield> allows the user to select a file.
...And 12 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
12 accessibility tree (aom) aom, accessibility, dom, glossary, reference the accessibility tree, or accessibility object model (aom), contains accessibility-related information for most html
elements.
... 128 empty element codingscripting, glossary, intermediate an empty element is an element from html, svg, or mathml that cannot have any child nodes (i.e., nested
elements or text nodes).
... 135 event codingscripting, glossary events are assets generated by dom
elements, which can be manipulated by a javascript code.
...And 12 more matches
Styling web forms - Learn web development
these problems can be divided into three categories: the good some
elements can be styled with few if any problems across platforms.
... these include the following
elements: <form> <fieldset> and <legend> single-line text <input>s (e.g.
... multi-line <textarea>s buttons (both <input> and <button>s) <label> <output> the bad some
elements are more difficult to style, requiring more complex css or some more specific tricks: checkboxes and radio buttons <input type="search"> we describe how to handle these more specific features in the article advanced form styling.
...And 12 more matches
HTML basics - Learn web development
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.
...
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.
...the class attribute allows you to give the element a non-unique identifier that can be used to target it (and any other
elements with the same class value) with style information and other things.
...And 12 more matches
Accessibility API cross-reference
the roles it specifies have already informed the 'semantic
elements' of html5 (such as main and footer), but there is not a one-to-one mapping between the aria roles and the semantics of html5.
... aria can be used to 'fill out' the missing semantics of html, but may also be used in other markup languages (such as svg) and expresses semantics using attributes, compared with html, which tends to have distinct named
elements for its roles.
...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_cell cell <td> td not what you think - this is for the damn paperclip character n/a n/a n/a for graphics representing data chart n/a figure ?
...And 12 more matches
Plug-in Basics - Plugins
the way the content provider uses html
elements to invoke the plug-in determines its display mode: whether it is embedded in a page, is part of a section, appears on its own separate page, or is hidden.
... this section discusses using html
elements and display modes.
...for details about the html
elements and their attributes, go on to: using the object element for plug-in display using the embed element for plug-in display plug-in display modes whether you are writing an html page to display a plug-in or developing a plug-in for an html author to include in a page, you need to understand how the display mode affects the way plug-ins appear.
...And 12 more matches
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
in the case of html, whitespace is largely ignored — whitespace in between words is treated as a single character, and whitespace at the start and end of
elements and outside
elements is ignored.
...creating space around and inside
elements is the job of css.
... any whitespace characters that are outside of html
elements in the original document are represented in the dom.
...And 12 more matches
Web Components
web components is a suite of different technologies allowing you to create reusable custom
elements — with their functionality encapsulated away from the rest of your code — and utilize them in your web apps.
... web components aims to solve such problems — it consists of three main technologies, which can be used together to create versatile custom
elements with encapsulated functionality that can be reused wherever you like without fear of code collisions.
... custom
elements: a set of javascript apis that allow you to define custom
elements and their behaviour, which can then be used as desired in your user interface.
...And 12 more matches
jspage - Archive of obsolete content
;}return b;}var browser=$merge({engine:{name:"unknown",version:0},platform:{name:(window.orientation!=undefined)?"ipod":(navigator.platform.match(/mac|win|linux/i)||["other"])[0].tolowercase()},features:{xpath:!!(document.evaluate),air:!!(window.runtime),query:!!(document.queryselector)},plugins:{},engines:{presto:function(){return(!window.opera)?false:((arguments.callee.caller)?960:((document.get
elementsbyclassname)?950:925)); },trident:function(){return(!window.activexobject)?false:((window.xmlhttprequest)?((document.queryselectorall)?6:5):4);},webkit:function(){return(navigator.taintenabled)?false:((browser.features.xpath)?((browser.features.query)?525:420):419); },gecko:function(){return(!document.getboxobjectfor&&window.mozinnerscreenx==null)?false:((document.get
elementsbyclassname)?19:18);}}...
...ent.prototype=(browser.engine.webkit)?window["[[domelement.prototype]]"]:{}; }a.document.window=a;return $extend(a,window.prototype);},afterimplement:function(b,a){window[b]=window.prototype[b]=a;}});window.prototype={$family:{name:"window"}}; new window(window);var document=new native({name:"document",legacy:(browser.engine.trident)?null:window.document,initialize:function(a){$uid(a);a.head=a.get
elementsbytagname("head")[0]; a.html=a.get
elementsbytagname("html")[0];if(browser.engine.trident&&browser.engine.version<=4){$try(function(){a.execcommand("backgroundimagecache",false,true); });}if(browser.engine.trident){a.window.attachevent("onunload",function(){a.window.detachevent("onunload",arguments.callee);a.head=a.html=a.window=null; });}return $extend(a,document.prototype);},afterimplement:functi...
...-z]/).test(a)){continue;}this.addevent(a,this.options[a]); delete this.options[a];}return this;}});var element=new native({name:"element",legacy:window.element,initialize:function(a,b){var c=element.constructors.get(a); if(c){return c(b);}if(typeof a=="string"){return document.newelement(a,b);}return document.id(a).set(b);},afterimplement:function(a,b){element.prototype[a]=b; if(array[a]){return;}
elements.implement(a,function(){var c=[],g=true;for(var e=0,d=this.length;e<d;e++){var f=this[e][a].apply(this[e],arguments);c.push(f); if(g){g=($type(f)=="element");}}return(g)?new
elements(c):c;});}});element.prototype={$family:{name:"element"}};element.constructors=new hash;var iframe=new native({name:"iframe",generics:false,initialize:function(){var f=array.link(arguments,{properties:object.type,ifram...
...And 11 more matches
Trees - Archive of obsolete content
the tree one of the more complex
elements in xul is the tree.
... the set of columns is defined by a number of treecol
elements, one for each column.
...this is because there are no
elements that display the individual cells, like there is with the listbox.
...And 11 more matches
How to build custom form controls - Learn web development
when it comes to standardized
elements, of which the <select> is one, the specification authors spent an inordinate amount of time specifying all interactions for every use case for every input device.
...layed, we'll see later how to handle the real value that will be sent with the form data --> <li class="option">cherry</li> <li class="option">lemon</li> <li class="option">banana</li> <li class="option">strawberry</li> <li class="option">apple</li> </ul> </div> note the use of class names; these identify each relevant part regardless of the actual underlying html
elements used.
... .widget select, .no-widget .select { /* this css selector basically says: - either we have set the body class to "widget" and thus we hide the actual <select> element - or we have not changed the body class, therefore the body class is still "no-widget", so the
elements whose class is "select" must be hidden */ position : absolute; left : -5000em; height : 0; overflow : hidden; } this css visually hides one of the
elements, but it is still available to screen readers.
...And 11 more matches
Handling common accessibility problems - Learn web development
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.
...the
elements that have this capability are the common ones that allow user to interact with web pages, namely links, <button>s, and form
elements like <input>.
... you can try this out using our native-keyboard-accessibility.html example (see the source code) — open this in a new tab, and try pressing the tab key; after a few presses, you should see the tab focus start to move through the different focusable
elements; the focused
elements are given a highlighted default style in every browser (it differs slightly between different browsers) so that you can tell what element is focused.
...And 11 more matches
XForms Accessibility
implementation of accessible objects for xforms
elements is based on top of the existing object hierarchy introduced in the mozilla accessibility module.
... xforms
elements behavior is implemented in accordance with accessible toolkit checklist.
... in general, when
elements are similar to html
elements, they are exposed to msaa/atk in a similar way.
...And 11 more matches
Document - Web APIs
the dom tree includes
elements such as <body> and <table>, among many others.
... it provides functionality globally to the document, like how to obtain the page's url and create new
elements in the document.
... document.embedsread only returns a list of the embedded <embed>
elements within the current document.
...And 11 more matches
:nth-child() - CSS: Cascading Style Sheets
the :nth-child() css pseudo-class matches
elements based on their position in a group of siblings.
... keyword values odd represents
elements whose numeric position in a series of siblings is odd: 1, 3, 5, etc.
... even represents
elements whose numeric position in a series of siblings is even: 2, 4, 6, etc.
...And 11 more matches
Microsummary XML grammar reference - Archive of obsolete content
hod="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> namespace the namespace uri for microsummary generator xml documents is: http://www.mozilla.org/microsummaries/0.1 all
elements in a microsummary generator document should be in this namespace except the descendants of the <template> element, which should be in the xslt namespace: http://www.w3.org/1999/xsl/transform the <generator> element the <generator> element is the root tag for all microsummary generators, and should contain the remainder of the xml code describing the generator.
... child
elements: <template> (required) defines how to transform pages into their microsummaries.
...child
elements: <stylesheet> or <transform> (required) the xslt stylesheet which performs the transformation.
...And 10 more matches
Introduction to XUL - Archive of obsolete content
the task of writing a xul window description is basically the same as the task of writing an html content description, with these exceptions: the syntax is xml (not that different from html 4), and there are some
elements unique to xul.
... these
elements are widgets and certain infrastructure associated with the behaviour of the window, explained below.
... a xul file can contain xml
elements and html
elements, as well as special
elements unique to xul: xul
elements.
...And 10 more matches
Document and website structure - Learn web development
previous overview: introduction to html next in addition to defining individual parts of your page (such as "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").
...usually, this is contextual 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.
...with the right css, you could use pretty much any
elements to wrap around the different sections and get it looking how you wanted, but as discussed before, we need to respect semantics and use the right element for the right job.
...And 10 more matches
HTML text fundamentals - Learn web development
in html, each paragraph has to be wrapped in a <p> element, like so: <p>i am a paragraph, oh yes i am.</p> each heading has to be wrapped in a heading element: <h1>i am the title of the story.</h1> there are six heading
elements: <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>.
... implementing structural hierarchy for example, in this story, the <h1> element represents the title of the story, the <h2>
elements represent the title of each chapter, and the <h3>
elements represent sub-sections of each chapter: <h1>the crushing bore</h1> <p>by chris mills</p> <h2>chapter 1: the dark night</h2> <p>it was a dark night.
...the rain lashed down on the ...</p> <h2>chapter 2: the eternal silence</h2> <p>our protagonist could not so much as a whisper out of the shadowy figure ...</p> <h3>the specter speaks</h3> <p>several more hours had passed, when all of a sudden the specter sat bolt upright and exclaimed, "please have mercy on my soul!"</p> it's really up to you what the
elements involved represent, as long as the hierarchy makes sense.
...And 10 more matches
Index
336 nsiarray interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference an indexed collection of
elements.
... provides basic functionality for retrieving
elements at a specific position, searching for
elements.
...xul
elements can also have controllers, although they do not have any default controllers.
...And 10 more matches
HTMLFormElement - Web APIs
it allows access to—and, in some cases, modification of—aspects of the form, as well as access to its component
elements.
... htmlformelement.
elements read only a htmlformcontrolscollection holding all form controls belonging to this form element.
... accessing the form's
elements you can access the list of the form's data-containing
elements by examining the form's
elements property.
...And 10 more matches
Microdata DOM API - Web APIs
these
elements have their element.itemscope idl attribute set to true.
...getitems( [ types ] ) returns a nodelist of the
elements in the document that create items, that are not part of other items, and that are of the types given in the argument, if any are listed.
...when called, the method must return a live nodelist object containing all the
elements in the document, in tree order, that are each top-level microdata items whose types include all the types specified in the method's argument, having obtained the types by splitting the string on spaces.
...And 10 more matches
WebGL constants - Web APIs
rendering primitives constants passed to webglrenderingcontext.draw
elements() or webglrenderingcontext.drawarrays() to specify what kind of primitive to render.
... constant name value description points 0x0000 passed to draw
elements or drawarrays to draw single points.
... lines 0x0001 passed to draw
elements or drawarrays to draw lines.
...And 10 more matches
Keyboard-navigable JavaScript widgets - Accessibility
these widgets are typically composed of <div> and <span>
elements that do not, by nature, offer the same keyboard functionality that their desktop counterparts do.
... using tabindex by default, when people use the tab key to browse a webpage, only interactive
elements (like links, form controls) get focused.
... with the tabindex global attribute, authors can make other
elements focusable, too.
...And 10 more matches
HTML attribute reference - HTML: Hypertext Markup Language
elements in html have attributes; these are additional values that configure the
elements or adjust their behavior in various ways to meet the criteria the users want.
... attribute list attribute name
elements description accept <form>, <input> list of types the server accepts, typically a file type.
... class global attribute often used with css to style
elements with common properties.
...And 10 more matches
HTML: Hypertext Markup Language
html markup includes special "
elements" such as <head>, <title>, <body>, <header>, <footer>, <article>, <section>, <p>, <div>, <span>, <img>, <aside>, <audio>, <canvas>, <datalist>, <details>, <embed>, <nav>, <output>, <progress>, <video>, <ul>, <ol>, <li> and many others.
... cors settings attributes some html
elements that provide support for cors, such as <img> or <video>, have a crossorigin attribute (crossorigin property), which lets you configure the cors requests for the element's fetched data.
... references html reference html consists of
elements, each of which may be modified by some number of attributes.
...And 10 more matches
Array.prototype.splice() - JavaScript
the splice() method changes the contents of an array by removing or replacing existing
elements and/or adding new
elements in place.
... if negative, it will begin that many
elements from the end of the array.
... deletecount optional an integer indicating the number of
elements in the array to remove from start.
...And 10 more matches
Introduction to using XPath in JavaScript - XPath
note: xpath defines qnames without a prefix to match only
elements in the null namespace.
...to match default
elements in a non-null namespace, you either have to refer to a particular element using a form such as ['namespace-uri()='http://www.w3.org/1999/xhtml' and name()='p' and @id='_myid'] (this approach works well for dynamic xpath's where the namespaces might not be known) or use prefixed name tests, and create a namespace resolver mapping the prefix to the namespace.
... numbervalue stringvalue booleanvalue example the following uses the xpath expression count(//p) to obtain the number of <p>
elements in an html document: var paragraphcount = document.evaluate( 'count(//p)', document, null, xpathresult.any_type, null ); alert( 'this document contains ' + paragraphcount.numbervalue + ' paragraph
elements' ); although javascript allows us to convert the number to a string for display, the xpath interface will not automatically convert the numerical result if the stringvalue property is reque...
...And 10 more matches
Stack Positioning - Archive of obsolete content
placement of stack children normally, the child
elements of a stack stretch to fit the size of the stack.
... example 1 : source view <stack> <button label="goblins" left="5" top="5"/> <button label="trolls" left="60" top="20"/> <button label="vampires" left="10" top="60"/> </stack> the stack here contains three
elements, each positioned at the coordinates given by the left and top attributes.
... here, all three children are buttons, but the
elements do not have to be same type.
...And 9 more matches
Stacks and Decks - Archive of obsolete content
« previousnext » there may be need to display
elements as a set of overlapping cards.
... the stack and deck
elements can be used for this purpose.
...there are a number of
elements that are specialized types of boxes, such as toolbars and tabbed panels.
...And 9 more matches
Trees and Templates - Archive of obsolete content
using a template with a tree uses very much the same syntax as with other
elements.
...this means that
elements will not be created for every row in the tree, making it more efficient.
...we need to put this attribute on only those
elements that we want repeated for each resource.
...And 9 more matches
listitem - Archive of obsolete content
the text of the listitem is specified either using listcell
elements, or by placing a label attribute directly on the listitem element.
... depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...disabled
elements are usually drawn with grayed-out text.
...And 9 more matches
menulist - Archive of obsolete content
the user may select one of the
elements displayed in the menulist.
...to create the drop-down, put a menupopup inside the menulist containing the choices as menuitem
elements.
... depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...And 9 more matches
nsIContentPolicy - Archive of obsolete content
type_image 3 indicates an image (for example, <img>
elements).
... type_stylesheet 4 indicates a stylesheet (for example, <style>
elements).
... type_subdocument 7 indicates a document contained within another document (for example, <iframe> and <frame>
elements).
...And 9 more matches
Legacy layout methods - Learn web development
this leaves us with 960 pixels for our total column/gutter widths — in this case, the padding is subtracted from the total content width because we have set box-sizing to border-box on all
elements on the site (see changing the box model completely for more explanation).
...add the following rule below your previous one: .row { clear: both; } applying this clearing means that we don’t need to completely fill each row with
elements making the full twelve columns.
... try modifying the classes on your
elements or even adding and removing some containers, to see how you can vary the layout.
...And 9 more matches
CSS FAQ - Learn web development
html
elements can have an id and/or class attribute.
...the class attribute assigns a class name to the element, and that name can be used on many
elements within the page.
... use a class-specific style when you want to apply the styling rules to many blocks and
elements within the page, or when you currently only have element to style with that style, but you might want to add more later.
...And 9 more matches
How to structure a web form - Learn web development
previous overview: forms next with the basics out of the way, we'll now look in more detail at the
elements used to provide structure and meaning to the different parts of a form.
... the flexibility of forms makes them one of the most complex structures in html; you can build any kind of basic form using dedicated form
elements and attributes.
...many assistive technologies and browser plugins can discover <form>
elements and implement special hooks to make them easier to use.
...And 9 more matches
Manipulating documents - Learn web development
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.
...this is a "tree structure" representation created by the browser that enables the html structure to be easily accessed by programming languages — for example the browser itself uses it to apply styling and other information to the correct
elements as it renders a page, and developers like you can manipulate the dom with javascript after the page has been rendered.
... 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 xml will have different root
elements).
...And 9 more matches
Handling common HTML and CSS problems - Learn web development
in the worst cases, javascript is used to generate the entire web page content and style, which makes your pages inaccessible, and less performant (generating dom
elements is expensive).
...if you have a widget, make sure it has a distinct class, and then start the selectors that select
elements inside the widget with this class, so conflicts are less likely.
...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.
...And 9 more matches
Element - Web APIs
objects that represent
elements) in a document inherit.
... it only has methods and properties common to all kinds of
elements.
...for example, the htmlelement interface is the base interface for html
elements, while the svgelement interface is the basis for all svg
elements.
...And 9 more matches
ARIA: tab role - Accessibility
elements with the role tab must either be a child of an element with the tablist role, or have their id part of the aria-owns property of a tablist.
... this combination identifies to assistive technology that the element is part of a group of related
elements.
... some assistive technology will provide a count of the number of tab role
elements inside a tablist, and inform users of which tab they currently have targeted.
...And 9 more matches
<display-internal> - CSS: Cascading Style Sheets
syntax valid <display-internal> values: table-row-group these
elements behave like <tbody> html
elements.
... table-header-group these
elements behave like <thead> html
elements.
... table-footer-group these
elements behave like <tfoot> html
elements.
...And 9 more matches
Block formatting context - Developer guides
it's the region in which the layout of block boxes occurs and in which floats interact with other
elements.
... floats (
elements where float isn't none).
... absolutely positioned
elements (
elements where position is absolute or fixed).
...And 9 more matches
<input type="image"> - HTML: Hypertext Markup Language
<input>
elements of type image are used to create graphical submit buttons, i.e.
... value <input type="image">
elements do not accept value attributes.
... additional attributes in addition to the attributes shared by all <input>
elements, image button inputs support the following attributes: attribute description alt alternate string to display when the image can'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 context from where to load the results of submitting the form height the height, in...
...And 9 more matches
HTTP Index - HTTP
19 cross-origin resource policy (corp) http, reference, security cross-origin resource policy is an opt-in mechanism that allows web applications to protect against certain cross-origin requests, such as those issued by the browser when resources are embedded using
elements such as <script> and <img>.
... 79 csp: child-src csp, child, content-security-policy, directive, http, reference, security, child-src, source the http content-security-policy (csp) child-src directive defines the valid sources for web workers and nested browsing contexts loaded using
elements such as <frame> and <iframe>.
... 85 csp: frame-src csp, content-security-policy, directive, frame, http, reference, security, frame-src, source the http content-security-policy (csp) frame-src directive specifies valid sources for nested browsing contexts loading using
elements such as <frame> and <iframe>.
...And 9 more matches
TypedArray - JavaScript
on the following pages you will find common properties and methods that can be used with any typed array containing
elements of any type.
... typedarray.prototype.length returns the number of
elements held in the typed array.
... instance methods typedarray.prototype.copywithin() copies a sequence of array
elements within the array.
...And 9 more matches
Adding Events and Commands - Archive of obsolete content
« previousnext » event handlers just like with html, most javascript code execution is triggered by event handlers attached to dom
elements.
...
elements only implement the events that are relevant to them, but there are several events that are implemented for most
elements.
...you can combine these with -moz-user-focus to add custom focus behavior to
elements that normally wouldn't have it.
...And 8 more matches
The Essentials of an Extension - Archive of obsolete content
the chrome.manifest file chrome is the set of user interface
elements of the application window that are outside of a window's content area.
... toolbars, menu bars, progress bars, and window title bars are all examples of
elements that are typically part of the chrome.
... xul files are xml files that define the user interface
elements in firefox and firefox extensions.
...And 8 more matches
button - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...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; } dir type: one of the values below the direction in which the child
elements of the element are placed.
... normal for scales, the scale's values are ordered from left to right (for horizontal scales) or from top to bottom (for vertical scales) for other
elements, the
elements are placed left to right or top to bottom in the order they appear in the xul code.
...And 8 more matches
menuitem - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...And 8 more matches
menuseparator - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...And 8 more matches
radio - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...And 8 more matches
richlistitem - Archive of obsolete content
disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...
elements with a higher tabindex are later in the tab sequence.
...And 8 more matches
scale - Archive of obsolete content
min, movetoclick, pageincrement, tabindex, value properties disabled, max, min, increment, pageincrement, tabindex, value, methods decrease, decreasepage, increase, increasepage, examples horizontal scale: <scale min="1" max="10"/> vertical scale: <scale min="1" max="10" orient="vertical"/> attributes dir type: one of the values below the direction in which the child
elements of the element are placed.
... normal for scales, the scale's values are ordered from left to right (for horizontal scales) or from top to bottom (for vertical scales) for other
elements, the
elements are placed left to right or top to bottom in the order they appear in the xul code.
...for other
elements, they are placed right to left or bottom to top.
...And 8 more matches
toolbarbutton - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...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; } dir type: one of the values below the direction in which the child
elements of the element are placed.
... normal for scales, the scale's values are ordered from left to right (for horizontal scales) or from top to bottom (for vertical scales) for other
elements, the
elements are placed left to right or top to bottom in the order they appear in the xul code.
...And 8 more matches
tree - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container which can be used to hold a tabular or hierarchical set of rows of
elements.
...unlike other
elements, the data to display inside the tree is not specified using tags, but is determined from a view object.
... description content tree nsitreeview, nsitreecontentview yes this tree has treeitem
elements placed within the treechildren element.
...And 8 more matches
Using the Right Markup to Invoke Plugins - Archive of obsolete content
additional param
elements (which are "children" of the above object element) specify configuration parameters for the flash plugin.
...the data attribute points to the swf file to play, and the configuration parameters (the param
elements) are used in a consistent manner both for ie and for mozilla-based browsers such as netscape 7.
... ie doesn't display nested object
elements correctly according to the html 4.01 specification.
...And 8 more matches
CSS basics - Learn web development
css is what you use to selectively style html
elements.
...it defines the element(s) to be styled (in this example, <p>
elements).
...(in this example, color is a property of the <p>
elements.) in css, you choose which properties you want to affect in the rule.
...And 8 more matches
nsIAccessibleProvider
outerdoc 0x00000001 for
elements that spawn a new document.
... xultext 0x0000101a xultextbox 0x0000101b xulthumb 0x0000101c xultree 0x0000101d xultreecolumns 0x0000101e xultreecolumnitem 0x0000101f xultoolbar 0x00001020 xultoolbarseparator 0x00001021 xultooltip 0x00001022 xultoolbarbutton 0x00001023 xforms
elements constants constant value description xformscontainer 0x00002000 used for xforms
elements that provide accessible object for itself as well for anonymous content.
... xformstrigger 0x00002003 used for trigger and submit
elements.
...And 8 more matches
Timing element visibility with the Intersection Observer API - Web APIs
the intersection observer api makes it easy to be asynchronously notified when
elements of interest become more or less obscured by a shared ancestor node or element, including the document itself.
... the basics we provide styles for the <body> and <main>
elements to define the site's background as well as the grid the various parts of the site will be placed in.
...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.
...And 8 more matches
:nth-last-child() - CSS: Cascading Style Sheets
the :nth-last-child() css pseudo-class matches
elements based on their position among a group of siblings, counting from the end.
... syntax the nth-last-child pseudo-class is specified with a single argument, which represents the pattern for matching
elements, counting from the end.
... keyword values odd represents
elements whose numeric position in a series of siblings is odd: 1, 3, 5, etc., counting from the end.
...And 8 more matches
HTML5 - Developer guides
it is a new version of the language html, with new
elements, attributes, and behaviors, and a larger set of technologies that allows the building of more diverse and powerful web sites and applications.
... semantics sections and outlines in html5 a look at the new outlining and sectioning
elements in html5: <section>, <article>, <nav>, <header>, <footer> and <aside>.
... using html5 audio and video the <audio> and <video>
elements embed and allow the manipulation of new multimedia content.
...And 8 more matches
BigInt64Array - JavaScript
once established, you can reference
elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
... bigint64array.prototype.length returns the number of
elements hold in the bigint64array.
... instance methods bigint64array.prototype.copywithin() copies a sequence of array
elements within the array.
...And 8 more matches
BigUint64Array - JavaScript
once established, you can reference
elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
... biguint64array.prototype.length returns the number of
elements hold in the biguint64array.
... instance methods biguint64array.prototype.copywithin() copies a sequence of array
elements within the array.
...And 8 more matches
Float32Array - JavaScript
once established, you can reference
elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... float32array.prototype.length returns the number of
elements hold in the float32array.
... instance methods float32array.prototype.copywithin() copies a sequence of array
elements within the array.
...And 8 more matches
Float64Array - JavaScript
once established, you can reference
elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... float64array.prototype.length returns the number of
elements hold in the float64array.
... instance methods float64array.prototype.copywithin() copies a sequence of array
elements within the array.
...And 8 more matches
Int16Array - JavaScript
once established, you can reference
elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... int16array.prototype.length returns the number of
elements hold in the int16array.
... instance methods int16array.prototype.copywithin() copies a sequence of array
elements within the array.
...And 8 more matches
Int32Array - JavaScript
once established, you can reference
elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... int32array.prototype.length returns the number of
elements hold in the int32array.
... instance methods int32array.prototype.copywithin() copies a sequence of array
elements within the array.
...And 8 more matches
Int8Array - JavaScript
once established, you can reference
elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... int8array.prototype.length returns the number of
elements hold in the int8array.
... instance methods int8array.prototype.copywithin() copies a sequence of array
elements within the array.
...And 8 more matches
Uint16Array - JavaScript
once established, you can reference
elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... uint16array.prototype.length returns the number of
elements hold in the uint16array.
... instance methods uint16array.prototype.copywithin() copies a sequence of array
elements within the array.
...And 8 more matches
Uint32Array - JavaScript
once established, you can reference
elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... uint32array.prototype.length returns the number of
elements hold in the uint32array.
... instance methods uint32array.prototype.copywithin() copies a sequence of array
elements within the array.
...And 8 more matches
Uint8Array - JavaScript
once established, you can reference
elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... uint8array.prototype.length returns the number of
elements held in the uint8array.
... instance methods uint8array.prototype.copywithin() copies a sequence of array
elements within the array.
...And 8 more matches
Uint8ClampedArray - JavaScript
once established, you can reference
elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... uint8clampedarray.prototype.length returns the number of
elements hold in the uintclamped8array.
... instance methods uint8clampedarray.prototype.copywithin() copies a sequence of array
elements within the array.
...And 8 more matches
Using templates and slots - Web Components
this article explains how you can use the <template> and <slot>
elements to create a flexible template that can then be used to populate the shadow dom of a web component.
...we'll call it <my-paragraph>: custom
elements.define('my-paragraph', class extends htmlelement { constructor() { super(); let template = document.getelementbyid('my-paragraph'); let templatecontent = template.content; const shadowroot = this.attachshadow({mode: 'open'}) .appendchild(templatecontent.clonenode(true)); } } ); the key point to note here is that we append a clone of the template conte...
...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.
...And 8 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
“chrome”is the word used to describe all the gui structural
elements that go into an xul application.
... the skin package this is used to include source files used as visual
elements in the gui, including style sheets and images.
... expand spot 3; this will disclose the area numbered 4, with several menuitem
elements.
...And 7 more matches
align - Archive of obsolete content
« xul reference home align type: one of the values below the align attribute specifies how child
elements of the box are aligned, when the size of the box is larger than the total size of the children.
... start child
elements are aligned starting from the left or top edge of the box.
... center extra space is split equally along each side of the child
elements, resulting in the children being placed in the center of the box.
...And 7 more matches
attribute.align - Archive of obsolete content
summary the align attribute specifies how child
elements of the box are aligned, when the size of the box is larger than the total size of the children.
... parameters start child
elements are aligned starting from the left or top edge of the box.
... center extra space is split equally along each side of the child
elements, resulting the children being placed in the center of the box.
...And 7 more matches
listbox - Archive of obsolete content
a listbox is expected to contain listitem
elements.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...And 7 more matches
menu - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...And 7 more matches
Attribute selectors - Learn web development
previous overview: building blocks next as you know from your study of html,
elements can have attributes that give further detail about the element being marked up.
... in css you can use attribute selectors to target
elements with certain attributes.
... selector example description [attr] a[title] matches
elements with an attr attribute (whose name is the value in square brackets).
...And 7 more matches
CSS selectors - Learn web development
previous overview: building blocks next in css, selectors are used to target the html
elements on our web pages that we want to style.
... there are a wide variety of css selectors available, allowing for fine-grained precision when selecting
elements to style.
...it is a pattern of
elements and other terms that tell the browser which html
elements should be selected to have the css property values inside the rule applied to them.
...And 7 more matches
Styling tables - Learn web development
by default, when you set borders on table
elements, they will all have spacing between them, as the below image illustrates: this doesn't look very nice (although it might be the look you want, who knows?) with border-collapse: collapse; set, the borders collapse down into one, which looks much better: we've put a border around the whole table, which is needed because we'll be putting some borders round the table header and footer later on —...
... 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.
...we've also set our custom font on the headings inside the <thead> and <tfoot>
elements, for a nice grungy, punky look.
...And 7 more matches
Practical positioning examples - Learn web development
the div contains three <article>
elements, which will make up the content panels that correspond to each tab.
...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.
...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 context, 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.
...And 7 more matches
Fundamental text and font styling - Learn web development
text content effectively behaves like a series of inline
elements, being laid out on lines adjacent to one another, and not creating line breaks until the end of the line is reached, or unless you force a line break manually using the <br> element.
...but it was a rare occasion such as this that he did.</p> you can find the finished example on github (see also the source code.) color the color property sets the color of the foreground content of the selected
elements (which is usually the text, but can also include a couple of other things, such as an underline or overline placed on text using the text-decoration property).
...but it was a rare occasion such as this that he did.</p> font families to set a different font on your text, you use the font-family property — this allows you to specify a font (or list of fonts) for the browser to apply to the selected
elements.
...And 7 more matches
Basic native form controls - Learn web development
previous overview: forms next in the previous article, we marked up a functional web form example, introducing some form controls and common structural
elements, and focusing on accessibility best practices.
... you've already met some form
elements, including <form>, <fieldset>, <legend>, <textarea>, <label>, <button>, and <input>.
... note: the <input> element is unique amongst html
elements because it can take many different forms depending on its type attribute value.
...And 7 more matches
CSS property compatibility table for form controls - Learn web development
border and background background no no border-radius no no box-shadow no no select boxes (single line) see the <select>, <optgroup> and <option>
elements.
... property n t note css box model width partial[1] partial[1] this property is okay on the <select> element, but it cannot be the case on the <option> or <optgroup>
elements.
... the property is well applied on the <select> element, but is inconsistently handled on <option> and <optgroup>
elements.
...And 7 more matches
UI pseudo-classes - Learn web development
prerequisites: basic computer literacy, and a basic understanding of html and css, including general knowledge of pseudo-classes and pseudo-
elements.
... <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.
... the idea is that we can use the ::before and ::after pseudo-
elements along with the content property to make a chunk of content appear before or after the affected element.
...And 7 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
we will also see how to declare and clean-up event listeners on dom
elements.
...we will also learn about the action directive, which will allow us to extend the functionality of html
elements in a reusable and declarative way.
... if you press the tab key repeatedly, you'll see the dashed focus indicator cycling between all the focusable
elements on the page.
...And 7 more matches
nsIDOMXULElement
66 introduced gecko 1.0 inherits from: nsidomelement last changed in gecko 1.9 (firefox 3) method overview void blur(); void click(); void docommand(); void focus(); nsidomnodelist get
elementsbyattribute(in domstring name, in domstring value); nsidomnodelist get
elementsbyattributens(in domstring namespaceuri, in domstring name, in domstring value); attributes attribute type description align domstring gets/sets the value of the element's align attribute.
...gets or creates a box object for the element; browser, editor, iframe, listbox, menu, menupopup, scrollbox, tooltip and tree
elements receive specialized box objects allowing access to additional properties not normally available from script.
...focus() attempts to set focus to the element; will not work for example for disabled
elements.
...And 7 more matches
XUL Overlays
though overlays often define ui
elements that have been added as a result of an update or enhancement of some kind, they can be used in many different ways.
...when plug-ins, browser extensions, or other applications provide new ui
elements to the browser, these
elements should be defined in overlay files.
... the installation of a media plug-in, for example, may add new icons and menu items to the interface: in the navigatoroverlay.xul file or in a separate navigatorsspoverlay.xul file (where navigator.xul defines the basic ui for the navigator package), these new plug-in
elements would be defined as a collection of
elements or subtrees: <menuitem name="super stream player"/> <menupopup name="ss favorites"> <menuitem name="wave" src="mavericks.ssp"/> <menuitem name="soccer" src="brazil_soccer.ssp"/> </menupopup> <titledbutton id="ssp" crop="right" flex="1" value="&ssbutton.label;" onclick="firessp()"/> overlays and id attributes bases and overlays are merged when they share the same id attribute.
...And 7 more matches
Examine and edit HTML - Firefox Developer Tools
css selector search you can search
elements by entering a css selector.
...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.
...And 7 more matches
Keyboard - Accessibility
focusable
elements should have interactive semantics if an element can be focused using the keyboard, then it should be interactive; that is, the user should be able to do something to it and produce a change of some kind (for example, activating a link or changing an option).
... most interactive
elements are focusable by default; you can make an element focusable by adding a tabindex=0 attribute value to it.
...a value of zero indicates that the element is part of the default focus order, which is based on the ordering of
elements in the html document.
...And 7 more matches
The stacking context - CSS: Cascading Style Sheets
the stacking context is a three-dimensional conceptualization of html
elements along an imaginary z-axis relative to the user, who is assumed to be facing the viewport or the webpage.
... html
elements occupy this space in priority order based on element attributes.
... the stacking context in the previous part of this article, using z-index, the rendering order of certain
elements is influenced by their z-index value.
...And 7 more matches
CSS reference - CSS: Cascading Style Sheets
use this css reference to browse an alphabetical index of all of the standard css properties, pseudo-classes, pseudo-
elements, data types, and at-rules.
...where : selectors-list ::= selector[:pseudo-class] [::pseudo-element] [, selectors-list] properties-list ::= [property : value] [; properties-list] see the index of selectors, pseudo-classes, and pseudo-
elements below.
...nicode-range (@font-face)unset<url>url()user-zoom (@viewport)v:validvar()vertical-alignvh@viewportviewport-fit (@viewport)visibility:visitedvmaxvminvwwwhite-spacewidowswidthwidth (@viewport)will-changeword-breakword-spacingword-wrapwriting-modexxzz-indexzoom (@viewport)others--* selectors the following are the various selectors, which allow styles to be conditional based on various features of
elements within the dom.
...And 7 more matches
box-lines - CSS: Cascading Style Sheets
the default value is single, which means that all
elements will be placed in a single row or column, and any
elements that don't fit will simply be considered overflow.
...the box must attempt to fit its children on as few lines as possible by shrinking all
elements down to their minimum widths or heights if necessary.
... if the children in a horizontal box still do not fit on a line after being reduced to their minimum widths, then children are moved one by one onto a new line, until the
elements remaining on the previous line fit.
...And 7 more matches
<form> - HTML: Hypertext Markup Language
it is possible to use the :valid and :invalid css pseudo-classes to style a <form> element based on whether or not the
elements inside the form are valid.
... content categories flow content, palpable content permitted content flow content, but not containing <form>
elements tag omission none, both the starting and ending tag are mandatory.
...instead, use the accept attribute on <input type=file>
elements.
...And 7 more matches
Keyed collections - JavaScript
« previousnext » this chapter introduces collections of data which are indexed by a key; map and set objects contain
elements which are iterable in the order of insertion.
...a map object is a simple key/value map and can iterate its
elements in insertion order.
... the iteration of maps is in insertion order of the
elements.
...And 7 more matches
Array.prototype.sort() - JavaScript
the sort() method sorts the
elements of an array in place and returns the sorted array.
... the default sort order is ascending, built upon converting the
elements into strings, then comparing their sequences of utf-16 code units values.
...if omitted, the array
elements are converted to strings, then sorted according to each character's unicode code point value.
...And 7 more matches
The building blocks of responsive design - Progressive web apps (PWAs)
the markup is very simple: <x-deck selected-index="0"> <x-card> … </x-card> <x-card> … </x-card> <x-card> … </x-card> </x-deck> note: these weird x-
elements may be unfamiliar; they are part of brick, mozilla's ui element library for mobile web apps.
... border-box sizing the padding does not affect the overall width and height of the containers because we have set the box-sizing of all
elements to border-box: *, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } this basically means that width and height will now set the dimensions of an element all the way up to and including the border, not just the content.
... flexible replaced
elements things are working fairly well now, but there are still some issues just waiting to present themselves.
...And 7 more matches
Namespaces crash course - SVG: Scalable Vector Graphics
the problem with mixing content from different xml dialects in a single xml document is that the
elements defined by one dialect may have the same name as
elements defined by another.
...this parameter says that the <svg> element and its child
elements belong to whichever xml dialect has the namespace name 'http://www.w3.org/2000/svg' which is, of course, svg.
...as a result, it and all its child
elements are interpreted by the user agent as belonging to xhtml, except for the <svg> element.
...And 7 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
dom differences the document object model (dom) is the tree structure that contains the document
elements.
... accessing
elements to retrieve an element reference using the cross-browser approach, you use document.getelementbyid(aid), which works in internet explorer 5.0+, mozilla-based browsers, other w3c-compliant browsers and is part of the dom level 1 specification.
...while document.getelementbyid lets you retrieve one element, you can also use document.layers and document.all to obtain a list of all document
elements with a certain tag name, such as all <div>
elements.
...And 6 more matches
Binding Attachment and Detachment - Archive of obsolete content
attachment using css bindings can be attached to
elements through css using the -moz-binding property.
... -moz-binding value: none | [,]* <uri> | inherit initial value: none applies to: all
elements (not generated content or pseudo-
elements) inherited: no percentages: n/a the value of the -moz-binding property is a set of urls that identify specific bindings.
... in the following example, a binding is referenced that will be attached to all html checkbox
elements.
...And 6 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...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 context at this point can only access the following things: global values/functions i.e.
...And 6 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...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 context at this point can only access the following things: global values/functions i.e.
...And 6 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.
...specific xul
elements also provide additional functions which may be used.
... retrieving
elements the most common method to retrieve an element in a document is to give the element an id attribute and the use the document's getelementbyid() method.
...And 6 more matches
Using Remote XUL - Archive of obsolete content
it contains
elements for all common ui widgets (menus, buttons, toolbars, etc.) and many sophisticated ones (trees, browsers, color pickers).
...the window element is the root (outermost) element in a xul document and encompasses all other
elements.
... these two
elements give us a valid xul document we can load and display in our web browser, even though there's nothing to see yet.
...And 6 more matches
description - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...And 6 more matches
richlistbox - Archive of obsolete content
tion, movebyoffset, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <richlistbox> <richlistitem> <description>a xul description!</description> </richlistitem> <richlistitem> <button label="a xul button"/> </richlistitem> </richlistbox> the richlistbox element contains multiple richlistitem
elements, which can contain any content.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...And 6 more matches
Processing XML with E4X - Archive of obsolete content
operator accesses all children no matter how deeply nested: alert(person..*.length()); // 11 the length() method here returns 11 because both
elements and text nodes are included in the resulting xmllist.
... objects representing xml
elements provide a number of useful methods, some of which are illustrated below: todo: add all of the methods to the javascript reference, link from here alert(person.name.text()) // bob smith var xml = person.name.toxmlstring(); // a string containing xml var personcopy = person.copy(); // a deep copy of the xml object var child = person.child(1); // the second child node; in this case the <likes> element working with xmllists in addition to the xml object, e4x introduces an xmllist object.
... xmllist is used to represent an ordered collection of xml objects; for example, a list of
elements.
...And 6 more matches
CSS and JavaScript accessibility best practices - Learn web development
using correct semantics has a lot to do with user expectations —
elements look and behave in certain ways, according to their functionality, and these common conventions are expected by users.
... as an example, a screen reader user can't navigate a page via heading
elements if the developer hasn't appropriately used heading
elements to markup the content.
... emphasised text inline markup that confers specific emphasis to the text that it wraps: <p>the water is <em>very hot</em>.</p> <p>water droplets collecting on surfaces is called <strong>condensation</strong>.</p> you might want to add some simple coloring to your emphasised text: strong, em { color: #a60000; } you will however rarely need to style emphasis
elements in any significant way.
...And 6 more matches
Combinators - Learn web development
descendant combinator the descendant combinator — typically represented by a single space ( ) character — combines two selectors such that
elements matched by the second selector are selected if they have an ancestor (parent, parent's parent, parent's parent's parent, etc) element matching the first selector.
...it matches only those
elements matched by the second selector that are the direct children of
elements matched by the first.
... descendent
elements further down the hierarchy don't match.
...And 6 more matches
Getting started with CSS - Learn web development
styling html
elements by making our heading red we have already demonstrated that we can target and style an html element.
... changing the default behavior 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.
... adding a class so far we have styled
elements based on their html element names.
...And 6 more matches
Your first form - Learn web development
overview: forms next the first article in our series provides you with your very first experience of creating a web form, including designing a simple form, implementing it using the right html form controls and other html
elements, adding some very simple styling via css, and describing how data is sent to a server.
... objective: to gain familiarity with what web forms are, what they are used for, how to think about designing them, and the basic html
elements you'll need for simple cases.
... 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.
...And 6 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).
... objective: to learn how to use lesser-known html
elements to mark up advanced semantic features.
...And 6 more matches
Video and audio content - Learn web development
in this article we'll look at doing just that with the <video> and <audio>
elements; we'll then finish off by looking at how to add captions/subtitles to your videos.
...fortunately, a few years later the html5 specification had such features added, with the <video> and <audio>
elements, and some shiny new javascript apis for controlling them.
...this is especially interesting since while most browsers don't support using mpeg media in the <video> and <audio>
elements, they may still support mp3 due to its popularity.
...And 6 more matches
nsISimpleEnumerator
xpcom/ds/nsisimpleenumerator.idlscriptable this interface represents an enumeration of xpcom objects and provides methods to access
elements sequentially.
... inherits from: nsisupports last changed in gecko 0.9.6 method overview nsisupports getnext(); boolean hasmore
elements(); methods getnext() called to retrieve the next element in the enumerator.
...must be preceded by a call to hasmore
elements() which returns pr_true.
...And 6 more matches
Introduction to DOM Inspector - Firefox Developer Tools
(note that there are bugs which prevent the flasher from dom inspector apis from working correctly on certain platforms.) if you inspect the main browser window, for example, and select nodes in the dom nodes viewer (other than the
elements which have no visible ui as is the case with the endless list of script
elements that are loaded into browser.xul), you will see the various parts of the browser interface being highlighted with a blinking red border.
... 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.
...And 6 more matches
Fullscreen API - Web APIs
this makes it possible to present desired content—such as an online game—using the user's entire screen, removing all browser user interface
elements and other applications from the screen until full-screen mode is shut off.
... methods on the element interface element.requestfullscreen() asks the user agent to place the specified element (and, by extension, its descendants) into full-screen mode, removing all of the browser's ui
elements as well as all other applications from the screen.
... event handlers on
elements element.onfullscreenchange an event handler which is called when the fullscreenchange event is sent to the element, indicating that the element has been placed into, or removed from, full-screen mode.
...And 6 more matches
Intersection Observer API - Web APIs
historically, detecting visibility of an element, or the relative visibility of two
elements in relation to each other, has been a difficult task for which solutions have been unreliable and prone to causing the browser and the sites the user is accessing to become sluggish.
... how intersection is calculated all areas considered by the intersection observer api are rectangles;
elements which are irregularly shaped are considered as occupying the smallest rectangle which encloses all of the element's parts.
...this lets you determine whether the entry represents a transition from the
elements intersecting to no longer intersecting or a transition from not intersecting to intersecting.
...And 6 more matches
ARIA: listbox role - Accessibility
the listbox role is used for lists from which a user may select one or more items which are static and, unlike html <select>
elements, may contain images.
... it is highly recommended to use the html select element, or a group of radio buttons if only one item can be selected, or a group of checkboxes if multiple items can be selected, because there is a lot of keyboard interactivity to manage focus for all the descendants, and native html
elements provide this functionality for you for free.
...
elements with the role listbox have an implicit aria-orientation value of vertical.
...And 6 more matches
Specificity - CSS: Cascading Style Sheets
as per css rules, directly targeted
elements will always take precedence over rules which an element inherits from its ancestor.
... note: proximity of
elements in the document tree has no effect on the specificity.
... selector types the following list of selector types increases by specificity: type selectors (e.g., h1) and pseudo-
elements (e.g., ::before).
...And 6 more matches
<input type="submit"> - HTML: Hypertext Markup Language
<input>
elements of type submit are rendered as buttons.
...this label is likely to be something along the lines of "submit" or "submit query." here's an example of a submit button with a default label in your browser: <input type="submit"> additional attributes in addition to the attributes shared by all <input>
elements, submit button inputs support the following attributes: attribute description formaction the url to which to submit the form's data; overrides the form's action 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.
... this attribute is also available on <input type="image"> and <button>
elements.
...And 6 more matches
<tr>: The Table Row element - HTML: Hypertext Markup Language
the row's cells can then be established using a mix of <td> (data cell) and <th> (header cell)
elements.
...we have some examples below, but for more examples and an in-depth tutorial, see the html tables series in our learn web development area, where you'll learn how to use the table
elements and their attributes to get just the right layout and formatting for your tabular data.
...not even the table section
elements are used; instead, the browser is allowed to determine this automatically.
...And 6 more matches
Array.prototype.filter() - JavaScript
the filter() method creates a new array with all
elements that pass the test implemented by the provided function.
... return value a new array with the
elements that pass the test.
... if no
elements pass the test, an empty array will be returned.
...And 6 more matches
requiredFeatures - SVG: Scalable Vector Graphics
twentynine
elements are using this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <circle>, <clippath>, <cursor>, <defs>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <set>, <svg>, <switch>, <text>, <textpath>, <tref>, <tspan>, <use> html, body, svg { height: 100%; } text { fill: white; } <svg viewb...
...in some cases the feature strings map directly to a set of attributes, properties or
elements, in others they represent some functionality of the browser.
... http://www.w3.org/tr/svg11/feature#coreattribute the browser supports the id, xml:base, xml:lang and xml:space attributes http://www.w3.org/tr/svg11/feature#structure the browser supports <svg>, <g>, <defs>, <desc>, <title>, <metadata>, <symbol> and <use>
elements.
...And 6 more matches
Menus - Archive of obsolete content
there are four
elements that a menupopup can be attached to.
...the following is a brief summary of these
elements, examples of each will be provided later.
...it should contain menu
elements.
...And 5 more matches
Groupboxes - Archive of obsolete content
« previousnext » this section describes a way to include
elements into groups groupboxes the groupbox element is used to group related xul
elements together, much like the html fieldset element is used to group html
elements.
... the groupbox is a type of box, and the
elements it contains are aligned according to the xul box rules.
...groupboxes are box
elements, so you can use the box attributes, such as orient and flex.
...And 5 more matches
Styling a Tree - Archive of obsolete content
styling the tree you can style the tree border and the column headers in the same way as other
elements.
... the body of the tree must be styled in a somewhat different way than other
elements.
... this is because the tree body is stored in a different way to other
elements.
...And 5 more matches
Tabboxes - Archive of obsolete content
it involves five new
elements, which are described briefly here and in more detail below.
...it consists of two children, a tabs element which contains the row of tabs and a tabpanels
elements which contains the tabbed pages.
... shown below is the general syntax of a tabbox: <tabbox id="tablist"> <tabs> <!-- tab
elements go here --> </tabs> <tabpanels> <!-- tabpanel
elements go here --> </tabpanels> </tabbox> the tab
elements are placed inside a tabs element, which is much like a regular box.
...And 5 more matches
Using Spacers - Archive of obsolete content
« previousnext » in this section, we will find out how to add some spacing in between the
elements we have created.
...(java uses layout managers for example.) xul provides the capability for
elements to position and resize automatically.
... as we've seen, the find files window has appeared in a size that will fit the
elements inside it.
...And 5 more matches
XML - Archive of obsolete content
html allows some
elements, such as <br> and <hr>, to be neither closed nor matched with a closing element.
... in xul,
elements must either be of the form <tag></tag> or <tag/> to be valid.
...an actual memo using the memoml to represent itself might look like this: <memo> <from>ian oeschger</from> <to>steve rudman</to> <body>i think the first draft of the guide is done!</body> </memo> note how the memo element -- the root element in our brief definition, ordeclaration, above -- surrounds the other three
elements.
...And 5 more matches
prefpane - Archive of obsolete content
the former is specified using a preferences element while the latter may be specified using other xul
elements.
... attributes helpuri, image, label, onpaneload, selected, src properties image, label, preference
elements, preferences, selected, src examples methods preferenceforelement <prefpane id="panegeneral" label="general" src="chrome://path/to/paneoverlay.xul"/> or <prefpane id="panegeneral" label="general" onpaneload="ongeneralpaneload(event);"> <preferences> <preference id="pref_one" name="extensions.myextension.one" type="bool"/> ...
...more ui
elements ...
...And 5 more matches
radiogroup - Archive of obsolete content
disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...
elements with a higher tabindex are later in the tab sequence.
...And 5 more matches
tab - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...And 5 more matches
tabs - Archive of obsolete content
a tabs element 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.
...disabled
elements are usually drawn with grayed-out text.
...And 5 more matches
Using the W3C DOM - Archive of obsolete content
« previousnext » the document object has properties for accessing collections of
elements, such as document.images and document.forms.
... the w3c document object model provides interfaces dom
elements to scriptable objects.
... accessing
elements with the w3c dom the basic method for referencing
elements in an html page is document.getelementbyid().
...And 5 more matches
XForms Switch Module - Archive of obsolete content
the module defines for this switch, case and toggle
elements.
... switch element the element (see the spec) is used in conjunction with case and toggle
elements.
... the switch element contains case
elements which in turn contain markup.
...And 5 more matches
Type, class, and ID selectors - Learn web development
all instances of <span>, <em> and <strong>
elements are therefore styled accordingly.
...in the following example we have used the universal selector to remove the margins on all
elements.
...for example, if i wanted to select the first child of any descendant element of <article> , no matter what element it was, and make it bold, i could use the :first-child selector, which we will learn more about in the lesson on pseudo-classes and pseudo-
elements, as a descendant selector along with the <article> element selector: article :first-child { } this could be confused however with article:first-child, which will select any <article> element that is the first child of another element.
...And 5 more matches
Client-side form validation - Learn web development
this is done by using validation attributes on form
elements.
... when an element is valid, the following things are true: the element matches the :valid css pseudo-class, which lets you apply a specific style to valid
elements.
... when an element is invalid, the following things are true: the element matches the :invalid css pseudo-class, and sometimes other ui pseudo-classes (e.g., :out-of-range) depending on the error, which lets you apply a specific style to invalid
elements.
...And 5 more matches
HTML Cheatsheet - Learn web development
inline
elements an "element" is a single part of a webpage.
... some
elements are large and hold smaller
elements like containers.
... some
elements are small and are "nested" inside larger ones.
...And 5 more matches
JNI.jsm
working with arrays creating/preallocating a typed array methods cdata .get(number aindex); cdata .get
elements(number astart, number alength); void .set(number aindex, cdata avalue); void .set
elements(number astart, [array, size_is(arr.length > number anynumber > 0)] in cdata avalsarray); .get() gets the value of the element in the array at given aindex.
... .get
elements() returns a new cdata object of the section of the array specified by astart and ending at position astart + alength.
... void set
elements(number astart, number alength); parameters astart the position to start setting
elements of the array in.
...And 5 more matches
Mozilla Quirks Mode Behavior
collapse the bottom or top margins of empty
elements (bug 97361).
... indent nested dl
elements (bug 8749).
... (this also applies to get
elementsbyclassname.) 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.
...And 5 more matches
Attribute selectors - CSS: Cascading Style Sheets
the css attribute selector matches
elements based on the presence or value of a given attribute.
... /* <a>
elements with a title attribute */ a[title] { color: purple; } /* <a>
elements with an href matching "https://example.org" */ a[href="https://example.org"] { color: green; } /* <a>
elements with an href containing "example" */ a[href*="example"] { font-size: 2em; } /* <a>
elements with an href ending ".org" */ a[href$=".org"] { font-style: italic; } /* <a>
elements whose class attribute contains the word "logo" */ a[class~="logo"] { padding: 2px; } syntax [attr] represents
elements with an attribute name of attr.
... [attr=value] represents
elements with an attribute name of attr whose value is exactly value.
...And 5 more matches
Introduction to formatting contexts - CSS: Cascading Style Sheets
a block formatting context (bfc) will lay child
elements out according to block layout rules, a flex formatting context will lay its children out as flex items, etc.
...
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 context.
... a new bfc is created in the following situations:
elements made to float using float absolutely positioned
elements (including position: fixed or position: sticky)
elements with display: inline-block table cells or
elements with display: table-cell, including anonymous table cells created when using the display: table-* properties table captions or
elements with display: table-caption block
elements where overflow has a value other than visible
elements with display: flow-root or display: flow-root list-item
elements with contain: layout, content, or strict ...
...And 5 more matches
Visual formatting model - CSS: Cascading Style Sheets
relationships between
elements in the document tree.
... box generation box generation is the part of the css visual formatting model that creates boxes from the document's
elements.
... some
elements may generate additional boxes in addition to the principal box, for example display: list-item generates more than one box (e.g.
...And 5 more matches
clear - CSS: Cascading Style Sheets
the clear css property sets whether an element must be moved below (cleared) floating
elements that precede it.
... the clear property applies to floating and non-floating
elements.
... vertical margins between two floated
elements on the other hand will not collapse.
...And 5 more matches
<color> - CSS: Cascading Style Sheets
to learn more about using color in html, see applying color to html
elements using css.
... buttonhighlight the color of the border facing the light source for 3-d
elements that appear 3-d due to that layer of surrounding border.
... buttonshadow the color of the border away from the light source for 3-d
elements that appear 3-d due to that layer of surrounding border.
...And 5 more matches
HTML5 Parser - Developer guides
lack of reparsing prior to html5, parsers reparsed the document if they hit the end of the file within certain
elements or within comments.
... foreignobject and annotation-xml (and various less important
elements) establish a nested html scope, so you can nest svg, mathml and html as you’d expect to be able to nest them.
... attributes starting with xmlns have absolutely no effect on what namespace
elements or attributes end up in, so you don’t need to use attributes starting with xmlns.
...And 5 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
however, this can be useful when creating media
elements whose source will be set at a later time, under user control.
...without sending the origin: http header), preventing its non-tainted used in <canvas>
elements.
... waiting playback has stopped because of a temporary lack of data usage notes browsers don't all support the same file types and audio codecs; you can provide multiple sources inside nested <source>
elements, and the browser will then use the first one it understands: <audio controls> <source src="myaudio.mp3" type="audio/mpeg"> <source src="myaudio.ogg" type="audio/ogg"> <p>your browser doesn't support html5 audio.
...And 5 more matches
Content-Security-Policy - HTTP
child-src defines the valid sources for web workers and nested browsing contexts loaded using
elements such as <frame> and <iframe>.
... frame-src specifies valid sources for nested browsing contexts loading using
elements such as <frame> and <iframe>.
... media-src specifies valid sources for loading media using the <audio> , <video> and <track>
elements.
...And 5 more matches
Grammar and types - JavaScript
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.
...objects and functions are the other fundamental
elements in the language.
...when you create an array using an array literal, it is initialized with the specified values as its
elements, and its length is set to the number of arguments specified.
...And 5 more matches
Array.prototype.every() - JavaScript
the every() method tests whether all
elements in the array pass the test implemented by the provided function.
...otherwise, if callback returns a truthy value for all
elements, every returns true.
... the range of
elements processed by every is set before the first invocation of callback.
...And 5 more matches
Array.prototype.forEach() - JavaScript
the range of
elements processed by foreach() is set before the first invocation of callback.
...
elements which are appended to the array after the call to foreach() begins will not be visited by callback.
... if existing
elements of the array are changed or deleted, their value as passed to callback will be the value at the time foreach() visits them;
elements that are deleted before being visited are not visited.
...And 5 more matches
TypedArray.prototype.filter() - JavaScript
the filter() method creates a new typed array with all
elements that pass the test implemented by the provided function.
... return value a new typed array with the
elements that pass the test.
...typed array
elements which do not pass the callback test are simply skipped, and are not included in the new typed array.
...And 5 more matches
Performance fundamentals - Web Performance
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.
...you can easily trigger these animations with the :hover, :focus, or :target, or by dynamically adding and removing classes on parent
elements.
...not only can you translate
elements in 2d space, but you can transform in three dimensions, skew and rotate, and so forth.
...And 5 more matches
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
general change notes length attribute and indexed property for list interfaces implementation status unknown <script> element in content model of all
elements implementation status unknown initialize(), appenditem(), replaceitem(), and insertitembefore() on list objects making a copy of any list item being inserted that is already in another list implementation status unknown crossorigin attribute for <image> and <script>
elements not implemented yet (at least for <image>; bug 1240357) rendering model change ...
... notes svg root and <foreignobject> not overflow:hidden in ua style sheet implementation status unknown allow overflow: auto; to clip and show scroll bars implementation status unknown allow overflow: scroll; to show scroll bars on <svg>
elements implementation status unknown basic data types and interfaces change notes dommatrix or dommatrixreadonly instead of svgmatrix implementation status unknown domrect or domrectreadonly instead of svgrect implementation status unknown dompoint or dompointreadonly instead of svgpoint implementation status unknown members of svgstylable and svglangspace available in svgelement implementation status unknown svggraphicselement instead of sv...
... svgsvgelement.currentview was never implemented, svgsvgelement.usecurrentview not removed yet (bug 1174097) svgunknownelement not implemented (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 ...
...And 5 more matches
Specification Deviations - SVG: Scalable Vector Graphics
the 'class' and 'style' attributes unlike html and mathml, the svg specification does not specify the 'style' and 'class' attributes on all svg
elements.
... nevertheless, to allow mozilla to more cleanly share internal 'class' and 'style' related code, we will implement these attributes on all svg
elements as of firefox 3.
... in general this change will not be visible to svg authors (the
elements for which the svg specification does not define the 'class' and 'style' attribute are
elements that are not displayed directly).
...And 5 more matches
SVG and CSS - SVG: Scalable Vector Graphics
note:
elements referenced by <use>
elements inherit the styles from that element.
...er petals */ #outer-petals { opacity: .75; --segment-fill-fill: azure; --segment-fill-stroke: lightsteelblue; --segment-fill-stroke-width: 1; --segment-edge-fill: none; --segment-edge-stroke: deepskyblue; --segment-edge-stroke-width: 3; --segment-fill-fill-hover: plum; --segment-fill-stroke-hover: none; --segment-edge-stroke-hover: slateblue; } /* non-standard way of styling
elements referenced via <use>
elements, supported by some older browsers */ #outer-petals .segment-fill { fill: azure; stroke: lightsteelblue; stroke-width: 1; } #outer-petals .segment-edge { fill: none; stroke: deepskyblue; stroke-width: 3; } #outer-petals .segment:hover > .segment-fill { fill: plum; stroke: none; } #outer-petals .segment:hover > .segment-edge { stroke: slateblue; }...
... /* inner petals */ #inner-petals { --segment-fill-fill: yellow; --segment-fill-stroke: yellow; --segment-fill-stroke-width: 1; --segment-edge-fill: none; --segment-edge-stroke: yellowgreen; --segment-edge-stroke-width: 9; --segment-fill-fill-hover: darkseagreen; --segment-fill-stroke-hover: none; --segment-edge-stroke-hover: green; } /* non-standard way of styling
elements referenced via <use>
elements, supported by some older browsers */ #inner-petals .segment-fill { fill: yellow; stroke: yellow; stroke-width: 1; } #inner-petals .segment-edge { fill: none; stroke: yellowgreen; stroke-width: 9; } #inner-petals .segment:hover > .segment-fill { fill: darkseagreen; stroke: none; } #inner-petals .segment:hover > .segment-edge { stroke: green; } open the do...
...And 5 more matches
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
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.
...And 4 more matches
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
of course, specific implementations may have different requirements, like the use of multiple iframe
elements to make multiple requests retrieving different contents at the same time.
...the code locates element with id mydata then copies the content of mydata (mydata.innerhtml) into the tickerdiv element (div element that is the container of
elements into the ticker).
...the following code snippet shows a simplified version of the logic that happens in the actual sample: // doc is the dom to the document returned articles=doc.get
elementsbytagname("article"); for(i=0;i<articles.length;i++) { // acquiring the data from the dom...
...And 4 more matches
JXON - Archive of obsolete content
in addition, all properties of the tree with a true value will be converted into empty
elements with no text nodes (see the code considerations).
...and decimals): <root><age>12</age><height>1.73</height></root> becomes { "age": 12, "height": 1.73 } booleans are recognized case insensitive: <root><checked>true</checked><answer>false</answer></root> becomes { "checked": true, "answer": false } strings are escaped: <root>quote: " new-line: </root> becomes "quote: \" new-line:\n" empty
elements will become null: <root><nil/><empty></empty></root> becomes { "nil": null, "empty": null } if all sibling
elements have the same name, they become an array <root><item>1</item><item>2</item><item>three</item></root> becomes [1, 2, "three"] mixed mode text-nodes, comments and attributes get absorbed: <root version="1.0">testing<!--comment--><element test="t...
... extra javascript translations this is the same as the json translation, but with these extras: property names are only escaped when necessary <root><while>true</while><wend>false</wend><only-if/></root> becomes { "while": true, wend: false, "only-if": null } within a string, closing
elements "</" are escaped as "<\/" <root><![cdata[<script>alert("yes");</script>]]></root> becomes { script: "<script>alert(\"yes\")<\/script>" } dates are created as new date objects <root>2006-12-25</root> becomes new date(2006, 12 - 1, 25) attributes and comments are shown as comments (for testing purposes): <!--testing--><root><test version="1.0">123</test></root> ...
...And 4 more matches
Creating a Window - Archive of obsolete content
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.
...this file contains all the default declarations for all of the xul
elements.
... because xml does not have any knowledge of how
elements should be displayed, the file indicates how.
...And 4 more matches
Focus and Selection - Archive of obsolete content
« previousnext » the section will describe how to handle the focus and selection of
elements.
... focused
elements the focused element refers to the element which currently receives input events.
...rearranging the tab order you can change the order in which
elements are focused when the user presses the tab key by adding a tabindex attribute to an element.
...And 4 more matches
Introduction to RDF - Archive of obsolete content
resource description framework we can use the tree
elements to display a set of data, such as bookmarks or mail messages.
...rdf can also populate other xul
elements as well such as listboxes and menus.
...it contains a fairly simple set of
elements.
...And 4 more matches
Introduction to XBL - Archive of obsolete content
you can customize the look of
elements by applying styles to them.
...the basic appearance of all
elements, such as scroll bars and check boxes may be modified by adjusting the style or by setting attributes on the element.
...the behavior describes the properties and methods of the scroll bar in addition to describing the xul
elements that make up a scroll bar.
...And 4 more matches
List Controls - Archive of obsolete content
« previousnext » xul has a number of types of
elements for creating list boxes.
...xul provides two types of
elements to create lists, a listbox element to create multi-row list boxes, and a menulist element to create drop-down list boxes.
... they work similar to the html select element, which performs both functions, but the xul
elements have additional features.
...And 4 more matches
XUL Template Primer - Bindings - Archive of obsolete content
dr" predicate="http://home.netscape.com/nc-rdf#street" object="?street"/> </bindings> <action> <hbox uri="?friend"> <label value="?name"/> <label value="?street"/> </hbox> </action> </rule> </template> </vbox> </window> the xul template primer covers the <conditions> and <action>
elements, so we won't discuss those here.
... the <bindings> element the <bindings> element is optional in a xul template, but if present, must appear as a sibling of the <conditions> and <action>
elements in a rule.
... the <binding> element the <bindings> element (plural) may contain any number of <binding> (singular)
elements.
...And 4 more matches
XUL Event Propagation - Archive of obsolete content
and sometimes
elements raise different events for the pressing down of the click and the release.
...the availability of event listeners is also somewhat pre-determined, though xul provide generalized event listeners (i.e., oncommand event listeners) for most of the
elements in the widget hierarchy.
...where event bubbling propagates an event from its target up higher into the node hiearchy, event capturing intercepts an event before it is received by other
elements, even by the event target itself.
...And 4 more matches
Gecko Compatibility Handbook - Archive of obsolete content
instead, each browser supports its own proprietary api for manipulating the content, style and position of html
elements in a web page.
... internet explorer incorrectly specifies height and width of inline
elements such as span.
...do not specify heights or widths on inline
elements such as spans.
...And 4 more matches
Browser Feature Detection - Archive of obsolete content
ocument.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) false false document.get
elementsbytagname() true true true dom core level 2 support for properties/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 d...
...extnode() 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.get
elementsbytagname() true true true document.importnode() true false true document.createelementns() true false true document.createattributens() true false true document.get
elementsbytagnamens() true false true document.getelementbyid() true true true dom level 1 html support for properties/methods...
... opera 8.54 - 9.01 document.documentelement true true true document.createelement() true true true document.createdocumentfragment() true true true document.createtextnode() true true true document.createcomment() true true true document.createattribute() true true true document.get
elementsbytagname() true true true document.title true true true document.referrer true true true document.domain true true true document.url true true true document.body true true true document.images true true true document.applets true true true document.links ...
...And 4 more matches
XUL Parser in Python - Archive of obsolete content
v.00001 to celebrate activestate's recent announcement about support for perl and python in mozilla, i have put together this little python script that parses your local xul and builds a list of all the xul
elements and their attributes in an html page.
... with new widgets and attributes landing all the time, i wanted to get some quicker way of looking at the xul--at particular builds, at particular widgets, at which
elements had which attributes, etc.
... the script writes out all the attributes and none of the values, but the parser itself is seeing the
elements, their attributes, and the values of those attributes, and you just have to ask for them if you want them.
...And 4 more matches
Cascade and inheritance - Learn web development
it is basically a measure of how specific a selector's selection will be: an element selector is less specific — it will select all
elements of that type that appear on a page — so will get a lower score.
... a class selector is more specific — it will select only the
elements on a page that have a specific class attribute value — so will get a higher score.
... inheritance inheritance also needs to be understood in this context — some css property values set on parent
elements are inherited by their child
elements, and some aren't.
...And 4 more matches
Styling links - Learn web development
the text "http" should therefore only appear in external links (like the second and third ones), and we can select this with an attribute selector: a[href*="http"] selects <a>
elements, but only if they have an href attribute with a value that contains "http" somewhere inside it.
...for example, states like hover can be used to style many different
elements, not just links — you might want to style the hover state of paragraphs, list items, or other things.
... <li>
elements are normally block by default (see types of css boxes for a refresher), meaning that they will sit on their own lines.
...And 4 more matches
Advanced form styling - Learn web development
to recap what we said in the previous article, we have: the bad: some
elements are more difficult to style, requiring more complex css or some more specific tricks: checkboxes and radio buttons <input type="search"> the ugly: some
elements can't be styled thoroughly using css.
... these include:
elements involved in creating dropdown widgets, including <select>, <option>, <optgroup> and <datalist>.
... what can be done about the "ugly"
elements?
...And 4 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.
... note that even though you can put anything inside a <textarea> element (including other html
elements, css, and javascript), because of its nature, it is all rendered as if it was plain text content.
... the following screenshots show default, focused, and disabled <textarea>
elements in firefox 71 and safari 13 on macos, and edge 18, yandex 14, firefox 71 and chrome 79 on windows 10.
...And 4 more matches
What’s in the head? Metadata in HTML - Learn web development
our aim here is not to show you how to use everything that can possibly be put in the head, but rather to teach you how to use the major
elements that you'll want to include in the head, and give you some familiarity.
... you should also try opening the code up in your code editor, editing the contents of these
elements, then refreshing the page in your browser.
...there are a lot of different types of <meta>
elements that can be included in your page's <head>, but we won't try to explain them all at this stage, as it would just get too confusing.
...And 4 more matches
From object to iframe — other embedding technologies - Learn web development
at this point we'd like to take somewhat of a sideways step, looking at some
elements that allow you to embed a wide variety of content types into your webpages: the <iframe>, <embed> and <object>
elements.
...embedding these technologies was achieved through
elements like <object>, and the lesser-used <embed>, and they were very useful at the time.
...<iframe>
elements are designed to allow you to embed other web documents into the current document.
...And 4 more matches
Introduction to events - Learn web development
in the case of the web, events are fired inside the browser window, and tend to be attached to a specific item that resides in it — this might be a single element, set of
elements, the html document loaded in the current tab, or the entire browser window.
...it makes sense to use onplay only on specific
elements, such as <video>).
... the main advantages of the third mechanism are that you can remove event handler code if needed, using removeeventlistener(), and you can add multiple listeners of the same type to
elements if required.
...And 4 more matches
Video and Audio APIs - Learn web development
previous overview: client-side web apis next html5 comes with
elements for embedding rich media in documents — <video> and <audio> — which in turn come with their own apis for controlling playback, seeking, etc.
... html5 video and audio the <video> and <audio>
elements allow us to embed video and audio into web pages.
...this interface is available to both <audio> and <video>
elements, as the features you'll want to implement are nearly identical.
...And 4 more matches
Accessibility in React - Learn web development
when we switch between templates in our <todo /> component, we completely remove the
elements that were there before to replace them with something else.
... targeting our
elements in order to focus on an element in our dom, we need to tell react which element we want to focus on and how to find it.
...it’s particularly useful for referring to dom
elements.
...And 4 more matches
Mozilla Web Developer FAQ
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.
... the <link> and <style>
elements should be inside the <head> element.
... width and height do not apply to non-replaced inline
elements such as (by default) <span>.
...And 4 more matches
Bytecode Descriptions
array literals newarray operands: (uint32_t length) stack: ⇒ array create and push a new array object with the given length, preallocating enough memory to hold that many
elements.
...val may be magicvalue(js_
elements_hole).
...val may be magicvalue(js_
elements_hole).
...And 4 more matches
Building the WebLock UI
elements in the xul markup map to widgets in the interface that gecko renders in a fairly straightforward way - so, for instance, the root element of an application window is the element <window/>, the root element of the dialog we'll be creating here is <dialog/>, and so forth.
... within a xul application file,
elements like <button/>, <menu/>, and <checkbox/> can be hooked up to an event model, to scripts, and to the xpcom interfaces that carry out a lot of the browser functionality in mozilla.
... in xul individual <radio/>
elements are contained within a parent element called <radiogroup/>.
...And 4 more matches
nsIMutableArray
as above, it is legal to add null
elements to the array.
... note also that null
elements can be created as a side effect of insertelementat().
... conversely, if insertelementat() is never used, and null
elements are never explicitly added to the array, then it is guaranteed that nsiarray.queryelementat() will never return a null value.
...And 4 more matches
DOMMatrixReadOnly - Web APIs
dommatrixreadonly.tofloat32array() returns a new float32array containing all 16
elements (m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44) which comprise the matrix.
... the
elements are stored into the array as single-precision floating-point numbers in column-major (colexographical access, or "colex") order.
... (in other words, down the first column from top to bottom, then the second column, and so forth.) dommatrixreadonly.tofloat64array() returns a new float64array containing all 16
elements (m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44) which comprise the matrix.
...And 4 more matches
EventTarget.addEventListener() - Web APIs
event bubbling and capturing are two ways of propagating events that occur in an element that is nested within another element, when both
elements have registered a handle for that event.
... the event propagation mode determines the order in which
elements receive the event.
... it works on any dom element, not just html
elements.
...And 4 more matches
HTMLInputElement - Web APIs
the htmlinputelement interface provides special properties and methods for manipulating the options, layout, and presentation of <input>
elements.
... properties that apply only to
elements of type checkbox or radio checked boolean: returns / sets the current state of the element when type is checkbox or radio.
... properties that apply only to
elements of type image alt string: returns / sets the element's alt attribute, containing alternative text to use when type is image.
...And 4 more matches
ARIA: List role - Accessibility
<section role="list"> <div role="listitem">list item 1</div> <div role="listitem">list item 2</div> <div role="listitem">list item 3</div> </section> description any content that consists of an outer container with a list of
elements inside it can be identified to assistive technologies using the list and listitem containers respectively.
... there are no hard and fast rules about which
elements you should use to markup the list and list items, but you should make sure that the list items make sense in the context of a list, e.g.
... warning: if at all possible in your work, you should use the appropriate semantic html
elements to mark up a list and its listitems — <ul>/<ol> and <li>.
...And 4 more matches
WAI-ARIA Roles - Accessibility
this usually includes a logo, company name, search icon, photo related to the page, or slogan.aria: button rolethe button role should be used for clickable
elements that trigger a response when activated by the user.
...
elements containing role="checkbox" must also include the aria-checked attribute to expose the checkbox's state to assistive technology.aria: comment rolethe comment landmark role semantically denotes a comment/reaction to some content on the page, or to a previous comment.aria: complementary rolethe complementary landmark role is used to designate a supporting section that relates to the main content, ye...
...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.
...And 4 more matches
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
in this next live example the child
elements have been floated, and then their container has had display: flex added.
...if a flex item becomes a grid item, then the flex properties that may have been assigned to the child
elements will be ignored.
... flexbox and display: contents the contents value of the display property is a new value that is described in the spec as follows: “the element itself does not generate any boxes, but its children and pseudo-
elements still generate boxes as normal.
...And 4 more matches
box-flex-group - CSS: Cascading Style Sheets
the box-flex-group css property assigns the flexbox's child
elements to a flex group.
... /* <integer> values */ box-flex-group: 1; box-flex-group: 5; /* global values */ box-flex-group: inherit; box-flex-group: initial; box-flex-group: unset; for flexible
elements assigned to flex groups, the first flex group is 1 and higher values specify subsequent flex groups.
...when dividing up the box's extra space, the browser first considers all
elements within the first flex group.
...And 4 more matches
Audio and Video Delivery - Developer guides
the audio and video
elements whether we are dealing with pre-recorded audio files or live streams, the mechanism for making them available through the browser's <audio> and <video>
elements remains pretty much the same.
... seeking through media media
elements provide support for moving the current playback position to specific points in the media's content.
...at this time, this is the only part of the media fragments uri specification implemented by gecko, and it can only be used when specifying the source for media
elements, and not in the address bar.
...And 4 more matches
Constraint validation - Developer guides
er 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).
... controlling the look of
elements the look of
elements can be controlled via css pseudo-classes.
... :required and :optional css pseudo-classes the :required and :optional pseudo-classes allow writing selectors that match form
elements that have the required attribute, or that don't have it.
...And 4 more matches
HTML attribute: rel - HTML: Hypertext Markup Language
values for the rel attribute, and the
elements for which each is relevant rel value description <link> <a> and <area> <form> alternate alternate representations of the current document.
... not allowed link not allowed the rel attribute is relevant to the <link>, <a>, <area>, and <form>
elements, but some values only relevant to a subset of those
elements.
...relevant for <link>, <a>, and <area>
elements, the author keyword creates a hyperlink.
...And 4 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
<input>
elements of type datetime-local create input controls that let the user easily enter both a date and a time, including the year, month, and day as well as the time in hours and minutes.
... additional attributes in addition to the attributes common to all <input>
elements, datetime-local inputs offer the following attributes: attribute description max the latest date and time to accept min the earliest date and time to accept step the stepping interval to use for this input, such as when clicking arrows on spinner controls or performing validation max the latest date and time to accept.
...you'll have to resort to css for customizing the sizes of these
elements.
...And 4 more matches
HTML reference - HTML: Hypertext Markup Language
this html reference describes all
elements and attributes of html, including global attributes that apply to all
elements.
... html element reference this page lists all the html
elements, which are created using tags.
... html attribute reference
elements in html have attributes; these are additional values that configure the
elements or adjust their behavior in various ways to meet the criteria the users want.
...And 4 more matches
Array.prototype.join() - JavaScript
the join() method creates and returns a new string by concatenating all of the
elements in an array (or an array-like object), separated by commas or a specified separator string.
... syntax arr.join([separator]) parameters separator optional specifies a string to separate each pair of adjacent
elements of the array.
...if omitted, the array
elements are separated with a comma (",").
...And 4 more matches
SVG element reference - SVG: Scalable Vector Graphics
« svg / svg attribute reference » svg drawings and images are created using a wide array of
elements which are dedicated to the construction, drawing, and layout of vector images and diagrams.
... here you'll find reference documentation for each of the svg
elements.
... svg
elements a to z a <a> <animate> <animatemotion> <animatetransform> c <circle> <clippath> <color-profile> d <defs> <desc> <discard> e <ellipse> f <feblend> <fecolormatrix> <fecomponenttransfer> <fecomposite> <feconvolvematrix> <fediffuselighting> <fedisplacementmap> <fedistantlight> <fedropshadow> <feflood> <fefunca> <fefuncb> <fefuncg> <fefuncr> <fegaussianblur> <feimage> <femerge> <femergenode> <femorphology> <feoffset> <fepointlight> <fespecularlighting> <fespotlight> <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> <pol...
...And 4 more matches
page-mod - Archive of obsolete content
the main add-on code sends the desired tag to the content script, and the content script replies by sending the html content of all the
elements with that tag.
... /lib/main.js: var tag = "p"; var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: data.url("element-getter.js"), onattach: function(worker) { worker.port.emit("get
elements", tag); worker.port.on("gotelement", function(elementcontent) { console.log(elementcontent); }); } }); /data/element-getter.js: self.port.on("get
elements", function(tag) { var
elements = document.get
elementsbytagname(tag); for (var i = 0; i <
elements.length; i++) { self.port.emit("gotelement",
elements[i].innerhtml); } }); when the user loads a document hosted at "mozilla.org": the content script "element-getter.js" is attached to the document and runs.
... it adds a listener to the get
elements message.
...And 3 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
figure out what xul
elements you need to create for your add-on to add your interface, where it needs to go into a xul window, and how to do it.
... docs: document.getelementbyid(), document.createelement(), element reference, node reference (dom
elements are also nodes).
...one to take a xul window object and then create and add your
elements, and then another to find your
elements and remove them from the window object.
...And 3 more matches
Adding windows and dialogs - Archive of obsolete content
let's look into the most commonly used form
elements and how to use them in your xul windows.
...it is frequently used with the caption element to associate the grouped
elements with a title.
...the groupbox element should be used when enclosed
elements share some function which is separate from other
elements or groups in the same window.
...And 3 more matches
CSS3 - Archive of obsolete content
pseudo-
elements are now characterized by two colons rather than one: :after becomes ::after, :before becomes ::before, :first-letter becomes ::first-letter, and :first-line becomes ::first-line.
... media queries are not only used in css document but also in some attributes of html
elements, like the media attribute of the <link> element.
... allow the styling of forms according their content using the css :indeterminate, :default, :valid, :invalid, :in-range, :out-of-range, :required, :optional, :read-only, and :read-write pseudo-classes and the ::value, ::choices, ::repeat-item, and ::repeat-index pseudo-
elements.
...And 3 more matches
Simple Query Syntax - Archive of obsolete content
here is what it might look like: <template> <vbox class="box-padded" uri="rdf:*"> <image src="rdf:*"/> <label value="rdf:http://purl.org/dc/
elements/1.1/title"/> </vbox> </template> there is no <query> or <action> element used.
...for example, the label's value attribute has a value of rdf:http://purl.org/dc/
elements/1.1/title'.
... this means look up the value of the predicate http://purl.org/dc/
elements/1.1/title' pointing out of the current result.
...And 3 more matches
Template Builder Interface - Archive of obsolete content
templates can only be used in xul documents, however, there is no requirement that the templates generate xul
elements.
... they could also be used, for example, to generate html
elements.
... this isn't a very common technique, however, here is an example of how this can be used: <html:div id="photoslist" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos" xmlns:html="http://www.w3.org/1999/xhtml"> <html:h1>my photos</html:h1> <template> <html:p uri="rdf:*"><textnode value="rdf:http://purl.org/dc/
elements/1.1/title"/></html:p> </template> </html:div> this example generates three paragraphs.
...And 3 more matches
Introduction - Archive of obsolete content
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.
...the contents of menus, trees and other
elements can be populated with this data, or with your own data supplied in an rdf file.
...And 3 more matches
Modifying the Default Skin - Archive of obsolete content
support for the userchrome.css file and any of its
elements described below are not guaranteed in future versions of firefox.
... a skin is described using css, allowing you to define the colors, borders and images used to draw
elements.
...the global directory within this archive contains the main style definitions for how to display the various xul
elements.
...And 3 more matches
Splitters - Archive of obsolete content
you can place a splitter anywhere you want and it will allow resizing of the
elements that come before it and the
elements that come after it in the same box.
... resizebefore when the splitter is dragged, the
elements to the left (or above) resize.
... resizeafter when the splitter is dragged, the
elements to the right (or below) resize.
...And 3 more matches
box - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of child
elements.
... if the box has an orient attribute that is set to horizontal, the child
elements are laid out from left to right in the order that they appear in the box.
... if orient is set to vertical, the child
elements are laid out from top to bottom.
...And 3 more matches
grid - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a grid is a layout type that arranges
elements in rows and columns.
...the size and attributes defined on columns and rows will affect the size and placement of
elements in each cell.
...
elements placed within both the columns and rows will be displayed, although usually only
elements will be placed inside one of these.
...And 3 more matches
key - Archive of obsolete content
in order to use (non-default) key commands within specific
elements, you will need to listen for key events.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...And 3 more matches
label - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...And 3 more matches
notification - Archive of obsolete content
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...
...for user editable menulist
elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
... for those
elements, setattribute("value", myvalue) and getattribute("value") do not access or affect the contents displayed to the user.
...And 3 more matches
preference - Archive of obsolete content
disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...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 context at this point can only access the following things: global values/functions i.e.
...And 3 more matches
treecell - Archive of obsolete content
ref type: uri for template-generated
elements, this attribute is used to specify the root rdf node where content generation begins.
...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...
...for user editable menulist
elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...And 3 more matches
treeitem - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a treeitem should be placed inside a treechildren element and should contain treerow
elements.
... attributes container, empty, label, open, uri examples (example needed) attributes container type: boolean set to true if the element is to act as a container which can have child
elements.
...
elements that appear inside the element with the attribute will be repeated for each node in the rdf datasource.
...And 3 more matches
Archived Mozilla and build documentation - Archive of obsolete content
web pages can reference generators via <link rel="microsummary">
elements in their <head>
elements.
... introducing the audio api extension the audio data api extension extends the html5 specification of the <audio> and <video> media
elements by exposing audio metadata and raw audio data.
... space manager high level design the space manager and associated classes and structures are used by block and line layout to manage rectangular regions that are occupied and available, for correct handling of floated
elements and the
elements that flow around them.
...And 3 more matches
CSS values and units - Learn web development
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 contexts.
...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.
...change this value 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.
...And 3 more matches
Flexbox - Learn web development
specifying what
elements to lay out as flexible boxes to start with, we need to select which
elements are to be laid out as flexible boxes.
... to do this, we set a special value of display on the parent element of the
elements you want to affect.
... in this case we want to lay out the <article>
elements, so we set this on the <section>: section { display: flex; } this causes the <section> element to become a flex container, and its children to become flex items.
...And 3 more matches
HTML table advanced features and accessibility - Learn web development
these
elements don't make the table any more accessible to screenreader users, and don't result in any visual enhancement on their own.
... active learning: adding table structure let's put these new
elements into action.
... let's add some simple extra styling to the table, to give you an idea of how useful these
elements are for applying css.
...And 3 more matches
Focus management with Vue refs - Learn web development
virtual dom and refs vue, like some other frameworks, uses a virtual dom (vdom) to manage
elements.
...however, it also means you often should not edit your html
elements directly through native browser apis (like document.getelementbyid) when using frameworks, because it results in the vdom and real dom going out of sync.
...no two
elements rendered at the same time should have the same ref.
...And 3 more matches
JavaScript Tips
for instance, windowmanager.getenumerator(atype).hasmore
elements() may be replaced with windowmanager.getmostrecentwindow(atype) != null for a single window.
... dom
elements dom
elements are just xpcom objects with some of the interfaces precached.
...similarly prefer document.get
elementsbytagname(atag).item(0) != null to document.get
elementsbytagname(atag).length > 0.
...And 3 more matches
JS::HandleValueArray
syntax js::handlevaluearray(const js::rootedvalue& value); js::handlevaluearray(const js::autovaluevector& values); js::handlevaluearray(const js::autovaluearray<n>& values); js::handlevaluearray(const js::callargs& args); js::handlevaluearray::frommarkedlocation(size_t len, const js::value *
elements); js::handlevaluearray::subarray(const js::handlevaluearray& values, size_t startindex, size_t len); js::handlevaluearray::empty(); name type description value js::rootedvalue & an element of newly created 1-length array.
... values js::autovaluevector &
elements of newly created array.
... values js::autovaluearray &
elements of newly created array.
...And 3 more matches
JS_SetArrayLength
length uint32_t number of array
elements to set.
...length indicates the number of
elements.
...you can call js_setarraylength either to set the number of
elements for an array object you created without specifying an initial number of
elements, or to change the number of
elements allocated for an array.
...And 3 more matches
nsIParserUtils
sanitizerallowstyle (1 << 1) flag for sanitizer: allow <style>
elements and style attributes (with contents sanitized in case of -moz-binding).
... sanitizerdropnoncsspresentation (1 << 3) flag for sanitizer: drops non-css presentational html
elements and attributes, such as <font>, <center>, and the bgcolor attribute.
... by default, non-dangerous non-css presentational html
elements and attributes or forms are not removed.
...And 3 more matches
WebIDL bindings
any dictionary members and sequence
elements become js::value.
... the dictionary members and sequence
elements are guaranteed to be marked by whomever puts the sequence or dictionary on the stack, using sequencerooter and dictionaryrooter.
... object dictionary members and sequence
elements become jsobject*.
...And 3 more matches
Working with windows in chrome code
the
elements above the chrome document opened in the tab are separate from your chrome document.
...accessing
elements which are ancestors of your chrome document, or accessing
elements which are descendants of your chrome document (but nevertheless in a different context).
...to access the
elements and variables inside the sidebar, you need to use document.getelementbyid("sidebar").contentdocument or .contentwindow, like when accessing content documents.
...And 3 more matches
Accessibility Inspector - Firefox Developer Tools
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.
...this is a bit like the dom tree, except that it contains a more limited set of
elements and slightly different information about them.
...And 3 more matches
CustomElementRegistry.define() - Web APIs
there are two types of custom
elements you can create: autonomous custom element: standalone
elements; they don't inherit from built-in html
elements.
... customized built-in element: these
elements inherit from — and extend — built-in html
elements.
... syntax custom
elements.define(name, constructor, options); parameters name name for the new custom element.
...And 3 more matches
Document.execCommand() - Web APIs
when an html document has been switched to designmode, its document object exposes an execcommand method to run commands that manipulate the current editable region, such as form inputs or contenteditable
elements.
... most commands affect the document's selection (bold, italics, etc.), while others insert new
elements (adding a link), or affect an entire line (indenting).
... enableabsolutepositioneditor enables or disables the grabber that allows absolutely-positioned
elements to be moved around.
...And 3 more matches
Element: click event - Web APIs
bubbles yes cancelable yes interface mouseevent event handler property onclick if the button is pressed on one element and the pointer is moved outside the element before the button is released, the event is fired on the most specific ancestor element that contained both
elements.
... internet explorer internet explorer 8 & 9 suffer from a bug where
elements with a computed background-color of transparent that are overlaid on top of other element(s) won't receive click events.
... known workarounds for this bug: for ie9 only: set background-color: rgba(0,0,0,0) set opacity: 0 and an explicit background-color other than transparent for ie8 and ie9: set filter: alpha(opacity=0); and an explicit background-color other than transparent safari mobile safari mobile 7.0+ (and likely earlier versions too) suffers from a bug where click events aren't fired on
elements that aren't typically interactive (e.g.
...And 3 more matches
Element.getClientRects() - Web APIs
when called on svg
elements other than an outer-<svg>, the "viewport" that the resulting rectangles are relative to is the viewport that the element's outer-<svg> establishes (and to be clear, the rectangles are also transformed by the outer-<svg>'s viewbox transform, if any).
... the returned rectangles do not include the bounds of any child
elements that might happen to overflow.
... for html <area>
elements, svg
elements that do not render anything themselves, display:none
elements, and generally any
elements that are not directly rendered, an empty list is returned.
...And 3 more matches
HTMLSelectElement - Web APIs
these
elements also share all of the properties and methods of other html
elements via the htmlelement interface.
... htmlselectelement.labelsread only a nodelist of <label>
elements associated with the element.
... htmlselectelement.length an unsigned long the number of <option>
elements in this select element.
...And 3 more matches
WebGLRenderingContext.getParameter() - Web APIs
constant returned type description gl.active_texture glenum gl.aliased_line_width_range float32array (with 2
elements) gl.aliased_point_size_range float32array (with 2
elements) gl.alpha_bits glint gl.array_buffer_binding webglbuffer gl.blend glboolean gl.blend_color float32array (with 4 values) gl.blend_dst_alpha glenum gl.blend_dst_rgb glenum gl.blend_equation glenum gl.b...
... gl.depth_bits glint gl.depth_clear_value glfloat gl.depth_func glenum gl.depth_range float32array (with 2
elements) gl.depth_test glboolean gl.depth_writemask glboolean gl.dither glboolean gl.element_array_buffer_binding webglbuffer gl.framebuffer_binding webglframebuffer or null null corresponds to a binding to the default framebuffer.
... glint gl.max_renderbuffer_size glint gl.max_texture_image_units glint gl.max_texture_size glint gl.max_varying_vectors glint gl.max_vertex_attribs glint gl.max_vertex_texture_image_units glint gl.max_vertex_uniform_vectors glint gl.max_viewport_dims int32array (with 2
elements) gl.pack_alignment glint gl.polygon_offset_factor glfloat gl.polygon_offset_fill glboolean gl.polygon_offset_units glfloat gl.red_bits glint gl.renderbuffer_binding webglrenderbuffer or null see bindrenderbuffer.
...And 3 more matches
Signaling and video calling - Web APIs
this requires video
elements, and a button to hang up the call: <div class="flexchild" id="camera-container"> <div class="camera-box"> <video id="received_video" autoplay></video> <video id="local_video" autoplay muted></video> <button id="hangup-button" onclick="hangupcall();" disabled> hang up </button> </div> </div> the page structure defined here is using <div>
elements, giving us full control...
...take note of the two <video>
elements, one for your self-view, one for the connection, and the <button> element.
...hild); } msg.users.foreach(function(username) { var item = document.createelement("li"); item.appendchild(document.createtextnode(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.
...And 3 more matches
Generating HTML - Web APIs
the <body> element of the article now contains html
elements (a <b> and <u> tag, see figure 2).
... the xml document contains both html
elements and xml
elements, but only one namespace is needed, namely for the xml
elements.
...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").
...And 3 more matches
Using the aria-labelledby attribute - Accessibility
description 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.
... 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.
... this attribute can be used with any typical html form element; it is not limited to
elements that have an aria role assigned.
...And 3 more matches
ARIA: rowgroup role - Accessibility
"none">population</span> </div> </div> <div role="rowgroup"> <div role="row"> <span role="cell">finland</span> <span role="cell">5.5 million</span> </div> <div role="row"> <span role="cell">france</span> <span role="cell">67 million</span> </div> </div> </div> description rowgroup establishes a relationship between owned row
elements and is a structural equivalent to the thead, tfoot and tbody
elements in html.
...their
elements must be contained in, or owned by,
elements with either the table or grid role.
... using the native <thead>, <tfoot> , and <tbody> html
elements, whenever possible, is strongly encouraged.
...And 3 more matches
::after (:after) - CSS: Cascading Style Sheets
/* add an arrow after links */ a::after { content: "→"; } note: the pseudo-
elements generated by ::before and ::after are contained by the element's formatting box, and thus don't apply to replaced
elements such as <img>, or to <br>
elements.
... syntax /* css3 syntax */ ::after /* css2 syntax */ :after note: css3 introduced the ::after notation (with two colons) to distinguish pseudo-classes from pseudo-
elements.
...we can use these classes to add pseudo-
elements to the end of paragraphs.
...And 3 more matches
::before (:before) - CSS: Cascading Style Sheets
/* add a heart before links */ a::before { content: "♥"; } note: the pseudo-
elements generated by ::before and ::after are contained by the element's formatting box, and thus don't apply to replaced
elements such as <img>, or to <br>
elements.
... syntax /* css3 syntax */ ::before /* css2 syntax */ :before note: css3 introduced the ::before notation (with two colons) to distinguish pseudo-classes from pseudo-
elements.
... examples adding quotation marks one simple example of using ::before pseudo-
elements is to provide quotation marks.
...And 3 more matches
In Flow and Out of Flow - CSS: Cascading Style Sheets
all
elements that are in flow, will be laid out using this method.
... all of the
elements can be said to be in flow.
... taking an item out of flow all
elements are in-flow apart from: floated items items with position: absolute (including position: fixed which acts in the same way) the root element (html) out of flow items create a new block formatting context (bfc) and therefore everything inside them can be seen as a mini layout, separate from the rest of the page.
...And 3 more matches
bottom - CSS: Cascading Style Sheets
it has no effect on non-positioned
elements.
... syntax /* <length> values */ bottom: 3px; bottom: 2.4em; /* <percentage>s of the height of the containing block */ bottom: 10%; /* keyword value */ bottom: auto; /* global values */ bottom: inherit; bottom: initial; bottom: unset; values <length> a negative, null, or positive <length> that represents: for absolutely positioned
elements, the distance to the bottom edge of the containing block.
... for relatively positioned
elements, the distance that the element is moved above its normal position.
...And 3 more matches
box-flex - CSS: Cascading Style Sheets
notes the containing box allocates the available extra space in proportion to the flex value of each of the content
elements.
... content
elements that have zero flex do not grow.
... content
elements that have the same flex grow by the same absolute amounts.
...And 3 more matches
direction - CSS: Cascading Style Sheets
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 alignment of text, block-level
elements, and the direction that cells flow within a table row.
... 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.
...And 3 more matches
left - CSS: Cascading Style Sheets
it has no effect on non-positioned
elements.
... syntax /* <length> values */ left: 3px; left: 2.4em; /* <percentage>s of the width of the containing block */ left: 10%; /* keyword value */ left: auto; /* global values */ left: inherit; left: initial; left: unset; values <length> a negative, null, or positive <length> that represents: for absolutely positioned
elements, the distance to the left edge of the containing block.
... for relatively positioned
elements, the distance that the element is moved to the right of its normal position.
...And 3 more matches
right - CSS: Cascading Style Sheets
it has no effect on non-positioned
elements.
... syntax /* <length> values */ right: 3px; right: 2.4em; /* <percentage>s of the width of the containing block */ right: 10%; /* keyword value */ right: auto; /* global values */ right: inherit; right: initial; right: unset; values <length> a negative, null, or positive <length> that represents: for absolutely positioned
elements, the distance to the right edge of the containing block.
... for relatively positioned
elements, the distance that the element is moved to the left of its normal position.
...And 3 more matches
top - CSS: Cascading Style Sheets
it has no effect on non-positioned
elements.
... syntax /* <length> values */ top: 3px; top: 2.4em; /* <percentage>s of the height of the containing block */ top: 10%; /* keyword value */ top: auto; /* global values */ top: inherit; top: initial; top: unset; values <length> a negative, null, or positive <length> that represents: for absolutely positioned
elements, the distance to the top edge of the containing block.
... for relatively positioned
elements, the distance that the element is moved below its normal position.
...And 3 more matches
vertical-align - CSS: Cascading Style Sheets
ething even more bizarre and inexplicable.</p> <p>there is another theory which states that this has already happened.</p> </td> </tr> </table> table { margin-left: auto; margin-right: auto; width: 80%; } table, th, td { border: 1px solid black; } td { padding: 0.5em; font-family: monospace; } note that vertical-align only applies to inline, inline-block and table-cell
elements: you can't use it to vertically align block-level
elements.
... values for inline
elements parent-relative values these values vertically align the element relative to its parent element: baseline aligns the baseline of the element with the baseline of its parent.
... the baseline of some replaced
elements, like <textarea>, is not specified by the html specification, meaning that their behavior with this keyword may vary between browsers.
...And 3 more matches
will-change - CSS: Cascading Style Sheets
l-change: contents; will-change: transform; /* example of <custom-ident> */ will-change: opacity; /* example of <custom-ident> */ will-change: left, top; /* example of two <animateable-feature> */ /* global values */ will-change: inherit; will-change: initial; will-change: unset; proper usage of this property can be a bit tricky: don't apply will-change to too many
elements.
...but adding will-change directly in a stylesheet implies that the targeted
elements are always a few moments away from changing and the browser will keep the optimizations for much longer time than it would have otherwise.
... don't apply will-change to
elements to perform premature optimization.
...And 3 more matches
Video player styling basics - Developer guides
the custom video controls and <progress> element are now contained within <div>
elements, rather than residing inside unordered list items.
... as mentioned earlier, a data-state attribute is now used to indicate whether the video controls are visible or not and these also need to be styled: .controls[data-state=hidden] { display:none; } .controls[data-state=visible] { display:block; } there are a number of properties that also need to be set for all
elements within the video controls: .controls > * { float:left; width:3.90625%; height:100%; margin-left:0.1953125%; display:block; } .controls > *:first-child { margin-left:0; } all
elements are floated left, as they are to be aligned next to one another, and each element is set to have a width of nearly 4% (again the actual value was calculated based on the required dimensions of th...
... the <div> container for the <progress> element also requires some specific settings; it is set to be much wider than the other child
elements and its cursor value is set to be pointer: .controls .progress { cursor:pointer; width:75.390625%; } buttons the first major styling task to tackle is to make the video control's buttons actually look like and act like real buttons.
...And 3 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.
...most commands affect the document's selection by, for example, applying a style to the text (bold, italics, etc), while others insert new
elements (like adding a link) or affect an entire line (indenting).
...for example, even something as simple as what happens when you press enter/return to create a new line of text inside an editable element was handled differently across the major browsers (firefox inserted <br>
elements, ie/opera used <p>, chrome/safari used <div>).
...And 3 more matches
<a>: The Anchor element - HTML: Hypertext Markup Language
firefox 79+) setting target="_blank" on <a>
elements implicitly provides the same rel behavior as setting rel="noopener".
... permitted parents any element that accepts phrasing content, or any element that accepts flow content, but not other <a>
elements.
...*2); c.closepath(); c.fill(); } } canvas.addeventlistener('mousemove', event => draw(event.offsetx, event.offsety) ); canvas.addeventlistener('mousedown', () => isdrawing = true); canvas.addeventlistener('mouseup', () => isdrawing = false); document.queryselector('a').addeventlistener('click', event => event.target.href = canvas.todataurl() ); result security and privacy <a>
elements can have consequences for users’ security and privacy.
...And 3 more matches
<button>: The Button element - HTML: Hypertext Markup Language
(if this attribute is not set, the <button> is associated with its ancestor <form> element, if any.) this attribute lets you associate <button>
elements to <form>s anywhere in the document, not just inside a <form>.
... multipart/form-data: use to submit <input>
elements with their type attributes set to file.
... this attribute is also available on <input type="image"> and <input type="submit">
elements.
...And 3 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.
... additional attributes along with the attributes common to all <input>
elements, date inputs have the following attributes: attribute description max the latest acceptable date min the earliest acceptable date step the stepping interval, when clicking up and down spinner buttons and validating the date max the latest date to accept.
...we make use of the :valid and :invalid pseudo-
elements to add an icon next to the input, based on whether or not the current value is valid.
...And 3 more matches
<input type="month"> - HTML: Hypertext Markup Language
<input>
elements of type month create input fields that let the user enter a month and year allowing a month and year to be easily entered.
... set the date value in javascript using the htmlinputelement.value property, for example: <label for="bday-month">what month were you born in?</label> <input id="bday-month" type="month" name="bday-month" value="2017-06"> var monthcontrol = document.queryselector('input[type="month"]'); monthcontrol.value = '1978-06'; additional attributes in addition to the attributes common to <input>
elements, month inputs offer the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the latest year and month to accept as a valid input min the earliest year and month to accept as a valid input readonly a boolean which, if present, indicates that...
...: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding-left: 5px; } the best way to deal with dates in forms in a cross-browser way (until all of the major browsers have supported them for a while) is to get the user to enter the month and year in separate controls (<select>
elements being popular; see below for an implementation), or use javascript libraries such as the jquery date picker plugin.
...And 3 more matches
<input type="text"> - HTML: Hypertext Markup Language
<input>
elements of type text create basic single-line text fields.
... additional attributes in addition to the attributes that operate on all <input>
elements regardless of their type, text 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 characters the input should accept minlength the minimum number of characters long the input can be and still be considere...
...it can be used on any editable content, but here we consider specifics related to the use of spellcheck on <input>
elements.
...And 3 more matches
<label> - HTML: Hypertext Markup Language
if there are other
elements which also match the id value, later in the document, they are not considered.
... 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.
... 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.
...And 3 more matches
<link>: The External Resource Link element - HTML: Hypertext Markup Language
however, this isn't a good practice to follow; it makes more sense to separate your <link>
elements from your body content, putting them in the <head>.
... under xhtml 1.0, empty
elements such as <link> require a trailing slash: <link />.
...the table below lists the valid values for this attribute and the
elements or resources they apply to.
...And 3 more matches
<tbody>: The Table Body element - HTML: Hypertext Markup Language
the html table body element (<tbody>) encapsulates a set of table rows (<tr>
elements), indicating that they comprise the body of the table (<table>).
... permitted content zero or more <tr>
elements.
... if you use <tbody>, you can't also have table rows (<tr>
elements) which are direct children of the <table> but not included inside the <tbody>.
...And 3 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
attributes like all other html
elements, this element supports the global attributes.
...however, this can be useful when creating media
elements whose source will be set at a later time, under user control.
...without sending the origin: http header), preventing its non-tainted used in <canvas>
elements.
...And 3 more matches
hidden - HTML: Hypertext Markup Language
for example, it can be used to hide
elements of the page that can't be used until the login process has been completed.
... browsers won't render
elements with the hidden attribute set.
... hidden
elements shouldn't be linked from non-hidden
elements, and
elements that are descendants of a hidden element are still active, which means that script
elements can still execute and form
elements can still submit.
...And 3 more matches
tabindex - HTML: Hypertext Markup Language
if multiple
elements share the same positive tabindex value, their order relative to each other follows their position in the document source.
...instead, write the document with the
elements in a logical sequence.
... interactive components authored using non-interactive
elements are not be listed in the accessibility tree.
...And 3 more matches
CSP: object-src - HTTP
the http content-security-policy object-src directive specifies valid sources for the <object>, <embed>, and <applet>
elements.
... to set allowed types for <object>, <embed>, and <applet>
elements, use the plugin-types directive.
...
elements controlled by object-src are perhaps coincidentally considered legacy html
elements and aren't receiving new standardized features (such as the security attributes sandbox or allow for <iframe>).
...And 3 more matches
Index - HTTP
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 contexts loaded using
elements such as <frame> and <iframe>.
... 37 csp: frame-src csp, directive, http, reference, security the http content-security-policy (csp) frame-src directive specifies valid sources for nested browsing contexts loading using
elements such as <frame> and <iframe>.
... 40 csp: media-src csp, directive, http, reference, security the http content-security-policy (csp) media-src directive specifies valid sources for loading media using the <audio> and <video>
elements.
...And 3 more matches
JavaScript technologies overview - JavaScript
however, the umbrella term "javascript" as understood in a web browser context contains several very different
elements.
...layered above the abstract concepts defined in dom core, html also defines the meaning of
elements.
... the html dom includes such things as the classname property on html
elements, or apis such as document.body.
...And 3 more matches
WebAssembly.Table() constructor - JavaScript
initial the initial number of
elements of the webassembly table.
... maximum optional the maximum number of
elements the webassembly table is allowed to grow to.
... examples creating a new webassembly table instance the following example (see table2.html source code and live version) creates a new webassembly table instance with an initial size of 2
elements.
...And 3 more matches
WebAssembly.Table - JavaScript
the number of
elements.
... table.prototype.grow() increases the size of the table instance by a specified number of
elements.
... examples creating a new webassembly table instance the following example (see table2.html source code and live version) creates a new webassembly table instance with an initial size of 2
elements.
...And 3 more matches
MathML attribute reference - MathML
notes: the mathml <mstyle> and <math>
elements accept all attributes of all mathml presentation
elements.
... the xlink attributes on mathml
elements: xlink:actuate, xlink:href, xlink:show and xlink:type are deprecated as well.
... name
elements accepting attribute description accent <mo>, <mover>, <munderover> a boolean value specifying whether the operator should be treated as an accent.
...And 3 more matches
href - SVG: Scalable Vector Graphics
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.
...if the url points to multiple target
elements, if the given target element is not capable of being a target of the given animation element, or if the given target element is not part of the current document, then the animation element will not affect any target element.
... refer to the descriptions of the individual animation
elements for any restrictions on what types of
elements can be targets of particular types of animations.
...And 3 more matches
Using shadow DOM - Web Components
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).
...aur.png" alt="a red tyrannosaurus rex: a two legged dinosaur standing 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> this fragment produces the following dom structure: shadow dom allows hidden dom trees to be attached to
elements in the regular dom tree — this shadow dom tree starts with a shadow root, underneath which can be attached to any
elements you want, in the same way as the normal dom.
...the shadow dom spec has made it so that you are allowed to actually manipulate the shadow dom of your own custom
elements.
...And 3 more matches
Index - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt
elements, exslt functions, xpath functions, xpath axes found 54 pages: # page tags and summary 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.
... 19 xslt
elements reference element, overview, reference, xslt there are two types of
elements discussed here: top-level
elements and instructions.
...but it may be after or inside
elements that won't be part of the output (like <xsl:choose> or <xsl:apply-templates> etc.).
...And 3 more matches
Adding menus and submenus - Archive of obsolete content
the separator is usually displayed as a horizontal line that creates a logical division between different types of menuitem
elements, keeping everything more organized.
... a menubar can hold one or more menu
elements.
... menus require a menupopup element as a container for its children, which are usually menuitem
elements, but can also be menuseparator, or menu in order to have multiple nesting levels: <toolbox> <menubar id="xulschoolhello-menubar"> <menu id="xulschoolhello-greeting-menu" label="&xulschoolhello.greeting.label;"> <menupopup> <menu id="xulschoolhello-greeting-sizes-menu" label="&xulschoolhello.greetingsizes.label;"> <menupopup> <menuitem label="&xulschoolhello.greet.short.label;" oncommand="xulschoolchrome.greetingdialog.greetingshort(event);" /> <menuitem label="&xulschoolhello.greet.medium.label;" oncommand="xulschoolchrome.greetingdialog.greetingmedium(event);" /> <menuitem label="&xulschoolhello.greet.
...And 2 more matches
Adding sidebars - Archive of obsolete content
for this purpose we'll also look at some handy xul
elements in this section.
... the tabbox element the « xul reference « element creates a tabbed view of one or more tabpanel
elements.
...using custom-made
elements are likely to cause accessibility and functional problems.
...And 2 more matches
Appendix F: Monitoring DOM changes - Archive of obsolete content
in particular, the ::before and ::after pseudo-
elements, and pseudo-classes like :hover and :active can be used to achieve extremely complex dynamic behavior.
... late binding and event delegation often times, it suffices to bind event listeners to top-level
elements and check for matching
elements when the event fires.
... for instance, rather than watching for the creation of <a>
elements and adding event listeners to them as they are created, an event listener can be added to the root <html> element, and when the event fires, the event.target and its parents can be searched for a matching element.
...And 2 more matches
Drag and Drop JavaScript Wrapper - Archive of obsolete content
you should define this function for
elements that allow dragged data to be dropped on them.
...for
elements that can have objects dropped on them, you should define ondragover, ondrop and getsupportedflavours (and, if desired, ondragexit).
...you can reuse the same observer for multiple
elements.
...And 2 more matches
Space Manager High Level Design - Archive of obsolete content
overview the space manager and associated classes and structures are used by block and line layout to manage rectangular regions that are occupied and available, for correct handling of floated
elements and the
elements that flow around them.
... when
elements are floated to the left or right in a layout, they take up space and influence where other
elements can be placed.
...this information is used by block layout to correctly compute where other floated
elements should be placed, and how much space is available to normal in-flow
elements that flow around the floated bits.
...And 2 more matches
Dynamically modifying XUL-based user interface - Archive of obsolete content
there are also dom methods that create, move, or delete
elements from a document.
...a logical structure of every document is a tree, with nodes being
elements, attributes, processing instructions, comments, etc.
...it uses document.createelementns() method to create the items, and insertbefore() with appendchild() to insert the created xml
elements within the document.
...And 2 more matches
Tooltips - Archive of obsolete content
for this, the tooltiptext attribute may be used, which is valid for all xul
elements.
...
elements that use the tooltiptext attribute display the tooltip in a default tooltip element, which typically looks like a small yellow box large enough to fit the text inside it.
... however, it is possible to use another tooltip element that looks differently, or which supports other
elements besides a single text label.
...And 2 more matches
Additional Navigation - Archive of obsolete content
here is an example triple that we could use in the photos example: <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/
elements/1.1/title" object="canal"/> </query> this new triple has a static value for the object attribute instead of a variable reference.
...for the first result, the value of the ?photo variable 'http://www.xulplanet.com/ndeakin/images/t/palace.jpg' will be used as the subject, the predicate will be 'http://purl.org/dc/
elements/1.1/title', and the object will be 'canal'.
...another thing that you cannot have is a triple where both variables would be unknown as in the following: <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?category" predicate="http://purl.org/dc/
elements/1.1/title" object="?title"/> </query> in this case when the template builder gets to the triple, neither the ?category nor the ?title variables can be filled in so the builder doesn't know what to generate.
...And 2 more matches
Building Menus With Templates - Archive of obsolete content
« previousnext » menus may be generated using a template in the same manner as other
elements.
... however, unlike with other
elements, the content of a menu is only generated once the menu has been opened.
...the menuitem
elements however will be repeated for each result from the query.
...And 2 more matches
Building Trees - Archive of obsolete content
<tree id="photoslist" flex="1" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos" flags="dont-build-content"> <treecols> <treecol id="name" label="name" flex="1"/> <treecol id="date" label="date" flex="1"/> </treecols> <template> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://purl.org/dc/
elements/1.1/title"/> <treecell label="rdf:http://purl.org/dc/
elements/1.1/date"/> </treerow> </treeitem> </treechildren> </template> </tree> note: the tree columns (treecols) are declared outside the template as static content, since they only need to be declared once.
...when the view requests a label for the first cell, the builder looks up the ‘http://purl.org/dc/
elements/1.1/title’ predicate for the row in question and returns it.
...since no
elements are generated, you won’t be able to retrieve the values for them either.
...And 2 more matches
RDF Modifications - Archive of obsolete content
for instance, an assert call looks like the following: var source = rdf.getresource("http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg"); var predicate = rdf.getresource("http://purl.org/dc/
elements/1.1/description"); var target = rdf.getliteral("one of the thirty or so egyptian obelisks"); datasource.assert(source, predicate, target, true); the assert call adds a new triple to the rdf datasource.
... subject: http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg predicate: http://purl.org/dc/
elements/1.1/description object: one of the thirty or so egyptian obelisks the template builder will be notified through the rdf observer mechanism of the change.
...let's assume we have single query with as follows: <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/
elements/1.1/title" object="?title"/> <triple subject="?photo" predicate="http://purl.org/dc/
elements/1.1/description" object="?description"/> </query> these query statements will cause any photos with both a title and a description to be displayed.
...And 2 more matches
Adding Event Handlers - Archive of obsolete content
add the line below just after the opening window tag and before any
elements.
...some events are triggered only by certain
elements.
...naturally, an event attached to an element higher up will receive notification of all
elements inside it, whereas an event attached to a button will only receive events pertaining to that button.
...And 2 more matches
Adding Labels and Images - Archive of obsolete content
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.
...And 2 more matches
Commands - Archive of obsolete content
command
elements the command element is used to create commands which can be used to carry out operations.
... the other advantage is that several buttons or other ui
elements can be hooked up to the same command.
...normally, you would only hook up
elements that would send a command event.
...And 2 more matches
Input Controls - Archive of obsolete content
« previousnext » xul has
elements that are similar to the html form controls.
... note that while in html, several different kinds of fields can be created with the input element, in xul there are separate
elements for each type.
...in xul, you can use the textbox element for this purpose as well -- two separate
elements are not necessary.
...And 2 more matches
Modifying a XUL Interface - Archive of obsolete content
creating new
elements you can create new
elements using the createelement() function of the document.
...the createelementns() function may be used to create
elements in a different namespace.
... note that some
elements, such as listbox and menulist provide some additional specialized modification functions which you should use instead when you can.
...And 2 more matches
XUL Questions and Answers - Archive of obsolete content
overlaying
elements without ids the original developers only tend to put ids where they need them.
... as an extension author, you have at least two options: use dom methods to dynamically create or rearrange
elements file an enhancement request in bugzilla to have extra ids added.
...*/ how do i create xul
elements dynamically in javascript?
...And 2 more matches
caption - Archive of obsolete content
it may contain either a text label, using the label attribute, or child
elements for a more complex caption.
... depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...
elements with a higher tabindex are later in the tab sequence.
...And 2 more matches
checkbox - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...And 2 more matches
colorpicker - Archive of obsolete content
disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...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 context at this point can only access the following things: global values/functions i.e.
...And 2 more matches
listcell - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...And 2 more matches
listhead - Archive of obsolete content
it is usual to place listheader
elements inside the listhead, one for each column.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...And 2 more matches
prefwindow - Archive of obsolete content
this element should be used in place of the window tag and should contain one or more prefpane
elements.
... preferencepanes type: dom nodelist holds a list of all the prefpane
elements in the window.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild()...
...And 2 more matches
rows - Archive of obsolete content
child row
elements define the individual rows to appear in the grid.
...however, nesting rows
elements allows groups of rows to have a separate appearance such as a different border, or separate scrolling may be defined for these rows.
... 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.
...And 2 more matches
separator - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] creates a small separating gap between
elements.
... horizontal the separator separates vertically placed
elements.
... vertical the separator separates horizontally placed
elements.
...And 2 more matches
tabbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container used to display a set of tabbed pages of
elements.
...down, handlectrltab properties accessibletype, eventnode, handlectrlpageupdown, handlectrltab, selectedindex, selectedpanel, selectedtab, tabs, tabpanels examples <tabbox id="mytablist" selectedindex="2"> <tabs> <tab label="a first tab"/> <tab label="second tab"/> <tab label="another tab"/> <tab label="last tab"/> </tabs> <tabpanels> <tabpanel><!-- tabpanel first
elements go here --></tabpanel> <tabpanel><!-- tabpanel second
elements go here --></tabpanel> <tabpanel><button label="click me"/></tabpanel> <tabpanel><!-- tabpanel fourth
elements go here --></tabpanel> </tabpanels> </tabbox> attributes eventnode type: one of the values below indicates where keyboard navigation events are listened to.
... selectedtab type: tab element a reference to the currently selected tab, which will always be one of the tab
elements in the tabs element.
...And 2 more matches
textbox - Archive of obsolete content
disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...--> <input type="text" spellcheck="false" /><br /> <textarea spellcheck="false"></textarea> <div contenteditable="true" spellcheck="false">i am some content</div> you can use spellcheck on input, textarea, and contenteditable
elements.
...And 2 more matches
treecol - Archive of obsolete content
you can also place splitter
elements between the columns to allow column resizing.
... depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
...individual treecell
elements in the column may be marked editable="false" in order to disable editing.
...And 2 more matches
CSS - Archive of obsolete content
normally, a <xul:stack> will change its size so that all of its child
elements are completely visible.
...om behavior that occurs when a user hits the zoom limit during page manipulation.-ms-content-zoom-limitthe -ms-content-zoom-limit css shorthand property is a microsoft extension that specifies values for the -ms-content-zoom-limit-min and -ms-content-zoom-limit-max properties.-ms-content-zoom-limit-maxthe -ms-content-zoom-limit-max css property is a microsoft extension that specifies the selected
elements' maximum zoom factor.-ms-content-zoom-limit-minthe -ms-content-zoom-limit-min css property is a microsoft extension that specifies the minimum zoom factor.-ms-content-zoom-snapthe -ms-content-zoom-snap css shorthand property is a microsoft extension that specifies values for the -ms-content-zoom-snap-type and -ms-content-zoom-snap-points properties.-ms-content-zoom-snap-pointsthe -ms-content-zoom...
...l-to-horizontal scroll wheel translation occurs on the specified element.-ms-scrollbar-3dlight-colorthe -ms-scrollbar-3dlight-color css property is a microsoft extension specifying the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.-ms-scrollbar-arrow-colorthe -ms-scrollbar-arrow-color css property is a microsoft extension that specifies the color of the arrow
elements of a scroll arrow.-ms-scrollbar-base-colorthe -ms-scrollbar-base-color css property is a microsoft extension that specifies the base color of the main
elements of a scroll bar.-ms-scrollbar-darkshadow-colorthe -ms-scrollbar-darkshadow-color css property is a microsoft extension that specifies the color of a scroll bar's gutter.-ms-scrollbar-face-colorthe -ms-scrollbar-face-color css property is a...
...And 2 more matches
Introduction - Archive of obsolete content
« previousnext » basic syntax with e4x enabled, basic xml
elements are valid syntax for variables.
... var element2 = <foo> <bar/> </foo>; additionally, you can specify all of the normal attributes on
elements that you would normally include in an xml document.
... var element3 = <foo baz="1"/>; manipulating
elements the goal of e4x was to provide an easier way for javascript programmers to manipulate an xml document, without going through the dom interfaces.
...And 2 more matches
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
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.
...this was most easily accomplished by floating the div
elements themselves.
...these are enclosed in h3
elements, so the field was pretty wide open in terms of what we could do.
...And 2 more matches
Styling Abbreviations and Acronyms - Archive of obsolete content
summary: the html
elements abbr and acronym are useful accessibility aids, but their styling can come as a surprise to authors.
... see how you can take control of their presentation without sacrificing the benefits these
elements provide.
... many authors are beginning to use the html
elements abbr (abbreviation) and acronym in their web pages.
...And 2 more matches
Sizing items in CSS - Learn web development
understanding how big the different features in your design will be is important, and in this lesson we will summarize the various ways
elements get a size via css and define a few terms around sizing that will help you in the future.
... the natural or intrinsic size of things html
elements have a natural size, set before they are affected by any css.
... setting a specific size we can of course give
elements in our design a specific size.
...And 2 more matches
CSS building blocks - Learn web development
css selectors there are a wide variety of css selectors available, allowing for fine-grained precision when selecting
elements to style.
...the sub-articles are as follows: type, class, and id selectors attribute selectors pseudo-classes and pseudo-
elements combinators the box model everything in css has a box around it, and understanding these boxes is key to being able to create layouts with css, or to align items with other items.
...understanding how big the different features in your design will be is important, and in this lesson, we will summarize the various ways
elements get a size via css and define a few terms around sizing that will help you in the future.
...And 2 more matches
How CSS is structured - Learn web development
each css rule starts with a selector—or a list of selectors—in order to tell the browser which element or
elements the rules should apply to.
...however, there is also a class that sets the text of selected
elements to red.
...write css rules that apply styling to different html
elements: font-size width background-color color border important: if a property is unknown, or if a value is not valid for a given property, the declaration is processed as invalid.
...And 2 more matches
create fancy boxes - Learn web development
pseudo-
elements when styling a single box, you could find yourself limited and could wish to have more boxes to create even more amazing styles.
...one solution to avoid such pitfalls is to use css pseudo-
elements.
... feel free to tweak this example to make a cloud that isn't flat at the bottom ;) */ border-radius: 100% 100% 0 0; } /* those are common style that apply to both our ::before and ::after pseudo
elements.
...And 2 more matches
Styling lists - Learn web development
ther ingredients.</dd> <dt>pita</dt> <dd>a soft, slightly leavened flatbread.</dd> <dt>halloumi</dt> <dd>a semi-hard, unripened, brined cheese with a higher-than-usual melting point, usually made from goat/sheep milk.</dd> <dt>green salad</dt> <dd>that green healthy stuff that many of us just use to garnish kebabs.</dd> </dl> if you go to the live example now and investigate the list
elements using browser developer tools, you'll notice a couple of styling defaults: the <ul> and <ol>
elements have a top and bottom margin of 16px (1em) and a padding-left of 40px (2.5em.) the list items (<li>
elements) have no set defaults for spacing.
... the <dd>
elements have margin-left of 40px (2.5em.) the <p>
elements we've included for reference have a top and bottom margin of 16px (1em), the 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.
...And 2 more matches
Web forms — Working with user data - Learn web development
the above text is a good indicator as to why we've put web forms into its own standalone module, rather than trying to mix bits of it into the html, css, and javascript topic areas — form
elements are more complex than most other html
elements, and they also require a close marriage of related css and javascript techniques to get the most out of them.
... introductory guides your first form the first article in our series provides your very first experience of creating a web form, including designing a simple form, implementing it using the right html
elements, adding some very simple styling via css, and how data is sent to a server.
... how to structure a web form with the basics out of the way, we now look in more detail at the
elements used to provide structure and meaning to the different parts of a form.
...And 2 more matches
Debugging HTML - Learn web development
<ul> <li>unclosed
elements: if an element is <strong>not closed properly, then its effect can spread to areas you didn't intend <li>badly nested
elements: nesting
elements properly is also very important for code behaving correctly.
...let's look at an example: <a href="https://www.mozilla.org/>link to mozilla homepage</a> </ul> let's review the problems: the paragraph and list item
elements have no closing tags.
... "end tag li implied, but there were open
elements" (2 instances): these messages indicate that an element is open that should be closed.
...And 2 more matches
HTML table basics - Learn web development
adding headers with <th>
elements now let's turn our attention to table headers — special cells that go at the start of a row or column and define the type of data that row or column contains (as an example, see the "person" and "age" cells in the first example shown in this article).
...go into your html, and change all the <td>
elements surrounding the table headers into <th>
elements.
...html has a method of defining styling information for an entire column of data all in one place — the <col> and <colgroup>
elements.
...And 2 more matches
Drawing graphics - Learn web development
previous overview: client-side web apis next the browser contains some very powerful graphics programming tools, from the scalable vector graphics (svg) language, to apis for drawing on html <canvas>
elements, (see the canvas api and webgl).
... 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.
...once you've drawn a graphic to a canvas, there's no way to manipulate that graphic individually like you can with dom
elements.
...And 2 more matches
What is JavaScript? - Learn web development
whereas css uses <link>
elements to apply external stylesheets and <style>
elements to apply internal stylesheets to html, javascript only needs one friend in the world of html — the <script> element.
...if you are using javascript to manipulate
elements on the page (or more accurately, the document object model), your code won't work if the javascript is loaded and parsed before the html you are trying to do something to.
... for example, if you have the following script
elements: <script async src="js/vendor/jquery.js"></script> <script async src="js/script2.js"></script> <script async src="js/script3.js"></script> you can't rely on the order the scripts will load in.
...And 2 more matches
Solve common problems in your JavaScript code - Learn web development
some common built-in browser functions that cause problems are: correct wrong get
elementsbytagname() getelementbytagname() get
elementsbyname() getelementbyname() get
elementsbyclassname() getelementbyclassname() getelementbyid() get
elementsbyid() semi-colon position you need to make sure you don't place any semi-colons incorrectly.
... how do you iterate over the
elements in an array?
... how do you iterate over the
elements in a multidimensional array?
...And 2 more matches
TypeScript support in Svelte - Learn web development
we also had a look at using the transition directive to implement animations on dom
elements in svelte.
... let's see a quick example, a simple stack class that let's us push and pop
elements, like this: export class stack { private
elements = [] push = (element) => this.
elements.push(element) pop() { if (this.
elements.length === 0) throw new error('the stack is empty!') return this.
elements.pop() } } in this case
elements is an array of type any, and accordingly the push() and pop() methods both receive and return a variable of type any.
...we could do the following: export class stringstack { private
elements: string[] = [] push = (element: string) => this.
elements.push(element) pop(): string { if (this.
elements.length === 0) throw new error('the stack is empty!') return this.
elements.pop() } } that would work.
...And 2 more matches
Getting started with Svelte - Learn web development
highly interactive pages or complex visualizations: if you are building data-visualizations that need to display a large number of dom
elements, the performance gains that come from a framework with no runtime overhead will ensure that user interactions are snappy and responsive.
... <script> // logic goes here </script> <style> /* styles go here */ </style> <!-- markup (zero or more html
elements) goes here --> note: for more information on the component format, have a look at the svelte documentation.
... <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.
...And 2 more matches
Mozilla’s UAAG evaluation report
(p2) p dom inspector provides some capability, but not really intended for end users (tasks, tools, dom inspector) 9.10 configure important
elements.
... (p3) ni the navigational
elements aren't user configurable guideline 10.
... 10.4 highlight special
elements.
...And 2 more matches
Displaying Places information using views
places provides the following built-in views: tree menu toolbar instantiating the three built-in views are simply standard xul
elements with a special type attribute whose value is "places".
... every xul document containing a built-in view must import the stylesheet browser/components/places/content/places.css and overlay 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.
...it does so by recognizing certain magic values of the id attribute on your treecol
elements.
...And 2 more matches
Performance best practices for Firefox front-end engineers
always keep in mind the side effects your changes may have, from blocking other tasks, to interfering with other user interface
elements.
... javascript code might, for example, change dom node attributes (either directly or by adding or removing classes from
elements), and can also add, remove, or delete dom nodes.
...however, as of firefox 49, the nsidomwindowutils.
elementsrestyled attribute records a count of how many style calculations have occurred for a particular dom window.
...And 2 more matches
Mozilla Style System Documentation
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 contexts for some things that are not css formatting objects: text nodes and placeholder frames.
...this is useful for the pseudo-
elements defined in the css specification (:before, :after, :first-line, :first-letter), but few of mozilla's custom pseudo-
elements, many of which are hacks for further formatting objects that we create.
...And 2 more matches
L20n HTML Bindings
<link rel="localization" href="../locales/manifest.json"> an 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.
... a safe subset of html
elements (e.g.
...the value attribute is allowed on input
elements, but type is not.
...And 2 more matches
Python binding for NSS
python also provides an abstraction of common operating system services but because nss and nspr are tightly bound python-nss exposes
elements of nspr.
... nss/nspr objects whose collection
elements can be referenced by name support associative indexing.
... deprecated
elements of the python-nss api are marked with python deprecation warnings as well as being documented in the nss module documentation.
...And 2 more matches
JS_NewArrayObject
contents js::handlevaluearray& reference to the initial values for the array's
elements.
... vector jsval * pointer to the initial values for the array's
elements, or null.
... obsolete since jsapi 30 description js_newarrayobject with contents parameter creates a new array object with the specified contents
elements.
...And 2 more matches
XUL Accessibility
introduction this article shows how xul control
elements are mapped to accessibility api.
... searching specific element in neighbour of the element search inside the element subtree go up through parents (max level is 5) and search inside theirs subtrees if the element is anonymous then search in whole anonymous subtree, here the attribute anonid is used instead of id attribute accessible properties this section describes common rules how accessibility properties are formed for xul
elements.
... name the following rules to generate accessible name are applied: check aria-labelledby attribute, name is generated from
elements pointed by aria-labelledby attribute <description id="descr1">label1</description> <description id="descr2">label2</description> <textbox aria-labelledby="descr1 descr2" /> if the element implements nsidomxullabeledcontrolelement or nsidomxulselectcontrolitemelement interface then it is used label property if the element doesn't implement nsidomxulselectcontrolelement then label attribute is used if neighbour of the element has label element pointing to this element by the control attribute, if the label element is found then use value attribute or its content.
...And 2 more matches
nsIArray
inherits from: nsisupports last changed in gecko 1.7 an indexed collection of
elements.
... provides basic functionality for retrieving
elements at a specific position, searching for
elements.
...neither interface makes any attempt to protect the individual
elements from modification.
...And 2 more matches
nsIDOMElement
inherits from: nsidomnode last changed in gecko 1.7 method overview domstring getattribute(in domstring name); nsidomattr getattributenode(in domstring name); nsidomattr getattributenodens(in domstring namespaceuri, in domstring localname); domstring getattributens(in domstring namespaceuri, in domstring localname); nsidomnodelist get
elementsbytagname(in domstring name); nsidomnodelist get
elementsbytagnamens(in domstring namespaceuri, in domstring localname); boolean hasattribute(in domstring name); boolean hasattributens(in domstring namespaceuri, in domstring localname); void removeattribute(in domstring name) nsidomattr removeattributenode(in nsidomattr oldattr) void removeattributens(in domstring namespaceuri, in domst...
...get
elementsbytagname() get all descendants of a tag name.
... nsidomnodelist get
elementsbytagname( in domstring name ); parameters name tag name return value a nsidomnodelist containg all the descendants of this tag name.
...And 2 more matches
nsISupportsArray
inherits from: nsicollection last changed in gecko 1.7 method overview boolean append
elements(in nsisupportsarray a
elements); violates the xpcom interface guidelines nsisupportsarray clone(); void compact(); void deleteelementat(in unsigned long aindex); void deletelastelement(in nsisupports aelement); nsisupports elementat(in unsigned long aindex); violates the xpcom interface guidelines boolean enumeratebackwards(in nsisupportsarrayenumfunc afunc, in voidptr adata); violates the xpcom interface guidelines boolean enumerateforwards(in nsisupportsarrayenumfunc afunc, in voidptr adata); violates the xpcom interface guidelines boolean equals([const] in nsisupportsarray other); violates th...
...n nsisupports apossibleelement); long indexof([const] in nsisupports apossibleelement); violates the xpcom interface guidelines long indexofstartingat([const] in nsisupports apossibleelement, in unsigned long astartindex); violates the xpcom interface guidelines boolean insertelementat(in nsisupports aelement, in unsigned long aindex); violates the xpcom interface guidelines boolean insert
elementsat(in nsisupportsarray aother, in unsigned long aindex); violates the xpcom interface guidelines long lastindexof([const] in nsisupports apossibleelement); violates the xpcom interface guidelines boolean moveelement(in long afrom, in long ato); violates the xpcom interface guidelines boolean removeelementat(in unsigned long aindex); violates the xpcom interface guidelines boolean removeele...
...nt); violates the xpcom interface guidelines boolean removelastelement([const] in nsisupports aelement); violates the xpcom interface guidelines boolean replaceelementat(in nsisupports aelement, in unsigned long aindex); violates the xpcom interface guidelines boolean sizeto(in long asize); violates the xpcom interface guidelines methods violates the xpcom interface guidelines append
elements() boolean append
elements( in nsisupportsarray a
elements ); parameters a
elements return value clone() nsisupportsarray clone(); parameters none.
...And 2 more matches
nsIVariant
violates the xpcom interface guidelines getasarray() nsresult getasarray( out pruint16 type, out nsiid iid, out pruint32 count, out voidptr ptr ); parameters type the type of the array
elements.
... iid the iid of the array
elements, if they are interface pointers.
... count the number of
elements in the array.
...And 2 more matches
3D view - Firefox Developer Tools
off-screen
elements become visible, so that you can see where your
elements are located in relation to the visible content.
... you can click on
elements to see their html in the html panel or the style panel.
... conversely, you can click on
elements in the breadcrumb bar to change which element is selected in the 3d view.
...And 2 more matches
Waterfall - Firefox Developer Tools
recalculate style calculating the computed styles that apply to page
elements.
...the hint may be any of: self subtree latersiblings csstransitions cssanimations svgattranimations styleattribute styleattribute_animations force forcedescendants layout calculating the position and size of page
elements.
... recalculate style: if the browser thinks the computed styles for page
elements have changed, it must then recalculate them.
...And 2 more matches
Using images - Web APIs
you can even use the image produced by other canvas
elements on the same page as the source!
... using images from the same page we can obtain a reference to images on the same page as the canvas by using one of: the document.images collection the document.get
elementsbytagname() method if you know the id of the specific image you wish to use, you can use document.getelementbyid() to retrieve that specific image using images from other domains using the crossorigin attribute of an <img> element (reflected by the htmlimageelement.crossorigin property), you can request permission to load an image from another domain for use in your call to drawimage().
... using other canvas
elements just as with normal images, we access other canvas
elements using either the document.get
elementsbytagname() or document.getelementbyid() method.
...And 2 more matches
CustomElementRegistry.upgrade() - Web APIs
the upgrade() method of the customelementregistry interface upgrades all shadow-containing custom
elements in a node subtree, even before they are connected to the main document.
... syntax custom
elements.upgrade(root); parameters root a node instance with shadow-containing descendant
elements that are to be upgraded.
... if there are no descendant
elements that can be upgraded, no error is thrown.
...And 2 more matches
Document.createElementNS() - Web APIs
optionsoptional an optional elementcreationoptions object containing a single property named is, whose value is the tag name for a custom element previously defined using custom
elements.define().
... for backwards compatibility with previous versions of the custom
elements specification, some browsers will allow you to pass a string here instead of an object, where the string's value is the custom element's tag name.
... see extending native html
elements for more information on how to use this parameter.
...And 2 more matches
Element.name - Web APIs
it only applies to the following
elements: <a>, <applet>, <button>, <form>, <frame>, <iframe>, <img>, <input>, <map>, <meta>, <object>, <param>, <select>, and <textarea>.
... 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.get
elementsbyname() method, a form and with the form
elements collection.
...And 2 more matches
HTMLButtonElement - Web APIs
the htmlbuttonelement interface provides properties and methods (beyond the regular htmlelement interface it also has available to it by inheritance) for manipulating <button>
elements.
... htmlbuttonelement.labels read only is a nodelist that represents a list of <label>
elements that are labels for this button.
... methods inherits methods from its parent, htmlelement name return type description checkvalidity() boolean not supported for reset or button
elements.
...And 2 more matches
Drag Operations - Web APIs
for other
elements, they must be part of a selection for a default drag to occur.
... in html, apart from the default behavior for images, links, and selections, no 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.
...And 2 more matches
HTML Drag and Drop API - Web APIs
the user may select draggable
elements with a mouse, drag those
elements to a droppable element, and drop them by releasing the mouse button.
... a translucent representation of the draggable
elements follows the pointer during the drag operation.
... for web sites, extensions, and xul applications, you can customize which
elements can become draggable, the type of feedback the draggable
elements produce, and the droppable
elements.
...And 2 more matches
MediaElementAudioSourceNode - Web APIs
a media
elementsourcenode has no inputs and exactly one output, and is created using the audiocontext.createmedia
elementsource() method.
... number of inputs 0 number of outputs 1 channel count defined by the media in the htmlmediaelement passed to the audiocontext.createmedia
elementsource method that created it.
... example this simple example creates a source from an <audio> element using createmedia
elementsource(), then passes the audio through a gainnode before feeding it into the audiodestinationnode for playback.
...And 2 more matches
WebGL2RenderingContext - Web APIs
drawing buffers webgl2renderingcontext.vertexattribdivisor() modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with gl.drawarraysinstanced() and gl.draw
elementsinstanced().
...in addition, it can execute multiple instances of the range of
elements.
... webgl2renderingcontext.draw
elementsinstanced() renders primitives from array data.
...And 2 more matches
ARIA annotations - Accessibility
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.
... role="mark" — semantically denotes html
elements containing text that is marked/highlighted for reference purposes.
...And 2 more matches
ARIA: grid role - Accessibility
while it does not imply a specific visual presentation, it implies a relationship among
elements.
...see aria authoring practices for more details cell
elements have the role gridcell, unless they are a row or column header.
... then the
elements are rowheader and columnheader, respectively.
...And 2 more matches
ARIA: Listitem role - Accessibility
<section role="list"> <div role="listitem">list item 1</div> <div role="listitem">list item 2</div> <div role="listitem">list item 3</div> </section> description any content that consists of an outer container with a list of
elements inside it can be identified to assistive technologies using the list and listitem containers respectively.
... there are no hard and fast rules about which
elements you should use to markup the list and list items, but you should make sure that the list items make sense in the context of a list, e.g.
... warning: if at all possible in your work, you should use the appropriate semantic html
elements to mark up a list and its listitems — <ul>/<ol> and <li>.
...And 2 more matches
ARIA: button role - Accessibility
the button role should be used for clickable
elements that trigger a response when activated by the user.
... <div id="savechanges" tabindex="0" role="button" aria-pressed="false">save</div> the above example creates a simple button which is first in the focus order, though <button> or <input> with type="button" should be used for buttons: <button id="savechanges">save</button> note: if using role="button" instead of the semantic <button> or <input type="button">
elements, you will need to make the element focusable and have to define event handlers for click and keydown events, including the enter and space keys, in order to process the user's input.
... aria-expanded if the button controls a grouping of other
elements, the aria-expanded state indicates whether the controlled grouping is currently expanded or collapsed.
...And 2 more matches
ARIA - Accessibility
for instance, native
elements have built-in keyboard accessibility, roles and states.
...the new landmark
elements (<main>, <header>, <nav> etc) have built-in aria roles, so there is no need to duplicate them.
...because of this, it is important to use semantic html
elements whenever possible, as semantic html has far better support for assistive technology.
...And 2 more matches
:checked - CSS: Cascading Style Sheets
note: because browsers often treat <option>s as replaced
elements, the extent to which they can be styled with the :checked pseudo-class varies from browser to browser.
...e="opt2">grapes</option> <option value="opt3">pears</option> </select> css div, select { margin: 8px; } /* labels for checked inputs */ input:checked + label { color: red; } /* radio element, when checked */ input[type="radio"]:checked { box-shadow: 0 0 0 3px orange; } /* checkbox element, when checked */ input[type="checkbox"]:checked { box-shadow: 0 0 0 3px hotpink; } /* option
elements, when selected */ option:checked { box-shadow: 0 0 0 3px lime; color: red; } 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.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:checkedchrome full support 1notes full support 1notes notes on macos, styling <option&rt;
elements has no effect.edge full support 12notes full support 12notes notes on macos, styling <option&rt;
elements has no effect.firefox full support 1notes full support 1notes notes from firefox 56, <option&rt;
elements canno...
...And 2 more matches
@namespace - CSS: Cascading Style Sheets
syntax /* default namespace */ @namespace url(xml-namespace-url); @namespace "xml-namespace-url"; /* prefixed namespace */ @namespace prefix url(xml-namespace-url); @namespace prefix "xml-namespace-url"; description the defined namespaces can be used to restrict the universal, type, and attribute selectors to only select
elements within that namespace.
...when a default namespace is defined, all universal and type selectors (but not attribute selectors, see note below) apply only to
elements in that namespace.
... in html5, known foreign
elements will automatically be assigned namespaces.
...And 2 more matches
CSS Flow Layout - CSS: Cascading Style Sheets
normal flow, or flow layout, is the way that block and inline
elements are displayed on a page before any changes are made to their layout.
... in normal flow, inline
elements display in the inline direction, that is in the direction words are displayed in a sentence according to the writing mode of the document.
... block
elements display one after the other, as paragraphs do in the writing mode of that document.
...And 2 more matches
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
grid can be really very useful here,
elements deprioritized in the mobile source order can be moved into a sidebar in a desktop layout, for example.
...therefore, where you have a <ul> element inside a grid container, that ul becomes a grid item – the child <li>
elements do not.
... given that interoperable support for display: contents is limited and we do not yet have subgrids, there is a definite temptation when developing a site using css grid layout to flatten out the markup, to remove semantic
elements in order to make it simpler to create a layout.
...And 2 more matches
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
my mark-up is a container with
elements inside for a header, footer, main content, navigation, sidebar, and a block into which i am intending to place advertising.
...i find this named areas method very helpful at a prototyping stage, it is easy to play around with the location of
elements.
... .wrapper { max-width: 1024px; margin: 0 auto; font: 1.2em helvetica, arial, sans-serif; } .wrapper > * { border: 2px solid #f08c00; background-color: #ffec99; border-radius: 5px; padding: 10px; } .wrapper { display: grid; grid-template-columns: repeat(12, [col-start] 1fr); grid-gap: 20px; } to demonstrate how this grid system works i have four child
elements inside my wrapper.
...And 2 more matches
box-ordinal-group - CSS: Cascading Style Sheets
the box-ordinal-group css property assigns the flexbox's child
elements to an ordinal group.
...when the computed box-direction is normal, a box will display its
elements starting from the lowest numbered ordinal group and ensure that those
elements appear to the left (for horizontal boxes) or at the top (for vertical boxes) of the container.
...
elements with the same ordinal group are flowed in the order they appear in the source document tree.
...And 2 more matches
<display-box> - CSS: Cascading Style Sheets
syntax valid <display-box> values: contents these
elements don't produce a specific box by themselves.
...please note that the css display level 3 spec defines how the contents value should affect "unusual
elements" —
elements that aren’t rendered purely by css box concepts such as replaced
elements.
... see appendix b: effects of display: contents on unusual
elements for more details.
...And 2 more matches
max-width - CSS: Cascading Style Sheets
accessibility concerns ensure that
elements set with a max-width are not truncated and/or do not obscure other content when the page is zoomed to increase text size.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 formal definition initial valuenoneapplies toall
elements but non-replaced inline
elements, table rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute length or noneanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting max width in pixels in this example, the "child" will be either 150 pixels wide or the width of the "parent," whichever is smaller.
...firefox supports applying max-width to table
elements.ie full support 7opera full support 4notes full support 4notes notes css 2.1 leaves the behavior of max-width with table undefined.
...And 2 more matches
pointer-events - CSS: Cascading Style Sheets
none the element is never the target of pointer events; however, pointer events may target its descendant
elements if those descendants have pointer-events set to some other value.
...
elements with pointer-events: none will still receive focus through sequential keyboard navigation using the tab key.
... formal definition initial valueautoapplies toall
elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | none | visiblepainted | visiblefill | visiblestroke | visible | painted | fill | stroke | all | inherit examples disabling pointer events on all images this example disables pointer events (clicking, dragging, hovering, etc.) on all images.
...And 2 more matches
unicode-bidi - CSS: Cascading Style Sheets
for inline
elements, implicit reordering works across element boundaries.
... bidi-override for inline
elements this creates an override.
... for block container
elements this creates an override for inline-level descendants not within another block container element.
...And 2 more matches
user-select - CSS: Cascading Style Sheets
syntax none the text of the element and its sub-
elements is not selectable.
... note that the selection object can contain these
elements.
... auto the used value of auto is determined as follows: on the ::before and ::after pseudo
elements, the used value is none if the element is an editable element, the used value is contain otherwise, if the used value of user-select on the parent of this element is all, the used value is all otherwise, if the used value of user-select on the parent of this element is none, the used value is none otherwise, the used value is text text the text can be selected by the user.
...And 2 more matches
visibility - CSS: Cascading Style Sheets
for xul
elements, the computed size of the element is always zero, regardless of other styles that would normally affect the size, although margins still take effect.
... for other
elements, collapse is treated the same as hidden.
...this will cause the element and all its descendant
elements to no longer be announced by screen reading technology.
...And 2 more matches
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
implicit aria role no corresponding role permitted aria roles any dom interface htmlelement attributes like all other html
elements, this element supports the global attributes, except that the dir attribute behaves differently than normal: it defaults to auto, meaning its value is never inherited from the parent element.
... examples no <bdi> with only ltr this example lists the winners of a competition using <span>
elements only.
...ine: <ul> <li><span class="name">henrietta boffin</span> - 1st place</li> <li><span class="name">jerry cruncher</span> - 2nd place</li> </ul> body { border: 1px solid #3f87a6; max-width: calc(100% - 40px - 6px); padding: 20px; width: calc(100% - 40px - 6px); border-width: 1px 1px 1px 5px; } no <bdi> with rtl text this example lists the winners of a competition using <span>
elements only, and one of the winners has a name consisting of rtl text.
...And 2 more matches
<dl>: The Description List element - HTML: Hypertext Markup Language
the element encloses a list of groups of terms (specified using the <dt> element) and descriptions (provided by <dd>
elements).
... permitted content either: zero or more groups each consisting of one or more <dt>
elements followed by one or more <dd>
elements, optionally intermixed with <script> and <template>
elements.
... or: one or more <div>
elements, optionally intermixed with <script> and <template>
elements.
...And 2 more matches
<input type="button"> - HTML: Hypertext Markup Language
<input>
elements of type button are rendered as simple push buttons, which can be programmed to control custom functionality anywhere on a webpage as required when assigned an event handler function (typically for the click event).
... note: while <input>
elements of type button are still perfectly valid html, the newer <button> element is now the favored way to create buttons.
... 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 the button's label.
...And 2 more matches
<input type="number"> - HTML: Hypertext Markup Language
<input>
elements of type number are used to let the user enter a number.
... using number inputs <input type="number">
elements can help simplify your work when building the user interface and logic for entering numbers into a form.
... controlling input size <input>
elements of type number don't support form sizing attributes such as size.
...And 2 more matches
<input type="radio"> - HTML: Hypertext Markup Language
<input>
elements of type radio are generally used in radio groups—collections of radio buttons describing a set of related options.
... additional attributes in addition to the common attributes shared by all <input>
elements, radio inputs support the following attributes: attribute description checked a boolean indicating whether or not this radio button is the currently-selected item in the group value the string to use as the value of the radio when submitting the form, if the radio is currently toggled on checked a boolean attribute which, if present, indicates that...
... beyond accessibility, this is another good reason to properly set up <label>
elements on your forms.
...And 2 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.
... 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 characters the input should accept minlength the minimum number of characters long the input can be and still be c...
... using search inputs <input>
elements of type search are very similar to those of type text, except that they are specifically intended for handling search terms.
...And 2 more matches
<input type="time"> - HTML: Hypertext Markup Language
<input>
elements of type time create input fields designed to let the user easily enter a time (hours and minutes, and optionally seconds).
... additional attributes in addition to the attributes common to all <input>
elements, time inputs offer the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the latest time to accept, in the syntax described under time value format min the earliest time to accept as a valid input readonly a boolean attribute which, if pr...
... padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding-left: 5px; } the best way to deal with times in forms in a cross-browser way, for the time being, is to get the user to enter the hours and minutes (and seconds if required) in separate controls (<select>
elements are popular; see below for an example), or use javascript libraries such as the jquery timepicker plugin.
...And 2 more matches
<menu> - HTML: Hypertext Markup Language
this might be in the form of an unordered list of <li>
elements, or, if the element has no <li> element children, flow content describing available commands.
... usage notes the <menu> and <ul>
elements both represent an unordered list of items.
... context menus consist of a <menu> element which contains <menuitem>
elements for each selectable option in the menu, <menu>
elements for submenus within the menu, and <hr>
elements for separator lines to break up the menu's content into sections.
...And 2 more matches
<select>: The HTML Select element - HTML: Hypertext Markup Language
you can further nest <option>
elements inside <optgroup>
elements to create separate groups of options inside the dropdown.
...(if this attribute is not set, the <select> is associated with its ancestor <form> element, if any.) this attribute lets you associate <select>
elements to <form>s anywhere in the document, not just inside a <form>.
...if you want to get full control, you should consider using a library with good facilities for styling form widgets, or try rolling your own dropdown menu using non-semantic
elements, javascript, and wai-aria to provide semantics.
...And 2 more matches
<style>: The Style Information element - HTML: Hypertext Markup Language
in general, it is better to put your styles in external stylesheets and apply them using <link>
elements.
... if you include multiple <style> and <link>
elements in your document, they will be applied to the dom in the order they are included in the document — make sure you include them in the correct order, to avoid unexpected cascade issues.
... in the same manner as <link>
elements, <style>
elements can include media attributes that contain media queries, allowing you to selectively apply internal stylesheets to your document depending on media features such as viewport width.
...And 2 more matches
<table>: The Table element - HTML: Hypertext Markup Language
content categories flow content permitted content in this order: an optional <caption> element, zero or more <colgroup>
elements, an optional <thead> element, either one of the following: zero or more <tbody>
elements one or more <tr>
elements an optional <tfoot> element tag omission none, both the starting and ending tag are mandatory.
... to achieve a similar effect, apply the border-collapse property to the <table> element, with its value set to collapse, and the padding property to the <td>
elements.
...it can have the following values: none, which indicates that no rules will be displayed; it is the default value; groups, which will cause the rules to be displayed between row groups (defined by the <thead>, <tbody> and <tfoot>
elements) and between column groups (defined by the <col> and <colgroup>
elements) only; rows, which will cause the rules to be displayed between rows; columns, which will cause the rules to be displayed between columns; all, which will cause the rules to be displayed between rows and columns.
...And 2 more matches
TypeError: can't delete non-configurable array element - JavaScript
the javascript exception "can't delete non-configurable array element" occurs when it was attempted to shorten the length of an array, but one of the array's
elements is non-configurable.
... it was attempted to shorten the length of an array, but one of the array's
elements is non-configurable.
... when shortening an array, the
elements beyond the new array length will be deleted, which failed in this situation.
...And 2 more matches
TypeError: Reduce of empty array with no initial value - JavaScript
examples invalid cases this problem appears frequently when combined with a filter (array.prototype.filter(), typedarray.prototype.filter()) which will remove all
elements of the list.
... var ints = [0, -1, -2, -3, -4, -5]; ints.filter(x => x > 0) // removes all
elements .reduce((x, y) => x + y) // no more
elements to use for the initial value.
... similarly, the same issue can happen if there is a typo in a selector, or an unexpected number of
elements in a list: var names = document.get
elementsbyclassname("names"); var name_list = array.prototype.reduce.call(names, (acc, name) => acc + ", " + name); valid cases these problems can be solved in two different ways.
...And 2 more matches
Array.prototype.concat() - JavaScript
description the concat method creates a new array consisting of the
elements in the object on which it is called, followed in order by, for each argument, the
elements of that argument (if the argument is an array) or the argument itself (if the argument is not an array).
... the concat method does not alter this or any of the arrays provided as arguments but instead returns a shallow copy that contains copies of the same
elements combined from the original arrays.
...
elements of the original arrays are copied into the new array as follows: object references (and not the actual object): concat copies object references into the new array.
...And 2 more matches
Array.prototype.map() - JavaScript
it is not called for missing
elements of the array; that is: indexes that have never been set; which have been deleted; or which have never been assigned a value.
... the range of
elements processed by map is set before the first invocation of callback.
...
elements which are appended to the array after the call to map begins will not be visited by callback.
...And 2 more matches
Array.prototype.slice() - JavaScript
slice(-2) extracts the last two
elements in the sequence.
...for example, slice(1,4) extracts the second element through the fourth element (
elements indexed 1, 2, and 3).
... return value a new array containing the extracted
elements.
...And 2 more matches
Array.prototype.some() - JavaScript
the range of
elements processed by some() is set before the first invocation of callback.
...
elements appended to the array after the call to some() begins will not be visited by callback.
...
elements that are deleted are not visited.
...And 2 more matches
TypedArray.prototype.forEach() - JavaScript
however, it is executed for
elements that are present and have the value undefined.
... the range of
elements processed by foreach() is set before the first invocation of callback.
...
elements that are appended to the typed array after the call to foreach() begins will not be visited by callback.
...And 2 more matches
MathML element reference - MathML
this is an alphabetical list of mathml presentation
elements.
... mathml
elements implement the mathmlelement class.
... mathml presentation
elements a to z math <math> (top-level element) a <maction> (binded actions to sub-expressions) <maligngroup> (alignment group) <malignmark> (alignment points) e <menclose> (enclosed contents) <merror> (enclosed syntax error messages) f <mfenced> (parentheses) <mfrac> (fraction) g <mglyph> (displaying non-standard symbols) i <mi> (identifier) l <mlabeledtr> (labeled row in a table or a matrix) <mlongdiv> (long division notation) m <mmultiscripts> (prescripts and tensor indices) n <mn> (number) o <mo> (operator) <mover> (overscript) p <mpadded> (space around content) <mphantom> (invisible content with reserved space) r <mroot> (radical with specified index) <mrow> (grouped sub-expressions) s <ms> (stri...
...And 2 more matches
Populating the page: how browsers work - Web Performance
waiting to obtain css doesn't block html parsing or downloading, but it does block javascript, because javascript is often used to query css properties’ impact on
elements.
...taking the size of the viewport as its base, layout generally starts with the body, laying out the dimensions of all the body’s descendants, with each element's box model properties, providing placeholder space for replaced
elements it doesn’t know the dimensions of, such as our image.
...painting involves drawing every visual part of an element to the screen, including text, colors, borders, shadows, and replaced
elements like buttons and images.
...And 2 more matches
lang - SVG: Scalable Vector Graphics
the lang attribute specifies the primary language used in contents and attributes containing text content of particular
elements.
... in svg 1.1 there was a lang attribute defined with a different meaning and only applying to <glyph>
elements.
... all
elements are using this attribute.
...And 2 more matches
<use> - SVG: Scalable Vector Graphics
--> </svg> the effect is the same as if the nodes were deeply cloned into a non-exposed dom, then pasted where the use element is, much like cloned template
elements in html5.
... for security reasons, browsers may apply the same-origin policy on use
elements and may refuse to load a cross-origin url in the href attribute.
... there is currently no defined way to set a cross-origin policy for use
elements.
...And 2 more matches
addon-page - Archive of obsolete content
create a page that does not contain navigational
elements.
... for pages like this, navigational
elements such as the awesome bar, search bar, or bookmarks toolbar are not usually relevant and distract from the content you are presenting.
... the addon-page module provides a simple way to have a page which excludes these
elements.
...after this, the page loaded from "data/index.html" will not contain navigational
elements: var addontab = require("sdk/addon-page"); var data = require("sdk/self").data; require("sdk/tabs").open(data.url("index.html")); this only affects the page at "data/index.html": all other pages are displayed normally.
util/array - Archive of obsolete content
hasany(array,
elements) returns true if the given array contains any of the
elements in the
elements array, or false otherwise.
... let { hasany } = require('sdk/util/array'); let a = ['rock', 'roll', 100]; hasany(a, ['rock', 'bright', 'light']); // true hasany(a, ['rush', 'coil', 'jet']); // false parameters array : array the array to search for
elements.
...
elements : array an array of
elements to search for in array.
... returns boolean : a boolean indicating whether or not any of the
elements were found in the array.
util/list - Archive of obsolete content
globals constructors list(element1, element2, ...) constructor can takes any number of
elements and creates an instance of list populated with the specified
elements.
... removelistitem(list, item) function removes an item from a list list an ordered collection (also known as a sequence) disallowing duplicate
elements.
... list is composed out of iterable, therefore it provides custom enumeration behavior that is similar to array (enumerates only on the
elements of the list).
... array.slice(arguments).foreach(this._remove.bind(this)); } }); mylist('foo', 'bar', 'baz').length == 3; // true new mylist('new', 'keyword').length == 2; // true mylist.apply(null, [1, 2, 3]).length == 3; // true let list = mylist(); list.length == 0; // true list.add(1, 2, 3) == 3; // true properties length number of
elements in this list.
Creating annotations - Archive of obsolete content
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.
...the idea here is to make it more likely that the annotator will be able to identify annotated
elements correctly later on.
...you should see the highlight appearing when you move the mouse over certain
elements: click on the highlight and you should see something like this in the console output: info: show info: http://blog.mozilla.com/addons/2011/02/04/overview-amo-review-process/, post-2249,when you submit a new add-on, you will have to choose between 2 review tracks: full review and preliminary review.
... annotation editor panel so far we have a page-mod that can highlight
elements and send information about them to the main add-on code.
Extension Etiquette - Archive of obsolete content
other ui
elements in general, toolbar items are very useful to end users because they can be removed or added to various toolbars as necessary.
...likewise, use context menu items sparingly — only for tasks that are done frequently or on specific
elements of a web page.
... ids and class names in html and xul documents, when extensions add
elements to web pages or browser windows.
...class names for html
elements created by the cool beans extension, for instance, might all be prefixed with cool-beans-.
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
toolbar buttons there are several types of buttons and
elements you can add to a toolbar depending on your needs.
...if you shrink the firefox window, you'll notice that the content resizes until it reaches its minimum size and begin to be cropped (cut), making ui
elements disappear.
...adding
elements to your toolbar that are not toolbarbutton or toolbaritem will cause it to fail.
...all of this is very important to test because, when the dialog is opened, firefox changes the dom of the toolbar, adding wrapper
elements that allow the customization.
Handling Preferences - Archive of obsolete content
the prefwindow allows you to use the preferences and preference
elements, which facilitate preference handling.
... <preferences> <preference id="xulschoolhello-message-count-pref" name="extensions.xulschoolhello.message.count" type="int" /> <!-- more preference
elements.
... --> </preferences> after you define the preferences you need, you associate them with the form
elements in your window or pane using the preference attribute: <textbox preference="xulschoolhello-message-count-pref" type="number" min="0" max="100" /> in this case we use a numeric field to set the message count preference.
...you should also look at the class values set to
elements in the xul file, so that your preferences window is just like the one in firefox and your extension is better integrated into the application and the native os look and feel.
Drag and Drop Example - Archive of obsolete content
dragging
elements around here, we'll create a simple board where items from a palette can be dragged onto the board.
... the user can click on one of several xul
elements on the palette and drag it onto a stack element to create an element of a particular type.
...a maximum size is also specified so that it doesn't resize when new
elements are dragged onto it.
...the position of
elements in a stack is determined by the left and top attributes.
Creating a Help Content Pack - Archive of obsolete content
if you understand the basics of html or (preferably) xml, you'll understand the very basics of the syntax -
elements, attributes, and element contents.
...this attribute marks the start point in the rdf graph described by the file, and the help viewer searches for this element in order to query for further information (stored in child
elements) about the content pack being parsed.
...search automatically goes through all of the
elements in the table of contents, index, and glossary, but you might wish to have search go through more sources of data.
...it's exactly the same as any javascript command, you you can insert it in command
elements, oncommand attributes, and other such places.
Mozilla Application Framework in Detail - Archive of obsolete content
themes are simply collections of images and css which can augment or replace your current ui
elements.
...xbl (extensible binding language) allows you to expand your library of interface
elements, and even construct your own xml language for defining your ui.
...you could easily create xml
elements such as <chessboard> or <chesspiece> and via xbl map these to images and application logic.
...rdf, a core element to the framework, allows you to define dynamic
elements in your ui (
elements that may change after you have completed the application, such as a "history" menu item).
XBL - Archive of obsolete content
xml binding language (xbl, sometimes also called extensible bindings language) is a language for describing bindings that can be attached to
elements in other documents.
...for example, names of the
elements are different.
... also sxbl lacks some features of xbl, such as bindings inheritance and defining methods/properties on bound
elements.
... custom xul
elements with xbl from the xul school tutorial for add-on developers xbl chapter of "rapid application development with mozilla" xbl 2.0 primer (draft) xbl 2.0 cross-browser implementation in javascript more xbl resources...
A XUL Bestiary - Archive of obsolete content
when you create styles in <style> tags, as style attributes for individual
elements, or in custom css files, you break the ability of gecko to skin the application to which your xul belongs.
...these widgets can be created and placed within a xul file as simple
elements: <menu>, <toolbar>, and so on.
... the syntax for these
elements is based for the most part on xml.
... the differences here are significant: xul is the universe of
elements, attributes, syntax, rules, and relationships, while xptoolkit is really the finite set of interface-specific
elements created in xul.
Flexgroup - Archive of obsolete content
"flexgroup" is used to group flexible
elements together and should be set to an integer.
...
elements 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.
allowevents - Archive of obsolete content
on listitem and titlebar
elements, mouse events normally do not get sent to their children; instead they are retargeted to the listitem and titlebar element itself.
... this means that
elements placed inside a listitem do not respond to events, and instead clicking the mouse simply selects that item within the list.
... by setting the allowevents attribute to true, this special behavior is disabled, and the events are targeted the same as other
elements.
... for menu, menuseparator, menuitem and treecol
elements, as well as menu buttons, and the popup datepicker, mouse events are also retargeted to the element itself.
flex - Archive of obsolete content
flexible
elements grow and shrink to fit their given space.
...
elements with larger flex values will be made larger than
elements with lower flex values, at the ratio determined by the two
elements.
... the actual value is not relevant unless there are other flexible
elements within the same container.
... once the default sizes of
elements in a box are calculated, the remaining space in the box is divided among the flexible
elements, according to their flex ratios.
pack - Archive of obsolete content
« xul reference home pack type: one of the values below the pack attribute specifies where child
elements of the box are placed when the box is larger that the size of the children.
... start child
elements are placed starting from the left or top edge of the box.
... center extra space is split equally along each side of the child
elements, resulting the children being placed in the center of the box.
... end child
elements are placed on the right or bottom edge of the box.
XUL Events - Archive of obsolete content
« xul reference home the following tables and sections describe the event handler that are valid for most xul
elements.
...this event will only be sent to
elements connected to a preference and in a prefwindow.
...this event will only be sent to
elements connected to a preference and in a prefwindow.
...this applies to boxes and other layout
elements with a css overflow property other than 'visible'.
Namespaces - Archive of obsolete content
duplicates element and attribute names can occur when an xml document contains
elements and attributes from two or more different xml schemas (or dtds).
...even if they did accidentally choose it, they may not define the same
elements as xul anyway (e.g., <textbox/>) in their schema/dtd.
...every xml element has a "default namespace", and this is used with xul
elements all the time.
...this signifies to the xml parser that http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul is the default namespace for the element and its descendant
elements (unless further overridden by a default namespace on a descendant element), and that any element without a namespace (i.e., no prefix and colon) belongs to the default namespace.
Popup Guide - Archive of obsolete content
popup types xul provides a number of different types of
elements which may be used to create popup menus or other types of popup widgets, which vary based on the manner in which they are attached to an element and the manner in which they are opened.
...a menu should only contain menu related
elements.
... how popups are placed to read about how the position of a popup on screen is determined, and how to align popups to other
elements, see positioning popups.
... features of items on a menu to learn about the various features of items on a menu, see features of the menuitem element modifying the items on a menu to append, insert and remove
elements from a menu, see modifying a menu.
Filtering - Archive of obsolete content
this example only adds one triple, but you could add others, or add <member>
elements.
...the resulting rdf triples for the first country will be: http://www.daml.org/2001/09/countries/iso#it -> http://www.w3.org/1999/02/22-rdf-syntax-ns#type -> http://www.daml.org/2001/09/countries/country-ont#country http://www.daml.org/2001/09/countries/iso#it -> http://purl.org/dc/
elements/1.1/title -> italy the type is just like any other triple in the datasource, so we don't need any special syntax to navigate over it.
... <query> <content uri="?start"/> <triple subject="?country" predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" object="?start"/> <triple subject="?country" predicate="http://purl.org/dc/
elements/1.1/title" object="?countrytitle"/> </query> the action body will need to generate a <menuitem> for each result.
...the
elements above are not.
Multiple Rules - Archive of obsolete content
this involves using additional rule
elements after the first.
...a multiple rule template looks like the following: <hbox id="photoslist" datasources="template-guide-photos3.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/
elements/1.1/title" object="?title"/> </query> <rule> <where subject="?title" rel="equals" value="canal"/> <action> <button uri="?photo" image="?photo" label="view" orient="vertical"/> </action> </rule> <rule> <action> <image uri="?photo" src="?photo"/> </action> </rule> </template> </hbox> this template contains a query w...
... where
elements we saw in the example above how to compare a value exactly to a specific value.
...we can add multiple where
elements if we want to check additional conditions.
Accesskey display rules - Archive of obsolete content
xul
elements display their accesskeys in their label automatically if it's necessary.
...xul
elements don't display any accesskeys on mac xul
elements don't display any accesskeys on mac.
... if a label doesn't have the character, xul
elements append the accesskey character with parentheses.
...xul
elements check "intl.menuitems.alwaysappendaccesskeys" pref value whether they should append accesskey text always.
Adding Buttons - Archive of obsolete content
like html, xul has a number of tags that can be used to create user interface
elements.
...you'll see this attribute on all
elements.
...however, you should add this attribute to almost all
elements.
... it isn't always placed on
elements in this tutorial for simplicity.
Content Panels - Archive of obsolete content
second, the
elements such the back and next buttons are the same throughout the interface.
...a box has been created containing two
elements: a toolbox and an iframe.
...the tabbrowser element is actually implemened as a tabbox containing a set of browser
elements.
...the third type is used when your window contains multiple browser
elements, for example if you have a sidebar displaying some extra content.
Features of a Window - Archive of obsolete content
for example: var mywin = window.open("chrome://findfile/content/findfile.xul", "findfile", "chrome"); specifying the width and height you should have noticed that whenever
elements were added to a window, the window's width expanded to fit the new
elements.
...if you leave it out, the size is determined by the
elements that are in it.
...even if there aren't enough
elements to fit this size, the window will still open at this size and there will be blank space in the remaining area.
... if there are too many
elements, the window will not be large enough to fit the
elements.
More Button Features - Archive of obsolete content
in general, it can be used on all xul
elements.
...you probably wouldn't use this very often, but you might use it when creating custom
elements.
...html
elements will be ignored, so you need to wrap them inside a description element.
...next, we will learn more details about how xul
elements are positioned in a window.
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.
...date and time entry fields the datepicker and timepicker
elements may be used to allow the user to enter dates and times.
...these two
elements ensure that the user enters a value date or time.
Popup Menus - Archive of obsolete content
the menupopup element surrounds the three menuitem
elements.
...this way, you can have a number of popups and associate them with different
elements.
...you could also associate the same popup with multiple
elements, which is one advantage of using this popup syntax.
... popups can only be associated with xul
elements; they cannot be associated with html
elements.
Simple Menu Bars - Archive of obsolete content
the menu features of xul consist of a number of different
elements which allow you to create menu bars or popup menus.
...xul does have some special
elements which provide special functionality typical of menus.
... there are five
elements associated with creating a menu bar and its menus, which are explained briefly here and in detail afterwards: menubar the container for the row of menus.
...although you can create custom menus, any special style rules or non-menu
elements that you place on a menu may not be applied.
Toolbars - Archive of obsolete content
adding a toolbar like a number of
elements, xul toolbars are a type of box.
...inside it are placed the individual toolbar items, usually buttons, but they can be other
elements.
...multiple toolbars can be created just as easily by adding more toolbar
elements after the first one.
...you do not have to put toolbar
elements inside a toolbox.
XUL Changes for Firefox 1.5 - Archive of obsolete content
<richlistbox> and <richlistitem> the <richlistbox> and <richlistitem>
elements are used for creating lists containing arbitrary content.
... preferences system several
elements have been added which may be used for creating preference windows.
...along with the new preference
elements and some additional attributes for existing
elements, they make it easy to set preferences without having to use code.
... tabindex the tabindex property is now applied to most
elements.
XUL Reference - Archive of obsolete content
« xul reference « alphabetical list of all xul
elements action arrowscrollbox assign bbox binding bindings box broadcaster broadcasterset button browser checkbox caption clicktoscroll colorpicker column columns commandset command conditions content datepicker deck description dialog dialogheader dropmarker editor grid grippy groupbox hbox iframe image key keyset label listbox listcell listcol listcols listhead listheader listitem member menu menubar menuitem menulist menupopup menuseparator notification notificationbox observes overlay page panel param popupset preference preferences prefpane prefwindow progressmeter query queryset radio radiogroup resizer richlistbox richlistitem row rows rule scale script ...
...tbox 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 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 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) time...
...rollbox 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 ...
arrowscrollbox - Archive of obsolete content
disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...
elements with a higher tabindex are later in the tab sequence.
... inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
column - Archive of obsolete content
the column with the most child
elements determines the number of rows 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.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements grid, columns, rows, row ...
columns - Archive of obsolete content
child column
elements define the individual columns to appear in the grid.
...other
elements placed inside a columns element occupy the full height of the grid and are placed in their corresponding positions between the columns.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements grid, column, rows, row.
command - Archive of obsolete content
like a broadcaster, commands forward attributes to other
elements.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
commandset - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is not displayed and serves as a container for command
elements.
...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.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
content - Archive of obsolete content
for example, by using a value of treechildren, the condition will only match when placing
elements directly inside a treechildren tag.
... thus, nested
elements will not match because they are directly inside a treeitem.
... this attribute is useful to provide different rules for outer and inner
elements.
... métodos inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
datepicker - Archive of obsolete content
disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...
elements with a higher tabindex are later in the tab sequence.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
keyset - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container element for key
elements.
...disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
listheader - Archive of obsolete content
disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements listbox, listcell, listcol, listcols, listhead, listitem ...
menubar - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container that usually contains menu
elements.
... on the macintosh, the menubar is displayed along the top of the screen, and all non-menu related
elements inside the menubar will be ignored.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements menu, menuitem, menulist, menupopup, menuseparator interfaces nsiaccessibleprovider ...
popupset - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container for menupopup, panel and tooltip
elements.
... this element is optional; the given
elements need not appear in a popupset container.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements popup, menupopup ...
rule - Archive of obsolete content
a rule may contain where, binding and/or action
elements.
... true: the rule will only match nodes that contain no child
elements.
... false: the rule will only match nodes that contain one or more child
elements.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
splitter - Archive of obsolete content
when the splitter is dragged, the sibling
elements of the splitter are resized.
... grow the
elements to the right or below the splitter do not change size (unless they are flexible) when the splitter is dragged, but instead the entire container changes size.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
... tree-splitter this splitter is intended to be used in tree columns (in-between treecol
elements).
timepicker - Archive of obsolete content
disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
...
elements with a higher tabindex are later in the tab sequence.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
toolbox - Archive of obsolete content
the external toolbars associated with a toolbox are listed in the array of
elements provided by the toolbox's externaltoolbars property.
... externaltoolbars type: array of
elements an array of external toolbars; that is, toolbar
elements that should be considered to be members of this toolbox, even if they are not actually children of the toolbox.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), ...
... related
elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring interfaces nsiaccessibleprovider ...
-ms-content-zoom-limit-max - Archive of obsolete content
the -ms-content-zoom-limit-max css property is a microsoft extension that specifies the selected
elements' maximum zoom factor.
... initial value400%applies tonon-replaced block-level
elements and non-replaced inline-block
elementsinheritednopercentagesthe largest allowed zoom factor.
...this property has no effect on non-zoomable
elements.
... see -ms-content-zooming for details on zoomable
elements.
Writing JavaScript for XHTML - Archive of obsolete content
problem: names in xhtml and html are represented in different cases scripts that used get
elementsbytagname() with an upper case html name no longer work, and attributes like nodename or tagname return upper case in html and lower case in xhtml.
... solution: use or convert to lower case for methods like get
elementsbytagname(), passing the name in lower case will work in both html and xhtml.
...use dom methods to create all of your
elements, attributes and other nodes.
...s here is the accept field, that firefox 2.0.0.9 sends with its requests: accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 further reading you will find several useful articles in the developer wiki: xml in mozilla dom xml introduction xml extras dom 2 methods you will need are: dom:document.createelementns dom:document.get
elementsbytagnamens see also properly using css and javascript in xhtml documents ...
Implementation Status - Archive of obsolete content
4.6.7 sequence: value change with focus change supported 4.6.8 sequence: activating a trigger supported 4.6.9 sequence: submission supported 4.7 resolving id references in xforms unsupported 4.7.1 references to
elements within a repeat element unsupported 4.7.2 references to
elements within a bind element unsupported 4.8 dom interface for access to instance data supported 4.8.1 getinstancedocument() supported 4.8.2 rebuild() supporte...
... 9.3.3 repeat processing partial we currently obey the 1.0 rules for repeat 9.3.4 user interface interaction partial we currently obey the 1.0 rules for repeat, no support for @number 302026; 9.3.5 creating repeating structures via attributes partial does not work for html:tr, html:td, or xf:group
elements 340515; 350617; 9.3.6 itemset supported performance problem with large itemsets 372197; 9.3.7 copy supported 10.
...xforms submission model section title status notes bugs 11.1 submission partial from 1.1 we do not yet support @mode, @indent, @replace='text', @separator, @serialize, @target, header or method child
elements 11.2 xforms-submit partial we currently limit (for security reasons) submission only back to the server that served the document.
...xforms and styling section title status notes bugs g.1 pseudo-classes partial :read-only and :read-write are suported using :-moz-read-only and :-moz-read-write 313111; g.2 pseudo-
elements unsupported we support ::value, ::repeat-index, and ::repeat-item through the attributes xf-value, xf-repeat-index, and xf-repeat-item.
XForms Repeat Element - Archive of obsolete content
actions you can use xforms action module
elements to modify the nodeset that the repeat element is bound to.
... the most useful actions for altering the contents of a repeat are the insert (see the spec), delete (see the spec) and setindex (see the spec)
elements.
...since html:table doesn't (and probably never will) allow xforms:repeat
elements as children, another syntax is needed.
...here comes the output: <br/> <xf:output ref="@id"><xf:label>output: </xf:label></xf:output> <div xf:repeat-nodeset="nest"><xf:output ref="."><xf:label>nested output: </xf:label></xf:output></div> </div> repeat in anonymous content (usage in xbl) you can use repeat
elements inside anonymous content to create powerful new widgets.
Script-supporting element - MDN Web Docs Glossary: Definitions of Web-related terms
in an html document, script-supporting
elements are those
elements that don't directly contribute to the appearance or layout of the page; instead, they're either scripts or contain information that's only used by scripts.
... these
elements may be important, but do not affect the displayed page unless the page's scripts explicitly cause them to do so.
... there are only two script-supporting
elements: <script> and <template>.
... technical reference to learn more, see script-supporting
elements in kinds of html content.
Accessible multimedia - Learn web development
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).
...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.
...on() { if(player.paused) { player.play(); playpausebtn.textcontent = 'pause'; } else { player.pause(); playpausebtn.textcontent = 'play'; } }; next, add this code to the bottom, which controls the stop button: stopbtn.onclick = function() { player.pause(); player.currenttime = 0; playpausebtn.textcontent = 'play'; }; there is no stop() function available on htmlmedia
elements, so instead we pause() it, and at the same time set the currenttime to 0.
...<track> should be placed within <audio> or <video>, but after all <source>
elements.
Advanced styling effects - Learn web development
blend modes css blend modes allow us to add blend modes to
elements that specify a blending effect when two
elements overlap — the final color shown for each pixel will be the result of a combination of the original pixel color, and that of the pixel in the layer underneath it.
... mix-blend-mode, which blends together the element it is set on with
elements it is overlapping — both background and content.
...here we'll present the same two <div>s, but each one is now sat on top of a simple <div> with a purple background, to show how the
elements will blend together: <article> no mix blend mode <div> </div> <div> </div> </article> <article> multiply mix <div class="multiply-mix"> </div> <div> </div> </article> here's the css we'll style this with: article { width: 280px; height: 180px; margin: 10px; position: relative; display: inline-block; } div { width: 250px; height: 130px; padding: 10px; m...
...the actual file is rectangular, but by floating the image (shapes only apply to floated
elements) and using the shape-outside property with a value of circle(50%), we can give the effect of the text following the line of the balloon.
Debugging CSS - Learn web development
for inspecting the properties and values applied to
elements on your page, and making changes to them from the editor.
... understanding the box model in previous lessons we have discussed the box model, and the fact that we have an alternate box model that changes how the size of
elements are calculated based on the size you give them, plus the padding and borders.
...remove components or even main
elements of the layout.
... previous overview: building blocks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-
elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form
elements styling tables debugging css organizing your css ...
Grids - Learn web development
a grid is a collection of horizontal and vertical lines creating a pattern against which we can line up our design
elements.
... they help us to create designs where
elements don’t jump around or change width as we move from page to page, providing greater consistency on our websites.
... we will instead place all of the
elements for our site on the grid, using the grid lines.
... positioning with grid-template-areas an alternative way to place items on your grid is to use the grid-template-areas property and giving the various
elements of your design a name.
HTML forms in legacy browsers - Learn web development
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.
...while resolved in all modern browsers, it is still recommended to always set the type attribute on <button>
elements.
...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.
Add a hitmap on top of an image - Learn web development
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.
...<map> only needs one attribute, the same map name as you used in your usemap attribute above: <map name="example-map-1"> </map> inside the <map> element, we need <area>
elements.
...to keep keyboard navigation intuitive, make sure the source order of <area>
elements corresponds to the visual order of hotspots.
... <area>
elements are empty
elements, but do require four attributes: shape coords shape takes one of four values: circle, rect, poly, and default.
Marking up a letter - Learn web development
block/structural semantics use appropriate document structure including doctype, and <html>, <head> and <body>
elements.
... put the two addresses inside <address>
elements.
... the four dates in the document should be have appropriate
elements containing machine-readable dates.
... mark up the university motto quote and citation with appropriate
elements.
Introduction to HTML - Learn web development
at its heart, html is a fairly simple language made up of
elements, which can be applied to pieces of text to give them different meaning in a document (is it a paragraph?
... getting started with html covers the absolute basics of html, to get you started — we define
elements, attributes, and other important terms, and show where they fit in the language.
... 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.
A first splash into JavaScript - Learn web development
in this case, we are using constants to store references to parts of our user interface; the text inside some of them might change, but the html
elements referenced stay the same.
... enables the form
elements, and empties and focuses the text field, ready for a new guess to be entered.
...one method available to input
elements is focus(), so we can now use this line to focus the text input: guessfield.focus(); variables that don't contain references to form
elements won't have focus() available to them.
...this allows us to dynamically set new css styles on
elements using javascript.
Introduction to client-side frameworks - Learn web development
the verbosity of dom changes building html
elements and rendering them in the browser at the appropriate time takes a surprising amount of code.
... working directly with the dom, as in this example, requires understanding many things about how the dom works: how to make
elements; how to change their properties; how to put
elements inside of each other; how to get them on the page.
... the vanilla javascript approach to building out new dom
elements in repetition was difficult to understand at a glance.
...that might be a useful idea for something as simple as our to-do list application, but it's not maintainable for large applications that manage thousands of records of data, and could render just as many unique
elements in a user interface.
Getting started with React - Learn web development
the jsx approach allows us to nest our
elements within each other, just like we do with html: const header = ( <header> <h1>mozilla developer network</h1> </header> ); note: the parentheses in the previous snippet aren't unique to jsx, and don’t have any effect on your application.
... it's possible to add react to a website without create-react-app by copying some <script>
elements into an html file, but the create-react-app cli is a common starting point for react applications.
... some
elements in the expression have attributes, which are written just like in html, following a pattern of attribute="value".
... note: in jsx, react components and html
elements must have closing slashes.
Setting up your own test automation environment - Learn web development
you can select ui
elements in many ways in webdriver, including by id, class, element name, etc.
...ement = driver.findelement(by.id('myelementid')); one of the most useful 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.
...add the following to the bottom of the code, and try testing it again: let alert = driver.switchto().alert(); alert.gettext().then(function(text) { console.log('alert text is \'' + text + '\''); }); alert.accept(); next, let's try entering some text into one of the form
elements.
...for example if you load a new page, you'll want to wait for the page's dom to finish loading before you try to interact with any of its
elements, otherwise the test will likely fail.
Mozilla's Section 508 Compliance
(c) a well-defined on-screen indication of the current focus shall be provided that moves among interactive interface
elements as the input focus changes.
... (e) when bitmap images are used to identify controls, status indicators, or other programmatic
elements, the meaning assigned to those images shall be consistent throughout an application's performance.
... (k) software shall not use flashing or blinking text, objects, or other
elements having a flash or blink frequency greater than 2 hz and lower than 55 hz.
... (l) when electronic forms are used, the form shall allow people using assistive technology to access the information, field
elements, and functionality required for completion and submission of the form, including all directions and cues.
Chrome registration
chrome is the set of user interface
elements of the application window that are outside the window's content area.
... toolbars, menu bars, progress bars, and window title bars are all examples of
elements that are typically part of the chrome.
... contentaccessible chrome resources can no longer be referenced from within <img>, <script>, or other
elements contained in, or added to, content that was loaded from an untrusted source.
... this restriction applies to both
elements defined by the untrusted source and to
elements added by trusted extensions.
The Firefox codebase: CSS Guidelines
some examples to avoid: absolutely positioned
elements hardcoded values such as: vertical-align: -2px; .
... threedshadow: used as border on
elements.
... threedlightshadow: used as light border on
elements.
... the text color of
elements often contains valuable information from the theme colors, so currentcolor/inheritance is again a good idea for theme support.
MathML Torture Test
i> <mtext> </mtext> <mi>b</mi> <mtext>'s</mtext> </mrow> </mover> </mover> </mrow> <munder> <mo>&underbrace;</mo> <mrow> <mi>k</mi> <mo>+</mo> <mi>ℓ</mi> <mtext>
elements</mtext> </mrow> </munder> </munder> <mo stretchy="false">}</mo> </mrow> </math> </td> </tr> <tr> <td>23</td> <td><img src="https://udn.realityripple.com/samples/45/c73ac26e1d.png" width="213" height="108" alt="texbook, 18.42" /></td> <td> <math display="block"> <mrow> <mo>(</mo> <mtab...
... <mtext> </mtext> <mi>𞸜</mi> <mtext>'s</mtext> </mrow> </mover> </mover> </mrow> <munder> <mo>&underbrace;</mo> <mrow> <mi>𞸟</mi> <mo>+</mo> <mi>ℓ</mi> <mtext>
elements</mtext> </mrow> </munder> </munder> <mo stretchy="false">}</mo> </mrow> </math> </td> <td> <math dir="rtl" display="block"> <mrow> <mo stretchy="false">{</mo> <munder> <mrow> <mover> <mrow> <mpadded width="0em"><mphantom><mo>(</mo></mpha...
... <mtext> </mtext> <mi>𞸜</mi> <mtext>'s</mtext> </mrow> </mover> </mover> </mrow> <munder> <mo>&underbrace;</mo> <mrow> <mi>𞸟</mi> <mo>+</mo> <mi>ℓ</mi> <mtext>
elements</mtext> </mrow> </munder> </munder> <mo stretchy="false">}</mo> </mrow> </math> </td> <td> <math display="block"> <mrow> <mo stretchy="false">{</mo> <munder> <mrow> <mover> <mrow> <mpadded width="0em"><mphantom><mo>(</mo></mphantom></mpa...
...i> <mtext> </mtext> <mi>b</mi> <mtext>'s</mtext> </mrow> </mover> </mover> </mrow> <munder> <mo>&underbrace;</mo> <mrow> <mi>k</mi> <mo>+</mo> <mi>ℓ</mi> <mtext>
elements</mtext> </mrow> </munder> </munder> <mo stretchy="false">}</mo> </mrow> </math> </td></tr> <tr> <td>23</td> <td> <math dir="rtl" display="block"> <mrow> <mo>(</mo> <mtable> <mtr> <mtd columnalign="center"> <mrow> <mo>(</mo> ...
Mozilla MathML Status
an overview of the mathml 3
elements/attributes - excluding deprecated ones - and the current status of the native support.
... attributes shared by all mathml
elements see § 2.1.6 and § 3.1.10.
... token
elements element [- attribute] notes mi implemented.
... other
elements element [- attribute] notes mglyph not implemented.
Mozilla Web Services Security Model
all of these children
elements must be in the same namespace as the parent, and must be empty.
... the allow element if no delegate
elements are present or if the web service is in the same directory as the web-script-access.xml file, then the allow
elements will be processed.
... if the file exists but contains no allow
elements, then all access will be allowed.
... if allow
elements exist, then the access will be allowed if one of them allows it.
Profiling with the Firefox Profiler
elements in the timeline are spaced at the sampling frequency with an attempt to align them with time.
...also note that you can click on timeline
elements (the selected element gets darker when selected) and the tree view (see below) reflects the selected element.
...there are lighter grey names to the right of tree
elements that indicate where the code comes from.
... be aware that
elements can be from javascript, gecko, or system libraries.
JS::CompileOptions
(note that one may assign both strings and functions to dom
elements' event handler idl attributes.
... "eventhandler" - code assigned to dom
elements' event handler idl attributes as a string.
... "scriptelement" - code belonging to <script>
elements.
...an instance of this type makes a copy of / holds / roots all dynamically allocated resources (principals;
elements; strings) that it refers to.
nsIComponentRegistrar
elements of the enumeration can be queryinterfaced for the nsisupportsid interface.
...
elements of the enumerator implement nsisupportsid.
...
elements of the enumeration can be queryinterfaced for the nsisupportscstring interface.
...
elements of the enumerator implement nsisupportscstring.
nsILoginManager
void findlogins( out unsigned long count, in astring ahostname, in astring aactionurl, in astring ahttprealm, [retval, array, size_is(count)] out nsilogininfo logins ); parameters count the number of
elements in the returned array.
... void getalldisabledhosts( [optional] out unsigned long count, [retval, array, size_is(count)] out wstring hostnames ); parameters count the number of
elements in the returned array.
... void getalllogins( [optional] out unsigned long count, [retval, array, size_is(count)] out nsilogininfo logins ); parameters count the number of
elements in the returned array.
... void searchlogins( out unsigned long count, in nsipropertybag matchdata, [retval, array, size_is(count)] out nsilogininfo logins ); parameters count the number of
elements in the returned array.
nsIXULTemplateBuilder
the nsitemplatebuilder interface controls the display of
elements using a xul template element and is automatically attached to an element containing a datasources attribute.
...the <queryset> element contains a single query and one or more <rule>
elements.
...the template builder then generates output for each result based on the <rule>
elements.
...each query may be accompanied by one or more <rule>
elements.
Mozilla
chrome registration chrome is the set of user interface
elements of the application window that are outside the window's content area.
... toolbars, menu bars, progress bars, and window title bars are all examples of
elements that are typically part of the chrome.
... gecko's "almost standards" mode "almost standards" rendering mode is exactly the same as "standards" mode in all details save one, where it works like "quirks" mode: the height calculations for line boxes and some of the inline
elements in them.
...changes to a document originate in the content tree (from dom modification by scripting, insertion of
elements from the parser, etc.) and are propogated to the layout tree through magic that primarily resides in //github.com/realityripple/uxp/blob/master/layout/base/nscssframeconstructor.cpp getting started with chat note that on 2nd march 2020, mozilla moved away from irc to matrix for its public channels, the irc server...
Debugger.Source - Firefox Developer Tools
for example, an html document can contain javascript in multiple <script>
elements and event handler content attributes.
...(note that one may assign both strings and functions to dom
elements’ event handler idl attributes.
... "eventhandler", for code assigned to dom
elements’ event handler idl attributes as a string.
... "scriptelement", for code belonging to <script>
elements.
Animating CSS properties - Firefox Developer Tools
compared with animating
elements using javascript, css animations can be easier to create.
... layout: next, the browser uses the computed styles to figure out the position and geometry for the
elements.
... paint: finally, the browser needs to repaint the
elements to the screen.
... there are a number of
elements, and we've added a linear-gradient background and a box-shadow to each element, because they are both relatively expensive effects to paint.
AnalyserNode.getByteFrequencyData() - Web APIs
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.
... 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.
AnalyserNode.getByteTimeDomainData() - Web APIs
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.
... 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.
AnalyserNode.getFloatTimeDomainData() - Web APIs
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.
... 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.
Background Tasks API - Web APIs
this code draws any pending updates to the document currently being displayed, runs any javascript code the page needs to run, accepts events from input devices, and dispatches those events to the
elements that should receive them.
... let totaltaskcountelem = document.getelementbyid("totaltaskcount"); let currenttasknumberelem = document.getelementbyid("currenttasknumber"); let progressbarelem = document.getelementbyid("progress"); let startbuttonelem = document.getelementbyid("startbutton"); let logelem = document.getelementbyid("log"); next we have variables which reference the dom
elements we need to interact with.
... these
elements are: totaltaskcountelem is the <span> we use to insert the total number of tasks created into the status display in the progress box.
...this element is a pseudo-dom into which we can insert
elements without immediately changing the main dom itself.
CustomElementRegistry.whenDefined() - Web APIs
syntax promise<> custom
elements.whendefined(name); parameters name custom element name.
... examples this example uses whendefined() to detect when the custom
elements that make up a menu are defined.
...const undefined
elements = container.queryselectorall(':not(:defined)'); const promises = [...undefined
elements].map( button => custom
elements.whendefined(button.localname) ); // wait for all the children to be upgraded, // then remove the placeholder.
... await promise.all(promises); container.removechild(placeholder); specifications specification status comment html living standardthe definition of 'custom
elements.whendefined()' in that specification.
Document.createElement() - Web APIs
options optional an optional elementcreationoptions object, containing a single property named is, whose value is the tag name of a custom element previously defined via custom
elements.define().
... html <!doctype html> <html> <head> <title>||working with
elements||</title> </head> <body> <div id="div1">the text above has been created dynamically.</div> </body> </html> javascript document.body.onload = addelement; function addelement () { // create a new div element const newdiv = document.createelement("div"); // and give it some content const newcontent = document.createtextnode("hi there and greetings!"); // add the text node to the newly created div newdiv.appendchild(newcontent); // add the newly created element and its content into the dom const currentdiv = document.getelementb...
... } } // define the new element custom
elements.define('expanding-list', expandinglist, { extends: "ul" }); if we wanted to create an instance of this element programmatically, we'd use a call along the following lines: let expandinglist = document.createelement('ul', { is : 'expanding-list' }) the new element will be given an is attribute whose value is the custom element's tag name.
... note: for backwards compatibility with previous versions of the custom
elements specification, some browsers will allow you to pass a string here instead of an object, where the string's value is the custom element's tag name.
Document.forms - Web APIs
the forms read-only property of the document interface returns an htmlcollection listing all the <form>
elements contained in the document.
... note: similarly, you can access a list of a form's component user input
elements using the htmlformelement.
elements property.
..." value="robby's form" /> </form> <form id="dave"> <input type="button" onclick="alert(document.forms[1].id);" value="dave's form" /> </form> <form id="paul"> <input type="button" onclick="alert(document.forms[2].id);" value="paul's form" /> </form> </body> </html> getting an element from within a form var selectform = document.forms[index]; var selectformelement = document.forms[index].
elements[index]; named form access <!doctype html> <html lang="en"> <head> <title>document.forms example</title> </head> <body> <form name="login"> <input name="email" type="email"> <input name="password" type="password"> <button type="submit">log in</button> </form> <script> var loginform = document.forms.login; // or document.forms['login'] loginform.
elements.email.placeholder = 'test@...
...example.com'; loginform.
elements.password.placeholder = 'password'; </script> </body> </html> specifications specification status comment html living standardthe definition of 'document.forms' in that specification.
Document.querySelectorAll() - Web APIs
the document method queryselectorall() returns a static (not live) nodelist representing a list of the document's
elements that match the specified group of selectors.
...see locating dom
elements using selectors for more information about using selectors to identify
elements.
... examples obtaining a list of matches to obtain a nodelist of all of the <p>
elements in the document: var matches = document.queryselectorall("p"); this example returns a list of all <div>
elements within the document with a class of either note or alert: var matches = document.queryselectorall("div.note, div.alert"); here, we get a list of <p>
elements whose immediate parent element is a <div> with the class highlighted and which are located inside a container whose id is t...
... var container = document.queryselector("#test"); var matches = container.queryselectorall("div.highlighted > p"); this example uses an attribute selector to return a list of the <iframe>
elements in the document that contain an attribute named data-src: var matches = document.queryselectorall("iframe[data-src]"); here, an attribute selector is used to return a list of the list items contained within a list whose id is userlist which have a data-active attribute whose value is 1: var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active='1']"); accessing the matches once the nodelist of matching
elements is returned, you can examine it just like any array.
Element.attachShadow() - Web APIs
elements you can attach a shadow to note that you can't attach a shadow root to every type of element.
...the following is a list of
elements you can attach a shadow root to: any autonomous custom element with a valid name <article> <aside> <blockquote> <body> <div> <footer> <h1> <h2> <h3> <h4> <h5> <h6> <header> <main> <nav> <p> <section> <span> syntax var shadowroot = element.attachshadow(shadowrootinit); parameters shadowrootinit a shadowrootinit dictionary, which can contain the following fields: mode a string specifying the encapsulation mode for the shadow dom tree.
... this can be one of: open:
elements of the shadow root are accessible from javascript outside the root, for example using element.shadowroot: element.shadowroot; // returns a shadowroot obj closed: denies access to the node(s) of a closed shadow root from javascript outside it: element.shadowroot; // returns null delegatesfocus a boolean that, when set to true, specifies behavior that mitigates custom element issues around focusability.
...create text node and add word count to it var text = document.createelement('span'); text.textcontent = count; // append it to the shadow root shadow.appendchild(text); // update count when element content changes setinterval(function() { var count = 'words: ' + countwords(wcparent); text.textcontent = count; }, 200) } } // define the new element custom
elements.define('word-count', wordcount, { extends: 'p' }); specifications specification status comment domthe definition of 'attachshadow()' in that specification.
Element.classList - Web APIs
lyfillclasslist(this); return this.classlist; }, configurable: 0, set: function(val){this.classname = val} }); } catch(e) { // less performant fallback for older browsers (ie 6-8): window[" ucl"] = polyfillclasslist; // the below code ensures polyfillclasslist is applied to all current and future
elements in the doc.
...it's currently unable to polyfill out-of-document-
elements (e.g.
...
elements created by document.createelement before they are appended to a parent node) in ie6-7.
... a minor note is that in ie6-7, this polyfill uses the window[" ucl"] property on the window object for communicating with the css expressions, the x-uclp css property on all
elements, and the element[" ucl"] property on all
elements to allow garbage collection and boost performance.
Element.querySelector() - Web APIs
syntax element = baseelement.queryselector(selectors); parameters selectors a group of selectors to match the descendant
elements of the element baseelement against; this must be valid css syntax, or a syntaxerror exception will occur.
...the entire hierarchy of
elements is considered when matching, including those outside the set of
elements including baseelement and its descendants; in other words, selectors is first applied to the whole document, not the baseelement, to generate an initial list of potential
elements.
... the resulting
elements are then examined to see if they are descendants of baseelement.
... the first match of those remaining
elements is returned by the queryselector() method.
Element.querySelectorAll() - Web APIs
the element method queryselectorall() returns a static (not live) nodelist representing a list of
elements matching the specified group of selectors which are descendants of the element on which the method was called.
...see locating dom
elements using selectors for more information about using selectors to identify
elements.
... const refs = [...document.queryselectorall(`[class*="funnel-chart-percent"]`)]; // const refs = [...document.queryselectorall(`[class^="funnel-chart-percent"]`)]; // const refs = [...document.queryselectorall(`[class$="funnel-chart-percent"]`)]; // const refs = [...document.queryselectorall(`[class~="funnel-chart-percent"]`)]; obtaining a list of matches to obtain a nodelist of all of the <p>
elements contained within the element "mybox": var matches = mybox.queryselectorall("p"); this example returns a list of all <div>
elements within "mybox" with a class of either "note" or "alert": var matches = mybox.queryselectorall("div.note, div.alert"); here, we get a list of the document's <p>
elements whose immediate parent element is a div with the class "highlighted" and which are located ins...
... var container = document.queryselector("#test"); var matches = container.queryselectorall("div.highlighted > p"); this example uses an attribute selector to return a list of the iframe
elements in the document that contain an attribute named "data-src": var matches = document.queryselectorall("iframe[data-src]"); here, an attribute selector is used to return a list of the list items contained within a list whose id is "userlist" which have a "data-active" attribute whose value is "1": var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active='1']"); accessing the matches once the nodelist of matching
elements is returned, you can examine it just like any array.
Event - Web APIs
many dom
elements can be set up to accept (or "listen" for) these events, and execute code in response to process (or "handle") them.
... event-handlers are usually connected (or "attached") to various html
elements (such as <button>, <div>, <span>, etc.) using eventtarget.addeventlistener(), and this generally replaces using the old html event handler attributes.
...(for example, a webpage with an advertising-module and statistics-module both monitoring video-watching.) when there are many nested
elements, each with its own handler(s), event processing can become very complicated—especially where a parent element receives the very same event as its child
elements because "spatially" they overlap so the event technically occurs in both, and the processing order of such events depends on the event bubbling and capture settings of each handler triggered.
...this includes listeners attached to the same element as well as those attached to
elements that will be traversed later (during the capture phase, for instance).
Using files from web applications - Web APIs
+) { soutput = napprox.tofixed(3) + " " + amultiples[nmultiple] + " (" + nbytes + " bytes)"; } // end of optional code document.getelementbyid("filenum").innerhtml = nfiles; document.getelementbyid("filesize").innerhtml = soutput; } document.getelementbyid("uploadinput").addeventlistener("change", updatesize, false); </script> </body> </html> using hidden file input
elements using the click() method you can hide the admittedly ugly file <input> element and present your own interface for opening the file picker and displaying which file or files the user has selected.
...(as of time of writing, firefox doesn’t show this visual cue for <input type="file">
elements.) selecting files using drag and drop you can also let the user drag and drop files into your web application.
...this is explained in the section using hidden file input
elements using the click() method, as is the method that invokes the file picker.
...this allows us to select all of the images the user has chosen for uploading using document.queryselectorall(), like this: function sendfiles() { const imgs = document.queryselectorall(".obj"); for (let i = 0; i < imgs.length; i++) { new fileupload(imgs[i], imgs[i].file); } } line 2 fetches a nodelist, called imgs, of all the
elements in the document with the css class obj.
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.
...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.
...check compatibility, or use the change event instead for
elements of these types.
HTMLElement.offsetHeight - Web APIs
it does not include the height of pseudo-
elements such as ::before or ::after.
...floated
elements extending below other linear content are ignored.
...however, non-scrollable
elements may have large offsetheight values, much larger than the visible content.
... these
elements are typically contained within scrollable
elements; consequently, these non-scrollable
elements may be completely or partly invisible, depending on the scrolltop setting of the scrollable container.
HTMLFormElement.length - Web APIs
you can access the list of the form's controls using the
elements property.
... this includes both
elements that are descendents of the <form> element as well as
elements that are made members of the form using their form property.
... the
elements included by htmlformelement.
elements and htmlformelement.length are the following: <button> <fieldset> <input> (with the exception that any whose type is "image" are omitted for historical reasons) <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.
...this is the same as the number of the
elements in the htmlformcontrolscollection returned by the
elements property.
HTMLMediaElement - Web APIs
the htmlvideoelement and htmlaudioelement
elements both inherit this interface.
... htmlmediaelement.mediagroup a domstring that reflects the mediagroup html attribute, which indicates the name of the group of
elements it belongs to.
... a group of media
elements shares a common mediacontroller.
...this is optimized so this element gets access to all of the other element's cached and buffered data; in fact, the two
elements share downloaded data, so data downloaded by either element is available to both.
HTMLOrForeignElement.tabIndex - Web APIs
tab order is as follows:
elements with a positive tabindex.
...
elements that have identical tabindex values should be navigated in the order they appear.
...
elements that do not support the tabindex attribute or support it and assign tabindex to 0, in the order they appear.
...
elements that are disabled do not participate in the tabbing order.
HTMLOutputElement - Web APIs
the htmloutputelement interface provides properties and methods (beyond those inherited from htmlelement) for manipulating the layout and presentation of <output>
elements.
... htmloutputelement.htmlforread only a domtokenlist reflecting the for html attribute, containing a list of ids of other
elements in the same document that contribute to (or otherwise affect) the calculated value.
... htmloutputelement.labelsread only a nodelist of <label>
elements associated with the element.
... htmloutputelement.value a domstring representing the value of the contents of the
elements.
Capabilities, constraints, and settings - Web APIs
let videoconstraints = null; let audioconstraints = null; let audiotrack = null; let videotrack = null; and we get references to all of the
elements we'll need to access.
...mentbyid("log"); let supportedconstraintlist = document.getelementbyid("supportedconstraints"); let videoconstrainteditor = document.getelementbyid("videoconstrainteditor"); let audioconstrainteditor = document.getelementbyid("audioconstrainteditor"); let videosettingstext = document.getelementbyid("videosettingstext"); let audiosettingstext = document.getelementbyid("audiosettingstext"); these
elements are: videoelement the <video> element that will show the stream.
... finally, we set the current contents of the two constraint set editor
elements to the defaults.
... simple tab support in the editor this code adds simple support for tabs to the <textarea>
elements by making the tab key insert two space characters when either constraint edit box is focused.
ParentNode.querySelectorAll() - Web APIs
the parentnode mixin defines the queryselectorall() method as returning a nodelist representing a list of
elements matching the specified group of selectors which are descendants of the object on which the method was called.
...see locating dom
elements using selectors for more information about using selectors to identify
elements.
... examples to obtain a nodelist of all of the <p>
elements in the document: var matches = document.queryselectorall("p"); this example returns a list of all <div>
elements within the document with a class of either note or alert: var matches = document.queryselectorall("div.note, div.alert"); here, we get a list of <p>
elements whose immediate parent element is a <div> with the class highlighted and which are located inside a container whose id is t...
... var container = document.queryselector("#test"); var matches = container.queryselectorall("div.highlighted > p"); this example uses an attribute selector to return a list of the <iframe>
elements in the document that contain an attribute named data-src: var matches = document.queryselectorall("iframe[data-src]"); here, an attribute selector is used to return a list of the list items contained within a list whose id is userlist which have a data-active attribute whose value is 1: var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active=1]"); user notes queryselectorall() behaves differently than most common javascript dom libraries, which might lead to unexpected results.
Using Pointer Events - Web APIs
function startup() { var el = document.get
elementsbytagname("canvas")[0]; el.addeventlistener("pointerdown", handlestart, false); el.addeventlistener("pointerup", handleend, false); el.addeventlistener("pointercancel", handlecancel, false); el.addeventlistener("pointermove", handlemove, false); log("initialized."); } this simply sets up all the event listeners for our <canvas> element so we can handle the touch events as they occur.
... function handlestart(evt) { log("pointerdown."); var el = document.get
elementsbytagname("canvas")[0]; var ctx = el.getcontext("2d"); log("pointerdown: id = " + evt.pointerid); ongoingtouches.push(copytouch(evt)); var color = colorfortouch(evt); ctx.beginpath(); ctx.arc(touches[i].pagex, touches[i].pagey, 4, 0, 2 * math.pi, false); // a circle at the start ctx.arc(evt.clientx, evt.clienty, 4, 0, 2 * math.pi, false); // a circle at the start ctx.fillstyle = color; ctx.fill(); } after storing some of the event's processing in the ongoing...
... function handlemove(evt) { var el = document.get
elementsbytagname("canvas")[0]; var ctx = el.getcontext("2d"); var color = colorfortouch(evt); var idx = ongoingtouchindexbyid(evt.pointerid); log("continuing touch: idx = " + idx); if (idx >= 0) { ctx.beginpath(); log("ctx.moveto(" + ongoingtouches[idx].pagex + ", " + ongoingtouches[idx].pagey + ");"); ctx.moveto(ongoingtouches[idx].pagex, ongoingtouches[idx].pagey); log("ctx.
... function handleend(evt) { log("pointerup"); var el = document.get
elementsbytagname("canvas")[0]; var ctx = el.getcontext("2d"); var color = colorfortouch(evt); var idx = ongoingtouchindexbyid(evt.pointerid); if (idx >= 0) { ctx.linewidth = 4; ctx.fillstyle = color; ctx.beginpath(); ctx.moveto(ongoingtouches[idx].pagex, ongoingtouches[idx].pagey); ctx.lineto(evt.clientx, evt.clienty); ctx.fillrect(evt.clientx - 4, evt.clienty - 4, 8, 8);...
Pointer events - Web APIs
typically, this is determined by considering the pointer's location and also the visual layout of
elements in a document on screen media.
...this property may be applied to all
elements except: non-replaced inline
elements, table rows, row groups, table columns, and column groups.
...</div> </body> </html> in the following example, default touch behavior is disabled for some button
elements.
...if the target area is too small, touching it could result in firing other events for adjacent
elements.
PublicKeyCredentialCreationOptions.pubKeyCredParams - Web APIs
the pubkeycredparams property of the publickeycredentialcreationoptions dictionary is an array whose
elements are objects describing the desired features of the credential to be created.
... if this array contains multiple
elements, they are sorted by descending order of preference.
... syntax pubkeycredparams = publickeycredentialcreationoptions.pubkeycredparams value an array whose
elements are objects with the following properties: type a string describing type of public-key credential to be created.
... though those
elements are sorted by preference (the first element being the most prefered), it is up to the client to choose among those
elements for building the credential.
SVGSVGElement - Web APIs
the svgsvgelement interface provides access to the properties of <svg>
elements, as well as methods to manipulate them.
...the behavior is undefined for <svg>
elements that are not at the outermost level.
... svgsvgelement.getintersectionlist() returns a nodelist of graphics
elements whose rendered content intersects the supplied rectangle.
... svgsvgelement.getenclosurelist() returns a nodelist of graphics
elements whose rendered content is entirely contained within the supplied rectangle.
Multi-touch interaction - Web APIs
define touch targets the application uses <div>
elements to represent four touch areas.
... function end_handler(ev) { ev.preventdefault(); if (logevents) log(ev.type, ev, false); if (ev.targettouches.length == 0) { // restore background and border to original values ev.target.style.background = "white"; ev.target.style.border = "1px solid black"; } } application ui the application uses <div>
elements for the touch areas and provides buttons to enable logging and clear the log.
...false : true; } function log(name, ev, printtargetids) { var o = document.get
elementsbytagname('output')[0]; var s = name + ": touches = " + ev.touches.length + " ; targettouches = " + ev.targettouches.length + " ; changedtouches = " + ev.changedtouches.length; o.innerhtml += s + " "; if (printtargetids) { s = ""; for (var i=0; i < ev.targettouches.length; i++) { s += "...
... id = " + ev.targettouches[i].identifier + " "; } o.innerhtml += s; } } function clearlog(event) { var o = document.get
elementsbytagname('output')[0]; o.innerhtml = ""; } related topics and resources pointer events ...
Example and tutorial: Simple synth keyboard - Web APIs
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 having them wrap around.
... let keyboard = document.queryselector(".keyboard"); let wavepicker = document.queryselector("select[name='waveform']"); let volumecontrol = document.queryselector("input[name='volume']"); references to
elements we'll need access to are obtained: keyboard is the container element into which the keys will be placed.
...it creates the
elements that comprise the key and its label, adds some data attributes to the element for later use, and assigns event handlers for the events we care about.
...lelement.innerhtml = note + "<sub>" + octave + "</sub>"; keyelement.appendchild(labelelement); keyelement.addeventlistener("mousedown", notepressed, false); keyelement.addeventlistener("mouseup", notereleased, false); keyelement.addeventlistener("mouseover", notepressed, false); keyelement.addeventlistener("mouseleave", notereleased, false); return keyelement; } after creating the
elements that will represent the key and its label, we configure the key's element by setting its class to "key" (which establishes its appearance).
Using the aria-describedby attribute - Accessibility
description the aria-describedby attribute is used to indicate the ids of the
elements that describe the object.
... the aria-describedby attribute is not used only for form
elements; it is also used to associate static text with widgets, groups of
elements, panes, regions that have a heading, definitions, and more.
... this attribute can be used with any typical html form element; it is not limited to
elements that have an aria role assigned.
... used by aria roles all
elements of the base markup related aria techniques using the aria-labelledby attribute compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for aria-describedby ...
ARIA: application role - Accessibility
description the application role indicates to assistive technologies that this part of the web content contains
elements that do not conform to any other known html element or wai-aria widget.
...such
elements usually include headings, form fields, lists, tables, links, graphics, or landmark regions.
...in a slides application, for example, a widget could be created that uses the arrow keys to position
elements on the slide, and uses audio feedback via an aria live region to communicate the position and overlap status with other objects.
... recommendation precedence order applying the application role will cause this and all of the descendant
elements of this element to be treated like application content, not web content.
ARIA: cell role - Accessibility
using native html <td>
elements, whenever possible, is strongly encouraged.
...it is a structural equivalent to the thead, tfoot, and tbody
elements in an html table element.
... examples <div role="table" aria-label="semantic
elements" aria-describedby="semantic_
elements_table_desc" aria-rowcount="81"> <div id="semantic_
elements_table_desc">semantic
elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none" aria-rowindex="1">aria role</span> <span role="columnheader" aria-sort="none" aria-rowindex="1">semantic element</span> </div>...
... <table role="table" aria-label="semantic
elements" aria-describedby="semantic_
elements_table_desc" aria-rowcount="81"> <caption id="semantic_
elements_table_desc">semantic
elements to use instead of aria's roles</caption> <thead role="rowgroup"> <tr role="row"> <th role="columnheader" aria-sort="none" aria-rowindex="1">aria role</th> <th role="columnheader" aria-sort="none" aria-rowindex="1">semantic element...
ARIA: gridcell role - Accessibility
<div role="gridcell">potato</div> <div role="gridcell">cabbage</div> <div role="gridcell">onion</div>
elements that have role="gridcell" applied to them must be the child of an element with a role of row.
...the ids provided for aria-describedby should correspond to parent
elements intended to be the rows and columns.
... by referencing the parent
elements with roles of rowheader or columnheader applied to them via aria-describedby, it allows assistive technology to understand the position and relationship of the gridcell element to the rest of the table-style grouping of content.
... interactive grids and treegrids editable cells both td
elements and
elements with a role of gridcell applied to them can be made editable, mimicking functionality similar to editing a spreadsheet.
ARIA: row role - Accessibility
using native html <tr>
elements, whenever possible, is strongly encouraged.
...it is a structural equivalent to the thead, tfoot, and tbody
elements in an html table element.
... examples <div role="table" aria-label="semantic
elements" aria-describedby="semantic_
elements_table_desc" aria-rowcount="81"> <div id="semantic_
elements_table_desc">semantic
elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none">aria role</span> <span role="columnheader" aria-sort="none">semantic element</span> </div> </div> <div role="rowgroup"> ...
... <table role="table" aria-label="semantic
elements" aria-describedby="semantic_
elements_table_desc" aria-rowcount="81"> <caption id="semantic_
elements_table_desc">semantic
elements to use instead of aria's roles</caption> <thead role="rowgroup"> <tr role="row"> <th role="columnheader" aria-sort="none">aria role</th> <th role="columnheader" aria-sort="none">semantic element</th> </tr> </thead> ...
ARIA: switch role - Accessibility
all
elements that are descendants of an element with the switch role applied to it are automatically assigned role presentation.
... this prevents
elements that are used to construct the switch from being interacted with individually by assistive technologies.
... text in these
elements remains visible to the user agent and may be read or otherwise delivered to the user, unless it's expressly hidden using display: none or aria-hidden="true".
...the switch has two child
elements containing the "off" and "on" labels and is followed by a <label> identifying the switch.
ARIA: table role - Accessibility
<div role="table" aria-label="semantic
elements" aria-describedby="semantic_
elements_table_desc" aria-rowcount="81"> <div id="semantic_
elements_table_desc">semantic
elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none">aria role</span> <span role="columnheader" aria-sort="none">semantic element</span> </div> </div> <div role="rowgroup"> <div role="row" aria-rowindex="11"> <span role="cell">header</span> <span role="cell">h1</span> </div> <div role="row" ar...
... all other semantic table
elements, such as <tbody>, <thead>, <tr>, <th>, and <td> need to be added via associated roles, such as rowgroup, row, columnheader, and cell.
...realize, it is much simpler to simply use the <table> element, along with all the related semantic
elements and attributes that are all supported by all assistive technologies.
... examples <div role="table" aria-label="semantic
elements" aria-describedby="semantic_
elements_table_desc" aria-rowcount="81"> <div id="semantic_
elements_table_desc">semantic
elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none">aria role</span> <span role="columnheader" aria-sort="none">semantic element</span> </div> </div> <div role="rowgroup"> ...
An overview of accessible web applications and widgets - Accessibility
since the html4 specification doesn't provide built-in tags that semantically describe these kinds of widgets, developers typically resort to using generic
elements such as <div> and <span>.
... aria-checked: indicates the state of a checkbox or radio button aria-disabled: indicates that an element is visible, but not editable or otherwise operable aria-grabbed: indicates the 'grabbed' state of an object in a drag-and-drop operation (for a full list of aria states, consult the aria list of states and properties.) developers should use aria states to indicate the state of ui widget
elements and use css attribute selectors to alter the visual appearance based on the state changes (rather than using script to change a class name on the element).
...a developer might be tempted to implement the "view" mode using a read-only text <input> element and setting its aria role to button, then switching to "edit" mode by making the element writable and removing the role attribute in "edit" mode (since <input>
elements have their own role semantics).
...once keyboard focus is inside the container, the arrow keys should allow the user to navigate between each tab (the <li>
elements).
Cognitive accessibility - Accessibility
cognitive impairments includes: delivering content in more than one way, such as by text-to-speech or by video; providing easily-understood content, such as text written using plain-language standards; focusing attention on important content; minimizing distractions, such as unnecessary content or advertisements; providing consistent web page layout and navigation; incorporating familiar
elements, such as underlined links that are blue when not visited and purple when visited; dividing processes into logical, essential steps with progress indicators; making website authentication as easy as possible without compromising security; and making forms easy to complete, such as with clear error messages and simple error recovery.
... focus order makes sense the order of focus for interactive
elements should make sense.
... focused
elements should be visibly focused when a user navigates using a keyboard, the ui should make it obvious which element currently has focus.
...include labels or instructions when users need to input information, using the <label>, <fieldset>, and <legend>
elements to do so.
-moz-image-region - CSS: Cascading Style Sheets
for certain xul
elements and pseudo-
elements that use an image from the list-style-image property, this property specifies a region of the image that is used in place of the whole image.
... this allows
elements to use different pieces of the same image to improve performance.
... formal definition initial valueautoapplies toxul <image>
elements and :-moz-tree-image, :-moz-tree-twisty, and :-moz-tree-checkbox pseudo-
elements.
... note: -moz-image-region only works with <image>
elements where the icon is specified using list-style-image.
::backdrop - CSS: Cascading Style Sheets
this includes both
elements which have been placed in full-screen mode using the fullscreen api and <dialog>
elements.
... when multiple
elements have been placed into full-screen mode, the backdrop is drawn immediately beneath the frontmost such element, and on top of the older full-screen
elements.
... /* backdrop is only displayed when dialog is opened with dialog.showmodal() */ dialog::backdrop { background: rgba(255,0,0,.25); } all full-screen
elements are placed in a last-in/first out (lifo) stack in the top layer, which is a special layer in the viewport which is always rendered last (and therefore on top) before drawing the viewport's contents to the screen.
... ::backdrop neither inherits from nor is inherited by any other
elements.
::slotted() - CSS: Cascading Style Sheets
note also that this selector won't select a text node placed into a slot; it only targets actual
elements.
...'='<attr-modifier> = i | s examples highlighting slotted
elements the following snippets are taken from our slotted-pseudo-element demo (see it live also).
...use a simple template with three slots: <template id="person-template"> <div> <h2>personal id card</h2> <slot name="person-name">name missing</slot> <ul> <li><slot name="person-age">age missing</slot></li> <li><slot name="person-occupation">occupation missing</slot></li> </ul> </div> </template> a custom element — <person-details> — is defined like so: custom
elements.define('person-details', class extends htmlelement { constructor() { super(); let template = document.getelementbyid('person-template'); let templatecontent = template.content; const shadowroot = this.attachshadow({mode: 'open'}); let style = document.createelement('style'); style.textcontent = 'div { padding: 10px; border: 1px solid gray; width: 200px;...
...gin: 0 0 10px; }' + 'ul { margin: 0; }' + 'p { margin: 10px 0; }' + '::slotted(*) { color: gray; font-family: sans-serif; } '; shadowroot.appendchild(style); shadowroot.appendchild(templatecontent.clonenode(true)); } }) you'll see that when filling the style element with content, we select all slotted
elements (::slotted(*)) and give them a different font and color.
:defined - CSS: Cascading Style Sheets
this includes any standard element built in to the browser, and custom
elements that have been successfully defined (i.e.
... /* selects any defined element */ :defined { font-style: italic; } /* selects any instance of a specific custom element */ simple-custom:defined { display: 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).
... in this demo we define a very simple trivial custom element: custom
elements.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 hide any instances of our custom element that are not defined, and display instances that are defined as block level
elements: simple-custom:not(:defined) { display: none; } simple-custom:defined { display: block; } this is useful if you have a complex custom element that takes a while to load into the page — you might want to hide instances of the element until definition is complete, so that you don't end up with flashes of ugly unstyled
elements on the page specifications specification status comment html living standardthe definition of ':defined' in that specification.
:dir() - CSS: Cascading Style Sheets
the :dir() css pseudo-class matches
elements based on the directionality of the text contained in them.
...the latter match the html dir attribute, and ignore
elements that lack it — even if they inherit a direction from their parent.
... parameters ltr target left-to-right
elements.
... rtl target right-to-left
elements.
Box-shadow generator - CSS: Cascading Style Sheets
: init, addshadow : addshadow, swapshadow : swapshadow, addcssclass : addcssclass, disableclass : disableclass, deleteshadow : deleteshadow, setactiveclass : setactiveclass, setactiveshadow : setactiveshadow } })(); /** * layer manager */ var layermanager = (function layermanager() { var stacks = []; var active = { node : null, stack : null } var
elements = {}; var mouseevents = function mouseevents(e) { var node = e.target; var type = node.getattribute('data-type'); if (type === 'subject') setactivestack(stacks[node.id]); if (type === 'disable') { tool.disableclass(node.parentnode.id); setactivestack(stacks['element']); } if (type === 'add') active.stack.addlayer(); if (type === 'layer') active.stac...
... return; if (index == this.layerid) { if (this.count >= 1) { this.layerid = 0; this.setactivelayer(this.stack.children[0], true); } else { this.layer = null; this.show(); } } if (index < this.layerid) { this.layerid--; tool.setactiveshadow(this.layerid, true); } } stack.prototype.setactivelayer = function setactivelayer(node) {
elements.shadow_properties.style.display = 'block';
elements.element_properties.style.display = 'none'; if (this.layer) this.layer.removeattribute('data-active'); this.layer = node; this.layer.setattribute('data-active', 'layer'); var shadowid = node.getattribute('data-shid') | 0; this.layerid = this.order.indexof(shadowid); tool.setactiveshadow(this.layerid, true); } sta...
... function unsetactivelayer() { if (this.layer) this.layer.removeattribute('data-active'); this.layer = null; this.layerid = 0; } stack.prototype.hide = function hide() { this.unsetactivelayer(); this.subject.removeattribute('data-active'); var style = this.container.style; style.left = '100%'; style.zindex = '0'; } stack.prototype.show = function show() {
elements.shadow_properties.style.display = 'none';
elements.element_properties.style.display = 'block'; if (this.id === 'element') {
elements.zindex.style.display = 'none';
elements.transform_rotate.style.display = 'none'; } else {
elements.zindex.style.display = 'block';
elements.transform_rotate.style.display = 'block'; } this.subject.setattribute('data-active', 'subj...
...ect'); var style = this.container.style; style.left = '0'; style.zindex = '10'; tool.setactiveclass(this.id); } function init() { var elem, size; var layermanager = getelembyid("layer_manager"); var layermenu = getelembyid("layer_menu"); var container = getelembyid("stack_container");
elements.shadow_properties = getelembyid('shadow_properties');
elements.element_properties = getelembyid('element_properties');
elements.transform_rotate = getelembyid('transform_rotate');
elements.zindex = getelembyid('z-index'); elem = document.queryselectorall('#layer_menu [data-type="subject"]'); size = elem.length; for (var i = 0; i < size; i++) { var s = new stack(elem[i]); stacks[elem[i].id] = s; container.appendchild(s.container); tool.addc...
Box alignment for block, absolutely positioned and table layout - CSS: Cascading Style Sheets
in this page we explore how box alignment works in the context of block layout, including floated, positioned, and table
elements.
... this property does not apply to floated
elements or table cells.
... absolutely positioned
elements the alignment container is the positioned block, accounting for the offset values of top, left, bottom, and right.
... absolutely positioned
elements the alignment container is the positioned block, accounting for the offset values of top, left, bottom, and right.
Understanding CSS z-index - CSS: Cascading Style Sheets
in the most basic cases, html pages can be considered two-dimensional, because text, images, and other
elements are arranged on the page without overlapping.
... in this case, there is a single rendering flow, and all
elements are aware of the space taken by others.
...however, when z-index is applied to complex hierarchies of html
elements, its behaviour can be hard to understand or predict.
... stacking with floated blocks: how floating
elements are handled with stacking.
Using CSS transforms - CSS: Cascading Style Sheets
css transforms are implemented using a set of css properties that let you apply affine linear transformations to html
elements.
... only
elements positioned by the box model can be transformed.
...you have to start by configuring the 3d space by giving it a perspective, then you have to configure how your 2d
elements will behave in that space.
...the farther from the viewer the
elements are, the smaller they are.
Using media queries - CSS: Cascading Style Sheets
to target specific media for the <style>, <link>, <source>, and other html
elements with the media= attribute.
... name summary notes any-hover does any available input mechanism allow the user to hover over
elements?
... height height of the viewport hover does the primary input mechanism allow the user to hover over
elements?
...this example applies styles when the user's primary input mechanism (such as a mouse) can hover over
elements: @media (hover: hover) { ...
Mozilla CSS extensions - CSS: Cascading Style Sheets
mozilla applications such as firefox support a number of special mozilla extensions to css, including properties, values, pseudo-
elements and pseudo-classes, at-rules, and media queries.
...some of them apply only to xul
elements.
...r-textfield spinner-upbutton statusbar statusbarpanel tab tabpanels tab-scroll-arrow-back tab-scroll-arrow-forward textfield textfield-multiline toolbar toolbarbutton-dropdown toolbox tooltip treeheadercell treeheadersortarrow treeitem treetwisty treetwistyopen treeview window background-image gradients -moz-linear-gradient -moz-radial-gradient
elements -moz-element sub-images -moz-image-rect() border-color -moz-use-text-colorobsolete since gecko 52 (removed in bug 1306214); use currentcolor instead.
... -moz-urdu overflow -moz-scrollbars-none -moz-scrollbars-horizontal -moz-scrollbars-vertical -moz-hidden-unscrollable text-align -moz-center -moz-left -moz-right text-decoration -moz-anchor-decoration -moz-user-select -moz-all -moz-none width, min-width, and max-width -moz-min-content -moz-fit-content -moz-max-content -moz-available pseudo-
elements and pseudo-classes a – d ::-moz-anonymous-block eg@:- bug 331432 ::-moz-anonymous-positioned-block :-moz-any :-moz-any-link [matches :link and :visited] :-moz-broken ::-moz-canvas ::-moz-color-swatch ::-moz-cell-content :-moz-drag-over f – i :-moz-first-node ::-moz-focus-inner ::-moz-focus-outer :-moz-focusring :-moz-full-screen :-moz-full-screen-ancestor :-moz-...
box-sizing - CSS: Cascading Style Sheets
this typically makes it much easier to size
elements.
... note: it is often useful to set box-sizing to border-box to layout
elements.
... this makes dealing with the sizes of
elements much easier, and generally eliminates a number of pitfalls you can stumble on while laying out your content.
... formal definition initial valuecontent-boxapplies toall
elements that accept width or heightinheritednocomputed valueas specifiedanimation typediscrete formal syntax content-box | border-box examples box sizes with content-box and border-box this example shows how different box-sizing values alter the rendered size of two otherwise identical
elements.
line-height - CSS: Cascading Style Sheets
on block-level
elements, it specifies the minimum height of line boxes within the element.
... on non-replaced inline
elements, it specifies the height that is used to calculate line box height.
... w3c understanding wcag 2.1 formal definition initial valuenormalapplies toall
elements.
...we will use two <div>
elements.
margin - CSS: Cascading Style Sheets
the top and bottom margins have no effect on non-replaced inline
elements, such as <span> or <code>.
... margin collapsing
elements' top and bottom margins are sometimes collapsed into a single margin that is equal to the larger of the two margins.
... recommendation removes the effect of top and bottom margins on inline
elements.
... initial valueas each of the properties of the shorthand:margin-bottom: 0margin-left: 0margin-right: 0margin-top: 0applies toall
elements, except
elements with table display types other than table-caption, table and inline-table.
max-height - CSS: Cascading Style Sheets
accessibility concerns ensure that
elements set with a max-height are not truncated and/or do not obscure other content when the page is zoomed to increase text size.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 formal definition initial valuenoneapplies toall
elements but non-replaced inline
elements, table columns, and column groupsinheritednopercentagesthe percentage is calculated with respect to the height of the generated box's containing block.
...firefox supports applying max-height to table
elements.ie full support 7opera full support 7notes full support 7notes notes css 2.1 leaves the behavior of max-height with table undefined.
... opera supports applying max-height to table
elements.safari full support 1.3webview android full support ≤37chrome android full support 18firefox android full support 4opera android full support 14safari ios full support 1samsung internet android full support 1.0fit-content experimentalchrome full support 46 full support 46 full support 25prefixed prefi...
min-width - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toall
elements but non-replaced inline
elements, table rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> exa...
...firefox supports applying min-width to table
elements.ie full support 7opera full support 4notes full support 4notes notes css 2.1 leaves the behavior of min-width with table undefined.
... opera supports applying min-width to table
elements.safari full support 1webview android full support 4.4chrome android full support 18firefox android full support 4notes full support 4notes notes css 2.1 leaves the behavior of min-width with table undefined.
... firefox supports applying min-width to table
elements.opera android full support 14safari ios full support 1samsung internet android full support 1.0autochrome full support 21notes full support 21notes notes chrome uses auto as the initial value for min-width.edge full support 12notes full support 12notes notes edge uses auto as the initial value for min-width.firefox full support 34 full support ...
ruby-align - CSS: Cascading Style Sheets
the ruby-align css property defines the distribution of the different ruby
elements over the base.
... space-between is a keyword indicating that the extra space will be distributed between the
elements of the ruby.
... space-around is a keyword indicating that the extra space will be distributed between the
elements of the ruby, and around it.
... text html <ruby> <rb>this is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby> css ruby { ruby-align: start; } result ruby aligned at the center of the base text html <ruby> <rb>this is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby> css ruby { ruby-align: center; } result extra space distributed between ruby
elements html <ruby> <rb>this is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby> css ruby { ruby-align: space-between; } result extra space distributed between and around ruby
elements html <ruby> <rb>this is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby> css ruby { ruby-align: space-around; } result specifications ...
transform - CSS: Cascading Style Sheets
in that case, the element will act as a containing block for any position: fixed; or position: absolute;
elements that it contains.
... only transformable
elements can be transformed.
... that is, all
elements whose layout is governed by the css box model except for: non-replaced inline boxes, table-column boxes, and table-column-group boxes.
... find out more: mdn understanding wcag, guideline 2.3 explanations understanding success criterion 2.3.3 | w3c understanding wcag 2.1 formal definition initial valuenoneapplies totransformable
elementsinheritednopercentagesrefer to the size of bounding boxcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea transformcreates stacking contextyes formal syntax none | <transform-list>where <transform-list> = <transform-function>+where <transform-function> = <matrix()> | <translate()> | <translatex()> | <translatey()> | <scale()> | <scalex()> | <scal...
Adding captions and subtitles to HTML5 video - Developer guides
we actually have our subtitles in three different languages — english, german, and spanish — so we will reference all three of the relevant vtt files by adding <track>
elements inside our html5 <video> element: <video id="video" controls preload="metadata"> <source src="video/sintel-short.mp4" type="video/mp4"> <source src="video/sintel-short.webm" type="video/webm"> <track label="english" kind="subtitles" srclang="en" src="captions/vtt/sintel-en.vtt" default> <track label="deutsch" kind="subtitles" srclang="de" src="captions/vtt/sintel-de.vtt"> <track l...
... in addition to adding the <track>
elements, we have also added a new button to control the subtitles menu that we will build.
...this menu is built dynamically, so that languages can be added or removed later by simply editing the <track>
elements within the video's markup.
...eo.texttracks[i].language == lang) { video.texttracks[i].mode = 'showing'; this.setattribute('data-state', 'active'); } else { video.texttracks[i].mode = 'hidden'; } } subtitlesmenu.style.display = 'none'; }); subtitlemenubuttons.push(button); return listitem; } this function builds the required <li> and <button>
elements, and returns them so they can be added to the subtitles menu list.
DOM onevent handlers - Developer guides
registering onevent handlers the onevent handlers are properties on certain dom
elements to manage how that element reacts to events.
...
elements can be interactive (links, buttons, images, forms, and so forth) or non-interactive (such as the base <body> element).
...for example, for the progress event on instances of xmlhttprequest: const xhr = new xmlhttprequest(); xhr.onprogress = function() { … }; html onevent attributes html
elements have attributes named onevent which can be used to register a handler for an event directly within the html code.
...'<hr/><br> changing onclick handler using <strong> setattribute method </strong> '); el.setattribute("onclick", 'anchoronclick(event)'); log(`changed the property to: <code> ${el.onclick.tostring()} </code>`); log(`now even the html attribute has changed: <code> ${el.getattribute("onclick")} </code><br>`); result for historical reasons, some attributes/properties on the <body> and <frameset>
elements instead set event handlers on their parent window object.
Rich-Text Editing in Mozilla - Developer guides
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).
... similarly, setting contenteditable to "true" allows you to make individual
elements of a document editable.
...most commands affect the document's selection (bold, italics, etc), while others insert new
elements (adding a link) or affect an entire line (indenting).
...the example page consists of an iframe, which will be the rich editing area, as well as
elements for basic editing commands such as bold/italics/text color.
<base>: The Document Base URL element - HTML: Hypertext Markup Language
if the document has no <base>
elements, then baseuri defaults to location.href.
... if either of the following attributes are specified, this element must come before other
elements with attribute values of urls, such as <link>’s href attribute.
... target a keyword or author-defined name of the default browsing context to show the results of navigation from <a>, <area>, or <form>
elements without explicit target attributes.
... usage notes multiple <base>
elements if multiple <base>
elements are used, only the first href and first target are obeyed — all others are ignored.
<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.
... 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 to create line breaks between the different lines of a postal address: mozilla<br> 331 e.
... use <p>
elements, and use css properties like margin to control their spacing.
<colgroup> - HTML: Hypertext Markup Language
the span attribute is not permitted if there are one or more <col>
elements within the <colgroup>.
...the descendant <col>
elements may override this value using their own align attribute.
...because <td>
elements are not descendant of the <colgroup> element, they won't inherit it.
...because <td>
elements are not descendant of the <colgroup> element, they won't inherit it.
<element>: The Custom Element element (Obsolete) - HTML: Hypertext Markup Language
the obsolete html <element> element was part of the web components specification; it was intended to be used to define new custom dom
elements.
... it was removed in favor of a javascript-driven approach for creating new custom
elements.
... permitted parent
elements ???
... specifications the <element> element was formerly in a draft specification of custom
elements but it has been removed.
<img>: The Image Embed element - HTML: Hypertext Markup Language
if the crossorigin attribute is not specified, then a non-cors request is sent (without the origin request header), and the browser marks the image as tainted and restricts access to its image data, preventing its usage in <canvas>
elements.
...st header); but if the server does not opt into allowing cross-origin access to the image data by the origin site (by not sending any access-control-allow-origin response header, or by not including the site's origin in any access-control-allow-origin response header it does send), then the browser marks the image as tainted and restricts access to its image data, preventing its usage in <canvas>
elements.
... security and privacy concerns although <img>
elements have innocent uses, they can have undesirable consequences for user security and privacy.
...if an image needs a caption, use the figure and figcaption
elements.
<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.
... additional attributes in addition to the attributes shared by all <input>
elements, range inputs offer the following attributes: attribute description list the id of the <datalist> element that contains optional pre-defined options max the maximum permitted value min the minimum permitted value step the stepping interval, used both for user interface and validation purposes list the values of the list attr...
... orient similar to the -moz-orient non-standard css property impacting the <progress> and <meter>
elements, the orient attribute defines the orientation of the range slider.
...</option> <option value="50"></option> <option value="60"></option> <option value="70"></option> <option value="80"></option> <option value="90"></option> <option value="100"></option> </datalist> screenshot live a range control with hash marks and labels you can add labels to your range control by adding the label attribute to the <option>
elements corresponding to the tick marks you wish to have labels for.
<input type="url"> - HTML: Hypertext Markup Language
<input>
elements of type url are used to let the user enter and edit a url.
... additional attributes in addition to the attributes that operate on all <input>
elements regardless of their type, url 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 characters the input should accept minlength the minimum number of characters long the input can be and still be considered...
...it can be used on any editable content, but here we consider specifics related to the use of spellcheck on <input>
elements.
... using labels for suggested values you can opt to include the label attribute on one or all of your <option>
elements to provide textual labels.
<input type="week"> - HTML: Hypertext Markup Language
<input>
elements of type week create input fields allowing easy entry of a year plus the iso 8601 week number during that year (i.e., week 1 to 52 or 53).
... you can also get and set the value in javascript using the input element's value property, for example: var weekcontrol = document.queryselector('input[type="week"]'); weekcontrol.value = '2017-w45'; additional attributes in addition to the attributes common to <input>
elements, week inputs offer the following attributes: attribute description max the latest year and week to accept as valid input min the earliest year and week to accept as valid input readonly a boolean which, if present, indicates that the user cannot edit the field's contents step the stepping interval (the distance between allowed value...
... the best way to deal with week/years in forms in a cross-browser way at the moment is to get the user to enter the week number and year in separate controls (<select>
elements being popular; see below for an example), or use javascript libraries such as jquery date picker.
... examples in this example we create two sets of ui
elements for choosing weeks: a native picker created using <input type="week">, and a set of two <select>
elements for choosing weeks/years in older browsers that don't support the week input type.
<nextid>: The NeXT ID element (Obsolete) - HTML: Hypertext Markup Language
it is also probably one of the least understood of all of the early html
elements.
... html version 2 level 1 this is like the level 2 default but it excludes all the forms
elements, i.
...<form>, <input>, <textarea>, <select>, and <option> html version 2 strict level 1 this is like regular level 1 but it also excludes these depreciated
elements, along with such constructs as nesting a header (<h*> element) within a link (<a> element) html version 2 level 2 this is the default and includes and permits all html level 2 functions and
elements and attributes html version 2 strict level 2 this excludes these depreciated
elements and also forbids such constructs as nesting a header (<h*> element) within a link (<a> element), or having a forms <input> element which is not within a block level element such as <p> html version 3.2 <nextid> has vanished altogether, never to be heard from again.
... attributes like all other html
elements, this element accepts the global attributes.
<ol>: The Ordered List element - HTML: Hypertext Markup Language
permitted content zero or more <li>, <script> and <template>
elements.
...for example, to start numbering
elements from the letter "d" or the roman numeral "iv," use start="4".
... the <ol> and <ul>
elements may nest as deeply as desired, alternating between <ol> and <ul> however you like.
... the <ol> and <ul>
elements both represent a list of items.
<textarea> - HTML: Hypertext Markup Language
this attribute enables you to place <textarea>
elements anywhere within a document, not just as descendants of form
elements.
...compared to other form
elements it is relatively easy to style, with its box model, fonts, color scheme, etc.
...other major browsers place the insertion point at the beginning of the text.notes a default background-image gradient is applied to all <textarea>
elements, which can be disabled using background-image: none.ie full support yesopera full support yessafari full support yeswebview android full support yeschrome android full support ...
...other major browsers place the insertion point at the beginning of the text.notes a default background-image gradient is applied to all <textarea>
elements, which can be disabled using background-image: none.opera android full support yessafari ios full support yesnotes full support yesnotes notes unlike other major browsers, a default style of opacity: 0.4 is applied to disabled <textarea>
elements.samsung internet...
itemprop - HTML: Hypertext Markup Language
property values are either a string or a url and can be associated with a very wide range of
elements including <audio>, <embed>, <iframe>, <img>, <link>, <object>, <source> , <track>, and <video>.
... examples the example below shows the source for a set of
elements marked up with itemprop attributes, followed by a table showing the resulting structured data.
...when a string value is a url, it is expressed using the <a> element and its href attribute, the <img> element and its src attribute, or other
elements that link to or embed external resources.
...the url property
elements are the a, area, audio, embed, iframe, img, link, object, source, track, and video
elements.
Preloading content with rel="preload" - HTML: Hypertext Markup Language
this example is trivial, as the browser probably discovers the <link rel="stylesheet"> and <script>
elements in the same chunk of html as the preloads, but the benefits can be seen much more clearly the later resources are discovered and the larger they are.
... including a mime type <link>
elements can accept a type attribute, which contains the mime type of the resource the element points to.
... including media one nice feature of <link>
elements is their ability to accept media attributes.
...>my site</h1> </header> <script> var mediaquerylist = window.matchmedia("(max-width: 600px)"); var header = document.queryselector('header'); if (mediaquerylist.matches) { header.style.backgroundimage = 'url(bg-image-narrow.png)'; } else { header.style.backgroundimage = 'url(bg-image-wide.png)'; } </script> </body> we include media attributes on our <link>
elements so that a narrow image is preloaded if the user has a narrow viewport, and a wider image is loaded if they have a wide viewport.
CSP: media-src - HTTP
the http content-security-policy (csp) media-src directive specifies valid sources for loading media using the <audio> and <video>
elements.
...if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
... examples violation cases given this csp header: content-security-policy: media-src https://example.com/ the following <audio>, <video> and <track>
elements are blocked and won't load: <audio src="https://not-example.com/audio"></audio> <video src="https://not-example.com/video"> <track kind="subtitles" src="https://not-example.com/subtitles"> </video> specifications specification status comment content security policy level 3the definition of 'media-src' in that specification.
CSP: script-src - HTTP
this includes not only urls loaded directly into <script>
elements, but also things like inline script event handlers (onclick) and xslt stylesheets which can trigger script execution.
...if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
... content-security-policy: script-src 'unsafe-inline'; the above content security policy will allow inline <script>
elements <script> var inline = 1; </script> you can use a nonce-source to only allow specific inline script blocks: content-security-policy: script-src 'nonce-2726c7f26c' you will have to set the same nonce on the <script> element: <script nonce="2726c7f26c"> var inline = 1; </script> alternatively, you can create hashes from your inline scripts.
Expressions and operators - JavaScript
for example, if a is a 2-dimensional array with 10
elements on a side, the following code uses the comma operator to update two variables at once.
... the code prints the values of the diagonal
elements in the array: var x = [0,1,2,3,4,5,6,7,8,9] var a = [x, x, x, x, x]; for (var i = 0, j = 9; i <= j; i++, j--) // ^ console.log('a[' + i + '][' + j + ']= ' + a[i][j]); unary operators a unary operation is an operation with only one operand.
...2; // implicitly creates window.x var y = 43; var myobj = {h: 4}; // create object with property h delete x; // returns true (can delete if created implicitly) delete y; // returns false (cannot delete if declared with var) delete math.pi; // returns false (cannot delete non-configurable properties) delete myobj.h; // returns true (can delete user-defined properties) deleting array
elements since arrays are just objects, it's technically possible to delete
elements from them.
...when you delete an array property, the array length is not affected and other
elements are no re-indexed.
Array.prototype.find() - JavaScript
if so, the
elements processed by find are set before the first invocation of callback.
... therefore: callback will not visit any
elements added to the array after the call to find begins.
...
elements that are deleted are still visited.
...undefined if there is no prime number): function isprime(element, index, array) { let start = 2; while (start <= math.sqrt(element)) { if (element % start++ < 1) { return false; } } return element > 1; } console.log([4, 6, 8, 12].find(isprime)); // undefined, not found console.log([4, 5, 8, 12].find(isprime)); // 5 the following examples show that nonexistent and deleted
elements are visited, and that the value passed to the callback is their value when visited: // declare array with no
elements at indexes 2, 3, and 4 const array = [0,1,,,,5,6]; // shows all indexes, not just those with assigned values array.find(function(value, index) { console.log('visited index ', index, ' with value ', value); }); // shows all indexes, including deleted array.find(function(value,...
Array.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string representing the
elements of the array.
... the
elements are converted to strings using their tolocalestring methods and these strings are separated by a locale-specific string (such as a comma “,”).
... return value a string representing the
elements of the array.
... examples using locales and options the
elements of the array are converted to strings using their tolocalestring methods.
String.prototype.split() - JavaScript
after splitting the string, the function logs messages indicating the original string (before the split), the separator used, the number of
elements in the array, and the individual array
elements.
... function splitstring(stringtosplit, separator) { const arrayofstrings = stringtosplit.split(separator) console.log('the original string is: ', stringtosplit) console.log('the separator is: ', separator) console.log('the array has ', arrayofstrings.length, '
elements: ', arrayofstrings.join(' / ')) } const tempeststring = 'oh brave new world that has such people in it.' const monthstring = 'jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec' const space = ' ' const comma = ',' splitstring(tempeststring, space) splitstring(tempeststring) splitstring(monthstring, comma) this example produces the following output: the original string is: "oh brave new world that has such people in it." the separator is: " " the array has 10
elements: oh / brave / new / world / that / has / such / people ...
... the original string is: "oh brave new world that has such people in it." the separator is: "undefined" the array has 1
elements: oh brave new world that has such people in it.
... the original string is: "jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec" the separator is: "," the array has 12
elements: jan / feb / mar / apr / may / jun / jul / aug / sep / oct / nov / dec removing spaces from a string in the following example, split() looks for zero or more spaces, followed by a semicolon, followed by zero or more spaces—and, when found, removes the spaces and the semicolon from the string.
TypedArray.prototype.copyWithin() - JavaScript
the copywithin() method copies the sequence of array
elements within the array to the position starting at target.
... syntax typedarray.copywithin(target, start[, end = this.length]) parameters target target start index position where to copy the
elements to.
... start source start index position where to start copying
elements from.
...source end index position where to end copying
elements from.
TypedArray.prototype.every() - JavaScript
the every() method tests whether all
elements in the typed array pass the test implemented by the provided function.
...otherwise, if callback returned a true value for all
elements, every will return true.
... examples testing size of all typed array
elements the following example tests whether all
elements in the typed array are bigger than 10.
... function isbigenough(element, index, array) { return element >= 10; } new uint8array([12, 5, 8, 130, 44]).every(isbigenough); // false new uint8array([12, 54, 18, 130, 44]).every(isbigenough); // true testing typed array
elements using arrow functions arrow functions provide a shorter syntax for the same test.
TypedArray.prototype.slice() - JavaScript
slice(-2) extracts the last two
elements in the sequence.
... for example, slice(1,4) extracts the second element through the fourth element (
elements indexed 1, 2, and 3).
... return value a new typed array containing the extracted
elements.
...it returns a shallow copy of
elements from the original typed array.
TypedArray.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string representing the
elements of the typed array.
... the
elements are converted to strings and are separated by a locale-specific string (such as a comma “,”).
... this method has the same algorithm as array.prototype.tolocalestring() and, as the typed array
elements are numbers, the same algorithm as number.prototype.tolocalestring() applies for each element.
... return value a string representing the
elements of the typed array.
Autoplay guide for media and Web Audio APIs - Web media technologies
autoplay blocking is not applied to <video>
elements when the source media does not have an audio track, or if the audio track is muted.
... 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 page or app that spontaneously starts making noise without warning can be jarring, inconvenient, or off-putting.
... autoplay of media
elements now that we've covered what autoplay is and what can prevent autoplay from being allowed, we'll look at how your web site or app can automatically play media upon page load, how to detect when autoplay fails to occur, and tips for coping when autoplay is denied by the browser.
...if this is false, the allowedtoplay property is missing from the htmlmediaelement interface, and is thus not present on either <audio> or <video>
elements.
Image file type and format guide - Web media technologies
as such, svg is popular for user interface
elements in modern web design.
...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 can directly write the <svg> element within the html, containing svg
elements to draw the image.
... you can display an svg image anywhere you can use any of the other image types, including with the <img> and <picture>
elements, the background-image css property, and so forth.
...<picture> is used as a wrapper for a number of <source>
elements, each specifying a version of the image in a different format or under different media conditions, as well as an <img> element which defines where to display the image and the fallback to the default or "most compatible" version.
Animation performance and frame rate - Web Performance
compared with animating
elements using javascript, css animations can be easier to create.
... layout: next, the browser uses the computed styles to figure out the position and geometry for the
elements.
... paint: finally, the browser needs to repaint the
elements to the screen.
... there are a number of
elements, and we've added a linear-gradient background and a box-shadow to each element, because they are both relatively expensive effects to paint.
SVG Presentation Attributes - SVG: Scalable Vector Graphics
svg presentation attributes are css properties that can be used as attributes on svg
elements.
... value: ltr|rtl|inherit; animatable: yes display it allows to control the rendering of graphical or container
elements.
... value: normal|<length>|inherit; animatable: yes lighting-color it defines the color of the light source for filter primitives
elements <fediffuselighting> and <fespecularlighting>.
... value: default|non-scaling-stroke|inherit|<uri>; animatable: yes visibility lets you control the visibility of graphical
elements.
begin - SVG: Scalable Vector Graphics
six
elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <discard>, and <set> animate, animatecolor, animatemotion, animatetransform, set for <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set>, begin defines when the element should begin, i.e.
...all valid events (not necessarily supported by all
elements) are defined by the dom and html specifications.
... seeking backwards in the timeline doesn't re-insert the discarded
elements.
... value <begin-value-list> default value 0s animatable no the definition of <begin-value-list> is the same as for the other animation
elements.
display - SVG: Scalable Vector Graphics
the display attribute lets you control the rendering of graphical or container
elements.
... when applied to a container element, setting display to none causes the container and all of its children to be invisible; thus, it acts on groups of
elements as a group.
...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.
... the display attribute only affects the direct rendering of a given element, whereas it does not prevent
elements from being referenced by other
elements.
dur - SVG: Scalable Vector Graphics
five
elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 220 150" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatcount="indefinite"/> </rect> <rect x="120" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="3s" repeatcount="indefinite"/> </rect> </svg> usage notes value <clock-value> | media | indefinite default value indefinite animatable no <clock-value> this value specifies ...
...this is only valid for
elements that define media.
... (for animation
elements the attribute will be ignored if media is specified.) indefinite this value specifies the simple duration as indefinite.
... note: the interpolation will not work if the simple duration is indefinite (although this may still be useful for <set>
elements).
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.
... four
elements are using this attribute: <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 200 60" xmlns="http://www.w3.org/2000/svg"> <text y="20" textlength="6em">small text length</text> <text y="40" textlength="120%">big text length</text> </svg> usage notes value <length-percentage> | <number> default value none anim...
... html the html is also simple, with only two displayed
elements contained inside a grouping <div>: <div class="controls"> <input type="range" id="widthslider" min="80" max="978"> <span id="widthdisplay"></span> </div> the <input> element, of type "range", is used to create the slider control the user will manipulate to change the width of the text.
...it starts by stashing references to the
elements it will need to access, using document.getelementbyid(): const widthslider = document.getelementbyid("widthslider"); const widthdisplay = document.getelementbyid("widthdisplay"); const textelement = document.getelementbyid("hello"); const baselength = math.floor(textelement.textlength.baseval.value); widthslider.value = baselength; widthslider.addeventlistener("input", function(event) { textelement.textlength.baseval.newvaluespecifiedunits( svglength.svg_lengthtype_px, widthslider.valueasnumber); widthdisplay.innertext = widthslider.value; }, false); widthslider.dispatchevent(new event("...
type - SVG: Scalable Vector Graphics
for the <fefuncr>, <fefuncg>, <fefuncb>, and <fefunca>
elements, it indicates the type of component transfer function.
... for the <style> and <script>
elements, it defines the content type of the element.
... usage context for the <animatetransform>
elements categories none value translate | scale | rotate | skewx | skewy animatable no normative document svg 1.1 (2nd edition) for the <fecolormatrix> element categories none value matrix | saturate | huerotate | luminancetoalpha animatable yes normative document svg 1.1 (2nd edition) for the <fefuncr>, <fefuncg>, <fefuncb>, and <fefunca>
elements categories none value identity | table | discrete | linear | gamma animatable yes normative document svg 1.1 (2nd edition) for the <feturbulence> element categories none value fractalnoise | turbulence animata...
...ble yes normative document svg 1.1 (2nd edition) for the <style> and <script>
elements categories none value <content-type> animatable no normative document svg 1.1 (2nd edition) : script svg 1.1 (2nd edition) : style example
elements the following
elements can use the values attribute <animatetransform> <fecolormatrix> <fefunca> <fefuncb> <fefuncg> <fefuncr> <feturbulence> <script> <style> ...
<g> - SVG: Scalable Vector Graphics
the <g> svg element is a container used to group other svg
elements.
... transformations applied to the <g> element are performed on its child
elements, and its attributes are inherited by its children.
... it can also group multiple
elements to be referenced later with the <use> element.
...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-valuetext, 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>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2th...
<svg> - SVG: Scalable Vector Graphics
it is unnecessary for inner svg
elements or inside html documents.
...no effect on outermost svg
elements.
...no effect on outermost svg
elements.
...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-valuetext, 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>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2th...
Introduction - SVG: Scalable Vector Graphics
basic ingredients html provides
elements for defining headers, paragraphs, tables, and so on.
... in much the same way svg provides
elements for circles, rectangles, and simple and complex curves.
...but all these extra features of the language rely on this relatively small set of
elements to define the graphics area.
...if you are not too familiar with xml, here are some guidelines to keep in mind: svg
elements and attributes should all be entered in the case shown here since xml is case-sensitive (unlike html).
<xsl:output> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt
elements, exslt functions, xpath functions, xpath axes the <xsl:output> element controls the characteristics of the output document.
... syntax <xsl:output method="xml" | "html" | "text" version=string encoding=string omit-xml-declaration="yes" | "no" standalone="yes" | "no" doctype-public=string doctype-system=string cdata-section-
elements=list-of-names indent="yes" | "no" media-type=string /> required attributes none.
... cdata-section-
elements lists
elements whose text contents should be written as cdata sections.
...
elements should be whitespace separated.
Overview - Archive of obsolete content
it identifies page
elements which are eligible for annotation, highlights them on mouseover, and tells the main add-on code when the user clicks a highlighted element.
... the matcher is responsible for finding annotated
elements: it is initialized with the list of annotations and searches web pages for the
elements they are associated with.
... it highlights any annotated
elements that are found.
Label and description - Archive of obsolete content
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;.
... 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.
Toolbar - Archive of obsolete content
you must not insert your toolbar button between any of the following
elements: the combined back/forward button, the location bar, the stop botton, or the reload button.
... these
elements have special behaviors when placed next to eachother, and will break if separated by another element.
...tallbutton(toolbarid, id, afterid) { if (!document.getelementbyid(id)) { var toolbar = document.getelementbyid(toolbarid); // if no afterid is given, then append the item to the toolbar var before = null; if (afterid) { let elem = document.getelementbyid(afterid); if (elem && elem.parentnode == toolbar) before = elem.next
elementsibling; } toolbar.insertitem(id, before); toolbar.setattribute("currentset", toolbar.currentset); document.persist(toolbar.id, "currentset"); if (toolbarid == "addon-bar") toolbar.collapsed = false; } } if (firstrun) { installbutton("nav-bar", "my-extension-navbar-button"); // the "addon-bar" is available since firefox 4 instal...
Displaying web content in an extension without security issues - Archive of obsolete content
plate document might have this code: <style type="text/css"> #entrytemplate { display: none; } </style> <div id="entrytemplate"> <div class="title"></div> <div class="description"></div> </div> now to insert a new entry in the document you would do the following: var template = doc.getelementbyid("entrytemplate"); var entry = template.clonenode(true); entry.removeattribute("id"); entry.get
elementsbyclassname("title")[0].textcontent = title; entry.get
elementsbyclassname("description")[0].textcontent = description; template.parentnode.appendchild(entry); the important difference here is that the result will always have the same structure as the template tag.
...so there is no chance of accidentally adding new
elements or attributes.
...instead, nsiscriptableunescapehtml.parsefragment() method should be used that is meant for just that scenario: var target = entry.get
elementsbyclassname("description")[0]; var fragment = components.classes["@mozilla.org/feed-unescapehtml;1"] .getservice(components.interfaces.nsiscriptableunescapehtml) .parsefragment(description, false, null, target); target.appendchild(fragment); this will add the html code to the specified node — minus all the potentially dangerous content.
Listening to events in Firefox extensions - Archive of obsolete content
types of events there are multiple types of events that application and extension authors can use to receive notifications from <xul:browser> and <xul:tabbrowser>
elements to hear about changes relating to loads of the content contained within them.
...both browser and tabbrowser
elements support the following: var progresslistener = { // add nsiwebprogressimplementation here } b.addprogresslistener(progresslistener); where b is the browser or tabbrowser you want to listen to events for.
... pageshoweventhandlers the pageshoweventhandlers() function is called by the pageshow event and is used to populate the character set menu and update the ui
elements associated with any detected feeds or opensearch plugins for the website.
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
listing 5: closing all browser windows var browsers = windowmediator.getenumerator('navigator:browser'); var browser; while (browsers.hasmore
elements()) { browser = browsers.getnext().queryinterface(components.interfaces.nsidomwindowinternal); browser.browsertrytoclosewindow(); } this method returns an overview of the specified window type in the form of an iterator pattern object called nsisimpleenumerator.
... listing 9: listing the contents of a specific directory file.initwithpath('c:\\'); var children = file.directoryentries; var child; var list = []; while (children.hasmore
elements()) { child = children.getnext().queryinterface(components.interfaces.nsilocalfile); list.push(child.leafname + (child.isdirectory() ?
...g setting var string = 'this is test.'; pref.setcharpref('extensions.myextension.testpref', unescape(encodeuricomponent(string))); data type get set boolean getboolpref(prefname) setboolpref(prefname) integer getintpref(prefname) setintpref(prefname) text string getcharpref(prefname) setcharpref(prefname) using methods from xul
elements xpcom gives you access to sophisticated functions in xul
elements.
Tabbed browser - Archive of obsolete content
the code given is for a menuitem, but will work equally well for other xul
elements.
... function openandreuseonetabperurl(url) { var wm = components.classes["@mozilla.org/appshell/window-mediator;1"] .getservice(components.interfaces.nsiwindowmediator); var browserenumerator = wm.getenumerator("navigator:browser"); // check each browser instance for our url var found = false; while (!found && browserenumerator.hasmore
elements()) { var browserwin = browserenumerator.getnext(); var tabbrowser = browserwin.gbrowser; // check each tab of this browser instance var numtabs = tabbrowser.browsers.length; for (var index = 0; index < numtabs; index++) { var currentbrowser = tabbrowser.getbrowseratindex(index); if (url == currentbrowser.currenturi.spec) { // the url is already opened.
...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.reporterror(e); } } to learn what methods are available for <browser/> and <tabbrowser/>
elements, use dom inspector or look in browser.xml for corresponding xbl bindings (or just look at the current reference pages on browser and tabbrowser.
Making it into a static overlay - Archive of obsolete content
a xul overlay is a xul file containing
elements to be inserted into another xul file when the other xul file is rendered into an application interface.
...when navigator.xul is rendering into the browser's application interface, this causes any attributes or child
elements of the statusbar element in the overlay file to be added to the interface's dom and thus show up in the interface as if they were defined on the same element in navigator.xul.
...thus it allows us to define the exact position of our element relative to the other statusbarpanel
elements within statusbar.
Block and Line Layout Cheat Sheet - Archive of obsolete content
maxelementwidth the maximum width for
elements within the frame that cannot be broken down further; e.g., the longest word in a paragraph.
... brs_computemax
elementsize this flag is set if reflow should recompute an element's maximum size.
... it is set in the nsblockreflowstate constructor if the "max
elementsize" member of the nshtmlreflowmetrics object has been provided by (the parent frame?).
Extensions - Archive of obsolete content
one of prism's features is an extreme lack of ui
elements, which means that trying to use the same overlays in firefox and prism is really not possible.
...prism does have a few ui
elements, such as a toolbox, toolbar, menubar, popup menus, statusbar and a container for the browser.
... you can use these ui
elements to merge in your extension ui.
Proxy UI - Archive of obsolete content
camino configured in os (networking preferences) (recently added - some support for reading os and account settings.)ui
elements preferences panel overview the ui is based on selecting a proxy mode, then filling out any additional needed information in "related" ui.
... "related" ui
elements only two proxy modes have related ui.
... enabling and disabling related fields when a radio button is selected, the related ui
elements are enabled (and editable).
Binding Implementations - Archive of obsolete content
a method with parameters specifies those parameters and their names with parameter
elements declared underneath the method element.
... properties with getters and setters can define them using onget and onset attributes, or using the more verbose getter and setter
elements.
... because bindings extend dom
elements, they can override any built-in methods or properties on the dom element.
XBL 1.0 Reference - Archive of obsolete content
extensible binding language is a xml-based markup language to implement reusable components (bindings) that can be bound to
elements in other documents.
...bindings can be bound to
elements using cascading style sheets (css) or dom.
... xbl
elements xbl 1.0
elements are in the http://www.mozilla.org/xbl namespace.
XML in Mozilla - Archive of obsolete content
you can use xhtml
elements inside an arbitrary xml document by using the xhtml namespace.
...you can also use the linking
elements from the xhtml namespace.
... see also e4x xquery code snippets for queryselector - useful techniques for navigating dom using css selectors on xml dom documents (firefox 3.5 only) identifying xml
elements and documents parsing and serializing xml ...
dir - Archive of obsolete content
« xul reference home dir type: one of the values below the direction in which the child
elements of the element are placed.
... normal for scales, the scale's values are ordered from left to right (for horizontal scales) or from top to bottom (for vertical scales) for other
elements, the
elements are placed left to right or top to bottom in the order they appear in the xul code.
...for other
elements, they are placed right to left or bottom to top.
disabled - Archive of obsolete content
disabled
elements are usually drawn with grayed-out text.
...in the case of form
elements, it will not be submitted.
... // disabling an element document.getelementbyid('buttonremove').setattribute("disabled", "disabled"); // enabling back an element by removing the "disabled" attribute document.getelementbyid('buttonremove').removeattribute("disabled"); firefox 3.5 note for keyset
elements, support for this attribute was added in firefox 3.5.
value - Archive of obsolete content
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.value syntax.
... for those
elements, setattribute("value", myvalue) and getattribute("value") do not access or affect the contents displayed to the user.
Deprecated and defunct markup - Archive of obsolete content
{many
elements on this page are wrongly marked as deprecated, this page needs review} the following xul tags and attribute should be considered deprecated, if not defunct.
... the list below may include a few
elements which are actually in use, but at a deeper level in the code.
...
elements <actions> (listed here by mistake or was it a container tag?) typo for <action> --neil 03 march 2011 <autorepeatbutton> (action occurs repeatedly on mouse hover--used to construct other
elements; used in <arrowscrollbox> and large drop-down menus) so, not deprecated?
Working With Directories - Archive of obsolete content
function getlatestfile() { var lastmod = 0; var homedir = io.getfile("home", ""); var items = homedir.directoryentries; while (items.hasmore
elements()) { var item = items.getnext().queryinterface(components.interfaces.nsifile); if (item.isfile() && item.lastmodifiedtime > lastmod.lastmodifiedtime) lastmod = item; } return lastmod; } this example iterates through the files in the home directory and looks for the file with the latest modification time (the last file in that directory that was written to).
... as the directoryentries (nsifile.attributes) property is an enumeration, you can iterate over the items by using nsisimpleenumerator.hasmore
elements() and nsisimpleenumerator.getnext().
...the following example returns an array of all of a directory's subdirectories: function getsubdirs() { var arr = []; var items = io.getfile("home", "").directoryentries; while (items.hasmore
elements()) { var item = items.getnext(); if (item.isdirectory()) arr.push(item); } return arr; } ...
ContextMenus - Archive of obsolete content
menupopup id="ins-del-menu"> <menuitem label="insert"/> <menuitem label="delete"/> </menupopup> </popupset> </window> <grid context="ins-del-menu"> <columns> <column/> <column flex="1"/> </columns> <rows id="rows"> <row align="center"> <label value="name:"/> <textbox/> </row> </rows> </grid> the same context menu can be attached to multiple
elements.
... just set the context attribute on those
elements you want the context menu to apply to.
...the result is that context clicking on images will show a menu with three items, but will only show one item for other types of
elements.
MenuModification - Archive of obsolete content
to do this, we instead need to use the inherited node modification methods available for all
elements.
... the appendchild method is available for all
elements, and is used to add new nodes within another node.
... the appenditem method is specific to menus, as well as some other specific
elements, and is simpler to use to append new menuitem
elements to a menu.
Panels - Archive of obsolete content
the panel will display whatever
elements are placed as children of the panel element.
...for other types of
elements, you need to use a different technique as in the following example.
... focus in panels
elements within panels may be focused with the mouse, and the currently focused element may be adjusted by pressing the tab key.
tag - Archive of obsolete content
for example, by using a value of treechildren, the condition will only match when placing
elements directly inside a treechildren tag.
... thus, nested
elements will not match because they are directly inside a treeitem.
... this attribute is useful to provide different rules for outer and inner
elements.
Actions - Archive of obsolete content
this action contains only one element, but you can put as many or as few
elements as you need.
...you would only use the uri attribute on a single element since only one of the generated
elements should be given a particular id.
...you can place other
elements outside this to serve as containers for all the results.
Multiple Queries - Archive of obsolete content
here is an example using an rdf datasource: <hbox id="photoslist" datasources="template-guide-photos3.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <queryset> <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/
elements/1.1/title" object="canal"/> </query> <action> <button uri="?photo" image="?photo" label="view" orient="vertical"/> </action> </queryset> <queryset> <query> <content uri="?start"/> <member container="?start" child="?photo"/> </query> <action> <image uri="?photo" src="?photo"/> </action> </queryset...
...here is the previous example rewritten using the simple syntax: <hbox id="photoslist" datasources="template-guide-photos3.rdf" ref="http://www.xulplanet.com/rdf/myphotos" xmlns:dc="http://purl.org/dc/
elements/1.1/"> <template> <rule dc:title="canal"> <button uri="rdf:*" image="rdf:*" label="view" orient="vertical"/> </rule> <rule> <image uri="rdf:*" src="rdf:*"/> </rule> </template> </hbox> the result to the user in this example is the same as the previous example.
... <hbox id="photoslist" datasources="template-guide-photos3.rdf" ref="http://www.xulplanet.com/rdf/myphotos" xmlns:dc="http://purl.org/dc/
elements/1.1/"> <template dc:title="canal"> <button uri="rdf:*" image="rdf:*" label="view" orient="vertical"/> </template> </hbox> this example shows only a single photo since a condition is used to filter out the other two photos.
Rule Compilation - Archive of obsolete content
an attribute substitution syntax, explained later, is used to modify the attributes of
elements generated from the template, to correspond with the data for each result.
...thus, changing the rule
elements around dynamically doesn't affect anything.
...if the generated content itself contains hidden
elements, those child
elements will not be generated until necessary.
Simple Example - Archive of obsolete content
<?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/
elements/1.1/"> <rdf:seq rdf:about="http://www.xulplanet.com/rdf/myphotos"> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/palace.jpg"/> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/canal.jpg"/> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg"/> </rdf:seq> <rdf:description rdf:about="http://www.xulplanet.com/ndeakin/images/t/palace.jpg" dc:title="palace from above"/> <rd...
... <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/
elements/1.1/title" object="?title"/> </query> the seed is set in a similar manner as the previous examples, effectively creating a single result with the ?start variable set to the reference resource 'http://www.xulplanet.com/rdf/myphotos'.
...for the first result, the value of the ?photo variable is known, so the triple will be evaluated like so: <triple subject="http://www.xulplanet.com/ndeakin/images/t/palace.jpg" predicate="http://purl.org/dc/
elements/1.1/title" object="?title"/> the builder next calculates the value for ?title using the predicate 'http://purl.org/dc/
elements/1.1/title'.
Sorting Results - Archive of obsolete content
for instance: <treecol id="name" label="name" sort="rdf:http://purl.org/dc/
elements/1.1/title" flex="1"/> note that all of this discussion about sorting only applies to tree builders.
... for other
elements or content trees, sorting is done by placing the attributes on the root element.
...for rdf datasources, you can also use an rdf predicate for sorting instead of a variable: <hbox datasources="template-guide-photos5.rdf" sort="http://purl.org/dc/
elements/1.1/title" sortdirection="ascending" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <vbox class="box-padded" uri="rdf:*"> <image src="rdf:*"/> <label value="rdf:http://purl.org/dc/
elements/1.1/title"/> </vbox> </template> </hbox> in this example, the generated items will be sorted by title.
Special Condition Tests - Archive of obsolete content
for instance, we might use the following: <vbox datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood"> <template> <rule parent="vbox"> <groupbox uri="rdf:*"> <caption label="rdf:http://purl.org/dc/
elements/1.1/title"/> </groupbox> </rule> <rule> <label uri="rdf:*" value="rdf:http://www.xulplanet.com/rdf/address"/> </rule> </template> </vbox> on the first pass, the container where generated content would be inserted is a <vbox>, so the first rule will match and a captioned <groupbox> will be created.
...here is the same example using the extended template syntax: <vbox datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood"> <template> <query> <content uri="?start"/> <member container="?start" child="?item"/> </query> <rule parent="vbox"> <binding subject="?item" predicate="http://purl.org/dc/
elements/1.1/title" object="?title"/> <action> <groupbox uri="?item"> <caption label="?title"/> </groupbox> </action> </rule> <rule> <binding subject="?item" predicate="http://www.xulplanet.com/rdf/address" object="?address"/> <action> <label uri="?item" value="?address"/> </action> </rule> </template> </vbox> containment tests...
...<button label="houses in my neighbourhood" type="menu" datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood"> <template> <rule iscontainer="true"> <menupopup> <menu uri="rdf:*" label="rdf:http://purl.org/dc/
elements/1.1/title"/> </menupopup> </rule> <rule> <menupopup> <menuitem uri="rdf:*" label="rdf:http://www.xulplanet.com/rdf/address"/> </menupopup> </rule> </template> </button> the only difference in the code in this example is that the order of the rules has been switched around, the condition check for house has been removed and the iscontainer attribute has bee...
Template Logging - Archive of obsolete content
unexpected <queryset> element a <queryset> element was placed in an invalid location; they should be placed directly inside the <template> element with no other kinds of
elements as siblings.
...expected <content> to be first for an rdf template, when using the full query syntax, the <content> element must always appear before any other
elements.
...common errors are misspelled variable names or <member> and <triple>
elements placed in the wrong order.
XML Templates - Archive of obsolete content
here is an example: <listbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="person"/> <action> <listitem uri="?" label="?name"/> </action> </template> </listbox> the expr attribute is a very simple xpath expression which simply retrieves the person
elements from within the datasource.
...any
elements between the action element and this element are only copied once.
...note the only change is that the addition of the xmlns attribute on the data; this is used to clear the namespace used for the
elements in the data, otherwise they become xul
elements.
Advanced Rules - Archive of obsolete content
content element the conditions element can contain three
elements.
...inside it, you place one or more binding
elements.
...next, we'll find out how to save the state of xul
elements.
Creating a Skin - Archive of obsolete content
four
elements, the menubar, the menupopup, the toolbar and the tabpanels appear in light blue.
... the border around these four
elements has been changed to give a heavier 3d appearance.
...we could continue by changing the menus, the grippies on the toolbar and the input and checkbox
elements.
Keyboard Shortcuts - Archive of obsolete content
this element is designed for holding a set of key
elements, which serves to group all of the key definitions in one place in a file.
... any key
elements outside of a keyset element will not work.
...it would be inconvenient to define separate key
elements for each platform.
Manipulating Lists - Archive of obsolete content
these three methods are also available for several other xul
elements and work in the same manner.
... in fact, these methods are part of the nsidomxulselectcontrolelement interface so any xul
elements which implement this interface have these methods.
... this includes the menulist, radiogroup and tabs
elements.
More Event Handlers - Archive of obsolete content
example 1 : source view <vbox oncommand="alert(event.currenttarget.tagname);"> <button label="ok"/> <checkbox label="show images"/> </vbox> stop event propagation once you handle an event, regardless of where in the propagation the event is, you will likely want to stop the event from being sent to further
elements, essentially stopping the capturing or bubbling phases from continuing.
...var element = event.target; var elementx = event.clientx - element.boxobject.x; var elementy = event.clienty - element.boxobject.y; xul
elements have a box object that can be retrieved using the boxobject property.
...this is because the xul
elements may not have loaded or fully initialized yet, so some things may not work as expected.
RDF Datasources - Archive of obsolete content
instead, only the files and directories that the tree element (or other
elements) will need to display at a given time will be determined.
...you will notice that the value of the ref attribute in the example is http://www.some-fictitious-zoo.com/mammals which corresponds to one of the seq
elements in the rdf file.
...you can see this attribute in the rdf file on each of the description
elements.
Scrolling Menus - Archive of obsolete content
« previousnext » this section will describe scrolling menus and how to use the mechanism with other
elements.
...it is always a vertical box and may contain any
elements inside it.
...next, we'll see how to add some event handlers to xul
elements.
XBL Attribute Inheritance - Archive of obsolete content
it would be useful to add attributes to the bound
elements that modify the inner
elements.
...you can add the inherits attribute to as many
elements as you wish, to inherit any number of attributes.
...there may be times where two generated
elements need to inherit from an attribute that has the same name.
Using Visual Studio as your XUL IDE - Archive of obsolete content
compared to a simple text-editor, visual studio gives you some special features 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.
...xbl if you are writing your own
elements in xbl, you can download a xbl schema from mozilla.doslash.org/xblschema.
...to combine both, you can also add your own xbl
elements to the xul schema to get autocompletion-support and validation for those in your xul files.
XUL FAQ - Archive of obsolete content
are there any
elements inside the <prefwindow>, before the <prefpane>s?
... (putting any
elements there triggers bug 296418.) are prefpanes nested correctly?
...if you want to access
elements inside <prefpane>, you should put script in the <prefpane> or write script into "onpaneload" of the <prefpane>.) note, that prefwindow only works in chrome xul.
Accessibility/XUL Accessibility Reference - Archive of obsolete content
although tutorials claim label and description have the same underlying implementation, description
elements appear to not associate correctly with controls whereas labels do.
...ogress advances, jaws indicates percentage to the user radio see radiogroup radiogroup <label value='<!--radio group-->' control='radioid' /> <radiogroup id='radioid'> <radio selected="true" label='<!--option1-->' /> <radio label='<!--option2-->' /> </radiogroup> row see grid rows see grid stack all
elements can be focused, even if not visible due to being hidden under something else statusbar <statusbar> <statusbarpanel label="<!--status bar-->" flex="1"/> </statusbar> read using jaws with insert+page down statusbarpanel see statusbar tab see tabbox tabbox <tabbox> <tabs> <tab label="<!--tab text-->" /> </tabs> <t...
... treecell see tree treechildren see tree treecol see tree treecols see tree treeitem see tree treerow see tree
elements that do not expose anything to screen readers/have no discovered accessibility issues yet: arrowscrollbox bbox box grippy hbox menuseparator overlay page script spacer splitter stringbundle stringbundleset vbox window
elements not processed yet: action binding bindings broadcaster broadcasterset conditions content dialog dialogheader editor listcell member obs...
bindings - Archive of obsolete content
this element should be contained within a rule element and contain one 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.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
broadcaster - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a broadcaster is used when you want multiple
elements to share one or more attribute values, or when you want
elements to respond to a state change.
... any
elements that are observing the broadcaster will share the attributes placed on the broadcaster.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
dialogheader - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements dialog, window ...
hbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of child
elements.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements box, vbox ...
notificationbox - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), ...
...keep in mind that this is all xul so using html
elements for styling might still need additional css in order to work as you might expect.
... related
elements notification ...
preferences - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] overview <preferences> is a container for <preference>
elements.
... <preferences> element should contain one or more <preference>
elements.
... inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
query - Archive of obsolete content
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.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
row - Archive of obsolete content
the row with the 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.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements grid, columns, column, rows.
stack - Archive of obsolete content
all
elements are displayed at once.
... child
elements may also be placed at absolute positions within the stack.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
<statusbarpanel> - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
... related
elements statusbar ...
tabbrowser - Archive of obsolete content
properties browsers type: nodelist of browser
elements holds a list of the browser
elements inside the tabbrowser.
... selectedtab type: tab element a reference to the currently selected tab, which will always be one of the tab
elements in the tabs element.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), ...
tabpanels - Archive of obsolete content
in most cases you would use a vbox, but they can be any element, although some people like to use tabpanel
elements.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements tabbox, tabs, tab, tabpanel.
template - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] used to declare a template for rule-based construction of
elements.
...
elements are constructed from a datasource.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
treecols - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a group of treecol
elements.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements tree, treecol, treechildren, treeitem, treerow, treecell and treeseparator.
treerow - Archive of obsolete content
children of the treerow should be treecell
elements.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements tree, treecols, treecol, treechildren, treeitem, treecell and treeseparator.
vbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of child
elements.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements box, hbox ...
window - Archive of obsolete content
this is supported only from window
elements, and is ignored on platforms that don't support drawing into the title bar.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
... related
elements prefwindow, dialog, dialogheader related topics user notes to change the icon to a window's title bar check this page on window icons.
Windows and menus in XULRunner - Archive of obsolete content
the css is used to apply formatting to
elements, just as it would in html.
...xul provides
elements to support both menus and toolbars.
...you can add a <commandset> and <command>
elements like this: <commandset> <command id="cmd_open" label="&file.open;" oncommand="dofileopen();"/> <command id="cmd_save" label="&file.save;" oncommand="dofilesave();"/> </commandset> ...
2006-09-29 - Archive of obsolete content
discussions discussion on how the firefox 1.5.0.7 dom generates xhtml inline
elements using wordpress.
... it was determined that the generated
elements from wordpress do not follow the wc3 guidelines in appendix c of xhtml 1.0.
... although the w3 validation accepted the generated xhtml as valid, a bug identified within the html working group ignored the invalid
elements.
Building a Theme - Archive of obsolete content
these xul
elements are styled using css.
... 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.
... from here, you can play around with various different stylings for the toolbar and associated
elements.
-ms-content-zoom-chaining - Archive of obsolete content
initial valuenoneapplies tonon-replaced block-level
elements and non-replaced inline-block
elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none the initial value.
... remarks this property has no effect on non-zoomable
elements.
... for information on zoomable
elements, see -ms-content-zooming.
-ms-content-zoom-limit-min - Archive of obsolete content
initial value100%applies tonon-replaced block-level
elements and non-replaced inline-block
elementsinheritednopercentagesthe smallest allowed zoom factor.
...this property has no effect on non-zoomable
elements.
... see -ms-content-zooming for details on zoomable
elements.
-ms-content-zoom-limit - Archive of obsolete content
initial valueas each of the properties of the shorthand:-ms-content-zoom-limit-max: 400%-ms-content-zoom-limit-min: 100%applies tonon-replaced block-level
elements and non-replaced inline-block
elementsinheritednopercentagesas each of the properties of the shorthand:-ms-content-zoom-limit-max: the largest allowed zoom factor.
... remarks this property has no effect on non-zoomable
elements.
... see -ms-content-zooming for details on zoomable
elements.
-ms-content-zoom-snap-points - Archive of obsolete content
initial valuesnapinterval(0%, 100%)applies tonon-replaced block-level
elements and non-replaced inline-block
elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values snapinterval( <percentage>, <percentage> ) specifies where the snap-points will be placed.
... remarks this property has no effect on non-zoomable
elements.
... see -ms-content-zooming for details on zoomable
elements.
-ms-content-zoom-snap-type - Archive of obsolete content
initial valuenoneapplies tonon-replaced block-level
elements and non-replaced inline-block
elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none initial value.
... remarks this property has no effect on non-zoomable
elements.
... see -ms-content-zooming for details on zoomable
elements.
-ms-content-zoom-snap - Archive of obsolete content
initial valueas each of the properties of the shorthand:-ms-content-zoom-snap-type: none-ms-content-zoom-snap-points: snapinterval(0%, 100%)applies tonon-replaced block-level
elements and non-replaced inline-block
elementsinheritednocomputed valueas each of the properties of the shorthand:-ms-content-zoom-snap-type: as specified-ms-content-zoom-snap-points: as specifiedanimation typediscrete syntax the -ms-content-zoom-snap shorthand property is specified as one or both of the following content zoom snap values, in order, separated by spaces.
... remarks this property has no effect on non-zoomable
elements.
... see -ms-content-zooming for details on zoomable
elements.
-ms-scroll-translation - Archive of obsolete content
initial valuenoneapplies toall
elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values vertical-to-horizontal vertical to horizontal translation, as described in remarks, will take place when appropriate.
... this property has no effect on non-scrollable
elements.
... this property's initial value is inherit on all
elements, except the <html> element, where it defaults to none.
-ms-wrap-flow - Archive of obsolete content
the -ms-wrap-flow css property is a microsoft extension that specifies how exclusions impact inline content within block-level
elements.
... initial valueautoapplies toblock-level
elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values auto for floated
elements, an exclusion is created; for all other
elements, an exclusion is not created.
...this property specifies that the exclusion element (the exclusion) can be positioned in various ways, and that inline content will wrap around the exclusion in a way similar to how it wraps around floated
elements.
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
n the raw data var s = new java.io.inputstreamreader( c.getinputstream() ); var b = new java.io.bufferedreader( s ); var l, str = ""; while( ( l = b.readline() ) != null ) { // skip if( l != "" ) { str = str + l + "\n"; } } // define the namespaces, first the default, // then additional namespaces default xml namespace = "http://purl.org/rss/1.0/"; var dc = new namespace( "http://purl.org/dc/
elements/1.1/" ); var rdf = new namespace( "http://www.w3.org/1999/02/22-rdf-syntax-ns#" ); // use e4x to process the feed var x = new xml( str ); for each( var i in x..item ) { print( "title: " + i.title + "\n" ); print( "about: " + i.@rdf::about + "\n" ); print( "link: " + i.link + "\n" ); print( "date: " + i.dc::date + "\n" ); } the first half of this script is standard j...
...defining these namespaces becomes important if we want to be able to access any data
elements in the feed defined in these namespaces.
...dler }); // create the form panel, attach the inputs form_comments = new ext.form.formpanel({ labelalign: "right", width: 400, title: "comments", items: [ txt_name, txt_email, txt_message, btn_comments ], renderto: "form-comments" }); }); </script> the code in listing 6 starts by hooking in the ext js library which is used to produce the ui
elements of the form.
Mozilla XForms Specials - Archive of obsolete content
(limitation tracked in bug 313111)pseudo element support there is no support for the pseudo
elements (::value, ::repeat-item, and ::repeat-index ).
...} the pseudo
elements are defined in the css3 basic user interface specification .
...labelposition for xforms:input
elements bound to a boolean node we support an attribute labelposition in the namespace http://www.mozilla.org/projects/xfor...009/extensions, which allows the form author to define on which side of the checkbox the label will be shown.
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
summary: when in quirks mode, gecko-based browsers will appear to ignore inheritance of font styles into tables from parent
elements.
...if a css property can be inherited, then table
elements and their components (tr, td, etc.) should inherit just as any other element would.
...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.
Audio for Web games - Game development
let's add some javascript to make this work: var myaudio = document.getelementbyid('myaudio'); var buttons = document.get
elementsbytagname('button'); var stoptime = 0; for (var i = 0; i < buttons.length; i++) { buttons[i].addeventlistener('click', function() { myaudio.currenttime = this.getattribute("data-start"); stoptime = this.getattribute("data-stop"); myaudio.play(); }, false); } myaudio.addeventlistener('timeupdate', function() { if (this.currenttime > stoptime) { this.pause(); } }, false); ...
... let's create our audio context: // for cross browser compatibility const audiocontext = window.audiocontext || window.webkitaudiocontext; const audioctx = new audiocontext(); now let's select all the <li>
elements; later we can harness these
elements to give us access to the track file path and each individual play button.
... let offset = 0; function playtrack(audiobuffer) { const tracksource = audioctx.createbuffersource(); tracksource.buffer = audiobuffer; tracksource.connect(audioctx.destination) if (offset == 0) { tracksource.start(); offset = audioctx.currenttime; } else { tracksource.start(0, audioctx.currenttime - offset); } return tracksource; } finally, let's loop over our <li>
elements, grab the correct file for each one and then allow playback by hiding the "loading" text and displaying the play button: trackels.foreach((el, i) => { // get children const anchor = el.queryselector('a'); const loadtext = el.queryselector('p'); const playbutton = el.queryselector('button'); // load file loadfile(anchor.href).then((track) => { // set loading to false el.dat...
Gecko FAQ - Gecko Redirect 1
by the end of calendar year 2000, gecko is expected to support the following recommended open internet standards fully except for the areas noted below and open bugs documented in bugzilla: html 4.0 - full support except for:
elements: bdo, basefont attributes: shape attribute on the a element, abbr, axis, headers, scope-row, scope-col, scope-rowgroup, scope-colgroup, charoff, datasrc, datafld, dataformat, datapagesize, summary, event, dir, align on table columns, label attribute of option, alternate text of area
elements, longdesc various metadata attributes: cite, datetime, lang, hreflang bidirectional text layout, ...
...which is only used in hebrew and arabic (ibm has begun work to add bidi support in a future release) style sheets css 1 - full support, except for: the application of styles to html column
elements the ability to turn off author styles the names of certain mozilla extension pseudo-classes lack the moz- prefix css 2 - partial support is expected and has already been built into gecko, including support for css2 positioning, but no commitment has been made to achieve a specific level of support dom level 0 level 1 core: full support making entityreferences available through dom1; per a provision of the dom1 spec for xml implementations, entities will be automatically expanded inline and therefore not available through dom1; our impl...
... layout component tracks content layout bugs that may be related to a variety of specifications html 4.0
elements, form controls, frames, tables, and form submission bug reports marked with the html4 keyword "meta bug" for tracking outstanding issues with html 4.01 compliance css: style system component (see also bug reports marked with the css1, css2, and css3 keywords) dom: see dom0, dom1, dom2 and event handling components xml rdf core javascript language interpreter (javascript engine) h...
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
code sample the following code aims to let <xi:include> and <xi:fallback> tags (the two
elements in the language) with all of the attributes of <xi:include> be included in an xml document so as to be resolvable into a single xml document.
...should become: var href = getxmlbaselink (/* xlink sans xml:base */ xinclude.getattribute('href'), /* element to query from */ xinclude); function resolvexincludes(docu) { // http://www.w3.org/tr/xinclude/#xml-included-items var xincludes = docu.get
elementsbytagnamens('http://www.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.get
elementsbytagnamens('http://www.w3.org/2001/xinclude', 'fallback')[0]; // only one such child is allowed if (href === '' || href === null) { // points to same document if empty (null is equivalent to empty string) href = null; // set for uniformity in testing below if (parse === 'xml' && xpointer === null) { alert('there must be an xpointer attribute present if "href" is empty an parse is "xml"');...
Assessment: Accessibility troubleshooting - Learn web development
if the online editor you are using doesn't have a separate css/js panel, feel free to put them in appropriate <style> / <script>
elements.
...once you add paragraph
elements, you'll notice the styling looking better.
... 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?
Handling different text directions - Learn web development
so the writing-mode property is in reality setting the direction in which block-level
elements are displayed on the page — either from top-to-bottom, right-to-left, or left-to-right.
... writing modes and block and inline layout we have already discussed block and inline layout, and the fact that some things display as block
elements and others as inline
elements.
... previous overview: building blocks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-
elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form
elements styling tables debugging css organizing your css ...
Test your skills: Grid Layout - Learn web development
you will be working through three small tasks which use different
elements of the material you have just covered.
... grid layout one in this task you should create a grid into which the four child
elements will auto-place.
...by editing the css rules for the two child
elements, cause them to span over several grid tracks each; the second item should overlay the first as in the image below.
What is CSS? - Learn web development
using css you can control exactly how html
elements look in the browser, presenting your markup using whatever design you like.
... 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.
...ebviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfont-familychrome full support 1edge full support 12firefox full support 1notes full support 1notes notes not supported on option
elements.
Structuring a page of content - Learn web development
project brief for this project, your task is to take the content for the homepage of a bird watching website and add structural
elements to it so it can have a page layout applied to it.
... the provided css is designed so that when the correct structural
elements are added to the markup, they will appear green in the rendered page.
... if you are getting stuck and can't envisage what
elements to put where, draw out a simple block diagram of the page layout, and write on the
elements you think should wrap each block.
Adding vector graphics to the Web - Learn web development
it's basically markup, like html, except that you've got many different
elements for defining the shapes you want to appear in your image, and the effects you want to apply to those shapes.
...at the simplest end of the spectrum, you've got
elements for creating simple shapes, like <circle> and <rect>.
... you can assign classes and ids to svg
elements and style them with css, either within the svg or wherever you put the css style rules for your html document.
Images in HTML - Learn web development
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.
... our above code would give us the following result: note:
elements like <img> and <video> are sometimes referred to as replaced
elements.
... a better solution, is to use the html5 <figure> and <figcaption>
elements.
Responsive images - Learn web development
vector images are great for simple graphics, patterns, interface
elements, etc., but it starts to get very complex to create a vector-based image with the kind of detail that you'd find in say, a photo.
...like <video> and <audio>, the <picture> element is a wrapper containing several <source>
elements that provide different sources for the browser to choose from, followed by the all-important <img> element.
... the code in responsive.html looks like so: <picture> <source media="(max-width: 799px)" srcset="elva-480w-close-portrait.jpg"> <source media="(min-width: 800px)" srcset="elva-800w.jpg"> <img src="elva-800w.jpg" alt="chris standing up holding his daughter elva"> </picture> the <source>
elements include a media attribute that contains a media condition — as with the first srcset example, these conditions are tests that decide which image is shown — the first one that returns true will be displayed.
Client-side storage - Learn web development
the javascript file contains five declared constants containing references to the <ul> element the notes will be displayed in, the title and body <input>
elements, the <form> itself, and the <button>.
...when you first run the example, it downloads all the videos from the network, stores them in an indexeddb database, and then displays the videos in the ui inside <video>
elements.
... }; last but not least, we have displayvideo(), which creates the dom
elements needed to insert the video in the ui and then appends them to the page.
Multimedia: Images - Learn web development
and finally, should you want to include animated images into your page, then know that safari allows using video files within <img> and <picture>
elements.
...that's where you would need to upgrade your <picture> and <source>
elements with media and/or sizes attributes.
... the first thing to check is that your content images use <img>
elements and your background images are defined in css with background-image — images referenced in <img>
elements are assigned a higher loading priority than background images.
Perceived performance - Learn web development
if some assets are going to be slower to load than others, with
elements loading after other content has already been painted to the screen, plan ahead and leave space in the layout for them so that content doesn't jump or resize, especially after the site has become interactive.
... 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.
Rendering a list of Vue components - Learn web development
directives are applied to
elements like other attributes.
...to help vue optimize rendering the
elements in the list, it tries to patch list
elements so it's not recreating them every time the list changes.
...to make sure it is re-using list
elements appropriately, it needs a unique "key" on the same element that you attach v-for to.
Mozilla accessibility architecture
xul
elements are checked for support of the nsiaccessibleprovider interface, which can return an accessible.
... html
elements ask the node's primary frame for an accessible via nsiframe::getaccessible().
... nsouterdocaccessible: used for
elements such as <iframe>, <browser> and <editor>, which spawn an entire new document, but don't actually have any child nodes in their own dom.
Accessibility information for UI designers and developers
this includes form
elements like inputs and select boxes, but also buttons.
... for form
elements, it should be clear what kind of input is expected.
... see also: heading
elements join the mozilla accessibility community live chat both end users and developers are invited for discussion on the live irc channel at irc.mozilla.org/#accessibility.
Experimental features in Firefox
nightly 75 no developer edition 75 no beta 75 no release 75 no preference name layout.css.conic-gradient.enabled and gfx.webrender.all pseudo-class: :focus-visible allows focus styles to be applied to
elements like buttons and form controls, only when they are focused using the keyboard (e.g.
... when tabbing between
elements), and not when they are focused using a mouse or other pointing device.
... nightly 64 no developer edition 64 no beta 64 no release 64 no preference name media.setsinkid.enabled htmlmediaelement properties: audiotracks and videotracks enabling this feature adds the htmlmediaelement.audiotracks and htmlmediaelement.videotracks properties to all html media
elements.
MathML Accessibility in Mozilla
, b ⏞ ℓ b 's ⏟ k + ℓ
elements } __________ the set modified modified a comma ...
... comma b with modified over brace with script l b apostraphes above above with modified under brace with k plus script l
elements below below end set __________ { a , ...
...underscript k plus l
elements.
accessibility.tabfocus
the preference accessibility.tabfocus controls what
elements receive focus when the user presses the tab key.
... type:integer default value: 7 (windows and linux); 2 (mac os x) exists by default: no application support:gecko 1.7 status: active introduction: bugs: bug 140612 values 1 give focus only to text fields (default on mac osx) 2 give focus to all form
elements except text fields.
...the value 7 (give focus to all
elements) is the default on windows and linux.
NSS API Guidelines
accessor functions, for these data
elements, should be added to the api.
...some return allocated arrays of data, some return linked lists of data, others use callbacks to return data
elements one at a time.
... layer_datatypeextractdatatype() -- get a pointer to the second data type which was derived for
elements of the first data type.
JSAPI User Guide
the spidermonkey universe in order to run any javascript code in spidermonkey, an application must have three key
elements: a jsruntime, a jscontext, and a global object.
... a minimal example each of the three key
elements described in the previous section requires a few jsapi calls: the runtime: use js_newruntime to create it and js_destroyruntime to clean it up when you're done.
....; break; } } return true; } defining classes this pulls together the above api
elements by defining a constructor function, a prototype object, and properties of the prototype and of the constructor, all with one api call.
Parser API
interface arrayexpression <: expression { type: "arrayexpression";
elements: [ expression | null ]; } an array expression.
... interface arraypattern <: pattern { type: "arraypattern";
elements: [ pattern | null ]; } an array-destructuring pattern.
... interface xmllist <: xml, expression { type: "xmllist"; contents: [ xml ]; } an e4x literal representing a list of xml
elements.
nsICategoryManager
ractid(ns_categorymanager_contractid, ns_get_iid(nsicategorymanager), getter_addrefs(catmgr)); if (ns_failed(rv)) return rv; nscomptr<nsisimpleenumerator> cats; rv = catmgr->enumeratecategories(getter_addrefs(cats)); if (ns_failed(rv)) return rv; prbool hasmore; while (ns_succeeded(cats->hasmore
elements(&hasmore) && hasmore) { nscomptr<nsisupports> elem; cats->getnext(getter_addrefs(elem)); nscomptr<nsisupportscstring> category = do_queryinterface(elem, &rv); if (ns_failed(rv)) break; nsembedcstring categoryname; rv = category->getdata(categoryname); if (ns_failed(rv)) break; printf("%s\n", categoryname.get()); } return ns_ok; } this snippe...
... var categorymanager = components.classes["@mozilla.org/categorymanager;1"] .getservice(components.interfaces.nsicategorymanager); var enumerator = categorymanager.enumeratecategories(); var categories = []; while (enumerator.hasmore
elements()) { var item = enumerator.getnext(); var category = item.queryinterface(components.interfaces.nsisupportscstring) categories.push(category.tostring()); } categories.sort(); var categoriesstring = categories.join("\n"); dump(categoriesstring + "\n"); print out a list of app-startup entries this example prints out a list of entries of "app-startup" category.
... var categorymanager = components.classes["@mozilla.org/categorymanager;1"] .getservice(components.interfaces.nsicategorymanager); var enumerator = categorymanager.enumeratecategory("app-startup"); var entries = []; while (enumerator.hasmore
elements()) { var item = enumerator.getnext(); var entry = item.queryinterface(components.interfaces.nsisupportscstring) entries.push(entry.tostring()); } entries.sort(); var entriesstring = entries.join("\n"); dump(entriesstring + "\n"); disable currently loaded plugins by type this snippet here shows how to disable plugins that are currently loaded for the file type of pdf.
nsIDOMWindowUtils
elementsrestyled read only unsigned long long the number of
elements which have been restyled for the current document.
...this number also counts restyling of pseudo-
elements and anonymous boxes.
... audiomuted boolean with this it's possible to mute all the media
elements in this window.
nsIHTMLEditor
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.
... void indent( in astring aindent ); parameters aindent insertelementatselection() insert an element, which may have child nodes, at the selection used primarily to insert a new element for various insert element dialogs, but it enforces the html 4.0 dtd "cancontain" rules, so it should be useful for other
elements.
... the selection is set to parent-of-aelement with an offset 1 greater than aelement's offset but it enforces the html 4.0 dtd "cancontain" rules, so it should be useful for other
elements.
nsIIOService
but if the load is coming from a js api (such as xmlhttprequest) or if the load might be coalesced across multiple
elements (such as for ) then pass in the document node instead.
...but if the load is coming from a js api (such as xmlhttprequest) or if the load might be coalesced across multiple
elements (such as for <img>) then pass in the document node instead.
...but if the load is coming from a js api (such as xmlhttprequest) or if the load might be coalesced across multiple
elements (such as for ) then pass in the document node instead.
XPCOM Interface Reference by grouping
(i'm fully aware that this will be a great point of discussion and probably will end in tears, but since i'm the first person to apparently take a swing at this, i get first dibs.) the primary sections consist of: browser this section contains
elements associated with the view pane or the content of the "browser window" proper.
... security this section contains apis for secure channel communications system this section contains application level interfaces including calls to external support
elements (such as device calls).
... user this section contains
elements specific to a given user's data storage.
Building a Thunderbird extension 5: XUL
we add widgets by inserting new xul dom
elements into the application window and modify them using scripts and attaching event handlers.
... while xul provides the
elements of the user interface, actions are written in javascript.
...when parsing our overlay file, the xul engine will take all child
elements of the <statusbar> tag and merge them with the original xul document's <statusbar> tag.
ArrayType
ctype arraytype() type[ length] ); parameters type: it represents the type of the
elements or variable which is going to be present in an array length optional it denotes the number of entries present in an array or the number of
elements that an array should contain.
... properties property type description elementtype ctype the data type of the
elements in an array type.
... length number the number of
elements in the array, or undefined if the array type doesn't have a specified length.
DOM Inspector FAQ - Firefox Developer Tools
those text nodes are actually the newlines and spacing between the
elements.
... how do i inspect pseudo-classes and pseudo-
elements in the css rules viewer?
... there is currently no way to inspect dynamically-applied rules for other pseudo-classes or any pseudo-
elements from the dom inspector ui.
DOM Inspector internals - Firefox Developer Tools
shared structure overlays taking a look at the contents of inspector.xul, dom inspector's primary ui, will reveal that it contains almost no visible
elements.
...even most of the
elements that aren't visible, such as key- and commandsets, are not defined in inspector.xul.
... commandoverlay.xul the popupoverlay.xul-provided menuitems that delegate to external command
elements have their commands defined here.
Debugger.Script - Firefox Developer Tools
the
elements of the array are objects, each of which describes a single entry point, and contains the following properties: linenumber: the line number for which offset is an entry point columnnumber: the column number for which offset is an entry point offset: the bytecode instruction offset of the entry point for example, suppose we have a script for the following source co...
...the
elements of the array are objects, each of which describes a single opcode, and contains the following properties: linenumber: the line number of the current opcode.
... getchildscripts() if the instance refers to a jsscript, return a new array whose
elements are debugger.script objects for each function in this script.
Index - Firefox Developer Tools
61 examine event listeners guide, inspector, tools the inspector shows the word "event" next to
elements in the html pane, that have event listeners bound to them: 62 examine and edit css guide, inspector, tools you can examine and edit css in the inspector's css pane.
...the page, the box model for the element is shown overlaid on the page: 65 inspect and select colors guide, inspector, tools in the css pane's rules view, if a rule contains a color value, you'll see a sample of the color next to the value: 66 open the inspector guide, inspector, tools there are two main ways to open the inspector: 67 reposition
elements in the page starting in firefox 48 you can move absolutely positioned
elements by dragging them around the page.
... 69 select and highlight
elements the selected element is the element in the page that the inspector is currently focused on.
Examine and edit CSS - Firefox Developer Tools
highlight matched
elements: next to the selector is a target icon: click this to highlight all nodes in the page that match this selector.
... displaying pseudo-
elements the rule view displays the following pseudo-
elements, if they are applied to the selected element: ::after ::backdrop ::before ::first-letter ::first-line ::selection :-moz-color-swatch :-moz-number-spin-box :-moz-number-spin-down :-moz-number-spin-up :-moz-number-text :-moz-number-wrapper :-moz-placeholder :-moz-progress-bar :-moz-range-progress :-moz-range-thumb :-moz-range-tr...
...ack :-moz-selection if the selected element has pseudo-
elements applied to it, they are displayed before the selected element but hidden by a disclosure triangle: clicking the triangle displays them: viewing common pseudo-classes there's a button to the right of the filter box: click the button to see checkboxes that you can use to enable the :hover, :active and :focus, :focus-within and :visited pseudo-classes for the selected element: this feature can also be accessed from the popup menu in the html view.
Work with animations - Firefox Developer Tools
starting in firefox 48, it will show animations applied to the ::before and ::after pseudo-
elements.
...transform: 'scale(1)', filter: 'grayscale(100%)' }, { filter: 'grayscale(100%)', offset: 0.333 }, { transform: 'scale(1.5)', offset: 0.666 }, { transform: 'scale(1.5)', filter: 'grayscale(0%)' } ]; application to the example applying all this to our example, we can see that: the animation involved two
elements, span#note and img#icon.
... hovering over these selectors, we can see that those
elements are, respectively, the browser name "firefox developer edition" and the browser icon.
Tips - Firefox Developer Tools
when selecting
elements: shift + click to select an element but keep selecting (picker mode doesn't disengage).
... use ←/→ to navigate to parents/children
elements (if they're hard to select).
... in the rules view: click the inspector icon () next to any selector to highlight all
elements that match it.
ANGLE_instanced_arrays - Web APIs
ext.drawarraysinstancedangle() behaves identically to gl.drawarrays() except that multiple instances of the range of
elements are executed, and the instance advances for each iteration.
... ext.draw
elementsinstancedangle() behaves identically to gl.draw
elements() except that multiple instances of the set of
elements are executed and the instance advances between each set.
... ext.vertexattribdivisorangle() modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with ext.drawarraysinstancedangle() and ext.draw
elementsinstancedangle().
AbstractRange - Web APIs
contents of
elements when trying to access the contents of an element, keep in mind that the element itself is a node, but so is any text inside it.
...g thing happened on the way to the forum...</p> <aside class="callout"> <h2>aside</h2> <p>an interesting aside to share with you...</p> </aside> </section> </article> <pre id="log"></pre> </div> after loading the html and constructing the dom representation of the document, the resulting dom tree looks like this: in this diagram, the nodes representing html
elements are shown in green.
...each element's contents are linked below it in the tree, potentially spawning a series of branches below as
elements include other
elements and text nodes.
AnalyserNode.getFloatFrequencyData() - Web APIs
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.
...microphone input const audioele = new audio(); audioele.src = 'my-audio.mp3';//insert file name here audioele.autoplay = true; audioele.preload = 'auto'; const audiosourcenode = audioctx.createmedia
elementsource(audioele); //create analyser node const analysernode = audioctx.createanalyser(); analysernode.fftsize = 256; const bufferlength = analysernode.frequencybincount; const dataarray = new float32array(bufferlength); //set up audio node network audiosourcenode.connect(analysernode); analysernode.connect(audioctx.destination); //create 2d canvas const canvas = document.createelement('canvas');...
CustomElementRegistry - Web APIs
the customelementregistry interface provides methods for registering custom
elements and querying registered
elements.
... to get an instance of it, use the window.custom
elements property.
...eate text node and add word count to it var text = document.createelement('span'); text.textcontent = count; // append it to the shadow root shadow.appendchild(text); // update count when element content changes setinterval(function() { var count = 'words: ' + countwords(wcparent); text.textcontent = count; }, 200) } } // define the new element custom
elements.define('word-count', wordcount, { extends: 'p' }); note: the customelementregistry is available through the window.custom
elements property.
Document.querySelector() - Web APIs
see locating dom
elements using selectors for more about selectors and how to manage them.
... if you need a list of all
elements matching the specified selectors, you should use queryselectorall() instead.
... css pseudo-
elements will never return any
elements, as specified in the selectors api.
Document.scripts - Web APIs
the scripts property of the document interface returns a list of the <script>
elements in the document.
...you can use this just like an array to get all the
elements in the list.
... example this example looks to see if the page has any <script>
elements.
DocumentOrShadowRoot.activeElement - Web APIs
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.
DocumentOrShadowRoot.elementFromPoint() - Web APIs
elements with pointer-events set to none will be ignored, and the element below it will be returned.
... result specifications specification status shadow domthe definition of '
elementsfrompoint()' in that specification.
... obsolete css object model (cssom) view modulethe definition of '
elementsfrompoint()' in that specification.
Element.getAnimations() - Web APIs
it can optionally return animation objects for descendant
elements too.
...this includes animations that target any css pseudo-
elements attached to element or one of its descendents.
... return value an array of animation objects, each representing an animation currently targetting the element on which this method is called, or one of its descendant
elements if { subtree: true } is specified.
Element.innerHTML - Web APIs
doing so causes the user agent to follow these steps: the specified value is parsed as html or xml (based on the document type), resulting in a documentfragment object representing the new set of dom nodes for the new
elements.
... for all other
elements, the element's contents are replaced with the nodes in the new documentfragment.
... however, there are ways to execute javascript without using <script>
elements, so there is still a security risk whenever you use innerhtml to set strings over which you have no control.
Element.localName - Web APIs
ecomm:partners, partners is the local name and ecomm is the prefix: <ecomm:business id="soda_shop" type="brick_n_mortar" xmlns:ecomm="http://example.com/ecomm"> <ecomm:partners> <ecomm:partner id="1001">tony's syrup warehouse </ecomm:partner> </ecomm:partner> </ecomm:business> note: in gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for html
elements in html doms (as opposed to xhtml
elements in xml doms).
... in later versions, in compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html
elements in html doms and xhtml
elements in xml doms.
... the tagname property continues to return in the upper case for html
elements in html doms.
Event.composed - Web APIs
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 first definition looks like this, for example: custom
elements.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...
... you'll notice a difference in the value of composedpath for the two
elements.
Event.composedPath() - Web APIs
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 first definition looks like this, for example: custom
elements.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...
...second, you'll notice a difference in the value of composedpath for the two
elements.
HTMLFieldSetElement - Web APIs
the htmlfieldsetelement interface provides special properties and methods (beyond the regular htmlelement interface it also has available to it by inheritance) for manipulating the layout and presentation of <fieldset>
elements.
... htmlfieldsetelement.
elementsread only the
elements belonging to this field set.
... recommendation the following properties have been added: disabled,
elements, name, type, valdiationmessage, validity, and willvalidate.
HTMLImageElement - Web APIs
the htmlimageelement interface represents an html <img> element, providing the properties and methods used to manipulate image
elements.
...this is different from a client-side image map, specified using an <img> element and a corresponding <map> which contains <area>
elements indicating the clickable areas in the image.
...the <map> in turn contains <area>
elements indicating the clickable areas in the image.
HTMLScriptElement - Web APIs
html <script>
elements expose the htmlscriptelement interface, which provides special properties and methods for manipulating the behavior and execution of <script>
elements (beyond the inherited htmlelement interface).
... htmlscriptelement.event is a domstring; an obsolete way of registering event handlers on
elements in an html document.
... note: when inserted using the document.write() method, <script>
elements execute (typically synchronously), but when inserted using innerhtml or outerhtml, they do not execute at all.
HTMLSelectElement.selectedOptions - Web APIs
the read-only htmlselectelement property selectedoptions contains a list of the <option>
elements contained within the <select> element that are currently selected.
... html the html that creates the selection box and the <option>
elements representing each of the food choices looks like this: <label for="foods">what do you want to eat?</label><br> <select id="foods" name="foods" size="7" multiple> <option value="1">burrito</option> <option value="2">cheeseburger</option> <option value="3">double bacon burger supreme</option> <option value="4">pepperoni pizza</option> <option value="5">taco</option> </select> <br> <butto...
...note also the <button>, whose role it is to trigger fetching the htmlcollection of selected
elements using the selected property.
IntersectionObserver.observe() - Web APIs
the intersectionobserver method observe() adds an element to the set of target
elements being watched by the intersectionobserver.
... one observer has one set of thresholds and one root, but can watch multiple target
elements for visibility changes in keeping with those.
...note that this design allows multiple
elements' intersection changes to be processed by a single call to the callback.
Media Session API - Web APIs
the mediasession interface lets users control playback of media through user-agent defined interface
elements.
... interaction with these
elements even trigger handlers in the web page, playing the media.
...*/ }); } some user agents disable autoplay for media
elements on mobile devices and require a user gesture to start media.
Node.localName - Web APIs
comm:partners, partners is the local name and ecomm is the prefix: <ecomm:business id="soda_shop" type="brick_n_mortar" xmlns:ecomm="http://example.com/ecomm"> <ecomm:partners> <ecomm:partner id="1001">tony's syrup warehouse </ecomm:partner> </ecomm:partners> </ecomm:business> note: in gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for html
elements in html doms (as opposed to xhtml
elements in xml doms).
... in later versions, in compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html
elements in html doms and xhtml
elements in xml doms.
... the tagname property continues to return in the upper case for html
elements in html doms.
Node.textContent - Web APIs
although the names seem similar, there are important differences: textcontent gets the content of all
elements, including <script> and <style>
elements.
... in contrast, innertext only shows “human-readable”
elements.
...in contrast, innertext is aware of styling and won’t return the text of “hidden”
elements.
Node - Web APIs
note: in firefox 3.5 and earlier, the property upper-cases the local name for html
elements (but not xhtml
elements).
... note: in firefox 3.5 and earlier, html
elements are in no namespace.
... in later versions, html
elements are in the http://www.w3.org/1999/xhtml/ namespace in both html and xml trees.
NonDocumentTypeChildNode - Web APIs
nondocumenttypechildnode.previous
elementsibling read only returns the element immediately prior to this node in its parent's children list, or null if there is no element in the list prior to this node.
... nondocumenttypechildnode.next
elementsibling read only returns the element immediately following this node in its parent's children list, or null if there is no element in the list following this node.
...the previous
elementsibling and next
elementsibling are now defined on the latter.
OES_element_index_uint - Web APIs
the oes_element_index_uint extension is part of the webgl api and adds support for gl.unsigned_int types to webglrenderingcontext.draw
elements().
... extended methods this extension extends webglrenderingcontext.draw
elements(): the type parameter now accepts gl.unsigned_int.
... examples var ext = gl.getextension('oes_element_index_uint'); gl.draw
elements(gl.points, 8, gl.unsigned_int, 0); specifications specification status comment oes_element_index_uintthe definition of 'oes_element_index_uint' in that specification.
ParentNode - Web APIs
see locating dom
elements using selectors to learn how to use css selectors to find nodes or
elements of interest.
... properties parentnode.childelementcount read only returns the number of children of this parentnode which are
elements.
... parentnode.queryselectorall() returns a nodelist representing a list of
elements with the current element as root that matches the specified group of selectors.
getBBox() - Web APIs
the coordinates returned are with respect to the current svg space (after the application of all geometry attributes on all the
elements contained in the target element).
...this value is irrespective of any transformation attribute applied to it or the parent
elements.
... recommendation initial definition (applies to svg
elements only).
Visual Viewport API - Web APIs
the layout viewport covers all the
elements on a page and the visual viewport is what is actually visible on the screen.
...the visual viewport lets web developers solve this by positioning
elements relative to what's shown on screen.
...these events allow you to position
elements relative to the visual viewport that would normally be anchored to the layout viewport.
WebGLRenderingContext.getVertexAttrib() - Web APIs
gl.vertex_attrib_array_stride: returns a glint indicating the number of bytes between successive
elements in the array.
... 0 means that the
elements are sequential.
... gl.current_vertex_attrib: returns a float32array (with 4
elements) representing the current value of the vertex attribute at the given index.
WebGLRenderingContext - Web APIs
webglrenderingcontext.draw
elements() renders primitives from element array data.
... working with extensions these methods manage webgl extensions: webglrenderingcontext.getsupportedextensions() returns an array of domstring
elements with all the supported webgl extensions.
...oes not seem to support html5 canvas.</canvas> <canvas>your browser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { display : inline-block; width : 120px; height : 80px; margin : auto; padding : 0; border : none; background-color : black; } window.addeventlistener("load", function() { "use strict" var firstcanvas = document.get
elementsbytagname("canvas")[0], secondcanvas = document.get
elementsbytagname("canvas")[1]; firstcanvas.width = firstcanvas.clientwidth; firstcanvas.height = firstcanvas.clientheight; [firstcanvas, secondcanvas].foreach(function(canvas) { var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { document.queryselector("p").innerhtml = "...
Creating 3D objects using WebGL - Web APIs
to do this efficiently, we're going to switch from drawing using the vertices directly by calling the gl.drawarrays() method to using the vertex array as a table, and referencing individual vertices in that table to define the positions of each face's vertices, by calling gl.draw
elements().
... drawing the cube next we need to add code to our drawscene() function to draw using the cube's index buffer, adding new gl.bindbuffer() and gl.draw
elements() calls: // tell webgl which indices to use to index the vertices gl.bindbuffer(gl.element_array_buffer, buffers.indices); ...
... { const vertexcount = 36; const type = gl.unsigned_short; const offset = 0; gl.draw
elements(gl.triangles, vertexcount, type, offset); } since each face of our cube is comprised of two triangles, there are 6 vertices per side, or 36 total vertices in the cube, even though many of them are duplicates.
A simple RTCDataChannel sample - Web APIs
in this example, we will open an rtcdatachannel connection linking two
elements on the same page.
...we grab references to all the page
elements we'll need to access, then set event listeners on the three buttons.
... sendchannel.close(); receivechannel.close(); // close the rtcpeerconnections localconnection.close(); remoteconnection.close(); sendchannel = null; receivechannel = null; localconnection = null; remoteconnection = null; // update user interface
elements connectbutton.disabled = false; disconnectbutton.disabled = true; sendbutton.disabled = true; messageinputbox.value = ""; messageinputbox.disabled = true; } this starts by closing each peer's rtcdatachannel, then, similarly, each rtcpeerconnection.
Using DTMF with WebRTC - Web APIs
each time a tone is sent, the rtcpeerconnection receives a tonechange event with a tone property specifying which tone finished playing, which is an opportunity to update interface
elements, for example.
... html the html for this example is very basic; there are only three
elements of importance: an <audio> element to play the audio received by the rtcpeerconnection being "called." a <button> element to trigger creating and connecting the two rtcpeerconnection objects, then sending the dtmf tones.
... initialization when the page loads, we do some basic setup: we fetch references to the dial button and the log output box
elements, and we use addeventlistener() to add an event listener to the dial button so that clicking it calls the connectanddial() function to begin the connection process.
Web Video Text Tracks Format (WebVTT) - Web APIs
3 00:02:25.000 --> 00:02:30.000 - ta en kopp styling webvtt cues you can style webvtt cues by looking for
elements which match the ::cue pseudo-element.
... within site css video::cue { background-image: linear-gradient(to bottom, dimgray, lightgray); color: papayawhip; } video::cue(b) { color: peachpuff; } here, all video
elements are styled to use a gray linear gradient as their backgrounds, with a foreground color of "papayawhip".
... it is one of the good features supported by webvtt is the localization and use of class
elements which can be used in same way they are used in html and css to classify the style for particular type of objects, but here these are used for styling and classifying the cues as shown below: webvtt 04:02.500 --> 04:05.000 j’ai commencé le basket à l'âge de 13, 14 ans 04:05.001 --> 04:07.800 sur les <i.foreignphrase><lang en>playground</lang></i>, ici à montpellier in the above example i...
Web Animations API - Web APIs
animation of dom
elements.
... concepts and usage the web animations api provides a common language for browsers and developers to describe animations on dom
elements.
... document.getanimations() returns an array of animation objects currently in effect on
elements in the document.
Window.getComputedStyle() - Web APIs
omitted (or null) for real
elements.
...non-
elements, like a text node, will throw an error.
... use with pseudo-
elements getcomputedstyle can pull style info from pseudo-
elements (such as ::after, ::before, ::marker, ::line-marker — see the pseudo-element spec).
Using the presentation role - Accessibility
the presentation role is used to remove semantic meaning from an element and any of its related child
elements.
... for example, a table used for layout purposes could have the presentation role applied to the table element to remove any semantic meaning from the table element and any of its table related children
elements, such as table headers and table data
elements.
... non-table related
elements should retain their semantic meaning, however.
ARIA: contentinfo role - Accessibility
contentinfo landmarks present in content embedded via <iframe>
elements do not count towards this limit.
... mega-footers do not nest additional <footer>
elements or contentinfo landmarks inside of the document's footer.
... use other content sectioning
elements instead.
ARIA: feed role - Accessibility
another feature of the feed pattern is skim reading: articles within a feed can contain both an accessible name with the aria-label and a description with an aria-describedby, suggesting to screen readers which
elements to speak after the label when navigating by article.
... by identifying the
elements inside of an article that provide the title and the primary content, assistive technologies can provide functions that enable users to jump from article to article and efficiently discern which articles they want to read.
...each article should preferably have aria-describedby referring to one or more
elements inside the article that serve as the primary content of the article.
ARIA: figure role - Accessibility
again, this can be done semantically, without aria, with html's <figure> and <figcaption>
elements <figure> ...
... note: if at all possible in your work, you should use the appropriate semantic html
elements to mark up a figure and its caption — <figure> and <figcaption>.
... if at all possible, you should use the appropriate semantic html
elements to mark up a figure and its caption — <figure> and <figcaption>.
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.
... you shouldn't count on the alt text of individual
elements images for conveying context to assistive technologies; most screenreaders will consider the element with role="img" set on it to be to be like a black box, and not access the individual
elements inside it.
ARIA: dialog role - Accessibility
in addition to the needed control, dialogs can contain any number of focusable
elements, even entire forms or other container widgets like tabs.
... for most dialogs, the expected behavior is that the dialog's tab order wraps, which means that when the user tabs through the focusable
elements in the dialog, the first focusable element will be focused after the last one has been reached.
...sts</label> <textarea id="interests"></textarea> </p> <p> <input type="checkbox" id="autologin"/> <label for="autologin">auto-login?</label> </p> <p> <input type="submit" value="save information"/> </p> </form> </div> working examples: jquery-ui dialog notes note: while it is possible to prevent keyboard users from moving focus to
elements outside of the dialog, screen reader users may still be able to navigate to that content using their screen reader's virtual cursor.
HTML To MSAA - Accessibility
remarks the table below shows how gecko maps html
elements to msaa.
... this table reflects mapping rules for specific
elements only, it doesn't reflect any general rules applicable to all
elements.
... for example, if name column has n/a value then it means specific
elements doesn't provide own rules to calculate name but name can be computed from aria markup or @title attribute.
Operable - Accessibility
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.
...<h2>) and <label>
elements clearly describe the purpose of the content and form
elements they are supposed to be describing.
... 2.4.7 visible focus for focusable
elements (aa) when tabbing through focusable
elements such as links or form inputs, there should be a visual indicator to show you which element currently has focus.
Perceivable - Accessibility
ui controls such as form
elements and buttons should have text labels that describe their purpose.
...the main situations in which this is relevant are: text labels and the form
elements they describe.
...the order should be made obvious by use of correct semantic
elements (e.g., headings, paragraphs), with css being used to create any unusual layout styles, irrespective of the markup.
::selection - CSS: Cascading Style Sheets
(wcag defines large text as between 18.66px and 24px and bold, 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 specifications specification status comment css pseudo-
elements level 4the definition of '::selection' in that specification.
... note: ::selection was in drafts of css selectors level 3, but it was removed in the candidate recommendation phase because its was under-specified (especially with nested
elements) and interoperability wasn't achieved (based on discussion in the w3c style mailing list).
... it returned in pseudo-
elements level 4.
:active - CSS: Cascading Style Sheets
/* selects any <a> that is being activated */ a:active { color: red; } the :active pseudo-class is commonly used on <a> and <button>
elements.
... other common targets of this pseudo-class include
elements that contain an activated element, and form
elements that are being activated through their associated <label>.
...</p> css a:link { color: blue; } /* unvisited links */ a:visited { color: purple; } /* visited links */ a:hover { background: yellow; } /* hovered links */ a:active { color: red; } /* active links */ p:active { background: #eee; } /* active paragraphs */ result active form
elements html <form> <label for="my-button">my button: </label> <button id="my-button" type="button">try clicking me or my label!</button> </form> css form :active { color: red; } form button { background: white; } result specifications specification status comment html living standardthe definition of ':active' in that specification.
:first-of-type - CSS: Cascading Style Sheets
the :first-of-type css pseudo-class represents the first element of its type among a group of sibling
elements.
... syntax :first-of-type examples styling the first paragraph html <h2>heading</h2> <p>paragraph 1</p> <p>paragraph 2</p> css p:first-of-type { color: red; font-style: italic; } result nested
elements this example shows how nested
elements can also be targeted.
... working draft matching
elements are not required to have a parent.
: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.
... 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>.
... in this example we have a simple custom element — <context-span> — that you can wrap around text: <h1>host selectors <a href="#"><context-span>example</context-span></a></h1> inside the element's constructor, we create style and span
elements, fill the span with the content of the custom element, and fill the style element with some css rules: let style = document.createelement('style'); let span = document.createelement('span'); span.textcontent = this.textcontent; const shadowroot = this.attachshadow({mode: 'open'}); shadowroot.appendchild(style); shadowroot.appendchild(span); style.textcontent = 'span:hover { text-decoration: un...
:indeterminate - CSS: Cascading Style Sheets
the :indeterminate css pseudo-class represents any form element whose state is indeterminate, such as checkboxes which have their html indeterminate attribute set to true, radio buttons which are members of a group in which all radio buttons are unchecked, and indeterminate <progress>
elements.
... /* selects any <input> whose state is indeterminate */ input:indeterminate { background: lime; }
elements targeted by this selector are: <input type="checkbox">
elements whose indeterminate property is set to true by javascript <input type="radio">
elements, when all radio buttons with the same name value in the form are unchecked <progress>
elements in an indeterminate state syntax :indeterminate examples checkbox & radio button this example applies special styles to the labels associated with indeterminate form fields.
... html <div> <input type="checkbox" id="checkbox"> <label for="checkbox">this label starts out lime.</label> </div> <div> <input type="radio" id="radio"> <label for="radio">this label starts out lime.</label> </div> css input:indeterminate + label { background: lime; } javascript var inputs = document.get
elementsbytagname("input"); for (var i = 0; i < inputs.length; i++) { inputs[i].indeterminate = true; } progress bar html <progress> css progress { margin: 4px; } progress:indeterminate { opacity: 0.5; background-color: lightgray; box-shadow: 0 0 2px 1px red; } result specifications specification status comment html living standardthe definition of ':indeterminate' in that specification.
:last-of-type - CSS: Cascading Style Sheets
the :last-of-type css pseudo-class represents the last element of its type among a group of sibling
elements.
... syntax :last-of-type examples styling the last paragraph html <h2>heading</h2> <p>paragraph 1</p> <p>paragraph 2</p> css p:last-of-type { color: red; font-style: italic; } result nested
elements this example shows how nested
elements can also be targeted.
... working draft matching
elements are not required to have a parent.
:not() - CSS: Cascading Style Sheets
the :not() css pseudo-class represents
elements that do not match a list of selectors.
... since pseudo-
elements are not simple selectors, they are not valid arguments to :not(); thus, selectors like :not(p::before) will not work.
... examples html <p>i am a paragraph.</p> <p class="fancy">i am so very fancy!</p> <div>i am not a paragraph.</div> css .fancy { text-shadow: 2px 2px 3px gold; } /* <p>
elements that are not in the class `.fancy` */ p:not(.fancy) { color: green; } /*
elements that are not <p>
elements */ body :not(p) { text-decoration: underline; } /*
elements that are not <div> and not <span>
elements */ body :not(div):not(span) { font-weight: bold; } /*
elements that are not `.crazy` or `.fancy` */ /* note that this syntax is not well supported yet.
:nth-last-of-type() - CSS: Cascading Style Sheets
the :nth-last-of-type() css pseudo-class matches
elements of a given type, based on their position among a group of siblings, counting from the end.
... syntax the nth-last-of-type pseudo-class is specified with a single argument, which represents the pattern for matching
elements, counting from the end.
... working draft matching
elements are not required to have a parent.
:nth-of-type() - CSS: Cascading Style Sheets
the :nth-of-type() css pseudo-class matches
elements of a given type (tag name), based on their position among a group of siblings.
... /* selects every fourth <p> element among any group of siblings */ p:nth-of-type(4n) { color: lime; } syntax the nth-of-type pseudo-class is specified with a single argument, which represents the pattern for matching
elements.
... working draft matching
elements are not required to have a parent.
:visited - CSS: Cascading Style Sheets
full support 18firefox android full support 4opera android full support 10.1safari ios full support 1samsung internet android full support 1.0:visited no longer matches <link>
elementschrome full support 1notes full support 1notes notes chromium has never matched <link>
elements with link pseudo-classes.edge full support 12firefox full support 70ie no support ...
... noopera full support 15notes full support 15notes notes chromium has never matched <link>
elements with link pseudo-classes.safari full support 12webview android full support 4.4notes full support 4.4notes notes chromium has never matched <link>
elements with link pseudo-classes.chrome android full support 18notes full support 18notes notes chromium has never matched <link>
elements with link pseudo-classes.firefox android no support noo...
...pera android full support 14notes full support 14notes notes chromium has never matched <link>
elements with link pseudo-classes.safari ios full support 12samsung internet android full support 1.0notes full support 1.0notes notes chromium has never matched <link>
elements with link pseudo-classes.restrict css properties allowed in a statement using :visited for privacychrome full support 6edge full support 12firefox full support 4ie ...
display-mode - CSS: Cascading Style Sheets
in this mode, the user agent will exclude ui
elements for controlling navigation, but can include other ui
elements such as a status bar.
... minimal-ui minimal-ui the application will look and feel like a standalone application, but will have a minimal set of ui
elements for controlling navigation.
... the
elements will vary by browser.
Color picker tool - CSS: Cascading Style Sheets
var button = document.createelement('div'); button.classname = 'switch_mode'; button.addeventlistener('click', function() { if (this.picker_mode === 'hsv') this.setpickermode('hsl'); else this.setpickermode('hsv'); }.bind(this)); this.node.appendchild(button); }; /*************************************************************************/ // updates properties of ui
elements /*************************************************************************/ colorpicker.prototype.updatecolor = function updatecolor(e) { var x = e.pagex - this.picking_area.offsetleft; var y = e.pagey - this.picking_area.offsettop; var picker_offset = 5; // width and height should be the same var size = this.picking_area.clientwidth; if (x > size) x = size; if (y > size) y = s...
...this.updatepickerposition(); this.updatealphagradient(); this.updatepreviewcolor(); this.notify('red', this.color.r); this.notify('green', this.color.g); this.notify('blue', this.color.b); this.notify('hexa', this.color.gethexa()); notify(this.topic, this.color); }; /*************************************************************************/ // update positions of various ui
elements /*************************************************************************/ colorpicker.prototype.updatepickerposition = function updatepickerposition() { var size = this.picking_area.clientwidth; var value = 0; var offset = 5; if (this.picker_mode === 'hsv') value = this.color.value; if (this.picker_mode === 'hsl') value = this.color.lightness; var x = (this.color.saturati...
... }; colorpicker.prototype.updatealphagradient = function updatealphagradient() { this.alpha_mask.style.backgroundcolor = this.color.gethexa(); }; colorpicker.prototype.updatepreviewcolor = function updatepreviewcolor() { this.preview_color.style.backgroundcolor = this.color.getcolor(); }; /*************************************************************************/ // update input
elements /*************************************************************************/ colorpicker.prototype.inputchangehue = function inputchangehue(e) { var value = parseint(e.target.value); this.sethue(value); this.updatehuepicker(); }; colorpicker.prototype.inputchangesaturation = function inputchangesaturation(e) { var value = parseint(e.target.value); this.color.setsaturation(value); ...
Basic Concepts of grid layout - CSS: Cascading Style Sheets
grids can be used to lay out major page areas or small user interface
elements.
...
elements can be placed onto the grid within these column and row lines.
... in this example, i have a containing div with a class of wrapper and, inside are five child
elements.
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
grid and absolutely positioned
elements grid interacts with absolutely positioned
elements, which can be useful if you want to position an item inside a grid or grid area.
...the contents value of the display property is a new value that is described in the display specification as follows: “the element itself does not generate any boxes, but its children and pseudo-
elements still generate boxes as normal.
... for the purposes of box generation and layout, the element must be treated as if it had been replaced with its children and pseudo-
elements in the document tree.” if you set an item to display: contents the box it would normally create disappears, and the boxes of the child
elements appear as if they have risen up a level.
Stacking without the z-index property - CSS: Cascading Style Sheets
when the z-index property is not specified on any element,
elements are stacked in the following order (from bottom to top): the background and borders of the root element descendant non-positioned blocks, in order of appearance in the html descendant positioned
elements, in order of appearance in the html keep in mind, when the order property alters rendering from the "order of appearance in the html" within flex containers, it similarly affects the order for stacking context.
... in the example below,
elements #1 through #4 are positioned
elements.
... element #5 is static, and so is drawn below the other four
elements, even though it comes later in the html markup.
Basic concepts of CSS Scroll Snap - CSS: Cascading Style Sheets
the scroll-snap-align property must be used on child
elements in order to set the position that scrolling will snap to.
... margins on scroll children the scroll-margin property can be set set on child
elements, essentially defining an outset from the defined box.
... this allows for different amounts of space for different child
elements, and can be used in conjunction with scroll-padding on the parent.
Child combinator - CSS: Cascading Style Sheets
it matches only those
elements matched by the second selector that are the direct children of
elements matched by the first.
... /* list items that are children of the "my-things" list */ ul.my-things > li { margin: 2em; }
elements matched by the second selector must be the immediate children of the
elements matched by the first selector.
... this is stricter than the descendant combinator, which matches all
elements matched by the second selector for which there exists an ancestor element matched by the first selector, regardless of the number of "hops" up the dom.
Layout mode - CSS: Cascading Style Sheets
there are several of them: normal flow — all
elements are part of normal flow until you do something to take them out of it.
... positioned layout, designed for positioning
elements without much interaction with other
elements.
... grid layout, designed for laying out
elements relative to a fixed grid.
Pseudo-classes - CSS: Cascading Style Sheets
/* any button over which the user's pointer is hovering */ button:hover { color: blue; } pseudo-classes let you apply a style to an element not only in relation to the content of the document tree, but also in relation to external factors like the history of the navigator (:visited, for example), the status of its content (like :checked on certain form
elements), or the position of the mouse (like :hover, which lets you know if the mouse is over an element or not).
... note: in contrast to pseudo-classes, pseudo-
elements can be used to style a specific part of an element.
... html living standard living standard defines when particular selectors match html
elements.
Linear-gradient Generator - CSS: Cascading Style Sheets
var button = document.createelement('div'); button.classname = 'switch_mode'; button.addeventlistener('click', function() { if (this.picker_mode === 'hsv') this.setpickermode('hsl'); else this.setpickermode('hsv'); }.bind(this)); this.node.appendchild(button); }; /*************************************************************************/ // updates properties of ui
elements /*************************************************************************/ colorpicker.prototype.updatecolor = function updatecolor(e) { var x = e.pagex - this.picking_area.offsetleft; var y = e.pagey - this.picking_area.offsettop; // width and height should be the same var size = this.picking_area.clientwidth; if (x > size) x = size; if (y > size) y = size; if (x < 0) x = 0; ...
...this.updatepickerposition(); this.updatealphagradient(); this.updatepreviewcolor(); this.notify('red', this.color.r); this.notify('green', this.color.g); this.notify('blue', this.color.b); this.notify('hexa', this.color.gethexa()); notify(this.topic, this.color); }; /*************************************************************************/ // update positions of various ui
elements /*************************************************************************/ colorpicker.prototype.updatepickerposition = function updatepickerposition() { var size = this.picking_area.clientwidth; var value = 0; if (this.picker_mode === 'hsv') value = this.color.value; if (this.picker_mode === 'hsl') value = this.color.lightness; var x = (this.color.saturation * size / 100) |...
... }; colorpicker.prototype.updatealphagradient = function updatealphagradient() { this.alpha_mask.style.backgroundcolor = this.color.gethexa(); }; colorpicker.prototype.updatepreviewcolor = function updatepreviewcolor() { this.preview_color.style.backgroundcolor = this.color.getcolor(); }; /*************************************************************************/ // update input
elements /*************************************************************************/ colorpicker.prototype.inputchangehue = function inputchangehue(e) { var value = parseint(e.target.value); this.sethue(value); this.updatehuepicker(); }; colorpicker.prototype.inputchangesaturation = function inputchangesaturation(e) { var value = parseint(e.target.value); this.color.setsaturation(value); ...
Universal selectors - CSS: Cascading Style Sheets
the css universal selector (*) matches
elements of any type.
... /* selects all
elements */ * { color: green; } beginning with css3, the asterisk may be used in combination with namespaces: ns|* - matches all
elements in namespace ns *|* - matches all
elements |* - matches all
elements without any declared namespace syntax * { style properties } the asterisk is optional with simple selectors.
... recommendation defines behavior regarding namespaces and adds hint that omitting the selector is allowed within pseudo-
elements css level 2 (revision 1)the definition of 'universal selector' in that specification.
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
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.
...acts as none on
elements with no special styling.
... formal definition initial valueautoapplies toall
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | auto | button | textfield | menulist-button | <compat-auto>where <compat-auto> = searchfield | textarea | push-button | slider-horizontal | checkbox | radio | square-button | menulist | listbox | meter | progress-bar examples the following would make an element look like a menulist button: .exampleone { appeara...
border-radius - CSS: Cascading Style Sheets
the border-radius property does not apply to table
elements when border-collapse is collapse.
...is equivalent to: */ border-top-left-radius: 4px 2px; border-top-right-radius: 3px 4px; border-bottom-right-radius: 6px 2px; border-bottom-left-radius: 3px 4px; formal definition initial valueas each of the properties of the shorthand:border-top-left-radius: 0border-top-right-radius: 0border-bottom-right-radius: 0border-bottom-left-radius: 0applies toall
elements; but user agents are not required to apply to table and inline-table
elements when border-collapse is collapse.
... the behavior on internal table
elements is undefined for the moment..
box-orient - CSS: Cascading Style Sheets
description html dom
elements lay out their contents along the inline-axis by default.
... this css property will only apply to html
elements with a css display value of box or inline-box.
... formal definition initial valueinline-axis (horizontal in xul)applies to
elements with a css display value of box or inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax horizontal | vertical | inline-axis | block-axis | inherit examples setting horizontal box orientation here, he box-orient property will cause the two <p> sections in the example to display in the same line.
clip-path - CSS: Cascading Style Sheets
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 <basic-shape>, otherwise no formal syntax <clip-source> | [ <basic-shape> | <geometry-box> ] | nonewhere <clip-source> = <u...
... candidate recommendation extends its application to html
elements.
... recommendation initial definition (applies to svg
elements only).
contain - CSS: Cascading Style Sheets
if the containing box is offscreen, the browser does not need to paint its contained
elements — these must also be offscreen as they are contained completely by that box.
... formal definition initial valuenoneapplies toall
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | strict | content | [ size | layout | style | paint ] examples simple layout the markup below consists of a number of articles, each with content: <h1>my blog</h1> <article> <h2>heading of a nice article</h2> <p>content here.</p> </article> <article> <h2>another heading of another article</h2> <img src="graphic.jpg" alt="photo"> <p>more content here.</p> </article> each <article> and <img> is given a border, and the images are floated: img { float: left; border: 3px solid black; } article { border...
...r article</h2> <img src="graphic.jpg" alt="photo"> <p>more content here.</p> </article> img { float: left; border: 3px solid black; } article { border: 1px solid black; } as you can see, because of the way floats work, the first image ends up inside the area of the second article: fixing with contain if we give each article the contain property with a value of content, when new
elements are inserted the browser understands it only needs to recalculate the containing element's subtree, and not anything outside it: <h1>my blog</h1> <article> <h2>heading of a nice article</h2> <p>content here.</p> <img src="i-just-showed-up.jpg" alt="social"> </article> <article> <h2>another heading of another article</h2> <img src="graphic.jpg" alt="photo"> <p>more content here.</p> ...
content - CSS: Cascading Style Sheets
objects inserted using the content property are anonymous replaced
elements.
... normal computes to none for the ::before and ::after pseudo-
elements.
... accessibility support for css generated content – tink explanation of wcag, guideline 1.3 – mdn understanding success criterion 1.3.1 | w3c understanding wcag 2.0 formal definition initial valuenormalapplies to::before and ::after pseudo-
elementsinheritednocomputed valueon
elements, always computes to normal.
float - CSS: Cascading Style Sheets
the float css property places an element on the left or right side of its container, allowing text and inline
elements to wrap around it.
... formal definition initial valuenoneapplies toall
elements, but has no effect if the value of display is none.inheritednocomputed valueas specifiedanimation typediscrete formal syntax left | right | none | inline-start | inline-end examples how floated
elements are positioned as mentioned above, when an element is floated, it is taken out of the normal flow of the document (though still remaining part of it).
...phasellus feugiat est vel leo finibus congue.</p> </section> css section { border: 1px solid blue; width: 100%; float: left; } div { margin: 5px; width: 50px; height: 150px; } .left { float: left; background: pink; } .right { float: right; background: cyan; } result clearing floats sometimes you may want to force an item to move below any floated
elements.
font - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:font-style: normalfont-variant: normalfont-weight: normalfont-stretch: normalfont-size: mediumline-height: normalfont-family: depends on user agentapplies toall
elements.
...etpropcont { margin-bottom: 1em; } .curcss { border: none; border-bottom: 1px solid black; text-align: center; width: 80px; } .mandatory { border-bottom-color: red; } .cf:before, .cf:after { content: " "; display: table; } .cf:after { clear: both; } .tar { width: 40px; text-align: right; } .fontfamily { display: inline-block; } javascript var textareas = document.get
elementsbyclassname("curcss"), shorttext = "", getcheckedvalue, setcss, getproperties, injectcss; getproperties = function () { shorttext = getcheckedvalue("font_style") + " " + getcheckedvalue("font_variant") + " " + getcheckedvalue("font_weight") + " " + getcheckedvalue("font_size") + getcheckedvalue("line_height") + " " + getcheckedvalue("font_...
...family"); return shorttext; } getcheckedvalue = function(radio_name) { oradio = document.forms[0].
elements[radio_name]; for (var i = 0; i < oradio.length; i++) { if(oradio[i].checked) { var propinput = "input_" + radio_name, curelemname = "input_" + radio_name, curelem = document.getelementbyid(curelemname); curelem.value = oradio[i].value; return oradio[i].value; } } } setcss = function () { getproperties(); injectcss(shorttext); } injectcss = function(cssfragment) { old = document.body.get
elementsbytagname("style"); if (old.length > 1) { old[1].parentelement.removechild(old[1]); } css = document.createelement("style"); css.innerhtml = ".fontshorthand{font: " + cssfragment + "}"; document.body.appendchild(css); } setc...
margin-bottom - CSS: Cascading Style Sheets
this property has no effect on non-replaced inline
elements, such as <span> or <code>.
... formal definition initial value0applies toall
elements, except
elements with table display types other than table-caption, table and inline-table.
... recommendation removes its effect on inline
elements.
margin-left - CSS: Cascading Style Sheets
block layout mode block, inline, inline-block, block, table, inline-table, list-item, table-caption left or right static or relative 0 block layout mode (floating element) any table-*, except table-caption any any 0 internal table-*
elements don't have margins, use border-spacing instead any, except flex, inline-flex, or table-* any fixed or absolute 0, except if both margin-left and margin-right are set to auto.
... flexbox layout mode formal definition initial value0applies toall
elements, except
elements with table display types other than table-caption, table and inline-table.
... recommendation like in css1, but removes its effect on inline
elements.
margin-right - CSS: Cascading Style Sheets
block layout mode block, inline, inline-block, block, table, inline-table, list-item, table-caption left or right static or relative 0 block layout mode (floating element) any table-*, except table-caption any any 0 internal table-*
elements don't have margins, use border-spacing instead any, except flex, inline-flex, or table-* any fixed or absolute 0, except if both margin-left and margin-right are set to auto.
... flexbox layout mode formal definition initial value0applies toall
elements, except
elements with table display types other than table-caption, table and inline-table.
... recommendation removes its effect on inline
elements.
margin-top - CSS: Cascading Style Sheets
this property has no effect on non-replaced inline
elements, such as <span> or <code>.
... formal definition initial value0applies toall
elements, except
elements with table display types other than table-caption, table and inline-table.
... recommendation removes its effect on inline
elements.
mask-origin - CSS: Cascading Style Sheets
n-box; mask-origin: fill-box; mask-origin: stroke-box; mask-origin: view-box; /* multiple values */ mask-origin: padding-box, content-box; mask-origin: view-box, fill-box, border-box; /* non-standard keyword values */ -webkit-mask-origin: content; -webkit-mask-origin: padding; -webkit-mask-origin: border; /* global values */ mask-origin: inherit; mask-origin: initial; mask-origin: unset; for
elements rendered as a single box, this property specifies the mask positioning area.
...for
elements rendered as multiple boxes, such as inline boxes on several lines or boxes on several pages, it specifies which boxes box-decoration-break operates upon to determine the mask positioning area.
... formal definition initial valueborder-boxapplies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <geometry-box>#where <geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box examples setting mask origin to border-box css #ma...
opacity - CSS: Cascading Style Sheets
description opacity applies to the element as a whole, including its contents, even though the value is not inherited by child
elements.
... if you do not want to apply opacity to child
elements, use the background property instead.
... 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 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: yello...
outline - CSS: Cascading Style Sheets
note: the outline will be invisible for many
elements if its style is not defined.
...a notable exception is input
elements, which are given default styling by browsers.
... how to design useful and usable focus indicators wcag 2.1: understanding success criterion 2.4.7: focus visible formal definition initial valueas each of the properties of the shorthand:outline-color: invert, for browsers supporting it, currentcolor for the otheroutline-style: noneoutline-width: mediumapplies toall
elementsinheritednocomputed valueas each of the properties of the shorthand:outline-color: for the keyword invert, the computed value is invert.
overflow-wrap - CSS: Cascading Style Sheets
the overflow-wrap css property applies to inline
elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box.
... formal definition initial valuenormalapplies tonon-replaced inline
elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | break-word | anywhere examples comparing overflow-wrap, word-break, and hyphens this example compares the results of overflow-wrap, word-break, and hyphens when breaking up a long word.
... working draft initial definition initial valuenormalapplies tonon-replaced inline
elementsinheritedyescomputed valueas specifiedanimation typediscrete ...
overscroll-behavior-y - CSS: Cascading Style Sheets
/* keyword values */ overscroll-behavior-y: auto; /* default */ overscroll-behavior-y: contain; overscroll-behavior-y: none; /* global values */ overscroll-behavior-y: inherit; overscroll-behavior-y: initial; overscroll-behavior-y: unset; initial valueautoapplies tonon-replaced block-level
elements and non-replaced inline-block
elementsinheritednocomputed valueas specifiedanimation typediscrete syntax the overscroll-behavior-y property is specified as a keyword chosen from the list of values below.
...underlying
elements will not scroll.
... formal definition initial valueautoapplies tonon-replaced block-level
elements and non-replaced inline-block
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing an underlying element from scrolling vertically .messages { height: 220px; overflow: auto; overscroll-behavior-y: contain; } see overscroll-behavior for a full example and explanation.
page-break-after - CSS: Cascading Style Sheets
/* keyword values */ page-break-after: auto; page-break-after: always; page-break-after: avoid; page-break-after: left; page-break-after: right; page-break-after: recto; page-break-after: verso; /* global values */ page-break-after: inherit; page-break-after: initial; page-break-after: unset; this property applies to block
elements that generate a box.
...a subset of values should be aliased as follows: page-break-after break-after auto auto left left right right avoid avoid always page formal definition initial valueautoapplies toblock-level
elements in the normal flow of the root element.
... user agents may also apply it to other
elements like table-row
elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | always | avoid | left | right | recto | verso examples setting a page break after footnotes /* move to a new page after footnotes */ div.footnotes { page-break-after: always; } specifications specification status comment css logical properties and values level 1the definition of 'recto and verso' in that specification.
page-break-before - CSS: Cascading Style Sheets
this property applies to block
elements that generate a box.
...a subset of values should be aliased as follows: page-break-before break-before auto auto left left right right avoid avoid always page formal definition initial valueautoapplies toblock-level
elements in the normal flow of the root element.
... user agents may also apply it to other
elements like table-row
elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | always | avoid | left | right | recto | verso examples avoid a page break before the dic /* avoid page break before the div */ div.note { page-break-before: avoid; } specifications specification status comment css logical properties and values level 1the definition of 'recto and verso' in that specification.
page-break-inside - CSS: Cascading Style Sheets
a subset of values should be aliased as follows: page-break-inside break-inside auto auto avoid avoid formal definition initial valueautoapplies toblock-level
elements in the normal flow of the root element.
... user agents may also apply it to other
elements like table-row
elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid examples avoiding page breaks inside
elements html <div class="page"> <p>this is the first paragraph.</p> <section class="list"> <span>a list</span> <ol> <li>one</li> <!-- <li>two</li> --> </ol> </section> <ul> <li>one</li> <!-- <li>two</li> --> </ul> <p>this is the second paragraph.</p> <p>this is the third paragraph, it contains more text.</p> <p>this is the fourth paragraph.
... working draft allows this property on more
elements.
perspective - CSS: Cascading Style Sheets
the parts of the 3d
elements that are behind the user — i.e.
...also, in that case, the object will act as a containing block for position: fixed
elements that it contains.
... formal definition initial valuenoneapplies totransformable
elementsinheritednocomputed valuethe absolute length or noneanimation typea lengthcreates stacking contextyes formal syntax none | <length> examples setting perspective this example shows a cube with the perspective set at different positions.
resize - CSS: Cascading Style Sheets
resize does not apply to the following: inline
elements block
elements for which the overflow property is set to visible formal definition initial valuenoneapplies to
elements with overflow other 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 t...
...extareas in many browsers, <textarea>
elements are resizable by default.
... 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.
scroll-margin-inline-end - CSS: Cascading Style Sheets
formal definition initial value0applies toall
elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> examples simple demonstration this example implements something very similar to the interactive example above, except that here we'll explain to you how it's implemented.
... the child
elements are styled as follows: .scroller > div { flex: 0 0 250px; width: 250px; background-color: #663399; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; scroll-snap-align: end; } .scroller > div:nth-child(2n) { background-color: #fff; color: #663399; } the most relevant part here is scroll-snap-align: end, which specifies that the righ...
... last of all we specify the scroll margin values, a different one for the second and third child
elements: .scroller > div:nth-child(2) { scroll-margin-inline-end: 1rem; } .scroller > div:nth-child(3) { scroll-margin-inline-end: 2rem; } this means that when scrolling past the middle child
elements, the scrolling will snap to 1rem outside the inline end edge of the second <div>, and 2rems outside the inline end edge of the third <div>.
scroll-margin-inline-start - CSS: Cascading Style Sheets
formal definition initial value0applies toall
elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> examples simple demonstration this example implements something very similar to the interactive example above, except that here we'll explain to you how it's implemented.
... the child
elements are styled as follows: .scroller > div { flex: 0 0 250px; width: 250px; background-color: #663399; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; scroll-snap-align: start; } .scroller > div:nth-child(2n) { background-color: #fff; color: #663399; } the most relevant part here is scroll-snap-align: start, which specifies that the ...
... last of all we specify the scroll margin-values, a different one for the second and third child
elements: .scroller > div:nth-child(2) { scroll-margin-inline-start: 1rem; } .scroller > div:nth-child(3) { scroll-margin-inline-start: 2rem; } this means that when scrolling past the middle child
elements, the scrolling will snap to 1rem outside the inline start edge of the second <div>, and 2rems outside the inline start edge of the third <div>.
scroll-margin-inline - CSS: Cascading Style Sheets
formal definition initial value0applies toall
elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length>{1,2} examples simple demonstration this example implements something very similar to the interactive example above, except that here we'll explain to you how it's implemented.
... the child
elements are styled as follows: .scroller > div { flex: 0 0 250px; width: 250px; background-color: #663399; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; scroll-snap-align: end; } .scroller > div:nth-child(2n) { background-color: #fff; color: #663399; } the most relevant part here is scroll-snap-align: end, which specifies that the righ...
... last of all we specify the scroll margin values, a different one for the second and third child
elements: .scroller > div:nth-child(2) { scroll-margin-inline: 1rem; } .scroller > div:nth-child(3) { scroll-margin-inline: 2rem; } this means that when scrolling past the middle child
elements, the scrolling will snap to 1rem outside the inline end edge of the second <div>, and 2rems outside the inline end edge of the third <div>.
scroll-margin - CSS: Cascading Style Sheets
formal definition initial value0applies toall
elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length>{1,4} examples simple demonstration this example implements something very similar to the interactive example above, except that here we'll explain to you how it's implemented.
... the child
elements are styled as follows: .scroller > div { flex: 0 0 250px; width: 250px; background-color: #663399; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; scroll-snap-align: start; } .scroller > div:nth-child(2n) { background-color: #fff; color: #663399; } the most relevant part here is scroll-snap-align: start, which specifies that the ...
... last of all we specify the scroll margin-values, a different one for the second and third child
elements: .scroller > div:nth-child(2) { scroll-margin: 1rem; } .scroller > div:nth-child(3) { scroll-margin: 2rem; } this means that when scrolling past the middle child
elements, the scrolling will snap to 1rem outside the left edge of the second <div>, and 2rems outside the left edge of the third <div>.
z-index - CSS: Cascading Style Sheets
overlapping
elements with a larger z-index cover those with a smaller one.
...this means that the z-indexes of descendants are not compared to the z-indexes of
elements outside this element.
... formal definition initial valueautoapplies topositioned
elementsinheritednocomputed valueas specifiedanimation typean integercreates stacking contextyes formal syntax auto | <integer> examples visually layering
elements html <div class="dashed-box">dashed box <span class="gold-box">gold box</span> <span class="green-box">green box</span> </div> css .dashed-box { position: relative; z-index: 1; border: dashed; height: 8em; margin-bottom: 1em; margin-top: 2em; } .gold-box { position: absolute; z-index: 3; /* put .gold-box above .green-box and .dashed-box */ background: gold; width: 80%; left: 60px; top: 3em; } .green-box { position: absolute; z-index: 2; /* put .green-box above .dashed-box */ background: lightgreen; width: 20%; left: 65%; top: -25...
Event reference
change event dom l2, html5 the change event is fired for <input>, <select>, and <textarea>
elements when a change to the element's value is committed by the user.
... overflow uievent mozilla specific an element has been overflowed by its content or has been rendered for the first time in this state (only works for
elements styled with overflow != visible).
... touchenter touchevent touch events removed touchleave touchevent touch events removed underflow uievent mozilla specific an element is no longer overflowed by its content (only works for
elements styled with overflow != visible).
Audio and video manipulation - Developer guides
html <video id="my-video" controls src="myvideo.mp4" type="video/mp4"> </video> javascript var context = new audiocontext(), audiosource = context.createmedia
elementsource(document.getelementbyid("my-video")), filter = context.createbiquadfilter(); audiosource.connect(filter); filter.connect(context.destination); // configure filter filter.type = "lowshelf"; filter.frequency.value = 1000; filter.gain.value = 25; playable code <video id="my-video" controls="true" width="480" height="270" crossorigin="anonymous"> <source src="https://udn.realityripple.
...ples/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"> filter.type = "lowshelf"; filter.frequency.value = 1000; filter.gain.value = 25;</textarea> var context = new audiocontext(), audiosource = context.createmedia
elementsource(document.getelementbyid("my-video")), filter = context.createbiquadfilter(); audiosource.connect(filter); filter.connect(context.destination); var textarea = document.getelementbyid('code'); var reset = document.getelementbyid('reset'); var edit = document.getelementbyid('edit'); var code = textarea.value; function setfilter() { eval(textarea.value); } reset.addeventlistener('c...
...a panner node—pannernode—lets us define a source cone as well as positional and directional
elements, all in 3d space as defined using 3d cartesian coordinates.
Overview of events and handlers - Developer guides
button event handler demo for example, browser <button>
elements are intended to emit events named 'click' in response to a mouse click or, when displayed in touch sensitive surfaces, to a finger tap.
... this code relies on the agreement that there is a kind of event called 'click' which will call any listener (or 'handler') function with an event object argument (actually, in this case a derivative mouseevent object) and which will be fired by html button
elements after user interaction.
...for example, code might be attached as: var funcinit = function(){ // user code goes here and can safely address all the html
elements from the page // since the document has successfully been 'loaded' } document.addeventlistener('domcontentloaded', funcinit); so that this code will only be executed after the document object emits the 'domcontentloaded' event because the html has been parsed and javasript objects created representing each of the nodes of the html document.
Index - Developer guides
6 audio and video delivery audio, guide, html, html5, media, video whether we are dealing with pre-recorded audio files or live streams, the mechanism for making them available through the browser's <audio> and <video>
elements remains pretty much the same.
... 14 web audio playbackrate explained apps, audio, media, video, playbackrate the playbackrate property of the <audio> and <video>
elements allows us to change the speed, or rate, at which a piece of web audio or video is playing 15 writing web audio api code that works in every browser api you probably have already read the announcement on the web audio api coming to firefox, and are totally excited and ready to make your until-now-webkit-only sites work with firefox, which uses the unprefixed version of the spe...
... 20 media events intermediate, media various events are sent when handling media that are embedded in html documents using the <audio> and <video>
elements; this section lists them and provides some helpful information about using them.
disabled - HTML: Hypertext Markup Language
conversely,
elements that support the disabled attribute but don't have the attribute set match the :enabled pseudo-class.
...additionally, since the
elements become immutable, most other attributes, such as pattern, have no effect, until the control is enabled.
... if present on a supporting
elements, the :disabled pseudo class will match.
Date and time formats used in HTML - HTML: Hypertext Markup Language
certain html
elements use date and/or time values.
...
elements that use such formats include certain forms of the <input> element that let the user choose or specify a date, time, or both, as well as the <ins> and <del>
elements, whose datetime attribute specifies the date or date and time at which the insertion or deletion of content occurred.
..., 33 [details] 1977-04-01t14:00:30 30 seconds after 2:00 pm on april 1, 1977 [details] 1901-01-01t00:00z midnight utc on january 1, 1901 [details] 1901-01-01t00:00:01-04:00 1 second past midnight eastern standard time (est) on january 1, 1901 [details] basics before looking at the various formats of date and time related strings used by html
elements, it is helpful to understand a few fundamental facts about the way they're defined.
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
permitted content zero or more <param>
elements, then transparent.
...this attribute might be used to specify the various <param>
elements passed to the java applet.
...it indicates the id of the data source object that supplies the data that is bound to the <param>
elements associated with the applet.
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
do not confuse the <b> element with the <strong>, <em>, or <mark>
elements.
...further, stylesheets can change the default style of these
elements, with the result that they are not necessarily displayed in bold.
... examples <p> this article describes several <b class="keywords">text-level</b>
elements.
<basefont> - HTML: Hypertext Markup Language
the obsolete html base font element (<basefont>) sets a default font face, size, and color for the other
elements which are descended from its parent element.
... attributes like all other html
elements, this element supports the global attributes.
... the <basefont> element was deprecated in the standard at the same time as all
elements related to styling only.
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
permitted content transparent but with no interactive content descendants except for <a>
elements, <button>
elements, <input>
elements whose type attribute is checkbox, radio, or button.
... it is better to specify your canvas dimensions by setting the width and height attributes directly on the <canvas>
elements, either directly in the html or by using javascript.
... mdn hit regions and accessability canvas accessibility use cases canvas element accessibility issues html5 canvas accessibility in firefox 13 – by steve faulkner best practices for interactive canvas
elements specifications specification status comment html living standardthe definition of '<canvas>' in that specification.
<datalist>: The HTML Data List element - HTML: Hypertext Markup Language
the html <datalist> element contains a set of <option>
elements that represent the permissible or recommended options available to choose from within other controls.
... permitted content either phrasing content or zero or more <option>
elements.
... implicit aria role listbox permitted aria roles no role permitted dom interface htmldatalistelement attributes this element has no other attributes than the global attributes, common to all
elements.
<input type="checkbox"> - HTML: Hypertext Markup Language
<input>
elements of type checkbox are rendered by default as boxes that are checked (ticked) when activated, like you might see in an official government paper form.
... additional attributes in addition to the common attributes shared by all <input>
elements, "checkbox" inputs support the following attributes: attribute description checked boolean; if present, the checkbox is toggled on by default indeterminate a boolean which, if present, indicates that the value of the checkbox is indeterminate rather than true or false value the string to use as the value of the checkbox when submitting the form...
... beyond accessibility, this is another good reason to properly set up <label>
elements on your forms.
<input type="email"> - HTML: Hypertext Markup Language
<input>
elements of type email are used to let the user enter and edit an e-mail address, or, if the multiple attribute is specified, a list of e-mail addresses.
... additional attributes in addition to the attributes that operate on all <input>
elements regardless of their type, email 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 characters the input should accept minlength the minimum number of characters long the input can be and still be consider...
...by associating the two
elements in this way, clicking on the label will focus the input element.
<input type="file"> - HTML: Hypertext Markup Language
<input>
elements with type="file" let the user choose one or more files from their device storage.
... events change and input supported common attributes required additional attributes accept, capture, files, multiple idl attributes files and value dom interface htmlinputelement properties properties that apply only to
elements of type file methods select() value a file input's value attribute contains a domstring that represents the path to the selected file(s).
... additional attributes in addition to the common attributes shared by all <input>
elements, inputs of type file also support the following attributes: attribute description accept one or more unique file type specifiers describing file types to allow capture what source to use for capturing image or video data files a filelist listing the chosen files multiple a boolean which, if present, indicates that the user may choos...
<input type="tel"> - HTML: Hypertext Markup Language
<input>
elements of type tel are used to let the user enter and edit a telephone number.
... 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 the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum length, in utf-16 characters, to accept as a valid input minlength the minimum length that is considered valid for the f...
... examples in this example, we present a simple interface with a <select> element that lets the user choose which country they're in, and a set of <input type="tel">
elements to let them enter each part of their phone number; there is no reason why you can't have multiple tel inputs.
<kbd>: The Keyboard Input element - HTML: Hypertext Markup Language
usage notes other
elements can be used in tandem with <kbd> to represent more specific scenarios: nesting a <kbd> element within another <kbd> element represents an actual key or other unit of input as a portion of a larger input.
... examples basic example <p>use the command <kbd>help mycommand</kbd> to view documentation for the command "mycommand".</p> representing keystrokes within an input to describe an input comprised of multiple keystrokes, you can nest multiple <kbd>
elements, with an outer <kbd> element representing the overall input and each individual keystroke or component of the input enclosed within its own <kbd>.
... result the output looks like this without a style sheet applied: with custom styles we can make more sense of this by adding some css: css we add a new style for <kbd>
elements, key, which we can apply when rendering keyboard keys: kbd.key { border-radius: 3px; padding: 1px 2px 0; border: 1px solid black; } html then we update the html to use this class on the keys in the output to be presented: <p>you can also create a new document by pressing <kbd><kbd class="key">ctrl</kbd>+<kbd class="key">n</kbd></kbd>.</p> result the result is just what we want!
<listing> - HTML: Hypertext Markup Language
attributes this element has no other attributes than the global attributes, common to all
elements.
... see also the <pre> and <code>
elements to be used instead.
... the <plaintext> and <xmp>
elements, similar to <listing> but also obsolete.
<noframes>: The Frame Fallback element - HTML: Hypertext Markup Language
a <noframes> element can contain any html
elements that are allowed within the body of an html document, with the exception of the <frameset> and <frame>
elements, since using frames when they aren't supported doesn't make sense.
... in html 5 and later, <noframes> is obsolete and shouldn't be used, since the <frame> and <frameset>
elements are also obsolete.
... attributes like all other html
elements, this element supports the global attributes.
<output>: The Output element - HTML: Hypertext Markup Language
for a space-separated list of other
elements’ ids, indicating that those
elements contributed input values to (or otherwise affected) the calculation.
...(if this attribute is not set, the <output> is associated with its ancestor <form> element, if any.) this attribute lets you associate <output>
elements to <form>s anywhere in the document, not just inside a <form>.
...used in the form.
elements api.
<picture>: The Picture element - HTML: Hypertext Markup Language
the html <picture> element contains zero or more <source>
elements and one <img> element to offer alternative versions of an image for different display/device scenarios.
... it provides a fallback in case none of the offered <source>
elements are able to provide a usable image.
... content categories flow content, phrasing content, embedded content permitted content zero or more <source>
elements, followed by one <img> element, optionally intermixed with script-supporting
elements.
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
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.
...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 { font-size: 22px; } the output looks like so: the html above might look something like this when rendered by a browser without ruby support: 漢字 (kan ji) body { font-size: 22px; } note: see the article about the <ruby> element for further examples.
<rtc>: The Ruby Text Container element - HTML: Hypertext Markup Language
the html ruby text container (<rtc>) element embraces semantic annotations of characters presented in a ruby of <rb>
elements used inside of <ruby> element.
... <rb>
elements can have both pronunciation (<rt>) and semantic (<rtc>) annotations.
... permitted content phrasing content or <rt>
elements.
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
default style per the html specification, the default style for <summary>
elements includes display: list-item.
... basic example a simple example showing the use of <summary> in a <details> element: <details open> <summary>overview</summary> <ol> <li>cash on hand: $500.00</li> <li>current invoice: $75.30</li> <li>due date: 5/6/19</li> </ol> </details> summaries as headings you can use heading
elements in <summary>, like this: <details open> <summary><h4>overview</h4></summary> <ol> <li>cash on hand: $500.00</li> <li>current invoice: $75.30</li> <li>due date: 5/6/19</li> </ol> </details> this currently has some spacing issues that could be addressed using css.
... warning: because the <summary> element has a default role of button (which strips all roles from child
elements), this example will not work for users of assistive technologies such as screen readers.
<tt>: The Teletype Text element (obsolete) - HTML: Hypertext Markup Language
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 appropriate for your use case (for example, if you simply need to show some content in a non-proportional font), you should consider using the <span> element, styling it as desired using css.
... although this element wasn't officially deprecated in html 4.01, its use was discouraged in favor of the semantic
elements and/or css.
itemtype - HTML: Hypertext Markup Language
the itemtype attribute can only be specified on
elements which have an itemscope attribute specified.
... the itemid attribute can only be specified on
elements which have both an itemscope attribute and an itemtype attribute specified.
... they must only be specified on
elements with an itemscope attribute, whose itemtype attribute specifies a vocabulary not supporting global identifiers for items, as defined by that vocabulary's specification.
MIME types (IANA media types) - HTTP
note: use application/xml or application/xhtml+xml if you want xml’s strict parsing rules, <![cdata[…]]> sections, or
elements that aren't from html/svg/mathml namespaces.
... audio and video types as is the case for images, html doesn't mandate that web browsers support any specific file and codec types for the <audio> and <video>
elements, so it's important to consider your target audience and the range of browsers (and versions of those browsers) they may be using when choosing the file type and codecs to use for media.
...only resources with the correct mime type will be played in <video> or <audio>
elements.
Configuring servers for Ogg media - HTTP
html <audio> and <video>
elements allow media presentation without the need for the user to install any plug-ins or other software to do so.
... consider using the preload attribute the html <audio> and <video>
elements provide the preload attribute, which tells the browser to attempt to download the entire media when the page loads.
... preload is off by default, so if getting to video is the point of your web page, your users may appreciate it if you include preload in your video
elements.
CSP: child-src - HTTP
the http content-security-policy (csp) child-src directive defines the valid sources for web workers and nested browsing contexts loaded using
elements such as <frame> and <iframe>.
...if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: frame-src - HTTP
the http content-security-policy (csp) frame-src directive specifies valid sources for nested browsing contexts loading using
elements such as <frame> and <iframe>.
...if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: script-src-attr - HTTP
this includes only inline script event handlers like onclick, but not urls loaded directly into <script>
elements.
...if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: script-src-elem - HTTP
the http content-security-policy (csp) script-src-elem directive specifies valid sources for javascript <script>
elements, but not inline script event handlers like onclick.
...if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: style-src-attr - HTTP
the http content-security-policy (csp) style-src-attr directive specifies valid sources for inline styles applied to individual dom
elements.
...if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: style-src-elem - HTTP
the http content-security-policy (csp) style-src-elem directive specifies valid sources for stylesheets <style>
elements and <link>
elements with rel="stylesheet".
...if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
An overview of HTTP - HTTP
requests an example http request: requests consists of the following
elements: an http method, usually a verb like get, post or a noun like options or head that defines the operation the client wants to perform.
... the path of the resource to fetch; the url of the resource stripped from
elements that are obvious from the context, for example without the protocol (http://), the domain (here, developer.mozilla.org), or the tcp port (here, 80).
... responses an example response: responses consist of the following
elements: the version of the http protocol they follow.
JavaScript data types and data structures - JavaScript
it is a set of "
elements" of 16-bit unsigned integer values.
...the length of a string is the number of
elements in it.
...unfortunately, when the separator is used in one of the "list"
elements, then, the list is broken.
Loops and iteration - JavaScript
example 1 the following example iterates through the
elements in an array until it finds the index of an element whose value is thevalue: for (let i = 0; i < a.length; i++) { if (a[i] === thevalue) { break; } } example 2: breaking to a label let x = 0; let z = 0; labelcancelloops: while (true) { console.log('outer loops: ' + x); x += 1; z = 1; while (true) { console.log('inner loops: ' + z); z += 1; if (z === 10 && x === 10) {...
... function dump_props(obj, obj_name) { let result = ''; for (let i in obj) { result += obj_name + '.' + i + ' = ' + obj[i] + '<br>'; } result += '<hr>'; return result; } for an object car with properties make and model, result would be: car.make = ford car.model = mustang arrays although it may be tempting to use this as a way to iterate over array
elements, the for...in statement will return the name of your user-defined properties in addition to the numeric indexes.
... therefore, it is better to use a traditional for loop with a numeric index when iterating over arrays, because the for...in statement iterates over user-defined properties in addition to the array
elements, if you modify the array object (such as adding custom properties or methods).
Text formatting - JavaScript
it is a set of "
elements" of 16-bit unsigned integer values (utf-16 code units).
...the length of a string is the number of
elements in it.
... repeat returns a string consisting of the
elements of the object repeated the given times.
Arrow function expressions - JavaScript
shorter functions var
elements = [ 'hydrogen', 'helium', 'lithium', 'beryllium' ]; // this statement returns the array: [8, 6, 7, 9]
elements.map(function(element) { return element.length; }); // the regular function above can be written as the arrow function below
elements.map((element) => { return element.length; }); // [8, 6, 7, 9] // when there is only one parameter, we can remove the surrounding parentheses...
...
elements.map(element => { return element.length; }); // [8, 6, 7, 9] // when the only statement in an arrow function is `return`, we can remove `return` and remove // the surrounding curly brackets
elements.map(element => element.length); // [8, 6, 7, 9] // in this case, because we only need the length property, we can use destructuring parameter: // notice that the `length` corresponds to the property we want to get whereas the // obviously non-special `lengthfoobarx` is just the name of a variable which can be changed // to any valid variable name you want
elements.map(({ length: lengthfoobarx }) => lengthfoobarx); // [8, 6, 7, 9] // this destructuring parameter assignment can also be written as seen below.
...
elements.map(({ length }) => length); // [8, 6, 7, 9] no separate this before arrow functions, every new function defined its own this value based on how the function was called: a new object in the case of a constructor.
Array() constructor - JavaScript
syntax [element0, element1, ..., elementn] new array(element0, element1[, ...[, elementn]]) new array(arraylength) parameters elementn a javascript array is initialized with the given
elements, except in the case where a single argument is passed to the array constructor and that argument is a number (see the arraylength parameter below).
...an array with its length property set to that number and the array
elements are empty slots.
... let fruits = new array(2); console.log(fruits.length); // 2 console.log(fruits[0]); // undefined array constructor with multiple parameters if more than one argument is passed to the constructor, a new array with the given
elements is created.
Array.prototype.findIndex() - JavaScript
the range of
elements processed by findindex() is set before the first invocation of callback.
... callback will not process the
elements appended to the array after the call to findindex() begins.
...
elements that are deleted are still visited.
Array.prototype.push() - JavaScript
the push() method adds one or more
elements to the end of an array and returns the new length of the array.
... examples adding
elements to an array the following code creates the sports array containing two
elements, then appends two
elements to it.
... let sports = ['soccer', 'baseball'] let total = sports.push('football', 'swimming') console.log(sports) // ['soccer', 'baseball', 'football', 'swimming'] console.log(total) // 4 merging two arrays this example uses apply() to push all
elements from a second array.
Array.prototype.reverse() - JavaScript
description the reverse method transposes the
elements of the calling array object in place, mutating the array, and returning a reference to the array.
... examples reversing the
elements in an array the following example creates an array a, containing three
elements, then reverses the array.
... const a = [1, 2, 3]; console.log(a); // [1, 2, 3] a.reverse(); console.log(a); // [3, 2, 1] reversing the
elements in an array-like object the following example creates an array-like object a, containing three
elements and a length property, then reverses the array-like object.
Array.prototype.unshift() - JavaScript
the unshift() method adds one or more
elements to the beginning of an array and returns the new length of the array.
... syntax arr.unshift(element1[, ...[, elementn]]) parameters elementn the
elements to add to the front of the arr.
... please note that, if multiple
elements are passed as parameters, they're inserted in chunk at the beginning of the object, in the exact same order they were passed as parameters.
Function.prototype.apply() - JavaScript
and, because push accepts a variable number of arguments, you can also push multiple
elements at once.
... but, if you pass an array to push, it will actually add that array as a single element, instead of adding the
elements individually.
... const array = ['a', 'b']; const
elements = [0, 1, 2]; array.push.apply(array,
elements); console.info(array); // ["a", "b", 0, 1, 2] using apply and built-in functions clever usage of apply allows you to use built-in functions for some tasks that would probably have otherwise been written by looping over the array values.
Object.freeze() - JavaScript
as an object, an array can be frozen; after doing so, its
elements cannot be altered and no
elements can be added to or removed from the array.
... > object.freeze(1) typeerror: 1 is not an object // es5 code > object.freeze(1) 1 // es2015 code an arraybufferview with
elements will cause a typeerror, as they are views over memory and will definitely cause other possible issues: > object.freeze(new uint8array(0)) // no
elements uint8array [] > object.freeze(new uint8array(1)) // has
elements typeerror: cannot freeze array buffer views with
elements > object.freeze(new dataview(new arraybuffer(32))) // no
elements dataview {} > object.freeze(new float64array(new arra...
...ybuffer(64), 63, 0)) // no
elements float64array [] > object.freeze(new float64array(new arraybuffer(64), 32, 2)) // has
elements typeerror: cannot freeze array buffer views with
elements note that; as the standard three properties (buf.bytelength, buf.byteoffset and buf.buffer) are read-only (as are those of an arraybuffer or sharedarraybuffer), there is no reason for attempting to freeze these properties.
Set - JavaScript
you can iterate through the
elements of a set in insertion order.
... set.prototype.clear() removes all
elements from the set object.
...console.log([...myset]) // will show you exactly the same array as myarray remove duplicate
elements from the array // use to remove duplicate
elements from the array const numbers = [2,3,4,4,2,3,3,4,4,5,5,6,6,7,5,32,3,4,5] console.log([...new set(numbers)]) // [2, 3, 4, 5, 6, 7, 32] relation with strings let text = 'india' let myset = new set(text) // set ['i', 'n', 'd', 'i', 'a'] myset.size // 5 //case sensitive & duplicate ommision new set("firefox") // set(7) [ "f", "i", "r", "e",...
SharedArrayBuffer.prototype.slice() - JavaScript
slice(-2) extracts the last two
elements in the sequence.
... for example, slice(1,4) extracts the second element through the fourth element (
elements indexed 1, 2, and 3).
... return value a new sharedarraybuffer containing the extracted
elements.
TypedArray.prototype.find() - JavaScript
the range of
elements processed by find is set before the first invocation of callback.
...
elements that are appended to the typed array after the call to find begins will not be visited by callback.
... if an existing, unvisited element of the typed array is changed by callback, its value passed to the visiting callback will be the value at the time that find visits that element's index;
elements that are deleted are not visited.
TypedArray.prototype.findIndex() - JavaScript
the range of
elements processed by findindex is set before the first invocation of callback.
...
elements that are appended to the typed array after the call to findindex begins will not be visited by callback.
... if an existing, unvisited element of the typed array is changed by callback, its value passed to the visiting callback will be the value at the time that findindex visits that element's index;
elements that are deleted are not visited.
TypedArray.from() - JavaScript
description typedarray.from() lets you create typed arrays from: array-like objects (objects with a length property and indexed
elements); or iterable objects (objects where you can get its
elements, such as map and set).
...hence, when working with proxy objects, it calls handler.set to create new
elements rather than handler.defineproperty().
... { typed_array[i] = copy_data[i]; } return typed_array; } })(); } examples from an iterable object (set) const s = new set([1, 2, 3]); uint8array.from(s); // uint8array [ 1, 2, 3 ] from a string int16array.from('123'); // int16array [ 1, 2, 3 ] use with arrow function and map using an arrow function as the map function to manipulate the
elements float32array.from([1, 2, 3], x => x + x); // float32array [ 2, 4, 6 ] generate a sequence of numbers uint8array.from({length: 5}, (v, k) => k); // uint8array [ 0, 1, 2, 3, 4 ] specifications specification ecmascript (ecma-262)the definition of '%typedarray%.from' in that specification.
TypedArray.prototype.join() - JavaScript
the join() method joins all
elements of an array into a string.
...if omitted, the typed array
elements are separated with a comma (",").
... return value a string with all array
elements joined.
TypedArray.prototype.map() - JavaScript
the range of
elements processed by map() is set before the first invocation of mapfn.
...
elements which are appended to the array after the call to map() begins will not be visited by mapfn.
... if existing
elements of the typed array are changed, or deleted, their value as passed to mapfn will be the value at the time map() visits them;
elements that are deleted are not visited.
Spread syntax (...) - JavaScript
spread syntax (...) allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or
elements (for array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected.
...spread syntax "expands" an array into its
elements, while rest syntax collects multiple
elements and "condenses" them into a single element.
... examples spread in function calls replace apply() it is common to use function.prototype.apply() in cases where you want to use the
elements of an array as arguments to a function.
display - Web app manifests
in this mode, the user agent will exclude ui
elements for controlling navigation, but can include other ui
elements such as a status bar.
... minimal-ui minimal-ui the application will look and feel like a standalone application, but will have a minimal set of ui
elements for controlling navigation.
... the
elements will vary by browser.
Authoring MathML - MathML
t insert one line in your document header: <script src="https://fred-wang.github.io/mathml.css/mspace.js"></script> if you need more complex constructions, you might instead consider using the heavier mathjax library as a mathml polyfill: <script src="https://fred-wang.github.io/mathjax.js/mpadded-min.js"></script> note that these two scripts perform feature detection of the mspace or mpadded
elements (see the browser compatibility table on these pages).
...use the text field for token
elements and buttons to build advanced constructions.
...use the
elements and the special chars panels to create various advanced mathematical constructs.
<mtable> - MathML
inside a <mtable> only <mtr> and <mtd>
elements may appear.
... these
elements are similar to <table> , <tr> and <td>
elements of html.
... unimplemented side specifies the position where <mlabeledtr> label
elements should be placed.
<semantics> - MathML
the mathml
elements <semantics>, <annotation> and <annotation-xml> are used to combine presentation and content markup and to provide both, layout information and semantic meaning of mathematical expressions.
... the <semantics> element acts as a container element associating annotations and must have child
elements (it will raise an invalid markup error otherwise).
... beware that <annotation-xml>
elements are only recognized, if the encoding attribute is set to one of the following: "application/mathml-presentation+xml" "mathml-presentation" "svg1.1" "text/html" "image/svg+xml" "application/xml".
Web audio codec guide - Web media technologies
latency 5 ms to 66.5 ms browser compatibility feature chrome edge firefox internet explorer opera safari opus support 33 14 15 no 20 11[2] this information refers to support for opus in html <audio> and <video>
elements, and not to webrtc.
...dth latency at least 100 ms browser compatibility feature chrome edge firefox internet explorer opera safari vorbis support 4 17 3.5 no 11.5 no this information refers to support for vorbis in html <audio> and <video>
elements, and not to webrtc.
...of course, if you can provide multiple formats (for example, by using the <source> element within your <audio> and <video>
elements), you can avoid many or all of those exceptions.
Web video codec guide - Web media technologies
for example, each coding tree unit (ctu)—similar to the macroblock used in previous codecs—consists of a tree of luma values for each sample as well as a tree of chroma values for each chroma sample used in the same coding tree unit, as well as any required syntax
elements.
...web browsers are required to support vp8 for webrtc, but not all browsers that do so also support it in html audio and video
elements.
... <video controls> <source type="video/webm" src="filename.webm"> <source type="video/mp4" src="filename.mp4"> </video> keep in mind that the <video> element requires a closing </video> tag, whether or not you have any <source>
elements inside it.
Using images in HTML - Web media technologies
references these articles cover some of the html
elements and css properties that are used to control how images are displayed on the web.
... <picture> the html <picture> element contains zero or more <source>
elements and one <img> element which provides versions of an image for different display/device scenarios.
... mapping the width and height attributes of media container
elements to their aspect-ratio this changes how browsers load images so their aspect ratios are calculated by the browser early on and can later be used to correct the display size of an image before it's loaded.
Web media technologies
today, there are a large number of apis available, as well as html
elements, dom interfaces, and other features that make it possible to not only perform these tasks, but use media in tandem with other technologies to do truly remarkable things.
... using audio and video in html a guide to using the html <audio> and <video>
elements.
...this ranges from simply using the alt attribute on <img>
elements to captions to tagging media for screen readers.
Critical rendering path - Web Performance
after the render tree is complete, layout occurs, defining the location and size of all the render tree
elements.
...the layout step determines where and how the
elements are positioned on the page, determining the width and height of each element, and where they are in relation to each other.
...block level
elements, by definition, have a default width of 100% of the width of their parent.
Applying SVG effects to HTML content - SVG: Scalable Vector Graphics
it establishes several filters, which are applied with css to three
elements in both the normal and mouse hover states.
... <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 same class: .blur { filter: url(#wherearemyglasses); } blurring is computation heavy, so ensure to use it sparingly, especially in
elements that get scrolled or animated.
... by creating the text using svg
elements combined with html you can make a variety of different text effects.
class - SVG: Scalable Vector Graphics
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.
... #00cc00; } circle.circleclass { stroke: #006600; fill: #cc0000; } ]]> </style> <rect class="rectclass" x="10" y="10" width="100" height="100"/> <circle class="circleclass" cx="40" cy="50" r="26"/> </svg> </body> </html>
elements the following
elements can use the class attribute: <a> <altglyph> <circle> <clippath> <defs> <desc> <ellipse> <feblend> <fecolormatrix> <fecomponenttransfer> <fecomposite> <feconvolvematrix> <fediffuselighting> <fedisplacementmap> <feflood> <fegaussianblur> <feimage> <femerge> <femorphology> <feoffset> <fespecularlighting> <fetile> <feturbulence> <filter> <font> <fo...
clip-path - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has noticeable effects mostly on the following nineteen
elements: <a>, <circle>, <clippath>, <ellipse>, <g>, <glyph>, <image>, <line>, <marker>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <svg>, <symbol>, <text>, <use> html,body,svg { height:100% } <svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <clippath id="myclip" clippathunits="objectboundingbox"> <circle cx=".5" cy=".5" r=".5" /> </clippath> <!-- top-left: apply a custom defined clipping path --> <rect x="1" y="1" width="8" height="8" stroke="gr...
... candidate recommendation extends its application to html
elements.
... recommendation initial definition (applies to svg
elements only).
clip-rule - SVG: Scalable Vector Graphics
« svg attribute reference home the clip-rule attribute only applies to graphics
elements that are contained within a <clippath> element.
...- left: evenodd --> <clippath id="emptystar"> <use xlink:href="#star" clip-rule="evenodd" /> </clippath> <rect clip-path="url(#emptystar)" width="50" height="90" fill="blue" /> <!-- right: nonzero --> <clippath id="filledstar"> <use xlink:href="#star" clip-rule="nonzero" /> </clippath> <rect clip-path="url(#filledstar)" width="50" height="90" x="50" fill="red" /> </svg>
elements the following
elements can use the clip-rule attribute, but only if they are inside a <clippath> element.
... graphical
elements » browser compatibility the compatibility table on this page is generated from structured data.
enable-background - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following eleven
elements: <a>, <defs>, <glyph>, <g>, <marker>, <mask>, <missing-glyph>, <pattern>, <svg>, <switch>, and <symbol> context notes value accumulate | new [ <x> <y> <width> <height> ]?
... default value accumulate animatable no accumulate if an ancestor container element has a property value of enable-background: new, then all graphics
elements within the current container element are rendered both onto the parent container elementʼs background image canvas and onto the target device.
... otherwise, there is no current background image canvas, so graphics
elements are only rendered onto the target device.
externalResourcesRequired - SVG: Scalable Vector Graphics
the externalresourcesrequired attribute is not inheritable (from a sense of attribute value inheritance), but if set on a container element, its value will apply to all
elements within the container.
... because setting externalresourcesrequired="true" on a container element will have the effect of disabling progressive display of the contents of that container, if that container includes
elements that reference external resources, authors should avoid simply setting externalresourcesrequired="true" on the outermost <svg> element on a universal basis.
... instead, it is better to specify externalresourcesrequired="true" on those particular graphics
elements or container
elements which specifically need the availability of external resources in order to render properly.
in - SVG: Scalable Vector Graphics
fourteen
elements are using this attribute: <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <fegaussianblur>, <femergenode>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile> usage notes value sourcegraphic | sourcealpha | backgroundimage | backgroundalpha | fillpaint | strokepaint | <filter-primi...
...tive-reference> default value sourcegraphic for first filter primitive, otherwise result of previous filter primitive animatable yes sourcegraphic this keyword represents the graphics
elements that were the original input into the <filter> element.
... sourcealpha this keyword represents the graphics
elements that were the original input into the <filter> element.
marker-end - SVG: Scalable Vector Graphics
for all shape
elements, except <polyline> and <path>, the last vertex is the same as the first vertex.
...for <path>
elements, for each closed subpath, the last vertex is the same as the first vertex.
... as a presentation attribute, it can be applied to any element but it has effect only on the following seven
elements: <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, and <rect> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <defs> <marker id="triangle" viewbox="0 0 10 10" refx="1" refy="5" markerunits="strokewidth" markerwidth="10" markerheight="10" orient="auto"> <path d="m 0 0 l 10 5 l 0 10 z" fill="#f00"/> </marker> </defs> <polyline fill="none" stroke="black" points="20,100 40,60 70,80 100,20" marker-end="url(#triang...
marker-start - SVG: Scalable Vector Graphics
for all shape
elements, except <polyline> and <path>, the last vertex is the same as the first vertex.
...for <path>
elements, for each closed subpath, the last vertex is the same as the first vertex.
... as a presentation attribute, it can be applied to any element but it has effect only on the following seven
elements: <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, and <rect> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <defs> <marker id="triangle" viewbox="0 0 10 10" refx="1" refy="5" markerunits="strokewidth" markerwidth="10" markerheight="10" orient="auto"> <path d="m 0 0 l 10 5 l 0 10 z" fill="#f00"/> </marker> </defs> <polyline fill="none" stroke="black" points="20,100 40,60 70,80 100,20" marker-start="url(#...
visibility - SVG: Scalable Vector Graphics
the visibility attribute lets you control the visibility of graphical
elements.
... depending on the value of attribute pointer-events, graphics
elements which have their visibility attribute set to hidden still might receive events.
... as a presentation attribute, it can be applied to any element but it has effect only on the following nineteen
elements: <a>, <altglyph>, <audio>, <canvas>, <circle>, <ellipse>, <foreignobject>, <iframe>, <image>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, <tspan>, <video> html, body, svg { height: 100%; } <svg viewbox="0 0 220 120" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="200" height="100" stroke="black" stroke-width="5" fill="transparent" /> <g stroke="seagreen" stroke-width="5" fill="skyblue"> <rect x="20" y="20" width="80" height="80" visibility="visible" /> <rect x="120" y="20" width...
xlink:href - SVG: Scalable Vector Graphics
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 defi...
... refer to the descriptions of the individual animation
elements for any restrictions on what types of
elements can be targets of particular types of animations.
... recommendation defines href for animation
elements.
xml:lang - SVG: Scalable Vector Graphics
the xml:lang attribute specifies the primary language used in contents and attributes containing text content of particular
elements.
... all
elements are using this attribute.
... candidate recommendation made the lang attribute (without namespace) available on all
elements and defined the interaction between both.
xml:space - SVG: Scalable Vector Graphics
svg supports the built-in xml xml:space attribute to handle whitespace characters inside
elements.
... child
elements inside an element may also have an xml:space attribute that overrides the parentʼs one.
... all
elements are using this attribute.
<linearGradient> - SVG: Scalable Vector Graphics
the <lineargradient> element lets authors define linear gradients that can be applied to fill or stroke of graphical
elements.
... don't be confused with css linear-gradient() as css gradients can only apply to html
elements where svg gradient can only apply to svg
elements.
...g, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementpermitted contentany number of the following
elements, in any order:descriptive
elements<animate>, <animatetransform>, <set>, <stop> specifications specification status comment scalable vector graphics (svg) 2the definition of '<lineargradient>' in that specification.
<radialGradient> - SVG: Scalable Vector Graphics
the <radialgradient> element lets authors define radial gradients that can be applied to fill or stroke of graphical
elements.
... don't be confused with css radial-gradient() as css gradients can only apply to html
elements where svg gradient can only apply to svg
elements.
...g, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementpermitted contentany number of the following
elements, in any order:descriptive
elements<animate>, <animatetransform>, <set>, <stop> specifications specification status comment scalable vector graphics (svg) 2the definition of '<radialgradient>' in that specification.
<switch> - SVG: Scalable Vector Graphics
the <switch> svg element evaluates any requiredfeatures, requiredextensions and systemlanguage attributes on its direct child
elements in order, and then renders the first child where these attributes evaluate to true.
... usage context 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.
...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.
SVG as an Image - SVG: Scalable Vector Graphics
many browsers support svg images in: html <img> or <svg>
elements css background-image gecko-specific contexts additionally, gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) introduced support for using svg in these contexts: css list-style-image css content svg <image> element svg <feimage> element canvas drawimage function restrictions for security purposes, gecko places some restrictions on svg content when it's being used as an image: javascript is disabled.
... note that the above restrictions are specific to image contexts; 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.
... recommendation defines the usage of svg within <img>
elements.
Clipping and masking - SVG: Scalable Vector Graphics
clipping refers to removing parts of
elements defined by other parts.
...since the rectangle covers only the upper half of the circle, the lower half of the circle will vanish: screenshotlive sample we now have a semicircle without having to deal with arcs in path
elements.
...for reverting a previously set display: none it is important to know, that the initial value for all svg
elements is inline.
SVG fonts - SVG: Scalable Vector Graphics
you can use literally any other svg
elements in here, even <filter>, <a> or <script>.
... the actual glyphs are then defined by <glyph>
elements.
... there are two further
elements that can be defined inside font: <hkern> and <vkern>.
<xsl:stylesheet> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt
elements, exslt functions, xpath functions, xpath axes the <xsl:stylesheet> element (or the equivalent <xsl:transform> element) is the outermost element of a stylesheet.
... extension-element-prefixes specifies a space-separated list of any namespace prefixes for extension
elements in this document.
... default-mode defines the default value for the mode attribute of all <xsl:template> and <xsl:apply-templates>
elements within its scope.
An Overview - XSLT: Extensible Stylesheet Language Transformations
instead they are simply a way of specifying a unique identifier for a known set of
elements.
... the string "http://www.w3.org/1999/xsl/transform" is a constant that designates the
elements so marked as belonging to the set of tags designated by the w3c in the 1999 xslt recommendation.
...below the root node are its children, which can be
elements, comments, processing instructions and so on.
port - Archive of obsolete content
this example rewrites the content script in the port.removelistener() example so that it uses once(): // content-script.js function getfirstparagraph() { var paras = document.get
elementsbytagname('p'); console.log(paras[0].textcontent); } self.port.once("get-first-para", getfirstparagraph); removelistener() you can use port.on() to listen for messages.
... // content-script.js function getfirstparagraph() { var paras = document.get
elementsbytagname('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.
Communicating using "port" - Archive of obsolete content
function getfirstparagraph() { var paras = document.get
elementsbytagname('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.
... this example rewrites the "listener.js" content script in the port.removelistener() example so that it uses once(): function getfirstparagraph() { var paras = document.get
elementsbytagname('p'); console.log(paras[0].textcontent); } self.port.once("get-first-para", getfirstparagraph); json-serializable values the payload for an message can be any json-serializable value.
XUL Migration Guide - Archive of obsolete content
xul windows xul windows are used to define completely new windows to host user interface
elements specific to the add-on.
... apis like ui and panel are very generic and with the right content can be used to replace many specific xul
elements.
context-menu - Archive of obsolete content
the example above works because <img>
elements can't contain other
elements, but in the example below, node.nodename is not guaranteed to be "p" - for example, it won't be "p" if the user context-clicked a link inside a paragraph: var cm = require("sdk/context-menu"); cm.item({ label: "a paragraph", context: cm.selectorcontext("p"), contentscript: 'self.on("context", function (node) {' + ' console.log(node.nodename);'...
... this includes non-input
elements with the contenteditable attribute set to true.
page-worker - Archive of obsolete content
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.get
elementsbytagname('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 ...
... for example, this add-on loads a page from wikipedia, and runs a content script in it to send all the headers back to the main add-on code: var pageworkers = require("sdk/page-worker"); // this content script sends header titles from the page to the add-on: var script = "var
elements = document.queryselectorall('h2 > span'); " + "for (var i = 0; i <
elements.length; i++) { " + " postmessage(
elements[i].textcontent) " + "}"; // create a page worker that loads wikipedia: pageworkers.page({ contenturl: "http://en.wikipedia.org/wiki/internet", contentscript: script, contentscriptwhen: "ready", onmessage: function(message) { con...
package.json - Archive of obsolete content
these values will be used as the add-on's em:contributor
elements in its install.rdf.
... these values will be used as the add-on's em:translator
elements in its install.rdf.
Displaying annotations - Archive of obsolete content
in this chapter we'll use a page-mod to locate
elements of web pages that have annotations associated with them, and a panel to display the annotations.
... when a page is loaded the matcher searches the dom for
elements that match annotations.
Annotator - Archive of obsolete content
the add-on is an annotator: it enables the user to select
elements of web pages and enter notes (annotations) associated with them.
...whenever the user loads a page containing annotated
elements these
elements are highlighted, and if the user moves the mouse over an annotated element its annotation is displayed.
Dialogs and Prompts - Archive of obsolete content
explicit if you are not satisfied with the layout of predefined buttons in dialog, you can put explicit button
elements in your xul file and add a dlgtype attribute to them.
... programmatic button access if you want to access the accept ("ok") and cancel buttons from script, use this: // disable the ok and cancel btns document.documentelement.getbutton("accept").disabled = true; document.documentelement.getbutton("cancel").disabled = true; links dialog.xml — xbl bindings for <dialog> and <dialogheader>
elements.
File I/O - Archive of obsolete content
however, you can enumerate available drives using the following code: components.utils.import("resource://gre/modules/fileutils.jsm"); var root = new fileutils.file("\\\\."); var drivesenum = root.directoryentries, drives = []; while (drivesenum.hasmore
elements()) { drives.push(drivesenum.getnext().
... // file is the given directory (nsifile) var entries = file.directoryentries; var array = []; while(entries.hasmore
elements()) { var entry = entries.getnext(); entry.queryinterface(components.interfaces.nsifile); array.push(entry); } reading from a file read into a stream or a string this will allow you to read a file without locking up the ui thread while reading.
HTML to DOM - Archive of obsolete content
the function below will safely parse simple html and return a dom object which can be manipulated like web page
elements.
...the returned <body> object is of type element here is a sample that counts the number of paragraphs in a string: var dompars = htmlparser('<p>foo</p><p>bar</p>'); alert(dompars.get
elementsbytagname('p').length); if htmlparser() returns the element name html (instead of body), you have all document object with its complete functions list, therefore you can retrieve info within div tag like this: var dompars = htmlparser("<div id='userinfo'>john was a mediocre programmer, but people liked him <strong>anyway</strong>.</div>"); alert(dompars.getelementbyid('userinfo').innerhtml); ...
QuerySelector - Archive of obsolete content
'bar'); // add <bar xmlns="somens"/> foo.documentelement.appendchild(bar); alert(foo.$('bar').nodename); // gives 'bar' element.prototype.$ = function (selector) { // works for html, xul, and plain xml return this.queryselector(selector); }; html example: <h1><a>test!<a/></h1> <script> element.prototype.$ = function (selector) { return this.queryselector(selector); }; alert(document.get
elementsbytagname('h1')[0].$('a').nodename); // 'a' xul example: <hbox><vbox/></hbox> <script type="text/javascript"><![cdata[ element.prototype.$ = function (selector) { return this.queryselector(selector); }; var xulns = 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'; alert(document.get
elementsbytagnamens(xulns, 'hbox')[0].$('vbox').nodename); // vbox ]]></script> xml example: <fo...
...o xmlns="somens"><bar/></foo> in document earlier var foo = document.get
elementsbytagnamens('somens', 'foo')[0]; alert(foo.$('bar')); note that for plain xml, the # 'id' selector will not work with an 'id' attribute (since a such-named attribute need not necessarily be of type id in xml, though it is in html and xul), nor will it work with xml:id.
SVG General - Archive of obsolete content
svg template here is a basic markup template to start building an svg document: <svg xmlns="http://www.w3.org/2000/svg"> <!-- svg
elements go here --> </svg> note: it is recommended that you do not use dtd's with svg documents.
... dynamic scripting helper this little helper script can be used to simplify creation of svg
elements in script.
Windows - Archive of obsolete content
var wenum = components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getservice(components.interfaces.nsiwindowwatcher) .getwindowenumerator(); var index = 1; var windowname = "yourwindowname"; while (wenum.hasmore
elements()) { var win = wenum.getnext(); if (win.name == windowname) { win.focus(); return; } index++ } window.open("chrome://to/your/window.xul", windowname, "features"); uniquely identifying dom windows requires gecko 2.0(firefox 4 / thunderbird 3.3 / seamonkey 2.1) in gecko, each dom window has a unique 64-bit id number.
... similarly, you can get the current inner window id using the nsidomwindowutils attribute currentinnerwindowid: var util = win.queryinterface(components.interfaces.nsiinterfacerequestor).getinterface(components.interfaces.nsidomwindowutils); var windowid = util.currentinnerwindowid; programatically modifying html when attempting to modify html
elements, it is important to specify the namespace.
Interaction between privileged and non-privileged pages - Archive of obsolete content
strongly recommended that third parties adding their own events use their own prefix to avoid confusion and lessen the probability of conflicts with other new events.") in the case where your extension's overlay does not interact directly with browser.xul, such as in a sidebar, it might be easier to add the event listener to the top-level document directly as shown below (also see: accessing the
elements of the top-level document from a child window).
... document.addeventlistener("message", function(e) { yourfunction(e); }, false, true); sending data from chrome to unprivileged document to "answer" the web page (e.g., return code), your extension can set an attribute or attach child
elements on the event target element (<myextensiondataelement/> in this example).
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
alternative: element.click() xul and html
elements have a pre-defined .click() method that will fire a synthesized click event.
... document.getelementbyid("mybutton").click(); alternative: element.docommand() xul
elements that have a command (oncommand or command attribute) assigned will also have a working docommand method.
Supporting search suggestions in search plugins - Archive of obsolete content
(this means that a suggestion-supporting engine plugin will have two <url>
elements, the other one being the main text/html search url.) for example, the yahoo search plugin has this <url> entry: <url type="application/x-suggestions+json" template="http://ff.search.yahoo.com/gossip?output=fxjson&command={searchterms}"/> if the user types "fir" into the search bar, then pauses, firefox inserts "fir" in place of {searchterms} and queries that url: <url type="application/x-sug...
... for example, if the search term is "fir", and you don't need to return descriptions or alternate query urls, you might return the following json: ["fir", ["firefox", "first choice", "mozilla firefox"]] note that in this example, only the query string and completion array are specified, leaving out the optional
elements.
Creating reusable content with CSS and XBL - Archive of obsolete 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.
...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 easy to maintain and reuse.
XML data - Archive of obsolete content
you want the document's info
elements to be displayed like html paragraphs.
... in the document's stylesheet, you specify how info
elements are to be displayed: info { display: block; margin: 1em 0; } the most common values for the display property are: block displayed like html's div (for headings, paragraphs) inline displayed like html's span (for emphasis within text) add your own style rules that specify the font, spacing and other details in the same way as for html.
XUL user interfaces - Archive of obsolete content
copy and paste the content from here, making sure that you scroll to get all of it: // xul demonstration var datebox, daybox, currentday, status; //
elements // called by window onload function init() { datebox = document.getelementbyid("date-text") daybox = document.getelementbyid("day-box") status = document.getelementbyid("status") settoday(); } // called by clear button function cleardate() { datebox.value = "" refresh() } // called by today button function settoday() { var d = new date() datebox.value = (d.getmonth() + 1) ...
...it is made up of other
elements that are generated by its xbl binding.
Defining Cross-Browser Tooltips - Archive of obsolete content
unlike the title element, which provides information about an entire document and may only appear once, the title attribute may annotate any number of
elements.
...in this approach, the server checks outgoing html for
elements that have an alt attribute but no title attribute, and inserts a title attribute with the same content as the alt attribute.
How to implement a custom XUL query processor component - Archive of obsolete content
// the output for a result has been removed and the result is no longer being used by the builder hasbeenremoved: function() { } }; // basic wrapper for nsisimpleenumerator function templateresultset(aarrayofdata) { this._index = 0; this._array = aarrayofdata; } templateresultset.prototype = { queryinterface: xpcomutils.generateqi([components.interfaces.nsisimpleenumerator]), hasmore
elements: function() { return this._index < this._array.length; }, getnext: function() { return new templateresult(this._array[this._index++]); } }; // the query processor class - implements nsixultemplatequeryprocessor function templatequeryprocessor() { // our basic list of data this._data = [ {name: "mark", age: 36, hair: "brown", eye: "brown"}, {nam...
... we do not make use of any <query/> or <rule/>
elements in the xul template block.
Methods - Archive of obsolete content
checkadjacentelement clearresults clearselection click close collapsetoolbar contains decrease decreasepage docommand ensureelementisvisible ensureindexisvisible ensureselectedelementisvisible expandtoolbar extra1 extra2 focus getbrowseratindex getbrowserfordocument getbrowserfortab getbrowserindexfordocument getbutton getdefaultsession geteditor get
elementsbyattribute get
elementsbyattributens getformattedstring gethtmleditor getindexoffirstvisiblerow getindexofitem getitematindex getnextitem getnotificationbox getnotificationwithvalue getnumberofvisiblerows getpagebyid getpreviousitem getresultat getresultcount getresultvalueat getrowcount getsearchat getselecteditem getsession getsessionbyname getsessionres...
...sizeto startediting stop stopediting swapdocshells syncsessions timedselect toggleitemselection related dom element methods dom:element.addeventlistener dom:element.appendchild dom:element.comparedocumentposition dom:element.dispatchevent dom:element.getattribute dom:element.getattributenode dom:element.getattributenodens dom:element.getattributens dom:element.get
elementsbytagname dom:element.get
elementsbytagnamens dom:element.getfeature fixme: brokenlink dom:element.getuserdata dom:element.hasattribute dom:element.hasattributens dom:element.hasattributes dom:element.haschildnodes dom:element.insertbefore dom:element.isequalnode dom:element.issamenode dom:element.issupported dom:element.lookupnamespaceuri dom:element.lookupprefix dom:el...
MenuButtons - Archive of obsolete content
both the button and the toolbar button
elements support two special types used for creating menu buttons.
... when the command is fired, it bubbles up through the chain of
elements to the top of the document.
MenuItems - Archive of obsolete content
d-bookmark" class="menuitem-iconic" label="add bookmark" image="addbookmark.png"/> #add-bookmark { list-style-image: url('addbookmark.png'); } #add-bookmark .menu-iconic-icon { -moz-image-region: rect(0px, 16px, 16px, 0px) !important; } #add-bookmark:hover .menu-iconic-icon { -moz-image-region: rect(16px, 16px, 32px, 0px) !important; } this behavior is fundamentally different to other html
elements, such as <li> or <div> where list-style-image and -moz-image-region can be applied at the same element level.
...this is an advantage when attaching several menuitems or buttons to the same command, as the disabled state can be adjusted once for the command, and this will propagate to all
elements attached to it.
OpenClose - Archive of obsolete content
for menupopups attached to other
elements using the popup or context attributes, see opening a popup below.
...for menupopups attached to other
elements using the popup or context attributes, see closing a popup below.
boxObject - Archive of obsolete content
« xul reference boxobject type: nsiboxobject this property is available for
elements that are derived from boxes, which is most displayable xul
elements.
... prior to gecko 1.9.1, you can retrieve the boxobject for non-xul
elements using the document.getboxobjectfor method; the method was removed in gecko 1.9.1 because it was non-standard.
Property - Archive of obsolete content
minute minuteleadingzero mode month monthleadingzero name next nomatch notificationshidden object observes onfirstpage onlastpage open ordinal orient pack pagecount pageid pageincrement pageindex pagestep parentcontainer palette persist persistence placeholder pmindicator popup popupboxobject popupopen position predicate preference
elements preferencepanes preferences priority radiogroup readonly readonly ref resource resultspopup scrollboxobject scrollincrement scrollheight scrollwidth searchbutton searchcount searchlabel searchparam searchsessions second secondleadingzero securityui selected selectedbrowser selectedcount selectedindex selecteditem selecteditems selectedpane...
...ment.baseuri dom:element.childelementcount dom:element.childnodes dom:element.children dom:element.clientheight dom:element.clientleft dom:element.clienttop dom:element.clientwidth dom:element.clonenode dom:element.firstchild dom:element.firstelementchild dom:element.lastchild dom:element.lastelementchild dom:element.localname dom:element.namespaceuri dom:element.next
elementsibling dom:element.nextsibling dom:element.nodename dom:element.nodetype dom:element.nodevalue dom:element.ownerdocument dom:element.parentnode dom:element.prefix dom:element.previous
elementsibling dom:element.previoussibling dom:element.scrollheight dom:element.scrollleft dom:element.scrolltop dom:element.scrollwidth dom:element.tagname dom:element.textcontent ...
Bindings - Archive of obsolete content
<query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/
elements/1.1/title" object="?title"/> <triple subject="?photo" predicate="http://purl.org/dc/
elements/1.1/description" object="?description"/> </query> it works similarly to the previous triple.
... </query> <rule> <binding subject="?photo" predicate="http://purl.org/dc/
elements/1.1/description" object="?description"/> <action> ...
Building Hierarchical Trees - Archive of obsolete content
<treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://www.xulplanet.com/rdf/address"/> <treecell label="rdf:http://www.xulplanet.com/rdf/floors"/> </treerow> </treeitem> </treechildren> </rule> <rule> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://purl.org/dc/
elements/1.1/title"/> </treerow> </treeitem> </treechildren> </rule> </template> </tree> the first rule is for the houses as indicated by the rule's condition and the second rule is for the streets.
...in this example, the two group
elements are displayed at the first level.
Multiple Rule Example - Archive of obsolete content
<vbox id="photoslist" align="start" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <rule> <conditions> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/
elements/1.1/title" object="?title"/> <triple subject="?photo" predicate="http://purl.org/dc/
elements/1.1/description" object="?description"/> <triple subject="?photo" predicate="http://purl.org/dc/
elements/1.1/date" object="?date"/> </conditions> <action> <hbox uri="?photo" class="box-padde...
... <groupbox> <caption label="photo details"/> <label value="?description"/> <label value="date: ?date"/> </groupbox> </hbox> </action> </rule> <rule> <conditions> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/
elements/1.1/title" object="?phototitle"/> </conditions> <action> <vbox uri="?photo" class="box-padded"> <label value="?phototitle"/> <image src="?photo"/> </vbox> </action> </rule> </template> </vbox> in this example, the first rule matches only those photos with title, description, and date properties.
Static Content - Archive of obsolete content
ry-ont#country" oncommand="applyfilter(event.target.value);"> <menupopup> <menuitem label="all"/> </menupopup> <template> <query> <content uri="?start"/> <triple subject="?country" predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" object="?start"/> <triple subject="?country" predicate="http://purl.org/dc/
elements/1.1/title" object="?countrytitle"/> </query> <action> <menupopup> <menuitem uri="?country" label="?countrytitle" value="?country"/> </menupopup> </action> </template> </menulist> the only difference between the previous example and this one is that the menulist element has some additional content added before the template.
...9/countries/country-ont#country" onselect="applyfilter(event.target.value);"> <radio label="all" selected="true"/> <template> <query> <content uri="?start"/> <triple subject="?country" predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" object="?start"/> <triple subject="?country" predicate="http://purl.org/dc/
elements/1.1/title" object="?countrytitle"/> </query> <action> <radio uri="?country" label="?countrytitle" value="?country"/> </action> </template> </radiogroup> this example doesn't have any other content to generate outside the radio element with the uri attribute, so it will just be copied as is.
Using Multiple Queries to Generate More Results - Archive of obsolete content
<template> <queryset> <query> <content uri="?start"/> <member container="?start" child="?item"/> </query> <rule> <binding subject="?item" predicate="http://purl.org/dc/
elements/1.1/title" object="?title"/> <action> <label uri="?item" value="?title" class="header"/> </action> </rule> </queryset> <queryset> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.xulplanet.com/rdf/people" object="?people"/> <member container="?people" child="?item"/> </query> <rule> <binding subject="?it...
...em" predicate="http://purl.org/dc/
elements/1.1/title" object="?title"/> <action> <label uri="?item" value="?title"/> </action> </rule> </queryset> </template> you can view the example.
Using Recursive Templates - Archive of obsolete content
<groupbox type="menu" datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="*"/> <action> <vbox uri="?" class="indent"> <label value="?name"/> </vbox> </action> </template> </groupbox> in this simplified example, the xpath expression just gets the list of child
elements of the reference node.
...since the initial reference node is the root of the xml source document, the results are two
elements, one for each group element.
The Joy of XUL - Archive of obsolete content
separation of presentation from application logic one of the major downfalls of most web applications is the tight coupling of user interface
elements with client application logic.
... xbl the extensible bindings language (xbl) is a markup language that defines special new
elements, or "bindings" for xul widgets.
Things I've tried to do with XUL - Archive of obsolete content
html
elements have the non-standard clientwidth/clientheight properties (see http://www.mozilla.org/docs/dom/domr...entheight.html); no equivalent exists for xul.
... resize event problems going with the inability to obtain the clientwidth/clientheight of xul
elements, it's impossible to handle the "resize" event yourself to grow/shrink content as needed -- as you grow the content, when you shrink the window, the content will simply be clipped (because now it has a bigger size than the window).
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
lette"> <toolbarbutton id="myextension-button" class="toolbarbutton-1" label="&toolbarbutton.label;" tooltiptext="&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>.
Creating Dialogs - Archive of obsolete content
://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" buttons="accept,cancel" ondialogaccept="return dook();" ondialogcancel="return docancel();"> <script> function dook(){ alert("you pressed ok!"); return true; } function docancel(){ alert("you pressed cancel!"); return true; } </script> <description value="select a button"/> </dialog> you may place any
elements that you wish in a dialog.
... true; } </script> <dialogheader title="my dialog" description="example dialog"/> <groupbox flex="1"> <caption label="select favourite fruit"/> <radio id="orange" label="oranges because they are fruity"/> <radio id="violet" selected="true" label="strawberries because of their colour"/> <radio id="yellow" label="bananas because they are pre-packaged"/> </groupbox> </dialog> the buttons
elements can be accessed with the following javascript // the accept button var acceptbutt = document.documentelement.getbutton("accept") more examples more examples in dialogs and prompts (code snippets).
More Menu Features - Archive of obsolete content
« previousnext » in this section, we'll look at creating submenus and checked menus creating submenus you can create submenus inside other menus (nested menus) using the existing
elements.
...the checks are created in a similar way to the checkbox and radio
elements.
Scroll Bars - Archive of obsolete content
some
elements, such as text boxes, will also add scroll bars as necessary when the content inside is too large.
...a scroll bar creates all of these
elements automatically.
XBL Example - Archive of obsolete content
content of the slideshow first, let's determine what
elements need to go in the xbl content.
...the flex attribute has been added to a number of
elements so that it stretches in the right way.
XPCOM Examples - Archive of obsolete content
<script> function getcookies() { var menu = document.getelementbyid("cookiemenu"); menu.removeallitems(); var cookiemanager = components.classes["@mozilla.org/cookiemanager;1"] .getservice(components.interfaces.nsicookiemanager); var iter = cookiemanager.enumerator; while (iter.hasmore
elements()){ var cookie = iter.getnext(); if (cookie instanceof components.interfaces.nsicookie){ if (cookie.host == "www.mozillazine.org") menu.appenditem(cookie.name,cookie.value); } } } </script> <hbox> <menulist id="cookiemenu" onpopupshowing="getcookies();"/> </hbox> the getcookies() function will be called whenever the menu is opened, as indicated by the onpopupshowin...
...an enumerator has a hasmore
elements() method which will return true until we get to the last cookie.
XUL Structure - Archive of obsolete content
the three types of chrome packages are: content - windows and scripts the declarations of the windows and the user interface
elements contained within them.
...the files located in the global part of a skin package contain the default look for all of the xul interface
elements.
Urlbar-icons - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] the location of ui
elements like the bookmarks, feed and go buttons.
... create new image or button child
elements to add your own items.
XUL Accesskey FAQ and Policies - Archive of obsolete content
common
elements that don't get accesskeys ok buttons.
...look for dependencies of bug 129179 (the xul accesskey hookup meta bug), or look for bugs with "accesskey" or "mnemonic" in the summary, or look for dialogs where there are no
elements with underlined letters.
broadcasterset - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container element for broadcaster
elements.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
conditions - Archive of obsolete content
within the conditions can be placed content, member and triple
elements.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
dialog - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), ...
... related
elements dialogheader ...
groupbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] the groupbox is used to group related
elements together.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
image - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...this and the other icon classes may be used by image
elements or other
elements which can have an image.
listcol - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements listbox, listcell, listcols, listhead, listheader, listitem ...
listcols - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements listbox, listcell, listcol, listhead, listheader, listitem ...
member - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] used within a rule's conditions element to match
elements that are containers or are contained within another element.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
menupopup - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), ...
... related
elements menu, menubar, menuitem, menulist, menuseparator interfaces nsiaccessibleprovider, nsidomxulpopupelement ...
progressmeter - Archive of obsolete content
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.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
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.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
scrollbox - Archive of obsolete content
if their container doesn't give enough room to hold them (geometrically) what happens depends on the enclosing
elements; often the content is just clipped off on the bottom or right (depending on what's too big to fit).
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
spacer - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements separator, splitter ...
spinbuttons - Archive of obsolete content
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.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
statusbar - Archive of obsolete content
s, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements statusbarpanel interfaces nsiaccessibleprovider ...
stringbundleset - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container for stringbundle
elements.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
tabpanel - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements tabbox, tabs, tab, tabpanels.
textnode - Archive of obsolete content
this is useful if you want to use the html element or other
elements that have text content inside them instead of in attributes.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
titlebar - Archive of obsolete content
elements inside the titlebar usually don't receive any mouse events, so e.g.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
toolbar - Archive of obsolete content
inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
... related
elements toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
toolbargrippy - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements toolbar, toolbarbutton, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
toolbaritem - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements toolbar, toolbarbutton, toolbargrippy, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarpalette - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarseparator - Archive of obsolete content
s, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarset - Archive of obsolete content
s, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarspacer, toolbox ...
toolbarspacer - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
toolbarspring - Archive of obsolete content
s, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbox interfaces nsiaccessibleprovider ...
tooltip - Archive of obsolete content
depending on the platform and theme being used, some
elements will have set a maximum width so they will always appear cropped.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), ...
treechildren - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...subject" flex="2"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="joe@somewhere.com"/> <treecell label="top secret plans"/> </treerow> </treeitem> <treeitem> <treerow> <treecell label="mel@whereever.com"/> <treecell label="let's do lunch"/> </treerow> </treeitem> </treechildren> </tree> related
elements tree, treecols, treecol, treeitem, treerow, treecell and treeseparator.
treeseparator - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
...butenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
elements tree, treecols, treecol, treechildren, treeitem, treerow and treecell.
where - Archive of obsolete content
for more information, see where
elements.
... ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
wizard - Archive of obsolete content
wizardpages type: dom nodelist of wizardpage
elements this property holds the list of wizardpage
elements in the wizard.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattribute...
Dialogs in XULRunner - Archive of obsolete content
alogheader title="my dialog" description="example dialog"/> <groupbox flex="1"> <caption label="select favorite fruit"/> <radiogroup> <radio id="1" label="oranges because they are fruity"/> <radio id="2" selected="true" label="strawberries because of color"/> <radio id="3" label="bananna because it pre packaged"/> </radiogroup> </groupbox> </dialog> xul window
elements have a special method to open dialogs, called window.opendialog().
...however, xul does support
elements to make creating wizards a simple task as well.
Atomic RSS - Archive of obsolete content
it brings in atom
elements into rss, adding the advantages of atom to rss while maintaining backwards compatibility.
... documentation selected articles atomic rss tim bray talks about using atom 1.0 as a micro format and extension module for rss 2.0; keeping rss 2.0 as your sydication format but bringing in and using selected atom 1.0
elements.
caret - MDN Web Docs Glossary: Definitions of Web-related terms
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.
... html
elements that may present a caret these
elements provide text entry fields or boxes and therefore make use of the caret.
What is accessibility? - Learn web development
on of accessibility for people with cognitive impairments includes: delivering content in more than one way, such as by text-to-speech or by video; easily-understood content, such as text written using plain-language standards; focusing attention on important content; minimizing distractions, such as unnecessary content or advertisements; consistent webpage layout and navigation; familiar
elements, such as underlined links blue when not visited and purple when visited; dividing processes into logical, essential steps with progress indicators; website authentication as easy as possible without compromising security; and making forms easy to complete, such as with clear error messages and simple error recovery.
... different operating systems have different accessibility apis available : windows: msaa/iaccessible, uiaexpress, iaccessible2 mac os x: nsaccessibility linux: at-spi android: accessibility framework ios: uiaccessibility where the native semantic information provided by the html
elements in your web apps falls down, you can supplement it with features from the wai-aria specification, which add semantic information to the accessibility tree to improve accessibility.
Fundamental CSS comprehension - Learn web development
the default margin applied to the <h2> and <p>
elements by the browser will interfere with our design, so write a rule that targets all these
elements and sets their margin to 0.
... you should include .card at the start of the selector chain in all your rules, so that these rules wouldn't interfere with the styling of any other
elements if the business card were to be put on a page with a load of other content.
Organizing your CSS - Learn web development
if you have a few things you know you will want to apply to lots of different
elements, they can come in this section.
... previous overview: building blocks in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-
elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form
elements styling tables debugging css organizing your css ...
Floats - Learn web development
clearing floats we have seen that the float is removed from normal flow and that other
elements will display beside it, therefore if we want to stop the following element from moving up we need to clear it; this is achieved with the clear property.
... clearing boxes wrapped around a float you now know how to clear something following a floated element, but let's see what happens if you have a tall float and a short paragraph, with a box wrapped around both
elements.
Test your skills: floats - Learn web development
you will be working through three small tasks which use different
elements of the material you have just covered.
... floats one in this task you need to float the two
elements with a class of float1 and float2 left and right respectively.
CSS layout - Learn web development
normal flow
elements on webpages lay themselves out according to normal flow - until we do something to change that.
... positioning positioning allows you to take
elements out of the normal document layout flow, and make them behave differently, for example sitting on top of one another, or always remaining in the same place inside the browser viewport.
How CSS works - Learn web development
some
elements are parents of child nodes, and child nodes have siblings.
...its children are a text node and the three nodes corresponding to our <span>
elements.
The HTML5 input types - Learn web development
you could display an input value or the output of a calculation inside any element, but <output> is special — like <label>, it can take a for attribute that allows you to associate it with the element or
elements that the output value came from.
...here's a live example that falls back to <select>
elements in non-supporting browsers: let's look at the different available types in brief.
Example 4 - Learn web development
ow) { var optlist = select.queryselector('.optlist'); optlist.classlist.toggle('hidden'); } function highlightoption(select, option) { var optionlist = select.queryselectorall('.option'); optionlist.foreach(function (other) { other.classlist.remove('highlight'); }); option.classlist.add('highlight'); }; function updatevalue(select, index) { var nativewidget = select.previous
elementsibling; var value = select.queryselector('.value'); var optionlist = select.queryselectorall('.option'); nativewidget.selectedindex = index; value.innerhtml = optionlist[index].innerhtml; highlightoption(select, optionlist[index]); }; function getindex(select) { var nativewidget = select.previous
elementsibling; return nativewidget.selectedindex; }; // ------------- // // event bi...
...}); select.addeventlistener('blur', function (event) { deactivateselect(select); }); }); }); window.addeventlistener('load', function () { var selectlist = document.queryselectorall('.select'); selectlist.foreach(function (select) { var optionlist = select.queryselectorall('.option'), selectedindex = getindex(select); select.tabindex = 0; select.previous
elementsibling.tabindex = -1; updatevalue(select, selectedindex); optionlist.foreach(function (option, index) { option.addeventlistener('click', function (event) { updatevalue(select, index); }); }); select.addeventlistener('keyup', function (event) { var length = optionlist.length, index = getindex(select); if (event.keycode === 27) { deactiv...
Example 5 - Learn web development
ow) { var optlist = select.queryselector('.optlist'); optlist.classlist.toggle('hidden'); } function highlightoption(select, option) { var optionlist = select.queryselectorall('.option'); optionlist.foreach(function (other) { other.classlist.remove('highlight'); }); option.classlist.add('highlight'); }; function updatevalue(select, index) { var nativewidget = select.previous
elementsibling; var value = select.queryselector('.value'); var optionlist = select.queryselectorall('.option'); optionlist.foreach(function (other) { other.setattribute('aria-selected', 'false'); }); optionlist[index].setattribute('aria-selected', 'true'); nativewidget.selectedindex = index; value.innerhtml = optionlist[index].innerhtml; highlightoption(select, optionlist[index]); ...
...}; function getindex(select) { var nativewidget = select.previous
elementsibling; return nativewidget.selectedindex; }; // ------------- // // event binding // // ------------- // window.addeventlistener("load", function () { var form = document.queryselector('form'); form.classlist.remove("no-widget"); form.classlist.add("widget"); }); window.addeventlistener('load', function () { var selectlist = document.queryselectorall('.select'); selectlist.foreach(function (select) { var optionlist = select.queryselectorall('.option'), selectedindex = getindex(select); select.tabindex = 0; select.previous
elementsibling.tabindex = -1; updatevalue(select, selectedindex); optionlist.foreach(function (option, index) { option.addeventlistener('mouseover', ...
Sending forms through JavaScript - Learn web development
form.addeventlistener( "submit", function ( event ) { event.preventdefault(); senddata(); } ); } ); here's the live result: you can even get more involved with the process by using the form's
elements property to get a list of all of the data
elements in the form and manually manage them one at a time.
... to learn more about that, see the example in accessing the element list's contents in htmlformelement.
elements.
Example - Learn web development
d have the same font settings by default, textarea are set with a monospace font */ font: 1em sans-serif; /* to give the same size to all text field */ width: 300px; -moz-box-sizing: border-box; box-sizing: border-box; /* to harmonize the look & feel of text field border */ border: 1px solid #999; } input:focus, textarea:focus { /* to give a little highligh on active
elements */ border-color: #000; } textarea { /* to properly align multiline text field with their label */ vertical-align: top; /* to give enough room to type some text */ height: 5em; /* to allow users to resize any textarea vertically it works only on chrome, firefox and safari */ resize: vertical; } .button { /* to position the buttons to the same position of the text fields */...
... padding-left: 90px; /* same size as the label
elements */ } button { /* this extra magin represent the same space as the space between the labels and their text fields */ margin-left: .5em; } result ...
The web and web standards - Learn web development
for example, the html living standard describes exactly how html (all the html
elements, and their associated apis, and other surrounding technologies) should be implemented.
... html, css, and javascript html, css, and javascript are the main three technologies you'll use to build a website: hypertext markup language, or html, is a markup language consisting of different
elements you can wrap (mark up) content in to give it meaning (semantics) and structure.
Tips for authoring fast-loading HTML pages - Learn web development
this technique works best with
elements that will have limited dimensions, and will not work for every use of a background image.
... tables should use the css selector: property combination: table-layout: fixed; and should specify widths of columns using the <col> and the <colgroup>
elements.
Test your skills: HTML text basics - Learn web development
html text basics 1 in this task we want you to mark up the provided html using semantic heading and paragraph
elements.
... 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.
Multimedia and Embedding - Learn web development
video and audio content next, we'll look at how to use the html5 <video> and <audio>
elements to embed video and audio on our pages, including basics, providing access to different file formats to different browsers, adding captions and subtitles, and how to add fallbacks for older browsers.
... from <object> to <iframe> — other embedding technologies at this point we'd like to take somewhat of a sideways step, looking at a couple of
elements that allow you to embed a wide variety of content types into your webpages: the <iframe>, <embed> and <object>
elements.
Structuring the web with HTML - Learn web development
html is used to specify whether your web content should be recognized as a paragraph, list, heading, link, image, multimedia player, form, or one of many other available
elements or even a new element that you define.
...n then move on to learning about more advanced topics such as: css, and how to use it to style html (for example alter your text size and fonts used, add borders and drop shadows, layout your page with multiple columns, add animations and other visual effects.) javascript, and how to use it to add dynamic functionality to web pages (for example find your location and plot it on a map, make ui
elements appear/disappear when you toggle a button, save users' data locally on their computers, and much much more.) modules this topic contains the following modules, in a suggested order for working through them.
Image gallery - Learn web development
if the online editor you are using doesn't have separate javascript/css panels, feel free to put them inline <script>/<style>
elements inside the html page.
...the html body looks like this: <h1>image gallery example</h1> <div class="full-img"> <img class="displayed-img" src="images/pic1.jpg"> <div class="overlay"></div> <button class="dark">darken</button> </div> <div class="thumb-bar"> </div> the example looks like this: the most interesting parts of the example's css file: it absolutely positions the three
elements inside the full-img <div> — the <img> in which the full-sized image is displayed, an empty <div> that is sized to be the same size as the <img> and put right over the top of it (this is used to apply a darkening effect to the image via a semi-transparent background color), and a <button> that is used to control the darkening effect.
Test your skills: Loops - Learn web development
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.
... loops 1 in our first looping task we want you start by creating a simple loop that goes through all the items in the provided myarray and prints them out on the screen inside list items (i.e., <li>
elements), which are appended to the provided list.
Third-party APIs - Learn web development
const audiosource = audioctx.createmedia
elementsource(audioelement); // etc.
...if so, we don't try to display any — we create a <p> containing the text "no results returned." and insert it into the.<section> if some articles are returned, we, first of all, create all the
elements that we want to use to display each news story, insert the right contents into each one, and then insert them into the dom at the appropriate places.
Client-side web APIs - Learn web development
drawing graphics the browser contains some very powerful graphics programming tools, from the scalable vector graphics (svg) language, to apis for drawing on html <canvas>
elements, (see the canvas api and webgl).
... video and audio apis html5 comes with
elements for embedding rich media in documents — <video> and <audio> — which in turn come with their own apis for controlling playback, seeking, etc.
Working with JSON - Learn web development
at the moment it only contains two lines, which grab references to the <header> and <section>
elements and store them in variables: const header = document.queryselector('header'); const section = document.queryselector('section'); we have made our json data available on our github, at https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json.
...for each one, we: create several new
elements: an <article>, an <h2>, three <p>s, and a <ul>.
HTML performance features - Learn web development
objective: to learn about the impact of html
elements and attributes on web performance optimization.
...
elements & attributes impacting performance the <picture> element the <video> element the <source> element the <img> srcset attribute responsive images preloading content with rel="preload" - (https://w3c.github.io/preload/ ) async / defer attributes <iframe> <object> <script> rel attribute conclusion previous overview: performance next in this module the "why" of web performance what is web performance?
Web performance resources - Learn web development
<style type="text/css"> // insert your css here </style> javascript avoid javascript blocking by using the async or defer attributes, or link javascript assets after the page's dom
elements.
... javascript only block rendering for
elements that appear after the script tag in the dom tree.
Componentizing our React app - Learn web development
that second bullet is especially valuable: making a component out of common ui
elements allows you to change your code in one place and see those changes everywhere that component is used.
...in app.js, add the following line near the top of the file to import todo: import todo from "./components/todo"; with this component imported, you can replace all of the <li>
elements in app.js with <todo /> component calls.
Componentizing our Svelte app - Learn web development
take into account that it won't just show or hide the markup based on the condition — it will dynamically add and remove the
elements from the dom, depending on the condition.
...thanks to svelte reactivity, assigning the value of the editing variable will be enough to display the correct html
elements.
Error codes returned by Mozilla APIs
document and node errors the following errors can occur when using documents, nodes and
elements.
...57001c) ns_error_xpc_js_threw_null (0x8057001d) ns_error_xpc_js_threw_string (0x8057001e) ns_error_xpc_js_threw_number (0x8057001f) ns_error_xpc_javascript_error (0x80570020) ns_error_xpc_javascript_error_with_details (0x80570021) ns_error_xpc_cant_convert_primitive_to_array (0x80570022) ns_error_xpc_cant_convert_object_to_array (0x80570023) ns_error_xpc_not_enough_
elements_in_array (0x80570024) ns_error_xpc_cant_get_array_info (0x80570025) ns_error_xpc_not_enough_chars_in_string (0x80570026) ns_error_xpc_security_manager_veto (0x80570027) ns_error_xpc_interface_not_scriptable (0x80570028) ns_error_xpc_interface_not_from_nsisupports (0x80570029) ns_error_xpc_cant_get_jsobject_of_dom_object (0x8057002a) ns_error_xpc_cant_set_read_only_cons...
Limitations of chrome scripts
for this reason, add-ons that try to access content objects in fresh <browser>
elements may run into trouble.
... with the shim the shim intercepts chrome process code that adds listeners to xul
elements and sets up listeners in the content process, relaying the result back to the chrome process.
Security best practices for Firefox front-end engineers
we use our built-in sanitizer with the following flags: sanitizerallowstyle sanitizerallowcomments sanitizerdropforms sanitizerlogremovals the sanitizer removes all scripts (script tags, event handlers) and form
elements (form, input, keygen, option, optgroup, select, button, datalist).
... the canonical truth for the list of whitelisted
elements is the source code.
mozbrowsercontextmenu
contextmenu a menu object (see the menu object, below) representing a custom menu defined via <menu> / <menuitem>
elements and pointed to via a contextmenu attribute on the dom element clicked on, which contains the menu's id.
... the menu object an object representing a custom menu defined via <menu> / <menuitem>
elements and pointed to via a contextmenu attribute on the dom element clicked on, which contains the menu's id.
overflow-clip-box
initial valuepadding-boxapplies toall
elementsinheritednomediavisualcomputed valueas specifiedanimation typediscretecanonical orderthe unique non-ambiguous order defined by the formal grammar syntax values padding-box this keyword makes the clipping be related to the padding box.
...l <div class="things"> <input value="abcdefghijklmnopqrstuvwxyzÅÄÖ" class="scroll padding-box"> <div class="scroll padding-box"><span>abcdefghijklmnopqrstuvwxyzÅÄÖ</span></div> </div> css .scroll { overflow: auto; padding: 0 30px; width: 6em; border: 1px solid black; background: lime content-box; } .padding-box { overflow-clip-box: padding-box; } js function scrollsome
elements() { var elms = document.queryselectorall('.scroll'); for (i=0; i < elms.length; ++i) { elms[i].scrollleft=80; } } var elt = document.query
elementsbytagname('body')[0]; elt.addeventlistener("load", scrollsome
elements, false); result specifications this property has been proposed to the w3c csswg; it is not yet on the standard track but, if accepted, should appear in css overflow m...
HTML parser threading
the tree builder snapshot contains a copy of the tree builder stack, a copy of the list of open formatting
elements and copies of various fields that define the tree builder state.
...speculative loads when the tree builder on the parser thread encounters html script, stylesheet link, video (with a poster frame), base or img or svg script, style or image
elements, preload operations are appended to a speculative load queue.
Getting from Content to Layout
changes to a document originate in the content tree (from dom modification by scripting, insertion of
elements from the parser, etc.) and are propogated to the layout tree through magic that primarily resides in //github.com/realityripple/uxp/blob/master/layout/base/nscssframeconstructor.cpp the frame constructor implements nsimutationobserver which allows it to "watch" the content tree.
...
elements that need to be restyled are marked with flags (e.g element_has_pending_restyle) and are stored in the mpendingrestyles hashtable.
IME handling guide
if ime is available on focused
elements, we call that state "enabled".
...and also, when the other
elements get focus.
Introduction to Layout in Mozilla
d walk-through incrementalism future tech-talks wrap-up, q&a basic data flow source document arrives via network apis incrementally “pumped” through the single-threaded layout engine parse, 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 context non-geometric information may be shared by adjacent frames reference counted, owned by frame view clipping, z-order, transparency [0..1] per fr...
... content arrives from network via nsistreamlistener::ondataavailable parser tokenizes & processes content; invokes methods on nsicontentsink with parser node objects some buffering and fixup occurs here opencontainer, closecontainer, addleaf content sink creates and attaches content nodes using nsicontent interface content sink maintains stack of “live”
elements more buffering and fixup occurs here insertchildat, appendchildto, removechildat frame construction content sink uses nsidocument interface to notify of Δs in content model contentappended, contentinserted, contentremoved presshell is registered as document observer receives contentappended, etc.
JavaScript-DOM Prototypes in Mozilla
here are a few of the properties of obj's prototype: obj.__proto__ parentnode (getter function) src (getter and setter functions) get
elementsbytagname (function) text_node (number property, constant) ...
...if you think back to the htmlimageelement examples above, those examples let you define new properties on all image
elements.
CustomizableUI.jsm
'special' widgets: these are the representations of xul <toolbarseparator>, <toolbarspring> and <toolbarspacer>
elements.
... note: unlike button described with xul overlay, widget-button created via createwidget() method cannot have references to other overlay
elements transferred directly as parameters.
Creating localizable web applications
printf( /* l10n: %s is a date */ _("<strong>added:</strong> %s"), $persona['date']);?></p> the first bad snippet puts the <strong/> html
elements inside the gettext function call and concatenates the $persona['date'] variable to it.
... following the rule about wrapping as few html
elements with the gettext function call as possible, you could try to put the <strong/> html tag outside of the php code (cf.
MathML Demo: <mspace> - space
mathml demo: <mspace> - space the background color of <mspace>
elements has been set to yellow for easier viewing.
... you can set the width ∑ x y height ∫ x y and depth [ x y ] of mspace
elements (click the math text to view the numeric values that are set).
Investigating CSS Performance
for example, hasstatedependentstyle will compute a hint that determines how many
elements we'll restyle.
... if we get a erestyle_subtree we will restyle more
elements.
UI Tour - Firefox Developer Tools
it contains two
elements: an overview of the waterfall and a frame rate graph.
... correlating events because these
elements are synchronized, you can correlate events in one element with events in another.
AudioContext - Web APIs
audiocontext.createmedia
elementsource() creates a mediaelementaudiosourcenode associated with an htmlmediaelement.
... this can be used to play and manipulate audio from <video> or <audio>
elements.
CSSPseudoElement - Web APIs
examples basic example using element.pseudo using pseudo-
elements, most modern browsers will automatically add quotation marks around text inside a <q> element.
... const element = document.queryselector('q'); const csspseudoelement = element.pseudo('::before'); console.log(csspseudoelement.element); // outputs [object htmlquoteelement] console.log(csspseudoelement.type); // outputs '::before' specifications specification status comment css pseudo-
elements level 4the definition of 'csspseudoelement' in that specification.
CSSStyleSheet - Web APIs
addrule() adds a new rule to the stylesheet given the selector to which the style applies and the style block to apply to the matching
elements.
... stylesheets list getting the owner element/rule given the style sheet object the interface for the owner object getting the cssstylesheet object from the owner <style> and <link>
elements in the document yes .ownernode htmllinkelement, htmlstyleelement, or svgstyleelement .sheet css @import rule in other style sheets applied to the document yes .ownerrule cssimportrule .stylesheet <?xml-stylesheet ?> processing instruction in the (non-html) document yes .ownernode processinginstruction .sheet http link header ...
Using dynamic styling information - Web APIs
however, there are cases where actually obtaining or manipulating the rules can be useful (whether for whole stylesheets or individual
elements), and that is described in further detail below.
...unlike the individual rules available from the document.stylesheets collection, the style object is accessed from the document or from the
elements to which that style is applied.
CanvasCaptureMediaStreamTrack.canvas - Web APIs
example // find the canvas element to capture var canvaselt = document.get
elementsbytagname("canvas")[0]; // get the stream var stream = canvaselt.capturestream(25); // 25 fps // do things to the stream ...
... // obtain the canvas associated with the stream var canvas = stream.canvas; specifications specification status comment media capture from dom
elementsthe definition of 'canvascapturemediastreamtrack.canvas' in that specification.
Manipulating video using canvas - Web APIs
div> <video id="video" src="media/video.mp4" controls="true" crossorigin="anonymous"/> </div> <div> <canvas id="c1" width="160" height="96"></canvas> <canvas id="c2" width="160" height="96"></canvas> </div> <script type="text/javascript" src="processor.js"></script> </body> </html> the key bits to take away from this are: this document establishes two canvas
elements, with the ids c1 and c2.
...yid('c1'); this.ctx1 = this.c1.getcontext('2d'); this.c2 = document.getelementbyid('c2'); this.ctx2 = this.c2.getcontext('2d'); let self = this; this.video.addeventlistener('play', function() { self.width = self.video.videowidth / 2; self.height = self.video.videoheight / 2; self.timercallback(); }, false); }, this code grabs references to the
elements in the xhtml document that are of particular interest, namely the video element and the two canvas
elements.
Basic animations - Web APIs
« previousnext » since we're using javascript to control <canvas>
elements, it's also very easy to make (interactive) animations.
...} function anima() { c.fillstyle = "rgba(0,0,0,0.11)", c.fillrect(0, 0, cc.width, cc.height), fa.foreach(t => t.put()), s.draw(), document.getelementbyid("time").innertext = tmz(), settimeout(() => { requestanimationframe(anima) }, fw) } function emit(t) { key.keydown(t) } function touch(t) { t.classlist.toggle("off"), document.get
elementsbyclassname("keypress")[0].classlist.toggle("hide") } var t = new date + "", d = void 0, cc = document.get
elementsbytagname("canvas")[0], c = cc.getcontext("2d"); key = {}, key.keydown = function (t) { var e = document.createevent("keyboardevent"); object.defineproperty(e, "keycode", { get: function () { return this.ke...
Hit regions and accessibility - Web APIs
it allows you to make hit detection easier and lets you route events to dom
elements.
...i, false); ctx.fill(); ctx.addhitregion({id: 'circle'}); canvas.addeventlistener('mousemove', function(event) { if (event.region) { alert('hit region: ' + event.region); } }); </script> the addhitregion() method also takes a control option to route events to an element (that is a descendant of the canvas): ctx.addhitregion({control: element}); this can be useful for routing to <input>
elements, for example.
CharacterData - Web APIs
nondocumenttypechildnode.next
elementsibling read only returns the element immediately following the specified one in its parent's children list, or null if the specified element is the last one in the list.
... nondocumenttypechildnode.previous
elementsibling read only returns the element immediately prior to the specified one in its parent's children list, or null if the specified element is the first one in the list.
console.log() - Web APIs
another useful difference in chrome exists when sending dom
elements to the console.
... notice: console.log prints the element in an html-like tree console.dir prints the element in a json-like tree specifically, console.log gives special treatment to dom
elements, whereas console.dir does not.
Console.table() - Web APIs
// an array of strings console.table(["apples", "oranges", "bananas"]); // an object whose properties are strings function person(firstname, lastname) { this.firstname = firstname; this.lastname = lastname; } var me = new person("john", "smith"); console.table(me); collections of compound types if the
elements in the array, or properties in the object, are themselves arrays or objects, then their
elements or properties are enumerated in the row, one per column: // an array of arrays var people = [["john", "smith"], ["jane", "doe"], ["emily", "jones"]] console.table(people); // an array of objects function person(firstname, lastname) { this.firstname = firstname; this.lastname = lastname; } v...
... // an object whose properties are objects var family = {}; family.mother = new person("jane", "smith"); family.father = new person("john", "smith"); family.daughter = new person("emily", "smith"); console.table(family); restricting the columns displayed by default, console.table() lists all
elements in each row.
Constraint validation API - Web APIs
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 htmltextareaelement properties validity a read-only property that returns a validitystate object, whose properties represent validation errors ...
...
elements with the htmlobjectelement interface are never candidates for constraint validation.
CustomElementRegistry.get() - Web APIs
syntax constructor = custom
elements.get(name); parameters name the name of the custom element whose constructor you want to return a reference to.
... examples custom
elements.define('my-paragraph', class extends htmlelement { constructor() { super(); let template = document.getelementbyid('my-paragraph'); let templatecontent = template.content; const shadowroot = this.attachshadow({mode: 'open'}) .appendchild(templatecontent.clonenode(true)); } }) // return a reference to the my-paragraph constructor let ctor = custom
elements.get('my-paragraph'); specifications specification status comment html living standardthe definition of 'custom
elements.get()' in that specification.
Document.createNSResolver() - Web APIs
note, xpath defines qnames without prefix to match only
elements in the null namespace.
...to match default
elements in a non-null namespace, you either have to refer to a particular element using a form such as *namespace-uri()=http://www.w3.org/1999/xhtml and name()=p[@id='_myid'] (this approach works well for dynamic xpath expressions where the namespaces might not be known) or use prefixed name tests, and create a namespace resolver mapping the prefix to the namespace.
Document.evaluate() - Web APIs
null is the most common and will create a new xpathresult example var headings = document.evaluate("/html/body//h2", document, null, xpathresult.any_type, null); /* search the document for all h2
elements.
...*/ var thisheading = headings.iteratenext(); var alerttext = "level 2 headings in this document are:\n"; while (thisheading) { alerttext += thisheading.textcontent + "\n"; thisheading = headings.iteratenext(); } alert(alerttext); // alerts the text of all h2
elements note, in the above example, a more verbose xpath is preferred over common shortcuts such as //h2.
Document.fullscreenEnabled - Web APIs
full-screen mode is available only for a page that has no windowed plug-ins in any of its documents, and if all <iframe>
elements which contain the document have their allowfullscreen attribute set.
... syntax var isfullscreenavailable = document.fullscreenenabled; value a boolean value which is true if the document and the
elements within can be placed into full-screen mode by calling element.requestfullscreen().
Document.getAnimations() - Web APIs
the getanimations() method of the document interface returns an array of all animation objects currently in effect whose target
elements are descendants of the document.
... return value an array of animation objects, each representing one animation currently associated with
elements which are descendants of the document on which it's called.
Document.registerElement() - Web APIs
warning: document.registerelement() is deprecated in favor of custom
elements.define().
...here is one way to add content to the new tag: var mytag = document.get
elementsbytagname("my-tag")[0]; mytag.textcontent = "i am a my-tag element."; ...
DocumentFragment.querySelectorAll() - Web APIs
the documentfragment.queryselectorall() method returns a nodelist of
elements within the documentfragment (using depth-first pre-order traversal of the document's nodes) that matches the specified group of selectors.
... examples this example returns a list of all div
elements within the documentfragment with a class of either "note" or "alert": var matches = documentfrag.queryselectorall("div.note, div.alert"); specifications specification status comment selectors api level 1the definition of 'documentfragment.queryselectorall' in that specification.
Example - Web APIs
<html> <head> <title>my document</title> <script type="text/javascript"> function change() { // document.get
elementsbytagname("h1") returns a nodelist of the h1 //
elements in the document, and the first is number 0: var header = document.get
elementsbytagname("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 para = document.get
elementsbytagname("p").item(0); para.firstchild.data = "this is the first paragraph."; // create a new text node for the second paragraph var newtext = document.createtextnode("this is the second paragraph."); // create a new element to be the second paragraph var newelement = document.createelement("p"); // put the text in the paragraph newelement.appendchild(newtext); // and put the paragraph on the end of the document by appending it to // the body (which is the parent of para) para.parentnode.appendchild(newelement); } </script> </head> <body> <input type="button" value="change this document." onclick="change()"> <h1>header</h1> <p>paragraph</p> </body> </head> ...
Using the W3C DOM Level 1 Core - Web APIs
the following script would do the job: html content <body> <input type="button" value="change this document." onclick="change()"> <h2>header</h2> <p>paragraph</p> </body> javascript content function change() { // document.get
elementsbytagname("h2") returns a nodelist of the <h2> //
elements in the document, and the first is number 0: var header = document.get
elementsbytagname("h2").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 para = document.get
elementsbytagname("p").item(0); para.firstchild.data = "this is the first paragraph."; // create a new text node for the second paragraph var newtext = document.createtextnode("this is the second paragraph."); // create a new element to be the second paragraph var newelement = document.createelement("p"); // put the text in the paragraph newelement.appendchild(newtext); // and put the paragraph on the end of the document by appending it to // the body (which is the parent of para) para.parentnode.appendchild(newelement); } you can see this script as a complete example.
Document Object Model (DOM) - Web APIs
in particular, the element interface is enhanced to become htmlelement and various subclasses, each representing one of (or a family of closely related)
elements.
...svganimatedstring svganimatedtransformlist smil-related interfaces elementtimecontrol timeevent other svg interfaces getsvgdocument shadowanimation svgcolorprofilerule svgcssrule svgdocument svgexception svgexternalresourcesrequired svgfittoviewbox svglangspace svglocatable svgrenderingintent svgstylable svgtests svgtransformable svgunittypes svguse
elementshadowroot svgurireference svgviewspec svgzoomandpan svgzoomevent specifications specification status comment dom living standard ...
Element.msZoomTo() - Web APIs
zoomed
elements can expose their zoom level through mscontentzoom (ie.
... this method has no scrolling effect on non-scrollable
elements and no zooming effect on non-zoomable
elements (e.g.,
elements with "-ms-content-zooming: none").
Element: select event - Web APIs
bubbles yes cancelable no interface uievent if generated from a user interface, event otherwise event handler property onselect the event is not available for all
elements in all languages.
... for example, in html, select events can be dispatched only on form <input type="text"> and <textarea>
elements.
Event.currentTarget - Web APIs
syntax var currenteventtarget = event.currenttarget; value eventtarget examples event.currenttarget is interesting to use when attaching the same event handler to several
elements.
... function hide(e){ e.currenttarget.style.visibility = 'hidden'; console.log(e.currenttarget); // when this function is used as an event handler: this === e.currenttarget } var ps = document.get
elementsbytagname('p'); for(var i = 0; i < ps.length; i++){ // console: print the clicked <p> element ps[i].addeventlistener('click', hide, false); } // console: print <body> document.body.addeventlistener('click', hide, false); // click around and make paragraphs disappear note: the value of event.currenttarget is only available while the event is being handled.
Event.eventPhase - Web APIs
this process starts with the window, then document, then the htmlhtmlelement, and so on through the
elements until the target's parent is reached.
... </div> </div> <div id="divinfo"></div> css div { margin: 20px; padding: 4px; border: thin black solid; } #divinfo { margin: 18px; padding: 8px; background-color:white; font-size:80%; } javascript let clear = false, divinfo = null, divs = null, usecapture = false; window.onload = function () { divinfo = document.getelementbyid('divinfo') divs = document.get
elementsbytagname('div') chcapture = document.getelementbyid('chcapture') chcapture.onclick = function () { removelisteners() addlisteners() } clear() addlisteners() } function removelisteners() { for (let i = 0; i < divs.length; i++) { let d = divs[i] if (d.id != "divinfo") { d.removeeventlistener("click", ondivclick, true) d.removeeventlistener("click", ondivclic...
Using the Gamepad API - Web APIs
removegamepad(gamepad) { var d = document.getelementbyid("controller" + gamepad.index); document.body.removechild(d); delete controllers[gamepad.index]; } function updatestatus() { if (!haveevents) { scangamepads(); } var i = 0; var j; for (j in controllers) { var controller = controllers[j]; var d = document.getelementbyid("controller" + j); var buttons = d.get
elementsbyclassname("button"); for (i = 0; i < controller.buttons.length; i++) { var b = buttons[i]; var val = controller.buttons[i]; var pressed = val == 1.0; if (typeof(val) == "object") { pressed = val.pressed; val = val.value; } var pct = math.round(val * 100) + "%"; b.style.backgroundsize = pct + " " + pct; if (pressed) { ...
...b.classname = "button pressed"; } else { b.classname = "button"; } } var axes = d.get
elementsbyclassname("axis"); for (i = 0; i < controller.axes.length; i++) { var a = axes[i]; a.innerhtml = i + ": " + controller.axes[i].tofixed(4); a.setattribute("value", controller.axes[i] + 1); } } requestanimationframe(updatestatus); } function scangamepads() { var gamepads = navigator.getgamepads ?
GeolocationCoordinates.longitude - Web APIs
ementbyid("longitude"); button.addeventlistener("click", function() { navigator.geolocation.getcurrentposition(function(position) { let lat = position.coords.latitude; let long = position.coords.longitude; lattext.innertext = lat.tofixed(2); longtext.innertext = 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.
...the two <span>
elements are updated to display the corresponding values after being converted to a value with two decimal places.
HTMLTextAreaElement.labels - Web APIs
the htmltextareaelement.labels read-only property returns a nodelist of the <label>
elements associated with the <textarea> element.
... syntax var label
elements = textarea.labels; return value a nodelist containing the <label>
elements associated with the <textarea> element.
HTMLTextAreaElement - Web APIs
the htmltextareaelement interface provides special properties and methods for manipulating the layout and presentation of <textarea>
elements.
... htmltextareaelement.labelsread only nodelist: returns a list of label
elements associated with this element.
LayoutShift - Web APIs
the layoutshift interface of the layout instability api provides insights into the stability of web pages based on movements of the
elements on the page.
... layoutshift.sources returns an array of layoutshiftattribution objects with information on the
elements that were shifted.
Media Source API - Web APIs
using mse, media streams can be created via javascript, and played using <audio> and <video>
elements.
...mse allows us to replace the usual single track src value fed to media
elements with a reference to a mediasource object, which is a container for information like the ready state of the media for being played, and references to multiple sourcebuffer objects that represent the different chunks of media that make up the entire stream.
MouseEvent.pageX - Web APIs
updatedisplay() simply replaces the contents of the <span>
elements meant to contain the x and y coordinates with the values of pagex and pagey.
...it has two <span>
elements, one with the id "x" and one with the id "y".
MutationObserver.MutationObserver() - Web APIs
example this example simply creates a new mutationobserver configured to watch a node and all of its children for additions and removals of
elements to the tree, as well as any changes to attributes on any of the
elements in the tree.
... from this point until disconnect() is called, callback() will be called each time an element is added to or removed from the dom tree rooted at targetnode, or any of those
elements' attributes are changed.
Node.isEqualNode() - Web APIs
two nodes are equal when they have the same type, defining characteristics (for
elements, this would be their id, number of children, and so forth), its attributes match, and so on.
... html <div>this is the first element.</div> <div>this is the second element.</div> <div>this is the first element.</div> <p id="output"></p> css #output { width: 440px; border: 2px solid black; border-radius: 5px; padding: 10px; margin-top: 20px; display: block; } javascript let output = document.getelementbyid("output"); let divlist = document.get
elementsbytagname("div"); output.innerhtml += "div 0 equals div 0: " + divlist[0].isequalnode(divlist[0]) + "<br/>"; output.innerhtml += "div 0 equals div 1: " + divlist[0].isequalnode(divlist[1]) + "<br/>"; output.innerhtml += "div 0 equals div 2: " + divlist[0].isequalnode(divlist[2]) + "<br/>"; results specifications specification status comment domthe definition of 'n...
OVR_multiview2 - Web APIs
methods framebuffertexturemultiviewovr() simultaneously renders to multiple
elements of a 2d texture array.
...2, 2); ext.framebuffertexturemultiviewovr(gl.draw_framebuffer, gl.color_attachment0, colortex, 0, 0, 2); const depthstenciltex = gl.createtexture(); gl.bindtexture(gl.texture_2d_array, depthstenciltex); gl.texstorage3d(gl.texture_2d_array, 1, gl.depth32f_stencil8, 512, 512, 2); ext.framebuffertexturemultiviewovr(gl.draw_framebuffer, gl.depth_stencil_attachment, depthstenciltex, 0, 0, 2); gl.draw
elements(...); // draw will be broadcasted to the layers of colortex and depthstenciltex.
ParentNode.children - Web APIs
the parentnode property children is a read-only property that returns a live htmlcollection which contains all of the child
elements of the node upon which it was called.
... syntax let children = node.children; value an htmlcollection which is a live, ordered collection of the dom
elements which are children of node.
ParentNode.querySelector() - Web APIs
if you need all the
elements matching the selector list, use queryselectorall() instead.
...see locating dom
elements using selectors for more information about using selectors to identify
elements.
Payment Request API - Web APIs
accessibility: as the browser controls the input
elements of the payment sheet, it can assure consistent keyboard and screen reader accessibility on every website without developers needing to do anything.
... note: the api is available inside cross-origin <iframe>
elements only if they have had the allowpaymentrequest attribute set on them.
Multi-touch interaction - Web APIs
function pointerup_handler(ev) { if (logevents) log(ev.type, ev); // remove this touch point from the cache and reset the target's // background and border remove_event(ev); update_background(ev); ev.target.style.border = "1px solid black"; } application ui the application uses <div>
elements for the touch areas and provides buttons to enable logging and to clear the log.
...false : true; } function log(name, ev) { var o = document.get
elementsbytagname('output')[0]; var s = name + ": pointerid = " + ev.pointerid + " ; pointertype = " + ev.pointertype + " ; isprimary = " + ev.isprimary; o.innerhtml += s + " "; } function clearlog(event) { var o = document.get
elementsbytagname('output')[0]; o.innerhtml = ""; } ...
PublicKeyCredentialCreationOptions.excludeCredentials - Web APIs
excludecredentials, an optional property of the publickeycredentialcreationoptions dictionary, is an array whose
elements are descriptors for the public keys already existing for a given user.
... syntax excludecredentials = publickeycredentialcreationoptions.excludecredentials value an array whose
elements are objects with the following properties: type a string describing type of public-key credential to be created.
RTCDataChannel.onmessage - Web APIs
example this code snippet creates a peer connection, adds a data channel to it, and starts creating new <p> (paragraph)
elements each time a message arrives, with the message's contents displayed inside it.
... the new
elements are then attached to the end of the document.
Range.getBoundingClientRect() - Web APIs
the range.getboundingclientrect() method returns a domrect object that bounds the contents of the range; this is a rectangle enclosing the union of the bounding rectangles for all the
elements in the range.
...the bounding client rectangle contains everything selected in the range.</p> css #highlight { background: yellow; position: absolute; z-index: -1; } p { width: 200px; } javascript const range = document.createrange(); range.setstartbefore(document.get
elementsbytagname('b').item(0), 0); range.setendafter(document.get
elementsbytagname('b').item(1), 0); const clientrect = range.getboundingclientrect(); const highlight = document.getelementbyid('highlight'); highlight.style.left = `${clientrect.x}px`; highlight.style.top = `${clientrect.y}px`; highlight.style.width = `${clientrect.width}px`; highlight.style.height = `${clientrect.height}px`; result s...
Range.getClientRects() - Web APIs
this is created by aggregating the results of calls to element.getclientrects() for all the
elements in the range.
... syntax rectlist = range.getclientrects() example range = document.createrange(); range.selectnode(document.get
elementsbytagname("div").item(0)); rectlist = range.getclientrects(); specification specification status comment css object model (cssom) view modulethe definition of 'range.getclientrects()' in that specification.
SVGGraphicsElement: copy event - Web APIs
the copy event fires on svggraphics
elements when the user initiates a copy action through the browser's user interface.
...tp://www.w3.org/2000/svg"> <text x="5" y="10" id="text-to-copy">copy this text</text> <foreignobject x="5" y="20" width="90" height="20"> <input xmlns="http://www.w3.org/1999/xhtml" placeholder="paste it here"/> </foreignobject> </svg> css input { font-size: 10px; width: 100%; height: 90%; box-sizing: border-box; border: 1px solid black; } javascript document.get
elementsbytagname("text")[0].addeventlistener("copy", evt => { evt.clipboarddata.setdata('text/plain', document.getselection().tostring().touppercase()); evt.preventdefault(); }); result specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg
elements.
SVGPolygonElement - Web APIs
the svgpolygonelement interface provides access to the properties of <polygon>
elements, as well as methods to manipulate them.
... candidate recommendation replaced the inheritance from svg
elementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpolygonelement' in that specification.
SVGPolylineElement - Web APIs
the svgpolylineelement interface provides access to the properties of <polyline>
elements, as well as methods to manipulate them.
... candidate recommendation replaced the inheritance from svg
elementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpolylineelement' in that specification.
SVGRectElement - Web APIs
the svgrectelement interface provides access to the properties of <rect>
elements, as well as methods to manipulate them.
... candidate recommendation replaced the inheritance from svg
elementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgrectelement' in that specification.
SVGUseElement - Web APIs
svguseelement.instanceroot read only an svgelement corresponding to the instance root of the given element, which is a direct child of the
elements shadow root.
... svguseelement.animatedinstanceroot read only an svgelement corresponding to the instance root of the given element, which is a direct child of the
elements shadow root.
Using the Screen Capture API - Web APIs
setup first, some constants are set up to reference the
elements on the page to which we'll need access: the <video> into which the captured screen contents will be streamed, a box into which logged output will be drawn, and the start and stop buttons that will turn on and off capture of screen imagery.
... for example, this line in the http headers will enable screen capture api for the document and any embedded <iframe>
elements that are loaded from the same origin: feature-policy: display-capture 'self' if you're performing screen capture within an <iframe>, you can request permission just for that frame, which is clearly more secure than requesting a more general permission: <iframe src="https://mycode.example.net/etc" allow="display-capture"> </iframe> ...
WebGLRenderingContext.getUniform() - Web APIs
return value the returned type depends on the uniform type: uniform type returned type webgl 1 only boolean glboolean int glint float glfloat vec2 float32array (with 2
elements) ivec2 int32array (with 2
elements) bvec2 array of glboolean (with 2
elements) vec3 float32array (with 3
elements) ivec3 int32array (with 3
elements) bvec3 array of glboolean (with 3
elements) vec4 float32array (with 4
elements) ivec4 int32array (with 4
elements) bvec4 array of glboolean (with 4 elemen...
...ts) mat2 float32array (with 4
elements) mat3 float32array (with 9
elements) mat4 float32array (with 16
elements) sampler2d glint samplercube glint additionally available in webgl 2 uint gluint uvec2 uint32array (with 2
elements) uvec3 uint32array (with 3
elements) uvec4 uint32array (with 4
elements) mat2x3 float32array (with 6
elements) mat2x4 float32array (with 8
elements) mat3x2 float32array (with 6
elements) mat3x4 float32array (with 12
elements) mat4x2 float32array (with 8
elements) mat4x3 float32array (with 12
elements) any sampler type glint examples var loc = gl.getuniformlocation(prog...
Using textures in WebGL - Web APIs
note: cors support for webgl textures and the crossorigin attribute for image
elements is implemented in gecko 8.0.
... note: cors support for cross-domain videos and the crossorigin attribute for <video>
elements is implemented in gecko 12.0.
WebGL best practices - Web APIs
if you have 1000 sprites to paint, try to do it as a single drawarrays() or draw
elements() call.
... teximage/texsubimage uploads (particularly with videos) can cause pipeline flushes most texture uploads from dom
elements will incur a processing pass that will temporarily switch gl progams internally, causing a pipeline flush.
Movement, orientation, and motion: A WebXR example - Web APIs
the last four variables declared are storage for references to the <div>
elements into which we'll output the matrices when we want to show them to the user.
...ons.modelviewmatrix, false, modelviewmatrix); gl.uniformmatrix4fv( programinfo.uniformlocations.normalmatrix, false, normalmatrix); gl.activetexture(gl.texture0); gl.bindtexture(gl.texture_2d, texture); gl.uniform1i(programinfo.uniformlocations.usampler, 0); { const vertexcount = 36; const type = gl.unsigned_short; const offset = 0; gl.draw
elements(gl.triangles, vertexcount, type, offset); } } renderscene() begins by calculating how much rotation should occur around each of the three axes in the amount of time that has elapsed since the previous frame was rendered.
Using the Web Animations API - Web APIs
we no longer need to rely on dom-heavy techniques such as writing css properties and scoping classes onto
elements to control playback direction.
...queen_alice.updateplaybackrate(redqueen_alice.playbackrate * .9); } }, 3000); but urging them on by clicking or tapping causes them to speed up by multiplying their playbackrate: var gofaster = function() { redqueen_alice.updateplaybackrate(redqueen_alice.playbackrate * 1.1); } document.addeventlistener("click", gofaster); document.addeventlistener("touchstart", gofaster); the background
elements also have playbackrates that are impacted when you click or tap.
Using the Web Speech API - Web APIs
setting variables first of all, we capture references to all the dom
elements involved in the ui, but more interestingly, we capture a reference to window.speechsynthesis.
... finally, we set the speechsynthesisutterance.pitch and speechsynthesisutterance.rate to the values of the relevant range form
elements.
Using Web Workers - Web APIs
when you want to send a message to the worker, you post messages to it like this (main.js): first.onchange = function() { myworker.postmessage([first.value,second.value]); console.log('message posted to worker'); } second.onchange = function() { myworker.postmessage([first.value,second.value]); console.log('message posted to worker'); } so here we have two <input>
elements represented by the variables first and second; when the value of either is changed, myworker.postmessage([first.value,second.value]) is used to send the value inside both to the worker, as an array.
... embedded workers there is not an "official" way to embed the code of a worker within a web page, like <script>
elements do for normal scripts.
Window.getDefaultComputedStyle() - Web APIs
must be null (or not specified) for regular
elements.
...er { position: absolute; left: 100px; top: 200px; height: 100px; } </style> <div id="elem-container">dummy</div> <div id="output"></div> <script> var elem = document.getelementbyid("elem-container"); var thecssprop = window.getdefaultcomputedstyle(elem).position; document.getelementbyid("output").innerhtml = thecssprop; // will output "static" </script> use with pseudo-
elements the getdefaultcomputedstyle() method can pull style info from pseudo-
elements (e.g., ::before or ::after).
Window - Web APIs
for overriding the prototype of built-in
elements) are listed in a separate section below.
... window.custom
elements read only returns a reference to the customelementregistry object, which can be used to register new custom
elements and get information about previously registered custom
elements.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
amap = []; this.rate = nrate || 100; this.play = function () { if (btyping) { return; } if (bstart) { var aitems = document.queryselectorall(sselector); if (aitems.length === 0) { return; } for (var nitem = 0; nitem < aitems.length; nitem++) { asheets.push(new sheet(aitems[nitem])); /* uncomment the following line if you have previously hidden your
elements via css: */ // aitems[nitem].style.visibility = "visible"; } bstart = false; } nintervid = setinterval(typewrite, this.rate); btyping = true; }; this.pause = function () { clearinterval(nintervid); btyping = false; }; this.terminate = function () { ocurrent.nodevalue += spart; spart = ""; for (nidx; nidx < asheets.length; scroll(ashe...
...ets[nidx++], 0, false)); clean(); }; } /* usage: */ var otwexample1 = new typewriter(/*
elements: */ '#article, h1, #info, #copyleft', /* frame rate (optional): */ 15); /* default frame rate is 100: */ var otwexample2 = new typewriter('#controls'); /* you can also change the frame rate value modifying the "rate" property; for example: */ // otwexample2.rate = 150; onload = function () { otwexample1.play(); otwexample2.play(); }; </script> <style type="text/css"> span.intlink, a, a:visited { cursor: pointer; color: #000000; text-decoration: underline; } #info { width: 180px; height: 150px; float: right; background-color: #eeeeff; padding: 4px; overflow: auto; font-size: 12px; margin: 4px; border-radius: 5px; /* visibility: hidden; */ } </style> </head> <bod...
Using XMLHttpRequest - Web APIs
plainescape : escape; for (var nitem = 0; nitem < otarget.
elements.length; nitem++) { ofield = otarget.
elements[nitem]; if (!ofield.hasattribute("name")) { continue; } sfieldtype = ofield.nodename.touppercase() === "input" ?
...nsetext); } function ajaxsubmit (oformelement) { if (!oformelement.action) { return; } var oreq = new xmlhttprequest(); oreq.onload = ajaxsuccess; if (oformelement.method.tolowercase() === "post") { oreq.open("post", oformelement.action); oreq.send(new formdata(oformelement)); } else { var ofield, sfieldtype, nfile, ssearch = ""; for (var nitem = 0; nitem < oformelement.
elements.length; nitem++) { ofield = oformelement.
elements[nitem]; if (!ofield.hasattribute("name")) { continue; } sfieldtype = ofield.nodename.touppercase() === "input" ?
Introduction - Web APIs
xsl (extensible stylesheet language) transformations are composed of two parts: xsl
elements, which allow the transformation of an xml tree into another markup tree and xpath, a selection language for trees.
...this allows xslt to add, remove and reorganize
elements from the original xml document and thus allows more fine-grain control of the resulting document's structure.
Using the aria-invalid attribute - Accessibility
this attribute can be used with any typical html form element; it is not limited to
elements that have an aria role assigned.
... used in aria roles all
elements of the base markup related aria techniques using the aria-required attribute using the alert role compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-invalid property wai authoring practices for forms ...
Using the aria-label attribute - Accessibility
this attribute can be used with any typical html element; it is not limited to
elements that have an aria role assigned.
... used by aria roles all
elements of the base markup related aria techniques using the aria-labelledby attribute compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for aria-label ...
Using the aria-valuenow attribute - Accessibility
value string representation of a number possible effects on user agents and assistive technology for
elements with role progressbar and scrollbar, assistive technologies should render the actual value as a percentage, calculated as a position on the range from aria-valuemin to aria-valuemax if both are defined, otherwise the actual value with a percent indicator.
... for
elements with role slider and spinbutton, assistive technologies should render the actual value to users.
Using the link role - Accessibility
note: where possible, it is recommended that you use a native <a> element rather than the link role, as native
elements are more widely supported by older user agents and assistive technology.
... native <a>
elements also support keyboard and focus requirements by default, without need for additional customization.
ARIA: timer role - Accessibility
aria-live
elements with the role timer have an implicit aria-live value of off.
... recommendation precedence order applying the timer role will cause this and all of the descendant
elements of this element to be treated like xxx ...
ARIA: document role - Accessibility
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.
... in contrast to the article role, the document role does not have any relation to other
elements with a document role, it merely has a relationship to the containing composit widget.
ARIA: form role - Accessibility
the form landmark role can be used to identify a group of
elements on a page that provide equivalent functionality to an html form.
...it should be declared on the html element that wraps the form
elements.
Basic form hints - Accessibility
when implementing forms using traditional html form-related
elements, it is important to provide labels for controls, and explicitly associate a label with its control.
...="wine-2">pinot blanc</label> </li> <li> <input id="wine-3" type="checkbox" value="pinot-grigio"/> <label for="wine-3">pinot grigio</label> </li> <li> <input id="wine-4" type="checkbox" value="gewurztraminer"/> <label for="wine-4">gewürztraminer</label> </li> </ul> </form> labeling with aria the html <label> element is appropriate for form-related
elements, but many form controls are implemented as a dynamic javascript widget, using <div>s or <span>s.
Mobile accessibility checklist - Accessibility
focus all activatable
elements must be focusable: standard controls such as links, buttons, and form fields are focusable by default.
... all form controls must have labels (<label>
elements) for the benefit of screen reader users.
-moz-user-focus - CSS: Cascading Style Sheets
initial valuenoneapplies toall
elementsinheritednocomputed valueas specifiedanimation typediscrete note: this property doesn't work for xul <xul:textbox>
elements, because the textbox itself never takes focus.
... formal definition initial valuenoneapplies toall
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax ignore | normal | select-after | select-before | select-menu | select-same | select-all | none examples html <input class="ignored" value="the user cannot focus on this element."> css .ignored { -moz-user-focus: ignore; } specifications not part of any standard.
-moz-user-input - CSS: Cascading Style Sheets
/* 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.
... 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.
-webkit-line-clamp - CSS: Cascading Style Sheets
when applied to anchor
elements, the truncating can happen in the middle of the text, not necessarily at the end.
... formal definition initial valuenoneapplies toall
elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax none | <integer> examples truncating a paragraph html <p> in this example the <code>-webkit-line-clamp</code> property is set to <code>3</code>, which means the text is clamped after three lines.
-webkit-mask-position-x - CSS: Cascading Style Sheets
; /* <percentage> values */ -webkit-mask-position-x: 100%; -webkit-mask-position-x: -50%; /* <length> values */ -webkit-mask-position-x: 50px; -webkit-mask-position-x: -1cm; /* multiple values values */ -webkit-mask-position-x: 50px, 25%, -3em; /* global values */ -webkit-mask-position-x: inherit; -webkit-mask-position-x: initial; -webkit-mask-position-x: unset; initial value0%applies toall
elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete syntax values <length-percentage> a length indicating the position of the left edge of the image relative to the box's left padding edge.
... formal definition initial value0%applies toall
elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete formal syntax [ <length-percentage> | left | center | right ]#where <length-percentage> = <length> | <percentage> examples horizontally positioning a mask image .exampleone { -webkit-mask-image: url(mask.png); -webkit-mask-position-x: right; ...
-webkit-mask-position-y - CSS: Cascading Style Sheets
; /* <percentage> values */ -webkit-mask-position-y: 100%; -webkit-mask-position-y: -50%; /* <length> values */ -webkit-mask-position-y: 50px; -webkit-mask-position-y: -1cm; /* multiple values values */ -webkit-mask-position-y: 50px, 25%, -3em; /* global values */ -webkit-mask-position-y: inherit; -webkit-mask-position-y: initial; -webkit-mask-position-y: unset; initial value0%applies toall
elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete syntax values <length-percentage> a length indicating the position of the top side of the image relative to the box's top padding edge.
... formal definition initial value0%applies toall
elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete formal syntax [ <length-percentage> | top | center | bottom ]#where <length-percentage> = <length> | <percentage> examples vertically positioning a mask image .exampleone { -webkit-mask-image: url(mask.png); -webkit-mask-position-y: bottom; }...
:-moz-only-whitespace - CSS: Cascading Style Sheets
the :-moz-only-whitespace css pseudo-class matches
elements that only contains text nodes that only contain whitespace.
... (this includes
elements with empty text nodes and
elements with no child nodes.) syntax syntax not found in db!
:-moz-suppressed - CSS: Cascading Style Sheets
the :-moz-suppressed css pseudo-class is a mozilla extension that matches
elements representing images that were suppressed because loading images from the specified site has been blocked.
... syntax :-moz-suppressed examples styling
elements that have been blocked :-moz-suppressed { background: yellow; padding: 8px; } specifications not part of any standard.
:-moz-user-disabled - CSS: Cascading Style Sheets
the :-moz-user-disabled css pseudo-class is a mozilla extension that matches
elements representing images that were not loaded because images have been entirely disabled by the user's preferences.
... syntax :-moz-user-disabled examples styling user-disabled
elements :-moz-user-disabled { background-color: lightgray; padding: 8px; } specifications not part of any standard.
::-webkit-outer-spin-button - CSS: Cascading Style Sheets
the ::-webkit-outer-spin-button css pseudo-element is used to style the outer part of the spinner button of number picker <input>
elements.
... hiding the spinner this example uses input::-webkit-outer-spin-button to find <input>
elements' spinner widgets and set their -webkit-appearance to none, thus hiding them.
::-webkit-scrollbar - CSS: Cascading Style Sheets
css scrollbar selectors you can use the following pseudo
elements to customize various parts of the scrollbar for webkit browsers: ::-webkit-scrollbar — the entire scrollbar.
... ::-webkit-resizer — the draggable resizing handle that appears at the bottom corner of some
elements.
::first-letter (:first-letter) - CSS: Cascading Style Sheets
css3 introduced the ::first-letter notation (with two colons) to distinguish pseudo-classes from pseudo-
elements.
...p>*the beginning of a special punctuation mark.</p> <p>#the beginning of a special punctuation mark.</p> <p>「特殊的汉字标点符号开头。</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.
::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.
...see what i mean?</p> <span>the first line of this text will not receive special styling because it is not a block-level element.</span> css ::first-line { color: blue; text-transform: uppercase; /* warning: do not use these */ /* many properties are invalid in ::first-line pseudo-
elements */ margin-left: 20px; text-indent: 20px; } result specifications specification status comment css pseudo-
elements level 4the definition of '::first-line' in that specification.
::marker - CSS: Cascading Style Sheets
it works on any element or pseudo-element set to display: list-item, such as the <li> and <summary>
elements.
... syntax ::marker examples html <ul> <li>peaches</li> <li>apples</li> <li>plums</li> </ul> css ul li::marker { color: red; font-size: 1.5em; } result specifications specification status comment css pseudo-
elements level 4the definition of '::marker' in that specification.
::placeholder - CSS: Cascading Style Sheets
without a label that has been programmatically associated with an input using a combination of the for and id attributes, assistive technology such as screen readers cannot parse <input>
elements.
...ul — nielsen norman group examples red text html <input placeholder="type something here!"> css input::placeholder { color: red; font-size: 1.2em; font-style: italic; } result green text html <input placeholder="type something here..."> css input::placeholder { color: green; } result specifications specification status comment css pseudo-
elements level 4the definition of '::placeholder' in that specification.
Stacking context example 2 - CSS: Cascading Style Sheets
you can see that div #2 (z-index: 2) is above div #3 (z-index: 1), because they both belong to the same stacking context (the root one), so z-index values rule how
elements are stacked.
...in the stacking context hierarchy,
elements that do not create a stacking context are collapsed on their parent.
Using the :target pseudo-class in selectors - CSS: Cascading Style Sheets
thus, to add a border to the #example fragment, we would write: #example:target { border: 1px solid black; } targeting all
elements if the intent is to create a "blanket" style that will apply to all targeted
elements, then the universal selector comes in handy: :target { color: red; } example in the following example, there are five links that point to
elements in the same document.
...note that the document may jump to a new scroll position, since target
elements are placed on the top of the browser window if possible.
CSS Transforms - CSS: Cascading Style Sheets
css transforms is a module of css that defines how
elements styled with css can be transformed in two-dimensional or three-dimensional space.
... reference properties backface-visibility perspective perspective-origin rotate scale transform transform-box transform-origin transform-style translate data types <transform-function> guides using css transforms step-by-step tutorial about how to transform
elements styled with css.
Class selectors - CSS: Cascading Style Sheets
the css class selector matches
elements based on the contents of their class attribute.
... /* all
elements with class="spacious" */ .spacious { margin: 2em; } /* all <li>
elements with class="spacious" */ li.spacious { margin: 2em; } /* all <li>
elements with a class list that includes both "spacious" and "elegant" */ /* for example, class="elegant retro spacious" */ li.spacious.elegant { margin: 2em; } syntax .class_name { style properties } note that this is equivalent to the following attribute selector: [class~=class_name] { style properties } examples css .red { color: #f33; } .yellow-bg { background: #ffa; } .fancy { font-weight: bold; text-shadow: 4px 4px 3px #77f; } html <p class="red">this paragraph has red text.</p> <p class="red yellow-bg">this paragraph has red text and a yellow background.</p> <p class="red fancy">this paragraph has red text a...
Media queries - CSS: Cascading Style Sheets
media queries in html in html, media queries can be applied to various
elements: in the <link> element's media attribute, they define the media to which a linked resource (typically css) should be applied.
...(this is only valid inside <picture>
elements.) in the <style> element's media attribute, they define the media to which the style should be applied.
Syntax - CSS: Cascading Style Sheets
the basic goal of the cascading stylesheet (css) language is to allow a browser engine to paint
elements of the page with specific features, like colors, positioning, or decorations.
...each (valid) declaration block is preceded by one or more comma-separated selectors, which are conditions selecting some
elements of the page.
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
as mentioned earlier, you use the custom property value by specifying your custom property name inside the var() function, in place of a regular property value: element { background-color: var(--main-bg-color); } first steps with custom properties let's start with this simple css that applies the same color to
elements of different classes: .one { color: white; background-color: brown; margin: 10px; width: 50px; height: 50px; display: inline-block; } .two { color: white; background-color: black; margin: 10px; width: 150px; height: 70px; display: inline-block; } .three { color: white; background-color: brown; margin: 10px; width: 75px; } .four { color: white; background-col...
... custom property fallback values using the var() function, you can define multiple fallback values when the given variable is not yet defined; this can be useful when working with custom
elements and shadow dom.
animation-delay - CSS: Cascading Style Sheets
formal definition initial value0sapplies toall
elements, ::before and ::after pseudo-
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples see css animations for examples.
... 43 full support 3prefixed prefixed implemented with the vendor prefix: -webkit-edge full support 12firefox full support 16notes full support 16notes notes before firefox 57, firefox does not repaint
elements outside the viewport that are animated into the viewport with a delay.
aspect-ratio - CSS: Cascading Style Sheets
syntax aspect-ratio: 1 / 1; /* global values */ aspect-ratio: inherit; aspect-ratio: initial; aspect-ratio: unset; values <auto> replaced
elements with an intrinsic aspect ratio use that aspect ratio, otherwise the box has no preferred aspect ratio.
... formal definition initial valueautoapplies toall
elements except inline boxes and internal ruby or table boxesinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | <ratio> examples mapping width and height to aspect-ratio firefox has added an internal aspect-ratio property (in version 69 onwards) that applies to replaced
elements and other related
elements that accept width and height attributes.
background-clip - CSS: Cascading Style Sheets
see "the backgrounds of special
elements." note: for documents whose root element is an html element: if the computed value of background-image on the root element is none and its background-color is transparent, user agents must instead propagate the computed values of the background properties from that element’s first html <body> child element.
... formal definition initial valueborder-boxapplies toall
elements.
background-repeat - CSS: Cascading Style Sheets
formal definition initial valuerepeatapplies toall
elements.
... candidate recommendation adds support for multiple background images, the two-value syntax allowing distinct repetition behavior for the horizontal and vertical directions, the space and round keywords, and for backgrounds on inline-level
elements by precisely defining the background painting area.
border-block-start-width - CSS: Cascading Style Sheets
initial valuemediumapplies toall
elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length values <'border-width'> the width of the border.
... 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 border width with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-block-start-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-start-width' in that specification.
border-bottom-left-radius - CSS: Cascading Style Sheets
formal definition initial value0applies toall
elements; but user agents are not required to apply to table and inline-table
elements when border-collapse is collapse.
... the behavior on internal table
elements is undefined for the moment..
border-bottom-right-radius - CSS: Cascading Style Sheets
formal definition initial value0applies toall
elements; but user agents are not required to apply to table and inline-table
elements when border-collapse is collapse.
... the behavior on internal table
elements is undefined for the moment..
break-after - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toblock-level
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region examples breaking into neat columns in the following example we have a container that contains an <h1> spanning all columns (achieved using column-span: all) and a series of <h2>s and paragraphs...
...however, we used break-after: column on the <p>
elements to force a column break after each one, meaning that you end up with an <h2> neatly at the top of each column.
break-before - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toblock-level
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region examples breaking into neat columns in the following example we have a container that contains an <h1> spanning all columns (achieved using column-span: all) and a series of <h2>s and paragraphs...
...however, we used break-before: column on the <h2>
elements to force a column break before each one, meaning that you end up with an <h2> neatly at the top of each column.
caret-color - CSS: Cascading Style Sheets
the caret appears in
elements such as <input> or those with the contenteditable attribute.
... formal definition initial valueautoapplies toall
elementsinheritedyescomputed valueauto is computed as specified and <color> values are computed as defined for the color property.animation typea color formal syntax auto | <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
clip - CSS: Cascading Style Sheets
the clip property applies only to absolutely positioned
elements — that is,
elements with position:absolute or position:fixed.
... formal definition initial valueautoapplies toabsolutely positioned
elementsinheritednocomputed valueauto if specified as auto, otherwise a rectangle with four values, each of which is auto if specified as auto or the computed length otherwiseanimation typea rectangle formal syntax <shape> | autowhere <shape> = rect(<top>, <right>, <bottom>, <left>) examples clipping an image css .dotted-border { border: dotted; position: relative; width: 536px; height: 350p...
color - CSS: Cascading Style Sheets
for an overview of using color in html, see applying color to html
elements using css.
... 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 valuevaries from one browser to anotherapplies toall
elements.
column-count - CSS: Cascading Style Sheets
12prefixed prefixed implemented with the vendor prefix: -webkit-firefox full support 52 full support 52 no support 1.5 — 74prefixed notes prefixed implemented with the vendor prefix: -moz-notes prior to version 37, multiple columns didn't work with display: table-caption
elements.ie full support 10opera full support 11.1 full support 11.1 full support 15prefixed prefixed implemented with the vendor prefix: -webkit-safari full support 9 ...
... prefixed implemented with the vendor prefix: -webkit-firefox android full support 52 full support 52 full support 4prefixed notes prefixed implemented with the vendor prefix: -moz-notes prior to version 37, multiple columns didn't work with display: table-caption
elements.opera android full support 11.1 full support 11.1 full support 14prefixed prefixed implemented with the vendor prefix: -webkit-safari ios full support 9 full support 9 ...
<display-outside> - CSS: Cascading Style Sheets
run-in
elements act like inlines or blocks, depending on the surrounding
elements.
... examples in the following example, span
elements (normally displayed as inline
elements) are set to display: block and so break onto new lines and expand to fill their container in the inline dimension.
element() - CSS: Cascading Style Sheets
this demonstrates that you can use arbitrary
elements as background, but doesn't necessarily demonstrate good design practices.
... <div style="width:400px; height:100px; background:-moz-element(#mybackground2);"> </div> <div style="overflow:hidden; height:0;"> <button id="mybackground2" type="button">evil button!</button> </div> specifications specification status comment css images module level 4the definition of 'using
elements as images: the element() notation' in that specification.
font-variant-ligatures - CSS: Cascading Style Sheets
the font-variant-ligatures css property controls which ligatures and contextual forms are used in textual content of the
elements it applies to.
... formal definition initial valuenormalapplies toall
elements.
height - CSS: Cascading Style Sheets
accessibility concerns ensure that
elements set with a height are not truncated and/or do not obscure other content when the page is zoomed to increase text size.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 formal definition initial valueautoapplies toall
elements but non-replaced inline
elements, table columns, and column groupsinheritednopercentagesthe percentage is calculated with respect to the height of the generated box's containing block.
image-orientation - CSS: Cascading Style Sheets
its functionality may be moved into properties on the <img> and/or <picture>
elements, with the possible exception of from-image.
... formal definition initial value0degapplies toall
elementsinheritedyescomputed valuean <angle>, rounded to the next quarter turn from 0deg and normalized, that is moduloing the value by 1turnanimation typediscrete formal syntax from-image | <angle> | [ <angle>?
isolation - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toall
elements.
... in svg, it applies to container
elements, graphics
elements, and graphics referencing
elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | isolate examples forcing a new stacking context for an element html <div id="b" class="a"> <div id="d"> <div class="a c">auto</div> </div> <div id="e"> <div class="a c">isolate</div> </div> </div> css .a { background-color: rgb(0,255,0); } #b { width: 200px; height: 210px; } .c { width: 100px; height: 100px; border: 1px solid black; padding: 2px; mix-blend-mode: difference; } #d { isolation: auto; } #e { isolation: isolate; } result specifications specification status comment compositing and blending level 1the definition of 'isolation' in that sp...
justify-items - CSS: Cascading Style Sheets
for absolutely-positioned
elements, it aligns the items inside their containing block on the inline axis, accounting for the offset values of top, left, bottom, and right.
... formal definition initial valuelegacyapplies toall
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | stretch | <baseline-position> | <overflow-position>?
mask - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:mask-image: nonemask-mode: match-sourcemask-repeat: no-repeatmask-position: centermask-clip: border-boxmask-origin: border-boxmask-size: automask-composite: addapplies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednopercentagesas each of the properties of the shorthand:mask-position: refer to size of mask painting area minus size of mask layer image (see the text for background-position)computed valueas each of the properties of the shorthand:mask-image: as specified, but with <url> values made absolutema...
... candidate recommendation extends its usage to html
elements.
mix-blend-mode - CSS: Cascading Style Sheets
formal definition initial valuenormalapplies toall
elementsinheritednocomputed valueas specifiedanimation typediscretecreates stacking contextyes formal syntax <blend-mode>where <blend-mode> = normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity examples effect of different mix-blend-mode values <div class="grid"> <div class="co...
... 41chrome android full support 41firefox android full support 32opera android full support 28safari ios full support 8samsung internet android full support 4.0on svg
elementschrome full support 41edge full support 79firefox full support 32ie no support noopera full support 28safari no support nowebview ...
object-fit - CSS: Cascading Style Sheets
formal definition initial valuefillapplies toreplaced
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax fill | contain | cover | none | scale-down examples setting object-fit for an image html <section> <h2>object-fit: fill</h2> <img class="fill" src="https://udn.realityripple.com/samples/ae/248a9938d9.png" alt="mdn logo"> <img class="fill narrow" src="https://udn.realityripple.com/samples/ae/248a9938d9.png" alt="...
...bilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetobject-fitchrome full support 31edge full support 16notes full support 16notes notes edge supports object-fit on img
elements only.
object-position - CSS: Cascading Style Sheets
formal definition initial value50% 50%applies toreplaced
elementsinheritedyespercentagesrefer to width and height of element itselfcomputed valueas specifiedanimation typerepeatable list of simple list of length, percentage, or calc formal syntax <position>where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
... | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]where <length-percentage> = <length> | <percentage> examples positioning image content html here we see html that includes two <img>
elements, each displaying the mdn logo.
offset-anchor - CSS: Cascading Style Sheets
formal definition initial valueautoapplies totransformable
elementsinheritednopercentagesrelativetowidthandheightcomputed valuefor <length> the absolute value, otherwise a percentageanimation typea position formal syntax auto | <position>where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
... | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]where <length-percentage> = <length> | <percentage> examples setting various offset-anchor values in the following example, we have three <div>
elements nested in <section>
elements.
overscroll-behavior-block - CSS: Cascading Style Sheets
underlying
elements will not scroll.
... formal definition initial valueautoapplies tonon-replaced block-level
elements and non-replaced inline-block
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing block overscrolling in this demo we have two block-level boxes, one inside the other.
overscroll-behavior-inline - CSS: Cascading Style Sheets
underlying
elements will not scroll.
... formal definition initial valueautoapplies tonon-replaced block-level
elements and non-replaced inline-block
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing inline overscrolling in this demo we have two block-level boxes, one inside the other.
overscroll-behavior-x - CSS: Cascading Style Sheets
underlying
elements will not scroll.
... formal definition initial valueautoapplies tonon-replaced block-level
elements and non-replaced inline-block
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing an underlying element from scrolling horizontally in our simple overscroll-behavior-x example (see source code also), we have two block-level boxes, one inside the other.
overscroll-behavior - CSS: Cascading Style Sheets
underlying
elements will not scroll.
... formal definition initial valueautoapplies tonon-replaced block-level
elements and non-replaced inline-block
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ contain | none | auto ]{1,2} examples preventing an underlying element from scrolling in our overscroll-behavior example (see the source code also), we present a full-page list of fake contacts, and a dialog box containing a chat window.
quotes - CSS: Cascading Style Sheets
auto appropriate quote marks will be used for whatever language value is set on the selected
elements (i.e.
... formal definition initial valuedepends on user agentapplies toall
elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | auto | [ <string> <string> ]+ examples basic quote marks html <q>to be or not to be.
scroll-snap-stop - CSS: Cascading Style Sheets
always the scroll container must not "pass over" a possible snap position; and must snap to the first of this
elements' snap positions.
... formal definition initial valuenormalapplies toall
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | always examples snapping in different axes this example is duplicated from scroll-snap-type with minor variances.
scroll-snap-type - CSS: Cascading Style Sheets
both the scroll container snaps to snap positions in both of its axes independently (potentially snapping to different
elements in each axis).
... formal definition initial valuenoneapplies toall
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | [ x | y | block | inline | both ] [ mandatory | proximity ]?
shape-outside - CSS: Cascading Style Sheets
,1,1,1,1,0.3 c1,0.7,0.5,1,0.5,1 z'); /* <url> value */ shape-outside: url(image.png); /* <gradient> value */ shape-outside: linear-gradient(45deg, rgba(255, 255, 255, 0) 150px, red 150px); /* global values */ shape-outside: initial; shape-outside: inherit; shape-outside: unset; the shape-outside property is specified using the values from the list below, which define the float area for float
elements.
... the float area determines the shape around which inline content (float
elements) wrap.
table-layout - CSS: Cascading Style Sheets
fixed table and column widths are set by the widths of table and col
elements or by the width of the first row of cells.
... formal definition initial valueautoapplies totable and inline-table
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | fixed examples fixed-width tables with text-overflow this example uses a fixed table layout, combined with the width property, to restrict the table's width.
text-decoration-color - CSS: Cascading Style Sheets
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.
... 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 valuecurrentcolorapplies toall
elements.
text-decoration-skip - CSS: Cascading Style Sheets
thus, adjacent
elements receive separate underlines.
... formal definition initial valueobjectsapplies toall
elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | [ objects | [ spaces | [ leading-spaces | trailing-spaces ] ] | edges | box-decoration ] examples skipping edges html <p>hey, grab a cup of <em>coffee!</em></p> css p { margin: 0; font-size: 3em; text-decoration: underline; text-decoration-skip: edges; } result specifications specification status comment css text d...
text-decoration-thickness - CSS: Cascading Style Sheets
for a given application of this property, the thickness is constant across the whole box it is applied to, even if there are child
elements with a different font size.
... formal definition initial valueautoapplies toall
elements.
text-decoration - CSS: Cascading Style Sheets
text decorations are drawn across descendant text
elements.
... formal definition initial valueas each of the properties of the shorthand:text-decoration-color: currentcolortext-decoration-style: solidtext-decoration-line: noneapplies toall
elements.
text-emphasis-position - CSS: Cascading Style Sheets
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 conflict with ruby.
...in html, this can be done with the following pattern: em { text-emphasis: dot; /* set text-emphasis for <em>
elements */ } em rt { display: none; /* hide ruby inside <em>
elements */ } specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification.
text-orientation - CSS: Cascading Style Sheets
use-glyph-orientation on svg
elements, this keyword leads to use the value of the deprecated 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.
text-underline-offset - CSS: Cascading Style Sheets
for a given application of this property, the offset is constant across the whole box that the underline is applied to, even if there are child
elements with different font sizes or vertical alignment.
... formal definition initial valueautoapplies toall
elements.
touch-action - CSS: Cascading Style Sheets
this means that in practice, touch-action is typically applied only to top-level
elements which have some custom behavior, without needing to specify touch-action explicitly on any of that element's descendants.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | understanding wcag 2.0 formal definition initial valueautoapplies toall
elements except: non-replaced inline
elements, table rows, row groups, table columns, and column groupsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | none | [ [ pan-x | pan-left | pan-right ] | [ pan-y | pan-up | pan-down ] | pinch-zoom ] | manipulation examples disabling all gestures the most common usage is to disable all gestures on an element (and its non-scroll...
translate - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies totransformable
elementsinheritednopercentagesrefer to the size of bounding boxcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea transformcreates stacking contextyes formal syntax none | <length-percentage> [ <length-percentage> <length>?
... initial valuenoneapplies totransformable
elementsinheritednopercentagesrefer to the size of bounding boxcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea transformcreates stacking contextyes ...
white-space - CSS: Cascading Style Sheets
lines are only broken at newline characters in the source and at <br>
elements.
... collapse collapse wrap remove nowrap collapse collapse no wrap remove pre preserve preserve no wrap preserve pre-wrap preserve preserve wrap hang pre-line preserve collapse wrap remove break-spaces preserve preserve wrap wrap formal definition initial valuenormalapplies toall
elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | pre | nowrap | pre-wrap | pre-line | break-spaces examples basic example code { white-space: pre; } line breaks inside <pre>
elements pre { word-wrap: break-word; /* ie 5.5-7 */ white-space: pre-wrap; /* modern browsers */ } in action html <div id="css-code" class="box"> p { white-space...
width - CSS: Cascading Style Sheets
accessibility concerns ensure that
elements set with a width aren't truncated and don't obscure other content when the page is zoomed to increase text size.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | understanding wcag 2.0 formal definition initial valueautoapplies toall
elements but non-replaced inline
elements, table rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuea percentage or auto or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples default width p.goldie { background: gold; } <p class="goldie">the mozilla community produces a lot of great software.</p> pixels and ems .px_length { width: 200px; background-color: red; color: white; border: 1...
regexp:match() - EXSLT
xslt/xpath reference: xslt
elements, exslt functions, xpath functions, xpath axes regexp:match() performs regular expression matching on a string, returning the submatches found as a result.
... returns a node set of match
elements, each of which has the string value equal to a portion of the first parameter string as captured by the regular expression.
str:split() - EXSLT
xslt/xpath reference: xslt
elements, exslt functions, xpath functions, xpath axes str:split() splits a string using a pattern string to determine where the splits should occur, returning a node-set containing the resulting strings.
... returns a node-set of token
elements, each containing one token from the string.
str:tokenize() - EXSLT
xslt/xpath reference: xslt
elements, exslt functions, xpath functions, xpath axes str:tokenize() splits a string using a set of characters as delimiters that determine where the splits should occur, returning a node-set containing the resulting strings.
... returns a node-set of token
elements, each containing one token from the string.
Media events - Developer guides
various events are sent when handling media that are embedded in html documents using the <audio> and <video>
elements; this section lists them and provides some helpful information about using them.
... you can easily watch for these events, using code such as the following: var v = document.get
elementsbytagname("video")[0]; v.addeventlistener("seeked", function() { v.play(); }, true); v.currenttime = 10.0; this example fetches the first video element in the document and attaches an event listener to it, watching for the seeked event, which is sent whenever a seek operation completes.
Introduction to Web development - Developer guides
basic structure of a web page — the doctype and document 'tree' fundamental html
elements — structural, head, list, form
elements and more, explained by category.
... html
elements reference guide — a comprehensive guide to html
elements with details on how browsers support them css getting started with css — an absolute beginners guide to css covers basic concepts and fundamentals css reference guide — a complete guide to css with details on the level of gecko/firefox support for each.
User input and controls - Developer guides
using features such as contenteditable
elements you can implement fast rich-text editors and with drag&drop let users moving
elements inside your app.
...touch events can help you implement interactive
elements and common interaction gestures on touchscreen devices.
Writing forward-compatible websites - Developer guides
what this means is that any time you access a global variable in an event handler content attribute, including calling any function declared globally, you can end up with a name collision if a specification adds a new dom property to
elements or documents which has the same name as your function or variable, and a browser implements it.
...or, conversely, that they don't have support for some other feature (e.g., don't assume that a browser that supports onload on script
elements will never support onreadystatechange on them).
The HTML autocomplete attribute - HTML: Hypertext Markup Language
the html autocomplete attribute is available on <input>
elements that take a text or numeric value as input, <textarea>
elements, <select>
elements, and <form>
elements.
... 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.
HTML attribute: crossorigin - HTML: Hypertext Markup Language
the crossorigin attribute, valid on the <audio>, <img>, <link>, <script>, and <video>
elements, provides support for cors, defining how the element handles crossorigin requests, thereby enabling the configuration of the cors requests for the element's fetched data.
... the crossorigin content attribute on media
elements is a cors settings attribute.
HTML attribute: max - HTML: Hypertext Markup Language
valid for the numeric input types, including the date, month, week, time, datetime-local, number and range types, and both the <progress> and <meter>
elements, the max attribute is a number that specifies the most positive value a form control to be considered valid.
... syntax for max values for other
elements input type syntax example <progress> <number> <progress id="file" max="100" value="70"> 70% </progress> <meter> <number> <meter id="fuel" min="0" max="100" low="33" high="66" optimum="80" value="40"> at 40/100</meter> ...
HTML attribute: readonly - HTML: Hypertext Markup Language
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.
HTML attribute: required - HTML: Hypertext Markup Language
the required attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, number, checkbox, radio, file, <input> types along with the <select> and <textarea> form control
elements.
... if present on any of these input types and
elements, the :required pseudo class will match.
<address>: The Contact Address element - HTML: Hypertext Markup Language
permitted parents any element that accepts flow content, but always excluding <address>
elements (according to the logical principle of symmetry, if <address> tag, as a parent, can not have nested <address> element, then the same <address> content can not have <address> tag as its parent).
...://www.somedomain.com/contact"> www.somedomain.com</a>.<br> if you see any bugs, please <a href="mailto:webmaster@somedomain.com"> contact webmaster</a>.<br> you may also want to visit us:<br> mozilla foundation<br> 331 e evelyn ave<br> mountain view, ca 94041<br> usa </address> result although it renders text with the same default styling as the <i> or <em>
elements, it is more appropriate to use <address> when dealing with contact information, as it conveys additional semantic information.
<col> - HTML: Hypertext Markup Language
because <td>
elements are not descendant of the <col> element, they won't inherit it.
...because <td>
elements are not descendant of the <col> element, they won't inherit it.
<dfn>: The Definition element - HTML: Hypertext Markup Language
links to <dfn>
elements if you include an id attribute on the <dfn> element, you can then link to it using <a>
elements.
...this can be done by using the <dfn> and <abbr>
elements in tandem, like this: html <p>the <dfn><abbr title="hubble space telescope">hst</abbr></dfn> is among the most productive scientific instruments ever constructed.
<div>: The Content Division element - HTML: Hypertext Markup Language
or (in whatwg html): if the parent is a <dl> element: one or more <dt>
elements followed by one or more <dd>
elements, optionally intermixed with <script> and <template>
elements.
...instead, you should use css properties or techniques such as css grid or css flexbox to align and position <div>
elements on the page.
<u>: The Unarticulated Annotation (Underline) element - HTML: Hypertext Markup Language
usage notes along with other pure styling
elements, the original html underline (<u>) element was deprecated in html 4; however, <u> was restored in html 5 with a new, semantic, meaning: to mark text as having some form of non-textual annotation applied.
... other
elements to consider using in most cases, you should use an element other than <u>, such as: <em> to denote stress emphasis <b> to draw attention to text <mark> to mark key words or phrases <strong> to indicate that text has strong importance <cite> to mark the titles of books or other publications <i> to denote technical terms, transliterations, thoughts, or names of vessels in western texts t...
class - HTML: Hypertext Markup Language
classes allow css and javascript to select and access specific
elements via the class selectors or functions like the dom method document.get
elementsbyclassname.
... recommendation supported on all
elements but <base>, <basefont>, <head>, <html>, <meta>, <param>, <script>, <style>, and <title>.
id - HTML: Hypertext Markup Language
in contrast to the class attribute, which allows space-separated values,
elements can only have one single id value.
... recommendation supported on all
elements but <base>, <head>, <html>, <meta>, <script>, <style>, and <title>.
is - HTML: Hypertext Markup Language
the is global attribute allows you to specify that a standard html element should behave like a defined custom built-in element (see using custom
elements for more details).
... } } // define the new element custom
elements.define('word-count', wordcount, { extends: 'p' }); <p is="word-count"></p> specifications specification status comment html living standardthe definition of 'is' in that specification.
lang - HTML: Hypertext Markup Language
the lang global attribute helps define the language of an element: the language that non-editable
elements are written in, or the language that the editable
elements should be written in by the user.
... recommendation supported on all
elements but <applet>, <base>, <basefont>, <br>, <frame>, <frameset>, <iframe>, <param>, and <script>.
title - HTML: Hypertext Markup Language
some typical uses: labeling <iframe>
elements for assistive technology providing a programmatically associated label for an <input> element as a fallback for a real <label> labeling controls in data tables additional semantics are attached to the title attributes of the <link>, <abbr>, <input>, and <menuitem>
elements.
... recommendation supported on all
elements but <base>, <basefont>, <head>, <html>, <meta>, <param>, <script>, and <title>.
Link types - HTML: Hypertext Markup Language
list of the defined link types and their significance in html link type description allowed in these
elements not allowed in these
elements alternate if the element is <link> and the rel attribute also contains the stylesheet type, the link defines an alternative style sheet; in that case the title attribute must be present and not be the empty string.
... although recognized, the rev attribute on <a>, <area> or<link>
elements with a link type of made is incorrect and should be replaced by the rel attribute with this link type.
Microdata - HTML: Hypertext Markup Language
microdata is an attempt to provide a simpler way of annotating html
elements with machine-readable tags than the similar approaches of using rdfa and classic microformats.
...items and properties are represented by regular
elements.
CSP: base-uri - HTTP
if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: connect-src - HTTP
if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: default-src - HTTP
if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: font-src - HTTP
if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: form-action - HTTP
if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: img-src - HTTP
if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: manifest-src - HTTP
if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: navigate-to - HTTP
if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: prefetch-src - HTTP
if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: style-src - HTTP
if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
CSP: worker-src - HTTP
if you only need to allow inline event handlers and not inline <script>
elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script>
elements, javascript: urls, inline event handlers, and inline <style>
elements.
Feature-Policy: unsized-media - HTTP
the http feature-policy header unsized-media directive controls whether the current document is allowed to change the size of media
elements after the initial layout is complete.
... default value the default value for unsized-media is '*', that is unsized media
elements are allowed for all origins by default.
Feature-Policy - HTTP
the http feature-policy header provides a mechanism to allow and deny the use of browser features in its own frame, and in content within any <iframe>
elements in the document.
...the autoplay attribute on <audio> and <video>
elements will be ignored.
Referrer-Policy - HTTP
for example, you can set the referrer policy for the entire document with a <meta> element with a name of referrer: <meta name="referrer" content="origin"> or set it for individual requests with the referrerpolicy attribute on <a>, <area>, <img>, <iframe>, <script>, or <link>
elements: <a href="http://example.com" referrerpolicy="origin"> alternatively, a noreferrer link relation on an a, area, or link element can be set: <a href="http://example.com" rel="noreferrer"> integration with css css can fetch resources referenced from stylesheets.
... for <style>
elements or style attributes, the owner document's referrer policy is used.
Introduction - JavaScript
javascript contains a standard library of objects, such as array, date, and math, and a core set of language
elements such as operators, control structures, and statements.
...for example, client-side extensions allow an application to place
elements on an html form and respond to user events such as mouse clicks, form input, and page navigation.
Regular expression syntax cheatsheet - JavaScript
matches are accessed using the index of the the result's
elements ([1], ..., [n]) or from the predefined regexp object's properties ($1, ..., $9).
...the matched substring cannot be recalled from the resulting array's
elements ([1], ..., [n]) or from the predefined regexp object's properties ($1, ..., $9).
Groups and ranges - JavaScript
matches are accessed using the index of the the result's
elements ([1], ..., [n]) or from the predefined regexp object's properties ($1, ..., $9).
...the matched substring cannot be recalled from the resulting array's
elements ([1], ..., [n]) or from the predefined regexp object's properties ($1, ..., $9).
Array.prototype.fill() - JavaScript
the fill() method changes all
elements in an array to a static value, from a start index (default 0) to an end index (default array.length).
...(note all
elements in the array will be this exact value.) start optional start index, default 0.
Array.prototype.flat() - JavaScript
the flat() method creates a new array with all sub-array
elements concatenated into it recursively up to the specified depth.
... return value a new array with the sub-array
elements concatenated into it.
Array.from() - JavaScript
description array.from() lets you create arrays from: array-like objects (objects with a length property and indexed
elements); or iterable objects (objects such as map and set).
...// [[1, 2], [2, 4], [4, 8]] const mapper = new map([['1', 'a'], ['2', 'b']]); array.from(mapper.values()); // ['a', 'b']; array.from(mapper.keys()); // ['1', '2']; array from an array-like object (arguments) function f() { return array.from(arguments); } f(1, 2, 3); // [ 1, 2, 3 ] using arrow functions and array.from() // using an arrow function as the map function to // manipulate the
elements array.from([1, 2, 3], x => x + x); // [2, 4, 6] // generate a sequence of numbers // since the array is initialized with `undefined` on each position, // the value of `v` below will be `undefined` array.from({length: 5}, (v, i) => i); // [0, 1, 2, 3, 4] sequence generator (range) // sequence generator function (commonly referred to as "range", e.g.
<mfenced> - MathML
use the <mrow> and <mo>
elements instead.
...use the <mrow> and <mo>
elements instead, or, for backwards compatibility, see mathml-polyfills/mfenced.
<mlabeledtr> - MathML
child
elements of <mlabeledtr> must be <mtd>
elements.
... the first child is the label whereas all other children are representing row contents and are treated identically to children of <mtr>
elements.
<mstyle> - MathML
it accepts all attributes of all mathml presentation
elements with some exceptions and additional attributes listed below.
... the <mstyle> element accepts all attributes of all presentation
elements with the following exceptions: height, depth or width do not apply to <mglyph>, <mpadded> or <mtable>.
Privacy, permissions, and information security
this is the technology behind the https (hypertext transport protocol secured) protocol not all of these are generally directly used within code; notably, the permissions api, feature policy, and the allow attribute on <iframe>
elements are primary tools directly used by code to help secure a site and its content.
... keeping personal data safe managing site permissions bringing it all together <using feature policy with permissions and so forth; how to use them together, how they interact, etc> permission requests in <iframe>
elements things can get tricky when your web app uses the <iframe> element to embed content from another site inside your own, especially if the document you load into the frame has its own permission needs to consider.
Progressive web app structure - Progressive web apps (PWAs)
it's different with html, as the browser is actually streaming the data already and you can see when the
elements are loaded and rendered on the website.
... the css the css is also as plain as possible: it uses @font-face to load and use a custom font, and it applies some simple styling of the html
elements.
Progressive loading - Progressive web apps (PWAs)
when you include <img>
elements in your html, then every referenced image will be fetched and downloaded during initial website access.
...you could try to make your apps more bulletproof by making them work without javascript — either using <noscript> to show the image with final src already assigned, or by wrapping <img> tags with <a>
elements pointing at the target images, so the user can click and access them when desired.
Graphic design for responsive sites - Progressive web apps (PWAs)
you could use css3 properties for generating effects like drop shadows, gradients and rounded corners, and you could also consider using svg for other ui
elements, instead of raster graphics formats.
...it is good for the visuals of games and complex data visualisions, but for standard user interface
elements it is not very efficient.
Mobile first - Progressive web apps (PWAs)
one word of warning about this technique though - positioning doesn't work as expected on
elements with display: table set on them.
...ure both of these were not direct children of the <article>, otherwise the following would not work: #bottom, #top { font-size: 0.8em; position:absolute; right: 1em; text-decoration: none; } #top { color: white; top: 0.5em; } #bottom { bottom: 0.5em; } i also set their parents to be positioned relatively, so they would become the positioning contexts of the absolutely positioned
elements (you don't want them to be positioned relative to the <body> element.) adding a mobile first layout the above layout is fine for narrower layouts, but it doesn't work very well when you get wider than about 480px.
Structural overview of progressive web apps - Progressive web apps (PWAs)
it's different with html, as the browser is actually streaming the data already and you can see when the
elements are loaded and rendered on the website.
... the css the css for this simple example is also as plain as possible: it uses @font-face to load and use a custom font, and it applies some simple styling of the html
elements.
Web technology reference
html provides a means to create structured documents made up of blocks called html
elements that are delineated by tags, written using angle brackets.
... some introduce content into the page directly, others provide information about document text and may include other tags as sub-
elements.
alignment-baseline - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following four
elements: <tspan>, <tref>, <altglyph>, and <textpath> usage notes value auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | top | center | bottom default value auto animatable yes auto the value is the dominant-baseline of the script to which the character ...
...xt alignment-baseline="baseline" x="60" y="110">a baseline</text> <!-- materialisation of anchors --> <circle cx="60" cy="10" r="3" fill="red" /> <circle cx="60" cy="65" r="3" fill="red" /> <circle cx="60" cy="110" r="3" fill="red" /> <style><![cdata[ text{ font: bold 36px verdana, helvetica, arial, sans-serif; } ]]></style> </svg> for object alignment in other
elements (such as <text>), see dominant-baseline.
color - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element, but as noted above, it has no direct effect on svg
elements.
... candidate recommendation removed the restriction to which
elements it applies.
direction - SVG: Scalable Vector Graphics
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.
... as a presentation attribute, it can be applied to any element but it only has effect on shapes and text context
elements, including: <altglyph>, <textpath>, <text>, <tref>, and <tspan>.
dominant-baseline - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it only has effect on the text content
elements, including: <altglyph>, <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } text { font: bold 14px verdana, helvetica, arial, sans-serif; } <svg viewbox="0 0 200 120" xmlns="http://www.w3.org/2000/svg"> <path d="m20,20 l180,20 m20,50 l180,50 m20,80 l180,80" stroke="grey" /> <text dominant-baseline="baseline" x="30" y="20">baseline</text> <text dominant...
... if there is no parent text content element, the scaled-baseline-table value is constructed as above for <text>
elements.
end - SVG: Scalable Vector Graphics
five
elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> usage notes default value none value <end-value-list> animatable no the <end-value-list> is a semicolon-separated list of values.
...all valid events (not necessarily supported by all
elements) are defined by the dom and html specifications.
fill - SVG: Scalable Vector Graphics
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>.
gradientUnits - SVG: Scalable Vector Graphics
the gradientunits attribute defines the coordinate system used for attributes specified on the gradient
elements.
... two
elements are using this attribute: <lineargradient> and <radialgradient> lineargradient for <lineargradient>, gradientunits defines the coordinate system used for the attributes x1, y1, x2, and y2.
height - SVG: Scalable Vector Graphics
twenty five
elements are using this attribute: <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <image>, <mask>, <pattern>, <rect>, <svg>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <!-- with a height of 0 or less, nothing will be rendered --> <rect y="0" x="0" width="90" height="0"/> <rect y="0" x="100" width="90" height="60"/> <rect y="0" x="200" width="90" height="100%"/> </svg> f...
... value auto | <length> | <percentage> default value auto (treated as 0) animatable yes note: starting with svg2, height is a geometry property meaning this attribute can also be used as a css property for used
elements.
horiz-adv-x - SVG: Scalable Vector Graphics
three
elements are using this attribute: <font>, <glyph>, and <missing-glyph> font for <font>
elements, horiz-adv-x specifies the default horizontal advance of a glyph in horizontal orientation.
... glyph, missing-glyph for <glyph> and <missing-glyph>
elements, horiz-adv-x specifies the horizontal advance of the glyph in horizontal orientation.
mask - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has noticeable effects mostly on the following nineteen
elements: <a>, <circle>, <clippath>, <ellipse>, <g>, <glyph>, <image>, <line>, <marker>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <svg>, <symbol>, <text>, <use> usage notes value see the css property mask default value none animatable yes specifications specification status comment css masking module level 1the defi...
... candidate recommendation extends its usage to html
elements.
overflow - SVG: Scalable Vector Graphics
within svg content, the value auto implies that all rendered content for child
elements must be visible, either through a scrolling mechanism, or by rendering with no clip.
... 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 ...
u1 - SVG: Scalable Vector Graphics
if a given unicode character within the set has multiple corresponding <glyph>
elements (i.e., there are multiple <glyph>
elements with the same unicode attribute value but different glyph-name values), then all such glyphs are included in the set.
... two
elements are using this attribute: <hkern> and <vkern> context notes value [ <character> | <urange> ]# default value none animatable no [ <character> | <urange> ]# this value indicates a comma-separated sequence of unicode characters and/or ranges of unicode characters, which identify a set of possible first glyphs in a kerning pair.
u2 - SVG: Scalable Vector Graphics
if a given unicode character within the set has multiple corresponding <glyph>
elements (i.e., there are multiple <glyph>
elements with the same unicode attribute value but different glyph-name values), then all such glyphs are included in the set.
... two
elements are using this attribute: <hkern> and <vkern> context notes value [ <character> | <urange> ]# default value none animatable no [ <character> | <urange> ]# this value indicates a comma-separated sequence of unicode characters and/or ranges of unicode characters, which identify a set of possible second glyphs in a kerning pair.
vert-adv-y - SVG: Scalable Vector Graphics
three
elements are using this attribute: <font>, <glyph>, and <missing-glyph> font for <font>
elements, vert-adv-y specifies the default vertical advance for a glyph in vertical orientation.
... value <number> default value 1 em as of units-per-em animatable no <number> this value indicates the default vertical advance of the glyph in vertical direction glyph, missing-glyph for <glyph> and <missing-glyph>
elements, vert-adv-y specifies the vertical advance for a glyph in vertical orientation.
width - SVG: Scalable Vector Graphics
twenty five
elements are using this attribute: <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <image>, <mask>, <pattern>, <rect>, <svg>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <!-- with a width of 0 or less, nothing will be rendered --> <rect x="0" y="0" width="0" height="90"/> <rect x="0" y="100" width="60" height="90"/> <rect x="0" y="200" width="100%" height="90"/> </svg> f...
... value auto | <length> | <percentage> default value auto (treated as 0) animatable yes note: starting with svg2, width is a geometry property meaning this attribute can also be used as a css property for used
elements.
writing-mode - SVG: Scalable Vector Graphics
the writing-mode attribute applies only to <text>
elements; the attribute is ignored for <tspan>, <tref>, <altglyph> and <textpath> sub-
elements.
... as a presentation attribute, it can be applied to any element but it has effect only on the following five
elements: <altglyph>, <text>, <textpath>, <tref>, and <tspan> usage notes default value horizontal-tb value horizontal-tb | vertical-rl | vertical-lr animatable yes horizontal-tb this value defines a top-to-bottom block flow direction.
x - SVG: Scalable Vector Graphics
thirty seven
elements are using this attribute: <altglyph>, <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fefunca>, <fefuncb>, <fefuncg>, <fefuncr>, <fegaussianblur>, <feimage>, <femerge>, <femergenode>, <femorphology>, <feoffset>, <fepointlight>, <fespecularlighting>, <fespotlight>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <glyphref>, <image>, <mask>, <pattern>, <rect>, <svg>, <text>, <tref>, <tspan>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <rect x="20" y="20" width="60" height="60" /> <rect x="120" y="20" width="60" height="60" ...
... 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 used
elements.
x1 - SVG: Scalable Vector Graphics
elements that only need one coordinate use the x attribute instead.
... two
elements are using this attribute: <line>, and <lineargradient> html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="5" y1="1" y2="9" stroke="red" /> <line x1="5" x2="5" y1="1" y2="9" stroke="green" /> <line x1="9" x2="5" y1="1" y2="9" stroke="blue" /> </svg> line for <line>, x1 defines the x coordinate of the starting point of the line.
x2 - SVG: Scalable Vector Graphics
elements that only need one coordinate use the x attribute instead.
... two
elements are using this attribute: <line>, and <lineargradient> html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="5" x2="1" y1="1" y2="9" stroke="red" /> <line x1="5" x2="5" y1="1" y2="9" stroke="green" /> <line x1="5" x2="9" y1="1" y2="9" stroke="blue" /> </svg> line for <line>, x2 defines the x coordinate of the ending point of the line.
y - SVG: Scalable Vector Graphics
thirty seven
elements are using this attribute: <altglyph>, <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fefunca>, <fefuncb>, <fefuncg>, <fefuncr>, <fegaussianblur>, <feimage>, <femerge>, <femergenode>, <femorphology>, <feoffset>, <fepointlight>, <fespecularlighting>, <fespotlight>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <glyphref>, <image>, <mask>, <pattern>, <rect>, <svg>, <text>, <tref>, <tspan>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <rect y="20" x="20" width="60" height="60" /> <rect y="120" x="20" width="60" height="60" ...
... 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 used
elements.
y1 - SVG: Scalable Vector Graphics
elements that only need one coordinate use the y attribute instead.
... two
elements are using this attribute: <line>, and <lineargradient> html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="9" y1="1" y2="5" stroke="red" /> <line x1="1" x2="9" y1="5" y2="5" stroke="green" /> <line x1="1" x2="9" y1="9" y2="5" stroke="blue" /> </svg> line for <line>, y1 defines the y coordinate of the starting point of the line.
y2 - SVG: Scalable Vector Graphics
elements that only need one coordinate use the y attribute instead.
... two
elements are using this attribute: <line>, and <lineargradient> html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="9" y1="5" y2="1" stroke="red" /> <line x1="1" x2="9" y1="5" y2="5" stroke="green" /> <line x1="1" x2="9" y1="5" y2="9" stroke="blue" /> </svg> line for <line>, y2 defines the y coordinate of the ending point of the line.
SVG Attribute reference - SVG: Scalable Vector Graphics
svg
elements can be modified using attributes that specify details about exactly how the element should be handled or rendered.
... below is a list of all of the attributes available in svg along with links to reference documentation to help you learn which
elements support them and how they work.
<a> - SVG: Scalable Vector Graphics
circle cx="50" cy="40" r="35"/> </a> <!-- a link around a text --> <a href="/docs/web/svg/element/text"> <text x="50" y="90" text-anchor="middle"> <circle> </text> </a> </svg> /* as svg does not provide a default visual style for links, it's considered best practice to add some */ @namespace svg url(http://www.w3.org/2000/svg); /* necessary to select only svg <a>
elements, and not also html’s.
...ia-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-valuetext, role usage notes categoriescontainer 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> specifications specification status comment scalable vector graphics (svg) 2th...
<desc> - SVG: Scalable Vector Graphics
the hidden text of a <desc> element can also be concatenated with the visible text of other
elements using multiple ids in an aria-describedby value.
... </desc> </circle> </svg> attributes this element only includes global attributes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesdescriptive elementpermitted contentany
elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<desc>' in that specification.
<discard> - SVG: Scalable Vector Graphics
the <discard> svg element allows authors to specify the time at which particular
elements are to be discarded, thereby reducing the resources required by an svg user agent.
... usage context categoriesanimation elementpermitted contentany number of the following
elements, in any order:descriptive
elements<script> attributes global attributes conditional processing attributes core attributes aria attributes specific attributes begin href (but note that <discard> has never supported xlink:href) specifications specification status comment svg animations level 2the definition of '<discard>' in that specification.
<feComponentTransfer> - SVG: Scalable Vector Graphics
usage context 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.
... working draft specified that missing transfer function
elements are treated like they were specified with their type attributes set to identity.
<filter> - SVG: Scalable Vector Graphics
it is never rendered itself, but must be used by the filter attribute on svg
elements, or the filter css property for svg/html
elements.
... usage context categoriesnonepermitted contentany number of the following
elements, in any order:descriptive
elementsfilter primitive
elements<animate>, <set> attributes global attributes core attributes presentation attributes xlink attributes class style externalresourcesrequired specific attributes x y width height filterres filterunits primitiveunits xlink:href dom interface this element implements the svgfilterelement interface.
<foreignObject> - SVG: Scalable Vector Graphics
the <foreignobject> svg element includes
elements from a different xml namespace.
...-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-valuetext, role usage notes categoriesnonepermitted contentany
elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<foreignobject>' in that specification.
<hatch> - SVG: Scalable Vector Graphics
paths are defined by <hatchpath>
elements.
... usage context categoriesnever-rendered element, paint server elementpermitted contentany number of the following
elements, in any order:animation
elementsdescriptive
elements<hatchpath>, <script>, <style> attributes global attributes core attributes global event attributes presentation attributes style attributes specific attributes x y pitch rotate hatchunits hatchcontentunits transform href dom interface this element implements the svghatchelement interface.
<image> - SVG: Scalable Vector Graphics
to include dynamic svg
elements, try <use> with an external url.
... usage context categoriesgraphics element, graphics referencing elementpermitted contentany number of the following
elements, in any order:animation
elementsdescriptive
elements attributes global attributes conditional processing attributes core attributes graphical event attributes presentation attributes xlink attributes class style externalresourcesrequired transform specific attributes x: positions the image horizontally from the origin.
<metadata> - SVG: Scalable Vector Graphics
the contents of <metadata> should be
elements from other xml namespaces such as rdf, foaf, etc.
... usage context categoriesdescriptive elementpermitted contentany
elements or character data attributes global attributes core attributes global event attributes specific attributes none dom interface this element implements the svgmetadataelement interface.
<pattern> - SVG: Scalable Vector Graphics
the <pattern> is referenced by the fill and/or stroke attributes on other graphics
elements to fill or stroke those
elements with the referenced pattern.
...cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title usage notes categoriescontainer 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> specifications specification status comment scalable vector graphics (svg) 2th...
<symbol> - SVG: Scalable Vector Graphics
the use of symbol
elements for graphics that are used multiple times in the same document adds structure and semantics.
...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-valuetext, 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>, <text>, <view> note: a <symbol> element itself is not meant to be rendered.
<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.
... </circle> <rect x="11" y="1" width="8" height="8"> <title>i'm a square</title> </rect> </svg> attributes this element only includes global attributes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesdescriptive elementpermitted contentany
elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<title>' in that specification.
Linking - SVG: Scalable Vector Graphics
ocuments are embedded within a parent html document using the tag: page1.html: <html> <body> <p>this is a svg button:</p> <object width="100" height="50" type="image/svg+xml" data="button.svg"/> </body> </html> button.svg: <?xml version="1.1" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg"> <a xlink:href="page2.html" target="_top"> <g> <!-- button graphical
elements here --> </g> </a> </svg> the specification says that the browser should navigate to the html document page2.html when the button graphics are clicked.
... to get around this, requires a little ugly javascript hacking: button.svg: <?xml version="1.1" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg"> <g onclick="top.document.href='page2.html'" cursor="pointer"> <!-- button graphical
elements here --> </g> </svg> example for an example of this solution at work see www.codedread.com.
Fills and Strokes - SVG: Scalable Vector Graphics
<defs> stands for definitions, and it is here that you can create
elements that don't appear in the svg directly, but are used by other
elements.
...ndalone="no"?> <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" version="1.1"> <defs> <style type="text/css"><![cdata[ #myrect { stroke: black; fill: red; } ]]></style> </defs> <rect x="10" height="180" y="10" width="180" id="myrect"/> </svg> moving styles to an area like this can make it easier to adjust properties on large groups of
elements.
Getting started - SVG: Scalable Vector Graphics
basic properties of svg files the first important thing to notice is the order of rendering
elements.
... the globally valid rule for svg files is, that later
elements are rendered atop previous
elements.
Paths - SVG: Scalable Vector Graphics
in these examples, it would probably be simpler to use the <polygon> or <polyline>
elements.
...there are an infinite number of bézier curves, but only two simple ones are available in <path>
elements: a cubic one, called with c, and a quadratic one, called with q.
Patterns - SVG: Scalable Vector Graphics
here, we've just drawn two rectangle
elements inside the pattern (which overlap, and one of which is twice the size of the other and is used to fill in the entire pattern), and one circle.
...by changing the patterncontentunits attribute, we can put all the
elements into the same unit system: <pattern id="pattern" width=".25" height=".25" patterncontentunits="objectboundingbox"> <rect x="0" y="0" width=".25" height=".25" fill="skyblue"/> <rect x="0" y="0" width=".125" height=".125" fill="url(#gradient2)"/> <circle cx=".125" cy=".125" r=".1" fill="url(#gradient1)" fill-opacity="0.5"/> </pattern> now, because the pattern content is in the same un...
Positions - SVG: Scalable Vector Graphics
the grid for all
elements, svg uses a coordinate system or grid system similar to the one used by canvas (and by a whole lot of other computer drawing routines).
...however, this is the same way
elements in html are positioned (by default, ltr documents are considered not the rtl documents which position x from right-to-left).
Texts - SVG: Scalable Vector Graphics
like with the shape
elements text can be colorized with the fill attribute and given a stroke with the stroke attribute.
... other text-related
elements tspan this element is used to mark up sub-portions of a larger text.
Referer header: privacy and security concerns - Web security
the referrerpolicy attribute on html
elements that are in danger of leaking such information (such as <img> and <a>).
... the rel attribute set to noreferrer on html
elements that are in danger of leaking such information (such as <img> and <a>).
How to turn off form autocompletion - Web security
disabling autocompletion to disable autocompletion in forms, you can set the autocomplete attribute to "off": autocomplete="off" you can do this either for an entire form, or for specific input
elements in a form: <form method="post" action="/form" autocomplete="off"> […] </form> <form method="post" action="/form"> […] <div> <label for="cc">credit card:</label> <input type="text" id="cc" name="cc" autocomplete="off"> </div> </form> setting autocomplete="off" on fields has two effects: it tells the browser not to save data inputted by the user for later autocompletion on s...
...however modern browsers have stopped autofilling <input>
elements with autocomplete="new-password" for this very reason.
Axes - XPath
xslt/xpath reference: xslt
elements, exslt functions, xpath functions, xpath axes there are thirteen different axes in the xpath specification.
...only
elements have attributes.
key - XPath
xslt/xpath reference: xslt
elements, exslt functions, xpath functions, xpath axes the key function returns a node-set of nodes that have the given value for the given key.
... notes the xsl:key element defines what attribute on what given
elements will be used to match the key.
Property Files - Archive of obsolete content
use a chrome url to read a file from the locale: <stringbundleset id="stringbundleset"> <stringbundle id="strings" src="chrome://myplugin/locale/strings.properties"/> </stringbundleset> like other non-displayed
elements, you should declare all your stringbundles inside a stringbundleset element so that they are all kept together.
XUL Tutorial - Archive of obsolete content
introduction introduction xul structure the chrome url manifest files simple
elements creating a window adding buttons adding labels and images input controls numeric controls list controls progress meters adding html
elements using spacers more button features the box model the box model element positioning box model details groupboxes adding more
elements more layout
elements stacks and decks stack positioning tabboxes grids content panels splitters toolbars and menus toolbars simple menu bars more menu features popup menus scrolling menus events and scripts adding event handle...
Using the standard theme - Archive of obsolete content
you can either provide a complete custom styling, but most of the time you also want to be able to reuse the standard theme (also called the "global skin") of the base application for non-custom
elements, transparently with regard to which theme the user has currently chosen.
XUL Parser in Python/source - Archive of obsolete content
ms(): el_list[name][strip(attr)] = strip(val) def syntax_error(self, message): pass p = xulparser() cmd = 'dir /s /b *.xul' chrome_dir = 'c:\program files\netscape\netscape 6\chrome' os.chdir(chrome_dir) files = os.popen(cmd).readlines() for file in files: file = file.strip() print '** ' + file + ' **' data = open(file).read() p.feed(data) w.write('<html><h3>periodic table of xul
elements</h3>') w.write('<table><style>.head {font-weight: bold; background-color: lightgrey;}</style>')
elements = el_list.keys()
elements.sort() for item in
elements: w.write('<tr><td class="head">' + item + '</td></tr>\n') for a in el_list[item]: w.write('<tr><td class="at">' + a + '</td>') w.write('</table></html>\n') w.close() ...
action - Archive of obsolete content
, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
assign - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
bbox - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
binding - Archive of obsolete content
s, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
browser - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), ...
deck - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
dropmarker - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
editor - Archive of obsolete content
inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
grippy - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
iframe - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
observes - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
page - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
panel - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), ...
param - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
resizer - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
script - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
scrollbar - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
scrollcorner - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
stringbundle - Archive of obsolete content
inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
triple - Archive of obsolete content
ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), get
elementsbyattribute, get
elementsbyattributens, get
elementsbyclassname(), get
elementsbytagname(), get
elementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattri...
mask-border-repeat - CSS: Cascading Style Sheets
formal definition initial valuestretchapplies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ stretch | repeat | round | space ]{1,2} examples basic usage this property doesn't appear to be supported anywhere yet.
mask-border-slice - CSS: Cascading Style Sheets
formal definition initial value0applies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednopercentagesrefer to size of the mask border imagecomputed valueas specifiedanimation typediscrete formal syntax <number-percentage>{1,4} fill?where <number-percentage> = <number> | <percentage> examples basic usage this property doesn't appear to be supported anywhere yet.
mask-border-source - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednocomputed valueas specified, but with <url> values made absoluteanimation typediscrete formal syntax none | <image>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
mask-border-width - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednopercentagesrelative to width/height of the mask border image areacomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typediscrete formal syntax [ <length-percentage> | <number> | auto ]{1,4}where <length-percentage> = <length> | <percentage> exampl...
mask-border - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:mask-border-mode: alphamask-border-outset: 0mask-border-repeat: stretchmask-border-slice: 0mask-border-source: nonemask-border-width: autoapplies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednopercentagesas each of the properties of the shorthand:mask-border-slice: refer to size of the mask border imagemask-border-width: relative to width/height of the mask border image areacomputed valueas each of the properties of the shorthand:mask-border-mode: as specifiedmask-border-outset: as ...
mask-clip - CSS: Cascading Style Sheets
formal definition initial valueborder-boxapplies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ <geometry-box> | no-clip ]#where <geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box examples clipping a mask to the border ...
mask-composite - CSS: Cascading Style Sheets
formal definition initial valueaddapplies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <compositing-operator>#where <compositing-operator> = add | subtract | intersect | exclude examples compositing mask layers with addition css #masked { width: 100px; height: 100px; background-color: #8cffa0; mask-imag...
mask-image - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednocomputed valueas specified, but with <url> values made absoluteanimation typediscrete formal syntax <mask-reference>#where <mask-reference> = none | <image> | <mask-source>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient><mask-source> =...
mask-mode - CSS: Cascading Style Sheets
formal definition initial valuematch-sourceapplies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <masking-mode>#where <masking-mode> = alpha | luminance | match-source examples using alpha mask mode css #masked { width: 227px; height: 200px; background: blue linear-gradient(red, blue); mask-image: url(https://mdn.
mask-position - CSS: Cascading Style Sheets
formal definition initial valuecenterapplies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednopercentagesrefer to size of mask painting area minus size of mask layer image (see the text for background-position)computed valueconsists of two keywords representing the origin and two offsets from that origin, each given as an absolute length (if given a <length>), otherwise as a percentage...
mask-repeat - CSS: Cascading Style Sheets
formal definition initial valueno-repeatapplies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednocomputed valueconsists of two keywords, one per dimensionanimation typediscrete formal syntax <repeat-style>#where <repeat-style> = repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2} examples setting repeat for a single mask css #masked { width: 250px; height: 250px; ...
mask-size - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toall
elements; in svg, it applies to container
elements excluding the defs element and all graphics
elementsinheritednocomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typerepeatable list of simple list of length, percentage, or calc formal syntax <bg-size>#where <bg-size> = [ <length-percentage> | auto ]{1,2} | cover | containwhere <length-percentage> = <length>...
mask-type - CSS: Cascading Style Sheets
formal definition initial valueluminanceapplies to<mask>
elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax luminance | alpha examples setting an alpha mask html <div class="redsquare"></div> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="0" height="0"> <defs> <mask id="m" maskcontentunits="objectboundingbox" style="mask-type:alpha"> <rect x=".1" ...
min-height - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toall
elements but non-replaced inline
elements, table columns, and column groupsinheritednopercentagesthe percentage is calculated with respect to the height of the generated box's containing block.
offset-distance - CSS: Cascading Style Sheets
formal definition initial value0applies totransformable
elementsinheritednopercentagesrefer to the total path lengthcomputed valuefor <length> the absolute value, otherwise a percentageanimation typea length, percentage or calc(); formal syntax <length-percentage>where <length-percentage> = <length> | <percentage> examples using offset-distance in an animation the motion aspect in css motion path typically comes from animating the offset-distance property...
calcMode - SVG: Scalable Vector Graphics
four
elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> usage notes value discrete | linear | paced | spline default value linear animatable no discrete this specifies that the animation function will jump from one value to the next without any interpolation.
clip - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following six
elements: <svg>, <symbol>, <image>, <foreignobject>, <pattern>, <marker> html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- auto clipping --> <svg x="0" width="10" height="10" clip="auto"> <circle cx="5" cy="5" r="4" stroke="green" /> </svg> <!-- rect(top, right, bottom, left) clipping --> <svg x="10" width="10" height="10" cli...
color-interpolation-filters - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it only has an effect on the following eighteen
elements: <fespotlight>, <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile>, <feturbulence> usage notes value auto | srgb | linearrgb default value linearrgb animatable ...
color-interpolation - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it only has an effect on the following 29
elements: <a>, <animate>, <animatecolor>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <glyph>, <image>, <line>, <lineargradient>, <marker>, <mask>, <missing-glyph>, <path>, <pattern>, <polygon>, <polyline>, <radialgradient>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, and <use> usage notes value auto | srgb | linearrgb default value srgb ...
color-rendering - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it only has an effect on the following 29
elements: <a>, <animate>, <animatecolor>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <glyph>, <image>, <line>, <lineargradient>, <marker>, <mask>, <missing-glyph>, <path>, <pattern>, <polygon>, <polyline>, <radialgradient>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, and <use> html, body, svg { height: 100%; } <svg viewbox="0 0 480 200" xmlns="http://www.w3.o...
cursor - SVG: Scalable Vector Graphics
elements the following
elements can use the cursor attribute container
elements » graphics
elements » browser compatibility the compatibility table on this page is generated from structured data.
cx - SVG: Scalable Vector Graphics
three
elements are using this attribute: <circle>, <ellipse>, and <radialgradient> html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <radialgradient cx="25%" id="mygradient"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <circle cx="50" cy="50" r="45"/> <ellipse cx="150" cy="50" rx="45" ry="25" /> <rect x="205" y="5" width="90" height="90" fill="url(#mygradient)" /> </svg> circle for <circle>, cx defines the x-axis coordinate of the center of the shape.
cy - SVG: Scalable Vector Graphics
three
elements are using this attribute: <circle>, <ellipse>, and <radialgradient> html,body,svg { height:100% } <svg viewbox="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <radialgradient cy="25%" id="mygradient"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <circle cy="50" cx="50" r="45"/> <ellipse cy="150" cx="50" rx="45" ry="25" /> <rect x="5" y="205" width="90" height="90" fill="url(#mygradient)" /> </svg> circle for <circle>, cy defines the y-axis coordinate of the center of the shape.
d - SVG: Scalable Vector Graphics
three
elements have this attribute: <path>, <glyph>, and <missing-glyph> html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="red" d="m 10,30 a 20,20 0,0,1 50,30 a 20,20 0,0,1 90,30 q 90,60 50,90 q 10,60 10,30 z" /> </svg> path for <path>, d is a string containing a series of path commands that define the path to be drawn.
dx - SVG: Scalable Vector Graphics
seven
elements are using this attribute: <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 sv...
dy - SVG: Scalable Vector Graphics
seven
elements utilize this attribute: <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="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 ...
edgeMode - SVG: Scalable Vector Graphics
two
elements are using this attribute: <feconvolvematrix> and <fegaussianblur> feconvolvematrix for <feconvolvematrix>, edgemode determines how to extend the input image as necessary with color values so that the matrix operations can be applied when the kernel is positioned at or near the edge of the input image.
exponent - SVG: Scalable Vector Graphics
four
elements are using this attribute: <fefunca>, <fefuncb>, <fefuncg>, and <fefuncr> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="gradient" gradientunits="userspaceonuse" x1="0" y1="0" x2="200" y2="0"> <stop offset="0" stop-color="#ff0000" /> <stop offset="0.5" stop-color="#00ff00" /> <stop offset="1" stop-color="#0000ff" /> </lineargradient> </defs> <filter id="componenttransfer1" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="gamma" exponent="1"/> <fefuncg type="gamma" exponent="1"/> <fefuncb type="gamma" exponent="1"/> </fecomponenttransfer> <...
fill-opacity - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following eleven
elements: <altglyph>, <circle>, <ellipse>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 400 100" xmlns="http://www.w3.org/2000/svg"> <!-- default fill opacity: 1 --> <circle cx="50" cy="50" r="40" /> <!-- fill opacity as a number --> <circle cx="150" cy="50" r="40" fill-opacity="0.7" /> <!-- fill opacity as a percentage --> <circle cx="250" cy="50" r="40" ...
fill-rule - SVG: Scalable Vector Graphics
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.
filter - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it only has effect on container
elements without the <defs> element, all graphics
elements and the <use> element.
flood-color - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following two
elements: <feflood> and <fedropshadow> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="flood1"> <feflood flood-color="skyblue" x="0" y="0" width="200" height="200"/> </filter> <filter id="flood2"> <feflood flood-color="seagreen" x="0" y="0" width="200" height="200"/> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood2); tra...
flood-opacity - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following two
elements: <feflood> and <fedropshadow> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="flood1"> <feflood flood-color="seagreen" flood-opacity="1" x="0" y="0" width="200" height="200"/> </filter> <filter id="flood2"> <feflood flood-color="seagreen" flood-opacity="0.3" x="0" y="0" width="200" height="200"/> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood1);" /> <rect x="0" y="0" width="20...
font-family - SVG: Scalable Vector Graphics
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-family="arial, helvetica, sans-serif">sans serif</text> <text x="100" y="20" font-family="monospace">monospace</text> </svg> usage notes value [ <family-name> | <generic-family> ]#where <family-name> = <s...
font-size-adjust - SVG: Scalable Vector Graphics
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.
font-size - SVG: Scalable Vector Graphics
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 anima...
font-stretch - SVG: Scalable Vector Graphics
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> usage notes value <font-stretch-absolute>where <font-stretch-absolute> = normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage> default value normal animatable yes specifications specification status comment css...
font-style - SVG: Scalable Vector Graphics
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 val...
font-variant - SVG: Scalable Vector Graphics
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 250 30" xmlns="http://www.w3.org/2000/svg"> <text y="20" font-variant="normal">normal text</text> <text x="100" y="20" font-variant="small-caps">small-caps text</text> </svg> usage notes value normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-...
font-weight - SVG: Scalable Vector Graphics
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 animata...
format - SVG: Scalable Vector Graphics
two
elements are using this attribute: <altglyph> and <glyphref> context notes value <string> default value none animatable no <string> this value specifies the format of the given font.
from - SVG: Scalable Vector Graphics
four
elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> html, body, svg { height: 100%; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" height="100"> <animate attributename="width" fill="freeze" from="100" to="150" dur="3s"/> </rect> </svg> usage notes value see below default value none animatable no...
g1 - SVG: Scalable Vector Graphics
two
elements are using this attribute: <hkern> and <vkern> context notes value <name># default value none animatable no <name># this value indicates a comma-separated sequence of glyph names (i.e., values that match glyph-name attributes on <glyph>
elements) which identify a set of possible first glyphs in the kerning pair.
g2 - SVG: Scalable Vector Graphics
two
elements are using this attribute: <hkern> and <vkern> context notes value <name># default value none animatable no <name># this value indicates a comma-separated sequence of glyph names (i.e., values that match glyph-name attributes on <glyph>
elements) which identify a set of possible second glyphs in the kerning pair.
letter-spacing - SVG: Scalable Vector Graphics
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 400 30" xmlns="http://www.w3.org/2000/svg"> <text y="20" letter-spacing="2">bigger letter-spacing</text> <text x="200" y="20" letter-spacing="-0.5">smaller letter-spacing</text> </svg> usage notes value normal | <length> default value normal ani...
lighting-color - SVG: Scalable Vector Graphics
two
elements are using this attribute: <fediffuselighting> and <fespecularlighting> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="diffuselighting1" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic" lighting-color="white"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <filter id="diffuselighting2" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic" lighting-color="blue"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting1...
marker-mid - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following seven
elements: <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, and <rect> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <defs> <marker id="circle" markerwidth="8" markerheight="8" refx="4" refy="4"> <circle cx="4" cy="4" r="4" stroke="none" fill="#f00"/> </marker> </defs> <polyline fill="none" stroke="black" point...
max - SVG: Scalable Vector Graphics
five
elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate attributename="cx" dur="4s" max="6s" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> <animate attributename="cy" dur="4s" max="6s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <clock-value> default value none animatable no <clock-value> specifies the...
min - SVG: Scalable Vector Graphics
five
elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate attributename="cx" dur="4s" min="2s" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> <animate attributename="cy" dur="4s" min="2s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <clock-value> default value 0 animatable no <clock-value> specifies the le...
name - SVG: Scalable Vector Graphics
two
elements are using this attribute: <color-profile> and <font-face-name> color-profile for <color-profile>, name defines the name of the color profile.
onclick - SVG: Scalable Vector Graphics
thirty-seven
elements are using this attribute: <a>, <altglyph>, <animate>, <animatemotion>, <animatetransform>, <circle>, <defs>, <desc>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <lineargradient>, <marker>, <metadata>, <mpath>, <path>, <pattern>, <polygon>, <polyline>, <radialgradient>, <rect>, <script>, <set>, <stop>, <style>, <svg>, <switch>, <symbol>, <text>, <textpath>, <title>, <tref>, <tspan>, <use>, <view> html, body, svg { height: 100%; margin: 0; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <circle cx="100" cy="100" r="100" onclick="alert('you have clicked the circle.')" /> </svg> usage notes value <anything> default value none ...
opacity - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following
elements: <a>, <audio>, <canvas>, <circle>, <ellipse>, <foreignobject>, <g>, <iframe>, <image>, <line>, <marker>, <path>, <polygon>, <polyline>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, <use>, <unknown>, and <video> html, body, svg { height: 100%; } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="gradient" x1="0%" y1="0%" x2="0" y2="1...
operator - SVG: Scalable Vector Graphics
two
elements are using this attribute: <fecomposite> and <femorphology> html, body, svg { height: 100%; font: 20px arial, helvetica, sans-serif; } <svg viewbox="0 0 120 70" xmlns="http://www.w3.org/2000/svg"> <filter id="erode"> <femorphology operator="erode" radius="0.4"/> </filter> <filter id="dilate"> <femorphology operator="dilate" radius="0.8"/> </filter> <text x="0" y="15">normal text</text> <text x="0" y="40" filter="url(#erode)">thin text</text> <text x="0" y="65" filter="url(#dilate)">fat text</text> </svg> fecomposite for <fecomposite>, operator defines the compositing operation that is to be performed.
paint-order - SVG: Scalable Vector Graphics
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.
path - SVG: Scalable Vector Graphics
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.
pathLength - SVG: Scalable Vector Graphics
seven
elements are using this attribute: <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, and <rect> html,body,svg { height:100% } <svg viewbox="0 0 100 60" xmlns="http://www.w3.org/2000/svg"> <style> path { fill: none; stroke: black; stroke-width: 2; stroke-dasharray: 10; } </style> <!-- no pathlength, the real length of the path is used.
pointer-events - SVG: Scalable Vector Graphics
#ffffff const color = math.round(math.random() * 0xffffff) // let's format the color to fit css requirements const fill = '#' + color.tostring(16).padstart(6,'0') // let's apply our color in the // element we actually clicked on e.target.style.fill = fill }) as a presentation attribute, it can be applied to any element but it is mostly relevant only on the following twenty-three
elements: <a>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <marker>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, <use> usage notes value bounding-box | visiblepainted | visiblefill | visiblestroke | visible | painted | fill | stroke | all | none default value visiblepainted ...
stroke-dasharray - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element, but it only has effect on the following twelve
elements: <altglyph> <circle> <ellipse> <path> <line> <polygon> <polyline> <rect> <text> <textpath> <tref> <tspan> html,body,svg { height:100% } <svg viewbox="0 0 30 10" xmlns="http://www.w3.org/2000/svg"> <!-- no dashes nor gaps --> <line x1="0" y1="1" x2="30" y2="1" stroke="black" /> <!-- dashes and gaps of the same size --> <line x1="0" y1="3" x2="30" y2="3" stroke="black" stroke-dasharray="4" /> <!-- dashes and gaps of ...
stroke-dashoffset - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following twelve
elements: <altglyph>, <circle>, <ellipse>, <path>, <line>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="-3 0 33 10" xmlns="http://www.w3.org/2000/svg"> <!-- no dash array --> <line x1="0" y1="1" x2="30" y2="1" stroke="black" /> <!-- no dash offset --> <line x1="0" y1="3" x2="30" y2="3" stroke="black" stroke-dasharray="3 1" /> <!-- the start of the dash array computation is pulled by ...
stroke-linecap - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following eight
elements: <altglyph>, <path>, <polyline>, <line>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 6 6" xmlns="http://www.w3.org/2000/svg"> <!-- effect of the (default) "butt" value --> <line x1="1" y1="1" x2="5" y2="1" stroke="black" stroke-linecap="butt" /> <!-- effect of the "round" value --> <line x1="1" y1="3" x2="5" y2="3" stroke="black" stroke-linecap="round" /> <!-- effect of the "square" valu...
stroke-linejoin - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following nine
elements: <altglyph>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 18 12" xmlns="http://www.w3.org/2000/svg"> <!-- upper left path: effect of the "miter" value --> <path d="m1,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3.5" stroke="black" fill="none" stroke-linejoin="miter" /> <!-- center path: effect of the "round" value --> <path d="m7,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3.5"...
stroke-miterlimit - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following nine
elements: <altglyph>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 38 30" xmlns="http://www.w3.org/2000/svg"> <!-- impact of the default miter limit --> <path stroke="black" fill="none" stroke-linejoin="miter" id="p1" d="m1,9 l7 ,-3 l7 ,3 m2,0 l3.5 ,-3 l3.5 ,3 m2,0 l2 ,-3 l2 ,3 ...
stroke-opacity - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following twelve
elements: <altglyph>, <circle>, <ellipse>, <path>, <line>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 40 10" xmlns="http://www.w3.org/2000/svg"> <!-- default stroke opacity: 1 --> <circle cx="5" cy="5" r="4" stroke="green" /> <!-- stroke opacity as a number --> <circle cx="15" cy="5" r="4" stroke="green" stroke-opacity="0.7" /> <!-- stroke opacity...
stroke-width - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it only has effect on shapes and text context
elements, including: <altglyph>, <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 30 10" xmlns="http://www.w3.org/2000/svg"> <!-- default stroke width: 1 --> <circle cx="5" cy="5" r="3" stroke="green" /> <!-- stroke width as a number --> <circle cx="15" cy="5" r="3" stroke="green" stroke-width="3" /> <!-- stroke width as a percentage --> <circle cx="25" cy="5" r="3" stroke="green" stroke-width="2%" /> </svg> usage notes ...
stroke - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following twelve
elements: <altglyph>, <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- simple color stroke --> <circle cx="5" cy="5" r="4" fill="none" stroke="green" /> <!-- stroke a circle with a gradient --> <defs> <lineargradient id="mygradient"> <stop offset="0%" stop-color="green"...
surfaceScale - SVG: Scalable Vector Graphics
two
elements are using this attribute: <fediffuselighting> and <fespecularlighting> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="diffuselighting1" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic" surfacescale="1"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <filter id="diffuselighting2" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic" surfacescale="15"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting1);" /> <rect ...
systemLanguage - SVG: Scalable Vector Graphics
35
elements are using this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <audio>, <canvas>, <circle>, <clippath>, <cursor>, <defs>, <discard>, <ellipse>, <foreignobject>, <g>, <iframe>, <image>, <line>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <set>, <svg>, <switch>, <text>, <textpath>, <tref>, <tspan>, <unknown>, <use>, and <video> usage notes value <language-tags> default value none animatable no <language-tags> the value is a set of comma-separated tokens, each of which must be a language-tag value, as defined in bcp 47.
tableValues - SVG: Scalable Vector Graphics
four
elements are using this attribute: <fefunca>, <fefuncb>, <fefuncg>, and <fefuncr> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="gradient" gradientunits="userspaceonuse" x1="0" y1="0" x2="200" y2="0"> <stop offset="0" stop-color="#ff0000" /> <stop offset="0.5" stop-color="#00ff00" /> <stop offset="1" stop-color="#0000ff" /> </lineargradient> </defs> <filter id="componenttransfer1" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="table" tablevalues="0 1"/> <fefuncg type="table" tablevalues="0 1"...
text-anchor - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following five
elements: <altglyph>, <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <!-- materialisation of anchors --> <path d="m60,15 l60,110 m30,40 l90,40 m30,75 l90,75 m30,110 l90,110" stroke="grey" /> <!-- anchors in action --> <text text-anchor="start" x="60" y="40">a</text> <text text-anchor="middle" x="60"...
text-decoration - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following five
elements: <altglyph>, <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 250 50" xmlns="http://www.w3.org/2000/svg"> <text y="20" text-decoration="underline">underlined text</text> <text x="0" y="40" text-decoration="line-through">struck-through text</text> </svg> usage notes value <'text-decoration-line'> || <'text-decoration-style'> ||...
to - SVG: Scalable Vector Graphics
five
elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="100" height="100"> <animate attributetype="xml" attributename="width" fill="freeze" from="100" to="150" dur="3s"/> </rect> </svg> animate, animatecolor, animatemotion, animatetransform for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>, to specifies the ending value of the animation.
transform - SVG: Scalable Vector Graphics
as a presentation attribute, transform can be used by any element (in svg 1.1, only these 16
elements were allowed to use it: <a>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <path>, <polygon>, <polyline>, <rect>, <switch>, <text>, and <use>).
unicode-bidi - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following eleven
elements: <altglyph>, <textpath>, <text>, <tref>, and <tspan> context notes value normal | embed | isolate | bidi-override | isolate-override | plaintext default value normal animatable no for a description of the values, please refer to the css unicode-bidi property.
values - SVG: Scalable Vector Graphics
five
elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <fecolormatrix> animate, animatecolor, animatemotion, animatetransform for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>, values is a list of values defining the sequence of values over the course of the animation.
vector-effect - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following ten
elements: <circle>, <ellipse>, <foreignobject>, <image>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath> <tspan>, and <use> usage notes value none | non-scaling-stroke | non-scaling-size | non-rotation | fixed-position default value none animatable yes none this value specifies that no vector effect shall be applied, i.e.
word-spacing - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following five
elements: <altglyph>, <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 250 50" xmlns="http://www.w3.org/2000/svg"> <text y="20" word-spacing="2">bigger spacing between words</text> <text x="0" y="40" word-spacing="-0.5">smaller spacing between words</text> </svg> usage notes value normal | <length> animatable yes d...
xlink:arcrole - SVG: Scalable Vector Graphics
for example, a resource might generically represent a "person," but in the context of a particular arc it might have the role of "mother" and in the context 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 <ir...
xlink:title - SVG: Scalable Vector Graphics
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 context value <anything> default value none animatable no ...
xlink:type - SVG: Scalable Vector Graphics
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>, and <use> usage notes value simple default value simple animatable no simple this value specifies that the referred resource is a simple link.
z - SVG: Scalable Vector Graphics
two
elements are using this attribute: <fepointlight> and <fespotlight> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="diffuselighting1" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic"> <fepointlight x="60" y="60" z="10" /> </fediffuselighting> </filter> <filter id="diffuselighting2" x="0" y="0" width="100%" height="100%"> <...
zoomAndPan - SVG: Scalable Vector Graphics
two
elements are using this attribute: <svg> and <view> html, body, svg { height: 100%; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" zoomandpan="disable"> <filter id="diffuselighting" x="0" y="0" width="100%" height="100%"> <fediffuselighting in="sourcegraphic" zoomandpan="1"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style...
Compatibility sources - SVG: Scalable Vector Graphics
the following sources are used for the compatibility tables on svg
elements and attributes: https://developer.mozilla.org/en/svg_in_firefox together with its revision history for firefox http://www.webkit.org/projects/svg/status.xml together with its recorded archive for webkit, safari and chrome http://www.opera.com/docs/specs/opera9/svg/ and accompanying pages for opera >= 9, http://www.opera.com/docs/specs/opera8/ for opera 8 http://blogs.msdn.com/b/ie/archive/2010/03/18/svg-in-ie9-roadmap.aspx for hints on ie9 support status the svg support charts at codedread.com for basic checks against the w3c test suite wikipedia for basic hints, not normative ...
<altGlyph> - SVG: Scalable Vector Graphics
usage context categoriestext 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.
<altGlyphDef> - SVG: Scalable Vector Graphics
usage context categoriestext content elementpermitted contenteither: one or more <glyphref>
elements, or one or more <altglyphitem>
elements attributes global attributes core attributes specific attributes none dom interface this element implements the svgaltglyphdefelement interface.
<altGlyphItem> - SVG: Scalable Vector Graphics
usage context categoriestext content elementpermitted contentone or more <glyphref>
elements example attributes global attributes core attributes specific attributes none dom interface this element implements the svgaltglyphitemelement interface.
<animateColor> - SVG: Scalable Vector Graphics
usage context categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following
elements, in any order:descriptive
elements attributes global attributes conditional processing attributes core attributes animation event attributes xlink attributes animation attribute target attributes animation timing attributes animation value attributes animation addition attributes externalresourcesrequired specific attributes by from to dom interface this element implements ...
<animateMotion> - SVG: Scalable Vector Graphics
mlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="lightgrey" d="m20,50 c20,-50 180,150 180,50 c180-50 20,150 20,50 z" /> <circle r="5" fill="red"> <animatemotion dur="10s" repeatcount="indefinite" path="m20,50 c20,-50 180,150 180,50 c180-50 20,150 20,50 z" /> </circle> </svg> usage context categoriesanimation elementpermitted contentany number of the following
elements, in any order:descriptive
elements<mpath> attributes keypoints this attribute indicate, in the range [0,1], how far is the object along the path for each keytimes associated values.
<animateTransform> - SVG: Scalable Vector Graphics
usage context categoriesanimation elementpermitted contentany number of the following
elements, in any order:descriptive
elements example <svg width="120" height="120" viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <polygon points="60,30 90,90 30,90"> <animatetransform attributename="transform" attributetype="xml" type="rotate" from="0 60 70" to="360 60 70" dur="10s" repeatcount="indefinite"/> </polygon> </svg> live sample attribut...
<circle> - SVG: Scalable Vector Graphics
n, 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-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following
elements, in any order:animation
elementsdescriptive
elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<circle>' in that specification.
<clipPath> - SVG: Scalable Vector Graphics
stemlanguage presentation attributes most notably: clip-path, clip-rule, color, display, fill, fill-opacity, fill-rule, filter, mask, opacity, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriesnonepermitted contentany number of the following
elements, in any order:animation
elementsdescriptive
elementsshape
elements<text>, <use> specifications specification status comment css masking module level 1the definition of '<clippath>' in that specification.
<color-profile> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany number of the following
elements, in any order:descriptive
elements attributes global attributes core attributes » xlink attributes » specific attributes local name rendering-intent xlink:href dom interface this element implements the svgcolorprofileelement interface.
<cursor> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany number of the following
elements, in any order:descriptive
elements attributes global attributes conditional processing attributes core attributes xlink attributes externalresourcesrequired specific attributes x y xlink:href dom interface this element implements the svgcursorelement interface.
<defs> - SVG: Scalable Vector Graphics
lation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility 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>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2th...
<ellipse> - SVG: Scalable Vector Graphics
n, 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-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following
elements, in any order:animation
elementsdescriptive
elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<ellipse>' in that specification.
<feBlend> - SVG: Scalable Vector Graphics
usage context 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 mode dom interface this element implements the svgfeblendelement interface.
<marker> - SVG: Scalable Vector Graphics
ia-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-valuetext, role usage notes categoriescontainer 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> specifications specification status comment svg markersthe definition of '<mar...
<mask> - SVG: Scalable Vector Graphics
presentation attributes most notably: clip-path, clip-rule, color, display, fill, fill-opacity, fill-rule, filter, mask, opacity, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriescontainer 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> specifications specification status comment css masking module level 1the defi...
<missing-glyph> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted 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 dom interface this element implements the svgmissingglyphelement interface.
<mpath> - SVG: Scalable Vector Graphics
usage context categoriesanimation elementpermitted contentany number of the following
elements, in any order:descriptive
elements attributes global attributes core attributes » xlink attributes » externalresourcesrequired specific attributes xlink:href dom interface this element implements the svgmpathelement interface.
<path> - SVG: Scalable Vector Graphics
able, 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-valuetext, role usage notes categoriesgraphics element, shape elementpermitted contentany number of the following
elements, in any order:animation
elementsdescriptive
elements specifications specification status comment svg pathsthe definition of '<path>' in that specification.
<polygon> - SVG: Scalable Vector Graphics
n, 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-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following
elements, in any order:animation
elementsdescriptive
elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polygon>' in that specification.
<polyline> - SVG: Scalable Vector Graphics
n, 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-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following
elements, in any order:animation
elementsdescriptive
elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polyline>' in that specification.
<rect> - SVG: Scalable Vector Graphics
n, 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-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following
elements, in any order:animation
elementsdescriptive
elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<rect>' in that specification.
<script> - SVG: Scalable Vector Graphics
value type: <url> ; default value: none; animatable: no global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesnonepermitted contentany
elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<script>' in that specification.
<set> - SVG: Scalable Vector Graphics
t, repeatdur, fill other animation attributes most notably: attributename animation event attributes most notably: onbegin, onend, onrepeat global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesanimation elementpermitted contentany number of the following
elements, in any order:descriptive
elements specifications specification status comment svg animations level 2the definition of '<set>' in that specification.
<stop> - SVG: Scalable Vector Graphics
type: <opacity>; default value: 1; animatable: yes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes presentation attributes most notably: color, display, stop-color, stop-opacity, visibility usage notes categoriesgradient elementpermitted contentany number of the following
elements, in any order:<animate>, <animatecolor>, <set> specifications specification status comment scalable vector graphics (svg) 2the definition of '<stop>' in that specification.
<style> - SVG: Scalable Vector Graphics
value type: <string>; default value: none; animatable: no global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesnonepermitted contentany
elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<style>' in that specification.
<text> - SVG: Scalable Vector Graphics
ia-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-valuetext, role usage notes categoriesgraphics element, text content elementpermitted contentcharacter data and any number of the following
elements, in any order:animation
elementsdescriptive
elementstext content
elements<a> specifications specification status comment scalable vector graphics (svg) 2the definition of '<text>' in that specification.
<textPath> - SVG: Scalable Vector Graphics
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-valuetext, role xlink attributes xlink:title usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following
elements, in any order:descriptive
elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification status comment scalable vector graphics (svg) 2the definition of '<textpath>' in that specification.
<tref> - SVG: Scalable Vector Graphics
usage context categoriestext 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.