Search completed in 1.46 seconds.
:nth-child() - CSS: Cascading Style Sheets
Element indices are 1-based. 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. ...
...Element indices are 1-based. 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. ...
...Element indices are 1-based. 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 14 more matches
:nth-last-child() - CSS: Cascading Style Sheets
Keyword values odd Represents elements whose numeric position in a series of siblings is odd: 1, 3, 5, etc., 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. ...
... Keyword values odd Represents elements whose numeric position in a series of siblings is odd: 1, 3, 5, etc., counting from the end. ...
...And 12 more matches
Node.childNodes - Web APIs
The Node.
childNodes read-only property returns a live NodeList of
child nodes of the given element where the first
child node is assigned index 0. ...
... The Node.
childNodes read-only property returns a live NodeList of
child nodes of the given element where the first
child node is assigned index 0. ...
... The Node.
childNodes read-only property returns a live NodeList of
child nodes of the given element where the first
child node is assigned index 0. ...
...And 10 more matches
ChildNode.after() - Web APIs
The
ChildNode.after() method inserts a set of Node or DOMString objects in the
children list of this
ChildNode's parent, just after this
ChildNode. DOMString objects are inserted as equivalent Text nodes. Syntax [Throws, Unscopable] void
ChildNode.after((Node or DOMString)... nodes); Parameters nodes A set of Node or DOMString objects to insert. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
...Node. DOMString objects are inserted as equivalent Text nodes. Syntax [Throws, Unscopable] void
ChildNode.after((Node or DOMString)... nodes); Parameters nodes A set of Node or DOMString objects to insert. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
... Text nodes. Syntax [Throws, Unscopable] void
ChildNode.after((Node or DOMString)... nodes); Parameters nodes A set of Node or DOMString objects to insert. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
...And 9 more matches
Node.removeChild() - Web APIs
The Node.remove
Child() method removes a
child node from the DOM and returns the removed node. Syntax var old
Child = node.remove
Child(
child); OR node.remove
Child(
child);
child is the
child node to be removed from the DOM. node is the parent node of
child. old
Child holds a reference to the removed
child node, i.e., old
Child ===
child. The removed
child node still exists in memory, but is no longer part of the DOM. With the first syntax form shown, you may reuse the removed node later in your code, via the old
Child object reference. ...
... If
child is actually not a
child of the element node, the method throws an exception. ...
...the first syntax form shown, you may reuse the removed node later in your code, via the old
Child object reference. In the second syntax form, however, there is no old
Child reference kept, so assuming your code has not kept any other reference to the node elsewhere, it will immediately become unusable and irretrievable, and will usually be automatically deleted from memory after a short time. ...
...And 9 more matches
ChildNode.before() - Web APIs
The
ChildNode.before() method inserts a set of Node or DOMString objects in the
children list of this
ChildNode's parent, just before this
ChildNode. DOMString objects are inserted as equivalent Text nodes. Syntax [Throws, Unscopable] void
ChildNode.before((Node or DOMString)... nodes); Parameters nodes A set of Node or DOMString objects to insert. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
...ode. DOMString objects are inserted as equivalent Text nodes. Syntax [Throws, Unscopable] void
ChildNode.before((Node or DOMString)... nodes); Parameters nodes A set of Node or DOMString objects to insert. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
...Text nodes. Syntax [Throws, Unscopable] void
ChildNode.before((Node or DOMString)... nodes); Parameters nodes A set of Node or DOMString objects to insert. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
...And 8 more matches
system/child_process - Archive of obsolete content
Experimental An implementation of the node.js
child_process API. This module enables you to execute a
child program in a new process. Since it emulates the node.js
child_process API, it's not documented separately here. However, there are a few differences to be aware of: you need to require() the module using require("sdk/system/
child_process") fork() is not supported gid and uid are not supported in node.js, spawn() and exec() inherit the environment variables from the parent process, by default. The SDK versions don't: so when you specify a command you must pass in a complete path to the command or use the env option to set up the
child process environment. ...
...you need to require() the module using require("sdk/system/
child_process") fork() is not supported gid and uid are not supported in node.js, spawn() and exec() inherit the environment variables from the parent process, by default. The SDK versions don't: so when you specify a command you must pass in a complete path to the command or use the env option to set up the
child process environment. ...
...cess") fork() is not supported gid and uid are not supported in node.js, spawn() and exec() inherit the environment variables from the parent process, by default. The SDK versions don't: so when you specify a command you must pass in a complete path to the command or use the env option to set up the
child process environment. ...
...And 7 more matches
ParentNode.childElementCount - Web APIs
node An object representing a Document, DocumentFragment, or Element. ...
... node An object representing a Document, DocumentFragment, or Element. ...
... node An object representing a Document, DocumentFragment, or Element. ...
...And 6 more matches
:only-child - CSS: Cascading Style Sheets
The :only-
child CSS pseudo-class represents an element without any siblings. This is the same as :first-
child:last-
child or :nth-
child(1):nth-last-
child(1), but with a lower specificity. /* Selects each <p>, but only if it is the */ /* only
child of its parent */ p:only-
child { background-color: lime; } Note: As originally defined, the selected element had to have a parent. Beginning with Selectors Level 4, this is no longer required. ...
...ut any siblings. This is the same as :first-
child:last-
child or :nth-
child(1):nth-last-
child(1), but with a lower specificity. /* Selects each <p>, but only if it is the */ /* only
child of its parent */ p:only-
child { background-color: lime; } Note: As originally defined, the selected element had to have a parent. Beginning with Selectors Level 4, this is no longer required. ...
...nth-
child(1):nth-last-
child(1), but with a lower specificity. /* Selects each <p>, but only if it is the */ /* only
child of its parent */ p:only-
child { background-color: lime; } Note: As originally defined, the selected element had to have a parent. Beginning with Selectors Level 4, this is no longer required. ...
...And 5 more matches
ParentNode.firstElementChild - Web APIs
The ParentNode.firstElement
Child read-only property returns the object's first
child Element, or null if there are no
child elements. This property was initially defined in the ElementTraversal pure interface. As this interface contained two distinct set of properties, one aimed at Node that have
children, one at those that are
children, they have been moved into two separate pure interfaces, ParentNode and
ChildNode. In this case, firstElement
Child moved to ParentNode. This is a fairly technical change that shouldn't affect compatibility. ...
...versal pure interface. As this interface contained two distinct set of properties, one aimed at Node that have
children, one at those that are
children, they have been moved into two separate pure interfaces, ParentNode and
ChildNode. In this case, firstElement
Child moved to ParentNode. This is a fairly technical change that shouldn't affect compatibility. Syntax var element = node.firstElement
Child; Example <ul id="foo"> <li>First (1)</li> <li>Second (2)</li> <li>Third (3)</li> </ul> <script> var foo = document.getElementById('foo'); // yields: First (1) console.log(foo.firstElement
Child.textContent); </script> Polyfill for IE8, IE9 and Safari // Overwrites native 'firstElement
Child' prototype. // Adds Document & DocumentFragment support for IE9 & Safari. ;(function(construc...
...pt> var foo = document.getElementById('foo'); // yields: First (1) console.log(foo.firstElement
Child.textContent); </script> Polyfill for IE8, IE9 and Safari // Overwrites native 'firstElement
Child' prototype. // Adds Document & DocumentFragment support for IE9 & Safari. ...
...And 4 more matches
ParentNode.lastElementChild - Web APIs
The ParentNode.lastElement
Child read-only property returns the object's last
child Element or null if there are no
child elements. Note: This property was initially defined in the ElementTraversal pure interface. As this interface contained two distinct set of properties, one aimed at Node that have
children, one at those that are
children, they have been moved into two separate pure interfaces, ParentNode and
ChildNode. In this case, lastElement
Child moved to ParentNode. This is a fairly technical change that shouldn't affect compatibility. ...
...versal pure interface. As this interface contained two distinct set of properties, one aimed at Node that have
children, one at those that are
children, they have been moved into two separate pure interfaces, ParentNode and
ChildNode. In this case, lastElement
Child moved to ParentNode. This is a fairly technical change that shouldn't affect compatibility. ...
...separate pure interfaces, ParentNode and
ChildNode. In this case, lastElement
Child moved to ParentNode. This is a fairly technical change that shouldn't affect compatibility. Syntax const element = node.lastElement
Child Example <ul id="foo"> <li>First (1)</li> <li>Second (2)</li> <li>Third (3)</li> </ul> <script> const foo = document.getElementById('foo'); console.log(foo.lastElement
Child.textContent); // logs: Third (3) </script> Polyfill The code below adds support of lastElement
Child() to Document and DocumentFragment in Internet Explorer and Safari. // Overwrites native 'lastElement
Child' prototype. // Returns array instead of HTMLCollection. ...
...And 4 more matches
Accessing XML children - Archive of obsolete content
<< PreviousNext >> Accessing XML
Children Warning: E4X is deprecated. It will be disabled by default for content in Firefox 16, disabled by default for chrome in Firefox 17, and removed in Firefox 18. Use DOMParser/DOMSerializer or a non-native JXON algorithm instead. Normal JavaScript Objects use the . operator or [] notation to set properties. var a = {}; a.foo = 1; a["bar"] = 2; In E4X, the . and [] operators provide access to the
child nodes of an E4X element. var element1 = <foo> <bar/> </foo>; var element2 = <baz/>; element1.bar.append
Child(element2); element1["bar"].append
Child(<quux/>); adds a
child to the "bar"
child node of element1. This gives an XML document of <foo> <bar> <baz/> <quux/> </bar> </foo> Note, however, that...
...ide access to the
child nodes of an E4X element. var element1 = <foo> <bar/> </foo>; var element2 = <baz/>; element1.bar.append
Child(element2); element1["bar"].append
Child(<quux/>); adds a
child to the "bar"
child node of element1. This gives an XML document of <foo> <bar> <baz/> <quux/> </bar> </foo> Note, however, that assigning a non-XML value to a
child element that doesn't exist will create that element. var element1 = <foo/> element1.bar = 1; produces <foo> <bar>1</bar> </foo> If the
child node already exists, the . operator allows you to change its value. var elem = <foo> <bar>1</bar> </foo> elem.bar = 2; will replace the previous value of 1 with 2. ...
...wever, that assigning a non-XML value to a
child element that doesn't exist will create that element. var element1 = <foo/> element1.bar = 1; produces <foo> <bar>1</bar> </foo> If the
child node already exists, the . operator allows you to change its value. var elem = <foo> <bar>1</bar> </foo> elem.bar = 2; will replace the previous value of 1 with 2. You can remove a
child node by using the delete command: var elem = <foo> <bar/> <baz/> </foo> delete elem.bar; leaves just <foo> <baz/> </foo> The . ...
...And 3 more matches
ChildCount
<< nsIAccessible Page Summary Number of accessible
children. ...
... << nsIAccessible Page Summary Number of accessible
children. ...
... << nsIAccessible Page Summary Number of accessible
children. ...
...And 3 more matches
MutationObserverInit.childList - Web APIs
If subtree is false, only the node indicated by the observer's target node is monitored for changes. ...
...If subtree is false, only the node indicated by the observer's target node is monitored for changes. ...
...If subtree is false, only the node indicated by the observer's target node is monitored for changes. ...
...And 3 more matches
Node.hasChildNodes() - Web APIs
The Node.has
ChildNodes() method returns a Boolean value indicating whether the given Node has
child nodes or not. Syntax bool = node.has
ChildNodes(); Return value A Boolean that is true if the node has
child nodes, and false otherwise. ...
... The Node.has
ChildNodes() method returns a Boolean value indicating whether the given Node has
child nodes or not. Syntax bool = node.has
ChildNodes(); Return value A Boolean that is true if the node has
child nodes, and false otherwise. ...
... The Node.has
ChildNodes() method returns a Boolean value indicating whether the given Node has
child nodes or not. Syntax bool = node.has
ChildNodes(); Return value A Boolean that is true if the node has
child nodes, and false otherwise. ...
...And 3 more matches
NonDocumentTypeChildNode.nextElementSibling - Web APIs
The NonDocumentType
ChildNode.nextElementSibling 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.nextElementSibling; 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').nextElementSibling; console.log('Siblings of div-01:'); while (el) { console.log(el.nodeName); el = el.nextElementSibling; } </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 c...
... (el) { console.log(el.nodeName); el = el.nextElementSibling; } </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(!("nextElementSibling" in document.documentElement)){ Object.defineProperty(Element.prototype, "nextElementSibling", { 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/jse...
...ocument.documentElement)){ Object.defineProperty(Element.prototype, "nextElementSibling", { 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/NonDocumentType
ChildNode/nextElementSibling/nextElementSibling.md (function (arr) { arr.forEach(function (item) { if (item.hasOwnProperty('nextElementSibling')) { return; } Object.defineProperty(item, 'nextElementSibling', { configurable: true, enumerable: true, get: function () { var el = this; while (el = el.nextSibling) { if (el.nodeType === 1) { ...
...And 3 more matches
NonDocumentTypeChildNode.previousElementSibling - Web APIs
The NonDocumentType
ChildNode.previousElementSibling 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.previousElementSibling; 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').previousElementSibling; document.write('<p>Siblings of div-03</p><ol>'); while (el) { document.write('<li>' + el.nodeName + '</li>'); el = el.previousElementSibling; } document.write('</ol>'); </script> This example outputs the following into the page w...
...bling; } document.write('</ol>'); </script> This example outputs the following into the page when it loads: Siblings of div-03 1. LI 2. LI 3. DIV 4. ...
...eviousElementSibling" in document.documentElement)){ Object.defineProperty(Element.prototype, "previousElementSibling", { 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/NonDocumentType
ChildNode/previousElementSibling/previousElementSibling.md (function (arr) { arr.forEach(function (item) { if (item.hasOwnProperty('previousElementSibling')) { return; } Object.defineProperty(item, 'previousElementSibling', { configurable: true, enumerable: true, get: function () { let el = this; while (el = el.previousSibling) { if (el.no...
...And 3 more matches
Children
<< nsIAccessible Page Summary Array of all this node's
children. attribute nsIArray
children; Remark Every
child node in the array implements nsIAccessible interface. Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. ...
... << nsIAccessible Page Summary Array of all this node's
children. attribute nsIArray
children; Remark Every
child node in the array implements nsIAccessible interface. ...
... << nsIAccessible Page Summary Array of all this node's
children. attribute nsIArray
children; Remark Every
child node in the array implements nsIAccessible interface. ...
...And 2 more matches
FirstChild
<< nsIAccessible Page Summary Returns first
child node in accessible tree. attribute nsIAccessible first
Child; Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. ...
... << nsIAccessible Page Summary Returns first
child node in accessible tree. attribute nsIAccessible first
Child; Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. ...
... << nsIAccessible Page Summary Returns first
child node in accessible tree. attribute nsIAccessible first
Child; Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. ...
...And 2 more matches
GetChildAt
<< nsIAccessible Page Summary This method returns Nth accessible
child using zero-based index. nsIAccessible get
ChildAt( in long a
ChildIndex ); Parameters a
ChildIndex[in] The index of the Nth
child. Return value Returns Nth accessible
child using zero-based index. If
child index is less than zero then returns last
child. If
child index is greater than
children count then returns null. Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. ...
...ng a
ChildIndex ); Parameters a
ChildIndex[in] The index of the Nth
child. Return value Returns Nth accessible
child using zero-based index. If
child index is less than zero then returns last
child. If
child index is greater than
children count then returns null. Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. ...
...meters a
ChildIndex[in] The index of the Nth
child. Return value Returns Nth accessible
child using zero-based index. If
child index is less than zero then returns last
child. If
child index is greater than
children count then returns null. Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. ...
...And 2 more matches
LastChild
<< nsIAccessible Page Summary Returns last
child node in accessible tree. attribute nsIAccessible last
Child; Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. ...
... << nsIAccessible Page Summary Returns last
child node in accessible tree. attribute nsIAccessible last
Child; Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. ...
... << nsIAccessible Page Summary Returns last
child node in accessible tree. attribute nsIAccessible last
Child; Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. ...
...And 2 more matches
ChildNode.replaceWith() - Web APIs
The
ChildNode.replaceWith() method replaces this
ChildNode in the
children list of its parent with a set of Node or DOMString objects. DOMString objects are inserted as equivalent Text nodes. Syntax [Throws, Unscopable] void
ChildNode.replaceWith((Node or DOMString)... nodes); Parameters nodes A set of Node or DOMString objects to replace. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
...DOMString objects are inserted as equivalent Text nodes. Syntax [Throws, Unscopable] void
ChildNode.replaceWith((Node or DOMString)... nodes); Parameters nodes A set of Node or DOMString objects to replace. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. Examples Using replaceWith() var parent = document.createElement("div"); var
child = document.createElement("p"); parent.append
Child(
child); var span = document.createElement("span");
child.replaceWith(span); console.log(parent.outerHTML); // "<div><span></span></div>"
ChildNode.replaceWith() is unscopable The replaceWith() method is not scoped into the with statement. See Symbol.unscopables for more information. with(node) { replaceWith("foo"); } // ReferenceError: rep...
...eWith("foo"); } // ReferenceError: replaceWith is not defined Polyfill You can polyfill the replaceWith() method in Internet Explorer 10+ and higher with the following code: function ReplaceWithPolyfill() { 'use-strict'; // For safari, and IE > 10 var parent = this.parentNode, i = arguments.length, currentNode; if (!parent) return; if (!i) // if there are no arguments parent.remove
Child(this); while (i--) { // i-- decrements i and returns the value of i before the decrement currentNode = arguments[i]; if (typeof currentNode !== 'object'){ currentNode = this.ownerDocument.createTextNode(currentNode); } else if (currentNode.parentNode){ currentNode.parentNode.remove
Child(currentNode); } // the value of "i" below is after the decrement if (!i) ...
...And 2 more matches
Node.appendChild() - Web APIs
This means that a node can't be in two points of the document simultaneously. So if the node already has a parent, the node is first removed, then appended at the new position. The Node.cloneNode() method can be used to make a copy of the node before appending it under the new parent. Note that the copies made with cloneNode will not be automatically kept in sync. ...
...some other node). This means that a node can't be in two points of the document simultaneously. So if the node already has a parent, the node is first removed, then appended at the new position. The Node.cloneNode() method can be used to make a copy of the node before appending it under the new parent. Note that the copies made with cloneNode will not be automatically kept in sync. If the given
child is a DocumentFragment, the entire contents of the DocumentFragment are moved into the
child list of the specified parent node. Newer API avaliable! The ParentNode.append() method supports multiple arguments and appending strings. Syntax element.append
Child(a
Child) Parameters a
Child The node to append to the given parent node (commonly an element). Return value The returned value is t...
...ntFragment, the entire contents of the DocumentFragment are moved into the
child list of the specified parent node. Newer API avaliable! The ParentNode.append() method supports multiple arguments and appending strings. Syntax element.append
Child(a
Child) Parameters a
Child The node to append to the given parent node (commonly an element). Return value The returned value is the appended
child (a
Child), except when a
Child is a DocumentFragment, in which case the empty DocumentFragment is returned. Notes Chaining may not work as expected, due to append
Child() returning the
child element: let aBlock = document.createElement('block').append
Child( document.createElement('b') ); Sets aBlock to <b></b> only, which is probably not what you want. Example // Create a new paragraph element...
...And 2 more matches
ParentNode.replaceChildren() - Web APIs
The ParentNode.replace
Children() method replaces the existing
children of a Node with a specified new set of
children. These can be DOMString or Node objects. Syntax // [Throws, Unscopable] ParentNode.replace
Children(...nodesOrDOMStrings) // returns undefined Parameters nodesOrDOMStrings A set of Node or DOMString objects to replace the ParentNode's existing
children with. If no replacement objects are specified, then the ParentNode is emptied of all
child nodes. Exceptions HierarchyRequestError: The constraints of the node tree are violated. Examples Emptying a node replace
Children() provides a very convenient mechanism for emptying a node of all its
children. ...
...ldren with. If no replacement objects are specified, then the ParentNode is emptied of all
child nodes. Exceptions HierarchyRequestError: The constraints of the node tree are violated. Examples Emptying a node replace
Children() provides a very convenient mechanism for emptying a node of all its
children. You simply call it on the parent node without any argument specified: myNode.replace
Children(); Transferring nodes between parents replace
Children() enables you to easily transfer nodes between parents, without having to resort to verbose looping code. For example, say we have a simple application allowing you to choose what food you want for your party. This HTML might look something like this: <h2>Party food option list</h2> <main> <div> <label for="no">No thanks!</label> ...
...es" list when the "yes" button is pressed, and transfer any selected options in the "yes" list over to the "no" list when the "no" button is pressed. To do this, we give each of the buttons a click event handler, which collects together the selected options you want to transfer in one constant, and the existing options in the list you are transferring to in another constant. It then calls replace
Children() on the list to transfer the options to, using the spread operator to pass in all the options contained in both constants. const noSelect = document.getElementById('no'); const yesSelect = document.getElementById('yes'); const noBtn = document.getElementById('to-no'); const yesBtn = document.getElementById('to-yes'); yesBtn.addEventListener('click', () => { const selectedTransferOptions =...
...And 2 more matches
:first-child - CSS: Cascading Style Sheets
The :first-
child CSS pseudo-class represents the first element among a group of sibling elements. /* Selects any <p> that is the first element among its siblings */ p:first-
child { color: lime; } Note: As originally defined, the selected element had to have a parent. Beginning with Selectors Level 4, this is no longer required. ...
... The :first-
child CSS pseudo-class represents the first element among a group of sibling elements. /* Selects any <p> that is the first element among its siblings */ p:first-
child { color: lime; } Note: As originally defined, the selected element had to have a parent. Beginning with Selectors Level 4, this is no longer required. ...
...r: lime; } Note: As originally defined, the selected element had to have a parent. Beginning with Selectors Level 4, this is no longer required. ...
...And 2 more matches
ChildNode.remove() - Web APIs
The
ChildNode.remove() method removes the object from the tree it belongs to. Syntax node.remove(); Example Using remove() <div id="div-01">Here is div-01</div> <div id="div-02">Here is div-02</div> <div id="div-03">Here is div-03</div> var el = document.getElementById('div-02'); el.remove(); // Removes the div with the 'div-02' id
ChildNode.remove() is unscopable The remove() method is not scoped into the with statement. See Symbol.unscopables for more information. ...
...iv with the 'div-02' id
ChildNode.remove() is unscopable The remove() method is not scoped into the with statement. See Symbol.unscopables for more information. ...
... Living Standard Initial definition. ...
... Living Standard Initial definition. ...
Node.firstChild - Web APIs
The Node.first
Child read-only property returns the node's first
child in the tree, or null if the node has no
children. If the node is a Document, it returns the first node in the list of its direct
children. Syntax var
childNode = node.first
Child; Example This example demonstrates the use of first
Child and how whitespace nodes might interfere with using this property. <p id="para-01"> <span>First span</span> </p> <script> var p01 = document.getElementById('para-01'); console.log(p01.first
Child.nodeName); </script> In the above, the console will show '#text' because a text node is inserted to maintain the whitespace between the end of the opening <p> and <span> tags. Any whitespace will create a #text node, from a single space to multiple spaces, returns, tabs, and so on. Anothe...
...nserted to maintain the whitespace between the end of the opening <p> and <span> tags. Any whitespace will create a #text node, from a single space to multiple spaces, returns, tabs, and so on. Another #text node is inserted between the closing </span> and </p>tags. If this whitespace is removed from the source, the #text nodes are not inserted and the span element becomes the paragraph's first
child. <p id="para-01"><span>First span</span></p> <script> var p01 = document.getElementById('para-01'); console.log(p01.first
Child.nodeName); </script> Now the console will show 'SPAN'. To avoid the issue with node.first
Child returning #text or #comment nodes, ParentNode.firstElement
Child can be used to return only the first element node. However, node.firstElement
Child requires a shim for I...
...Name); </script> Now the console will show 'SPAN'. To avoid the issue with node.first
Child returning #text or #comment nodes, ParentNode.firstElement
Child can be used to return only the first element node. However, node.firstElement
Child requires a shim for Internet Explorer 9 and earlier. Specifications Specification Status Comment DOMThe definition of 'Node.first
Child' in that specification. Living Standard No change Document Object Model (DOM) Level 3 Core SpecificationThe definition of 'Node.first
Child' in that specification. Obsolete No change Document Object Model (DOM) Level 2 Core SpecificationThe definition of 'Node.first
Child' in that specification. Obsolete No change Document Object Model (DOM) Level 1 Spec...
...ndard No change Document Object Model (DOM) Level 3 Core SpecificationThe definition of 'Node.first
Child' in that specification. Obsolete No change Document Object Model (DOM) Level 2 Core SpecificationThe definition of 'Node.first
Child' in that specification. Obsolete No change Document Object Model (DOM) Level 1 SpecificationThe definition of 'Node.first
Child' in that specification. Obsolete Initial definition ...
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. You can access the individual
child nodes in the collection by using either the item() method on the collection, or by using JavaScript array-style notation. If the node has no element
children, then
children is an empty list with a length of 0. Example const foo = document.getElementById('foo'); for (let i = 0; i < foo.
children.length; i++) { console.log(foo.
children[i].tagName); } Polyfill // Overwrites native '
children' prototype. // Adds Document & DocumentFragment su...
...e const foo = document.getElementById('foo'); for (let i = 0; i < foo.
children.length; i++) { console.log(foo.
children[i].tagName); } Polyfill // Overwrites native '
children' prototype. // Adds Document & DocumentFragment support for IE9 & Safari. // Returns array instead of HTMLCollection. ...
....
children.length; i++) { console.log(foo.
children[i].tagName); } Polyfill // Overwrites native '
children' prototype. // Adds Document & DocumentFragment support for IE9 & Safari. // Returns array instead of HTMLCollection. ...
...ll // Overwrites native '
children' prototype. // Adds Document & DocumentFragment support for IE9 & Safari. // Returns array instead of HTMLCollection. ;(function(constructor) { if (constructor && constructor.prototype && constructor.prototype.
children == null) { Object.defineProperty(constructor.prototype, '
children', { get: function() { let i = 0, node, nodes = this.
childNodes,
children = []; while (node = nodes[i++]) { if (node.nodeType === 1) {
children.push(node); } } return
children; } }); } })(window.Node || window.Element); Specification Specification Status Comment DOMThe definition of 'ParentNode.
children' in that specification. Living Standard Initial ...
:last-child - CSS: Cascading Style Sheets
The :last-
child CSS pseudo-class represents the last element among a group of sibling elements. /* Selects any <p> that is the last element among its siblings */ p:last-
child { color: lime; } Note: As originally defined, the selected element had to have a parent. Beginning with Selectors Level 4, this is no longer required. ...
... The :last-
child CSS pseudo-class represents the last element among a group of sibling elements. /* Selects any <p> that is the last element among its siblings */ p:last-
child { color: lime; } Note: As originally defined, the selected element had to have a parent. Beginning with Selectors Level 4, this is no longer required. ...
...olor: lime; } Note: As originally defined, the selected element had to have a parent. Beginning with Selectors Level 4, this is no longer required. ...
...t isn't selected.</p> <h2>This text isn't selected: it's not a `p`.</h2> </div> CSS p:last-
child { color: lime; background-color: black; padding: 5px; } Result Styling a list HTML <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3 <ul> <li>Item 3.1</li> <li>Item 3.2</li> <li>Item 3.3</li> </ul> </li> </ul> CSS ul li { color: blue; } ul li:last-
child { border: 1px solid red; color: red; } Result Specifications Specification Status Comment Selectors Level 4The definition of ':last-
child' in that specification. Working Draft Matching elements are not required to have a parent. Selectors Level 3The definition of ':last-
child' in that specification. Recommendation Initial definition. ...
remote/child - Archive of obsolete content
Enables an SDK module loaded into a
child process to access web content in the
child process and communicate with modules in the main process. Usage The sdk/remote/parent module enables SDK code to load modules into
child processes. The sdk/remote/
child module is for these "
child process modules". It provides two main things: access to web content loaded into this
child process port mechanisms to communicate with the main process Interacting with web content To interact with web content, the sdk/remote/
child module provides a frames property that's a list of all content frames loaded into this
child process. Each frame then has a content property that's the top-level DOM window for the frame, and addEventListener/removeEventListener functions that enable you to listen to DOM events...
... See the documentation for sdk/remote/parent for more details. Globals Properties process A Process object. frames A Frames object. Process A link to the main process. ...
... registered. Properties port An event emitter that sends and receives events from every frame in this process. Events attach Triggered when a new content frame is opened (for example, the user opened a new tab). The event listener gets a Frame object as an argument. At this point you can't access frame's content yet, but you can add event listeners: const { frames } = require("sdk/remote/
child"); frames.on("attach", function(frame) { console.log("new frame"); frame.addEventListener("DOMContentLoaded", function(e) { console.log(e.target.location.href); }); }); detach Triggered when a frame is removed (for example, the user closed a tab). Frame A Frame represents a content frame in this process and provides a way to communicate frame specific events to the main process. M...
treechildren - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Example <tree flex...
...r(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Example <tree flex="1"> <treecols> <treecol id="sender" label="Sender" flex="1"/> <treecol id="subject" label="Subject" flex="2"/> </treecols> <tree
children> <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> </tree
children> </tree> Related Elements tree, treecols, treecol, treeitem, tr...
ChildNode - Web APIs
The
ChildNode mixin contains methods and properties that are common to all types of Node objects that can have a parent. It's implemented by Element, DocumentType, and CharacterData objects. Properties There are neither inherited, nor specific properties. Methods There are no inherited methods.
ChildNode.remove() Removes this
ChildNode from the
children list of its parent.
ChildNode.before() Inserts a set of Node or DOMString objects in the
children list of this
ChildNode's parent, just before this
ChildNode. DOMString objects are inserted as equivalent Text nodes.
ChildNode.after() Inserts a set of Node or DOMString objects in the
children list of this
ChildNode's parent, just after this
ChildNode. DOMString objects are inserted as equivalent Text nodes. ...
...
ChildNode.before() Inserts a set of Node or DOMString objects in the
children list of this
ChildNode's parent, just before this
ChildNode. DOMString objects are inserted as equivalent Text nodes.
ChildNode.after() Inserts a set of Node or DOMString objects in the
children list of this
ChildNode's parent, just after this
ChildNode. DOMString objects are inserted as equivalent Text nodes.
ChildNode.replaceWith() Replaces this
ChildNode in the
children list of its parent with a set of Node or DOMString objects. DOMString objects are inserted as equivalent Text nodes. Specifications Specification Status Comment DOMThe definition of '
ChildNode' in that specification. Living Standard Split the ElementTraversal interface in ParentNode and
ChildNode. pr...
...atter. ...
Node.replaceChild() - Web APIs
The Node.replace
Child() method replaces a
child node within the given (parent) node. Note the idiosyncratic argument order (new before old).
ChildNode.replaceWith() may be easier to read and use. Syntax parentNode.replace
Child(new
Child, old
Child); Parameters new
Child The new node to replace old
Child. If it already exists in the DOM, it is first removed. old
Child The
child to be replaced. Return value The returned value is the replaced node. This is the same node as old
Child. Example // Given: // <div> // <span id="
childSpan">foo bar</span> // </div> // Create an empty element node // without an ID, any attributes, or any content var sp1 = document.createElement("span"); // Give it an id attribute called 'newSpan' sp1.id = "newSpan"; // Create some content for the new elemen...
...="
childSpan">foo bar</span> // </div> // Create an empty element node // without an ID, any attributes, or any content var sp1 = document.createElement("span"); // Give it an id attribute called 'newSpan' sp1.id = "newSpan"; // Create some content for the new element. ...
...ontent var sp1 = document.createElement("span"); // Give it an id attribute called 'newSpan' sp1.id = "newSpan"; // Create some content for the new element. var sp1_content = document.createTextNode("new replacement span element."); // Apply that content to the new element sp1.append
Child(sp1_content); // Build a reference to the existing node to be replaced var sp2 = document.getElementById("
childSpan"); var parentDiv = sp2.parentNode; // Replace existing node sp2 with the new span element sp1 parentDiv.replace
Child(sp1, sp2); // Result: // <div> // <span id="newSpan">new replacement span element.</span> // </div> Specifications Specification Status Comment DOMThe definition of 'Node: replace
Child' in that specification. Living Standard ...
NonDocumentTypeChildNode - Web APIs
The NonDocumentType
ChildNode interface contains methods that are particular to Node objects that can have a parent, but not suitable for DocumentType. NonDocumentType
ChildNode is a raw interface and no object of this type can be created; it is implemented by Element, and CharacterData objects. Properties There are no inherited properties. NonDocumentType
ChildNode.previousElementSibling 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. NonDocumentType
ChildNode.nextElementSibling 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. Methods There are neither inherited nor speci...
...The previousElementSibling and nextElementSibling are now defined on the latter. The CharacterData and Element implemented the new interfaces. ...
...ately following this node in its parent's
children list, or null if there is no Element in the list following this node. Methods There are neither inherited nor specific methods. Specifications Specification Status Comment DOMThe definition of 'NonDocumentType
ChildNode' in that specification. Living Standard Splitted the ElementTraversal interface in ParentNode,
ChildNode, and NonDocumentType
ChildNode. The previousElementSibling and nextElementSibling are now defined on the latter. The CharacterData and Element implemented the new interfaces. Element Traversal SpecificationThe definition of 'ElementTraversal' in that specification. Obsolete Added the initial definition of its properties to the ElementTraversal pure interface and use it on El...
Selection.selectAllChildren() - Web APIs
The Selection.selectAll
Children() method adds all the
children of the specified node to the selection. Previous selection is lost. Syntax sel.selectAll
Children(parentNode) Parameters parentNode All
children of parentNode will be selected. parentNode itself is not part of the selection. ...
... Working Draft Current definition ...
... Working Draft Current definition ...
Child combinator - CSS: Cascading Style Sheets
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. ...
...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. ...
...le properties } Examples CSS span { background-color: white; } div > span { background-color: DodgerBlue; } HTML <div> <span>Span #1, in the div. <span>Span #2, in the span that's in the div.</span> </span> </div> <span>Span #3, not in the div at all.</span> Result Specifications Specification Status Comment Selectors Level 4The definition of '
child combinator' in that specification. Working Draft Selectors Level 3The definition of '
child combinators' in that specification. Recommendation No change. CSS Level 2 (Revision 1)The definition of '
child selectors' in that specification. Recommendation Initial definition. ...
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>. For workers, non-compliant requests are treated as fatal network errors by the user agent. CSP version 2 Directive type Fetch directive default-src fallback Yes. If this directive is absent, the user agent will look for the default-src directive. Syntax One or more sources can be allowed for the
child-src policy: Content-Security-Policy:
child-src <source>; Content-Security-Policy:
child-src <source> <source>; Sources <source> can be one of the following: <host-source> Internet hosts by name or IP address, as well as an optional URL scheme and/or port number. The...
...le. When generating the hash, don't include the <script> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace. See unsafe inline script for an example. In CSP 2.0 this applied only to inline scripts. CSP 3.0 allows it in the case of script-src for external scripts. Examples Violation cases Given this CSP header: Content-Security-Policy:
child-src https://example.com/ This <iframe> and worker are blocked and won't load: <iframe src="https://not-example.com"></iframe> <script> var blockedWorker = new Worker("data:application/javascript,..."); </script> Specifications Specification Status Comment Content Security Policy Level 3The definition of '
child-src' in that specification. Working Draft No chang...
... Recommendation Initial definition. ...
firstPermanentChild - Archive of obsolete content
A permanent
child is one that is not customizable and remains on the toolbar. ...
... << XUL Reference firstPermanent
Child Not in SeaMonkey 1.x Type: element The first permanent
child of the toolbar. A permanent
child is one that is not customizable and remains on the toolbar. Items that are placed directly inside the toolbar without being in the toolbarpalette are permanent. ...
lastPermanentChild - Archive of obsolete content
A permanent
child is one that is not customizable and remains on the toolbar. ...
... << XUL Reference lastPermanent
Child Not in SeaMonkey 1.x Type: element The last permanent
child of the toolbar. A permanent
child is one that is not customizable and remains on the toolbar. Items that are placed directly inside the toolbar without being in the toolbarpalette are permanent. ...
Node.lastChild - Web APIs
The Node.last
Child read-only property returns the last
child of the node. If its parent is an element, then the
child is generally an element node, a text node, or a comment node. It returns null if there are no
child elements. Syntax var
childNode = node.last
Child; Example var tr = document.getElementById("row1"); var corner_td = tr.last
Child; Specifications Specification Status Comment DOMThe definition of 'Node.last
Child' in that specification. Living Standard No change Document Object Model (DOM) Level 3 Core SpecificationThe definition of 'Node.last
Child' in that specification. Obsolete No change Document Object Model (DOM) Level 2 Core SpecificationThe definition of 'Node.last
Child' in that specification. Obsolete No...
...Standard No change Document Object Model (DOM) Level 3 Core SpecificationThe definition of 'Node.last
Child' in that specification. Obsolete No change Document Object Model (DOM) Level 2 Core SpecificationThe definition of 'Node.last
Child' in that specification. Obsolete No change Document Object Model (DOM) Level 1 SpecificationThe definition of 'Node.last
Child' in that specification. Obsolete Initial definition ...
TreeWalker.firstChild() - Web APIs
The TreeWalker.first
Child() method moves the current Node to the first visible
child of the current node, and returns the found
child. It also moves the current node to this
child. If no such
child exists, returns null and the current node is not changed. Syntax node = treeWalker.first
Child; Example var treeWalker = document.createTreeWalker( document.body, NodeFilter.SHOW_ELEMENT, { acceptNode: function(node) { return NodeFilter.FILTER_ACCEPT; } }, false ); var node = treeWalker.first
Child(); // returns the first
child of the root element, or null if none Specifications Specification Status Comment DOMThe definition of 'TreeWalker.first
Child' in that specification. Living Standard No change from Document Object Model (DOM) Level 2 Traversa...
...ld of the root element, or null if none Specifications Specification Status Comment DOMThe definition of 'TreeWalker.first
Child' in that specification. Living Standard No change from Document Object Model (DOM) Level 2 Traversal and Range Specification Document Object Model (DOM) Level 2 Traversal and Range SpecificationThe definition of 'TreeWalker.first
Child' in that specification. Obsolete Initial definition. ...
TreeWalker.lastChild() - Web APIs
The TreeWalker.last
Child() method moves the current Node to the last visible
child of the current node, and returns the found
child. It also moves the current node to this
child. If no such
child exists, returns null and the current node is not changed. Syntax node = treeWalker.last
Child(); Example var treeWalker = document.createTreeWalker( document.body, NodeFilter.SHOW_ELEMENT, { acceptNode: function(node) { return NodeFilter.FILTER_ACCEPT; } }, false ); var node = treeWalker.last
Child(); // returns the last visible
child of the root element Specifications Specification Status Comment DOMThe definition of 'TreeWalker.last
Child' in that specification. Living Standard No change from Document Object Model (DOM) Level 2 Traversal and Range S...
...the last visible
child of the root element Specifications Specification Status Comment DOMThe definition of 'TreeWalker.last
Child' in that specification. Living Standard No change from Document Object Model (DOM) Level 2 Traversal and Range Specification Document Object Model (DOM) Level 2 Traversal and Range SpecificationThe definition of 'TreeWalker.last
Child' in that specification. Obsolete Initial definition. ...
FocusedChild
<< nsIAccessible Page Summary Focused accessible
child of node. attribute nsIAccessible focused
Child; See Also nsIAccessible.takeFocus() ...
GetChildAtPoint
<< nsIAccessible Page Summary This method returns an accessible
child which contains the coordinate at (x, y) in screen pixels. nsIAccessible get
ChildAtPoint( in long aX, in long aY ); Parameters aX[in] Accessible's X-coordinate.aY[out] Accessible's Y-coordinate. Return value Returns an accessible
child at given (x, y) coordinate. Remarks If the point is in the current accessible but not in a
child, the current accessible will be returned. If the point is in neither the current accessible or a
child, then NULL will be returned. ...
child - XPath
The
child axis indicates the
children of the context node. If an XPath expression does not specify an axis, the
child axis is understood by default. Since only the root node or element nodes have
children, any other use will select nothing. Specifications Specification Status Comment XPath 3.1The definition of '
child' in that specification. Recommendation XPath 3.0The definition of '
child' in that specification. Recommendation XPath 2.0The definition of '
child' in that specification. Recommendation XPath 1.0The definition of '
child' in that specification. Recommendation Initial definition. ...
Index - Web APIs
ing strings describing the different transports which may be used by the authenticator. 223 AuthenticatorResponse API, Authentication, AuthenticatorResponse, Interface, Reference, Web Authentication API, WebAuthn The AuthenticatorResponse interface of the Web Authentication API is the base interface for interfaces that provide a cryptographic root of trust for a key pair. The
child interfaces include information from the browser such as the challenge origin and either may be returned from PublicKeyCredential.response. 224 AuthenticatorResponse.clientDataJSON API, AuthenticatorResponse, Property, Reference, Web Authentication API, WebAuthn The clientDataJSON property of the AuthenticatorResponse interface stores a JSON string in an ArrayBuffer, represent...
... 224 AuthenticatorResponse.clientDataJSON API, AuthenticatorResponse, Property, Reference, Web Authentication API, WebAuthn The clientDataJSON property of the AuthenticatorResponse interface stores a JSON string in an ArrayBuffer, representing the client data that was passed to CredentialsContainer.create() or CredentialsContainer.get(). This property is only accessed on one of the
child objects of AuthenticatorResponse, specifically AuthenticatorAttestationResponse or AuthenticatorAssertionResponse. 225 Background Tasks API API, Background Tasks API, Guide, IdleDeadline, Overview, cancelIdleCallback, requestIdleCallback The Cooperative Scheduling of Background Tasks API (also referred to as the Background Tasks API or simply the requestIdleCallback() API) pr...
...CSS, CSS Typed OM, Houdini, Learn This should get you started with understanding the CSS Typed OM. Take a look at all the CSS Typed OM interfaces to learn more. 403 CSSConditionRule API, CSSOM, Interface, Reference An object implementing the CSSConditionRule interface represents a single condition CSS at-rule, which consists of a condition and a statement block. It is a
child of CSSGroupingRule. 404 CSSCounterStyleRule API, CSS Counter Styles, Interface, Reference The CSSCounterStyleRule interface represents an @counter-style at-rule. 405 CSSGroupingRule API, CSSOM, Interface, Reference An object implementing the CSSGroupingRule interface represents any CSS at-rule that contains other rules nested within it. 406 CSS...
...And 48 more matches
IPDL Tutorial
process-communication Protocol Definition Language", is a Mozilla-specific language allowing C++ code to pass messages between processes or threads in an organized and secure way. All messages for multi-process plugins and tabs in Firefox are declared in the IPDL language. To experiment with adding a new IPDL protocol, see Creating a New Protocol. All IPDL messages are sent between parent and a
child end points, called actors. An IPDL protocol declares how actors communicate: it declares the possible messages that may be sent between actors, as well as a state machine describing when messages are allowed to be sent. The parent actor is typically the more permanent side of the conversation: Parent/
Child Actors Parent
Child IPC Tabs Chrome process Content p...
...iler generates several C++ headers from each IPDL protocol. This generated code manages the details of the underlying communication layer (sockets and pipes), constructing and sending messages, ensuring that all actors adhere to their specifications, and handling many error conditions. The following IPDL code defines a very basic interaction of browser and plugin actors: async protocol PPlugin {
child: async Init(nsCString pluginPath); async Shutdown(); parent: async Ready(); }; This code declares the PPlugin protocol. Two messages can be sent from the parent to the
child, Init() and Shutdown(). One message can be sent from the
child to the parent, Ready(). IPDL protocols start with the letter P. The file in which the protocol is declared must have a matching name, PPlugin.ipdl. Gen...
... This code declares the PPlugin protocol. Two messages can be sent from the parent to the
child, Init() and Shutdown(). One message can be sent from the
child to the parent, Ready(). IPDL protocols start with the letter P. The file in which the protocol is declared must have a matching name, PPlugin.ipdl. Generated C++ Code When PPlugin.ipdl is compiled, the headers PPluginParent.h, and PPlugin
Child.h will be generated in the ipc/ipdl/_ipdlheaders/ directory of the build tree. The PPluginParent and PPlugin
Child classes are abstract classes that must be subclassed. Each outgoing message is a C++ method which can be called. Each incoming message is a pure-virtual C++ method which must be implemented: class PPluginParent { public: bool SendInit(const nsCString& pluginPath) { // generated...
...And 47 more matches
Index - Archive of obsolete content
ces/history Access the user's browsing history. 99 platform/xpcom Implement XPCOM objects, factories, and services. 100 preferences/event-target Add-on SDK Listen to changes to the Preferences system in Firefox. 101 preferences/service Add-on SDK, Jetpack, SDK Access the Preferences system in Firefox. 102 remote/
child Module, Reference, SDK Enables an SDK module loaded into a
child process to access web content in the
child process and communicate with modules in the main process. 103 remote/parent Reference, SDK Enables you to load modules, and privileged parts of your add-on in general, into
child processes. 104 stylesheet/style Modify styles using stylesh...
... 107 system/environment Access, set and clear environment variables. ...
... 107 system/environment Access, set and clear environment variables. 108 system/events API for working with the application observer service. ...
...And 34 more matches
JXON - Archive of obsolete content
about working with Objects and how Javascript is Object-Oriented). We can use several algorithms to convert its content to a Javascript Object Tree. Algorithm #1: a verbose way This simple recursive constructor will convert an XML DOM tree to a JavaScript Object tree. The text content of each element is stored into the keyValue property, while nodeAttributes, if they exist, are listed under the
child object keyAttributes. The constructor's argument can be the entire XML Document, a DocumentFragment or simply an Element node. /*\ |*| |*| JXON Snippet #1 MDNDeveloper Network |*| |*| https://developer.mozilla.org/docs/JXON |*| https://developer.mozilla.org/User:fusionchess |*| |*| This framework is released under the GNU Public License, version 3 or later. |*| http://www.gnu.org/licenses/g...
...oNode.nodeValue.trim() : oNode.nodeValue; } // nodeType is "Text" (3) or "CDATASection" (4) else if (oNode.nodeType === 1 && !oNode.prefix) { // nodeType...
...oNode.nodeValue.trim() : oNode.nodeValue; } // nodeType is "Text" (3) or "CDATASection" (4) else if (oNode.nodeType === 1 && !oNode.prefix) { // nodeType is "Element" (1) sProp = oNode.nodeName.toLowerCase(); vContent = ...
...And 31 more matches
Message manager overview
These processes run web content. Message managers are designed to enable chrome-privileged JavaScript code in one process to communicate with chrome-privileged JavaScript code in a different process. ...
...ts are called frame scripts, and as the name suggests, they are scoped to a specific browser frame. If chrome code wants to run code in the content process so it can access web content, this is usually the sort of message manager to use. Process message managers: these correspond to process boundaries, and enable code running in the parent (chrome) process to communicate with code running in the
child (content) process. From Firefox 38 onwards, they also enable code running in the parent process to load process scripts into the
child process. These are like frame scripts, except they are global to the
child process. Process scripts are most likely to be useful when an extension wants to run some code only once in the content process, to access some global service: for example, to register an o...
...tabs. If you load a frame script using the global frame message manager, the script gets loaded separately into every open tab: three times, in the diagram above. Similarly, if you send a message using the global frame message manager, it's received by all content tabs, and is then delivered to any frame scripts that are listening for it. ...
...And 30 more matches
Extending a Protocol
WG DOM APIs. What are we going to implement? tl:dr: you can see the final implementation of PEcho.ipdl as a diff in Phabricator. To make this tutorial less abstract (more fun!), we are going to implement a JS method called echo() on the Navigator interface. The method will take one argument, a DOMString, which we will pass to the parent process. Then we will send that same string back to the
child process. The WebIDL for this will be: partial interface Navigator { Promise<DOMString> echo(DOMString someString); }; Learning goals are: Extending an existing IPDL protocol. Simple message passing. Working with MozPromises and JS promises. Managing
child actors with reference counting. Visually, it's going to look something like this (except for the Operating System bit, which we ...
... everything is compiling ok. Once it's compiled, ./mach run and you should be able to spin up the developer console and type: navigator.echo("hi!"); That will return a pending Promise that never settles. Our goal is now to get that to settle with the value we sent in. IPDL basics While you are compiling, let's cover some IPDL basics. ...
... type: navigator.echo("hi!"); That will return a pending Promise that never settles. Our goal is now to get that to settle with the value we sent in. IPDL basics While you are compiling, let's cover some IPDL basics. In IPDL there two kinds of "actors" - a "parent" and "
child" - these actors are literally implemented as C++ classes, so they are more than just abstract ideas. Usually, a
child wants to send messages to the parent to do something off main thread for us. ...
...And 29 more matches
Index - Archive of obsolete content
636 canGoBack XUL Properties, XUL Reference No summary! 637 canGoForward XUL Properties, XUL Reference No summary! 638 canRewind XUL Properties, XUL Reference No summary! 639 checkState XUL Properties, XUL Reference No summary! 640 checked XUL Properties, XUL Reference No summary! 641
child XUL Properties, XUL Reference No summary! 642
children XUL Properties, XUL Reference No summary! 643 className XUL Properties, XUL Reference No summary! 644 clickSelectsAll XUL Properties, XUL Reference No summary! 645 collapsed XUL Properties, XUL Reference No summary! 646 color NeedsCont...
... 702 enableColumnDrag XUL Properties, XUL Reference No summary! 703 eventNode XUL Properties, XUL Reference No summary! 704 externalToolbars Toolbars, XUL, XUL Reference No summary! 705 findMode No summary! 706 firstOrdinalColumn XUL Properties, XUL Reference No summary! 707 firstPermanent
Child XUL Properties, XUL Reference No summary! 708 flex XUL Properties, XUL Reference No summary! 709 flexGroup No summary! 710 focused XUL Properties, XUL Reference No summary! 711 focusedItem XUL Properties, XUL Reference No summary! 712 forceComplete XUL Properties, XUL Reference No s...
... isSearching XUL Properties, XUL Reference No summary! 734 isWaiting XUL Properties, XUL Reference No summary! 735 itemCount XUL Properties, XUL Reference No summary! 736 label XUL Properties, XUL Reference No summary! 737 labelElement XUL Properties, XUL Reference No summary! 738 lastPermanent
Child XUL Properties, XUL Reference No summary! 739 lastSelected NeedsHelp, XUL Properties, XUL Reference No summary! 740 left XUL Properties, XUL Reference No summary! 741 linkedPanel XUL Properties, XUL Reference No summary! 742 listBoxObject XUL Properties, XUL Reference No summary! 743 listbox.c...
...And 26 more matches
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
// creates a table row var row = document.createElement("tr"); for (var j = 0; j < 2; j++) { // Create a <td> element and a text node, make the text // node the contents of the <td>, and put the <td> at // the end of the table row var cell = document.createElement("td"); var cellText = document.createTextNode("cell in row "+i+", column "+j); cell.append
Child(cellText); row.append
Child(cell); } // add the row to the end of the table body tblBody.append
Child(row); } // put the <tbody> in the <table> tbl.append
Child(tblBody); // appends <table> into <body> body.append
Child(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 no...
... tblBody.append
Child(row); } // put the <tbody> in the <table> tbl.append
Child(tblBody); // appends <table> into <body> body.append
Child(tbl); // sets the border attribute of tbl to 2; tbl.setAttribute("border", "2"); } Note the order in which we created the elements and the text node: First we created the <table> element. Next, we created the <tbody> element, which is a
child of the <table> element. Next, we used a loop to create the <tr> elements, which are
children of the <tbody> element. For each <tr> element, we used a loop to create the <td> elements, which are
children of <tr> elements. For each <td> element, we then created the text node with the table cell's text. Once we have created the <table>, <tbody>, <tr>, and <td> elements, and then the text node, ...
...used a loop to create the <td> elements, which are
children of <tr> elements. For each <td> element, we then created the text node with the table cell's text. ...
...And 23 more matches
Color picker tool - CSS: Cascading Style Sheets
**************************************/ ColorPicker.prototype.createPickingArea = function createPickingArea() { var area = document.createElement('div'); var picker = document.createElement('div'); area.className = 'picking-area'; picker.className = 'picker'; this.picking_area = area; this.color_picker = picker; setMouseTracking(area, this.updateColor.bind(this)); area.append
Child(picker); this.node.append
Child(area); }; ColorPicker.prototype.createHueArea = function createHueArea() { var area = document.createElement('div'); var picker = document.createElement('div'); area.className = 'hue'; picker.className ='slider-picker'; this.hue_area = area; this.hue_picker = picker; setMouseTracking(area, this.updateHueSlider.bind(this)); area.append
Child(pi...
...end
Child(area); }; ColorPicker.prototype.createHueArea = function createHueArea() { var area = document.createElement('div'); var picker = document.createElement('div'); area.className = 'hue'; picker.className ='slider-picker'; this.hue_area = area; this.hue_picker = picker; setMouseTracking(area, this.updateHueSlider.bind(this)); area.append
Child(picker); this.node.append
Child(area); }; ColorPicker.prototype.createAlphaArea = function createAlphaArea() { var area = document.createElement('div'); var mask = document.createElement('div'); var picker = document.createElement('div'); area.className = 'alpha'; mask.className = 'alpha-mask'; picker.className = 'slider-picker'; this.alpha_area = area; this.alpha_mask = mask; this.alpha_picker = picker; ...
...rea() { var area = document.createElement('div'); var mask = document.createElement('div'); var picker = document.createElement('div'); area.className = 'alpha'; mask.className = 'alpha-mask'; picker.className = 'slider-picker'; this.alpha_area = area; this.alpha_mask = mask; this.alpha_picker = picker; setMouseTracking(area, this.updateAlphaSlider.bind(this)); area.append
Child(mask); mask.append
Child(picker); this.node.append
Child(area); }; ColorPicker.prototype.createPreviewBox = function createPreviewBox(e) { var preview_box = document.createElement('div'); var preview_color = document.createElement('div'); preview_box.className = 'preview'; preview_color.className = 'preview-color'; this.preview_color = preview_color; preview_box.append
Child(pr...
...And 20 more matches
Tree View Details - Archive of obsolete content
tures of tree views. Creating a Hierarchical Custom View In the last section, we created a simple tree view that implemented only a minimum amount of functionality. Next, let's look at some additional functions that views may implement. Here, we will examine how to create a hierarchical set of items using the view. This is a fairly tricky process as it involves keeping track of which items have
children and also which rows are open and closed. Nesting Level Every row in the tree has a nesting level. The topmost rows are at level 0, the
children of those rows are at level 1, their
children at level 2 and so on. The tree will query the view for each row by calling its getLevel method to find out the level of that row. The view will need to return 0 for the outermost rows and higher values for...
...hasNextSibling function which, given a row, should return true if there is another row afterwards at the same level. This function is used, specifically, to draw the nesting lines along the side of the tree. The getParentIndex method is expected to return the parent row of a given row, that is, the row before it with a lower nesting value. All of these methods must be implemented by the view for
children to be handled properly. Containers There are also three functions, isContainer, isContainerEmpty and isContainerOpen that are used to handle a parent item in the tree. The isContainer method should return true if a row is a container and might contain
children. The isContainerEmpty method should return true if a row is an empty container, for instance, a directory with no files in it. T...
...he isContainer method. A container may be rendered differently than a non-container. For instance, a container may have a folder icon beside it. A style sheet may be used to style items based on various properties such as whether a row is open. This is described in a later section. A non-empty container will be displayed with a twisty next to it so that the user may open and close the row to see
child items. Empty containers will not have a twisty, but will still be treated like a container. When the user clicks the twisty to open a row, the tree will call the view's toggleOpenState method. The view should then perform any necessary operations to retrieve the
child rows and then update the tree with the new rows. Note: As of this writing (Gecko 2.0), custom nsITreeView implementations must ...
...And 19 more matches
tree - Archive of obsolete content
Unlike other elements, the data to display inside the tree is not specified using tags, but is determined from a view object. ...
...icates whether treeitem element are used. If you would like to allow the tree to be horizontally scrolled, simply set the width attributes for each column to make the tree wider than its containing object. Tree type View interfaces Has DOM nodes? Description Content tree nsITreeView, nsITreeContentView Yes This tree has treeitem elements placed within the tree
children element. In this situation, a content view (which implements the interface nsITreeContentView) which is a more specialized type of view, uses the treeitem elements and their descendants to determine the data to display in the tree. However, the treeitems are not displayed directly; they are used only as data to the content view. However, the content view will automatically update the tree if t...
...columns, contentView, currentIndex, disableKeyNavigation, disabled, editingColumn, editingRow, enableColumnDrag, firstOrdinalColumn, inputField, selType, selstyle, tabIndex, treeBoxObject, view Examples A tree with several columns <tree flex="1" rows="2"> <treecols> <treecol id="sender" label="Sender" flex="1"/> <treecol id="subject" label="Subject" flex="2"/> </treecols> <tree
children> <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> </tree
children> </tree> A tree with several columns and nested items <tree id="...
...And 19 more matches
Mozilla accessibility architecture
in "this" to get at the information it needs. Class Inheritence Diagram View the Class Inheritence Diagram. 3. Accessible Tree Construction and Traversal The accessible tree is constructed on demand. The first request for an accessible is usually the accessible for document in one of the open windows, and the code in widget/src/gtk2 or widget/src/windows must return this doc accessible. Even if a
child accessible of the document is asked for first, the doc accessible will be created first, because it is needed to cache any accessibles created within it. When the doc accessible is asked for, an event is fired which reaches the PresShell, which then uses the accessibility service singleton (nsIAccessibilityService) to create the doc accessible and return it back to the widget code. The reason tha...
...w the assistive technology client requests the data, the accessible for a given node is only created once. We use the accessibility cache to retrieve accessibles that have already been created for a given dom node. This tree traversal is accomplished via toolkit-specific calls which end up as calls into nsIAccessible methods GetAccParent(), GetAccNextSibling(), GetAccPreviousSibling(), GetAccFirst
Child(), GetAccLast
Child(), GetAcc
ChildCount() and Get
ChildAt(
childNum). The ATK has more convenience methods than MSAA does for traversal - for example it is possible to go straight to the accessible for a specific row and column of a table, using nsIAccessibleTable::CellRefAt(). The algorithm used to calculate the number of accessible
children for an accessible node is expensive. We cannot assume tha...
...etAcc
ChildCount() and Get
ChildAt(
childNum). The ATK has more convenience methods than MSAA does for traversal - for example it is possible to go straight to the accessible for a specific row and column of a table, using nsIAccessibleTable::CellRefAt(). The algorithm used to calculate the number of accessible
children for an accessible node is expensive. We cannot assume that all of the accessible
children will come from the direct
children, grand
children or even great-great-great-
children of the current accessible's node. Therefore we have to iterate through the tree as if we were creating all of the accessible
children, adding to the total as we go. ...
...And 19 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
**************************************/ ColorPicker.prototype.createPickingArea = function createPickingArea() { var area = document.createElement('div'); var picker = document.createElement('div'); area.className = 'picking-area'; picker.className = 'picker'; this.picking_area = area; this.color_picker = picker; setMouseTracking(area, this.updateColor.bind(this)); area.append
Child(picker); this.node.append
Child(area); }; ColorPicker.prototype.createHueArea = function createHueArea() { var area = document.createElement('div'); var picker = document.createElement('div'); area.className = 'hue'; picker.className ='slider-picker'; this.hue_area = area; this.hue_picker = picker; setMouseTracking(area, this.updateHueSlider.bind(this)); area.append
Child(pi...
...end
Child(area); }; ColorPicker.prototype.createHueArea = function createHueArea() { var area = document.createElement('div'); var picker = document.createElement('div'); area.className = 'hue'; picker.className ='slider-picker'; this.hue_area = area; this.hue_picker = picker; setMouseTracking(area, this.updateHueSlider.bind(this)); area.append
Child(picker); this.node.append
Child(area); }; ColorPicker.prototype.createAlphaArea = function createAlphaArea() { var mask = document.createElement('div'); var picker = document.createElement('div'); mask.className = 'alpha'; picker.className = 'slider-picker'; this.alpha_mask = mask; this.alpha_picker = picker; setMouseTracking(mask, this.updateAlphaSlider.bind(this)); mask.append
Child(picker); this.node.a...
...); }; ColorPicker.prototype.createAlphaArea = function createAlphaArea() { var mask = document.createElement('div'); var picker = document.createElement('div'); mask.className = 'alpha'; picker.className = 'slider-picker'; this.alpha_mask = mask; this.alpha_picker = picker; setMouseTracking(mask, this.updateAlphaSlider.bind(this)); mask.append
Child(picker); this.node.append
Child(mask); }; ColorPicker.prototype.createPreviewBox = function createPreviewBox(e) { var preview_box = document.createElement('div'); var preview_color = document.createElement('div'); preview_box.className = 'preview'; preview_color.className = 'preview-color'; this.preview_color = preview_color; preview_box.append
Child(preview_color); this.node.append
Child(preview_box); }; C...
...And 19 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. For boxes that have horizontal orientation, it specifies how its
children will be aligned vertically. For boxes that have vertical orientation, it specifies how its
children will be aligned horizontally. start
Child elements are aligned starting from the left or top edge of the box. If the box is larger than the total size of the
children, the extra space is placed on the right or bottom side. center Extra space i...
...rientation, it specifies how its
children will be aligned horizontally. start
Child elements are aligned starting from the left or top edge of the box. If the box is larger than the total size of the
children, the extra space is placed on the right or bottom side. 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. end
Child elements are placed on the right or bottom edge of the box. If the box is larger than the total size of the
children, the extra space is placed on the left or top side. ...
...
child elements, resulting in the
children being placed in the center of the box. end
Child elements are placed on the right or bottom edge of the box. If the box is larger than the total size of the
children, the extra space is placed on the left or top side. baseline This value applies to horizontally oriented boxes only. It causes the
child elements to be aligned so that their text labels are lined up. stretch This is the default value. The
child elements are stretched to fit the size of the box. For a horizontal box, the
children are stretched to be the height of the box. For a vertical box, the
children are stretched to be the width of the box. ...
...And 18 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
ies later. Deciding Which MSAA Features to Support MSAA Methods - Cheat Sheet for Developers The IAccessible interface is used in a tree of IAccessible's, each one representing a data node, similar to a DOM. Here are the methods supported in IAccessible - a minimal implementation would contain those marked "[important]": get_accParent: Get the parent of an IAccessible. [important] get_acc
ChildCount: Get the number of
children of an IAccessible. [important] get_acc
Child: Get the
child of an IAccessible. [important] get_accName: Get the "name" of the IAccessible, for example the name of a button, checkbox or menu item. Try to use unique names for each item in a dialog so that voice dictation software doesn't have to deal with extra ambiguity.[important] get_accValue: Get the "value" o...
...off states, such as focused, focusable, selected, selectable, visible, protected (for passwords), checked, etc. [important] get_accHelp: Get context sensitive help for the IAccessible. get_accHelpTopic: We don't use this, it's only if the Windows help system is used. get_accKeyboardShortcut: What is the keyboard shortcut for this IAccessible (underlined alt+combo mnemonic) get_accFocus: Which
child is focused? [important] get_accSelection: Which
children of this item are selected? get_accDefaultAction: Get a description or name of the default action for this component, such as "jump" for links. accSelect: Select the item associated with this IAccessible. [important] accLocation: Get the x,y coordinates, and the height and width of this IAccessible node. [important] accNavigate: Navigat...
...[important, but no need to implement up/down/left/right] accHitTest: Find out what IAccessible exists and a specific coordinate. accDoDefaultAction: Perform the action described by get_accDefaultAction. put_accName: Change the name. put_accValue: Change the value. ...
...And 16 more matches
Gecko info for Windows accessibility vendors
Methods To use MSAA with Gecko, you'll need the tools and docs that come with the Active Accessibility 2.0 SDK Tools. The method AccessibleObjectFromWindow() will get you the root IAccessible corresponding to the top level window. Hold on to this root IAccessible, and use it to walk through the entire tree of IAccessible's. ...
... with Gecko, you'll need the tools and docs that come with the Active Accessibility 2.0 SDK Tools. The method AccessibleObjectFromWindow() will get you the root IAccessible corresponding to the top level window. Hold on to this root IAccessible, and use it to walk through the entire tree of IAccessible's. ...
...PUPEND are fired when XUL menus are opened or closed. EVENT_MENUSTART and EVENT_MENUEND are fired when the XUL menubar is activated or deactivated. EVENT_VALUECHANGE is fired for sliders, progress meters and other objects who's get_accValue() may change. EVENT_SHOW, EVENT_HIDE and EVENT_LOCATIONCHANGE are fired for the caret object. EVENT_REORDER is fired on an object whenever its
children change. EVENT_SHOW and EVENT_HIDE may also be fired with the reorder event, for the
child who's visibility changed. The show and hide events are not fired on every IAccessible when a new subtree of IAccessibles changes visibility -- only the top IAccessible. The exception is progress meters, which are guaranteed to fire EVENT_SHOW and EVENT_HIDE events when they are displayed or hidden. EV...
...And 15 more matches
Accessing the Windows Registry Using XPCOM
flags defined on the interface. ...
...the interface. You can read the interface documentation for a full explanation, but we will show only the three most commonly used modes here: ACCESS_READ -- For reading values, enumerating keys, and receiving notifications ACCESS_WRITE -- For setting values and creating sub keys ACCESS_ALL -- Access for all operations In addition to open() and create(), there are the open
Child() and create
Child() methods. ...
...ill show only the three most commonly used modes here: ACCESS_READ -- For reading values, enumerating keys, and receiving notifications ACCESS_WRITE -- For setting values and creating sub keys ACCESS_ALL -- Access for all operations In addition to open() and create(), there are the open
Child() and create
Child() methods. You can call these methods on an already-opened registry key to open a
child key. Both methods take a relative path and access mode as parameters and return a new object implementing nsIWindowsRegKey. Here's the simple example again, but using open
Child(): var wrk = Components.classes["@mozilla.org/windows-registry-key;1"] .createInstance(Components.interfaces.nsIWindowsRegKey); wrk.open(wrk.ROOT_KEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft", ...
...And 15 more matches
Index
plemented in certain situations. Some examples are: 169 IAccessibleRelation Interfaces, NeedsContent, XPCOM, XPCOM Interface Reference Returns a localized version of the relation type. ...
...ation Interfaces, NeedsContent, XPCOM, XPCOM Interface Reference Returns a localized version of the relation type. 170 IAccessibleTable Interfaces, XPCOM, XPCOM Interface Reference Typically all accessible objects that represent cells or cell-clusters of a table will be at the same time
children of the table. In this case IAccessible2.indexInParent() will return the
child index which then can be used when calling rowIndex() and columnIndex(). However, in some cases that kind of implementation will not be possible. When the table cells are not direct
children of a table, the object representing the cell can define a "table-cell-index" object attribute identifying the 0 based table cell index. This object attribute is obtained by parsing the attribute string returne...
... cases that kind of implementation will not be possible. When the table cells are not direct
children of a table, the object representing the cell can define a "table-cell-index" object attribute identifying the 0 based table cell index. This object attribute is obtained by parsing the attribute string returned by IAccessible2.attributes(). The "table-cell-index" attribute can be used just like a
child index of the typical case. ATs should first test for the presence of the "table-cell-index" attribute and if it is not present then IAccessible2.indexInParent() can be used as in the typical case where cells are direct
children of the table. The range of valid coordinates for this interface are implementation dependent. However, that range includes at least the intervals from the from the first r...
...And 15 more matches
The building blocks of responsive design - Progressive web apps (PWAs)
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. We have used Brick to create the mobile layout for Snapshot, which you will read more about below. To get these sitting side-by-side we have used the following rules: x-card { width: 100%; } x-card:nth-
child(1), x-card:nth-
child(2) { width: 30%; float: left; padding: 2rem; } x-card:nth-
child(3) { width: 40%; float: left; height: 100%; overflow: auto; padding: 2rem; } So we're giving the first two columns a width of 30%, and the third a width of 40%, floating the columns all left. This way they end up side-by-side, and their proportions remain the same as the browser window size vari...
...s pretty horrible, but generally this kind of problem is easily fixed with some simple CSS: img, video { max-width: 100%; } This tells the replaced elements to remain constrained inside their container's widths, no matter what. However, if they aren't as wide as their containers, they will not stretch to fill them. In the snapshot example, we ended up with slightly different code: x-card:nth-
child(1) video, x-card:nth-
child(2) img { width: 100%; ... } This is because in our case, we do in fact want the video and image to stretch to always fill their containers no matter what -- a subtle but important difference from max-width -- and therefore always be the same size. The video always resizes dynamically, but the screen captures taken from it do not, so upon resizing the screen it wa...
...e a desktop layout, as we've already seen. This is created using the CSS rules included at the top of the stylesheet, before any media queries are encountered. Mid-width layout We also have a mid-width layout, which is aimed at working well on tablets and narrow laptop screens. This is created by all of the CSS inside the first media query: @media all and (max-width: 1024px) { x-card:nth-
child(1), x-card:nth-
child(2) { width: 50%; } x-card:nth-
child(3) { width: 100%; clear: left; } x-card:nth-
child(3) img { width: 20%; } } So here we're altering the widths of the columns and removing the float of the third column (and adding clearing to guard against any float funny business). We've also altered the width of the images inside the third container (no longer ...
...And 15 more matches
nsIDOMNode
dom/interfaces/core/nsIDOMNode.idlScriptable This interface is the primary datatype for the entire Document Object Model. It represents a single node in the document tree. Inherits from: nsISupports Last changed in Gecko 0.9.6 Method overview nsIDOMNode append
Child(in nsIDOMNode new
Child) nsIDOMNode cloneNode(in boolean deep); boolean hasAttributes(); boolean has
ChildNodes(); nsIDOMNode insertBefore(in nsIDOMNode new
Child, in nsIDOMNode ref
Child) boolean isSupported(in DOMString feature, in DOMString version); void normalize(); nsIDOMNode remove
Child(in nsIDOMNode old
Child) nsIDOMNode replace
Child(in nsIDOMNode new
Child, in nsIDOMNode old
Child) Attributes Attribute Type Description attributes nsIDOMNamedNodeMap Read only.
childNodes nsIDOMNodeList Re...
... localName DOMString Read only. namespaceURI DOMString Read only. nextSibling nsIDOMNode Read only. nodeName DOMString Read only. nodeType unsigned short Read only. nodeValue DOMString ownerDocument nsIDOMDocument Read only. parentNode nsIDOMNode Read only. ...
... localName DOMString Read only. namespaceURI DOMString Read only. nextSibling nsIDOMNode Read only. nodeName DOMString Read only. nodeType unsigned short Read only. nodeValue DOMString ownerDocument nsIDOMDocument Read only. parentNode nsIDOMNode Read only. prefix DOMString previousSibling nsIDOMNode Read only. ...
...And 14 more matches
Node - Web APIs
ost notable are Document, Element, and DocumentFragment. In addition, every kind of DOM node is represented by an interface based on Node. These include Attr, CharacterData (which Text, Comment, and CDATASection are all based on), ProcessingInstruction, DocumentType, Notation, Entity, and EntityReference. In some cases, a particular feature of the base Node interface may not apply to one of its
child interfaces; in that case, the inheriting node may return null or throw an exception, depending on circumstances. For example, attempting to add
children to a node type that cannot have
children will throw an exception. <div id="interfaceDiagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg ...
...er text { fill: #0095DD; pointer-events: all;} Properties In addition to the properties below, Node inherits properties from its parent, EventTarget. Node.baseURIRead only Returns a DOMString representing the base URL of the document containing the Node. Node.baseURIObject Read only (Not available to web content.) The nsIURI object representing the base URI for the element. Node.
childNodesRead only Returns a live NodeList containing all the
children of this node. NodeList being live means that if the
children of the Node change, the NodeList object is automatically updated. Node.first
ChildRead only Returns a Node representing the first direct
child node of the node, or null if the node has no
child. Node.isConnectedRead only A boolean indicating whether or not the Node...
... Node.nextSiblingRead only Returns a Node representing the next node in the tree, or null if there isn't such node. Node.nodeNameRead only Returns a DOMString containing the name of the Node. The structure of the name will differ with the node type. ...
...And 14 more matches
Web Replay
cted by a single global lock. Note that while this could potentially be a big drag on performance during both replay and recording, many of the hottest atomics (refcounts, GC counters, and so forth) are associated with non-deterministic components and are not recorded. IPC integration Communication between the chrome process and a recording or replaying process -- hereafter referred to as the
child process -- is managed via a separate middleman content process. The
child process is extended so that it can communicate with the middleman, using a special bidirectional channel and messages separate from IPDL state. Middleman process The middleman is the same as a normal content process, except that it spawns and communicates with the
child process, and avoids creating any documents itself. ...
...al content process, except that it spawns and communicates with the
child process, and avoids creating any documents itself. Using the middleman provides the following advantages: IPDL communication is greatly simplified. The chrome and middleman processes communicate using the standard browser protocols (PContent, PBrowser, etc.) and implementations for their actors, while the middleman and
child processes communicate with their own channel and messages, which is tuned to the demands of the recording/replaying process. The middleman can perform actions that would be extremely difficult to manage in a replaying process without going out of sync with the recording. ...
..., while the middleman and
child processes communicate with their own channel and messages, which is tuned to the demands of the recording/replaying process. The middleman can perform actions that would be extremely difficult to manage in a replaying process without going out of sync with the recording. This mainly includes running devtools content-side scripts. The middleman can spawn multiple
child processes at once, and coordinate their behavior so they run in parallel. There can be up to one recording
child and two replaying
children at once. ...
...And 13 more matches
Box-shadow generator - CSS: Cascading Style Sheets
================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* For IE 6/7 (trigger hasLayout) */ } /* GRID COLUMN SETUP * ========================================================================== */ .col { display: block; float:left; margin: 1% 0 1% 1.6%; } .col:first-
child { margin-left: 0; } /* all browsers except IE6 and lower */ /* * UI Slider */ .slidergroup { height: 20px; margin: 10px 0; font-family: "Segoe UI", Arial, Helvetica, sans-serif; -moz-user-select: none; user-select: none; } .slidergroup * { float: left; height: 100%; line-height: 100%; } /* Slider */ .ui-slider { height: 10px; width: 200px; margin: 4px 10px; display: block; bo...
...r topic = node.getAttribute('data-topic'); this.min = min; this.max = max > 0 ? max : 100; this.step = step === 0 ? 1 : step; this.value = value <= max && value >= min ? value : (min + max) / 2 | 0; this.snap = snap === "true" ? ...
...tener("click", function() { increment(topic); }); } } var setInputComponent = function setInputComponent(node) { var topic = node.getAttribute('data-topic'); var unit_type = node.getAttribute('data-unit'); var input = document.createElement('input'); var unit = document.createElement('span'); unit.textContent = unit_type; input.setAttribute('type', 'text'); node.append
Child(input); node.append
Child(unit); input.addEventListener('click', function(e) { this.select(); }); input.addEventListener('change', function(e) { setValue(topic, e.target.value | 0); }); subscribe(topic, function(value) { node.
children[0].value = value; }); } var increment = function increment(topic) { var slider = sliders[topic]; if (slider === null || slider === u...
...And 13 more matches
nsIWindowsRegKey
0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) The interface represents a single key in the registry. This interface is highly Win32 specific. ...
...t changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) The interface represents a single key in the registry. This interface is highly Win32 specific. ...
...id close(); void create(in unsigned long rootKey, in AString relPath, in unsigned long mode); nsIWindowsRegKey create
Child(in AString relPath, in unsigned long mode); AString get
ChildName(in unsigned long index); AString getValueName(in unsigned long index); unsigned long getValueType(in AString name); boolean hasChanged(); boolean has
Child(in AString name); boolean hasValue(in AString name); boolean isWatching(); void open(in unsigned long rootKey, in AString relPath, in unsigned long mode); nsIWindowsRegKey open
Child(in AString relPath, in unsigned long mode); ACString readBinaryValue(in AString name); unsigned long long readInt64Value(in AString name); unsigned long r...
...And 12 more matches
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
list items all on the same line in the source, which causes the whitespace nodes to not be created in the first place: <li></li><li></li><li></li><li></li><li></li> DOM traversal and whitespace When trying to do DOM manipulation in JavaScript, you can also encounter problems because of whitespace nodes. ...
... same line in the source, which causes the whitespace nodes to not be created in the first place: <li></li><li></li><li></li><li></li><li></li> DOM traversal and whitespace When trying to do DOM manipulation in JavaScript, you can also encounter problems because of whitespace nodes. For example, if you have a reference to a parent node and want to affect its first element
child using Node.first
Child, if there is a rogue whitespace node just after the opening parent tag you will not get the result you are expecting. The text node would be selected instead of the element you want to affect. As another example, if you have a certain subset of elements that you want to do something to based on whether they are empty (have no
child nodes) or not, you could check whether each element is empty usi...
...espace node just after the opening parent tag you will not get the result you are expecting. The text node would be selected instead of the element you want to affect. As another example, if you have a certain subset of elements that you want to do something to based on whether they are empty (have no
child nodes) or not, you could check whether each element is empty using something like Node.has
ChildNodes(), but again, if any target elements contain text nodes, you could end up with false results. Whitespace helper functions The JavaScript code below defines several functions that make it easier to deal with whitespace in the DOM: /** * Throughout, whitespace is defined as one of the characters * "\t" TAB \u0009 * "\n" LF \u000A * "\r" CR \u000D * " " SPC \u0020 * * This does...
...And 12 more matches
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
/ Note that 'elemNameOrArray' is: either the full element name (eg. [html:]div) or an array of elements in JSON notation function tag(elemNameOrArray, elemAttr) { // Array of elements? Parse each one... ...
...Listener elem.addEventListener(key.replace(/^on/, ""), val, false); } else { // Note that the default namespace for XML attributes is, and should be, blank (ie. ...
... elem.addEventListener(key.replace(/^on/, ""), val, false); } else { // Note that the default namespace for XML attributes is, and should be, blank (ie. ...
...And 11 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
eturns an array of elements with the specified name in the document. Traverse the DOM Mozilla supports the W3C DOM APIs for traversing the DOM tree through JavaScript (see Table 2). The APIs exist for each node in the document and allow walking the tree in any direction. Internet Explorer supports these APIs as well, but it also supports its legacy APIs for walking a DOM tree, such as the
children property. Table 2. Methods used to traverse the DOM Property/Method Description
childNodes Returns an array of all
child nodes of the element. first
Child Returns the first
child node of the element. getAttribute( aAttributeName ) Returns the value for the specified attribute. hasAttribute( aAttributeName ) Returns a boolean stating ...
... nextSibling Returns the node immediately following the current one. ...
... nextSibling Returns the node immediately following the current one. nodeName Returns the name of the current node as a string. nodeType Returns the type of the current node. ...
...And 11 more matches
Anonymous Content - Archive of obsolete content
Introduction A binding can specify an anonymous content template using the content element. This template describes a content tree that will be generated around the bound element during binding attachment. An element declared in a bound document using a single tag can then be constructed out of multiple
child elements, and this implementation is hidden from the bound document. For example, the HTML file upload control appears in most browsers as a composite widget consisting of a text field and a button. A sample XBL binding for the file widget might look as follows: <binding id="fileupload"> <content> <html:input type="text"/> <html:input type="button"/> </content> </binding> Because this content is not visible to its parent element, it is said to be anonymous content...
...d and a button. A sample XBL binding for the file widget might look as follows: <binding id="fileupload"> <content> <html:input type="text"/> <html:input type="button"/> </content> </binding> Because this content is not visible to its parent element, it is said to be anonymous content. Scoping and access using the DOM When a binding is attached and certain conditions are met, the
children of the binding's content element are cloned. Elements and attributes in the XBL namespace are never cloned. For content generated underneath the bound element, the topmost nodes' parentNode pointers are set to the bound element. When anonymous content elements are built above the bound element, the topmost elements' parentNode pointers are set to the bound element's parentNode. All anonymous n...
...elements' parentNode pointers are set to the bound element's parentNode. All anonymous nodes' ownerDocument pointers are set to the bound document at the time of generation. In effect the anonymous content exists in its own insulated pocket within the document. Using parentNode, anonymous content nodes can refer to their explicit parents, but explicit parents have no knowledge of their anonymous
children. The anonymous content is not accessible via the
childNodes list for the bound element, nor is it accessible using first
Child/nextSibling to iterate over the
children of the bound element. The anonymous content is accessible only through special methods like getAnonymousNodes and getAnonymousElementByAttribute. Anonymous content introduces the concept of scope to nodes within a document. Bec...
...And 11 more matches
Elements - Archive of obsolete content
ther XBL specification. <!ELEMENT bindings ( binding* ) > Hierarchy: root element May contain: <binding> The bindings element is the root element of any XBL document. It should usually declare XBL as the default namespace (unless an XBL namespace prefix is used) and it may additionally declare other namespace prefixes used in your binding. 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. An element can have only one binding attached (explicitly or inherited) at one moment. From several bindings only the last in the sequence will be used (like with any CSS rule). helloworld.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title>Hello world!</title>...
...hello.xml should reside in the same directory which contains helloworld.html. Next: bindings > binding element. Notes In the current stable releases of Mozilla products (e.g. Fi...
...ault content</p> <p>Default content</p> <p id="p03">Default content</p> </body> </html> hello.xml: <?xml version="1.0"?> <bindings xmlns="http://www.mozilla.org/xbl" xmlns:html="http://www.w3.org/1999/xhtml"> <binding id="default"> <content><html:b>Hello world! </html:b><
children/></content> </binding> <binding id="hello2"> <content><html:b>Hello from my binding! </html:b><
children/></content> </binding> </bindings> You can view the result by opening helloworld.html in Firefox. hello.xml should reside in the same directory which contains helloworld.html. Next: bindings > binding element. Notes In the current stable releases of Mozilla products (e.g. Firefox 2) it is impossible to attach bindings to table sub-elements (rows, cells etc.) You can attach binding onl...
...And 11 more matches
Node.insertBefore() - Web APIs
The Node.insertBefore() method inserts a node before a reference node as a
child of a specified parent node. If the given node already exists in the document, insertBefore() moves it from its current position to the new position. (That is, it will automatically be removed from its existing parent before appending it to the specified new parent.) This means that a node cannot be in two locations of the document simultaneously. Note: The Node.cloneNode() can be used to make a copy of the node before appending it under the new parent. Note that the copies made with cloneNode() will not be automatically kept in sync. If the given
child is a DocumentFragment, the entire contents of the DocumentFragment are moved into the
child list of the specified parent node. Syntax let insertedNode = pa...
...the
child list of the specified parent node. Syntax let insertedNode = parentNode.insertBefore(newNode, referenceNode) insertedNode The node being inserted (the same as newNode) parentNode The parent of the newly inserted node. newNode The node to be inserted. referenceNode The node before which newNode is inserted. If this is null, then newNode is inserted at the end of parentNode's
child nodes. Note: referenceNode is not an optional parameter. You must explicitly pass a Node or null. Failing to provide it or passing invalid values may behave differently in different browser versions. Return value Returns the added
child (unless newNode is a DocumentFragment, in which case the empty DocumentFragment is returned). Example Example 1 <div id="parentElement"> <span id="chi...
...s. Return value Returns the added
child (unless newNode is a DocumentFragment, in which case the empty DocumentFragment is returned). ...
...And 11 more matches
jspage - Archive of obsolete content
lash").GetVariable("$version");})||"0 r0").match(/\d+/g);return{version:parseInt(a[0]||0+"."+a[1],10)||0,build:parseInt(a[2],10)||0}; })();function $exec(b){if(!b){return b;}if(window.execScript){window.execScript(b);}else{var a=document.createElement("script");a.setAttribute("type","text/javascript"); a[(Browser.Engine.webkit&&Browser.Engine.version<420)?"innerText":"text"]=b;document.head.append
Child(a);document.head.remove
Child(a);}return b;}Native.UID=1; var $uid=(Browser.Engine.trident)?function(a){return(a.uid||(a.uid=[Native.UID++]))[0];}:function(a){return a.uid||(a.uid=Native.UID++);};var Window=new Native({name:"Window",legacy:(Browser.Engine.trident)?null:window.Window,initialize:function(a){$uid(a); if(!a.Element){a.Element=$empty;if(Browser.Engine.webkit){a.document.createElement("...
...Key","cellPadding","cellSpacing","colSpan","frameBorder","maxLength","readOnly","rowSpan","tabIndex","useMap"]; b=b.associate(b);Hash.extend(e,b);Hash.extend(e,k.associate(k.map(String.toLowerCase)));var a={before:function(m,l){if(l.parentNode){l.parentNode.insertBefore(m,l); }},after:function(m,l){if(!l.parentNode){return;}var n=l.nextSibling;(n)?l.parentNode.insertBefore(m,n):l.parentNode.append
Child(m);},bottom:function(m,l){l.append
Child(m); },top:function(m,l){var n=l.first
Child;(n)?l.insertBefore(m,n):l.append
Child(m);}};a.inside=a.bottom;Hash.each(a,function(l,m){m=m.capitalize();Element.implement("inject"+m,function(n){l(this,document.id(n,true)); return this;});Element.implement("grab"+m,function(n){l(document.id(n,true),this);return this;});});Element.implement({set:function(o,m){swit...
...function(l){if(!this.hasClass(l)){this.className=(this.className+" "+l).clean(); }return this;},removeClass:function(l){this.className=this.className.replace(new RegExp("(^|\\s)"+l+"(?:\\s|$)"),"$1");return this;},toggleClass:function(l){return this.hasClass(l)?this.removeClass(l):this.addClass(l); },adopt:function(){Array.flatten(arguments).each(function(l){l=document.id(l,true);if(l){this.append
Child(l);}},this);return this;},appendText:function(m,l){return this.grab(this.getDocument().newTextNode(m),l); },grab:function(m,l){a[l||"bottom"](document.id(m,true),this);return this;},inject:function(m,l){a[l||"bottom"](this,document.id(m,true));return this;},replaces:function(l){l=document.id(l,true); l.parentNode.replace
Child(this,l);return this;},wraps:function(m,l){m=document.id(m,true);return ...
...And 10 more matches
Modifying a XUL Interface - Archive of obsolete content
<< PreviousNext >> The DOM provides various functions to modify the document. Creating New Elements You can create new elements using the createElement() function of the document. It takes one argument, the tag name of the element to create. You can then set attributes of the element using the setAttribute() function and append it to the XUL document using the append
Child() function. ...
...Notice that this is NOT the same as a vbox or an hbox. ...
...ox". This is a subtle dependency between the function and the XUL element to which you should pay attention. addButton() the calls the createElement() function to create a new button. Note this button is not visible, nor is it attached to anything yet. addButton() then assigns the label 'A new Button' to the button using the setAttribute() function. Finally the append
Child() function of the particular box found by getElementbyID() is called to add the button to it. At this point, the button is attached to a visible box, so it becomes visible as well. The button with the label "Add" can be pressed multiple times and it will continue to add new buttons, each of which will have the label "A new Button", and will only be distinguishable by their p...
...And 10 more matches
Processing XML with E4X - Archive of obsolete content
s insertion into a textbox). if (languages.@type.toString() === 'agile') { ... } or, simply: if (languages.@type == 'agile') { ... } Working with XML objects XML objects provide a number of methods for inspecting and updating their contents. ...
... Objects representing XML elements provide a number of useful methods, s...
... Bob Smith alert(person['name']); // Bob Smith alert(person.likes.browser); // Firefox alert(person['likes'].browser); // Firefox If you access something with more than one matching element, you get back an XMLList: alert(person.likes.language.length()); // 2 As with the DOM, * can be used to access all
child nodes: alert(person.likes.*.length()); // 4 While the . operator accesses direct
children of the given node, the .. 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 referen...
...And 10 more matches
nsIMsgThread
The nsIMsgFolder interface is used to interact with threads in Thunderbird. ...
... The nsIMsgFolder interface is used to interact with threads in Thunderbird. ...
... The nsIMsgFolder interface is used to interact with threads in Thunderbird. ...
...And 10 more matches
nsINavBookmarksService
void getBookmarkIdsForURI(in nsIURI aURI, [optional] out unsigned long count, [array, retval, size_is(count)] out long long bookmarks); Note: Renamed from getBookmarkFolders in Gecko 1.9 void getBookmarkIdsForURITArray(in nsIURI aURI, in PRInt64Array aResult); Native code only! ...
...nsIURI item, in PRInt32 index); Obsolete since Gecko 1.9 long long insertSeparator(in long long aParentId, in long aIndex); boolean isBookmarked(in nsIURI aURI); void moveFolder(in PRInt64 folder, in PRInt64 newParent, in PRInt32 index); Obsolete since Gecko 1.9 void moveItem(in long long aItemId, in long long aNewParentId, in long aIndex); void remove
ChildAt(in long long aFolder, in long aIndex); Obsolete since Gecko 2.0 void removeFolder(in long long aFolder); Obsolete since Gecko 2.0 void removeFolder
Children(in long long aItemId); void removeItem(in long long aItemId); void removeObserver(in nsINavBookmarkObserver observer); void replaceItem(in PRInt64 folder, in nsIURI item, in nsIURI newItem); Obsol...
...ContractId, in long aIndex ); Parameters aParentFolder The ID of the parent folder. aName The name of the new folder. aContractId The contract ID of the service which is to manipulate this container. aIndex The index to insert at, or DEFAULT_INDEX to append to the end of the list. Return value Returns the ID of the newly-inserted folder. createFolder() This method creates a new
child folder and inserts it under the given parent. long long createFolder( in long long aParentFolder, in AUTF8String name, in long index ); Parameters aParentFolder The ID of the parent folder. name The name of the new folder. index The index to insert at, or DEFAULT_INDEX to append to the end of the list. Return value Returns the ID of the newly-inserted folder. endUpda...
...And 10 more matches
nsISHEntry
nt from history. Inherits from: nsIHistoryEntry Last changed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Implemented by: @mozilla.org/browser/session-history-entry;1. ...
...n Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Implemented by: @mozilla.org/browser/session-history-entry;1. ...
... / SeaMonkey 2.3) Implemented by: @mozilla.org/browser/session-history-entry;1. ...
...And 10 more matches
Border-image generator - CSS: Cascading Style Sheets
================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* For IE 6/7 (trigger hasLayout) */ } /* GRID COLUMN SETUP * ========================================================================== */ .col { display: block; float:left; margin: 1% 0 1% 1.6%; } .col:first-
child { margin-left: 0; } /* all browsers except IE6 and lower */ /* * UI Component */ .ui-input-slider { height: 20px; font-family: "Segoe UI", Arial, Helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider * { float: left; height: 100%; line-height: 100%; } /* Input Slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px; text-align: c...
...lue; var input = new InputComponent(this); var slider_left = new SliderComponent(this, -1); var slider_right = new SliderComponent(this, 1); slider_left.className = 'ui-input-slider-left'; slider_right.className = 'ui-input-slider-right'; if (name) { var info = document.createElement('span'); info.className = 'ui-input-slider-info'; info.textContent = name; node.append
Child(info); } node.append
Child(slider_left); node.append
Child(input); node.append
Child(slider_right); this.input = input; sliders[topic] = this; setValue(topic, value); }; InputSlider.prototype.setInputValue = function setInputValue() { this.input.value = this.value.toFixed(this.precision) + this.unit; }; var setValue = function setValue(topic, value, send_notify) { var slide...
...de.getAttribute('data-topic'); var label = node.getAttribute('data-label'); var selected = node.getAttribute('data-selected') | 0; var select = document.createElement('div'); var list = document.createElement('div'); var uval = 0; var option = null; var option_value = null; list.className = 'ui-dropdown-list'; select.className = 'ui-dropdown-select'; while (node.firstElement
Child !== null) { option = node.firstElement
Child; option_value = option.getAttribute('data-value'); if (option_value === null) option.setAttribute('data-value', uval); list.append
Child(node.firstElement
Child); uval++; } node.append
Child(select); node.append
Child(list); select.onclick = this.toggle.bind(this); list.onclick = this.updateValue.bind(this); document.addEv...
...And 10 more matches
remote/parent - Archive of obsolete content
Enables you to load modules, and privileged parts of your add-on in general, into
child processes. Usage In multiprocess Firefox: the browser UI runs in one process, sometimes called the chrome process or the parent process web content runs in one or more other processes, sometimes called content processes or remote processes or
child processes. By default, add-ons run in the chrome process and can't directly access web content. In the SDK, content scripts run in the
child process, and, of course, can access web content. But content scripts don't have many more capabilities than untrusted web content. The sdk/remote/parent module enables you to load SDK modules into the
child process to give them direct access to content frames. These SDK modules have higher privileges than content ...
... frames. Frame Every DOM page loaded as a part of the application is loaded in a content frame. This includes the content of every tab in an application like Firefox and also some other UI elements. Each frame loads in a process but sometimes the application may choose to switch from loading a tab in one process to another. In this case the frame for that tab changes. Loading modules into the
child process To load a module into the
child process, use remoteRequire(): const { remoteRequire } = require("sdk/remote/parent"); remoteRequire("./my-module.js", module); Inter-process communication A module loaded into a different process cannot directly communicate or share state with the module that loaded it. Instead, the two sides communicate using port objects like those used for communicat...
...ire("./my-module.js", module); Inter-process communication A module loaded into a different process cannot directly communicate or share state with the module that loaded it. Instead, the two sides communicate using port objects like those used for communication with content scripts. ...
...And 9 more matches
Microsummary XML grammar reference - Archive of obsolete content
the microsummary created by the generator. uri (optional) A valid URI uniquely identifying the generator. Only relevant for generators dynamically created by Firefox code and extensions. Generators installed from the web via nsSidebar::addMicrosummaryGenerator are identified by the remote URL from which they were downloaded, and Firefox ignores the value of this attribute for them.
Child Elements: <template> (required) Defines how to transform pages into their microsummaries. <pages> (required) Identifies the set of pages that the generator is able to summarize. <update> (optional) Specifies how frequently Firefox should update the microsummaries. The <template> element The <template> element contains the XSLT stylesheet which transform...
...ow to transform pages into their microsummaries. <pages> (required) Identifies the set of pages that the generator is able to summarize. <update> (optional) Specifies how frequently Firefox should update the microsummaries. The <template> element The <template> element contains the XSLT stylesheet which transforms web pages into their microsummaries. Attributes: None.
Child Elements: <stylesheet> or <transform> (required) The XSLT stylesheet which performs the transformation. Per XSLT, you may specify the stylesheet
child element using either the <stylesheet> or the <transform> tag, which are interchangeable. Note: Although the <template> element must be in the microsummaries namespace (http://www.mozilla.org/microsummaries/0.1), its <stylesheet>/...
... The <pages> element The <pages> element identifies the set of pages that the generator is able to summarize. Attributes: None. ...
...And 9 more matches
Advanced Rules - Archive of obsolete content
This section describes the more advanced rule syntax. The Full Rule Syntax The rule syntax described so far is useful for some datasources but sometimes you will need to display data in more complicated ways. The simple rule syntax is really just a shortcut for the full rule syntax which is described below. Like the simple rules, full rules are placed within the rule tag. Full rules contain three
child tags, a conditions tag, a bindings tag and an action tag, although the bindings tag is not always needed. The conditions element is used to specify the criteria for matching a given resource. You can specify a number of conditions, all of which must match. In the simple rule syntax, the conditions are placed directly on the rule element itself. If the conditions match for a resource, the content ...
...he rule element itself. If the conditions match for a resource, the content placed within the actions tag is generated. In the simple syntax, the content is placed directly inside the rule. Rule Conditions When a tree, menu or other element with a datasource generates content, the template builder first finds the resource referred to by the ref attribute. It then iterates over all that resource's
child resources. It applies each resource to the conditions. If the conditions match for that resource, the content in the actions element is generated for that resource. If the conditions do not match, no content is generated. content element The conditions element can contain three elements. The first is the content element, which should always exist once and only once. It serves as a placeholder as ...
...ent containing the template. The syntax of the content element is as follows: <content uri="?var"/> The question mark indicates that the text following it is a variable. You can then use the variable 'var' within the remainder of the conditions. Of course, you can name the variable whatever you want. member element The next element is the member element, which is used to iterate through a set of
child resources. In RDF terms, that means a container such a Seq, Bag or Alt. Let's say you have a list of cities described in the following RDF/XML fragment: <RDF:Seq about="http://www.xulplanet.com/rdf/weather/cities"> <RDF:li resource="http://www.xulplanet.com/rdf/weather/city/Paris"/> <RDF:li resource="http://www.xulplanet.com/rdf/weather/city/Manchester"/> <RDF:li resource="http://www.xulpla...
...And 9 more matches
More Tree Features - Archive of obsolete content
eviousNext >> Here, we'll see more features of trees. Hierarchical trees The tree element is also used to create hierarchical lists, like that found in a file manager or a browser's bookmarks list. The tree view has a number of functions which specify the hierarchy of the items in a tree. Each item in the tree has a level starting at 0. The topmost items in the tree will have a level of 0, the
children of those items will have a level of 1, the
children below that will have a level of 2, and so on. The tree will query the view for the level of each item in order to determine how to draw the rows. The tree will draw the open and close icons to open and close a parent item as well as lines connecting the
children to their parents. The tree will also handle drawing the rows with the right level...
...You can repeat this process to create deeply nested trees. ...
...t level of indenting. However, the view will need to make sure it keeps track of the level of the rows as necessary. This can sometimes be quite tricky, but fortunately, the built-in content tree view does all of the hard work for us. To create a set of nested rows, all we need to do is add a second tree
children element inside the parent treeitem. You can then add items inside that to specify the
child rows of an item. Don't put the inner tree
children element inside the treerow as this won't work. You can repeat this process to create deeply nested trees. Essentially, a treeitem element can contain either single rows which are declared with the treerow element or a set of rows which are declared with the tree
children element. There are two other things you need to do to make sure the hierarchy ...
...And 9 more matches
XBL Example - Archive of obsolete content
, this widget might be useful for a set of images. We'll call this a slideshow element. Content of the Slideshow First, let's determine what elements need to go in the XBL content. Because we want page flipping, a deck element would be the most suitable to hold the page content. The content of the pages will be specified in the XUL file, not in XBL, but we'll need to add it inside the deck. ...
...ot in XBL, but we'll need to add it inside the deck. The
children tag will need to be used. Along the bottom, we'll need a button to go the previous page, a label to display the current page number, and a button to go to the next page. Example 1 : Source <binding id="slideshow"> <content> <xul:vbox flex="1"> <xul:deck xbl:inherits="selectedIndex" selectedIndex="0" flex="1"> <
children/> </xul:deck> <xul:hbox> <xul:button xbl:inherits="label=previoustext"/> <xul:label flex="1"/> <xul:button xbl:inherits="label=nexttext"/> </xul:hbox> </xul:vbox> </content> </binding> This binding creates the slideshow structure that we want. The flex attribute has been added to a number of elements so that it stretches in the right way. The l...
... </content> </binding> This binding creates the slideshow structure that we want. The flex attribute has been added to a number of elements so that it stretches in the right way. The label attributes on the two buttons inherit their values from the bound element. Here, they inherit from two custom attributes, previoustext and nexttext. This makes it easy to change the labels on the buttons. The
children of the element that the XBL is bound to will be placed inside the deck. The selectedIndex is inherited by the deck, so we may set the initial page in the XUL. The following XUL file produces the result in the image. <box class="slideshow" previoustext="Previous" nexttext="Next" flex="1"> <button label="Button 1"/> <checkbox label="Checkbox 2"/> <textbox/> </box> The style sheet used ...
...And 9 more matches
Flexbox - Learn web development
tools available for creating CSS layouts were things like floats and positioning. These are fine and they work, but in some ways they are also rather limiting and frustrating. The following simple layout requirements are either difficult or impossible to achieve with such tools, in any kind of convenient, flexible way: Vertically centering a block of content inside its parent. Making all the
children of a container take up an equal amount of the available width/height, regardless of how much width/height is available. Making all columns in a multiple column layout adopt the same height even if they contain a different amount of content. As you'll see in subsequent sections, flexbox makes a lot of layout tasks much easier. Let's dig in! Introducing a simple example In this article we a...
... 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. The result of this should be something like so: So, this single declaration gives us everything we need -- incredible, right? We have our multiple column layout with equal sized columns, and the columns are all the same height. This is because the default values given to flex items (the
children of the flex container) are set up to solve common problems such as this. ...
...columns, and the columns are all the same height. This is because the default values given to flex items (the
children of the flex container) are set up to solve common problems such as this. To be clear, let's reiterate what is happening here. The element we've given a display value of flex to is acting like a block-level element in terms of how it interacts with the rest of the page, but its
children are being laid out as flex items -- the next section will explain in more detail what this means. Note also that you can use a display value of inline-flex if you wish to lay out an element's
children as flex items, but have that element behave like an inline element. The flex model When elements are laid out as flex items, they are laid out along two axes: The main axis is the axis run...
...And 9 more matches
IAccessibleTable
other-licenses/ia2/AccessibleTable.idlNot scriptable This interface gives access to a two-dimensional table. 1.0 66 Introduced Gecko 1.9 Inherits from: IUnknown Last changed in Gecko 1.9 (Firefox 3) Typically all accessible objects that represent cells or cell-clusters of a table will be at the same time
children of the table. In this case IAccessible2.indexInParent() will return the
child index which then can be used when calling rowIndex() and columnIndex(). However, in some cases that kind of implementation will not be possible. When the table cells are not direct
children of a table, the object representing the cell can define a "table-cell-index" object attribute identifying the 0 based table cell index. This object attribute is obtained by parsing the att...
... cases that kind of implementation will not be possible. When the table cells are not direct
children of a table, the object representing the cell can define a "table-cell-index" object attribute identifying the 0 based table cell index. This object attribute is obtained by parsing the attribute string returned by IAccessible2.attributes(). The "table-cell-index" attribute can be used just like a
child index of the typical case. ATs should first test for the presence of the "table-cell-index" attribute and if it is not present then IAccessible2.indexInParent() can be used as in the typical case where cells are direct
children of the table. The range of valid coordinates for this interface are implementation dependent. However, that range includes at least the intervals from the from the first r...
...dependent. However, that range includes at least the intervals from the from the first row or column with the index 0 up to the last (but not including) used row or column as returned by nRows() and nColumns(). ...
...And 9 more matches
Block and Line Layout Cheat Sheet - Archive of obsolete content
t when the frame is being actively being reflowed. By default it is set in WillReflow(), and unset in DidReflow(). Many frames' Reflow() method verifies that the bit is set with an assertion. NS_FRAME_FIRST_REFLOW This flag is set on a newly created frame, and later cleared by the frame's Reflow() method when the frame has had its initial reflow. NS_FRAME_SYNC_FRAME_AND_VIEW NS_FRAME_OUTSIDE_
CHILDREN This flag is set if the combined area of a frame's
children extend past the frame's bounding box. (What is a frame's "bounding box"?) If this flag is set, then <code>mOverflowArea</code> will contain the total area of the frame, including the overflow. NS_FRAME_EXTERNAL_REFERENCE NS_FRAME_REPLACED_ELEMENT NS_FRAME_GENERATED_CONTENT NS_FRAME_HAS_LOADED_IMAGES NS_FRAME_OUT_OF_FLOW NS...
..._ELEMENT NS_FRAME_GENERATED_CONTENT NS_FRAME_HAS_LOADED_IMAGES NS_FRAME_OUT_OF_FLOW NS_FRAME_SELECTED_CONTENT NS_FRAME_IS_DIRTY NS_FRAME_IS_UNFLOWABLE An unflowable frame is an error condition; for example, due to system limitations. Currently, the only way to get an unflowable frame is to have a frame tree that is "too deep". (See nsFrame::IsFrameTreeTooDeep().) NS_FRAME_HAS_DIRTY_
CHILDREN NS_FRAME_HAS_VIEW NS_FRAME_INDEPENDENT_SELECTION NS_FRAME_IS_SPECIAL nsBlockFrame mFlags These flags are the private flags that are meaningful to block frames. NS_BLOCK_SHRINK_WRAP Causes the block to "shrink-wrap" around its content. This means the block will determine its
children's width and make its content area that wide. Finally, it will add padding and border to determine...
...Used in nsBlockReflowContext::ComputeCollapsedTopMargin(). ...
...And 8 more matches
Places Developer Guide
arksService.bookmarksMenuFolder - The contents of this folder are visible in the Bookmarks menu. nsINavBookmarksService.toolbarFolder - The contents of this folder are visible on the Bookmarks toolbar. nsINavBookmarksService.unfiledBookmarksFolder - Items that have been "starred", but not places in any folder. nsINavBookmarksService.tagsFolder - Subfolders of this folder are tags, and their
children are URIs that have been tagged with that folder's name. Other Bookmarks APIs Note: This document covers the toolkit Places services. However, Firefox developers can take advantage of several helper APIs that are browser-specific: FUEL - A collection of wrapper APIs for easing access to a number of Firefox utilities and services nsIPlacesTransactionsService - A Firefox service for modifyi...
...en item. String getItemGUID(aItemId) Obsolete since Gecko 14.0 - Returns a globally unique identifier for the item. This is mainly for use by extensions that sync bookmark data between different profiles. For bookmarks: nsIURI getBookmarkURI(aItemId) - Returns the URI of a bookmark item String getKeywordForBookmark(aItemId) - Returns a bookmark's keyword, or null For folders: Int64 get
ChildFolder(aFolderId, aSubfolderTitle) - Returns the id of the first subfolder matching the given title. Int64 getIdForItemAt(aFolderId, aPosition) - Returns the id of the item at the given position (throws if there's no item there). Bool getFolderReadonly(aFolderId) Accessing Folder Contents Queries in Places are executed through the main history service. The example below shows how to enumerate...
...vHistoryService); var query = history.getNewQuery(); query.setFolders([myFolderId], 1); var result = history.executeQuery(query, history.getNewQueryOptions()); // The root property of a query result is an object representing the folder you specified above. var folderNode = result.root; // Open the folder, and iterate over its contents. ...
...And 8 more matches
Adding sidebars - Archive of obsolete content
ostly empty panels. Decks and stacks Sometimes you'll need finer grained control than the one provided by a tabbox. In these cases the << XUL Reference << and << XUL Reference << elements are probably what you're looking for. They are extremely useful, and you'll find yourself using them in many situations besides sidebars. A deck is like a tabbbox without the tabs. It only displays one of its
child nodes at a time, depending on its selectedIndex value. In the following example, the second
child will be displayed, not the first which would be the default. <deck selectedIndex="2"> <hbox> <!-- Content for the first
child. --> </hbox> <hbox> <!-- Content for the second
child. --> </hbox> </deck> Note how this is one of the few cases where an attribute of an element is na...
...The code is easier to read and maintain this way. ...
...The code is easier to read and maintain this way. A deck can be very useful when you have a large piece of XUL code that only changes in a small way depending on different circumstances. ...
...And 7 more matches
Building Trees - Archive of obsolete content
action body should be a single treeitem with its rows and cells. ...
...This template uses the simple rule syntax. The extended syntax could also be used. ...
...rce: <tree datasources="profile:messages.sqlite" ref="*" querytype="storage" flags="dont-build-content"> <treecols> <treecol id="subject" label="Subject" flex="3"/> <treecol id="sender" label="Sender" flex="2"/> <treecol id="date" label="Date" flex="1"/> </treecols> <template> <query> select subject, sender, date from messages </query> <action> <tree
children> <treeitem uri="?"> <treerow> <treecell label="?subject"/> <treecell label="?sender"/> <treecell label="?date"/> </treerow> </treeitem> </tree
children> </action> </template> </tree> Features of the Tree Builder Besides the label of a cell, there are several other cell properties you can set when using the tree...
...And 7 more matches
Anonymous Content - Archive of obsolete content
<textbox/> <button label="Browse..."/> </content> </binding> Attaching this binding to an element will cause it to contain a field for entering text, followed by a Browse button. This inner content is created anonymously and cannot be seen using the DOM. Override the Bound Element The anonymous content is created automatically whenever a binding is attached to an element. If you place
child elements inside the XUL, they will override the elements provided by the binding. For example, take this XUL fragment, assuming it is bound to the scrollbar XBL earlier: <scrollbar/> <scrollbar> <button label="Overridden"/> </scrollbar> The first scroll bar, because it has no content of its own, will have its content generated from a binding definition declared in an XBL file. The second scro...
... something that isn't much of a scroll bar at all. Note that the built-in elements such as scroll bars get their XBL from the files in the bindings directory in the toolkit package. This only applies to the elements defined within the content tag. Properties, methods and other aspects of XBL are still available whether the content is from XBL or whether the XUL provides its own content. Using the
Children Element There may be times when you want both the XBL content and the content provided by the XUL file to be displayed. You can do this by using the
children element. The
children added in the XUL are added in place of the
children element. This is handy when creating custom menu widgets. For example, a simplified version of an editable menulist element, might be created as follows: XUL: <men...
...andy when creating custom menu widgets. ...
...And 7 more matches
Document Object Model - Archive of obsolete content
.hidden = false; var searchtext=document.getElementById('find-text').value; alert("Searching for \"" + searchtext + "\""); } Now, with that alert box in there, we know what should happen when we click the Find button. We could add additional code to get the selections from the drop-down boxes too. XUL Element DOM Every XUL element has a set of attributes, a set of properties and a set of
children. The attributes are declared in the source, for example, flex="1", is a flex attribute set to the value 1. Properties are available in JavaScript using the dot syntax. For example, element.hidden refers to the hidden property of an element. The
children are the
child tags of the element and will be nested inside the element in the source. It is possible to manipulate the attributes, pro...
... It is important to note that attributes and properties are separate things. ...
...imilar to the the getAttribute() function except an additional argument may be supplied to specify an attribute in a specific namespace. Many XUL elements have their own properties that are unique to that element. Refer to the element reference for a full guide to the attributes and properties available for an element. Navigating the DOM The DOM is a tree structure with a single root node with
children. You can get a reference to the root node using the document's documentElement property. The root node is always an element, but this is not the case for other nodes in the tree. An element corresponds to a tag is the XUL source, but you may also find text nodes, comment nodes and a few other types in a document tree. In the case of XUL, the root element will be the window tag in the XUL docum...
...And 7 more matches
Trees - Archive of obsolete content
ing advanced features, progress meters or checkboxes also can be added to the tree) A tree consists of two parts, the set of columns, and the tree body. The set of columns is defined by a number of treecol elements, one for each column. Each column will appear as a header at the top of the tree. The second part, the tree body, contains the data to appear in the tree and is created with a tree
children tag. The tree is unique in that the body of the tree consists only of a single widget which draws all of the data in the tree. This contrasts with the listbox, where individual listitem and listcell tags are used to specify the rows in the listbox. In a tree, all of the data to be displayed is supplied by a separate object, called a tree view. When it comes time to display a cell, the tree w...
...he tree. By using this element, you can specify additional information about how the data in the columns are sorted and if the user can resize the columns. You should always place an id attribute on a column, as Mozilla uses the ids to identify the columns when rearranging and hiding them. This is no longer required in Mozilla 1.8 and later, but it is still a good idea to use ids on columns. ...
...This declares an element that is used as a table or tree. As with HTML tables, the data in a tree is always organized into rows. The columns are specified using the treecols tag. You may place as many columns as you wish in a tree. ...
...And 7 more matches
Table Reflow Internals - Archive of obsolete content
flow command with itself as the target. Content is inserted, appended, or deleted through the DOM. The container posts a dirty reflow command with itself as the target. Style changes through the DOM - javascript, browser change font (CTRL+/-), a preference changes, etc. Review of Reflow Reflow starts with pres shell Which reflows the reflow root (usually the viewport frame), Which reflows it
children, etc. Ususally it starts when the pres shell processes its queue of reflow commands. The reflower Positions reflowee (if it can) before actually reflowing in case views are involved (e.g. absolutely positioned elements) Reflows reflowee and passes a reflow state (in) and a reflow metrics (in/out) Review of Reflow The reflow state: Is a node in a tree structurally equivalent to the fram...
... size (if requested) - the minimum size it can be preferred size (if requested) - the size it would like to be given no size constraints. desired size - the size it would like to be given the avail size. This is equivalent to preferred size if the avail size is not constrained. Review of Reflow The reflowee sets various sizes in the reflow metrics after (possibly) reflowing some or all of its
children which reflows it
children, etc. The reflowee returns a reflow status which indicates if it is complete, and thus not have to continue (split) breaking status (in the case of some inline frames) if there is truncation (it can't fit in the space and can't split). This is just a convience mechanism. Kinds of reflows Initial - reflowee's first reflow must be of this type (reflower's responsib...
...ce mechanism. Kinds of reflows Initial - reflowee's first reflow must be of this type (reflower's responsibility). Resize - reflowee gets a change in available space only. Similar to initial, except it can reoccur. Incremental - has a reflow path (tree) where each node has a command with a target frame, reflow command types are: dirty - something changed inside a target (e.g. it gains, loses
children) style changed - a target changed stylisticly (recall, size is a style property) content changed - a target's content changed (e.g. a text run) user defined - currently only used for fixed positioned frames Kinds of reflows Incremental reflow (continued) reflower not allowed to change available size of reflowee reflow commands get coalesced to streamline processing Style change a targe...
...And 7 more matches
Manipulating documents - Learn web development
ted by the DOM in browsers) is the actual page loaded into the window, and is represented in JavaScript by the Document object. You can use this object to return and manipulate information on the HTML and CSS that comprises the document, for example get a reference to an element in the DOM, change its text content, apply new styles to it, create new elements and add them to the current element as
children, or even delete it altogether. In this article we'll focus mostly on manipulating the document, but we'll show a few other useful bits besides. The document object model The document currently loaded in each one of your browser tabs is represented by a document object model. This is a "tree structure" representation created by the browser that enables the HTML structure to be easily access...
...he tree -- each one is called a node. You will also encounter various terms used to describe the type of node, and their position in the tree in relation to one another: Element node: An element, as it exists in the DOM. Root node: The top node in the tree, which in the case of HTML is always the HTML node (other markup vocabularies like SVG and custom XML will have different root elements).
Child node: A node directly inside another node. For example, IMG is a
child of SECTION in the above example. Descendant node: A node anywhere inside another node. For example, IMG is a
child of SECTION in the above example, and it is also a descendant. IMG is not a
child of BODY, as it is two levels below it in the tree, but it is a descendant of BODY. Parent node: A node which has another node insi...
...es: Nodes that sit on the same level in the DOM tree. For example, IMG and P are siblings in the above example. Text node: A node containing a text string. It is useful to familiarize yourself with this terminology before working with the DOM, as a number of the code terms you'll come across make use of them. You may have also come across them if you have studied CSS (e.g. descendant selector,
child selector). Active learning: Basic DOM manipulation To start learning about DOM manipulation, let's begin with a practical example. Take a local copy of the dom-example.html page and the image that goes along with it. Add a <script></script> element just above the closing </body> tag. To manipulate an element inside the DOM, you first need to select it and store a reference to it inside a v...
...And 7 more matches
Using the CSS Typed Object Model - Web APIs
We iterate through the s...
...We iterate through the style map, creating a <dt> and <dd> for each property an...
...We iterate through the style map, creating a <dt> and <dd> for each property and value respectively. In browsers that support computedStyleMap(), you'll see a list of all th...
...And 7 more matches
Notes on HTML Reflow - Archive of obsolete content
::StyleChangeReflow), and affect the entire frame tree. Other reflows are incremental and are dealt with asynchronously; for example, when content streams in from the network. Incremental reflows are queued by the presentation shell for batched dispatch. Reflow State The reflow state object, nsHTMLReflowState, is used to pass constraining information "down" from parent frames to
child frames. For example, a <div> with a constrained width (e.g., set via the CSS width property) would note this in the reflow state object before flowing its
children. When reflow begins, the root reflow state is initialized with information about the top-level container for the document's presentation; e.g., the width and height of the application window. This is passed as an argument to t...
...nitialized with information about the top-level container for the document's presentation; e.g., the width and height of the application window. This is passed as an argument to the Reflow method of the root frame in the frame hierarchy. Each container frame constructs a new reflow state object (based on its container's reflow state object) in which the container will reflow its
children. Most of the constraints in the new reflow state are computed when the state is created; for example, the available space in the new reflow state is computed by subtracting the container frame's border and padding from the parent reflow state's available space. Reflow Reason All reflows have a reason , which is maintained in the reflow state object (and may mutate, as described below)...
...he frame's internal state (e.g., a text frame's text) has changed; instead, a top-down change in the layout constraints has occurred. StyleChange, when the entire frame hierarchy must be traversed to recover from stylistic change; for example, a change in the default font size. Dirty, when a container frame has consolidated several individual Incremental reflows that have been targeted at its
child frames. Initial, incremental, resize, and style change reflows may each be performed as an immediate "global" reflow from the presentation shell: An initial reflow is performed when the presentation shell is initialized to flow the shell's initial frame hierarchy. Incremental reflows are dispatched en masse when the presentation shell's incremental reflow queue is asynchronou...
...And 6 more matches
Building accessible custom components in XUL - Archive of obsolete content
s are laid out within the grid element. If you want to navigate up one row, it is relatively easy to find the right cell; it's the previous sibling of the currently focused cell. Similarly, navigating down one row simply requires finding the next sibling of the currently focused cell. But navigating left and right is more difficult, since the cells are laid out in columns. We need to find the Nth
child of the previous column. (We could have laid out the grid by rows instead of columns, but that just shifts the complexity to a different navigation command.) Here is the keyboard navigation code: <code> const KEY_UP = 38; const KEY_DOWN = 40; const KEY_LEFT = 37; const KEY_RIGHT = 39; function cell_keypress(e) { var current = e.target; switch (e.keyCode) { case KEY_UP: spreads...
...null : arSiblings[row - 1]; } function find_cell_down(current) { var row = get_index_within_parent(current)...
...current); if (next) { next.focus(); } } function get_index_within_parent(current) { var arSiblings = current.parentNode.
childNodes; for (var i = 0; i < arSiblings.length; i++) { if (arSiblings[i] == current) { return i; } } return -1; } function find_cell_up(current) { var row = get_index_within_parent(current); var arSiblings = current.parentNode.
childNodes; return row == 0 ? null : arSiblings[row - 1]; } function find_cell_down(current) { var row = get_index_within_parent(current); var arSiblings = current.parentNode.
childNodes; return row == arSiblings.length - 1 ? null : arSiblings[row + 1]; } function find_cell_left(current) { var row = get_index_within_parent(current); var column = get_index_within_parent(current.
...And 6 more matches
Stacks and Decks - Archive of obsolete content
ates its own elements if you don't provide them. It also handles the moving of the scroll bar thumb. In the next few sections, we'll introduce some elements that are designed for holding other elements. They are all special types of boxes and allow all of the attributes of boxes on them. Stacks The stack element is a simple box. ...
...andles the moving of the scroll bar thumb. In the next few sections, we'll introduce some elements that are designed for holding other elements. They are all special types of boxes and allow all of the attributes of boxes on them. Stacks The stack element is a simple box. It works like any other box but has the special property that its
children are laid out all on top of each other. ...
...next few sections, we'll introduce some elements that are designed for holding other elements. They are all special types of boxes and allow all of the attributes of boxes on them. Stacks The stack element is a simple box. It works like any other box but has the special property that its
children are laid out all on top of each other. The first
child of the stack is drawn underneath, the second
child is drawn next, followed by the third and so on. Any number of elements may be stacked up in a stack. ...
...And 6 more matches
Pseudo-classes and pseudo-elements - Learn web development
If we wanted to make the first paragraph in an article larger and bold, we could add a class to that paragraph and then add CSS to that class, as shown in the first example below: However, this could be annoying to maintain -- what if a new paragraph got added to the top of the document? We'd need to move the class over to the new paragraph. Instead of adding the class, we could use the :first-
child pseudo-class selector -- this will always target the first
child element in the article, and we will no longer need to edit the HTML (this may not always be possible anyway, maybe due to it being generated by a CMS.) All pseudo-classes behave in this same kind of way. They target some bit of your document that is in a certain state, behaving as if you had added a class into your HTML. Take a l...
...arget the first
child element in the article, and we will no longer need to edit the HTML (this may not always be possible anyway, maybe due to it being generated by a CMS.) All pseudo-classes behave in this same kind of way. They target some bit of your document that is in a certain state, behaving as if you had added a class into your HTML. 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. In the example above, you could write :first-
child and the rule would apply to any element that is the first
child of an <article> element, not just a paragraph first
child -- :first-
child is equivalent to *:first-
child. However, usually you want more control than that, so...
...increases and decreases it will still only select the first line. It acts as if a <span> was magically wrapped around that first formatted line, and updated each time the line length changed. You can see that this selects the first line of both paragraphs. ...
...And 6 more matches
Styling tables - Learn web development
Normally, table columns tend to ...
...Normally, table columns tend to be sized according to how much content th...
...Normally, table columns tend to be sized according to how much content they contain, which produces some strange r...
...And 6 more matches
Client-side storage - Learn web development
erenced displayData() twice in our code already, so we'd probably better define it. ...
...ice in our code already, so we'd probably better define it. ...
...already, so we'd probably better define it. ...
...And 6 more matches
Working with JSON - Learn web development
th it. Populating the header Now that we've retrieved the JSON data and converted it into a JavaScript object, let's make use of it by writing the two functions we referenced above. First of all, add the following function definition below the previous code: function populateHeader(jsonObj) { const myH1 = document.createElement('h1'); myH1.textContent = jsonObj['squadName']; header.append
Child(myH1); const myPara = document.createElement('p'); myPara.textContent = 'Hometown: ' + jsonObj['homeTown'] + ' // Formed: ' + jsonObj['formed']; header.append
Child(myPara); } We named the parameter jsonObj, to remind ourselves that this JavaScript object originated from JSON. Here we first create an <h1> element with createElement(), set its textContent to equal the squadName property of ...
...We then do a very similar operation with a paragraph: create it, set its text content and append it to the header. The only difference is that its text is set to a concatenated string containing both the homeTown and formed properties of the object. ...
...This array contains multiple objects that contain the information for ea...
...And 6 more matches
Componentizing our Svelte app - Learn web development
a problem -- the todos aren't filtered. That's because the filter variable flows down from the Todos component to the FilterButton component through the prop, but changes occurring in the FilterButton component don't flow back up to its parent -- the data binding is one-way by default. Let's look at a way to solve this. ...
...m the Todos component to the FilterButton component through the prop, but changes occurring in the FilterButton component don't flow back up to its parent -- the data binding is one-way by default. Let's look at a way to solve this. Sharing data between components: passing a handler as a prop One way to let
child components notify their parents of any changes is to pass a handler as a prop. The
child component will execute the handler, passing the needed information as a parameter, and the handler will modify the parent's state. In our case, the FilterButton component will receive an onclick handler from its parent. Whenever the user clicks on any filter button, the
child will call the onclick handler, passing the selected filter as a parameter, back up to its parent. We will just declare t...
...tton {filter} onclick={ (clicked) => filter = clicked }/> When any filter button is clicked, we just update the filter variable with the new filter. Now our FilterButton component will work again. ...
...And 6 more matches
Message manager overview
Different tabs may run in different processes. Message managers are designed to enable code in one process to communicate with code in a different process. ...
...ts are called frame scripts, and as the name suggests, they are scoped to a specific browser frame. If chrome code wants to run code in the content process so it can access web content, this is usually the sort of message manager to use. Process message managers: these correspond to process boundaries, and enable code running in the parent (chrome) process to communicate with code running in the
child (content) process. From Firefox 38 onwards, they also enable code running in the parent process to load process scripts into the
child process. These are like frame scripts, except they are global to the
child process. Process scripts are most likely to be useful when chrome code wants to run some code only once in the content process, to access some global service: for example, to register an ob...
...er nsIMessageSender The browser message manager can be accessed as a property of the XUL <browser> element: // chrome script let browserMM = gBrowser.selectedBrowser.messageManager; Process message managers Process message managers correspond to process boundaries, and enable code running in different processes to communicate. Multiprocess Firefox has the concept of: a "parent process" "
child processes" which are processes spawned by the parent process. For practical purposes, in multiprocess Firefox the parent process is the chrome process, and
child processes are content processes. In each
child process, there's a single
child process message manager (CPMM). For each
child process message manager, there's a parent process message manager (PPMM) in the parent process. There's als...
...And 6 more matches
sslfnc.html
a NULL value or a value that is out of range for any of the parameters causes the server default value to be used in the server cache. The values that you pass affect only the server cache, not the client cache. ...
... client cache. Initializing Multi-Processing with a Shared SSL Server Cache To start a multi-processing application, the initial parent process calls SSL_ConfigMPServerSIDCache, and then creates
child processes, by one of these methods: Call fork and then exec (Unix) Call CreateProcess (Win32) Call PR_CreateProcess (both Unix and Win32) It is essential that the parent allow the
child to inherit the file descriptors. WIN32's CreateProcess takes an argument that tells it whether or not to permit files to be inherited; this argument must be TRUE. When a new
child that has been created by either CreateProcess or exec begins, it may have inherited file descriptors (FDs), but not the parent's memory. Therefore, to find out what FDs it has inherited, it must be told about them. T...
...memory. Therefore, to find out what FDs it has inherited, it must be told about them. To that end, the function SSL_ConfigMPServerSIDCache sets an environment variable named SSL_INHERITANCE. The value of the variable is a printable ASCII string, containing all the information needed to set up and use the inherited FDs. ...
...And 6 more matches
Mail and RDF
accounts:/. From this resource, you can follow a number of arcs to find servers, folders, and finally messages. Eventually we'll probably hang mail filters, annotations, etc, off of nodes in the graph. Here is an example of how this might be set up: In this tree-style representation of an RDF graph, I've made arcs italic and resources bold. ...
...annotations, etc, off of nodes in the graph. Here is an example of how this might be set up: In this tree-style representation of an RDF graph, I've made arcs italic and resources bold. ...
... | imap://alecf@imap.mywork.com | +-- http://home.netscape.com/NC-rdf#IsServer --> "true" | +-- http://home.netscape.com/NC-rdf#
child --> | imap://alecf@imap.mywork.com/INBOX | +-- http://home.netscape.com/NC-rdf#TotalMessages --> "4" | +-- http://home.netscape.com/NC-rdf#IsServer --> "false" | +-- http://home.netscape.com/NC-rdf#Message
Child --> | | imap_message://alecf@imap.mywork.com/INBOX#1 | +-- http://home.netscape.com/NC-rdf#Message
Child --> | | imap_message://alecf@imap.mywork.com/INBOX#2 | +-- http://home.netscape.com/NC-rdf#Message
Child --> | | imap_message://alecf@imap.mywork.com/INBOX#3 | +-- http://home.netscape.com/NC-rdf#Message
Child --> | ...
...And 6 more matches
Adding items to the Folder Pane
Clicking on those items will display the number in the main viewing pane of Thunderbird. First, some necessary background on how the Folder Pane constructs the data it displays. The Folder Pane tracks modifications to a user's folders and accounts. ...
...a in a property called _rowMap. This property is an array of folder-tree-items. Each item in this array satisfies the following interface: id (attribute) a unique string for this object. Must persist over sessions text (attribute) the text to display in the tree level (attribute) the level in the tree to display the item at open (rw, attribute) whether or not this container is open
children (attribute) an array of
child items also conforming to this spec getProperties (function) a call from getRowProperties or getCellProperties for this item will be passed into this function command (function) this function will be called when the item is double-clicked For our example extension, two different types of folder-tree-items will be defined. First, our "Numbers" container lo...
... will be passed into this function command (function) this function will be called when the item is double-clicked For our example extension, two different types of folder-tree-items will be defined. ...
...And 6 more matches
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
, and a <span> is inline-level. Using the display property we can switch between block and inline. For example to make a heading inline we would use the following CSS: h1 { display: inline; } More recently we have gained CSS Grid Layout and Flexbox. To access these we also use values of the display property -- display: grid and display: flex. Only when the value of display is changed do the
children become flex or grid items and begin to respond to the other properties in the grid or flexbox specifications. Changing an element's display value changes the formatting context of its direct
children. What grid and flexbox demonstrate, however, is that an element has both an outer and an inner display type. The outer display type describes whether the element is block-level or inline-level. T...
...to respond to the other properties in the grid or flexbox specifications. Changing an element's display value changes the formatting context of its direct
children. What grid and flexbox demonstrate, however, is that an element has both an outer and an inner display type. The outer display type describes whether the element is block-level or inline-level. The inner display type describes how the
children of that box behave. As an example, when we use display: flex we create a block-level container, with flex
children. The
children are described as participating in a flex formatting context. You can see this if you take a <span> -- normally an inline-level element -- and apply display: flex to it. The <span> becomes a block-level element. It behaves as block-level things do in relationship to ...
...ren are described as participating in a flex formatting context. You can see this if you take a <span> -- normally an inline-level element -- and apply display: flex to it. The <span> becomes a block-level element. It behaves as block-level things do in relationship to other boxes in the layout. It's as if you had applied display: block to the span, however we also get the changed behavior of the
children. The live example below has a <span> with display: flex applied. It has become a block-level box taking up all available space in the inline direction. You can now use justify-content: space-between; to put this space between the two flex items. We can create inline flex containers. If you create a flex container using the single value of inline-flex you will have an inline-level box with ...
...And 6 more matches
Object.prototype.constructor - JavaScript
g() function String() { [native code] },false,test // 'test' Changing the constructor of a function Mostly this property is used for defining a function as a function-constructor with further calling it with new and prototype-inherits chain. function Parent() { /* ... */ } Parent.prototype.parentMethod = function parentMethod() {} function
Child() { Parent.call(this) // Make sure everything is initialized properly }
Child.prototype = Object.create(Parent.prototype) // re-define
child prototype to Parent prototype
Child.prototype.constructor =
Child // return original constructor to
Child But when do we need to perform the last line here? Unfortunately, the answer is: it depends. Let's try to define the cases in which re-assignment ...
... this.constructor() } new CreatedConstructor().create().create() // it's pretty fine Ok, now it's pretty clear why changing the constructor can be useful. Let's consider one more case. ...
...ate() // it's pretty fine Ok, now it's pretty clear why changing the constructor can be useful. Let's consider one more case. ...
...And 6 more matches
Menus - Archive of obsolete content
which sit on a menubar or are attached to buttons. Submenus may be created by nesting one menu inside of another. No special code needs to be written to open or close a menu or submenu, and, in addition, the menus are placed on screen in the appropriate locations automatically. There are four elements that a menupopup can be attached to. In each case, the menupopup element is placed as a direct
child of the element. The following is a brief summary of these elements, examples of each will be provided later. menu The menu tag is used when placing menus on a menu bar. For example, the File and Edit menus along the top of an application window (or the menubar on the top of screen). This type of menu is usually used for commands that apply to the entire application. Commands that don't apply ...
...e are five tags used in this example, described briefly here: menubar A row of menus that appears along the top of the window or screen. It should contain menu elements. menu A label of a menu on a menubar, for instance 'File' or 'Tools'. A menu can also be used as the label of a submenu. menupopup A popup containing items to appear on a menu. The menupopup in the example above is a
child of the 'File' menu and will appear when the menu label is clicked. menuitem A single item to appear on a menu. When the user moves the mouse over a menuitem, it will highlight the item. The cursor keys can also be used to adjust which menuitem is the current item. A menuitem is associated with a command to carry out. menuseparator A separator between items in a menu. In the example ab...
...an do this by adding a flexible spacer. <menubar id="sample-menubar"> <menu id="file-menu" label="File"> ... </menu> <spacer flex="1"/> <image src="logo.png"/> </menubar> In this example, a logo image is placed on the end of a menubar. The menupopup element The menupopup element is the popup that displays the menu items. When used for menus on a menubar, the menupopup should be a
child of the menu element. The following shows a simple Help menu. <menu label="Help"> <menupopup> <menuitem label="Contents"/> <menuitem label="Search Help"/> </menupopup> </menu> Normally, a menupopup is hidden. When the 'Help' label is pressed, the menupopup is displayed over top of the window, aligned along the bottom of the Help menu label. When a menu command is selected or the men...
...And 5 more matches
Styling a Tree - Archive of obsolete content
headers in the same way as other elements. Style added to the tree element will apply to the entire tree. Adding a style to the treecol element does not cause the style to be applied to the column but only to the header. 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. The outer tree
children is the only real element in the tree body. The inner elements are just placeholders. Setting Properties Instead, you must use the properties attribute on the rows or cells to set one or more named properties. This can be used with trees with static content, RDF built content or with those with a custom view. Let's say we want a particular row to have a blue background color. This would be us...
...nread messages or labels. You can think of the properties as functioning much like style classes, although they require a somewhat more complex syntax to use in a style sheet. This is because you can specify the style for a number of parts of the cell individually. You can style not only the cell and its text, but the twisty and indentation. The following is the syntax that needs to be used: tree
children::-moz-tree-row(makeItBlue) { background-color: blue; } This style which has a complex selector is used to style the background color of rows that have the 'makeItBlue' property. This special syntax is needed because the cells themselves are not separate elements. All of the content inside the tree's body is rendered by the tree
children element. However, CSS has a concept to access parts of...
... is used to style the background color of rows that have the 'makeItBlue' property. This special syntax is needed because the cells themselves are not separate elements. All of the content inside the tree's body is rendered by the tree
children element. However, CSS has a concept to access parts of elements considering them to be pseudo-elements. This selector matches some tree rows inside the tree
children element as pseudo-elements. The style sets style rules for particular parts of what it displays. This style rule means, inside a tree
children element, set the background color to blue for all tree rows that have the 'makeItBlue' property. The text '::-moz-tree-row' specifies what content area is desired, which in this case is a row. You can also use the following values: ::-moz-tree-cell: ...
...And 5 more matches
Making asynchronous programming easier with async and await - Learn web development
ok back at a simple fetch example that we saw in the previous article: fetch('coffee.jpg') .then(response => { if (!response.ok) { throw new Error(`HTTP error! ...
...t to see how much simpler it makes things: async function myFetch() { let response = await fetch('coffee.jpg'); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } else { let myBlob = await response.blob(); let objectURL = URL.createObjectURL(myBlob); let image = document.createElement('img'); image.src = objectURL; document.body.append
Child(image); } } myFetch() .catch(e => { console.log('There has been a problem with your fetch operation: ' + e.message); }); It makes code much simpler and easier to understand -- no more .then() blocks everywhere! Since an async keyword turns a function into a promise, you could refactor your code to use a hybrid approach of promises and await, bringing the second half of the function out int...
... But how does it work? You'll note that we've wrapped the code inside a function, and we've included the async keyword before the function keyword. This is necessary -- you have to create an async function to define a block of code in which you'll run your a...
...And 5 more matches
Third-party APIs - Learn web development
he request by passing our url variable to fetch(), convert the response body to JSON using the json() function, then pass the resulting JSON to the displayResults() function so the data can be displayed in our UI. Displaying the data OK, let's look at how we'll display the data. Add the following function below your fetchResults() function. ...
... variable to fetch(), convert the response body to JSON using the json() function, then pass the resulting JSON to the displayResults() function so the data can be displayed in our UI. Displaying the data OK, let's look at how we'll display the data. Add the following function below your fetchResults() function. ...
...), convert the response body to JSON using the json() function, then pass the resulting JSON to the displayResults() function so the data can be displayed in our UI. Displaying the data OK, let's look at how we'll display the data. Add the following function below your fetchResults() function. ...
...And 5 more matches
Accessible Toolkit Checklist
API or OS-theme support. In this case, adding a complete or even a partial accessibility solution is major work, and will require more than one full time person as well as cooperation from Windows assistive technology vendors when parts of your MSAA solution isn't working. Often these kinds of toolkits don't use a separate window for each control; in that case remember to generate a unique 32 bit
child ID for each control so that the MSAA event system can call back for the right IAccessible for each event. The Checklist This checklist is currently only for Microsoft Windows, but should be expanded to include information about Linux and OS X. It is maintained by the Mozilla Accessibility Community. Contributions are welcome. General Dialogs/windows/general Escape key cancels dialo...
...MSAA support needs to know what label goes with what widget. MSAA support: expose window with ROLE_DIALOG, unless it's already the standard dialog window class #32770. If you don't, some screen readers won't automatically read the dialog when it receives focus. Expose status bars with ROLE_STATUSBAR, unless they already use the standard window class msctls_statusbar32. ...
...rs won't automatically read the dialog when it receives focus. Expose status bars with ROLE_STATUSBAR, unless they already use the standard window class msctls_statusbar32. Make sure that parent-
child relationships are exposed correctly in each window's MSAA tree General MSAA support Focus events Handling event callbacks, which requires a unique ID for each non-windowed
child of every widget that can be focused or have any other event associated with it. ...
...And 5 more matches
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
yet understand that they // are safe for chrome code to use, so we must tell it // so explicitly. ...
...s that include //
children. Remember that 'null' is a valid site, // representing the root. var totals = new Map; for (let [site, count] of counts) { for(;;) { if (!totals.has(site)) totals.set(site, 0); totals.set(site, totals.get(site) + count); if (!site) break; site = site.parent; } } // Compute parent-to-
child links, since saved stack frames // have only parent links. ...
...esenting the root. var totals = new Map; for (let [site, count] of counts) { for(;;) { if (!totals.has(site)) totals.set(site, 0); totals.set(site, totals.get(site) + count); if (!site) break; site = site.parent; } } // Compute parent-to-
child links, since saved stack frames // have only parent links. ...
...And 5 more matches
KeyboardEvent.key - Web APIs
e="test-target" id="test-target"></textarea> <button type="button" name="btn-clear-console" id="btn-clear-console">clear console</button> </div> <div class="flex"> <pre id="console-log"></pre> </div> </div> CSS .fx { -webkit-display: flex; display: flex; margin-left: -20px; margin-right: -20px; } .fx > div { padding-left: 20px; padding-right: 20px; } .fx > div:first-
child { width: 30%; } .flex { -webkit-flex: 1; flex: 1; } #test-target { display: block; width: 100%; margin-bottom: 10px; } JavaScript let textarea = document.getElementById('test-target'), consoleLog = document.getElementById('console-log'), btnClearConsole = document.getElementById('btn-clear-console'); function logMessage(message) { document.getElementById("console-log").innerH...
... Case 1 When the shift key is pressed, a keydown event is first fired, and the ke...
... Case 1 When the shift key is pressed, a keydown event is first fired, and the key property value is set ...
...And 5 more matches
Architecture - Accessibility
hierarchy to make it easy for nsHyperTextAccessible to piece its text representation together. Everything else uses whatever nsAccessible-derived implementation that's appropriate. If it has text siblings, then it gets exposed as the unicode char for an embedded object, which is '\xfffc' within the parent nsHyperTextAccessible. In addition, nsIAccessibleHyperLink is implemented on any non-text
child inside a container that also has text. This allows AT's to find its position within that text, because the hyperlink interface exposes a start and end index. In fact, the end index will always be 1 larger than the start index, because the object is always represented by a single '\xfffc' character. If you want to know that something is really a link, check to see if it is ROLE_LINK. HTML contai...
...will always be 1 larger than the start index, because the object is always represented by a single '\xfffc' character. If you want to know that something is really a link, check to see if it is ROLE_LINK. HTML containers are implemented by nsHyperTextAccessible. They support the nsIAccessibleHyperText is implemented on any container element that has both text and embedded objects for accessible
children. Why HyperLink is often not a link As explained above, anything that is embedded in text implements the Hyperlink interface. While it is odd to call non-link objects a link, this was a necessary compromise in the newatk design because it is necessary to know where objects exist within their containing text. Previously the hyper link interface was really only for links, but the design could no...
...ly the hyper link interface was really only for links, but the design could not fully represent an HTML document hierarchy. Keeping the link name of the interface is unfortunate but necessary for backwards compatibility, without introducing superfluous interfaces. API comparison nsIAccessible (internal). When you have an nsIAccessibleHyperText, you can ask for its links, which is the subset of
children from the nsIAccessible hierarchy that are not text or whitespace. ATK: Same as nsIAccessible, except that text and whitespace leaf nodes are not exposed. The
children of any Hypertext object are an exact match to the links it exposes. The implementation simply doesn't create AtkObjects for a whitespace or text leaf nsIAccessibles. See the ATK uses of IsEmbeddedObject() for more information o...
...And 5 more matches
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
the parent having display: flex applied, the floating and clearing will no longer happen, and the item will not be taken out of normal flow in the way that floats are. If you have used the vertical-align property, as used with inline-block or table layout for alignment, this will no longer affect the item and you can use the alignment properties of flexbox instead. In this next live example the
child elements have been floated, and then their container has had display: flex added. If you remove display: flex, you should see that the .box element collapses as we have no clearing applied. This demonstrates that the float is happening. Re-apply display: flex and the collapsing does not happen. This is because the items no longer have a float applied, as they have been transformed into flex items...
...into flex items. Flexbox and Grid Layout CSS Grid Layout and Flexbox generally act in the same way with regards to overwriting other methods. You might however want to use flexbox as a fallback for grid layout, as there is better support for flexbox in older browsers. This approach works very well. If a flex item becomes a grid item, then the flex properties that may have been assigned to the
child elements will be ignored. You can use the Box Alignment properties across both layout methods, so using flexbox as a fallback for grid layout can work very well. Flex and grid -- what's the difference? A common question is to ask what the difference is between Flexbox and CSS Grid Layout -- why do we have two specifications that sometimes appear to be doing the same thing? The most straightfo...
...s from flex layout, and demonstrates some of the extra functionality you get when using Grid Layout such as layering of items on the grid. This may also help in your decision as to which layout method to use. ...
...And 5 more matches
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
You can see auto-placement in action in the simplest of ways by creating a grid on a set of items. If you give the items no placement information they will position themselves on the grid, one in each grid cell. ...
...The default flow is to arrange items by row. Grid will lay an item out into each cell of row 1. If you have created additional rows using the grid-template-rows property then grid will continue placing items in these rows. If the grid does not have enough rows in the explicit grid to place all of the items new implicit rows will be created. ...
...In this next example I have added to the layout by setting odd items to span two tracks both for rows and columns. I do this with the grid-column-end and grid...
...And 5 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. For boxes that have horizontal orientation, it specifies how its
children will be aligned vertically. For boxes that have vertical orientation, it specifies how its
children will be aligned horizontally. start
Child elements are aligned starting from the left or top edge of the box. ...
...ren. For boxes that have horizontal orientation, it specifies how its
children will be aligned vertically. For boxes that have vertical orientation, it specifies how its
children will be aligned horizontally. start
Child elements are aligned starting from the left or top edge of the box. If the box is larger than the total size of the
children, the extra space is placed on the right or bottom side. 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. ...
...If the box is larger than the total size of the
children, the extra space is placed on the left or top side. baseline This value applies to horizontally oriented boxes only. It causes the
child elements to be aligned so that their text labels are lined up. ...
...And 4 more matches
Dynamically modifying XUL-based user interface - Archive of obsolete content
ingle window, when there is an <iframe>, <browser>, or a <tabbrowser> element. You must be sure to always manipulate the correct document. (Read more about this in Working with windows in chrome code.) When your script is included using a <script> tag, the document property references the DOM document that includes the script. Examples: Using DOM methods This section demonstrates the use of append
Child(), createElement(), insertBefore(), and remove
Child() DOM methods. Removing all
children of an element This example removes all
children of an element with id=someElement from the current document, by calling remove
Child() method to remove the first
child, until there are no
children remaining. Note, that has
ChildNodes() and first
Child are also part of the DOM API. var element = document.getEleme...
...emove
Child() DOM methods. Removing all
children of an element This example removes all
children of an element with id=someElement from the current document, by calling remove
Child() method to remove the first
child, until there are no
children remaining. Note, that has
ChildNodes() and first
Child are also part of the DOM API. var element = document.getElementById("someElement"); while(element.has
ChildNodes()){ element.remove
Child(element.first
Child); } Inserting menu items to a menu This example adds two new menu items to a <menupopup>: to the start and to the end of it. It uses document.createElementNS() method to create the items, and insertBefore() with append
Child() to insert the created xml elements within the document. Note: document.createElementNS() creates an element, but ...
...u This example adds two new menu items to a <menupopup>: to the start and to the end of it. It uses document.createElementNS() method to create the items, and insertBefore() with append
Child() to insert the created xml elements within the document. Note: document.createElementNS() creates an element, but does not put it anywhere in the document. You need to use other DOM methods, such as append
Child() to insert the newly created element in the document. append
Child() appends the node after all other nodes, while insertBefore() inserts the node before the node referenced by its second parameter. function createMenuItem(aLabel) { const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var item = document.createElementNS(XUL_NS, "menuitem"); // create a new XUL me...
...And 4 more matches
ContextMenus - Archive of obsolete content
normally. Naturally, it only makes sense to have one default item per context menu. Note that the default attribute just affects how the item is displayed, it performs no other function itself. You will still need to associate code with the element to handle the default operation. Menu Separators To group menu items together for better visual clarity, use a menu separator. <menuseparator/>
Child Context Menus Sometimes it may be convenient to place the menupopup for the context menu as a
child of the element the menu is associated with instead of referring to the menupopup by id. This may be useful, for example, when a context menu is associated with only 1 element. It is also useful in XBL bindings, as you wouldn't want to refer to a popup by id in this case. If the context attribute ...
...es it may be convenient to place the menupopup for the context menu as a
child of the element the menu is associated with instead of referring to the menupopup by id. This may be useful, for example, when a context menu is associated with only 1 element. It is also useful in XBL bindings, as you wouldn't want to refer to a popup by id in this case. If the context attribute is set to the value '_
child', the context menu is found by examining the
children of the element instead of looking for a menupopup with the given id. ...
... by id. This may be useful, for example, when a context menu is associated with only 1 element. It is also useful in XBL bindings, as you wouldn't want to refer to a popup by id in this case. If the context attribute is set to the value '_
child', the context menu is found by examining the
children of the element instead of looking for a menupopup with the given id. For example: <vbox context="_
child"> <label value="Hello"/> <menupopup> <menuitem label="Cut"/> <menuitem label="Copy"/> <menuitem label="Paste"/> </menupopup> </vbox> In this sample, the context menu is found as the
child of the vbox, because the context attribute is set to '_
child'. Note that this special value must begin with an underscore to distinguish it from an id of '
child'. The menupopup does not have ...
...And 4 more matches
Adding Methods to XBL-defined Elements - Archive of obsolete content
f methods is as follows: <implementation> <method name="method-name"> <parameter name="parameter-name1"/> <parameter name="parameter-name2"/> . . . <body> <-- method script goes here --> </body> </method> </implementation> A method declaration goes inside the implementation element, like the fields and properties do. 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. The value of the name attribute becomes the name of the method. Similarly, the name attributes on the parameter elements become the names of each parameter. Each parameter element is used to declare one parameter for the method. For example, if the method had three paramete...
...rom a method body or elsewhere. These elements are created anonymously and are not accessible from the regular DOM functions. They are hidden so that developers do not need to know how the element is implemented to use it. However, there is a special way of getting this anonymous content. Elements with an XBL behavior attached to them have a special property which holds an array of the anonymous
child elements inside it. Each element of the array stores each direct
child element of the XBL-defined element. This special property cannot be accessed directly. Instead, you must call the document's getAnonymousNodes() method: var value=document.getAnonymousNodes(element); Here, 'element' should be set to a reference to the element that you want to get the anonymous content of. The function return...
...y> </method> </implementation> </binding> Two buttons added to the XUL have oncommand handlers which are used to change the visibility of the label. Each calls the 'showTitle' method. This method checks to see whether the element is being hidden or shown from the 'state' parameter that is passed in. In either case, it grabs the first element of the anonymous array. This refers to the first
child in the content element, which here is the first label widget. The visibility is changed by modifying the style on the element. Accessing from Inside the Anonymous Content To go the other way, and get the bound element from inside the anonymous content, you can use the getBindingParent method of the document to get the element that the binding is bound to. You can also use the the parentNode pro...
...And 4 more matches
Trees and Templates - Archive of obsolete content
dont-build-content, as used in the example above, indicates that the tree builder should be used. If you leave the attribute out, the content builder will be used. You can see the difference by using Mozilla's DOM Inspector on a tree with and without the flag. If you do use a content builder instead, note that the content won't generally get built until it is needed. With hierarchical trees, the
children don't get generated until the parent nodes have been opened by the user. In the template, there will be one treecell for each column in the tree. The cells should have a label attribute to set the label for the cell. This would normally be set to an RDF property so that the label is pulled from the datasource. Template-built Tree Example The following example demonstrates a template-built tree...
...ng example demonstrates a template-built tree, in this case for the file system. ...
...The tree should display a list of the files in the root directory. Only one rule is used, but you may add others if needed. ...
...And 4 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. For boxes that have horizontal orientation, it specifies how its
children will be aligned vertically. For boxes that have vertical orientation, it is used to specify how its
children are algined horizontally. The pack attribute is related to the alignment but is used to specify the position in the opposite direction. You can also specify the value of align using the style property -moz-box-align. Parameters start
Child elements are aligned starting from the left or top edge of the box. If the box is larger than the total size of the
children, the extra space is placed on the right or bottom side. center Extra space is split equally ...
...ed to specify the position in the opposite direction. You can also specify the value of align using the style property -moz-box-align. Parameters start
Child elements are aligned starting from the left or top edge of the box. If the box is larger than the total size of the
children, the extra space is placed on the right or bottom side. center Extra space is split equally along each side of the
child elements, resulting the
children being placed in the center of the box. ...
...If the box is larger than the total size of the
children, the extra space is placed on the left or top side. baseline This value applies to horizontally oriented boxes only. It causes the
child elements to be aligned so that their text labels are lined up. ...
...And 4 more matches
listbox - Archive of obsolete content
If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it do...
...If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it ...
...If this attribute is set, the element is disabled. ...
...And 4 more matches
Making decisions in your code — conditionals - Learn web development
(condition) code to run if condition is true else run some other code instead This is perfectly valid code, but using it is not recommended -- it is much easier to read the code and work out what is going on if you use the curly braces to delimit the blocks of code, and use multiple lines and indentation. A real example To understand this syntax better, let's consider a real example. ...
...this syntax better, let's consider a real example. Imagine a
child being asked for help with a chore by their mother or father. The parent might say "Hey sweetheart! If you help me by going and doing the shopping, I'll give you some extra allowance so you can afford that toy you wanted." In JavaScript, we could represent this like so: let shoppingDone = false; if (shoppingDone === true) { let
childsAllowance = 10; } else { let
childsAllowance = 5; } This code as shown always results in the shoppingDone variable returning false, meaning disappointment for our poor
child. It'd be up to us to provide a mechanism for the parent to set the shoppingDone variable to true if the
child did the shopping. Note: You can see a more complete version of this example on GitHub (also see it running liv...
...else It is perfectly OK to put one if...else statement inside another one -- to nest them. For example, we could update our weather forecast application to sho...
...And 4 more matches
Introduction to client-side frameworks - Learn web development
one of those tasks to our user? We want to represent each task as a list item - an HTML <li> element inside of an unordered list element (a <ul>). How do we make it? That could look something like this: function buildTodoItemEl(id, name) { const item = document.createElement('li'); const span = document.createElement('span'); const textContent = document.createTextNode(name); span.append
Child(textContent) item.id = id; item.append
Child(span); item.append
Child(buildDeleteButtonEl(id)); return item; } Here, we use the document.createElement() method to make our <li>, and several more lines of code to create the properties and
children it needs. The tenth line of this snippet references another build function: buildDeleteButtonEl(). It follows a similar pattern to the one we ...
...perties and
children it needs. The tenth line of this snippet references another build function: buildDeleteButtonEl(). It follows a similar pattern to the one we used to build a list item element: function buildDeleteButtonEl(id) { const button = document.createElement('button'); const textContent = document.createTextNode('Delete'); button.setAttribute('type', 'button'); button.append
Child(textContent); return button; } This button doesn't do anything yet, but it will later once we decide to implement our delete feature. The code that will render our items on the page might read something like this: function renderTodoList() { const frag = document.createDocumentFragment(); state.tasks.forEach(task => { const item = buildTodoItemEl(task.id, task.name); frag.appendC...
...ton doesn't do anything yet, but it will later once we decide to implement our delete feature. ...
...And 4 more matches
Accessibility API cross-reference
command A supporting section of the document, designed to be complementary to the main content at a similar level in the DOM hierarchy, but remains meaningful when separated from the main content. complementary <aside> n/a but <Div> or even <p> have been suggested for this purpose A widget that may contain navigable descendants or owned
children. composite (abstract role) A large perceivable region that contains information about the parent document such as copyright, authors' names etc. contentinfo <footer> Page footers are often tagged as an Artifact (not "real" content) with the 'contentinfo' provided as document level XMP metadata instead The mouse point...
...a Graphic that indicates something, such as an arrow INDICATOR n/a n/a n/a Abstract role - A generic type of widget that allows user input. ...
...allows user input. input n/a Hypertext link that can be on image or text LINK n/a link <a> <Link> According to the PDF 1.7 spec, a <Link> must not be a direct
child of a <TOCI> (table of contents item). In such a case, they should be wrapped in a <Reference> Pragmatically however, user agents should expect to find <Link> tags as direct
children of <TOCI> Abstract role - A perceivable section containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to navigate to the section easily and to have it listed in a summary of the page. Such a page summary could be generated dynamically by a user agent or assistive technology. ...
...And 4 more matches
Introduction to Layout in Mozilla
notifications Passes these to the style set object, who in turn passes to the frame constructor Fr...
...notifications Passes these to the style set object, who in turn passes to the frame constructor Frame constructor...
...notifications Passes these to the style set object, who in turn passes to the frame constructor Frame constructor creates frames...
...And 4 more matches
nsIAccessible
ible.getState() to get states of the accessibe nsIAccessible.name, nsIAccessible.value to get the name and the value of the accessible Tree navigation You can navigate through the accessible tree by the following methods and attributes. nsIAccessible.parent to get the parent accessible nsIAccessible.nextSibling, nsIAccessible.previousSibling to get sibling accessibles nsIAccessible.first
Child, nsIAccessible.last
Child to get first and last
child nsIAccessible.
children, nsIAccessible.get
ChildAt(), nsIAccessible.
childCount to navigate through the
children by index Accessible position You can use nsIAccessible.indexInParent to get accessible index in its parent. Use nsIAccessible.groupPosition() to get information about this accessible in its group. Relations Many accessibles are linke...
...r accessible (for example, html:label and html control) then these accessibles are related, please refer to relations documentation for more information. You can get related accessibles by methods nsIAccessible.getAccessibleRelated() nsIAccessible.getRelations() nsIAccessible.getRelation() and nsIAccessible.relationsCount. Focus and selection In order to focus an accessible or get focused
child accessible use nsIAccessible.takeFocus() and nsIAccessible.focused
Child. To select an accessible you can use nsIAccessible.setSelected(), nsIAccessible.takeSelection() and nsIAccessible.extendSelection(). Actions You can prepare actions on some accessibles (for example on button accessible). The following methods are intended for this nsIAccessible.actionCount, nsIAccessible.getActionName(), nsIA...
...a map of attributes. Keyboard shortcuts Some actions on accessibles can be performed by keyboard shortcuts. Following methods are used to get them nsIAccessible.defaultKeyBinding(), nsIAccessible.getKeyBindings(), nsIAccessible.keyboardShortcut. Size and screen position You can use nsIAccessible.getBounds() to get size and coordinates of the accessible. ...
...And 4 more matches
nsIDocShell
loadStream(in nsIInputStream aStream, in nsIURI aURI, in ACString aContentType, in ACString aContentCharset, in nsIDocShellLoadInfo aLoadInfo); Native code only! void loadURI(in nsIURI uri, in nsIDocShellLoadInfo loadInfo, in unsigned long aLoadFlags, in boolean firstParty); Native code only! void prepareForNewContentModel(); void resumeRefreshURIs(); void set
ChildOffset(in unsigned long offset); Native code only! void setCurrentURI(in nsIURI aURI); void suspendRefreshURIs(); void tabToTreeOwner(in boolean forward, out boolean tookFocus); Attributes Attribute Type Description allowAuth boolean Certain dochshells (like the message pane) should not throw up auth dialogs because it can act as a p...
...ng to the event loop. void beginRestore( in nsIContentViewer viewer, in boolean top ); Parameters viewer The content viewer whose document we are starting to load. If null, it defaults to the docshell's current content viewer, creating one if necessary. top Should be true for the toplevel docshell that is being restored; it will be set to false when this method is called for
child docshells. createAboutBlankContentViewer() Create a new about:blank document and content viewer. void createAboutBlankContentViewer( in nsIPrincipal aPrincipal ); Parameters aPrincipal The principal to use for the new document. createLoadInfo() Creates a DocShellLoadInfo object that you can manipulate and then pass to loadURI(). void createLoadInfo( out nsIDocShellLoadInfo loadInf...
...ry entry. This should be called only during page transitions. void DetachEditorFromWindow(); Parameters None. finishRestore() Finish firing WebProgressListener notifications and DOM events for restoring a page presentation. This should only be called via beginRestore(). void finishRestore(); Parameters None. Native code only!firePageHideNotification Notify the associated content viewer and all
child docshells that they are about to be hidden. If isUnload is true, then the document is being unloaded as well. void firePageHideNotification( in boolean isUnload ); Parameters isUnload If true, fire the unload event in addition to the pagehide event. Native code only!fireUnloadNotification Obsolete since Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)This feature is obsole...
...And 4 more matches
nsIMsgFolder
; nsIMsgDBHdr GetMessageHeader(in nsMsgKey msgKey); boolean shouldStoreMsgOffline(in nsMsgKey msgKey); boolean hasMsgOffline(in nsMsgKey msgKey); nsIInputStream getOfflineFileStream(in nsMsgKey msgKey, out PRUint32 offset, out PRUint32 size); void DownloadMessagesForOffline(in nsISupportsArray messages, in nsIMsgWindow window); nsIMsgFolder get
ChildWithURI(in ACString uri, in boolean deep, in boolean caseInsensitive); void downloadAllForOffline(in nsIUrlListener listener, in nsIMsgWindow window); void enableNotifications(in long notificationType, in boolean enable, in boolean dbBatching); boolean isCommandEnabled(in ACString command); boolean matchOrChangeFilterDestination(in nsIMsgFolder folder,in boolean...
...(in nsIMsgFolder msgFolder); [noscript] void getSortKey(out octet_ptr key, out unsigned long length); boolean callFilterPlugins(in nsIMsgWindow aMsgWindow); ACString getStringProperty(in string propertyName); void setStringProperty(in string propertyName, in ACString propertyValue); boolean isAncestorOf(in nsIMsgFolder folder); boolean contains
ChildNamed(in AString name); nsIMsgFolder get
ChildNamed(in AString aName); nsIMsgFolder findSubFolder(in ACString escapedSubFolderName); void AddFolderListener(in nsIFolderListener listener); void RemoveFolderListener(in nsIFolderListener listener); void NotifyPropertyChanged(in nsIAtom property, in ACString oldValue, in ACString newValue); void Not...
..., in unsigned long newValue); void NotifyUnicharPropertyChanged(in nsIAtom property, in AString oldValue, in AString newValue); void NotifyItemAdded(in nsISupports item); void NotifyItemRemoved(in nsISupports item); void NotifyFolderEvent(in nsIAtom event); void ListDescendents(in nsISupportsArray descendents); void Shutdown(in boolean shutdown
Children); void setInVFEditSearchScope(in boolean aSearchThisFolder, in boolean aSetOnSubFolders); void copyDataToOutputStreamForAppend(in nsIInputStream aIStream, in long aLength, in nsIOutputStream outputStream); void copyDataDone(); void setJunkScoreForMessages(in nsISupportsArray aMessages, in ACString aJunkScore); void applyRetentionSettings(); ...
...And 4 more matches
nsINavHistoryContainerResultNode
any kind of grouping, including bookmark folders). 1.0 66 Introduced Gecko 1.9 Inherits from: nsINavHistoryResultNode Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview nsINavHistoryResultNode findNodeByDetails(in AUTF8String aURIString, in PRTime aTime, in long long aItemId, in boolean aRecursive); nsINavHistoryResultNode get
Child(in unsigned long aIndex); unsigned long get
ChildIndex(in nsINavHistoryResultNode aNode); Attributes Attribute Type Description
childCount unsigned long The number of
child nodes; accessing this throws an NS_ERROR_NOT_AVAILABLE exception of containerOpen is false. Read only.
childrenReadOnly boolean false if the node's list of
children can be modified (by adding or removing
children, o...
...Read-only. This is false for bookmark folder nodes unless the setFolderReadOnly() method has been called to specifically make the folder read-only. It's true for non-folder nodes. If this container is a remote container, this flag may be redefined by the remote container provider. Read-only. ...
...y. This is false for bookmark folder nodes unless the setFolderReadOnly() method has been called to specifically make the folder read-only. It's true for non-folder nodes. If this container is a remote container, this flag may be redefined by the remote container provider. Read-only. containerOpen boolean Set this to true to allow descent into this container. When closed, attempting to call get
Child() or access
childCount results in an error. When you're done reading the container's
children, set this to false. For HOST and DAY groupings, doing this has no performance cost since the
children have already been computed. For queries and bookmark folders, however, being open means they must keep themselves up-to-date by listening for updates and re-querying as needed. dynamicContainerType AU...
...And 4 more matches
Element - Web APIs
5" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">Element</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent interface, Node, and by extension that interface's parent, EventTarget. It implements the properties of ParentNode,
ChildNode, NonDocumentType
ChildNode, and Animatable. Element.attributes Read only Returns a NamedNodeMap object containing the assigned attributes of the corresponding HTML element. Element.classList Read only Returns a DOMTokenList containing the list of class attributes. Element.className Is a DOMString representing the class of the element. Element.clientHeight Read only Returns a Numbe...
...alName Read only A DOMString representing the local part of the qualified name of the element. Element.namespaceURI Read only The namespace URI of the element, or null if it is no namespace. 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. NonDocumentType
ChildNode.nextElementSibling Read only Is an Element, the element immediately following the given one in the tree, or null if there's no sibling node. Element.outerHTML Is a DOMString representing the markup of the element including its content. When used as a setter, replaces the element with nodes parsed from the given string. Element.part Represents the part identifier(s) of the element (i.e. ...
...markup of the element including its content. When used as a setter, replaces the element with nodes parsed from the given string. Element.part Represents the part identifier(s) of the element (i.e. set using the part attribute), returned as a DOMTokenList. Element.prefix Read only A DOMString representing the namespace prefix of the element, or null if no prefix is specified. NonDocumentType
ChildNode.previousElementSibling Read only Is a Element, the element immediately preceding the given one in the tree, or null if there is no sibling element. Element.scrollHeight Read only Returns a Number representing the scroll view height of an element. Element.scrollLeft Is a Number representing the left scroll offset of the element. Element.scrollLeftMax Read only Returns a Number repr...
...And 4 more matches
HTMLTableElement - Web APIs
" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLTableElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLTableElement.caption Is a HTMLTableCaptionElement representing the first <caption> that is a
child of the element, or null if none is found. When set, if the object doesn't represent a <caption>, a DOMException with the HierarchyRequestError name is thrown. If a correct object is given, it is inserted in the tree as the first
child of this element and the first <caption> that is a
child of this element is removed from the tree, if any. HTMLTableElement.tHead Is a HTMLTableSectionElement repr...
...ound. When set, if the object doesn't represent a <caption>, a DOMException with the HierarchyRequestError name is thrown. If a correct object is given, it is inserted in the tree as the first
child of this element and the first <caption> that is a
child of this element is removed from the tree, if any. HTMLTableElement.tHead Is a HTMLTableSectionElement representing the first <thead> that is a
child of the element, or null if none is found. When set, if the object doesn't represent a <thead>, a DOMException with the HierarchyRequestError name is thrown. ...
...ent.tHead Is a HTMLTableSectionElement representing the first <thead> that is a
child of the element, or null if none is found. When set, if the object doesn't represent a <thead>, a DOMException with the HierarchyRequestError name is thrown. If a correct object is given, it is inserted in the tree immediately before the first element that is neither a <caption>, nor a <colgroup>, or as the last
child if there is no such element, and the first <thead> that is a
child of this element is removed from the tree, if any. HTMLTableElement.tFoot Is a HTMLTableSectionElement representing the first <tfoot> that is a
child of the element, or null if none is found. When set, if the object doesn't represent a <tfoot>, a DOMException with the HierarchyRequestError name is thrown. If a correct object is g...
...And 4 more matches
Timing element visibility with the Intersection Observer API - Web APIs
nt. The following style is applied to that: main { grid-column: 2; grid-row: 2; margin: 0; margin-left: 16px; font-size: 16px; } The primary feature here is that the grid position is set to place the body content in column 2, row 2. Articles Each article is contained in an <article> element, styled like this: article { background-color: white; padding: 6px; } article:not(:last-
child) { margin-bottom: 8px; } article h2 { margin-top: 0; } This creates article boxes with a white background which float atop the blue background, with a small margin around the article. Every article which isn't the last item in the container has an 8px bottom margin to space things apart. Ads Finally, the ads have the following initial styling. Individual ads may customize the style somewh...
...und, with a small margin around the article. Every article which isn't the last item in the container has an 8px bottom margin to space things apart. Ads Finally, the ads have the following initial styling. Individual ads may customize the style somewhat, as we'll see later. .ad { height: 96px; padding: 6px; border-color: #555; border-style: solid; border-width: 1px; } .ad:not(:last-
child) { margin-bottom: 8px; } .ad h2 { margin-top: 0; } .ad div { position: relative; float: right; padding: 0 4px; height: 20px; width: 120px; font-size: 14px; bottom: 30px; border: 1px solid black; background-color: rgba(255, 255, 255, 0.5); } There's nothing magic in here. It's fairly basic CSS. Tying it together with JavaScript That brings us to the JavaScript code which...
...incidunt" + " egestas. Morbi eu lorem vel est sodales auctor hendrerit placerat" + " risus. Etiam rutrum faucibus sem, vitae mattis ipsum ullamcorper" + " eu. Donec nec imperdiet nibh, nec vehicula libero. Phasellus vel" + " malesuada nulla. Aliquam sed magna aliquam, vestibulum nisi at," + " cursus nunc.</p>"; function buildContents() { for (let i=0; i<5; i++) { contentBox.append
Child(createArticle(loremIpsum)); if (!(i % 2)) { loadRandomAd(); } } } The variable loremIpsum contains the text we'll use for the body of all of our articles. Obviously in the real world, you'd have some code to pull articles from a database or the like, but this does the job for our purposes. Every article uses the same text; you could of course change that easily enough. buildCo...
...And 4 more matches
display - CSS: Cascading Style Sheets
Some values of display are fully defined in their own individual specifications; for example the detail of what happens when display: flex is declared is defined in the CSS Flexible Box Model specification. See the table at the end of this document for all of the individual specifications. ...
...Some values of display are fully defined in their own individual specifications; for example the detail of what happens when display: flex is declared is defined in the CSS Flexible Box Model specification. See the table at the end of this document for all of the individual specifications. ...
...s the first inline box of the block box. If an inline box follows, the run-in box becomes a block box. Note: Browsers that support the two value syntax, on finding the outer value only, such as when display: block or display: inline is specified, will set the inner value to flow. This will result in expected behavior; for example if you specify an element to be block, you would expect that the
children of that element would participate in block and inline normal flow layout. Inside <display-inside> These keywords specify the element's inner display type, which defines the type of formatting context that its contents are laid out in (assuming it is a non-replaced element). Valid <display-inside> values: flow The element lays out its contents using flow layout (block-and-inline l...
...And 4 more matches
<input type="file"> - HTML: Hypertext Markup Language
ytes). Generate a thumbnail preview of the image by calling URL.createObjectURL(curFiles[i]). Then, insert the image into the list item too by creating a new <img> and setting its src to the thumbnail. If the file type is invalid, we display a message inside a list item telling the user that they need to select a different file type. ...
...ail preview of the image by calling URL.createObjectURL(curFiles[i]). Then, insert the image into the list item too by creating a new <img> and setting its src to the thumbnail. If the file type is invalid, we display a message inside a list item telling the user that they need to select a different file type. ...
...image by calling URL.createObjectURL(curFiles[i]). Then, insert the image into the list item too by creating a new <img> and setting its src to the thumbnail. If the file type is invalid, we display a message inside a list item telling the user that they need to select a different file type. ...
...And 4 more matches
JavaScript Daemons Management - Archive of obsolete content
t this.textContent = ""; aLetters.length = 0; for (var oSpan, oLetter, nLetter = 0, nLen = sText.length; nLetter < nLen; nLetter++) { oSpan = document.createElement("span"); oSpan.textContent = sText[nLetter]; oLetter = { "elem": oSpan, "parent": this }; aLetters.push(oLetter); oLetter.pos = Math.random() * 50; oLetter.elem.style.position = "relative"; this.append
Child(oSpan); } } var nMaxDist = 25, aLetters = [], sText = "Do you feel lucky, punk?", oRecompose = new Daemon(document.createElement("p"), perform, 33, 30, prepare); onload = function () { oRecompose.owner.id = "perform-me"; document.body.append
Child(oRecompose.owner); oRecompose.play(); }; </script> <style type="text/css"> body { font-family: monospace, sans-serif; background: #D...
....length; nLetter < nLen; nLetter++) { oSpan = document.createElement("span"); oSpan.textContent = sText[nLetter]; oLetter = { "elem": oSpan, "parent": this.target }; this.letters.push(oLetter); oLetter.index = this.numletters; oLetter.elem.style.position = "relative"; oLetter.val = oLetter.elem.textContent; this.numletters++; this.target.append
Child(oSpan); } }, "perform": function (nIndex, nLength, bBackw) { for (var oLetter, nLetter = 0; nLetter < this.letters.length; nLetter++) { oLetter = this.letters[nLetter]; if (nLength < nIndex && this.clock + this.delta < this.interval) { clock += this.delta; return; } this.clock = 0; oLetter.elem.textContent = nIndex / nLength - oLetter.inde...
....clock + this.delta < this.interval) { clock += this.delta; return; } this.clock = 0; oLetter.elem.textContent = nIndex / nLength - oLetter.index / this.numletters >= 0 ? ...
...And 3 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
ta from the web page (unprivileged code) will be the values of attribute1 and attribute2. To trigger the alert() in the listener and pass the data from the web page, write code such as this in the web page: var element = document.createElement("MyExtensionDataElement"); element.setAttribute("attribute1", "foobar"); element.setAttribute("attribute2", "hello world"); document.documentElement.append
Child(element); var evt = document.createEvent("Events"); evt.initEvent("MyExtensionEvent", true, false); element.dispatchEvent(evt); This code creates an arbitrary element -- <MyExtensionDataElement/> -- and inserts it into the web page's DOM. Values are set for two arbitrary attributes on the element. These can also be named anything you like, but we've chosen attribute1 and attribute2. Finally, t...
... var mainWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIWebNavigation) .QueryInterface(Components.interfaces.nsIDocShellTreeItem) .rootTreeItem .QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.in...
...essage from unprivileged code to privileged code, adding 'true' to the end of your event listener in your privileged chrome code will allow the message to be received. 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). You can optionally clean up the created element, or create it once when the web page loads then re-use it each time. Another option is to send a return event from the extension to the web page. This can be done using the same principle as the above example. There is only one extension, but there can be many activ...
...And 3 more matches
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
ame someattribute="somevalue"> content </elementname> As shown in Listing 1, XML uses elements, which consist of an opening tag, a closing tag, and content. Note: Elements that take no content can be expressed in compact form as <elementname/>. An element can include other elements as well as text in its content, and all information is structured as a tree. As in all trees, elements can have
children (elements contained within them) and parents (elements that contain them). Attributes can also be added to opening tags, each with a value. As the "extensible" part of XML implies, elements from various XML-based languages such as XHTML and SVG can be interspersed in one another as a means to extend the language. All elements can carry a "namespace URI" identifier, which is unique for each la...
...roperty, so if it weren't for the DOM, dynamic processing would be impossible. There are a number of levels to the DOM with different levels of functionality. Gecko supports nearly all of DOM Level 2 and some of DOM Level 3. With the DOM, the contents of an XML document are handled as a "DOM tree," a collection of element nodes and other nodes. ...
... example that deletes the second
child element of the element with the "toolbar" id, adds a new button element as a substitute, and sets a label attribute. ...
...And 3 more matches
The Box Model - Archive of obsolete content
at all (divs may have some default styling, though). Their behavior is similar. However, one of the fundamental differences between XUL and HTML has been the fact that XUL boxes can be oriented vertically or horizontally (this behavior is being introduced into HTML standards). There are 3 basic box elements in XUL: hbox, vbox and box. ...
... differences between XUL and HTML has been the fact that XUL boxes can be oriented vertically or horizontally (this behavior is being introduced into HTML standards). There are 3 basic box elements in XUL: hbox, vbox and box. An hbox is oriented horizontally by default, meaning that its
child nodes are displayed next to each other from left to right. A vbox is oriented vertically by default, its
child nodes displayed one below the other from top to bottom. ...
...that its
child nodes are displayed next to each other from left to right. A vbox is oriented vertically by default, its
child nodes displayed one below the other from top to bottom. A box is a generic version that you can orient as you please, but its default is horizontal orientation, so it's pretty much equivalent to an hbox and it is seldom used. ...
...And 3 more matches
MenuModification - Archive of obsolete content
unction is called when the button is pressed. This function appends a new item to the menu's popup with the label Insert. The first argument to appendItem is the label of the menuitem, and the second argument is a value to associate with the item. This value be set as the menuitem's value attribute and can be used for whatever purpose is desired. Note how in this example, the menu does not have a
child menupopup. The appendItem method will create a menupopup element if it doesn't already exist. If the menu already has a menupopup, the new menuitem will be appended to this existing one. While the appendItem method always adds the new item to the end of the menu, the insertItemAt method may be used in a similar fashion to insert an item into the menu elsewhere. menu.insertItemAt(0, "Delete", "d...
...it, for instance to add an access key, as in the following example: var item = menu.appendItem("Insert", "insert"); item.accessKey = "I"; Appending Submenus There is no built-in method to append submenus to a menu. To do this, we instead need to use the inherited node modification methods available for all elements. ...
...thod to append submenus to a menu. To do this, we instead need to use the inherited node modification methods available for all elements. First, we need to retrieve the menupopup for the menu, and then use the append
Child method to append a new item. <script> function addSubMenu() { var popup = document.getElementById("file-popup"); var newmenu = document.createElement("menu"); popup.append
Child(newmenu); newmenu.label = "New"; newmenu.appendItem("Document", "doc"); newmenu.appendItem("Image", "image"); } </script> <menu label="File" onpopupshowing="addSubMenu()"> <menupopup id="file-popup"/> </menu>. Comment: appendItem not working in TB 52.7.0. Workaround: add menupopup to menu. Then add menuitem to menupopup (all with append
Child to their parentelement). Also, need replace ...
...And 3 more matches
Building Hierarchical Trees - Archive of obsolete content
ilder will mark the right rows as containers, so that they can be opened and closed with the small icon twisties on the left of the column. Remember to make the left column the primary column for these to appear. To be able to do this, the tree builder must know that an item is a container. With an RDF datasource, this would usually be an RDF container such as a Seq and the tree would display its
children. For an XML datasource, the tree might display a node's
children as the
children in the tree, making the tree display a hierarchy similar to that in the XML document. Or, with more complex XPath expressions, a template could display a tree where the hierarchy wasn't directly like the XML document. If a node is a container, the tree item becomes a container, and the user may open the row by dou...
...mplate-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood" flags="dont-build-content" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <treecols> <treecol id="address" primary="true" label="Address" flex="1"/> <treecol id="floors" label="Floors" flex="1"/> </treecols> <template> <rule rdf:type="http://www.xulplanet.com/rdf/House"> <tree
children> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://www.xulplanet.com/rdf/address"/> <treecell label="rdf:http://www.xulplanet.com/rdf/floors"/> </treerow> </treeitem> </tree
children> </rule> <rule> <tree
children> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://p...
...df:http://www.xulplanet.com/rdf/address"/> <treecell label="rdf:http://www.xulplanet.com/rdf/floors"/> </treerow> </treeitem> </tree
children> </rule> <rule> <tree
children> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://purl.org/dc/elements/1.1/title"/> </treerow> </treeitem> </tree
children> </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. As shown in the snippet of the data below, the street is a Seq, so it will become a container. The houses are not containers, so they will not have
children in the tree. <rdf:Bag rdf:about="http://www.xulplanet.com/rdf/myneighbourhood"> <rdf:li> ...
...And 3 more matches
box - Archive of obsolete content
Child elements do not overlap. The default orientation is horizontal. More information is available in the XUL tutorial. ...
...
Child elements do not overlap. The default orientation is horizontal. More information is available in the XUL tutorial. ...
...
Child elements do not overlap. The default orientation is horizontal. More information is available in the XUL tutorial. ...
...And 3 more matches
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. Both the container and
child attributes may use variables. More information is available in the XUL tutorial. ...
... << 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. Both the container and
child attributes may use variables. More information is available in the XUL tutorial. ...
... container Type: ? A variable reference to a node that is expected to be a container. If the variable is the same as the uri attribute on the content element, the resource must be a container element in order to match. Inherited Properties al...
...And 3 more matches
menu - Archive of obsolete content
This element is also used to create submenus. More information is available in the XUL tutorial. ...
...s value is set, it overrides an assigned key set in the key attribute. This attribute does not apply to menus directly on the menubar. accesskey Type: character This should be set to a character that is used as a shortcut key. This should be one of the characters that appears in the label attribute for the element. allowevents Type: boolean If true, events are passed to
children of the element. Otherwise, events are passed to the element only. crop Type: one of the values below If the label of the element is too big to fit in its given space, the text will be cropped on the side specified by the crop attribute. An ellipsis will be used in place of the cropped text. If the box direction is reversed, the cropping is reversed. ...
...access or affect the contents displayed to the user. Properties accessibleType Type: integer A value indicating the type of accessibility object for the element. control Type: menu element Returns the enclosing menu that the item is inside, if any, or null if there is no enclosing menu. itemCount Type: integer Read only property holding the number of
child items. menupopup Type: menupopup element A reference to the menupopup used by the menu or menulist. This property is read-only. open Type: boolean This property will be set to true when the menu is open. The menu may be opened by setting the open property to true and closed by setting it to false. parentContainer Type: menu element Read only property that ret...
...And 3 more matches
toolbar - Archive of obsolete content
ence home [ Examples | Attributes | Properties | Methods | Related ] A container which typically contains a row of buttons. It is a type of box that defaults to horizontal orientation. It can be collapsed with a grippy when the toolbar is placed inside a toolbox. The toolbar should always have an id attribute. Note: Gecko 2.0 adds support for external toolbars. These are toolbars that are not
children of a toolbox element. You can associate an external toolbar with a toolbox for the purpose of managing your toolbars by setting the toolboxid property on the toolbar. The chromeclass-toolbar class may be used to create a toolbar where its visibility depends on the toolbar flag when opening the window with the window interface's open() method loads the specified resource into the browsing con...
...ems not already in the toolbar. This introduces a potential compatibility problem for extensions that depend on being able to identify all possible toolbar items by looking in the toolbarpalette. ...
...he toolbar. This introduces a potential compatibility problem for extensions that depend on being able to identify all possible toolbar items by looking in the toolbarpalette. ...
...And 3 more matches
treecol - Archive of obsolete content
mnpicker, label, primary, sort, sortActive, sortDirection, src, type, width Properties accessibleType Style classes treecol-image Examples This example shows a checkbox in the first column, requires the style below. ...
...On Firefox 2.x and 3.x, all operating systems other than Mac OS X already use these styles by default. ...
...le on some platforms, the following styles need to be added to the stylesheet (see treecol.type). On Firefox 2.x and 3.x, all operating systems other than Mac OS X already use these styles by default. If targeting Firefox for Mac OS X, be sure to use these styles but include your own checkbox image. However, chrome://global/skin/checkbox/cbox-check.gif is available in SeaMonkey on Mac OS X.. tree
children::-moz-tree-checkbox { /* unchecked checkbox treecells. This style MUST come before tree
children::-moz-tree-checkbox(checked) otherwise it won't take effect. */ list-style-image: none; } tree
children::-moz-tree-checkbox(checked){ /* css for checked cells. cbox-check.gif isn't available in Firefox 1, 2, and 3 on Mac OS X, so you should specify a URL to an image in your extension or ...
...And 3 more matches
XForms Custom Controls Examples - Archive of obsolete content
"nsIXFormsUIWidget"> <method name="refresh"> <body> var img = document.getAnonymousElementByAttribute(this, "anonid", "content"); img.setAttribute("src", this.stringValue); return true; </body> </method> </implementation> </binding> Output Showing XHTML <binding id="output-xhtml" extends="chrome://xforms/content/xforms-xhtml.xml#xformswidget-output"> <content> <
children includes="label"/> <xhtml:div class="xf-value" anonid="content"></xhtml:div> <
children/> </content> <implementation implements="nsIXFormsUIWidget"> <field name="_domparser">null</field> <property name="domparser" readonly="true"> <getter> if (!this._domparser) this._domparser = new DOMParser(); return this._domparser; </getter> </property> <method...
... <property name="domparser" readonly="true"> <getter> if (!this._domparser) this._domparser = new DOMParser(); return this._domparser; </getter> </property> <method name="refresh"> <body> // Get new value, parse, and import it. ...
... </property> <method name="refresh"> <body> // Get new value, parse, and import it. ...
...And 3 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
pting, Glossary, Web, l10n:priority CSS (Cascading Style Sheets) is a declarative language that controls how webpages look in the browser. 56 CSS Object Model (CSSOM) CSS, CSSOM, DOM, Glossary, Web Performance The CSS Object Model (CSSOM) is a map of all CSS selectors and relevant properties for each selector in the form of a tree, with a root node, sibling, descendant,
child, and other relationship. The CSSOM is very similar to the Document Object Model (DOM). Both of them are part of the critical rendering path which is a series of steps that must happen to properly render a website. 57 CSS pixel CSS, CSS Pixel, Glossary, height, length, pixel, size, unit, width The CSS pixel--denoted in CSS with the suffix px--is a unit of length which roughly ...
... element is a part of a webpage. In XML and HTML, an element may contain a data item or a chunk of text or an image, or perhaps nothing. A typical element includes an opening tag with some attributes, enclosed text content, and a closing tag. 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). 129 Encapsulation CodingScripting, Glossary Encapsulation is the packing of data and functions into one component (for example, a class) and then controlling access to that component to make a "blackbox" out of the object. Because of this, a user of that class only needs to know its interface (that is, the data and functions expose...
... For example, in such a language, a function can be passed as an argument to other functions, can be returned by another function and can be assigned as a value to a variable. 153 Flex CSS, Flex, Glossary, flexbox flex is a new value added to the CSS display property. Along with inline-flex it causes the element that it applies to to become a flex container, and the element's
children to each become a flex item. The items then participate in flex layout, and all of the properties defined in the CSS Flexible Box Layout Module may be applied. 154 Flex Container CSS, Glossary, flex container, flexbox A flexbox layout is defined using the flex or inline-flex values of the display property on the parent item. This element then becomes a flex container, and e...
...And 3 more matches
Choosing the right approach - Learn web development
"callback hell"). Failure callbacks need to be called once for each level of nesting, whereas with promises you can just use a single .catch() block to handle the errors for the entire chain. Async callbacks just aren't very graceful. Promise callbacks are always cal...
...If you nest a number of promises, you can end up with similar troubles to callback hell. For example: remotedb.allDocs({ include_docs: true, attachments: true }).then(function (result) { let docs = result.rows; docs.fo...
...You need to chec...
...And 3 more matches
Build your own function - Learn web development
et of parentheses, and a set of curly braces. Any parameters we want to give to our function go inside the parentheses, and the code that runs when we call the function goes inside the curly braces. Finally, add the following code inside the curly braces: const html = document.querySelector('html'); const panel = document.createElement('div'); panel.setAttribute('class', 'msgBox'); html.append
Child(panel); const msg = document.createElement('p'); msg.textContent = 'This is a message box'; panel.append
Child(msg); const closeBtn = document.createElement('button'); closeBtn.textContent = 'x'; panel.append
Child(closeBtn); closeBtn.onclick = function() { panel.parentNode.remove
Child(panel); } This is quite a lot of code to go through, so we'll walk you through it bit by bit. The first ...
...r container of our message box. We then use yet another DOM API function called Element.setAttribute() to set a class attribute on our panel with a value of msgBox. This is to make it easier to style the element -- if you look at the CSS on the page, you'll see that we are using a .msgBox class selector to style the message box and its contents. Finally, we call a DOM function called Node.append
Child() on the html constant we stored earlier, which nests one element inside the other as a
child of it. We specify the panel <div> as the
child we want to append inside the <html> element. We need to do this as the element we created won't just appear on the page on its own -- we need to specify where to put it. const panel = document.createElement('div'); panel.setAttribute('class', 'msgBox'); htm...
...e html constant we stored earlier, which nests one element inside the other as a
child of it. We specify the panel <div> as the
child we want to append inside the <html> element. We need to do this as the element we created won't just appear on the page on its own -- we need to specify where to put it. const panel = document.createElement('div'); panel.setAttribute('class', 'msgBox'); html.append
Child(panel); The next two sections make use of the same createElement() and append
Child() functions we've already seen to create two new elements -- a <p> and a <button> -- and insert them in the page as
children of the panel <div>. We use their Node.textContent property -- which represents the text content of an element -- to insert a message inside the paragraph, and an 'x' inside the button. This ...
...And 3 more matches
Useful string methods - Learn web development
'You\'re all I want for Christmas', 'Get well soon']; for (let i = 0; i < greetings.length; i++) { let input = greetings[i]; // Your conditional test needs to go inside the parentheses // in the line below, replacing what's currently there if (greetings[i]) { let listItem = document.createElement('li'); listItem.textContent = input; list.append
Child(listItem); } } </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="Reset"> <input id="solution" type="button" value="Show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } const textarea = docu...
...n \'You\\\'re all I want for Christmas\',' + '\n \'Get well soon\'];' + '\n' + '\nfor (let i = 0; i < greetings.length; i++) {' + '\n let input = greetings[i];' + '\n if (greetings[i].indexOf(\'Christmas\') !== -1) {' + '\n let result = input;' + '\n let listItem = document.createElement(\'li\');' + '\n listItem.textContent = result;' + '\n list.append
Child(listItem);' + '\n }' + '\n}'; let solutionEntry = jsSolution; textarea.addEventListener('input', updateCode); window.addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { ...
...code" style="height: 250px; width: 95%"> const list = document.querySelector('.output ul'); list.innerHTML = ''; let cities = ['lonDon', 'ManCHESTer', 'BiRmiNGHAM', 'liVERpoOL']; for (let i = 0; i < cities.length; i++) { let input = cities[i]; // write your code just below here let result = input; let listItem = document.createElement('li'); listItem.textContent = result; list.append
Child(listItem); } </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="Reset"> <input id="solution" type="button" value="Show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } const textarea = document...
...And 3 more matches
PBackground
This article outlines what PBackground is, and how it works. IPDL recap IPDL is a language used to define "protocols" -- essentially formalized versions of how two things can communicate. ...
...ler automatically generates a large amount of C++ glue code from the IPDL files. IPDL protocols are used to specify how the chrome and content processes talk to each other and verify that a content process is "following the rules". Note: If you want more detailed information on IPDL, start out by reading the IPDL tutorial. When used at run time, every protocol has two actors -- a parent and a
child. These actors can live in different processes due to IPDL, which automatically serializes calls on one side and transmits them to the other. This is the foundation of how chrome and content processes talk to each other in e10s. The actor tree All live actors exist in a tree. The root of the tree is known as the top-level actor, an instance of one of a small number of top-level protocols. All ac...
...other in e10s. The actor tree All live actors exist in a tree. The root of the tree is known as the top-level actor, an instance of one of a small number of top-level protocols. All actors in a tree "live" on the same thread, and can only be used safely from that thread. The top-level actor for most things is PContent, which connects the main thread of the chrome process to the main thread of a
child process. For most purposes this is great, because the DOM is already bound to the main thread. But in some cases we don't necessarily want to talk to the main thread. What if I want to talk to a different thread? Not every communication between the chrome and content processes necessarily wants to go through the main threads of both (or even either) processes. For example, when we are uploadi...
...And 3 more matches
XUL Accessibility
Introduction This article shows how XUL control elements are mapped to accessibility API. It is much in progress. AT API General rules This section holds some rules applied to generating accessible name and description. ...
... Introduction This article shows how XUL control elements are mapped to accessibility API. It is much in progress. AT API General rules This section holds some rules applied to generating accessible name and description. ...
...ements are mapped to accessibility API. It is much in progress. AT API General rules This section holds some rules applied to generating accessible name and description. ...
...And 3 more matches
Retrieving part of the bookmarks tree
ryService.executeQuery(query, options); Get the results When you are querying for exactly one folder grouped by folder with no fancy query parameters such as keywords or date ranges (as in this example), the root of the result will be an nsINavHistoryContainerResultNode corresponding to your folder. If you have a complex query the root will be a nsINavHistoryQueryResultNode. Before accessing the
children of any result container, you must first open it, and then you can iterate the
children. As long as the container is open, it will listen for notifications from the bookmarks system to keep itself up-to-date. When you're done, be sure to close the container to free up the resources. Otherwise, it will continue to get observer notifications and update itself, slowing down the whole browser. var ...
...dren. As long as the container is open, it will listen for notifications from the bookmarks system to keep itself up-to-date. When you're done, be sure to close the container to free up the resources. Otherwise, it will continue to get observer notifications and update itself, slowing down the whole browser. var rootNode = result.root; rootNode.containerOpen = true; // iterate over the immediate
children of this folder and dump to console for (var i = 0; i < rootNode.
childCount; i ++) { var node = rootNode.get
Child(i); dump("
Child: " + node.title + "\n"); } // close a container after using it! rootNode.containerOpen = false; If you encounter a node with a type of RESULT_TYPE_FOLDER or another type of container, you can open these folders and descend into the hierarchy. You will want to r...
...rootNode.containerOpen = false; ...
...And 3 more matches
IAccessibleText
alue E_INVALIDARG if bad [in] passed, [out] values are 0s and null respectively. S_FALSE if there is nothing to return, [out] values are 0s and null respectively. S_OK. caretOffset() Returns the position of the caret. Returns the 0-based offset of the caret within the text(). ...
...re 0s and null respectively. S_FALSE if there is nothing to return, [out] values are 0s and null respectively. S_OK. caretOffset() Returns the position of the caret. Returns the 0-based offset of the caret within the text(). ...
...caretOffset() Returns the position of the caret. Returns the 0-based offset of the caret within the text(). If the text() is implemented as a tree of text() objects with embed characters in higher levels representing substrings of
child text() objects and the caret is in one of the
child text() objects, then the offset in the higher level text() object would be at the embed character representing
child text() object that contains the caret. ...
...And 3 more matches
nsIAccessibleRole
or caret. ROLE_ALERT 8 Represents an alert or a condition that a user should be notified about. Assistive Technologies typically respond to the role by reading the entire on screen contents of containers advertising this role. Should be used for warning dialogs, etc. The role is used by xul:browsermessage, role="alert", xforms:message. ROLE_WINDOW 9 Represents the window frame, which contains
child objects such as a title bar, client, and other objects contained in a window. The role is supported automatically by MS Windows. ROLE_INTERNAL_FRAME 10 A sub-document or iframe. ROLE_MENUPOPUP 11 Represents a menu, which presents a list of options from which the user can make a selection to perform an action. It is used for role="menu". ROLE_MENUITEM 12 Represents a menu item, which is an e...
... within an application window. It is used for role="document". ROLE_PANE 16 Represents a pane within a frame or document window. Users can navigate between panes and within the contents of the current pane, but cannot navigate between items in different panes. Thus, panes represent a level of grouping lower than frame windows or documents, but above individual controls. It is used for the first
child of a or iframe. ROLE_CHART 17 Represents a graphical image used to represent data. ROLE_DIALOG 18 Represents a dialog box or message box. It is used for xul:dialog, role="dialog". ROLE_BORDER 19 Represents a window border. ROLE_GROUPING 20 Logically groups other objects. There is not always a parent-
child relationship between the grouping object and the objects it contains. It is used for...
...ts an item in a list. See also ROLE_LIST. ROLE_OUTLINE 35 Represents an outline or tree structure, such as a tree view control, that displays a hierarchical list and allows the user to expand and collapse branches. Is is used for role="tree". ROLE_OUTLINEITEM 36 Represents an item in an outline or tree structure. It is used for role="treeitem". ROLE_PAGETAB 37 Represents a page tab, it is a
child of a page tab list. It is used for xul:tab, role="treeitem". Also refer to ROLE_PAGETABLIST. ROLE_PROPERTYPAGE 38 Represents a property sheet. It is used for xul:tabpanel, role="tabpanel". ROLE_INDICATOR 39 Represents an indicator, such as a pointer graphic, that points to the current item. ROLE_GRAPHIC 40 Represents a picture. Is is used for xul:image, html:img. ROLE_STATICTEXT 41 Repres...
...And 3 more matches
Component; nsIPrefBranch
refName); void deleteBranch(in string aStartingAt); boolean getBoolPref(in string aPrefName, Requires Gecko 54 [optional] in boolean aDefaultValue); string getCharPref(in string aPrefName,Requires Gecko 54 [optional] in string aDefaultValue); Requires Gecko 58 utf8tring getStringPref(in string aPrefName, [optional] in utf8string aDefaultValue); void get
ChildList(in string aStartingAt, [optional] out unsigned long aCount, [array, size_is(aCount), retval] out string a
ChildArray); void getComplexValue(in string aPrefName, in nsIIDRef aType, [iid_is(aType), retval] out nsQIResult aValue); long getIntPref(in string aPrefName,Requires Gecko 54 [optional] in long aDefaultValue); long getPrefType(in string aPrefName); void...
...an individual UTF-8 string preference. utf8string getStringPref( in string aPrefName, [optional] in utf8string aDefaultValue ); Parameters aPrefName The string preference to retrieve. aDefaultValue Optional - a default value to use if the preference does not exist (instead of throwing an exception). Return value Returns utf8tring - The value of the requested string preference. ...
...ngPref( in string aPrefName, [optional] in utf8string aDefaultValue ); Parameters aPrefName The string preference to retrieve. aDefaultValue Optional - a default value to use if the preference does not exist (instead of throwing an exception). Return value Returns utf8tring - The value of the requested string preference. ...
...And 3 more matches
nsIXULWindow
ticle. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) An nsIXULWindow is created as part of the creation of a top-level chrome window. When the window is destroyed, it will fire a "xul-window-destroyed" notification through the global observer service. This signals the application in case it needs to quit. ...
...upports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) An nsIXULWindow is created as part of the creation of a top-level chrome window. When the window is destroyed, it will fire a "xul-window-destroyed" notification through the global observer service. This signals the application in case it needs to quit. ...
... contextFlags PRUint32 contextFlags are from nsIWindowCreator2. docShell nsIDocShell The docshell owning the XUL for this window. Read only. ...
...And 3 more matches
Examine and edit HTML - Firefox Developer Tools
derneath it. Moving the mouse over a node in the tree highlights that element in the page. Nodes that are not visible are shown faded/desaturated. This can happen for different reasons such as using display: none or that the element doesn't have any dimensions. There is an ellipsis shown between the opening and closing tag of an element when the node is collapsed if it has larger contents. Now
children are indicated in the tree with this icon: At the right side of some nodes there are markers shown indicating different pieces of information related to it: event The element has one or several event listeners attached to it. Clicking the marker opens a tooltip listing the event listeners and allows you for each listener to switch to the line of JavaScript code in the Debugger wh...
... Context menu reference Edit as HTML Edit the element's HTML. ...
... Context menu reference Edit as HTML Edit the element's HTML. (Copy) In...
...And 3 more matches
Compositing example - Web APIs
o the hard parts. ...
...as.style.border = "1px solid #000"; canvas.style.margin = "5px"; canvas.width = width/2; canvas.height = height/2; return canvas; } function runComposite() { var dl = document.createElement("dl"); document.body.append
Child(dl); while(gco.length) { var pop = gco.pop(); var dt = document.createElement("dt"); dt.textContent = pop; dl.append
Child(dt); var dd = document.createElement("dd"); var p = document.createElement("p"); p.textContent = gcoText.pop(); dd.append
Child(p); var canvasToDrawOn = createCanvas(); var canvasToDrawFrom = createCanvas(); var canvasToDrawResult = createCanvas(); var ctx = canvasToDrawResult.getContext('2d'); ctx.clearRect(0, 0, width, hei...
... var lightMix = function() { var ctx = canvas2.getContext("2d"); ctx.save(); ctx.globalCompositeOperation = "lighter"; ctx.beginPath(); ctx.fillStyle = "rgba(255,0,...
...And 3 more matches
Element: overflow event - Web APIs
fired when 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). It is a proprietary event specific to Gecko (Firefox). ...
...x). ...
...id="
child"></div> </div> <br/> <label><input type="checkbox" id="toggle" checked/> Overflow</label> <style> #wrapper { width: 20px; height: 20px; background: #000; padding: 5px; overflow: hidden; } #
child { width: 40px; height: 40px; border: 2px solid grey; background: #ccc; } </style> <script> var wrapper = document.getElementById("wrapper"),
child = document.getElementById("
child"), toggle = document.getElementById("toggle"); wrapper.addEventListener("overflow", function( event ) { console.log( event ); }, false); wrapper.addEventListener("underflow", function( event ) { console.log( event ); }, false); toggle.addEventListener("change", function( event ) { if ( event.target.checked ) {
child.s...
...And 3 more matches
Element: underflow event - Web APIs
ch is specific to Firefox, is fired when an element is no longer overflowed by its content. This only works for elements for which overflow is not set to visible. The counterpart overflow event is fired when overflow occurs. ...
...rs. ...
...id="
child"></div> </div> <br/> <label><input type="checkbox" id="toggle" checked/> Overflow</label> <style> #wrapper { width: 20px; height: 20px; background: #000; padding: 5px; overflow: hidden; } #
child { width: 40px; height: 40px; border: 2px solid grey; background: #ccc; } </style> <script> var wrapper = document.getElementById("wrapper"),
child = document.getElementById("
child"), toggle = document.getElementById("toggle"); wrapper.addEventListener("overflow", function( event ) { console.log( event ); }, false); wrapper.addEventListener("underflow", function( event ) { console.log( event ); }, false); toggle.addEventListener("change", function( event ) { if ( event.target.checked ) {
child.s...
...And 3 more matches
Using files from web applications - Web APIs
your input element or drop zone as discussed previously and have them call a function such as the handleFiles() function below. function handleFiles(files) { for (let i = 0; i < files.length; i++) { const file = files[i]; if (!file.type.startsWith('image/')){ continue } const img = document.createElement("img"); img.classList.add("obj"); img.file = file; preview.append
Child(img); // Assuming that "preview" is the div output where the content will be displayed. const reader = new FileReader(); reader.onload = (function(aImg) { return function(e) { aImg.src = e.target.result; }; })(img); reader.readAsDataURL(file); } } Here our loop handling the user-selected files looks at each file's type attribute to see if its MIME type begins with the string "ima...
...ate a new img element. CSS can be used to establish any pretty borders or shadows and to specify the size of the image, so that doesn't need to be done here. Each image has the CSS class obj added to it, making it easy to find in the DOM tree. We also add a file attribute to each image specifying the File for the image; this will let us fetch the images for actual upload later. We use Node.append
Child() to add the new thumbnail to the preview area of our document. Next, we establish the FileReader to handle asynchronously loading the image and attaching it to the img element. After creating the new FileReader object, we set up its onload function and then call readAsDataURL() to start the read operation in the background. When the entire contents of the image file are loaded, they are convert...
...lick", function (e) { if (fileElem) { fileElem.click(); } e.preventDefault(); // prevent navigation to "#" }, false); fileElem.addEventListener("change", handleFiles, false); function handleFiles() { if (!this.files.length) { fileList.innerHTML = "<p>No files selected!</p>"; } else { fileList.innerHTML = ""; const list = document.createElement("ul"); fileList.append
Child(list); for (let i = 0; i < this.files.length; i++) { const li = document.createElement("li"); list.append
Child(li); const img = document.createElement("img"); img.src = URL.createObjectURL(this.files[i]); img.height = 60; img.onload = function() { URL.revokeObjectURL(this.src); } li.append
Child(img); const info = document.createEl...
...And 3 more matches
Node.getRootNode() - Web APIs
The first simple example returns a reference to the HTML/document node: rootNode = node.getRootNode(); This more complex example shows the difference between returning a normal root, and a root incuding the shadow root. ...
... returning a normal root, and a root incuding the shadow root. ...
... incuding the shadow root. ...
...And 3 more matches
ParentNode.append() - Web APIs
DOMString objects are inserted as equivalent Text nodes. Differences from Node.append
Child(): ParentNode.append() allows you to also append DOMString objects, whereas Node.append
Child() only accepts Node objects. ParentNode.append() has no return value, whereas Node.append
Child() returns the appended Node object. ParentNode.append() can append several nodes and strings, whereas Node.append
Child() can only append one node. ...
... Syntax // [Throws, Unscopable] ParentNode.append(...nodesOrDOMStrings) // returns undefined Parameters nodes A set of Node or DOMString objects to insert. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
...ws, Unscopable] ParentNode.append(...nodesOrDOMStrings) // returns undefined Parameters nodes A set of Node or DOMString objects to insert. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
...And 3 more matches
ParentNode.prepend() - Web APIs
Each node can be specified as either a Node object or as a string; strings are inserted as new Text nodes. Return value undefined. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
...Each node can be specified as either a Node object or as a string; strings are inserted as new Text nodes. Return value undefined. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
... a string; strings are inserted as new Text nodes. Return value undefined. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
...And 3 more matches
ParentNode - Web APIs
The ParentNode mixin contains methods and properties that are common to all types of Node objects that can have
children. It's implemented by Element, Document, and DocumentFragment objects. 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.
children Read only Returns a live HTMLCollection containing all of the Element objects that are
children of this ParentNode, omitting all of its non-element nodes. ParentNode.firstElement
Child Read only Returns the first node which is both a
child of this ParentNode and is also an Element, or null if there is none. ParentNode.lastElement
Child Read onl...
...hildren Read only Returns a live HTMLCollection containing all of the Element objects that are
children of this ParentNode, omitting all of its non-element nodes. ParentNode.firstElement
Child Read only Returns the first node which is both a
child of this ParentNode and is also an Element, or null if there is none. ParentNode.lastElement
Child Read only Returns the last node which is both a
child of this ParentNode and is an Element, or null if there is none. Methods ParentNode.append() Inserts a set of Node objects or DOMString objects after the last
child of the ParentNode. DOMString objects are inserted as equivalent Text nodes. ParentNode.prepend() Inserts a set of Node objects or DOMString objects before the first
child of the ParentNode. DOMString objects are inserted as...
...
child of the ParentNode. DOMString objects are inserted as equivalent Text nodes. ParentNode.querySelector() Returns the first Element with the current element as root that matches the specified group of selectors. ParentNode.querySelectorAll() Returns a NodeList representing a list of elements with the current element as root that matches the specified group of selectors. ...
...And 3 more matches
Signaling and video calling - Web APIs
ebSockets for signaling, but it is a common solution. You should, of course, select a mechanism for exchanging signaling information that is appropriate for your application. Let's update the chat client to support video calling. Updating the HTML The HTML for our client needs a location for video to be presented. This requires video elements, and a button to hang up the call: <div class="flex
Child" 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 over the page layout by enabling the use of CSS. We'll sk...
...age calls handleUserlistMsg(). Here we set up the handler for each connected user in the user list displayed to the left of the chat panel. This function receives a message object whose users property is an array of strings specifying the user names of every connected user. ...
...). Here we set up the handler for each connected user in the user list displayed to the left of the chat panel. This function receives a message object whose users property is an array of strings specifying the user names of every connected user. ...
...And 3 more matches
justify-self - CSS: Cascading Style Sheets
r similar to the one of stretch, except for boxes with an aspect ratio or an intrinsic sizes where it behaves like start. start The item is packed flush to each other toward the start edge of the alignment container in the appropriate axis. end The item is packed flush to each other toward the end edge of the alignment container in the appropriate axis. flex-start For items that are not
children of a flex container, this value is treated like start. flex-end For items that are not
children of a flex container, this value is treated like end. self-start The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis. self-end The item is packed flush to the edge of the alignment container of the end side of the item, in the a...
...ch causes the grid items to stretch across the entire width of their cells. The second, third, and fourth grid items are then given different values of justify-self, to show how these override the justify-items value. These values cause the grid items to span only as wide as their content width, and align in different positions across their cells. ...
...stretch across the entire width of their cells. The second, third, and fourth grid items are then given different values of justify-self, to show how these override the justify-items value. These values cause the grid items to span only as wide as their content width, and align in different positions across their cells. ...
...And 3 more matches
Adding captions and subtitles to HTML5 video - Developer guides
with it. 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. ...
...the <track> elements within the video's markup. ...
...First of all an option is added to allow the user to switch all subtitles off, and then buttons are added for each te...
...And 3 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
if(month === 'January' || month === 'March' || month === 'May' || month === 'July' || month === 'August' || month === 'October' || month === 'December') { dayNum = 31; } else if(month === 'April' || month === 'June' || month === 'September' |...
... if(month === 'January' || month === 'March' || month === 'May' || month === 'July' || month === 'August' || month === 'October' || month === 'December') { dayNum = 31; } else if(month === 'April' || month === 'June' || month === 'September' || month === 'November') { ...
... if(month === 'January' || month === 'March' || month === 'May' || month === 'July' || month === 'August' || month === 'October' || month === 'December') { dayNum = 31; } else if(month === 'April' || month === 'June' || month === 'September' || month === 'November') { dayNum = 30; } el...
...And 3 more matches
<template>: The Content Template element - HTML: Hypertext Markup Language
are not rendered, however. Content categories Metadata content, flow content, phrasing content, script-supporting element Permitted content No restrictions Tag omission None, both the starting and ending tag are mandatory. Permitted parents Any element that accepts metadata content, phrasing content, or script-supporting elements. Also allowed as a
child of a <colgroup> element that does not have a span attribute. Implicit ARIA role No corresponding role Permitted ARIA roles No role permitted DOM interface HTMLTemplateElement Attributes This element only includes the global attributes. However, the HTMLTemplateElement has a content property, which is a read-only DocumentFragment containing the DOM subt...
...} The re...
...true); var td = clone.querySelectorAll("td"); td[0].textContent = "1235646565"; td[1].textContent = "Stuff"; tbody.append
Child(clone); // Clone the new row and insert it into the table var clone2 = template.content.cloneNode(true); td = clone2.querySelectorAll("td"); td[0].textContent = "0384928528"; td[1].textContent = "Acme Kidney Beans 2"; tbody.append
Child(clone2); } else { // Find another way to add the rows to the table because // the HTML template element is not supported. } The result is the original HTML table, with two new rows appended to it via JavaScript: table { background: #000; } table td { background: #fff; } Avoiding DocumentFragment pitfall A DocumentFragment is not a valid target for various events, as such it is o...
...And 3 more matches
SVG documentation index - SVG: Scalable Vector Graphics
SVG, SVG Attribute The requiredFeatures attribute takes a list of feature strings, with the individual strings separated by white space. It determines whether or not all of the named features are supported by the browser; if all of them are supported, the attribute evaluates to true end the element is rendered; otherwise, the attribute evaluates to false and the current element and its
children are skipped and thus will not be rendered. This provides a way to design SVG that gracefully falls back when features aren't available. 178 restart SVG, SVG Attribute The restart attribute specifies whether or not an animation can restart. 179 result NeedsCompatTable, SVG, SVG Attribute The result attribute defines the assigned name for this filter pri...
...the glyph size can also be adjusted if you change lengthAdjust. 222 to NeedsCompatTable, SVG, SVG Attribute The to attribute indicates the final value of the attribute that will be modified during the animation. 223 transform SVG, SVG Attribute The transform attribute defines a list of transform definitions that are applied to an element and the element's
children. 224 transform-origin SVG, SVG Attribute The transform-origin SVG attribute sets the origin for an item's transformations. 225 type NeedsCompatTable, NeedsExample, SVG, SVG Attribute, filter The type attribute is a generic attribute and it has different meaning based on the context in which it's used. 226 u1 Deprecated, SVG, SVG Attribut...
... Element, Reference, SVG, SVG Container The <a> SVG element creates a hyperlink to other web pages, files, locations in the same page, email addresses, or any other URL. It is very similar to HTML's <a> element. 295 <altGlyph> Deprecated, Element, Reference, SVG, SVG Text Content The <altGlyph> SVG element allows sophisticated selection of the glyphs used to render its
child character data. 296 <altGlyphDef> Deprecated, Element, NeedsExample, Reference, SVG, SVG Text Content The <altGlyphDef> SVG element defines a substitution representation for glyphs. 297 <altGlyphItem> Deprecated, Element, NeedsExample, Reference, SVG, SVG Text Content The <altGlyphItem> element provides a set of candidates for glyph substitution by the <a...
...And 3 more matches
Using templates and slots - Web Components
e referenced using JavaScript. Let's look at a trivial quick example: <template id="my-paragraph"> <p>My paragraph</p> </template> This won't appear in your page until you grab a reference to it with JavaScript and then append it to the DOM, using something like the following: let template = document.getElementById('my-paragraph'); let templateContent = template.content; document.body.append
Child(templateContent); Although trivial, you can already start to see how this could be useful. Using templates with web components Templates are useful on their own, but they work even better with web components. Let's define a web component that uses our template as the content of its shadow DOM. We'll call it <my-paragraph>: customElements.define('my-paragraph', class extends HTMLElement { ...
...'s define a web component that uses our template as the content of its shadow DOM. We'll call it <my-paragraph>: customElements.define('my-paragraph', class extends HTMLElement { constructor() { super(); let template = document.getElementById('my-paragraph'); let templateContent = template.content; const shadowRoot = this.attachShadow({mode: 'open'}) .append
Child(templateContent.cloneNode(true)); } } ); The key point to note here is that we append a clone of the template content to the shadow root, created using the Node.cloneNode() method. And because we are appending its contents to a shadow DOM, we can include some styling information inside the template in a <style> element, which is then encapsulated inside the custom element. This wouldn't w...
...ferent text!</span> </my-paragraph> or <my-paragraph> <ul slot="my-text"> <li>Let's have some different text!</li> <li>In a list!</li> </ul> </my-paragraph> Note: Elements that can be inserted into slots are known as Slotable; when an element has been inserted in a slot, it is said to be slotted. Note: An unnamed <slot> will be filled with all of the custom element's top-level
child nodes that do not have the slot attribute. This includes text nodes. And that's it for our trivial example. If you want to play with it some more, you can find it on GitHub (see it running live also). A more involved example To finish off the article, let's look at something a little less trivial. The following set of code snippets show how to use <slot> together with <template> and some Jav...
...And 3 more matches
Forms related code snippets - Archive of obsolete content
Month.id = sPrefs + "-decr-month-" + nId; oIncrMonth.id = sPrefs + "-incr-month-" + nId; oIncrYear.id = sPrefs + "-incr-year-" + nId; oDecrYear.onmousedown = oIncrYear.onmousedown = oDecrMonth.onmousedown = oIncrMonth.onmousedown = onHeadClick; for (var nThId = 0; nThId < 7; nThId++) { oTH = document.createElement("th"); oTH.innerHTML = sDays[nThId]; oHRow.append
Child(oTH); } oTHead.append
Child(oHRow); oCapt.append
Child(oDecrYear); oCapt.append
Child(oDecrMonth); oCapt.append
Child(oIncrYear); oCapt.append
Child(oIncrMonth); oCapt.append
Child(this.display); this.container.append
Child(oCapt); this.container.append
Child(oTHead); this.current.setDate(1); this.writeDays(); oTarget.onclick = function () { if (oTable.parentNode) { ...
...
Child(oHRow); oCapt.append
Child(oDecrYear); oCapt.append
Child(oDecrMonth); oCapt.append
Child(oIncrYear); oCapt.append
Child(oIncrMonth); oCapt.append
Child(this.display); this.container.append
Child(oCapt); this.container.append
Child(oTHead); this.current.setDate(1); this.writeDays(); oTarget.onclick = function () { if (oTable.parentNode) { oTable.parentNode.remove
Child(oTable); return; } oTable.style.zIndex = nZIndex++; oTable.style.position = "absolute"; oTable.style.left = oTarget.offsetLeft + "px"; oTable.style.top = (oTarget.offsetTop + oTarget.offsetHeight) + "px"; oTarget.parentNode.insertBefore(oTable, oTarget); }; aInstances.push(this); } DatePicker.prototype.writeDays = function () { const...
...Target.parentNode.insertBefore(oTable, oTarget); }; aInstances.push(this); } DatePicker.prototype.writeDays = function () { const nEndBlanks = (this.current.getDay() + bZeroIsMonday * 6) % 7, nEnd = aMonthLengths[this.current.getMonth()] + nEndBlanks, nTotal = nEnd + ((7 - nEnd % 7) % 7); var oTD, oTR; if (this.oTBody) { this.container.remove
Child(this.oTBody); } this.oTBody = document.createElement("tbody"); for (var nDay, oDay, nIter = 0; nIter < nTotal; nIter++) { if (nIter % 7 === 0) { oTR = document.createElement("tr"); this.oTBody.append
Child(oTR); } nDay = nIter - nEndBlanks + 1; oTD = document.createElement("td"); if (nIter + 1 > nEndBlanks && nIter < nEnd) { oTD.class...
...And 2 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
http://mozilla.org/"/> Listing 10: The oncommand event handler Because the Gecko engine implements DOM Level 2 event handlers, you can define dynamic event listeners such as the one in Listing 11. var item = document.getElementById('menu-item-custom'); function handleCommandEvent(aEvent) { alert('OK'); item.removeEventListener('command', handleCommandEvent, false); item.parentNode.remove
Child(item); } item.addEventListener('command', handleCommandEvent, false); Listing 11: Additions and deletions using a dynamic event listener Special menu items Much like input elements in HTML, menuitem elements can operate like checkboxes and radio buttons by setting their type attributes. checkbox Adding type="checkbox" to a menuitem element will check that when it is selected, and uncheck i...
...e radio buttons in HTML. For an example of this kind of menu item, see the Character Encoding submenu of the View menu in Firefox. The selected radio button has the selected="true" attribute set. Contextual menus The context attribute is used to display a contextual menu or shortcut menu, that is, a custom menu that will appear when right-clicking on an element. Earlier we placed the menupopup
child element inside a menu element; here, we use it outside the menu element. Instead, the menupopup element is a direct
child of the root element and we invoke it using its id attribute, which we set as the value for the context attribute on any other XUL element. When we right-click on that XUL element, we reference that menupopup element by its id, and display its contents as a contextual menu. Lis...
...ting 13 - Checkbox-type toolbar buttons Specifying type="checkbox" results in a button that stays depressed when clicked, and pops up when clicked again. The button in its depressed state has checked="true" set. This is the kind of button used for the History and Bookmark buttons that can be used to customize the toolbar. - Menu-type toolbar buttons Specifying type="menu" and adding a menupop
child element (In Firefox 3, you can also use the panel element), or setting the popup attribute to reference a popup menu located elsewhere by its id, will display a popup menu when the button is pressed. Here, the button-click itself is not taken as the input; instead, a command event is issued only when a popup menu item is selected. This is the type of button used for the List All Tabs button at th...
...And 2 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
ld be able to get the gist of how XPCOM is used by looking at the sample code. You can paste almost all the sample code in this chapter into your existing test.xul file to try it out. Feel free to fill in blank spots as you see fit. Make sure to change file paths to match your own environment. You can download the source code used in this chapter. Get window While you can use JavaScript to get
child windows opened from the parent window, you cannot get dialogs or windows that have no relation to that window. To overcome this limitation, nsIWindowMediator makes it possible to access all of Firefox's windows. Get active window One thing that nsIWindowMediator is often used for is to get the active window. Listing 4 shows how to get the active browser window and the number of open tabs. Pass...
... directory Use the directoryEntries property to perform operations on all the files or folders in a given folder. This property returns a nsISimpleEnumerator-type object similar to the window overview, so you can get each element using similar techniques. Listing 9 shows how to list the contents of a folder. ...
...roperty to perform operations on all the files or folders in a given folder. This property returns a nsISimpleEnumerator-type object similar to the window overview, so you can get each element using similar techniques. Listing 9 shows how to list the contents of a folder. ...
...And 2 more matches
Monitoring downloads - Archive of obsolete content
executeStep()) { var row = document.createElement('listitem'); // Add the cells to the row var cell = document.createElement('listcell'); var sourceStr = statement.getString(0); row.setAttribute("tooltiptext", sourceStr); sourceStr = sourceStr.slice(sourceStr.lastIndexOf("/")+1); cell.setAttribute("label", sourceStr); // Source row.append
Child(cell); cell = document.createElement('listcell'); cell.setAttribute("label", (statement.getInt64(1) / 1024).toFixed(1) + "KB"); // Size cell.setAttribute("style", "text-align:right"); row.append
Child(cell); var theDate = new Date(statement.getInt64(2) / 1000); // Start time cell = document.createElement('listcell'); var dateStr = theDat...
...te("label", (statement.getInt64(1) / 1024).toFixed(1) + "KB"); // Size cell.setAttribute("style", "text-align:right"); row.append
Child(cell); var theDate = new Date(statement.getInt64(2) / 1000); // Start time cell = document.createElement('listcell'); var dateStr = theDate.toLocaleString(); cell.setAttribute("label", dateStr); row.append
Child(cell); theDate = new Date(statement.getInt64(3)); // End time cell = document.createElement('listcell'); dateStr = theDate.toLocaleString(); cell.setAttribute("label", dateStr); row.append
Child(cell); var speed = statement.getDouble(4) / 1024.0; cell = document.createElement('listcell'); cell.setAttribute("label", speed.toFixed(...
... cell = document.createElement('listcell'); dateStr = theDate.toLocaleString(); cell.setAttribute("label", dateStr); row.append
Child(cell); var speed = statement.getDouble(4) / 1024.0; cell = document.createElement('listcell'); cell.setAttribute("label", speed.toFixed(1) + "KB/sec"); cell.setAttribute("style", "text-align:right"); row.append
Child(cell); var status = statement.getInt32(5); var style = "color:black"; cell = document.createElement('listcell'); var statusStr; switch(status) { case 0: statusStr = "Downloading"; break; case 1: statusStr = "Complete"; style = "color:green"; break; case 2: statusStr =...
...And 2 more matches
Additional Navigation - Archive of obsolete content
bject attribute may be a resource URI or a literal value. Using a literal as the object of a triple is a common way to filter out specific items. For instance, if items were identified with a type, the data could be filtered to include only items of a particular type. 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. You might be able to guess that it will cause a match for only one of the photos, the Canal photo. The others won't be able to match when evaluating the triple. To look cl...
...r both. You can't have a triple with no variables. That's not an issue though, since it wouldn't be particularly useful. Also, you cannot use a variable in the predicate. Only the subject and object attributes may have variables. 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. The builder won't generate any output in this situation. The member tag must have variable...
...="?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. The builder won't generate any output in this situation. The member tag must have variables for both the container and
child attributes. It wouldn't be very common to filter for a specific
child anyway. Source Navigation Triples may also be used to navigate up the graph as well as downwards, following the graph arrows in the reverse direction. For instance, in the original example, we could start at node D and navigate upwards to A and C. The syntax for the triple is the same except that the known variable should be ...
...And 2 more matches
Containment Properties - Archive of obsolete content
This allows you to iterate over a non-container. To do this, use the containment attribute on the root node, set to the predicate to iterate over. Let's look back at the very first example again. It doesn't have any containers, but we may want to iterate over the relatedItem predicate using the simple query syntax. We can add the containment attribute to do this. ...
...nt attribute as an indicator that an element is a container. If the starting node (or ref) has that predicate as one of its triples in the RDF data, the builder will use it in addition to checking if it is a container. Note the distinction here. The containment attribute doesn't replace the existing container checking. If the resource 'http://www.xulplanet.com/rdf/A' was also an RDF Seq with some
children, then those
children would also be added to the results. This next example demonstrates this. The only difference between this and the previous example is a a couple of additional lines added to the RDF/XML: <rdf:Seq rdf:about="http://www.xulplanet.com/rdf/A"> <rdf:li rdf:resource="http://www.xulplanet.com/rdf/E"/> <rdf:li rdf:resource="http://www.xulplanet.com/rdf/F"/> </rdf:Seq> The eff...
... lines added to the RDF/XML: <rdf:Seq rdf:about="http://www.xulplanet.com/rdf/A"> <rdf:li rdf:resource="http://www.xulplanet.com/rdf/E"/> <rdf:li rdf:resource="http://www.xulplanet.com/rdf/F"/> </rdf:Seq> The effect is that there are five results instead of three. ...
...And 2 more matches
Rule Compilation - Archive of obsolete content
inside hidden areas of the UI? No, you can still do that. Changing the hidden state of an element isn't the only way to cause content to be generated. Calling a DOM API which needs to get at the generated content will cause the template builder to generate output. For example, just calling the code like the following on the hidden vbox above will start off the template builder. var length = vbox.
childNodes.length; This request to return the number of
children of the vbox will make the template builder process the query and output content. Once done, the correct length can be returned. All of this is transparent to the XUL developer. When the template builder decides to start generation is determined automatically, and you don't need to do anything special to get this to happen. However, there...
...x will make the template builder process the query and output content. Once done, the correct length can be returned. All of this is transparent to the XUL developer. When the template builder decides to start generation is determined automatically, and you don't need to do anything special to get this to happen. However, there are two cases where content is not generated automatically: menus and
child tree items. Content inside a menu is not generated until the menu is opened. This makes sense since the user can't see the contents of the menu until it is open. However, it also means that the DOM API usage, such as an attempt to get the number of
child nodes as above, will also not include generated items until the menu is opened. This is an important distinction. That means that you will not b...
...Lazy generation comes in handy for menus and trees especially when dealing with recursive items. ...
...And 2 more matches
Simple Example - Archive of obsolete content
rdf:RDF> In this example, we have three images, which can be identified by urls. The resource uris correspond to their actual urls although this isn't necessary. Each image also has one property, the image's title. A template which displays this information is very simple to create. Unlike previous examples where we iterated over a property to navigate the graph, here we want to iterate over the
children of an RDF container. The container, an RDF Seq, has the uri 'http://www.xulplanet.com/rdf/myphotos'. This will be the starting point of the navigation. We want the endpoints to be the three images. First, we set the datasources and ref attributes as needed: <vbox datasources="template-guide-ex2.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> This time, we need to use a new statement,...
...is will be the starting point of the navigation. We want the endpoints to be the three images. First, we set the datasources and ref attributes as needed: <vbox datasources="template-guide-ex2.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> This time, we need to use a new statement, the member condition as well as a triple. <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'. The same starting variable is used in this example, but you can of c...
...ery> 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'. The same starting variable is used in this example, but you can of course use any variable you wish. ...
...And 2 more matches
Simple Query Syntax - Archive of obsolete content
<< PreviousNext >> When iterating over the
children of an RDF container, there is a simpler query syntax which may used. It may also be used when iterating over only one predicate. Simple RDF graph navigation such as this is common, so the simpler syntax is usually used in this situation since it avoids extra tags, although the simple syntax is not more or less efficient, at least when a single query is involved. A simple query is equivalent to a query with only the content tag and a member tag, as well as optionally a set of triples from the
child node. ...
...avoids extra tags, although the simple syntax is not more or less efficient, at least when a single query is involved. A simple query is equivalent to a query with only the content tag and a member tag, as well as optionally a set of triples from the
child node. At its simplest, the simple query syntax is equivalent to the following: <query> <content uri="?start"/> <member container="?start"
child="?photo"/> </query> The template builder uses the simple query syntax whenever a template does not have a <query> element. ...
...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. ...
...And 2 more matches
Special Condition Tests - Archive of obsolete content
accomplishes the same effect except that it using the parent matching mechanism. Note the parent attribute on the rule element, set to the value vbox. This causes the rule to match only content that would be inserted in a vbox element. As the outer element is a vbox, this will match for all results in the first iteration of the template. However, for the next iteration, that is, the next level of
children, the content would instead be inserted into the groupbox generated from the previous iteration. This does not match the first rule, so the content from the second rule is generated instead. The end effect is the same output, however, the source code is simpler. This technique is useful when you know that the content will be different at each level. If this is not the case, you will still need ...
...rst rule will not match in this case, but the second rule will match and a label will be created. The result can be seen if you try the example. ...
...l="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 been added. Since the iscontainer attribute is set to true, the rule will match as long as the member value or
child of the starting node is an RDF container. We could also have left the rules in the original order and set the iscontainer on the first rule to false. The only thing we need to make sure is that the rules are in the proper order, so that the right data will be matched by the right rule. Remember, the more specific rules should go before less specific rules. Note that leaving out the iscontainer at...
...And 2 more matches
Element Positioning - Archive of obsolete content
point but the button will stop growing in size. The box the button is inside will also continue to grow, unless you set a maximum height on the box also. If two buttons are equally flexible, normally both will share the amount of extra space. If one button has a maximum width, the second will still continue to grow and take all of the remaining space. If a box has a maximum width or height, the
children cannot grow larger than that maximum size. If a box has a minimum width or height, the
children cannot shrink smaller than that minimum size. Examples of setting widths and heights <button label="1" style="width: 100px;"/> <button label="2" style="width: 100em; height: 10px;"/> <button label="3" flex="1" style="min-width: 50px;"/> <button label="4" flex="1" style="min-height: 2ex; max-width:...
..., a minimum width of 15 ems has been set so that the text box will always show at least 15 characters. If the user resizes the dialog to be very small, the text input will not shrink past 15 ems. It will be drawn as if it extends past the edge of the window. Notice in the image that the text input has grown to extend to the full size of the window. Box Packing Let's say you have a box with two
child elements, both of which are not flexible, but the box is flexible. For example: Example 3: Source View <box flex="1"> <button label="Happy"/> <button label="Sad"/> </box> If you resize the window, the box will stretch to fit the window size. The buttons are not flexible, so they will not change their widths. The result is extra space that will appear on the right side of the window, insid...
...ght side of the window, inside the box. You may wish, however, for the extra space to appear on the left side instead, so that the buttons stay right aligned in the window. You could accomplish this by placing a spacer inside the box, but that gets messy when you have to do it numerous times. A better way is to use an additional attribute pack on the box. This attribute indicates how to pack the
child elements inside the box. For horizontally oriented boxes, it controls the horizonal positioning of the
children. For vertically oriented boxes, it controls the vertical positioning of the
children. You can use the following values: start This positions elements at the left edge for horizontal boxes and at the top edge for vertical boxes. This is the default value. center This centers the ch...
...And 2 more matches
Stack Positioning - Archive of obsolete content
However, you may also place the
children at specific coordinates. For example, if a stack has two buttons as
children, one may be placed 20 pixels from the left edge and 50 pixels from the top edge. The second button can be placed at 100 pixels from the left edge and 5 pixels from the top edge. The position of a
child element may be specified by placing two attributes on the element. ...
...ldren Normally, the
child elements of a stack stretch to fit the size of the stack. However, you may also place the
children at specific coordinates. For example, if a stack has two buttons as
children, one may be placed 20 pixels from the left edge and 50 pixels from the top edge. The second button can be placed at 100 pixels from the left edge and 5 pixels from the top edge. The position of a
child element may be specified by placing two attributes on the element. For the horizontal position, use the left attribute and for the vertical position, use the top attribute. If you don't put these attributes on a
child of a stack, the
child will 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" ...
...tributes on a
child of a stack, the
child will 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. They may be any element, including boxes and other stacks. The size of a stack is determined by the positions of the
child elements. It is always sized so that all of the
child elements are visible (excluding any
children with -moz-stack-sizing: ignore). So if you set a left attribute to 400, the stack will have a width around 400 pix...
...And 2 more matches
Tree Box Objects - Archive of obsolete content
ript> function doScroll(){ var value = document.getElementById("tbox").value; var tree = document.getElementById("thetree"); var boxobject = tree.boxObject; boxobject.QueryInterface(Components.interfaces.nsITreeBoxObject); boxobject.scrollToRow(value); } </script> <tree id="thetree" rows="4"> <treecols> <treecol id="row" label="Row" primary="true" flex="1"/> </treecols> <tree
children> <treeitem label="Row 0"/> <treeitem label="Row 1"/> <treeitem label="Row 2"/> <treeitem label="Row 3"/> <treeitem label="Row 4"/> <treeitem label="Row 5"/> <treeitem label="Row 6"/> <treeitem label="Row 7"/> <treeitem label="Row 8"/> <treeitem label="Row 9"/> </tree
children> </tree> <hbox align="center"> <label value="Scroll to row:"/> <textbox i...
...ue.id; document.getElementById("row").value = row.value; document.getElementById("column").value = column.value; document.getElementById("part").value = part.value; } </script> <tree id="thetree" flex="1" onmousemove="updateFields(event);"> <treecols> <treecol id="utensil" label="Utensil" primary="true" flex="1"/> <treecol id="count" label="Count" flex="1"/> </treecols> <tree
children> <treeitem> <treerow> <treecell label="Fork"/> <treecell label="5"/> </treerow> </treeitem> <treeitem> <treerow> <treecell label="Knife"/> <treecell label="2"/> </treerow> </treeitem> <treeitem> <treerow> <treecell label="Spoon"/> <treecell label="8"/> </treerow> </treeitem> </treechi...
...An out parameter is used since the function needs to return more that one value. You will see a number of interfaces that use out parameters in the XULPlanet object reference (FIXME: deadLink). These are indicated by the word 'out' before the argument. For these, you w...
...And 2 more matches
The Implementation of the Application Object Model - Archive of obsolete content
a pluggable data source. Just in case you still aren't convinced that all content nodes should be the same kind of element, consider another problem: how to implement aggregation. Suppose that a bookmarks folder contains a mailbox folder, a composer page template, and a bookmark. ...
...till aren't convinced that all content nodes should be the same kind of element, consider another problem: how to implement aggregation. Suppose that a bookmarks folder contains a mailbox folder, a composer page template, and a bookmark. In order to achieve aggregation of data, a content node implementation cannot make any assumptions about what kind of
children it holds. It can only refer to its
child nodes through the various content tree interfaces. What we run into now is the problem of how one local content node knows how to instantiate other kinds of content nodes. The only way that one content node would know how to instantiate a content node of a completely different type is if it had additional information stored for every
child content node that it contained. It would have to consult ...
...If all content nodes are of the same type this problem can be solved in a cleaner fashion. ...
...And 2 more matches
prefwindow - Archive of obsolete content
isclosure" button is pressed. ondialoghelp Type: script code The code in this attribute is called when the "help" button is pressed. prefwindow.onload Type: script code When a window finishes loading, it calls this event handler on the prefwindow element. title Type: string The text to appear in the title bar of the window. type Type: string Set this attribute to
child for preference dialogs that are
child dialogs of a main preferences window. This ensures that the preferences are only saved when the main dialog is closed, if this is the appropriate behaviour for the platform. Properties buttons Type: comma-separated list of the values below A comma-separated list of buttons to appear on the dialog box. The buttons will be placed in suitable l...
... lastSelected Type: string Set this to the id of the last selected pane. It will be opened by default the next time the preferences dialog is opened. preferencePanes Type: DOM NodeList Holds a list of all the prefpane elements in the window. type Type: string Gets and sets the value of the type attribute. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData acceptDialog...
...And 2 more matches
radiogroup - Archive of obsolete content
Place the radiogroup inside a groupbox if you would like a border or caption for the group. The radiogroup defaults to vertical orientation. More information is available in the XUL tutorial. ...
...ect for the element. disabled Type: boolean Gets and sets the value of the disabled attribute. focusedItem Type: radio element Holds the currently focused item in the radiogroup, which may or may not be the same as the selected item. You can change the focused item by setting this property. itemCount Type: integer Read only property holding the number of
child items. selectedIndex Type: integer Returns the index of the currently selected item. You may select an item by assigning its index to this property. By assigning -1 to this property, all items will be deselected. Returns -1 if no items are selected selectedItem Type: element Holds the currently selected item. If no item is currently selected, this ...
...er. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
...And 2 more matches
treeitem - Archive of obsolete content
The treeitem can be clicked by the user to select the row of the tree. The treeitem contains a single row and all of what appear to the user as that row's descendants. In a template condition, you should use a treeitem instead of a content element when the dont-build-content flag is specified. Set the uri attribute to the variable name to bind to a content node during matching. More information is available in the XUL tutorial. ...
...ad of a content element when the dont-build-content flag is specified. Set the uri attribute to the variable name to bind to a content node during matching. More information is available in the XUL tutorial. 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. This would be used for folders. This will be set by the template builder as needed. empty Type: boolean Set to true if the element is a container that contains no
children. This will be set by the template builder as needed. label Tipo: string (concatenacion de caracteres) Para un arbol tree con columnas simples, la etiqueta puede ser colocada directamnete sobre el el...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...And 2 more matches
Building up a basic demo with the PlayCanvas engine - Game development
W); app.setCanvasResolution(pc.RESOLUTION_AUTO); Camera Now when the setup code is in place we need to think about implementing the standard scene components: camera, lights and objects. Let's start with the camera -- add these lines to your code, below the previous ones. var camera = new pc.Entity(); camera.addComponent("camera", { clearColor: new pc.Color(0.8, 0.8, 0.8) }); app.root.add
Child(camera); camera.setPosition(0, 0, 7); The code above will create a new Entity. Note: An Entity is any object used in the scene -- it can be an object like a box, cylinder or cone, but it can also be a camera, light or sound source. Then it adds a camera component to it with the light gray clearColor -- the color will be visible as the background. Next, the camera object is added to the root...
...le line of code. There are cubes, spheres, cylinders and more complicated shapes available. Drawing everything for given shape is taken care of by the engine, so we can focus on the high level coding. Let's start by defining the geometry for a cube shape -- add the following new code below your previous additions: var box = new pc.Entity(); box.addComponent("model", { type: "box" }); app.root.add
Child(box); box.rotate(10, 15, 0); It will create an Entity with the box model component and add it to the root of the application, our scene. We also rotate the box a bit to show that it's actually a 3D cube and not a square. The cube is visible, but it is completely. To make it look better we need to shine some light onto it. Lights The basic light types in PlayCanvas are directional and ambient...
...some light onto it. Lights The basic light types in PlayCanvas are directional and ambient. The first type is a directional light placed somewhere on the scene while the scond one reflects the light from the first type, so it looks more natural; this can be set globally. Again, add the new code below your previous additions. var light = new pc.Entity(); light.addComponent('light'); app.root.add
Child(light); light.rotate(45, 0, 0); It will create a light Entity component and add it to the scene. We can rotate the light on the x axis to make it shine on more than one side of the cube. It's time to add the ambient light: app.scene.ambientLight = new pc.Color(0.2, 0.2, 0.2); The code above assign a dark grey ambient light for the whole scene. The box look better now, but it could get some c...
...And 2 more matches
Cascade and inheritance - Learn web development
colored red -- the class selector gives its rule a higher specificity, and so it will be applied even though the rule with the element selector appears further down in the source order. We'll explain specificity scoring and other such things later on. Inheritance Inheritance also needs to be understood in this context -- some CSS property values set on parent elements are inherited by their
child elements, and some aren't. For example, if you set a color and font-family on an element, every element inside it will also be styled with that color and font, unless you've applied different color and font values directly to them. Some properties do not inherit -- for example if you set a width of 50% on an element, all of its descendants do not get a width of 50% of their parent's width. I...
...rs don't remember all the details. The below video shows how you can use the Firefox DevTools to inspect a page's cascade, specificity, and more: Understanding inheritance We'll start with inheritance. In the example below we have a <ul>, with two levels of unordered lists nested inside it. We have given the outer <ul> a border, padding, and a font color. ...
...s. The below video shows how you can use the Firefox DevTools to inspect a page's cascade, specificity, and more: Understanding inheritance We'll start with inheritance. In the example below we have a <ul>, with two levels of unordered lists nested inside it. We have given the outer <ul> a border, padding, and a font color. ...
...And 2 more matches
Graceful asynchronous programming with Promises - Learn web development
ody in curly braces this time (otherwise it'll throw an error). Add the following to the end of your code: let promise3 = promise2.then(myBlob => { }) Now let's fill in the body of the executor function. Add the following lines inside the curly braces: let objectURL = URL.createObjectURL(myBlob); let image = document.createElement('img'); image.src = objectURL; document.body.append
Child(image); Here we are running the URL.createObjectURL() method, passing it as a parameter the Blob returned when the second promise fulfills. This will return a URL pointing to the object. Then we create an <img> element, set its src attribute to equal the object URL and append it to the DOM, so the image will display on the page! If you save the HTML file you've just created and load it in ...
... Note: .then()/.catch() blocks in promises are basically the async equivalent of a try...catch block in sync code. Bear in mind that synchronous try.
... The code we provided here for displaying the items is fairly rudimentary but works as an explai...
...And 2 more matches
Displaying Places information using views
he built-in tree view to display bookmarks whose titles or URLs contain "mozilla". Remember that, because XUL is XML, any ampersands in query URIs must be written as entity reference & and not simply &. <tree type="places" place="place:terms=mozilla&onlyBookmarked=1&queryType=1"> <treecols> <treecol id="title" label="My Bookmarks" flex="1" primary="true" /> </treecols> <tree
children /> </tree> The next example does the same as the last but uses JavaScript to set the tree's place attribute: var histServ = Cc["@mozilla.org/browser/nav-history-service;1"]. getService(Ci.nsINavHistoryService); var query = histServ.getNewQuery(); query.searchTerms = "mozilla"; query.onlyBookmarked = true; var opts = histServ.getNewQueryOptions(); opts.queryType = opts.QUERY_TYPE_BOOKM...
...fically has changed, it notifies its view by calling an appropriate method of nsINavHistoryResultViewer. Once notified, the view is responsible for updating itself. Note: Starting in Gecko 2.0, nsINavHistoryResultViewer has been replaced by the more powerful nsINavHistoryResultObserver. Tree view Create a built-in tree view by setting the type attribute to "places" on a tree element. The tree
children element should be empty: <tree type="places"> <treecols> <treecol id="title" flex="1" primary="true" /> <treecol id="url" flex="1" /> </treecols> <tree
children /> </tree> The tree view is implemented in browser/components/places/content/tree.xml. See the tree reference and Trees tutorial for general information about trees. If you would like your tree view to be styled in the...
...ou. If, on the other hand, you are writing a custom tree view, you will need to write similar code at some point. Menu view You can display Places information in a popup menu. In Firefox 3.6 and earlier Requires Gecko 1.9.2(Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Create a built-in menu view by setting the type attribute to "places" on an empty menupopup element (which would be a
child of some parent menu element): <menu> <menupopup type="places" /> </menu> The place attribute or property should be set on the menupopup as well. In Firefox 4 and later Requires Gecko 2.0(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) You can add Places information to a popup like this: <menu id="bookmarksMenu"> <menupopup placespopup="true"> onpopupshowing="if (!document.get...
...And 2 more matches
Gecko Roles
he system mouse pointer. ROLE_CARET Represents the system caret. ROLE_ALERT Represents an alert or a condition that a user should be notified about. Assistive Technologies typically respond to the role by reading the entire onscreen contents of containers advertising this role. Should be used for warning dialogs, etc. ROLE_WINDOW Represents the window frame, which contains
child objects such as a title bar, client, and other objects contained in a window. The role is supported automatically by Microsoft Windows. ROLE_INTERNAL_FRAME A sub-document. ROLE_MENUPOPUP Represents a menu, which presents a list of options from which the user can make a selection to perform an action. ROLE_MENUITEM Represents a menu item, which is an entry in a menu that a ...
...ng the user to select one or more items. ROLE_LISTITEM Represents an item in a list. ROLE_OUTLINE Represents an outline or tree structure, such as a tree view control, that displays a hierarchical list and allows the user to expand and collapse branches. ROLE_OUTLINEITEM Represents an item in an outline or tree structure. ROLE_PAGETAB Represents a page tab, it is a
child of a page tab list. ROLE_PROPERTYPAGE Represents a property sheet. ROLE_INDICATOR Represents an indicator, such as a pointer graphic, that points to the current item. ROLE_GRAPHIC Represents a picture. ROLE_STATICTEXT Represents read-only text, such as labels for other controls or instructions in a dialog box. Static text cannot be modified or selected. ROLE_TE...
... a component that lets the user pick various attributes for fonts. ROLE_CHROME_WINDOW Frame role. A top level window with a title bar, border, menu bar, etc. It is often used as the primary window for an application. ROLE_GLASS_PANE A glass pane. A pane that is guaranteed to be painted on top of all panes beneath it. ROLE_HTML_CONTAINER A document container for HTML, whose
children represent the document content. ROLE_ICON A small fixed size picture, typically used to decorate components. ROLE_LABEL Presents an icon or short string in an interface. ROLE_LAYERED_PANE A layered pane. A specialized pane that allows its
children to be drawn in layers, providing a form of stacking order. This is usually the pane that holds the menu bar as well as the p...
...And 2 more matches
nsIAccessNode
rits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) The nsIAccessNode implementations are instantiated lazily. The nsIAccessNode tree for a given DOM window has a one to one relationship to the DOM tree. If the DOM node for this access node is "accessible", then a QueryInterface to nsIAccessible will succeed. ...
...ts Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) The nsIAccessNode implementations are instantiated lazily. The nsIAccessNode tree for a given DOM window has a one to one relationship to the DOM tree. If the DOM node for this access node is "accessible", then a QueryInterface to nsIAccessible will succeed. ...
...s unattached from the accessible tree will result in an exception - NS_ERROR_FAILURE. Attribute Type Description document nsIAccessibleDocument The document accessible that this access node resides in. Read only. Note: Renamed from accessibleDocument in Gecko 2.0 DOMNode Node The DOM node this nsIAccessNode is associated with. Read only. first
ChildNode nsIAccessNode The first nsIAccessNode
child. Read only. Obsolete since Gecko 2.0 innerHTML DOMString The innerHTML for the DOM node This is a text string of all the markup inside the DOM node, not including the start and end tag for the node. Read only. language DOMString The language for the current DOM node, for example en, de, and so on. Read only. ...
...And 2 more matches
NextSibling
<< nsIAccessible Page Summary Returns next sibling in accessible tree. ...
... << nsIAccessible Page Summary Returns next sibling in accessible tree. ...
... << nsIAccessible Page Summary Returns next sibling in accessible tree. ...
...And 2 more matches
PreviousSibling
<< nsIAccessible Page Summary Returns previous node in accessible tree. ...
... << nsIAccessible Page Summary Returns previous node in accessible tree. ...
... << nsIAccessible Page Summary Returns previous node in accessible tree. ...
...And 2 more matches
nsIAccessibleSelectable
accessible/public/nsIAccessibleSelectable.idlScriptable An interface for the accessibility module and in-process accessibility clients for dealing with getting and changing the selection of accessible nodes. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void add
ChildToSelection(in long index); void clearSelection(); nsIArray GetSelected
Children(); boolean is
ChildSelected(in long index); nsIAccessible refSelection(in long index); void remove
ChildFromSelection(in long index); boolean selectAllSelection(); Attributes Attribute Type Description selectionCount long The number of accessible
children currently selected. Read only. Constants Constant Value Description eSelection_Add 0 eSelection_Remove 1 eSelection_GetState ...
...n long index); nsIAccessible refSelection(in long index); void remove
ChildFromSelection(in long index); boolean selectAllSelection(); Attributes Attribute Type Description selectionCount long The number of accessible
children currently selected. Read only. Constants Constant Value Description eSelection_Add 0 eSelection_Remove 1 eSelection_GetState 2 Methods add
ChildToSelection() Adds the specified accessible
child of the object to the object's selection. If the specified object is already selected, then it does nothing. void add
ChildToSelection( in long index ); Parameters index The zero-based accessible
child index. Exceptions thrown NS_ERROR_FAILURE If the specified object is not selectable. clearSelection() Clears the selection in the object so tha...
...ection() Adds the specified accessible
child of the object to the object's selection. If the specified object is already selected, then it does nothing. void add
ChildToSelection( in long index ); Parameters index The zero-based accessible
child index. Exceptions thrown NS_ERROR_FAILURE If the specified object is not selectable. clearSelection() Clears the selection in the object so that no
children in the object are selected. void clearSelection(); Parameters None. GetSelected
Children() Returns an nsIArray of the selected nsIAccessible
children. nsIArray GetSelected
Children(); Parameters None. Return value An nsIArray. is
ChildSelected() Determines if the current
child of this object is selected. boolean is
ChildSelected( in long index ); Parameters index The zero-based accessible ch...
...And 2 more matches
nsIFocusManager
ed(in nsIDOMWindow aWindow); Native code only! void windowShown(in nsIDOMWindow aWindow, in PRBool aNeedsFocus); Native code only! Attributes Attribute Type Description activeWindow nsIDOMWindow The most active (frontmost) window, or null if no window that is part of the application is active. ...
...t
child window's current element, if any. Setting this to null or to a non-top-level window throws an NS_ERROR_INVALID_ARG exception. focusedElement nsIDOMElement The element that is currently focused. This will always be an element within the document loaded in focusedWindow or null if no element in that document is focused. Read only. focusedWindow nsIDOMWindow The
child window within the activeWindow that is focused. This will always be activeWindow, a
child window of activeWindow or null if no
child window is focused. Setting the focusedWindow changes the focused window and raises the toplevel window it is in. ...
...This process repeats downwards until a non-frame element is found. Constants Constant Value Description FLAG_RAISE 1 FLAG_NOSCROLL 2 Do not scroll the element to focus into view. ...
...And 2 more matches
nsIProcessScriptLoader
IDL file: mozilla-central/source/dom/base/nsIMessageManager.idl Inherits from: nsISupports This interface is used by parent process message managers to load scripts into a
child process. The scripts run only once per process. The global object for process scripts is a ContentProcessMessageManager. Methods void loadProcessScript(in AString aURL, in boolean aAllowDelayedLoad) void removeDelayedProcessScript(in AString aURL); jsval getDelayedProcessScripts(); loadProcessScript() Load a script in the
child process. Process scripts are loaded as soon as loadProcessScript() is called. If this function is called on a ChromeMessageBroadcaster, : it will load the process script into all
child processes. if aAllowD...
...ipt(in AString aURL); jsval getDelayedProcessScripts(); loadProcessScript() Load a script in the
child process. Process scripts are loaded as soon as loadProcessScript() is called. If this function is called on a ChromeMessageBroadcaster, : it will load the process script into all
child processes. if aAllowDelayedLoad is true, then the script will also be loaded into any new
child processes created after the loadProcessScript() call. Otherwise it will only be loaded into
child processes that exist at the time of the call. ...
...e process script into all
child processes. if aAllowDelayedLoad is true, then the script will also be loaded into any new
child processes created after the loadProcessScript() call. Otherwise it will only be loaded into
child processes that exist at the time of the call. If this function is called on a ChromeMessageSender: it will load the process script only into this ChromeMessageSender's
child process aAllowDelayedLoad should always be true. It's possible that the
child process for this ChromeMessageSender is not yet available at the time of the loadProcessScript() call, and if you pass false in this situation, your process script won't be loaded. For example: let ppmm = Services.ppmm.get
ChildAt(1); ppmm.loadProcessScript('data:,dump("foo\n");', true); Parameters Name ...
...And 2 more matches
AbstractRange - Web APIs
ts of an element, keep in mind that the element itself is a node, but so is any text inside it. In order to set a range endpoint within the text of an element, be sure to find the text node inside the element: let startElem = document.querySelector("p"); let endElem = startElem.querySelector("span"); let range = document.createRange(); range.setStart(startElem, 0); range.setEnd(endElem, endElem.
childNodes[0].length/2); let contents = range.cloneContents(); document.body.append
Child(contents); This example creates a new range, rng, and sets its starting point to the third
child node of the first element whose class is elementclass. The end point is set to be the middle of the first
child of the span, and then the range is used to copy the contents of the range. Ranges and the hierarchy of ...
...lect the entire contents of the <p> element, including its descendants, this works perfectly. If we wish to instead copy the text "An interesting thing..." from the <section>'s heading (an <h2> element) through the end of the letters "ve" in the <em> within the paragraph below it, the following code would work: let r = document.createRange(); let startNode = document.querySelector("section h2").
childNodes[0]; r.setStart(startNode, 11); let endNode = document.querySelector("#entry1 p em").
childNodes[0]; r.setEnd(endNode, 2); let fragment = r.cloneContents(); Here an interesting problem arises--we are capturing content from multiple nodes located at different levels of the DOM hierarchy, and then only part of one of them. What should the result look like? As it turns out, the DOM specifica...
...most nodes within it. The parent <section> is not needed to replicate the cloned content, so it is isn't included. Example Consider this simple HTML fragment of HTML. <p><strong>This</strong> is a paragraph.</p> Imagine using a Range to extract the word "paragraph" from this. ...
...And 2 more matches
Attr - Web APIs
Note: DOM Level 3 defined namespaceURI, localName and prefix on the Node interface. In DOM4 they were moved to Attr. This change is implemented in Chrome since version 46.0 and Firefox since version 48.0. Deprecated properties and methods The following properties have been deprecated. Where available, the appropriate replacement is noted. attributes This property now always returns NULL.
childNodes Obsolete since Gecko 14 This property now always returns an empty NodeList. first
Child Obsolete since Gecko 14 This property now always returns NULL. isId Read only Indicates whether the attribute is an "ID attribute". An "ID attribute" being an attribute which value is expected to be unique across a DOM Document. In HTML DOM, "id" is the only ID attribute, but XML documents could defi...
...cko 14 This property now always returns NULL. isId Read only Indicates whether the attribute is an "ID attribute". An "ID attribute" being an attribute which value is expected to be unique across a DOM Document. In HTML DOM, "id" is the only ID attribute, but XML documents could define others. Whether or not an attribute is unique is often determined by a DTD or other schema description. last
Child Obsolete since Gecko 14 This property now always returns NULL. nextSibling This property now always returns NULL. nodeName Use Attr.name instead. nodeType This property now always returns 2 (ATTRIBUTE_NODE). nodeValue Use Attr.value instead. ownerDocument You shouldn't have been using this in the first place, so you probably don't care that this is going away. parentNode This propert...
...type information associated with this attribute. While the type information contained in this attribute is guaranteed to be correct after loading the document or invoking Document.normalizeDocument, this property may not be reliable if the node was moved. specified This property now always returns true. textContent Use Attr.value instead. The following methods have been deprecated: append
Child() Obsolete since Gecko 14 Modify the value of Attr.value instead. cloneNode() You shouldn't have been using this in the first place, so you probably don't care that this is going away. createAttribute() Use Element.setAttribute() instead. createAttributeNS() Use Element.setAttributeNS() instead. getAttributeNode() Use Element.getAttribute() instead. getAttributeNodeNS() Use Element.get...
...And 2 more matches
DocumentFragment - Web APIs
" text-anchor="middle" alignment-baseline="middle">DocumentFragment</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Constructor DocumentFragment() Creates and returns a new DocumentFragment object. Properties This interface has no specific properties, but inherits those of its parent, Node, and implements those of the ParentNode interface. ...
...er text { fill: #0095DD; pointer-events: all;} Constructor DocumentFragment() Creates and returns a new DocumentFragment object. Properties This interface has no specific properties, but inherits those of its parent, Node, and implements those of the ParentNode interface. ParentNode.
children Read only Returns a live HTMLCollection containing all objects of type Element that are
children of the DocumentFragment object. ...
... DocumentFragment() Creates and returns a new DocumentFragment object. Properties This interface has no specific properties, but inherits those of its parent, Node, and implements those of the ParentNode interface. ParentNode.
children Read only Returns a live HTMLCollection containing all objects of type Element that are
children of the DocumentFragment object. ParentNode.firstElement
Child Read only Returns the Element that is the first
child of the DocumentFragment object, or null if there is none. ParentNode.lastElement
Child Read only Returns the Element that is the last
child of the DocumentFragment object, or null if there is none. ParentNode.
childElementCount Read only Returns an unsigned long giving the amount of
children that the DocumentFragment has. Methods T...
...And 2 more matches
Element.shadowRoot - Web APIs
console.log('Custom square element attributes changed.'); updateStyle(this); } In the updateStyle() function itself, we get a reference to the shadow DOM using Element.shadowRoot. ...
...lement attributes changed.'); updateStyle(this); } In the updateStyle() function itself, we get a reference to the shadow DOM using Element.shadowRoot. ...
...s changed.'); updateStyle(this); } In the updateStyle() function itself, we get a reference to the shadow DOM using Element.shadowRoot. ...
...And 2 more matches
Selection - Web APIs
election begins. Can return null if selection never existed in the document (e.g., an iframe that was never clicked on). Selection.anchorOffsetRead only Returns a number representing the offset of the selection's anchor within the anchorNode. If anchorNode is a text node, this is the number of characters within anchorNode preceding the anchor. If anchorNode is an element, this is the number of
child nodes of the anchorNode preceding the anchor. Selection.focusNodeRead only Returns the Node in which the selection ends. Can return null if selection never existed in the document (for example, in an iframe that was never clicked on). Selection.focusOffsetRead only Returns a number representing the offset of the selection's anchor within the focusNode. If focusNode is a text node, this is t...
...ection ends. Can return null if selection never existed in the document (for example, in an iframe that was never clicked on). Selection.focusOffsetRead only Returns a number representing the offset of the selection's anchor within the focusNode. If focusNode is a text node, this is the number of characters within focusNode preceding the focus. If focusNode is an element, this is the number of
child nodes of the focusNode preceding the focus. Selection.isCollapsedRead only Returns a Boolean indicating whether the selection's start and end points are at the same position. Selection.rangeCountRead only Returns the number of ranges in the selection. Selection.typeRead only Returns a DOMString describing the type of the current selection. Methods Selection.addRange() A Range objec...
...() for more details. Selection.extend() Moves the focus of the selection to a specified point. Selection.getRangeAt() Returns a Range object representing one of the ranges currently selected. Selection.modify() Changes the current selection. Selection.removeRange() Removes a range from the selection. Selection.removeAllRanges() Removes all ranges from the selection. Selection.selectAll
Children() Adds all the
children of the specified node to the selection. Selection.setBaseAndExtent() Sets the selection to be a range including all or parts of two specified DOM nodes, and any content located between them. Selection.setPosition() Collapses the current selection to a single point. This is an alias for collapse() -- See Selection.collapse() for more details. Selection.toString() ...
...And 2 more matches
ShadowRoot - Web APIs
e) { console.log('Custom square element attributes changed.'); updateStyle(this); } In the updateStyle() function itself, we get a reference to the shadow DOM using Element.shadowRoot. ...
...Custom square element attributes changed.'); updateStyle(this); } In the updateStyle() function itself, we get a reference to the shadow DOM using Element.shadowRoot. ...
...changed.'); updateStyle(this); } In the updateStyle() function itself, we get a reference to the shadow DOM using Element.shadowRoot. ...
...And 2 more matches
Text.wholeText - Web APIs
One for the first sentence, and one for ...
...So you try this: para.first
Child.data = "Thru-hiking is great, but "; All set, right? Wrong! What happened was you removed the strong element, but the removed sentence's element separated two text nodes. One for the first sentence, and one for the first w...
...id election coverage!</strong> However, <a href="http://en.wikipedia.org/wiki/Absentee_ballot">casting a ballot</a> is tricky.</p> You decide you don't like the middle sentence, so you remove it: para.remove
Child(para.
childNodes[1]); Later, you decide to rephrase things to, "Thru-hiking is great, but casting a ballot is tricky." while preserving the hyperlink. So you try this: para.first
Child.data = "Thru-hiking is great, but "; All set, right? Wrong! What happened was you removed the strong element, but the removed sentence's element separated two text nodes. One for the first sentence, and one for the first word of the last. Instead, you now effectively have this: <p>Thru-hiking is great, but However, <a href="http://en.wikipedia.org/wiki/Absentee_ballot">casting a ballot</a>...
...And 2 more matches
ARIA: switch role - Accessibility
switch role. Adding the switch role in ARIA This simple example just creates a widget and assigns the ARIA switch role to it. The button is styled with an appearance reminiscent of an on/off power switch. HTML The HTML is fairly simple here. The switch is implemented as a <button> element which is initially checked courtesy of its aria-checked attribute being set to "true". The switch has two
child elements containing the "off" and "on" labels and is followed by a <label> identifying the switch. <button role="switch" aria-checked="true" id="speakerPower" class="switch"> <span>off</span> <span>on</span> </button> <label for="speakerPower" class="switch">Speaker power</label> JavaScript This JavaScript code defines and applies a function to handle click events on switch widgets.
... power switch paradigm. ...
... 0; padding: 0; width: 70px; height: 26px; border: 2px solid black; display: inline-block; margin-right: 0.25em; line-height: 20px; vertical-align: middle; text-align: center; font: 12px "Open Sans", "Arial", serif; } button.switch span { padding: 0 4px; pointer-events: none; } [role="switch"][aria-checked="false"] :first-
child, [role="switch"][aria-checked="true"] :last-
child { background: #262; color: #eef; } [role="switch"][aria-checked="false"] :last-
child, [role="switch"][aria-checked="true"] :first-
child { color: #bbd; } label.switch { font: 16px "Open Sans", "Arial", sans-serif; line-height: 20px; user-select: none; vertical-align: middle; -moz-user-select: none; -ms-user-select: none; -webkit-user-select: none; -o-user-select: none; } T...
...And 2 more matches
Border-radius generator - CSS: Cascading Style Sheets
================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* For IE 6/7 (trigger hasLayout) */ } /* GRID COLUMN SETUP * ========================================================================== */ .col { display: block; float:left; margin: 1% 0 1% 1.6%; } .col:first-
child { margin-left: 0; } /* all browsers except IE6 and lower */ /* * UI Component */ .ui-input-slider-container { height: 20px; margin: 10px 0; font-family: "Segoe UI", Arial, Helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider-container * { float: left; height: 100%; line-height: 100%; } /* Input Slider */ .ui-input-slider > input { margin: 0; padd...
...: 5; var input = new InputComponent(this); var slider_left = new SliderComponent(this, -1); var slider_right = new SliderComponent(this, 1); slider_left.className = 'ui-input-slider-left'; slider_right.className = 'ui-input-slider-right'; if (name) { var info = document.createElement('span'); info.className = 'ui-input-slider-info'; info.textContent = name; node.append
Child(info); } node.append
Child(slider_left); node.append
Child(input); node.append
Child(slider_right); node.className = 'ui-input-slider ui-input-slider-container'; this.input = input; sliders[topic] = this; setValue(topic, value); } var setValue = function setValue(topic, value, send_notify) { var slider = sliders[topic]; if (slider === undefined) return; if (value > sli...
...; var checkbox = document.createElement("input"); var label = document.createElement("label"); var id = 'checkbox-' + topic; checkbox.id = id; checkbox.setAttribute('type', 'checkbox'); checkbox.checked = state; label.setAttribute('for', id); if (name) { label.className = 'text'; if (align) label.className += ' ' + align; label.textContent = name; } node.append
Child(checkbox); node.append
Child(label); this.node = node; this.topic = topic; this.checkbox = checkbox; checkbox.addEventListener('change', function(e) { notify.call(this); }.bind(this)); buttons[topic] = this; } var getNode = function getNode(topic) { return buttons[topic].node; } var setValue = function setValue(topic, value) { try { buttons[topic].checkbox.checked...
...And 2 more matches
Basic Concepts of grid layout - CSS: Cascading Style Sheets
the z-index property. Grid is a powerful specification that, when combined with other parts of CSS such as flexbox, can help you create layouts that were previously impossible to build in CSS. It all starts by creating a grid in your grid container. The Grid container We create a grid container by declaring display: grid or display: inline-grid on an element. As soon as we do this, all direct
children of that element become grid items. In this example, I have a containing div with a class of wrapper and, inside are five
child elements. <div class="wrapper"> <div>One</div> <div>Two</div> <div>Three</div> <div>Four</div> <div>Five</div> </div> I make the .wrapper a grid container. .wrapper { display: grid; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f767...
...</div> <div>Four</div> <div>Five</div> </div> I make the .wrapper a grid container. .wrapper { display: grid; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } All the direct
children are now grid items. In a web browser, you won't see any difference to how these items are displayed before turning them into a grid, as grid has created a single column grid for the items. At this point, you may find it useful to work with the Grid Inspector, available as part of Firefox's Developer Tools. If you view this example in Firefox and inspect the grid, you will see a small icon next...
...te-rows properties. These define grid tracks. A grid track is the space between any two lines on the grid. In the below image you can see a track highlighted - this is the first row track in our grid. I can add to our earlier example by adding the grid-template-columns property, then defining the size of the column tracks. I have now created a grid with three 200-pixel-wide column tracks. The
child items will be laid out on this grid one in each grid cell. <div class="wrapper"> <div>One</div> <div>Two</div> <div>Three</div> <div>Four</div> <div>Five</div> </div> .wrapper { display: grid; grid-template-columns: 200px 200px 200px; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { ...
...And 2 more matches
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
he same time. The two specifications share some common features, however, and if you have already learned how to use flexbox, the similarities should help you get to grips with Grid. One-dimensional vs. two-dimensional layout A simple example can demonstrate the difference between one- and two-dimensional layouts. In this first example, I am using flexbox to lay out a set of boxes. I have five
child items in my container, and I have given the flex properties values so that they can grow and shrink from a flex-basis of 150 pixels. I have also set the flex-wrap property to wrap, so that if the space in the container becomes too narrow to maintain the flex basis, items will wrap onto a new row. * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; back...
...n property to the container with a value of relative, just as you would make a containing block for any other absolutely positioned items. Once you have done this, if you give a grid item position: absolute it will take as its containing block the grid container or, if the item also has a grid position, the area of the grid it is placed into. In the below example I have a wrapper containing four
child items. Item three is absolutely positioned and also placed on the grid using line-based placement. The grid container has position: relative and so becomes the positioning context of this item. * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background...
...t has been taken out of flow as is usual for absolutely positioned items and so the auto-placement rules now place items into the same space. The item also doesn't cause the additional row to be created to span to row line 3. If we remove position: absolute from the rules for .box3 you can see how it would display without the positioning. A grid container as parent If the absolutely positioned
child has a grid container as a parent but that container does not create a new positioning context, then it is taken out of flow as in the previous example. The positioning context will be whatever element creates a positioning context as is common to other layout methods. In our case, if we remove position: relative from the wrapper above, positioning context is from the viewport, as shown in this im...
...And 2 more matches
Pseudo-classes - CSS: Cascading Style Sheets
ses, pseudo-elements can be used to style a specific part of an element. Syntax selector:pseudo-class { property: value; } Like regular classes, you can chain together as many pseudo-classes as you want in a selector. ...
... want in a selector. ...
...ve :any-link :blank :checked :current :default :defined :dir() :disabled :drop :empty :enabled :first :first-
child :first-of-type :fullscreen :future :focus :focus-visible :focus-within :has() :host :host() :host-context() :hover :indeterminate :in-range :invalid :is() :lang() :last-
child :last-of-type :left :link :local-link :not() :nth-
child() :nth-col() :nth-last-
child() :nth-last-col() :nth-last-of-type() :nth-of-type() :only-
child :only-of-type :optional :out-of-range :past :placeholder-shown :read-only :read-write :required :right :root :scope :state() :target :target-within :user-invalid :valid :visited :where() Specifications Specification Status Comment Fu...
...And 2 more matches
CSS reference - CSS: Cascading Style Sheets
counter-resetcounter-set@counter-stylecounters()cross-fade()cubic-bezier()::cue::cue-regioncursor<custom-ident>D:defaultdeg<dimension>:dirdirection:disableddisplay<display-box><display-inside><display-internal><display-legacy><display-listitem><display-outside>dpcmdpidppxdrop-shadow()Eelement()ellipse()em:emptyempty-cells:enabledenv()exFfallback (@counter-style)filter<filter-function>:first:first-
child::first-letter (:first-letter)::first-line (:first-line):first-of-typefit-content()<flex>flexflex-basisflex-directionflex-flowflex-growflex-shrinkflex-wrapfloat:focusfont@font-facefont-familyfont-family (@font-face)font-feature-settingsfont-feature-settings (@font-face)@font-feature-valuesfont-kerningfont-language-overridefont-optical-sizingfont-sizefont-size-adjustfont-stretchfont-stretch (@font-...
...eightheight (@viewport)@historical-forms:hoverhsl()hsla()hue-rotate()hyphensI<ident><image>image()image-orientationimage-renderingimage-set()@importin:in-range:indeterminateinheritinitialinline-sizeinsetinset()inset-blockinset-block-endinset-block-startinset-inlineinset-inline-endinset-inline-start<integer>:invalidinvert()isolationJjustify-contentjustify-itemsjustify-selfKkHz@keyframesL:lang:last-
child:last-of-typeleader():leftleft@left-bottom<length><length-percentage>letter-spacingline-breakline-heightlinear-gradient():linklist-stylelist-style-imagelist-style-positionlist-style-typelocal()Mmarginmargin-blockmargin-block-endmargin-block-startmargin-bottommargin-inlinemargin-inline-endmargin-inline-startmargin-leftmargin-rightmargin-top::markermarks (@page)maskmask-bordermask-border-modemask-bo...
...emask-imagemask-modemask-originmask-positionmask-repeatmask-sizemask-typematrix()matrix3d()max()max-block-sizemax-heightmax-height (@viewport)max-inline-sizemax-widthmax-width (@viewport)max-zoom (@viewport)@mediamin()min-block-sizemin-heightmin-height (@viewport)min-inline-sizemin-widthmin-width (@viewport)min-zoom (@viewport)minmax()mix-blend-modemmmsN@namespacenegative (@counter-style):not:nth-
child:nth-last-
child:nth-last-of-type:nth-of-type<number>Oobject-fitobject-positionoffsetoffset-anchoroffset-distanceoffset-pathoffset-rotate:only-
child:only-of-typeopacityopacity():optionalorderorientation (@viewport)@ornamentsornaments()orphans:out-of-rangeoutlineoutline-coloroutline-offsetoutline-styleoutline-widthoverflowoverflow-anchoroverflow-blockoverflow-inlineoverflow-wrapoverflow-xoverflow-yo...
...And 2 more matches
Visual formatting model - CSS: Cascading Style Sheets
he principal box When an element generates one or more boxes, one of them is the principal box, which contains its descendant boxes and generated content in the box tree, and is also the box involved in any positioning scheme. Some elements may generate additional boxes in addition to the principal box, for example display: list-item generates more than one box (e.g. a principal block box and a
child marker box). And some values (such as none or contents) cause the element and/or its descendants to not generate any boxes at all. Anonymous boxes An anonymous box is created when there is not an HTML element to use for the box. This situation happens when, for example, you declare display: flex on a parent element, and directly inside there is a run of text not contained in another element. In...
... three boxes in the box tree. The part of the string before the paragraph element is wrapped in an anonymous box, then we have the <p>, which generates a box, and then another anonymous box. Something to consider about these anonymous boxes is that they inherit styles from their direct parent, but you cannot change how they look by targeting the anonymous box. In my examples, I am using a direct
child selector to target the
children of the container. This does not change the anonymous boxes, as they are not a
child of the parent block. Inline anonymous boxes are created when a string is split by an inline element, for example, a sentence that includes a section wrapped with <em></em>. This splits the sentence into three inline boxes -- an anonymous inline box before the emphasized section, th...
... or is the root element. An element is called in-flow if it is not out of the flow. Read about CSS Positioned Layout. Formatting contexts and the display property Boxes can be described as having an outer display type, which is block or inline. This outer display type refers to how the box behaves alongside other elements on the page. Boxes also have an inner display type, dictating how their
children behave. For normal block and inline layout, or normal flow, this display type is flow. This means that the
child elements will also be either block or inline. However, the inner display type might be something like grid or flex, in which case the direct
children will display as a grid, or flex items. In such a case the element is described as creating a grid or flex formatting context. In man...
...And 2 more matches
justify-items - CSS: Cascading Style Sheets
r similar to the one of stretch, except for boxes with an aspect ratio or an intrinsic sizes where it behaves like start. start The item is packed flush to each other toward the start edge of the alignment container in the appropriate axis. end The item is packed flush to each other toward the end edge of the alignment container in the appropriate axis. flex-start For items that are not
children of a flex container, this value is treated like start. flex-end For items that are not
children of a flex container, this value is treated like end. self-start The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis. self-end The item is packed flush to the edge of the alignment container of the end side of the item, in the a...
... justify-items value of stretch (the default), which causes the grid items to stretch across the entire width of their cells. If you hover or tab onto the grid container however, it is given a justify-items value of center, which causes the grid items to span only as wide as their content width, and align in the center of their cells. ...
...tch (the default), which causes the grid items to stretch across the entire width of their cells. If you hover or tab onto the grid container however, it is given a justify-items value of center, which causes the grid items to span only as wide as their content width, and align in the center of their cells. ...
...And 2 more matches
WAI ARIA Live Regions/API Support - Developer guides
or pages where the author did not add any additional markup. Please read the ARIA spec or the live region report to learn about ARIA live region markup. As always, we're open to questions and suggestions for changes in community forums. ...
...IA spec or the live region report to learn about ARIA live region markup. As always, we're open to questions and suggestions for changes in community forums. ...
...red for web page mutations What changed in document? ...
...And 2 more matches
<input type="date"> - HTML: Hypertext Markup Language
if(month === 'January' | month === 'March' | month === 'May' | month === 'July' | month === 'August' | month === 'October' | month === 'December') { dayNum = 31; } else if(month === 'April' | month === 'June' | month === 'September' | month =...
... if(month === 'January' | month === 'March' | month === 'May' | month === 'July' | month === 'August' | month === 'October' | month === 'December') { dayNum = 31; } else if(month === 'April' | month === 'June' | month === 'September' | month === 'November') { dayNum ...
... if(month === 'January' | month === 'March' | month === 'May' | month === 'July' | month === 'August' | month === 'October' | month === 'December') { dayNum = 31; } else if(month === 'April' | month === 'June' | month === 'September' | month === 'November') { dayNum = 30; } else { //...
...And 2 more matches
Using custom elements - Web Components
the element's internal shadow DOM structure -- which is then attached to the shadow root -- and finally attach some CSS to the shadow root to style it. ...
...achShadow({mode: 'open'}); // sets and returns 'this.shadowRoot' // Create (nested) span elements const wrapper = document.createElement('span'); wrapper.setAttribute('class','wrapper'); const icon = wrapper.append
Child(document.createElement('span')); icon.setAttribute('class','icon'); icon.setAttribute('tabindex', 0); // Insert icon from defined attribute or default icon const img = icon.append
Child(document.createElement('img')); img.src = this.hasAttribute('img') ? ...
...apper.setAttribute('class','wrapper'); const icon = wrapper.append
Child(document.createElement('span')); icon.setAttribute('class','icon'); icon.setAttribute('tabindex', 0); // Insert icon from defined attribute or default icon const img = icon.append
Child(document.createElement('img')); img.src = this.hasAttribute('img') ? ...
...And 2 more matches
Using shadow DOM - Web Components
DOM terminology to be aware of: Shadow host: The regular DOM node that the shadow DOM is attached to. Shadow tree: The DOM tree inside the shadow DOM. Shadow boundary: the place where the shadow DOM ends, and the regular DOM begins. Shadow root: The root node of the shadow tree. You can affect the nodes in the shadow DOM in exactly the same way as non-shadow nodes -- for example appending
children or setting attributes, styling individual nodes using element.style.foo, or adding style to the entire shadow DOM tree inside a <style> element. The difference is that none of the code inside a shadow DOM can affect anything outside it, allowing for handy encapsulation. Note that the shadow DOM is not a new thing by any means -- browsers have used it for a long time to encapsulate the inner s...
... Working through a simple example Now let's walk through a simple example to demonstrate the shadow DOM in action inside a custom element -- <popup-info> (see a live example also). This takes an image icon and a text string, and embeds the icon into the page. When the icon is focused, it displays the text in a pop up information box to provide further in-context information. To be...
...cument.createElement('span'); info.setAttribute('class', 'info'); // Take attribute content and put it inside the info span let text = this.getAttribute('data-text'); info.textContent = text; // Insert icon let imgUrl; if(this.hasAttribute('img')) { imgUrl = this.getAttribute('img'); } else { imgUrl = 'img/default.png'; } let img = document.createElement('img'); img.src = imgUrl; icon.append
Child(img); Styling the shadow DOM After that we create a <style> element and populate it with some CSS to style it: // Create some CSS to apply to the shadow dom let style = document.createElement('style'); style.textContent = ` .wrapper { position: relative; } .info { font-size: 0.8rem; width: 200px; display: inline-block; border: 1px solid black; padding: 10px; background: white;...
...And 2 more matches
Index - XSLT: Extensible Stylesheet Language Transformations
sing the Mozilla JavaScript interface to XSL Transformations XSLT This document describes the JavaScript interface in Mozilla 1.2 and up to the XSLT Processing Engine (TransforMiiX). 19 XSLT elements reference Element, Overview, Reference, XSLT There are two types of elements discussed here: top-level elements and instructions. A top-level element must appear as the
child of either <xsl:stylesheet> or <xsl:transform>. An instruction, on the other hand, is associated with a template. A stylesheet may include several templates. A third type of element, not discussed here, is the literal result element (LRE). An LRE also appears in a template. It consists of any non-instruction element that should be copied as-is to the result document, for example, an <hr> element i...
...ent, Reference, XSLT, copy-of The <xsl:copy-of> element makes a deep copy (including descendant nodes) of whatever the select attribute specifies to the output document. 28 <xsl:copy> Element, Reference, XSLT, copy The <xsl:copy> element transfers a shallow copy (the node and any associated namespace node) of the current node to the output document. It does not copy any
children or attributes of the current node. 29 <xsl:decimal-format> Element, Reference, XSLT, decimal-format The <xsl:decimal-format> element defines the characters and symbols that are to be used in converting numbers into strings using theformat-number( ) function. 30 <xsl:element> Element, Reference, XSLT The <xsl:element> element creates an element in the o...
... template to use if a given extension (or, eventually, newer version) element is not supported. 32 <xsl:for-each> Element, Reference, XSLT, for, for-each The <xsl:for-each> element selects a set of nodes and processes each of them in the same way. It is often used to iterate through a set of nodes or to change the current node. If one or more <xsl:sort> elements appear as the
children of this element, sorting occurs before processing. Otherwise, nodes are processed in document order. 33 <xsl:if> Element, Reference, XSLT, if The <xsl:if> element contains a test attribute and a template. If the test evaluates to true, the template is processed. In this it is similar to an if statement in other languages. To achieve the functionality of an if-then-else sta...
...And 2 more matches
HTML to DOM - Archive of obsolete content
e tags like <script>, <style>, <head>, <body>, <title>, and <iframe>. It will also remove all JavaScript, including element attributes that contain JavaScript. function HTMLParser(aHTMLString){ var html = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", null), body = document.createElementNS("http://www.w3.org/1999/xhtml", "body"); html.documentElement.append
Child(body); body.append
Child(Components.classes["@mozilla.org/feed-unescapehtml;1"] .getService(Components.interfaces.nsIScriptableUnescapeHTML) .parseFragment(aHTMLString, false, null, body)); return body; } It works by creating a content-level (this is safer than chrome-level) <div> in the current page, then parsing the HTML fragment and attaching that fragment to the <div>. The <div...
...so forth. ...
...e"); if (!frame) { // create frame frame = document.createElement("iframe"); // iframe (or browser on older Firefox) frame.setAttribute("id", "sample-frame"); frame.setAttribute("name", "sample-frame"); frame.setAttribute("type", "content"); frame.setAttribute("collapsed", "true"); document.getElementById("main-window").append
Child(frame); // or // document.documentElement.append
Child(frame); // set restrictions as needed frame.webNavigation.allowAuth = false; frame.webNavigation.allowImages = false; frame.webNavigation.allowJavascript = false; frame.webNavigation.allowMetaRedirects = true; frame.webNavigation.allowPlugins = false; frame.webNavigation.allowSubframes = false; // listen for load frame.addEventListener("load", function (event) { // the docum...
...about:blank" || doc.defaultView.frameElement) return; // do something with the DOM of doc alert(doc.location.href); // when done remove frame or set location "about:blank" setTimeout(function (){ var frame = document.getElementById("sample-frame"); // remove frame // frame.destroy(); // if using browser element instead of iframe frame.parentNode.remove
Child(frame); // or set location "about:blank" // frame.contentDocument.location.href = "about:blank"; },10); }, true); } // load a page frame.contentDocument.location.href = "http://www.mozilla.org/"; // or // frame.webNavigation.loadURI("http://www.mozilla.org/",Components.interfaces.nsIWebNavigation,null,null,null); If you are starting with an HTML string, you can convert ...
Preferences - Archive of obsolete content
nces-service;1"] .getService(Components.interfaces.nsIPrefService); var branch = prefs.getBranch("acce"); var enablesound = branch.getBoolPref("ssibility.typeaheadfind.enablesound"); This is the reason why you should usually pass strings ending with a dot to getBranch(), like prefs.getBranch("accessibility."). ...
...tBoolPref("ssibility.typeaheadfind.enablesound"); This is the reason why you should usually pass strings ending with a dot to getBranch(), like prefs.getBranch("accessibility."). Another caveat you should be aware of is that nsIPrefBranch.get
ChildList("",{}) returns an array of preference names that start with that branch's root, for example var branch = prefs.getBranch("accessibility."); var
children = branch.get
ChildList("", {}); will return these items (for the example tree above): "typeaheadfind.autostart", "typeaheadfind.enablesound", and "usebrailledisplay", not just direct
children ("typeaheadfind" and "usebrailledisplay"), as you might have expected. Using preference observers Changes a user makes to your extension's preferences, such as through an options dialog, may not take e...
...re is a straightforward example: var myPrefObserver = { register: function() { // First we'll need the preference services to look for preferences. var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); // For this.branch we ask for the preferences for extensions.myextension. and
children this.branch = prefService.getBranch("extensions.myextension."); // Now we queue the interface called nsIPrefBranch2. This interface is described as: // "nsIPrefBranch2 allows clients to observe changes to pref values." // This is only necessary prior to Gecko 13 if (!("addObserver" in this.branch)) this.branch.QueryInterface(Components.interfaces.nsIPrefBranch2); ...
...tion(subject, topic, data) { if (topic == 'nsPref:changed') this._callback(this._branch, data); }; /** * @param {boolean=} trigger if true triggers the registered function * on registration, that is, when this method is called. */ PrefListener.prototype.register = function(trigger) { this._branch.addObserver('', this, false); if (trigger) { let that = this; this._branch.get
ChildList('', {}). forEach(function (pref_leaf_name) { that._callback(that._branch, pref_leaf_name); }); } }; PrefListener.prototype.unregister = function() { if (this._branch) this._branch.removeObserver('', this); }; var myListener = new PrefListener( "extensions.myextension.", function(branch, name) { switch (name) { case "pref1": // extensions.myextensi...
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
item elements that were dynamically generated the last time the submenu opened, and which are still left over. Next, it dynamically generates menuitem elements based on the names of all the files in the session-storage directory, and inserts them into the menu. ...
...ubmenu opened, and which are still left over. Next, it dynamically generates menuitem elements based on the names of all the files in the session-storage directory, and inserts them into the menu. ...
...uitem elements based on the names of all the files in the session-storage directory, and inserts them into the menu. ...
...Open a new window and make sure that all three functions--saving a session, restoring a session, and deleting sessions--all work correctly. Phase 3: Creating a preference panel You don't need to use ini files, registries, or anything like that to give users options they can set through a pre...
Connecting to Remote Content - Archive of obsolete content
There are a couple of tools you can use to process these documents more efficiently: Using XPath XPath stands for XML Path ...
...There are a couple of tools you can use to process these documents more efficiently: Using XPath XPath stands for XML Path Language, it uses a non-XML syntax that provides a flexible way of...
...cument); Finally, you can either use nsIXSLTProcessor.transformToDocument() or nsIXSLTProcessor.transformToFragment() methods to transform the XML document. The nsIXSLTProcessor.transformToDocument() method returns a DOM Document with the results of the transformation, whereas, the nsIXSLTProcessor.transformToFragment() method returns a DOM DocumentFragment node. In this example code, the first
child of the XUL document is appended to a XUL element after the transformation. request.onload = function(aEvent) { let responseXML = aEvent.target.responseXML; let xulNode; // transform the XML document to a XUL document xulDocument = xsltProcessor.transformToDocument(responseXML); // append the XUL node to a XUL element xulNode = document.adoptNode(xulDocument.first
Child); document.
...nded to a XUL element after the transformation. request.onload = function(aEvent) { let responseXML = aEvent.target.responseXML; let xulNode; // transform the XML document to a XUL document xulDocument = xsltProcessor.transformToDocument(responseXML); // append the XUL node to a XUL element xulNode = document.adoptNode(xulDocument.first
Child); document.getElementById("foo").append
Child(xulNode); }; We effectively transformed the XML file into XUL and integrated it into the UI. Note: Security should be your number one priority when handling remote content. Do not allow event handlers or any other kinds of code to be passed through your parsers. If you need your generated XUL to have JS code in it, all of it should be added locally, never from the remote source. Here are a co...
Using microformats - Archive of obsolete content
s = Microformats.count(name, rootElement, options); Parameters name The name of the microformat to count. rootElement Required. The DOM element at which to begin the search. If you want to search the entire document, specify content.document. options Optional. If provided, this is a JavaScript object that contains zero or more of the following flags: recurseExternalFrames If true,
child frames are included in the search. The default is true. showHidden If true, hidden microformats are added; otherwise they're left out. The default is false. debug Specify true if debug mode is in use; otherwise, specify false. The default is false. Return value An integer value indicating the number of microformats that match the specified criteria. debug() Returns a string that describ...
...ormats.get(name, rootElement, options, targetArray); Parameters name The name of the microformat to find. rootElement Required. The DOM element at which to begin the search. If you want to search the entire document, specify content.document. options Optional. If provided, this is a JavaScript object that contains zero or more of the following flags: recurseExternalFrames If true,
child frames that reference external content are included in the search. The default is true. showHidden If true, hidden microformats are added; otherwise they're left out. The default is false. debug Specify true if debug mode is in use; otherwise, specify false. The default is false. targetArray Optional. If provided, this is an array of microformat objects to which the search results are a...
...croformats.getNamesFromNode(node); Parameters node The node for which to retrieve a list of microformat names. Return value If the specified node is a microformat, the result is a space-delineated string listing all the microformat names that correspond to the node. If the node isn't a microformat, nothing is returned. getParent() Returns the parent node of the specified microformat or
child of a microformat. var parentNode = Microformats.getParent(node); Parameters node The node whose parent you wish to retrieve. Return value The parent of the specified node. Returns nothing if the specified node isn't a microformat or the
child of a microformat. isMicroformat() Determines whether or not the specified DOM node is a microformat. var flag = Microformats.isMicroformat(node...
... the specified node isn't a microformat or the
child of a microformat. isMicroformat() Determines whether or not the specified DOM node is a microformat. var flag = Microformats.isMicroformat(node); Parameters node The DOM node to check to see if it's a microformat. Return value true if the node is a microformat, otherwise false. Note: This method doesnot return true if the node is a
child of a microformat. See also Microformats.org ...
DOM Interfaces - Archive of obsolete content
This means that, depending on the details regarding the insertion points of the binding, it's possibl...
... in DOMString attrName, in DOMString attrValue); Element getBindingParent(in Node node); void loadBindingDocument(in DOMString documentURL); }; Methods getAnonymousNodes The getAnonymousNodes method retrieves the anonymous
children of the specified element. Parameters elt - The element to retrieve anonymous
children for. Return Value NodeList - The return value of getAnonymousNodes is a NodeList that represents the
children of an element after insertion points from its own binding have been applied. This means that, depending on the details regarding the insertion points of the binding, it's possible that some non-anonymous nodes appear in the list. See "Not so anonymous nodes" on mozilla.dev.
...of the binding, it's possible that some non-anonymous nodes appear in the list. See "Not so anonymous nodes" on mozilla.dev.platform for some discussion about this. getAnonymousElementByAttribute The getAnonymousElementByAttribute methods retrieves an anonymous descendant with a specified attribute value. Typically used with an (arbitrary) anonid attribute to retrieve a specific anonymous
child in an XBL binding. Parameters elt - The element to retrieve anonymous
children for. attrName - The attribute name to look up. attrValue - The attribute value to match. Return Value Element - The return value of getAnonymousElementByAttribute is an anonymous descendant of the given element with matching attribute name and value. getBindingParent The getBindingPa...
...ent method was invoked). The binding document can then be modified programmatically using the DOM. Any subsequent bindings that are attached to elements within the document will be constructed from the modified binding document. Parameters documentURL of type DOMString - The URL of a binding document. No Return Value Example The following snippet checks to see if any anonymous
child of "element" is itself an element. if (element.ownerDocument instanceof Ci.nsIDOMDocumentXBL) { var anon
Children = element.ownerDocument.getAnonymousNodes(element); if (anon
Children) { for (var i = 0; i < anon
Children.length; i++) { if (anon
Children[i].nodeType == 1) return false; } } } return true; ...
Multiple Queries - Archive of obsolete content
ed first and output generated for it, followed by the results and output for the second query, and so forth for all of the queries. ...
...The second query doesn't contain such a triple and will match all three of the photos. ...
... the previous example. You can also mix simple and extended queries in one template, although you may prefer to use the same style in all queries for consistency. However, if you are going to be using a number of queries, the template builder is more efficient when using multiple queries using the simple query syntax. This is because all simple queries will iterate over the same data, usually the
children of an RDF container. So the builder only performs this step once and filters the data for each query. When using the extended query syntax, the manner in which the graph is navigated may be different for every query, so no optimization can be done. The builder needs to process every condition of every query. If, for example, you have six queries, each with a <member> condition, the builder wil...
... So the builder only performs this step once and filters the data for each query. When using the extended query syntax, the manner in which the graph is navigated may be different for every query, so no optimization can be done. The builder needs to process every condition of every query. If, for example, you have six queries, each with a <member> condition, the builder will need to construct the
children six times. You probably won't notice any difference for small amounts of data such as the photos example we've been using, but you might for large datasets. Thus, you will want to use the simple query syntax when possible. If you are only going to be using one query, it doesn't matter, of course. Speaking of using a single query, the simple query syntax allows a slight shorthand. You can remov...
Template Logging - Archive of obsolete content
other words, this error occurs because either the <content> element was missing or was placed after a <member> or <triple> element. <member> requires a variable for its container attribute The container attribute on a <member> element has to be variable (a value beginning with a question mark). This error can also occur if the container attribute was not set. <member> requires a variable for its
child attribute The
child attribute on a <member> element has to be variable (a value beginning with a question mark). This error can also occur if the
child attribute was not set. <triple> should have at least one variable as a subject or object Both the subject and object attributes of a <triple> element have been set to a non-variable. This will have no effect so an error is output indicating this. ...
...icate The predicate attribute on a <triple> element has either not been set or has been set to a variable. Instead, it has to be set to a resource predicate. <triple> requires a variable for its object attribute The object attribute on a <triple> element has to be variable (a value beginning with a question mark). This error can also occur if the object attribute was not set. neither container or
child variables of <member> has a value This indicates that a <member> was being checked and yet neither the variables specified for the container or the
child have a value for a result. This error will occur while processing a result and will often repeat for each result. This error generally indicates an error in the logic of the template. Common errors are misspelled variable names or <member> and <...
...An example is given below this list of errors. neither subject or object variables of <triple> has a value Similar to the previous error but for the <triple> element. Either the subject or object variables could never be set to a value for a result. ...
...uld not be parsed </assign> For XML datasources, an <assign> element has an XPath expression that is not valid. XPath expression in <binding> could not be parsed For XML datasources, a <binding> element has an XPath expression that is not valid. The two errors where neither variable of either a <member> or <triple> have a value deserve some examples. <content uri="?uri"> <member container="?uri"
child="?person"> <triple subject="?person" predicate="http://example.com/name" object="?name"/> <content uri="?uri"> <member container="?uri"
child="?human"> <triple subject="?person" predicate="http://example.com/name" object="?name"/> Note that subtle difference in these examples. The
child attribute on the <member> element is different. The first example generates no error and is a common template...
Using Recursive Templates - Archive of obsolete content
we could display one level for the two groups, and use another level for each person. ...
...pbox 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. For the outermost iteration, a vbox is created with a
child label. Since the initial reference node is the root of the XML source document, the results are two elements, one for each group element. However, a further step is done to retrieve an additional level of nodes. As each group has
children itself, each result (in this case, each group) becomes the reference point for a futher iteration. The same query is executed again but using the groups generat...
..."/> <vbox id="row7" class="indent"><label value="Cleopatra"/></vbox> <vbox id="row8" class="indent"><label value="Laura Secord"/></vbox> </vbox> </groupbox> Note how similar content corresponding to the action body is created for both the groups as well as the people. The template builder has also added container and empty attributes to the groups. This is done with all nodes that have
children to indicate that the node contains generated
children as well as whether the node is empty. These hints are used for trees, but they can also be used in a stylesheet to provide a different appearance for containers with
children, empty containers, as well as non-containers. In this example, both the parent groups and
child people are displayed the same. You could use multiple rules as well, in...
...o where conditions, so this matches all remaining results. The output for groups is a groupbox with a caption containing the name. The output for non-groups is a label. You could further expand this process for other levels. Disabling Recursion The recursion on a template occurs automatically. In fact, it has occured with all of the examples so far. However, in most cases, there either aren't any
children or the next iteration of the query doesn't return any results, so no output is generated. Sometimes, you will not want a template generate recursive content. You can do this by adding a flag. <vbox datasources="people.xml" ref="*" querytype="xml" flags="dont-recurse"> Here, the flags attribute is set to dont-recurse. This disables the recursion and only generates one level of results. <<...
Box Objects - Archive of obsolete content
nAndSize();"/> <label id="thelabel" value="I am a label"/> Note that if you hide and collapse the label, it will be treated as hidden. You will then have to unhide and uncollapse the label for it to appear again. XUL Element Ordering The box object may also be used to determine the display order of elements, which may not be the same as the order in the source. Recall that DOM properties such as
childNodes, first
Child, and nextSibling may be used to navigate the document tree. The box object also allows navigation in a similar means but retrieves the elements in display order. The box object provides several properties, first
Child, last
Child, nextSibling, previousSibling, and parentBox. Their function should be self explanatory from their names. These properties return elements, for example, t...
...There is no corresponding
childNodes property for box navigation; instead you must navigate by sibling using the nextSibling or previousSibling properties. Unlike with navigating the DOM tree, hidden elements are not included when navigating by box objects. ...
...avigate the document tree. The box object also allows navigation in a similar means but retrieves the elements in display order. The box object provides several properties, first
Child, last
Child, nextSibling, previousSibling, and parentBox. Their function should be self explanatory from their names. These properties return elements, for example, the first
Child property returns the first displayed
child element. There is no corresponding
childNodes property for box navigation; instead you must navigate by sibling using the nextSibling or previousSibling properties. Unlike with navigating the DOM tree, hidden elements are not included when navigating by box objects. That means that for a box with six
children where the first two are hidden, the first
Child property will return the third element. H...
...er as in the source. If you then press the button labeled One again, its ordinal will increase to 3 and will move to the end. Finally, pressing the button labeled Three will increase its ordinal to 2 and it will appear in between the other two buttons. dir attribute The final box ordering attribute is the dir attribute, or the -moz-box-direction CSS property. If this is set to reverse, all of the
children in the box are displayed in reverse order. In a horizontal box, the elements will be displayed from right to left; in a vertical box, the elements will be displayed from bottom to top. Here is an example: Example 5 : Source View <hbox dir="reverse"> <button label="Left"/> <button label="Center"/> <button label="Right"/> </hbox> Navigation through the nodes using the box object ordering ...
RDF Datasources - Archive of obsolete content
playing the history list. We'll display the history in a tree with three columns, the Name, the URL and the Date. ...
...You can use any of the resources that you want. Bookmarks (rdf:bookmarks) The bookmarks are generated from the user's bookmark list. ...
...The ref attribute has been set to the ...
...The ref attribute has been set to the root element in the RDF file, which is the top-level Seq. This will give us a complete list of animals. ...
button - Archive of obsolete content
splayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } 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. reverse For scales, the scale's values are ordered from right to left (for horizontal scales) or f...
...o text appears. For an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. open Type: boolean For the menu type buttons, the open attribute is set to true when the menu is open. The open attribute is not present if the menu is closed. orient Type: one of the values below Used to specify whether the
children of the element are oriented horizontally or vertically. The default value depends on the element. You can also use the -moz-box-orient style property. horizontal
Child elements of the element are placed next to each other in a row in the order that they appear in the XUL source. vertical
Child elements of the element are placed under each other in a column in the order that they appe...
...lean Gets and sets the value of the open attribute. orient Type: string Gets and sets the value of the orient attribute. tabIndex Type: integer Gets and sets the value of the tabindex attribute. type Type: string Gets and sets the value of the type attribute. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Interfac...
column - Archive of obsolete content
It is common to use columns only to define width and flexibility for the grid column and not place elements directly inside the column. More information is available in the XUL tutorial. Example See grid for an example. ...
... It is common to use columns only to define width and flexibility for the grid column and not place elements directly inside the column. More information is available in the XUL tutorial. Example See grid for an example. ...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
deck - Archive of obsolete content
More information is available in the XUL tutorial. ...
... More information is available in the XUL tutorial. ...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related stack ...
iframe - Archive of obsolete content
Currently, XUL iframes running in remote processes are not supported. If you want to run content in a remote process, use a XUL browser element. ...
...Default is false. src Type: URI The URI of the content to appear in the element. type Type: one of the values below. The type of browser, which...
...object for the document. webNavigation Type: nsIWebNavigation This read-only property contains the nsIWebNavigation object for the document. Most of its methods are callable directly on the element itself, such as goBack and goForward. It also contains the load constants used by reloadWithFlags and loadURIWithFlags. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related nsIAcces...
menulist - Archive of obsolete content
rence to the nsIEditor for editable text. This property is read only. image Type: image URL The image associated with the currently selected item. inputField Type: textbox element A reference to the textbox element used for editable menu lists. This property is read only and applies to editable menulists only. itemCount Type: integer Read only property holding the number of
child items. label Type: string Gets and sets the value of the label attribute. menuBoxObject Type: nsIMenuBoxObject A reference to the nsIMenuBoxObject which implements the menu. menupopup Type: menupopup element A reference to the menupopup used by the menu or menulist. This property is read-only. open Type: boolean Gets and sets the value o...
...user. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData appendItem( label,...
...specified index. insertItemAt( index, label, value ) Return type: element This method creates a new item and inserts it at the specified position. You may optionally set a value. The new item element is returned. removeAllItems() Return type: no return value Removes all of the items in the menu. removeItemAt( index ) Return type: element Removes the
child item in the element at the specified index. The method returns the removed item. select() Return type: no return value Select all the text in the menulist's textbox. This method applies to editable menulists only. Related Elements menu, menubar, menuitem, menupopup, menuseparator Interfaces nsIAccessibleProvider, nsIDOMXULMenuListElement ...
panel - Archive of obsolete content
be opened via a script using the openPopup method. The panel is closed when the user clicks outside the panel, presses Escape or when the panel's hidePopup method is called. Warning: For Firefox versions between 3.6 and 4.0, placing an iframe, browser or editor inside a panel is not supported. Some features may work, but only on some platforms. For those versions of Firefox, it is best to avoid
child frames in a panel, if possible. This limitation was resolved as of Firefox 4.0. Attributes backdrag, close, consumeoutsideclicks, fade, flip, ignorekeys, label, left, level, noautofocus, noautohide, norestorefocus, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position, titlebar, top, type Properties accessibleType, label, popupBoxObject, popup, state Methods hidePopu...
...this attribute should not be set, otherwise IME or on-screen keyboard popups will appear incorrectly. For these reasons, you should avoid setting the level if not needed. top The panel is shown in front of all other normal windows, including those of other applications. parent The panel is shown just above the window the panel is in, but behind other windows above it. If anchored, the
child window maintains its relative position to its parent window. floating The panel floats above the window the panel is in. On Mac, the panel is only visible when the application is active. noautofocus Type: boolean If false, the default value, the currently focused element will be unfocused whenever the popup is opened or closed. If true, the focus is not adjusted. noautohid...
...: The popup is closed and not visible. open: The popup is open and visible on screen. showing: A request has been made to open the popup, but it has not yet been shown. This state will occur during the popupshowing event. hiding: The popup is about to be hidden. This state will occur during the popuphiding event. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData hidePopup()...
richlistbox - Archive of obsolete content
tem element Returns the currently focused item in the list box, which is only useful in a multiple selection list box. disabled Type: boolean Gets and sets the value of the disabled attribute. disableKeyNavigation Type: boolean Gets or sets the value of the disableKeyNavigation attribute. itemCount Type: integer Read only property holding the number of
child items. scrollBoxObject Type: nsIScrollBoxObject The scroll box object implements the nsIScrollBoxObject interface, which may be used to retrieve and adjust the scroll position of the list box. selectedCount Type: integer Returns the number of items that are currently selected. selectedIndex Type: integer Returns the index of the currently selected item. You ...
...te. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData addItemToSelecti...
...justs the focused item backward by that many items. If isSelecting is true, then the selection is also adjusted. If isSelectingRange is also true, then the new item is selected in addition to any currently selected items. If isSelectingRange is false, any existing selection is cleared. Items that are hidden are skipped. removeItemAt( index ) Return type: element Removes the
child item in the element at the specified index. The method returns the removed item. removeItemFromSelection( item ) Return type: no return value Deselects the specified item without deselecting other items. scrollToIndex( index ) Return type: no return value Scrolls the element to the specified index. This is different than ensureIndexIsVisible because the view is always scrolled. ...
row - Archive of obsolete content
More information is available in the XUL tutorial. Example See grid for an example. ...
... More information is available in the XUL tutorial. Example See grid for an example. ...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
rule - Archive of obsolete content
A rule may contain where, binding and/or action elements. A condition is defined used a where element. For each result that matches all of the conditions, content within the rule's action body is generated. The bindings element is optional and may specify additional variable bindings to be used. ...
... regardless of whether a node is a container or not. true: The rule will only match nodes that are marked as containers. This would apply to nodes that represent folders. false: The rule will only match nodes that are not marked as containers. isempty Type: boolean Indicates whether rules match based on emptyness. If not specified, the rule may match regardless of whether a node has
children or not. 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. parent Type: element tag name If set, the rule will only match the corresponding tag. This may be used to have separate rules for leaf and container nodes with different tags. parsetype Type: string If this attribute ...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
splitter - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Style classes The ...
...ible, however, the columns may still be resized. <tree id="tree1" flex="1" height="300" enableColumnDrag="true"> <treecols> <treecol id="name" label="Name" flex="1"/> <splitter class="tree-splitter"/> <treecol id="id" label="ID" flex="1"/> <splitter class="tree-splitter"/> <treecol id="date" label="Date" flex="1"/> <splitter class="tree-splitter"/> </treecols> <tree
children/> </tree> Splitter resizing and overflow The degree to which a splitter will resize a box, and what happens during the resize and after the limit is reached, depends on the height (or width) specified for the box as an attribute or in CSS, the min-height (or min-width), the intrinsic height of the box contents, and the presence or absence of a collapse attribute on the splitter. For: <vbo...
...tribute). For: <vbox/> <splitter/> <vbox height="500" minheight="200"> <vbox height="100"/> </vbox> ...the splitter can be dragged down to the 200px minheight, where it will stop or collapse. For: <vbox/> <splitter/> <vbox height="500" style="min-height: 50"> <vbox height="100"/> </vbox> ...the splitter can be dragged down below the 100px intrinsic height of the lower box, causing the
child box to overflow, until reaching the min-height, at which point it will stop or collapse. That should also work with a minheight attribute specifying a value less than the intrinsic height. (However, because of bug 513597, only specifying both minheight and minwidth attributes, or specifying min-height or min-width in CSS, actually works to allow overflow.) ...
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. By clicking the first tab, the first panel will be displayed. ...
...In most cases you would use a vbox, but they can be any element, although some people like to use tabpanel elements. By clicking the first tab, the first panel will be displayed. ...
... assigning -1 to this property, all items will be deselected. Returns -1 if no items are selected selectedPanel Type: element Holds a reference to the currently selected panel within a <tabbox> element. Assigning a value to this property will modify the selected panel. A select event will be sent when the selected panel is changed. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
tabs - Archive of obsolete content
ppears in the tooltip when the user moves the mouse over the new button in the tab row. Properties accessibleType Type: integer A value indicating the type of accessibility object for the element. disabled Type: boolean Gets and sets the value of the disabled attribute. itemCount Type: integer Read only property holding the number of
child items. selectedIndex Type: integer Returns the index of the currently selected item. You may select an item by assigning its index to this property. By assigning -1 to this property, all items will be deselected. Returns -1 if no items are selected selectedItem Type: element Holds the currently selected item. If no item is currently selected, this ...
...bs. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData advanceSelectedTa...
... getItemAtIndex( index ) Return type: element Returns the element that is at the specified index. insertItemAt( index, label, value ) Return type: element This method creates a new item and inserts it at the specified position. You may optionally set a value. The new item element is returned. removeItemAt( index ) Return type: element Removes the
child item in the element at the specified index. The method returns the removed item. Related Elements tabbox, tab, tabpanels, tabpanel. Interfaces nsIAccessibleProvider, nsIDOMXULSelectControlElement ...
toolbarbutton - Archive of obsolete content
isplayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } 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. reverse For scales, the scale's values are ordered from right to left (for horizontal scales) or f...
...s event handler is called when the command is activated. This occurs when a user selects a menu item or presses a keyboard shortcut attached to the command. open Type: boolean For the menu type buttons, the open attribute is set to true when the menu is open. The open attribute is not present if the menu is closed. orient Type: one of the values below Used to specify whether the
children of the element are oriented horizontally or vertically. The default value depends on the element. You can also use the -moz-box-orient style property. horizontal
Child elements of the element are placed next to each other in a row in the order that they appear in the XUL source. vertical
Child elements of the element are placed under each other in a column in the order that they appe...
...: boolean Gets and sets the value of the open attribute. orient Type: string Gets and sets the value of the orient attribute. tabIndex Type: integer Gets and sets the value of the tabindex attribute. type Type: string Gets and sets the value of the type attribute. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Element...
treerow - Archive of obsolete content
If
child rows are necessary, they should be placed in a tree
children element inside the parent treeitem. More information is available in the XUL tutorial. Attributes properties Examples (example needed) Attributes properties Type: space-separated list of property names Sets the properties of the element, which can be used to style the element. For more information, see Styling a Tree. ...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
... ...
window - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData See also: DOM windo...
...If this code is placed between window tags it messes up all other controls on the window. If it is placed between box tags, window controls are rendered fine, but still there is this error message. The problem can be solved as follows: <html:link rel="icon" href="chrome://myExtension/content/path/to/favicon.png" style="display:none"/> or <h...
...If this code is placed between window tags it messes up all other controls on the window. If it is placed between box tags, window controls are rendered fine, but still there is this error message. The problem can be solved as follows: <html:link rel="icon" href="chrome://myExtension/content/path/to/favicon.png" style="display:none"/> or <html:head> <html:link ...
wizardpage - Archive of obsolete content
s can be used to create wizards that do not have a linear sequence. If one of the pages has a next attribute, all of the pages should have one, except that last page. pageid Type: id This attribute should be set to a string that identifies the page's identifer in the wizard. This is used with the next attribute. The wizard always starts with the wizardpage that appears first in the wizard
child list. Properties next Type: string wizardpage id Set to the pageid of the next page after this one. When set, the page with this pageID is displayed when the Next button is pressed. This can be used to create wizards that do not have a linear sequence. If one of the pages has a next attribute, all of the pages should have one, except that last page. pageid Type: string wizardpag...
...reate wizards that do not have a linear sequence. If one of the pages has a next attribute, all of the pages should have one, except that last page. pageid Type: string wizardpage id This attribute should be set to a string that identifies the page's identifer in the wizard. This is used with the next attribute. The wizard always starts with the wizardpage that appears first in the wizard
child list. Inherited Properties align, , allowEvents, , boxObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipT...
...ssName, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related wi...
Using the W3C DOM - Archive of obsolete content
It then tests for support for textContent, then innerText and uses which ever is supported. If neither is supported, it assumes support for basic DOM 1 methods and uses those. It should be clear that tran...
...It then tests for support for textContent, then innerText and uses which ever is supported. If neither is supported, it assumes support for basic DOM 1 methods and uses those. It should be clear that translating scripts to modify ...
...It then tests for support for textContent, then innerText and uses which ever is supported. If neither is supported, it assumes support for basic DOM 1 methods and uses those. It should be clear that translating scripts to modify document content i...
...It then tests for support for textContent, then innerText and uses which ever is supported. If neither is supported, it assumes support for basic DOM 1 methods and uses those. It should be clear that translating scripts to modify document content is not a trivial undertaking...
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
application/xml or matches text/*+xml or application/*+xml" before encoding (then UTF-8) var accept = xinclude.getAttribute('accept'); // header "Accept: "+x var acceptLanguage = xinclude.getAttribute('accept-language'); // "Accept-Language: "+x var xiFallback = xinclude.getElementsByTagNameNS('http://www.w3.org/2001/XInclude', 'fallback')[0]; // Only 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"'); return f...
...rray so can be treated the same way as the above } // PREPEND ANY NODE(S) (AS XML) THEN REMOVE XINCLUDE for (j=0; j < responseNodes.length ; j++) { xincludeParent.insertBefore(responseNodes[j], xinclude); } xincludeParent.remove
Child(xinclude); } else if (responseType === 'responseText') { if (encName) { var encodingType = response.match(pattern); if (encodingType) { encodingType = encodingType[2]; } ...
...he'); request2.send(null); response = request2[responseType]; // Update the response for processing } // REPLACE XINCLUDE WITH THE RESPONSE AS TEXT var textNode = docu.createTextNode(response); xincludeParent.replace
Child(textNode, xinclude); } // replace xinclude in doc with response now (as plain text or XML) } } } catch (e) { // Use xi:fallback if XInclude retrieval above failed var xiFallback
Children = xiFallback.
childNodes; // PREPEND ANY NODE(S) THEN REMOVE XINCLUDE ...
... } // replace xinclude in doc with response now (as plain text or XML) } } } catch (e) { // Use xi:fallback if XInclude retrieval above failed var xiFallback
Children = xiFallback.
childNodes; // PREPEND ANY NODE(S) THEN REMOVE XINCLUDE for (j=0; j < xiFallback
Children.length ; j++) { xincludeParent.insertBefore(xiFallback
Children[j], xinclude); } xincludeParent.remove
Child(xinclude); } } } return docu; } ...
Introduction to CSS layout - Learn web development
ies. The two values most important for our purposes when discussing layout are display: flex and display: grid. Flexbox Flexbox is the short name for the Flexible Box Layout Module, designed to make it easy for us to lay things out in one dimension -- either as a row or as a column. To use flexbox, you apply display: flex to the parent element of the elements you want to lay out; all its direct
children then become flex items. We can see this in a simple example. The HTML markup below gives us a containing element, with a class of wrapper, inside which are three <div> elements. By default these would display as block elements, below one another, in our English language document. However, if we add display: flex to the parent, the three items now arrange themselves into columns. This is due ...
...iv class="box3">Three</div> </div> In addition to the above properties that can be applied to the flex container, there are properties that can be applied to the flex items. These properties, among other things, can change the way that the items flex, enabling them to expand and contract to fit into the available space. As a simple example of this, we can add the flex property to all of our
child items, with a value of 1. This will cause all of the items to grow and fill the container, rather than leaving space at the end. If there is more space then the items will become wider; if there is less space they will become narrower. In addition, if you add another element to the markup the items will all become smaller to make space for it -- they will adjust size to take up the same amount of...
... is possible in Flexbox, to find out more, see our Flexbox article. Grid Layout While flexbox is designed for one-dimensional layout, Grid Layout is designed for two dimensions -- lining things up in rows and columns. Once again, you can switch on Grid Layout with a specific value of display -- display: grid. The below example uses similar markup to the flex example, with a container and some
child elements. In addition to using display: grid, we are also defining some row and column tracks on the parent using the grid-template-rows and grid-template-columns properties respectively. We've defined three columns each of 1fr and two rows of 100px. I don't need to put any rules on the
child elements; they are automatically placed into the cells our grid has created. Grid example 1 * {bo...
...">One</div> <div class="box2">Two</div> <div class="box3">Three</div> <div class="box4">Four</div> <div class="box5">Five</div> <div class="box6">Six</div> </div> Once you have a grid, you can explicitly place your items on it, rather than relying on the auto-placement behavior seen above. In the second example below we have defined the same grid, but this time with three
child items. We've set the start and end line of each item using the grid-column and grid-row properties. This causes the items to span multiple tracks. Grid example 2 * {box-sizing: border-box;} .wrapper > div { border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; } .wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr; ...
Introducing asynchronous JavaScript - Learn web development
chronous -- you run some code, and the result is returned as soon as the browser can do so. Let's look at a simple example (see it live here, and see the source): const btn = document.querySelector('button'); btn.addEventListener('click', () => { alert('You clicked me!'); let pElem = document.createElement('p'); pElem.textContent = 'This is a newly-added paragraph.'; document.body.append
Child(pElem); }); In this block, the lines are executed one after the other: We grab a reference to a <button> element that is already available in the DOM. We add a click event listener to it so that when the button is clicked: An alert() message appears. Once the alert is dismissed, we create a <p> element. We then give it some text content. Finally, we append the paragraph to th...
... now, but you'll still see them in use in a number of older-but-still-commonly-used APIs. An example of an async callback is the second parameter of the addEventListener() method (as we saw in action above): btn.addEventListener('click', () => { alert('You clicked me!'); let pElem = document.createElement('p'); pElem.textContent = 'This is a newly-added paragraph.'; document.body.append
Child(pElem); }); The first parameter is the type of event to be listened for, and the second parameter is a callback function that is invoked when the event is fired. When we pass a callback function as an argument to another function, we are only passing the function's reference as an argument, i.e, the callback function is not executed immediately. It is "called back" (hence the name) asynchronous...
...However, we then create a loadAsset() function that takes a callback as a parameter, along with a URL to fetch and a content type. It uses XMLHttpRequest ...
... number of console.log() statements to illustrate an order that you might think the code would execute in. console.log ('Starting'); let image; fetch('coffee.jpg').then((response) => { console.log('It worked :)') return response.blob(); }).then((myBlob) => { let objectURL = URL.createObjectURL(myBlob); image = document.createElement('img'); image.src = objectURL; document.body.append
Child(image); }).catch((error) => { console.log('There has been a problem with your fetch operation: ' + error.message); }); console.log ('All done!'); The browser will begin executing the code, see the first console.log() statement (Starting) and execute it, and then create the image variable. It will then move to the next line and begin executing the fetch() block but, because fetch() executes a...
Arrays - Learn web development
lBox.textContent = ''; // number 1 'Underpants:6.99' 'Socks:5.99' 'T-shirt:14.99' 'Trousers:31.99' 'Shoes:23.99'; for (let i = 0; i <= 0; i++) { // number 2 // number 3 // number 4 // number 5 let itemText = 0; const listItem = document.createElement('li'); listItem.textContent = itemText; list.append
Child(listItem); } totalBox.textContent = 'Total: $' + total.toFixed(2); </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="Reset"> <input id="solution" type="button" value="Show solution"> </div> const textarea = document.getElementById('code'); const reset = document.getElementById('reset'); const solution = document.getElementById('solution'); let code = textar...
...\'Socks:5.99\',\n \'T-shirt:14.99\',\n \'Trousers:31.99\',\n \'Shoes:23.99\'];\n\nfor(let i = 0; i < products.length; i++) {\n let subArray = products[i].split(\':\');\n let name = subArray[0];\n let price = Number(subArray[1]);\n total += price;\n let itemText = name + \' -- $\' + price;\n\n let listItem = document.createElement(\'li\');\n listItem.textContent = itemText;\n list.append
Child(listItem);\n}\n\ntotalBox.textContent = \'Total: $\' + total.toFixed(2);'; let solutionEntry = jsSolution; textarea.addEventListener('input', updateCode); window.addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCare...
...at we don't display duplicate entries // the display is regenerated every time a search term is entered. ...
...ment.querySelector(\'.output button\');\n\nlist.innerHTML = \'\';\n\nlet myHistory= [];\n\nsearchBtn.onclick = function() {\n if(searchInput.value !== \'\') {\n myHistory.unshift(searchInput.value);\n\n list.innerHTML = \'\';\n\n for(let i = 0; i < myHistory.length; i++) {\n itemText = myHistory[i];\n const listItem = document.createElement(\'li\');\n listItem.textContent = itemText;\n list.append
Child(listItem);\n }\n\n if(myHistory.length >= 5) {\n myHistory.pop();\n }\n\n searchInput.value = \'\';\n searchInput.focus();\n }\n}'; let solutionEntry = jsSolution; textarea.addEventListener('input', updateCode); window.addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.
What is JavaScript? - Learn web development
Note: If your example doesn't seem to work, go through the steps again an...
... it script.js -- make sure it has that .js filename extension, as that's how it is recognized as JavaScript. Replace your current <script> element with the following: <script src="script.js" defer></script> Inside script.js, add the following script: function createParagraph() { let para = document.createElement('p'); para.textContent = 'You clicked the button!'; document.body.append
Child(para); } const buttons = document.querySelectorAll('button'); for(let i = 0; i < buttons.length ; i++) { buttons[i].addEventListener('click', createParagraph); } Save and refresh your browser, and you should see the same thing! It works just the same, but now we've got our JavaScript in an external file. This is generally a good thing in terms of organizing your code and making it reusable...
...You can see this version on GitHub as apply-javascript-external.html and script.js (see it live too). Inline JavaScript handlers Note that sometimes you'll come across bits of actual JavaScript code living inside HTML. It might look something like this: function createParagraph() { let para = document.createElement('p'); para.textContent = 'You clicked the button!'; document.body.append
Child(para); } <button onclick="createParagraph()">Click me!</button> You can try this version of our demo below. This demo has exactly the same functionality as in the previous two sections, except that the <button> element includes an inline onclick handler to make the function run when the button is pressed. Please don't do this, however. It is bad practice to pollute your HTML with JavaScrip...
...mment is written between the strings /* and */, e.g. /* I am also a comment */ So for example, we could annotate our last demo's JavaScript with comments like so: // Function: creates a new paragraph and appends it to the bottom of the HTML body. function createParagraph() { let para = document.createElement('p'); para.textContent = 'You clicked the button!'; document.body.append
Child(para); } /* 1. Get references to all the buttons on the page in an array format. 2. Loop through all the buttons and add a click event listener to each one. When any button is pressed, the createParagraph() function will be run. */ const buttons = document.querySelectorAll('button'); for (let i = 0; i < buttons.length ; i++) { buttons[i].addEventListener('click', createParagraph); } ...
Implementing feature detection - Learn web development
on whether a CSS feature is supported. For example, we could rewrite our previous example to use @supports -- see supports-feature-detect.html and supports-styling.css. If you look at the latter, you'll see a couple of @supports blocks, for example: @supports (flex-flow: row) and (flex: 1) { main { display: flex; } main div { padding-right: 4%; flex: 1; } main div:last-
child { padding-right: 0; } } This at-rule block applies the CSS rule within only if the current browser supports both the flex-flow: row and flex: 1 declarations. For each condition to work, you need to include a complete declaration (not just a property name) and NOT include the semi-colon on the end. @supports also has OR and NOT logic available -- the other block applies the float layout i...
...ist of what all the class names mean -- see Features detected by Modernizr. Moving on, let's update our CSS to use Modernizr rather than @supports. ...
...So here we're applying the top set of rules only to browsers that do support flexbox, and the bottom set of rules only to browsers that don't (no-fle...
...If it is, we run some code that gets your device's current location, and plots it on a Google Map. Summary This article covered feature detection in a reasonable amount of detail, going through the main concepts and showing you how to both implement you...
Performance
cs. Performance best practices Declaring stateless functions once per process BAD: // addon.js Services.mm.loadFrameScript("framescript.js", true) // framescript.js const precomputedConstants = // ... function helper(window, action) { // ... do some work on the window } function doSomething(message) { result = helper(content, message.data) sendAsyncMessage("my-addon:response-from-
child", {something: result}) } addMessageListener("my-addon:request-from-parent", doSomething) Why is this bad? Because declared functions are also objects. And since frame scripts get evaluated for each tab this means new function objects get instantiated, new constants get computed, block scopes must be set up etc. While it may seem fairly innocencous in this toy example, real scripts often hav...
...urce://my-addon/processModule.jsm", {}).addFrame(this) // processModule.jsm const EXPORTED_SYMBOLS = ['addFrame']; const precomputedConstants = // ... function helper(window, action) { // ... do some work on the window } function doSomething(message) { frameGlobal = message.target result = helper(frameGlobal.content, message.data) frameGlobal.sendAsyncMessage("my-addon:response-from-
child", {something: result}) } function addFrame(frameGlobal) { frameGlobal.addMessageListener("my-addon:request-from-parent", doSomething) } Javascript modules are per-process singletons and thus all their objects are only initialized once, which makes them suitable for stateless callbacks. But care must be taken to not leak references to the frame script global when it is passed into a JSM. A...
...Since the code calls to the parent process to check whether a specific request can be allowed it would slow down all page loads, as web pages generally issue dozens of requests. BETTER: Instead of only keeping the state in the parent an addon can employ a master-slave architecture where the parent has the authoritative state and replicates it to the ...
... process to either allow or deny the request. Since the code calls to the parent process to check whether a specific request can be allowed it would slow down all page loads, as web pages generally issue dozens of requests. BETTER: Instead of only keeping the state in the parent an addon can employ a master-slave architecture where the parent has the authoritative state and replicates it to the
child processes in advance so they can act based on their local copy. See the previous chapter on how to efficiently replicate addon state to each process. Clean up on addon unload BAD: All the previous examples, *even the "better" ones* If your addon is restartless or uses the SDK then updates or the user turning it off and on will load to unload/reload events. Not handling those properly c...
Performance best practices for Firefox front-end engineers
light Saving Time), so let that information guide your timing when you ask questions in the gfx room . Adding nodes using DocumentFragments Sometimes you need to add several DOM nodes as part of an existing DOM tree. For example, when using XUL <xul:menupopup>s, you often have script which dynamically inserts <xul:menuitem>s. Inserting items into the DOM has a cost. If you're adding a number of
children to a DOM node in a loop, it's often more efficient to batch them into a single insertion by creating a DocumentFragment, adding the new nodes to that, then inserting the DocumentFragment as a
child of the desired node. A DocumentFragment is maintained in memory outside the DOM itself, so changes don't cause reflow. The API is straightforward: Create the DocumentFragment by calling Document...
...more efficient to batch them into a single insertion by creating a DocumentFragment, adding the new nodes to that, then inserting the DocumentFragment as a
child of the desired node. A DocumentFragment is maintained in memory outside the DOM itself, so changes don't cause reflow. The API is straightforward: Create the DocumentFragment by calling Document.createDocumentFragment(). Create each
child element (by calling Document.createElement() for example), and add each one to the fragment by calling DocumentFragment.append
Child(). Once the fragment is populated, append the fragment to the DOM by calling append
Child() on the parent element for the new elements. This example has been cribbed from davidwalsh's blog post: // Create the fragment var frag = document.createDocumentFragment();...
... The Gecko profiler add-on is your friend The Gecko profiler is your best friend when diagnosing performance problems and looking for bottlenecks. ...
...or the new elements. This example has been cribbed from davidwalsh's blog post: // Create the fragment var frag = document.createDocumentFragment(); // Create numerous list items, add to fragment for(var x = 0; x < 10; x++) { var li = document.createElement("li"); li.innerHTML = "List item " + x; frag.append
Child(li); } // Mass-add the fragment nodes to the list listNode.append
Child(frag); The above is strictly cheaper than individually adding each node to the DOM. The Gecko profiler add-on is your friend The Gecko profiler is your best friend when diagnosing performance problems and looking for bottlenecks. There's plenty of excellent documentation on MDN about the Gecko profiler: Basic instructions for gathering and sharing a performance profile Advanced profile an...
IME handling guide
dler and focused editor. Unfortunately, it's not allowed to use syncronous communication from chrome process to a remote process. This means that chrome process (and also native IME and our native IME handler) cannot query the focused editor contents directly. For fixing this issue, we have ContentCache classes around process boundary. mozilla::ContentCache This is a base class of ContentCacheIn
Child and ContentCacheInParent and IPC-aware. This has common members of them including all cache data: mText Whole text in focused editor. This may be too big but IME may request all text in the editor. If we can separate editor contents per paragraph, moving selection between paragraphs generates pseudo focus move, we can reduce this size and runtime cost of ContentEventHandler. However, we've n...
...ction isn't collappsed. mCaret::mRect Caret rect at mCaret::mOffset. If caret isn't actually exists, it's computed with a character rect at the offset. mTextRectArray::mStart If there is composition, mStart is same as mCompositionStart. Otherwise, UINT32_MAX. mTextRectArray::mRects Each character rects of composition string. mEditorRect The rect of editor element. mozilla::ContentCacheIn
Child This exists only in remote processes. This is created as a member of PuppetWidget. When PuppetWidget receives notifications to IME from IMEContentObserver in the remote process, it makes this class modify its cached content. Then, this class do that with WidgetQueryContentEvents. Finally, PuppetWidget sends the notification and ContentCacheInParent instance as ContentCache to its parent process.
...te management". When IMEStateManager::StopIMEStateManagement() is called in the remote process by this, the IMEStateManager forgets all focus information (i.e., that indicates nobody has focus). When IMEStateManager in parent process is notified of pseudo focus move from or to menubar while a remote process has focus, it notifies the remote process of "Menu keyboard listener installed". Then, Tab
Child calls IMEStateManager::OnInstalledMenuKeyboardListener() in the remote process. Style of each clause The style of each IME selection is managed by LookAndFeel class per platform. Therefore, it can be overridden by prefs. Background color, foreground color (text color) and underline color can be specified with following prefs. The values must be string of "#rrggbb" format. ui.IMERawInputBack...
...utHandlerBase is the most base class. mozilla::widget::PluginTextInputHandler inherits TextInputHandlerBase and handles key events and IME events on focused plugin. mozilla::widget::IMEInputHandler inherits TextInputHandlerBase and handles IME related events. mozilla::widget::TextInputHandler inherits TextInputHandlerBase and implements NSTextInput protocol of Cocoa. The instance is created per ns
ChildView instance. GTK mozilla::widget::IMContextWrapper handles IME. The instance is created per top level window. Android nsWindow::GeckoViewSupport handles native IME events and just dispatches Widget*Event. ...
Investigating leaks using DMD heap scan mode
uring shutdown. Creating this log during shutdown is nice because there are less things unrelated to the leak in the log, and various cycle collector optimizations are disabled. A garbage collector log will also be created, which you may not need. MOZ_DISABLE_CONTENT_SANDBOX=t: This disables the content process sandbox, which is needed because the DMD and CC log files are created directly by the
child processes. MOZ_CC_LOG_DIRECTORY=$logdir: This selects the location for cycle collector logs to be saved. MOZ_CC_LOG_PROCESS=content MOZ_CC_LOG_THREAD=main: These options specify that we only want CC logs for the main thread of content processes, to make shutdown less slow. If your leak is happening in a different process or thread, change the options, which are listed in xpcom/base/nsCycleColle...
...EventListenerManager] --[mListeners event=onload listenerType=3 [i]]--> 0x7f0882ff8f80 [CallbackObject] --[mIncumbentGlobal]--> 0x7f0897082c00 [nsGlobalWindowInner # 2147483662 inner https://www.example.com] Root 0x7f0882fe3230 is a ref counted object with 1 unknown edge(s). known edges: 0x7f08975a24c0 [FragmentOrElement (xhtml) head https://www.example.com] --[mAttrsAnd
Children[i]]--> 0x7f0882fe3230 0x7f08967e7b20 [JS Object (HTMLScriptElement)] --[UnwrapDOMObject(obj)]--> 0x7f0882fe3230 The first two lines mean that the script element 0x7f0882fe3230 contains a strong reference to the EventListenerManager 0x7f0899b4e550. "[via hash] mListenerManager" is a description of that strong reference. Together, these lines show a chain of strong references from an obj...
...splay generic frames related to the allocator. Caveat: I think block_analyzer.py does not attempt to clamp the address you pass into it, so if it is an offset from the start of the block, it won't find it. block_analyzer.py will return a series of entries that look like this (with the [...] indicating where I have removed things): 0x7f089306b000 size = 4096 bytes at byte offset 2168 nsAttrAnd
ChildArray::GrowBy[...] nsAttrAnd
ChildArray::Insert
ChildAt[...] [...] 0x7f089306b000 is the address of the block that contains $leakaddr. 144 bytes is the size of that block. That can be useful for confirming your guess about what class the block actually is. The byte offset tells you were in the block the pointer is. This is mostly useful for larger objects, and you can potentially combine this w...
...gs in it as there are unknown references to the leaking object, and then you have your leaker. To place an entry into one of the categories, you must look at the code locations given in the stack trace, and see if you can tell what the object is based on that, then compare that to what find_roots.py told you. For instance, one of the strong references in the CC log is from a head element to its
child via mAttrsAnd
Children, and that sounds a lot like this, so we can mark it as being a strong known reference. This is an iterative process, where you first go through and mark off the things that are easily categorizable, and repeat until you have a small list of things to analyze. Example analysis of block_analyzer.py results In one debugging session where I was investigating the leak from bug...
Anonymous Shared Memory
This chapter describes the NSPR API for anonymous shared memory. Anonymous Memory Protocol Anonymous Shared Memory Functions Anonymous Memory Protocol NSPR provides an anonymous shared memory based on NSPR's PRFileMap type. The anonymous file-mapped shared memory provides an inheritable shared memory, as in: the
child process inherits the shared memory. Compare the file-mapped anonymous shared memory to to a named shared memory described in prshm.h. The intent is to provide a shared memory that is accessbile only by parent and
child processes. ... It's a security thing. Depending on the underlying platform, the file-mapped shared memory may be backed by a file. ... surprise! ... On some platforms, no real file backs the shared memory. On platforms where the shared memory is backed by a...
...f the file, hopefully a very short time. This restricts processes that do not inherit the shared memory from opening the file and reading or writing its contents. Further, when all processes using an anonymous shared memory terminate, the backing file is deleted. ... If you are not paranoid, you're not paying attention. The file-mapped shared memory requires a protocol for the parent process and
child process to share the memory. NSPR provides two protocols. Use one or the other; don't mix and match. In the first protocol, the job of passing the inheritable shared memory is done via helper-functions with PR_CreateProcess. In the second protocol, the parent process is responsible for creating the
child process; the parent and
child are mutually responsible for passing a FileMap string. NSPR pr...
...In the examples, the server creates the file-mapped shared memory, the client attaches to it. First protocol Server: fm = PR_OpenAnonFileMap(dirName, size, FilemapProt); addr = PR_MemMap(fm); attr = PR_NewProcessAttr(); PR_ProcessAttrSetInheritableFileMap( attr, fm, shmname ); PR_CreateProcess(Client); PR_DestroyProcessAttr(attr); ... ...
...dr ); PR_CloseFileMap(fm); Client: ... started by server via PR_CreateProcess() fm = PR_GetInheritedFileMap( shmname ); addr = PR_MemMap(fm); ... yadda ... PR_MemUnmap(addr); PR_CloseFileMap(fm); Second protocol Server: fm = PR_OpenAnonFileMap(dirName, size, FilemapProt); fmstring = PR_ExportFileMapAsString( fm ); addr = PR_MemMap(fm); ... application specific technique to pass fmstring to
child ... yadda ... Server uses his own magic to create
child PR_MemUnmap( addr ); PR_CloseFileMap(fm); Client: ... started by server via his own magic ... application specific technique to find fmstring from parent fm = PR_ImportFileMapFromString( fmstring ) addr = PR_MemMap(fm); ... yadda ... PR_MemUnmap(addr); PR_CloseFileMap(fm); Anonymous Shared Memory Functions PR_OpenAnonFileMap PR_Proc...
inIDOMUtils
.getService(Components.interfaces.inIDOMUtils); Method overview void addPseudoClassLock(in nsIDOMElement aElement, in DOMString aPseudoClass); void clearPseudoClassLocks(in nsIDOMElement aElement); [implicit_jscontext] jsval colorNameToRGB(in DOMString aColorName); nsIArray getBindingURLs(in nsIDOMElement aElement); nsIDOMNodeList get
ChildrenForNode(in nsIDOMNode aNode, in boolean aShowingAnonymousContent); unsigned long long getContentState(in nsIDOMElement aElement); void getCSSPropertyNames([optional] in unsigned long aFlags, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] out wstring aProps); nsISupportsArray getCSSStyleRules(in nsIDOMElement aElement, [optional] in DOMString a...
... Methods getBindingURLs() Returns an array of nsIURI objects representing the current XML binding for the specified element. nsIArray getBindingURLs( in nsIDOMElement aElement ); Parameters aElement A DOM Element to retrieve the bindings of. Return value An array of nsIURI objects representing the current XBL binding (if any) for the element and its hierarchy of base bindings. get
ChildrenForNode() Returns a list of DOM nodes that are
children of the specified node. nsIDOMNodeList get
ChildrenForNode( in nsIDOMNode aNode, in boolean aShowingAnonymousContent ); Parameters aNode A DOM Node for which to retrieve the style nodes. aShowingAnonymousContent Whether you are interested in the XBL flattened tree. Return value A DOM NodeList of the
child nodes. If you have ...
... getContentState() A bit mask of the supported content state flags, which are listed in Content state flags. ...
... getContentState() A bit mask of the supported content state flags, which are listed in Content state flags. unsigned long long getContentState( in nsIDOMElement aElement ); Parameters aElement A DOM Element to retrieve the content states of. ...
Parent
ible Page Summary Returns parent node in accessible tree. ...
...s parent node in accessible tree. ...
...essible tree. ...
...e nsIAccessible parent; Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. Remarks Every accessible in the tree has accessible parent excepting application accessible (top level accessible). See Also nsIAccessible.nextSibling nsIAccessible.previousSibling nsIAccessible.first
Child nsIAccessible.last
Child nsIAccessible.
children nsIAccessible.
childCount nsIAccessible.get
ChildAt() ...
nsIHTMLEditor
t Return value checkSelectionStateForAnonymousButtons() Checks if the anonymous nodes created by the HTML editor have to be refreshed or hidden depending on a possible new state of the selection. void checkSelectionStateForAnonymousButtons( in nsISelection aSelection ); Parameters aSelection A selection. createAnonymousElement() Returns an anonymous nsDOMElement of type aTag,
child of aParentNode. If aIsCreatedHidden is true, the class "hidden" is added to the created element. If aAnonClass is not the empty string, it becomes the value of the attribute "_moz_anonclass" nsIDOMElement createAnonymousElement( in AString aTag, in nsIDOMNode aParentNode, in AString aAnonClass, in boolean aIsCreatedHidden ); Parameters aTag A string representing the desired type of...
... aMixed ); Parameters aMixed true if there is more than one format. Return value Name of block tag. "" is returned for none. getSelectedElement() Return an element only if it is the only node selected, such as an image, horizontal rule, and so on. The exception is a link, which is more like a text attribute: The Anchor tag is returned if the selection is within the textnode(s) that are
children of the "A" node. This could be a collapsed selection, that is, a caret within the link text. nsIDOMElement getSelectedElement( in AString aTagName ); Parameters aTagName The HTML tagname or and empty string to get any element (but only if it is the only element selected). Special input values for Links: Use "href" to get a link node (an "A" tag with the "href" attribute set). Return...
...aseFontSize() Increase font size for text in selection by 1 HTML unit All existing text is scanned for existing <FONT SIZE> attributes so they will be incremented instead of inserting new <FONT> tag. void increaseFontSize(); Parameters None. indent() Document me! 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. void insertElementAtSelection( in nsIDOMElement aElement, in boolean aDeleteSelection ); Parameters aElement The element to insert. aDeleteSelection Delete the selection before inserting If a...
...o be removed from the selection. removeInsertionListener() Remove listener for insertion override. void removeInsertionListener( in nsIContentFilter inFilter ); Parameters inFilter Function which callers do not want called during insertion. removeList() Document me! void removeList( in AString aListType ); Parameters aListType replaceHeadContentsWithHTML() Replace all
children of <HEAD> with string of HTML source. void replaceHeadContentsWithHTML( in AString aSourceToInsert ); Parameters aSourceToInsert selectElement() Set the selection at the suppled element. void selectElement( in nsIDOMElement aElement ); Parameters aElement An element in the document. setBackgroundColor() Set the value of the "bgcolor" attribute on the document's <body>...
nsITransactionList
editor/txmgr/idl/nsITransactionList.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview nsITransactionList get
ChildListForItem(in long aIndex); nsITransaction getItem(in long aIndex); long getNum
ChildrenForItem(in long aIndex); boolean itemIsBatch(in long aIndex); Attributes Attribute Type Description numItems long The number of transactions contained in this list. Read only. Methods get
ChildListForItem() Returns the list of
children associated with the item at aIndex. ...
...ex); nsITransaction getItem(in long aIndex); long getNum
ChildrenForItem(in long aIndex); boolean itemIsBatch(in long aIndex); Attributes Attribute Type Description numItems long The number of transactions contained in this list. Read only. Methods get
ChildListForItem() Returns the list of
children associated with the item at aIndex. Implementations may return null if there are no
children, or an empty list. The list returned is AddRef'd so it is up to the caller to Release the transaction when it is done. nsITransactionList get
ChildListForItem( in long aIndex ); Parameters aIndex The index of the item in the list. Return value The nsITransactionList of
children associated with the item at aIndex. getItem() Returns the transaction at the given index in the list. Note that a...
... with the item at aIndex. getItem() Returns the transaction at the given index in the list. Note that a null can be returned here if the item is a batch. The transaction returned is AddRef'd so it is up to the caller to Release the transaction when it is done. nsITransaction getItem( in long aIndex ); Parameters aIndex The index of the item in the list. Return value Missing Description getNum
ChildrenForItem() Returns the number of
child (auto-aggreated) transactions the item at aIndex has. long getNum
ChildrenForItem( in long aIndex ); Parameters aIndex The index of the item in the list. Return value The number of
child (auto-aggreated) transactions the item at aIndex has. itemIsBatch() Returns true if the item at aIndex is a batch. Note that currently there is no requirement for a Tra...
...ransactions the item at aIndex has. itemIsBatch() Returns true if the item at aIndex is a batch. Note that currently there is no requirement for a TransactionManager implementation to associate a toplevel nsITransaction with a batch so it is possible for itemIsBatch to return true and getItem() to return null. However, you can still access the transactions contained in the batch with a call to get
ChildListForItem(). boolean itemIsBatch( in long aIndex ); Parameters aIndex The index of the item in the list. Return value true if the item at aIndex is a batch. See also nsITransaction nsITransactionListener nsITransactionManager ...
nsITreeView
arameters row The index of the row. orientation The position around the given row. Defined in constants. dataTransfer This parameter, added in Gecko 1.9.2, provides the data that has been dropped. getCellProperties() An atomized list of properties for a given cell. Each property, x, that the view gives back will cause the CSS ::moz-tree-cell-*(x) pseudoelement to be matched on the tree
children element. See getRowProperties() for an example. AString getCellProperties( in long row, in nsITreeColumn col, in nsISupportsArray properties ); Parameters row The index of the row. col The current column. properties An array of the cell's current properties. Obsolete since Gecko 22 Return value A string of space-separated property names. getCellText() The text for a giv...
...TreeColumn col ); Parameters row The index of the row. col The column of the cell. (Note that this is not the column index.) Return value The value of the cell. getColumnProperties() Called to get properties to paint a column background. For shading the sort column, and so on. Each property, x, that the view gives back will cause the CSS ::moz-tree-column(x) to be matched on the tree
children element. See getRowProperties() for an example. void getColumnProperties( in nsITreeColumn col, in nsISupportsArray properties ); Parameters col The current column. properties An array of the column's current properties. Obsolete since Gecko 22 Return value A string of space-separated property names. getImageSrc() The image path for a given cell. For defining an icon for a ...
...ction for possible modes. long getProgressMode( in long row, in nsITreeColumn col ); Parameters row The index of the row. col The index of the column. Return value The progress mode for the cell. getRowProperties() An atomized list of properties for a given row. Each property, x, that the view gives back will cause the CSS ::moz-tree-row(x) pseudoelement to be matched on the tree
children element. void getRowProperties( in long index, in nsISupportsArray properties ); Parameters index The index of the row. properties An array of the row's current properties. Obsolete since Gecko 22 Return value A string of space-separated property names. Example Your function will not be provided with a properties array. (This is one way of detecting the version at run-time)...
...s does not determine whether a twisty is actually drawn; that's left up to isContainerEmpty. For very simple tree views, such as those without multi-level data, you might want to consider using something simpler than a tree view, such as a listbox. For tree views with multi-level data, it's advisable to distinguish between a row which is an empty container (i.e., a row with the potential to hold
children but that currently has none), and a non-empty container (i.e., a row that positively does currently have
children). The tree frame code that handles drag and drop, for example, uses this method to determine how to interpret the drop position. Note: nsITreeView implementations must be prepared to handle a call to toggleOpenState for any row index which returns true for a call to isContainer, e...
Drawing and Event Handling - Plugins
splay) or the application's context (NPNVxtAppContext). For MS Windows, the value is the native window on which the plug-in drawing occurs (NPNVnetscapeWindow). The value parameter contains the name of the plug-in. You can also use NPN_GetValue to help create a menu or dialog box for a windowless plug-in. Windowed Plug-ins The browser gives each windowed plug-in its own native window, often a
child window of the the browser window itself, to draw into. The plug-in has complete control over drawing and event handling within that window. On Mac OS, the browser does not give a windowed plug-in a native window, because the Mac OS platform does not support
child windows. Instead, the windowed plug-in draws into the graphics port associated with the browser window, at the offset that the browser...
...On Mac OS, the application uses NPP_SetWindow to dedicate a rectangular part of its graphics port to each instance. ...
...ng and user interface events for a windowed plug-in instance are handled according to the windowing system of its native platform. The Plug-in API provides a native window handle within which an instance does its drawing through the API call NPP_SetWindow. NPP_SetWindow passes the instance an NPWindow object containing the native window handle. On Windows and Unix, each instance receives its own
child window within the browser window hierarchy, and imaging and event processing are relative to this window. Mac OS does not support
child windows. The native window is shared between the instance and the browser. The instance must restrict its drawing to a specified area of the shared window, and it must always save the current settings, set up the drawing environment, and restore the shared drawin...
...nce parameter represents the current plug-in. The variable parameter contains the information the call is requesting, in this case NPNVnetscapeWindow (the native window in which plug-in drawing occurs). Windows The requested information, a value of type HWND, is returned from NPN_GetValue in the value parameter. In many cases, a plug-in may still have to create its own window (a transparent
child window of the the browser window) to act as the owner window for pop-up menus and modal dialog boxes. You can give this transparent
child window its own WindowProc process. The plug-in can use this to deal with WM_COMMAND messages sent to it as a result of tracking the pop-up menu or modal dialog box. Unix/X11 The value parameter for NPN_GetValue must point to an Xlib Window. On successful r...
CharacterData - Web APIs
="130" height="50" fill="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="331" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">CharacterData</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, Node, and implements the
ChildNode and NonDocumentType
ChildNode interface. CharacterData.data Is a DOMString representing the textual data contained in this object. CharacterData.length Read only Returns an unsigned long representing the size of the string contained in CharacterData.data. NonDocumentType
ChildNode.nextElementSibling Read only Returns the Element immediately following the specified one in its parent's ...
...Node and NonDocumentType
ChildNode interface. CharacterData.data Is a DOMString representing the textual data contained in this object. CharacterData.length Read only Returns an unsigned long representing the size of the string contained in CharacterData.data. NonDocumentType
ChildNode.nextElementSibling 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. NonDocumentType
ChildNode.previousElementSibling 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. Methods Inherits methods from its parent, Node, and implements the
ChildNode and NonDocumentType
ChildNode inter...
...ing. CharacterData.deleteData() Removes the specified amount of characters, starting at the specified offset, from the CharacterData.data string; when this method returns, data contains the shortened DOMString. CharacterData.insertData() Inserts the specified characters, at the specified offset, in the CharacterData.data string; when this method returns, data contains the modified DOMString.
ChildNode.remove() Removes the object from its parent
children list. CharacterData.replaceData() Replaces the specified amount of characters, starting at the specified offset, with the specified DOMString; when this method returns, data contains the modified DOMString. CharacterData.substringData() Returns a DOMString containing the part of CharacterData.data of the specified length and starting...
... when this method returns, data contains the modified DOMString. CharacterData.substringData() Returns a DOMString containing the part of CharacterData.data of the specified length and starting at the specified offset. Specifications Specification Status Comment DOMThe definition of 'CharacterData' in that specification. Living Standard Added implemention of the
ChildNode and NonDocumentType
ChildNode interface. Document Object Model (DOM) Level 3 Core SpecificationThe definition of 'CharacterData' in that specification. Obsolete No change from Document Object Model (DOM) Level 2 Core Specification. Document Object Model (DOM) Level 2 Core SpecificationThe definition of 'CharacterData' in that specification. Obsolete No change from...
Document - Web APIs
ed by the document. Document.compatMode Read only Indicates whether the document is rendered in quirks or strict mode. Document.contentType Read only Returns the Content-Type from the MIME Header of the current document. Document.doctypeRead only Returns the Document Type Definition (DTD) of the current document. Document.documentElementRead only Returns the Element that is a direct
child of the document. For HTML documents, this is normally the HTMLHtmlElement object representing the document's <html> element. Document.documentURIRead only Returns the document location as a string. Document.embedsRead only Returns a list of the embedded <embed> elements within the current document. Document.fonts Returns the FontFaceSet interface of the current document. Document.formsRe...
...eRead only Returns timeline as a special instance of DocumentTimeline that is automatically created on page load. Document.undoManager Read only ... Document.visibilityStateRead only Returns a string denoting the visibility state of the document. Possible values are visible, hidden, prerender, and unloaded. ...
...of DocumentTimeline that is automatically created on page load. Document.undoManager Read only ... Document.visibilityStateRead only Returns a string denoting the visibility state of the document. Possible values are visible, hidden, prerender, and unloaded. The Document interface is extended with the ParentNode interface: ParentNode.
childElementCount Read only Returns the number of
children of this ParentNode which are elements. ParentNode.
children Read only Returns a live HTMLCollection containing all of the Element objects that are
children of this ParentNode, omitting all of its non-element nodes. ParentNode.firstElement
Child Read only Returns the first node which is both a
child of this ParentNode and is also an Element, or null if there is none. ParentNode.lastElement...
...ren of this ParentNode which are elements. ParentNode.
children Read only Returns a live HTMLCollection containing all of the Element objects that are
children of this ParentNode, omitting all of its non-element nodes. ParentNode.firstElement
Child Read only Returns the first node which is both a
child of this ParentNode and is also an Element, or null if there is none. ParentNode.lastElement
Child Read only Returns the last node which is both a
child of this ParentNode and is an Element, or null if there is none. Extensions for HTMLDocument The Document interface for HTML documents inherits from the HTMLDocument interface or, since HTML5, is extended for such documents. Document.cookie Returns a semicolon-separated list of the cookies for that document or sets a single cookie. Do...
Examples of web and XML development using the DOM - Web APIs
lang="en"> <head> <meta charset="utf-8"/> <title>Show Event properties</title> <style> table { border-collapse: collapse; } thead { font-weight: bold; } td { padding: 2px 10px 2px 10px; } .odd { background-color: #efdfef; } .even { background-color: #ffffff; } </style> <script> function showEventProperties(e) { function addCell(row, text) { var cell = row.insertCell(-1); cell.append
Child(document.createTextNode(text)); } var e = e || window.event; document.getElementById('eventType').innerHTML = e.type; var table = document.createElement('table'); var thead = table.createTHead(); var row = thead.insertRow(-1); var lableList = ['#', 'Property', 'Value']; var len = lableList.length; for (var i=0; i<len; i++) { addCell(row, lableList[i]); } var tbody = ...
... e || window.event; document.getElementById('eventType').innerHTML = e.type; var table = document.createElement('table'); var thead = table.createTHead(); var row = thead.insertRow(-1); var lableList = ['#', 'Property', 'Value']; var len = lableList.length; for (var i=0; i<len; i++) { addCell(row, lableList[i]); } var tbody = document.createElement('tbody'); table.append
Child(tbody); for (var p in e) { row = tbody.insertRow(-1); row.className = (row.rowIndex % 2)? 'odd':'even'; addCell(row, row.rowIndex); addCell(row, p); addCell(row, e[p]); } document.body.append
Child(table); } window.onload = function(event){ showEventProperties(event); } </script> </head> <body> <h1>Properties of the DOM <span id="eventType"></span> Event Object</h1>...
...tRow and tableRow.insertCell. ...
...cell, text; for (var i = 0; i < 2; i++) { cell = row.insertCell(-1); text = 'Row ' + row.rowIndex + ' Cell ' + i; cell.append
Child(document.createTextNode(text)); } </script> Notes A table's innerHTML property should never be used to modify a table, although you can use it to write an entire table or the content of a cell. If DOM Core methods document.createElement and Node.append
Child are used to create rows and cells, IE requires that they are appended to a tbody element, whereas other browsers will allow appending to a table element (the rows will be added to the last tbody element). There are a number of other convenience methods belonging to the table interface that can be used for creating and modifying tables. ...
Introduction to the DOM - Web APIs
try to avoid in this documentation), but every web browser uses some document object model to make web pages accessible via JavaScript. When you create a script-whether it's inline in a <script> element or included in the web page by means of a script loading instruction-you can immediately begin using the API for the document or window elements to manipulate the document itself or to get at the
children of that document, which are the various elements in the web page. Your DOM programming may be something as simple as the following, which displays an alert message by using the alert() function from the window object, or it may use more sophisticated DOM methods to actually create new content, as in the longer example below. This following JavaScript will display an alert when the document is...
...But there are a number of different data types being passed around the API that you should be aware of. Note: Because the vast majority of code that uses the DOM revolves a...
...But there are a number of different data types being passed around the API that you should be aware of. Note: Because the vast majority of code that uses the DOM revolves around manipulating HTML documents, it's common to ...
... you use on individual elements. These elements may also have specific interfaces for dealing with the kind of data those elements hold, as in the table object example in the previous section. The following is a brief list of common APIs in web and XML page scripting using the DOM. document.getElementById(id) document.getElementsByTagName(name) document.createElement(name) parentNode.append
Child(node) element.innerHTML element.style.left element.setAttribute() element.getAttribute() element.addEventListener() window.content window.onload window.scrollTo() Testing the DOM API This document provides samples for every interface that you can use in your own web development. In some cases, the samples are complete HTML pages, with the DOM access in a <script> element, the interface...
Element.computedStyleMap() - Web APIs
In other browsers you'll just see a link. Did you realize how many default...
...In other browsers you'll just see a link. Did you realize how many default CSS properties a link had? Update the 'a' to the 'p', a...
...In other browsers you'll just see a link. Did you realize how many default CSS properties a link had? Update the 'a' to the 'p', and you'll notice a difference in the margin-top and margin-bottom default computed values. Sp...
...In other browsers you'll just see a link. ...
Using the Gamepad API - Web APIs
ng demo and look at the full source code on Github. ...
...= 'ongamepadconnected' in window; var controllers = {}; function connecthandler(e) { addgamepad(e.gamepad); } function addgamepad(gamepad) { controllers[gamepad.index] = gamepad; var d = document.createElement("div"); d.setAttribute("id", "controller" + gamepad.index); var t = document.createElement("h1"); t.append
Child(document.createTextNode("gamepad: " + gamepad.id)); d.append
Child(t); var b = document.createElement("div"); b.className = "buttons"; for (var i = 0; i < gamepad.buttons.length; i++) { var e = document.createElement("span"); e.className = "button"; //e.id = "b" + i; e.innerHTML = i; b.append
Child(e); } d.append
Child(b); var a = document.createElement("div"); a.className = "axes"; for (var i = 0; i < gamepad.axes.length; i...
... //e.id = "b" + i; e.innerHTML = i; b.append
Child(e); } d.append
Child(b); var a = document.createElement("div"); a.className = "axes"; for (var i = 0; i < gamepad.axes.length; i++) { var p = document.createElement("progress"); p.className = "axis"; //p.id = "a" + i; p.setAttribute("max", "2"); p.setAttribute("value", "1"); p.innerHTML = i; a.append
Child(p); } d.append
Child(a); // See https://github.com/luser/gamepadtest/blob/master/index.html var start = document.getElementById("start"); if (start) { start.style.display = "none"; } document.body.append
Child(d); requestAnimationFrame(updateStatus); } function disconnecthandler(e) { removegamepad(e.gamepad); } function removegamepad(gamepad) { var d = document.getEleme...
...user/gamepadtest/blob/master/index.html var start = document.getElementById("start"); if (start) { start.style.display = "none"; } document.body.append
Child(d); requestAnimationFrame(updateStatus); } function disconnecthandler(e) { removegamepad(e.gamepad); } function removegamepad(gamepad) { var d = document.getElementById("controller" + gamepad.index); document.body.remove
Child(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.getElementsByClassName("button"); for (i = 0; i < controller.buttons.length; i++) { var b = buttons[i]; ...
Ajax navigation example - Web APIs
existing.php">Unexisting page</a> ] </p> include/header.php: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script type="text/javascript" src="js/ajax_nav.js"></script> <link rel="stylesheet" href="css/style.css" /> js/ajax_nav.js: "use strict"; const ajaxRequest = new (function () { function closeReq () { oLoadingBox.parentNode && document.body.remove
Child(oLoadingBox); bIsLoading = false; } function abortReq () { if (!bIsLoading) { return; } oReq.abort(); closeReq(); } function ajaxError () { alert("Unknown error."); } function ajaxLoad () { var vMsg, nStatus = this.status; switch (nStatus) { case 200: vMsg = JSON.parse(this.responseText)...
... function getPage (sPage) { if (bIsLoading) { return; } oReq = new XMLHttpRequest(); bIsLoading = true; oReq.onload = ajaxLoad; oReq.onerror = ajaxError; if (sPage) { oPageInfo.url = filterURL(sPage, null); } oReq.open("get", filterURL(oPageInfo.url, "json"), true); oReq.send(); oLoadingBox.parentNode || document.body.append
Child(oLoadingBox); } function requestPage (sURL) { if (history.pushState) { bUpdateURL = true; getPage(sURL); } else { /* Ajax navigation is not supported */ location.assign(sURL); } } function processLink () { if (this.className === sAjaxClass) { requestPage(this.href); return fal...
...addEventListener("load", init, false) : window.attachEvent ? attachEvent("onload", init) : (onload = init); // Public methods t...
...addEventListener("load", init, false) : window.attachEvent ? attachEvent("onload", init) : (onload = init); // Public methods this.open = requestPage; this.stop = ab...
MutationObserver.MutationObserver() - Web APIs
An array of MutationRecord objects, describing each change that occurred; and the MutationObserver which invoked the callback. See the example below for more details. Return value A new MutationObserver object, configured to call the specified callback when DOM mutations occur. 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. The callback function function callback(mutationList, observer) { mutationList.forEach( (mutation) => { switch(mutation.type) { case '
childList': /* One or more
children have been added to and/or removed from the tree. (See mut...
... The attribute name is in mutation.attributeName, and its previous value is in mutation.oldValue. */ break; } }); } The callback() function is invoked when the observer sees changes matching the configuration of the observation request specified when calling observe() to begin watching the DOM. ...
...t specified when calling observe() to begin watching the DOM. The kind of change that took place (either a change to the list of
children, or a change to an attribute) is detected by looking at the mutation.type property. Creating and starting the observer This code actually sets up the observation process. const targetNode = document.querySelector("#someElement"); const observerOptions = {
childList: true, attributes: true, // Omit (or set to false) to observe only changes to the parent node subtree: true } const observer = new MutationObserver(callback); observer.observe(targetNode, observerOptions); The desired subtree is located by finding an element with the ID someElement. A set of options for the observer is also established in the observerOptions record. In it, we specify...
... true, // Omit (or set to false) to observe only changes to the parent node subtree: true } const observer = new MutationObserver(callback); observer.observe(targetNode, observerOptions); The desired subtree is located by finding an element with the ID someElement. A set of options for the observer is also established in the observerOptions record. In it, we specify values of true for both
childList and attributes, so we get the information we want. Then the observer is instantiated, specifying the callback() function. We begin observing the DOM nodes of interest by calling observe(), specifying the target node and the options object. 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 targetNod...
NodeList.entries() - Web APIs
The NodeList.entries() method returns an iterator allowing to go through all key/value pairs contained in this object. The values are Node objects. Syntax list.entries(); Return value Returns an iterator. ...
... method returns an iterator allowing to go through all key/value pairs contained in this object. The values are Node objects. Syntax list.entries(); Return value Returns an iterator. ...
...tor allowing to go through all key/value pairs contained in this object. The values are Node objects. Syntax list.entries(); Return value Returns an iterator. ...
... key/value pairs contained in this object. The values are Node objects. Syntax list.entries(); Return value Returns an iterator. ...
NodeList.prototype.forEach() - Web APIs
tValue being processed in someNodeList. listObj Optional The someNodeList that forEach() is being applied to. thisArg Optional Value to use as this when executing callback. Return value undefined. ...
...n someNodeList. listObj Optional The someNodeList that forEach() is being applied to. thisArg Optional Value to use as this when executing callback. Return value undefined. ...
...j Optional The someNodeList that forEach() is being applied to. thisArg Optional Value to use as this when executing callback. Return value undefined. ...
...that forEach() is being applied to. thisArg Optional Value to use as this when executing callback. Return value undefined. ...
NodeList.keys() - Web APIs
The NodeList.keys() method returns an iterator allowing to go through all keys contained in this object. The keys are unsigned integer. ...
....keys() method returns an iterator allowing to go through all keys contained in this object. The keys are unsigned integer. Syntax nodeList.keys(); Return value Returns an iterator. ...
...n iterator allowing to go through all keys contained in this object. The keys are unsigned integer. Syntax nodeList.keys(); Return value Returns an iterator. ...
...ugh all keys contained in this object. The keys are unsigned integer. ...
NodeList.values() - Web APIs
The NodeList.values() method returns an iterator allowing to go through all values contained in this object. The values are Node objects. Syntax nodeList.values(); Return value Returns an iterator. ...
...ues() method returns an iterator allowing to go through all values contained in this object. The values are Node objects. Syntax nodeList.values(); Return value Returns an iterator. ...
...iterator allowing to go through all values contained in this object. The values are Node objects. Syntax nodeList.values(); Return value Returns an iterator. ...
...h all values contained in this object. The values are Node objects. Syntax nodeList.values(); Return value Returns an iterator. ...
StylePropertyMapReadOnly - Web APIs
Working Draft ...
... Working Draft Initial definition. ...
... Working Draft Initial definition. ...
... Working Draft Initial definition. ...
TreeWalker - Web APIs
cument.createTreeWalker() method. Properties This interface doesn't inherit any property. TreeWalker.root Read only Returns a Node representing the root node as specified when the TreeWalker was created. TreeWalker.whatToShow Read only Returns an unsigned long being a bitmask made of constants describing the types of Node that must be presented. Non-matching nodes are skipped, but their
children may be included, if relevant. The possible values are: Constant Numerical value Description NodeFilter.SHOW_ALL -1 (that is the max value of unsigned long) Shows all nodes. NodeFilter.SHOW_ATTRIBUTE 2 Shows attribute Attr nodes. This is meaningful only when creating a TreeWalker with an Attr node as its root. In this case, it...
... NodeFilter.SHOW_ALL -1 (that is the max value of unsigned long) Shows all nodes. NodeFilter.SHOW_ATTRIBUTE 2 Shows attribute Attr nodes. This is meaningful only when creating a TreeWalker with an Attr node as its root. In this case, it means that the attribute node will appear in the first position of the iteration or traversal. Since attributes are never
children of other nodes, they do not appear when traversing over the document tree. NodeFilter.SHOW_CDATA_SECTION 8 Shows CDATASection nodes. NodeFilter.SHOW_COMMENT 128 Shows Comment nodes. NodeFilter.SHOW_DOCUMENT 256 Shows Document nodes. NodeFilter.SHOW_DOCUMENT_FRAGMENT 1024 Shows DocumentFragment nodes. ...
...ot the node is visible on the screen is irrelevant.) TreeWalker.parentNode() Moves the current Node to the first visible ancestor node in the document order, and returns the found node. It also moves the current node to this one. If no such node exists, or if it is before that the root node defined at the object construction, returns null and the current node is not changed. TreeWalker.first
Child() Moves the current Node to the first visible
child of the current node, and returns the found
child. It also moves the current node to this
child. If no such
child exists, returns null and the current node is not changed. TreeWalker.last
Child() Moves the current Node to the last visible
child of the current node, and returns the found
child. It also moves the current node to this
child. If no...
... TreeWalker.previousSibling() Moves the current Node to its previous sibling, if any, and returns the found sibling. If there is no such node, return null and the current node is not changed. ...
HTML To MSAA - Accessibility
YSTEM_ LINK n/a value of @href attribute STATE_SYSTEM_ SELECTABLE if @name attribute is presented STATE_SYSTEM_ LINKED if @href attribute is presented or click event listener is registered STATE_SYSTEM_ TRAVERSED if link is traversed n/a "jump" if @href is valid n/a br ROLE_SYSTEM_ WHITESPACE '\n' (new line char) STATE_SYSTEM_ READONLY n/a n/a n/a button ROLE_SYSTEM_ PUSHBUTTON from
child nodes n/a STATE_SYSTEM_ FOCUSABLE STATE_SYSTEM_ DEFAULT if @type attribute has value "submit" n/a "press" n/a caption BSTR role n/a n/a n/a description_for (0x100f), points to table element div BSTR role n/a n/a n/a n/a n/a n/a fieldset ROLE_SYSTEM_ GROUPING text equivalent from
child legend element n/a n/a labelled_by (1003), points to legend element n/a n/a hr ROLE_SYSTE...
...by (1003), points to legend element n/a n/a hr ROLE_SYSTEM_ SEPARATOR n/a n/a n/a n/a n/a n/a img, input @type=image ROLE_SYSTEM_ GRAPHIC from @alt attribute, empty @alt attribute means name can't be calculated at all n/a STATE_SYSTEM_ ANIMATED if image has more than one frame n/a "showlongdesc" if @longdesc attribute is presented n/a if @usemap attribute is used then image accessible has
children for each map item input @type=button, submit, reset ROLE_SYSTEM_ PUSHBUTTON from @value attribute, @alt attribute, default label, @src attribute, @data attribute n/a STATE_SYSTEM_ DEFAULT if @type attribute has value "submit" n/a "press" n/a input @type=text, textarea ROLE_SYSTEM_ TEXT n/a value property of input DOM element STATE_SYSTEM_ READONLY if @readonly attribute is used n/a "act...
...f DOM element returns true n/a "check"/"uncheck"/"cycle" depending on state EVENT_OBJECT_ STATECHANGE when state is changed input type="radio" ROLE_SYSTEM_ RADIOBUTTON n/a n/a STATE_SYSTEM_ MARQUEED used as state checkable STATE_SYSTEM_ CHECKED if checked property of DOM element returns true n/a "select" EVENT_OBJECT_ STATECHANGE when state is changed label ROLE_SYSTEM_ STATICTEXT from
child nodes n/a n/a n/a n/a n/a legend ROLE_SYSTEM_ STATICTEXT n/a n/a n/a label_for (0x1002), points to caption element n/a n/a li and others ROLE_SYSTEM_ LISTITEM n/a n/a STATE_SYSTEM_ READONLY n/a n/a n/a contains
child accessible for list bullet ol, ul and others ROLE_SYSTEM_ LIST n/a n/a STATE_SYSTEM_ READONLY n/a n/a n/a optgroup BSTR role n/a n/a n/a n/a n/a n/a option ROLE_SYS...
..._SYSTEM_ STATICTEXT n/a n/a n/a label_for (0x1002), points to caption element n/a n/a li and others ROLE_SYSTEM_ LISTITEM n/a n/a STATE_SYSTEM_ READONLY n/a n/a n/a contains
child accessible for list bullet ol, ul and others ROLE_SYSTEM_ LIST n/a n/a STATE_SYSTEM_ READONLY n/a n/a n/a optgroup BSTR role n/a n/a n/a n/a n/a n/a option ROLE_SYSTEM_ LISTITEM from @label attribute, from
child text nodes n/a STATE_SYSTEM_ SELECTED if option is selected n/a "select" EVENT_OBJECT_ SELECTIONWITHIN EVENT_OBJECT_ SELECTIONADD if selected EVENT_OBJECT_ SELECTIONREMOVE if unselected select @size > 1 ROLE_SYSTEM_ LIST n/a n/a STATE_SYSTEM_ MULTISELECTABLE if multiselectable n/a n/a n/a select @size = 1 ROLE_SYSTEM_ COMBOBOX n/a name of focused option STATE_SYSTEM_ EXPANDED if combob...
The stacking context - CSS: Cascading Style Sheets
es which cause them to form a stacking context. A stacking context is formed, anywhere in the document, by any element in the following scenarios: Root element of the document (<html>). Element with a position value absolute or relative and z-index value other than auto. Element with a position value fixed or sticky (sticky for all mobile browsers, but not older desktop). Element that is a
child of a flex (flexbox) container, with z-index value other than auto. Element that is a
child of a grid (grid) container, with z-index value other than auto. Element with a opacity value less than 1 (See the specification for opacity). Element with a mix-blend-mode value other than normal. Element with any of the following properties with value other than none: transform filter persp...
...lement with a isolation value isolate. Element with a -webkit-overflow-scrolling value touch. Element with a will-change value specifying any property that would create a stacking context on non-initial value (see this post). Element with a contain value of layout, or paint, or a composite value that includes either of them (i.e. contain: strict, contain: content). Within a stacking context,
child elements are stacked according to the same rules previously explained. Importantly, the z-index values of its
child stacking contexts only have meaning in this parent. Stacking contexts are treated atomically as a single unit in the parent stacking context. In summary: Stacking contexts can be contained in other stacking contexts, and together create a hierarchy of stacking contexts. Each st...
...similated by the parent stacking context. The example In this example, every positioned element creates its own stacking context, because of their positioning and z-index values. The hierarchy of stacking contexts is organized as follows: Root DIV #1 DIV #2 DIV #3 DIV #4 DIV #5 DIV #6 It is important to note that DIV #4, DIV #5 and DIV #6 are
children of DIV #3, so stacking of those elements is completely resolved within DIV#3. Once stacking and rendering within DIV #3 is completed, the whole DIV #3 element is passed for stacking in the root element with respect to its sibling's DIV. Notes: DIV #4 is rendered under DIV #1 because DIV #1's z-index (5) is valid within the stacking context of the root element, while DIV #4's z-index (6) i...
...ex 2) is rendered under DIV#5 (z-index 1) because DIV #5 belongs to DIV #3, which has an higher z-index value. DIV #3's z-index is 4, but this value is independent from z-index of DIV #4, DIV #5 and DIV #6, because it belongs to a different stacking context. An easy way to figure out the rendering order of stacked elements along the Z axis is to think of it as a "version number" of sorts, where
child elements are minor version numbers underneath their parent's major version numbers. This way we can easily see how an element with a z-index of 1 (DIV #5) is stacked above an element with a z-index of 2 (DIV #2), and how an element with a z-index of 6 (DIV #4) is stacked below an element with a z-index of 5 (DIV #1). In our example (sorted according to the final rendering order): Root ...
box-flex-group - CSS: Cascading Style Sheets
/* <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. The initial value is 1. ...
... group is 1 and higher values specify subsequent flex groups. The initial value is 1. When dividing up the box's extra space, the browser first considers all elements within the first flex group. Each element within that group is given extra space based on the ratio of that element's flexibility compared to the flexibility of other elements within the same flex group. If the space of all flexible
children within the group has been increased to the maximum, the process repeats for the
children within the next flex group, using any space left over from the previous flex group. Once there are no more flex groups, and there is still space remaining, the extra space is divided within the containing box according to the box-pack property. If the box would overflow after the preferred space of the ch...
... then space is removed from flexible elements in a manner similar to that used when adding extra space. Each flex group is examined in turn and space is removed according to the ratio of the flexibility of each element. Elements do not shrink below their minimum widths. Syntax The box-flex-group property is specified as any positive <integer>. ...
...t. Elements do not shrink below their minimum widths. Syntax The box-flex-group property is specified as any positive <integer>. Formal definition Initial value1Applies toin-flow
children of box elementsInheritednoComputed valueas specifiedAnimation typediscrete Formal syntax <integer> Examples Simple usage example In the original Flexbox spec, box-flex-group could be used to assign flex
children to different groups to distribute flexible space between: article:nth-
child(1) { -webkit-box-flex-group: 1; } article:nth-
child(2) { -webkit-box-flex-group: 2; } This was only ever supported in WebKit-based browsers, with a prefix, and in subsequent versions of the spec this functionality does not have an equivalent. Instead, distribution of space inside the flex container is now handle...
box-lines - CSS: Cascading Style Sheets
information about the current standard. The box-lines CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). /* Keyword values */ box-lines: single; box-lines: multiple; /* Global values */ box-lines: inherit; box-lines: initial; box-lines: unset; By default a horizontal box will lay out its
children in a single row, and a vertical box will lay out its
children in a single column. This behavior can be changed using the box-lines property. 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. If a value of multiple is specified, however, then the box is allowed to expand to mu...
.... This behavior can be changed using the box-lines property. 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. If a value of multiple is specified, however, then the box is allowed to expand to multiple lines (that is, multiple rows or columns) in order to accommodate all of its
children. 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. This process can repeat to an ...
...he elements remaining on the previous line fit. This process can repeat to an arbitrary number of lines. If a line contains only a single element that doesn't fit, then the element should stay on that line and overflow out of the box. The later lines are placed below the earlier lines in normal direction boxes and above in reverse direction boxes. The height of a line is the height of the largest
child in that line. No additional space appears between the lines apart from the margins on the largest elements in each line. For calculating the height of a line, margins with a computed value of auto should be treated as having a value of 0. A similar process occurs for
children in a vertical box. Later lines in normal direction boxes are placed to the right of earlier lines and to the left in reve...
...lements lay out in a single row or column. multiple Box elements layout in multiple rows or columns. Formal definition Initial valuesingleApplies tobox elementsInheritednoComputed valueas specifiedAnimation typediscrete Formal syntax single | multiple Examples Simple usage example In the original version of the spec, box-lines allowed you to specify that you wanted your flex container's
children to wrap onto multiple lines. This was only supported in WebKit-based browsers, with a prefix. div { display: box; box-orient: horizontal; box-lines: multiple; } The modern flexbox equivalent is flex-wrap. Specifications Not part of any standard. ...
margin-trim - CSS: Cascading Style Sheets
Syntax none Margins are not trimmed by the container. in-flow For in-flow boxes contained by this box, block-axis margins adjacent to the box's edges are truncated to zero. It also truncates any margins collapsed with such a margin. all Trims the margins of in-flow boxes and floats whose margins coincide with the container's content edge. Formal definition Initial valuenoneApplies toBlock containers and multi-column containers. ...
...ent edge. Formal definition Initial valuenoneApplies toBlock containers and multi-column containers. ...
...lies toBlock containers and multi-column containers. ...
...Instead, margin-trim could fix it: article { margin-trim: in-flow; ... } Specifications Specification Status CSS Box Model Module Level 4The definition of 'margin-trim' in that specification. Editor's Draft ...
Audio and Video Delivery - Developer guides
n implemented by Gecko, and it can only be used when specifying the source for media elements, and not in the address bar. Error handling Starting in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), error handling has been revised to match the latest version of the HTML5 specification. Instead of the error event being dispatched to the media element itself, it now gets delivered to the
child <source> elements corresponding to the sources resulting in the error. This lets you detect which sources failed to load, which may be useful. Consider this HTML: <video> <source id="mp4_src" src="video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'> </source> <source id="3gp_src" src="video.3gp" type='video/3gpp; codecs="mp4v.20.8, samr"'> </source> <source id="ogg_src" src="...
... Showing fallback content when no source could...
...ivery Internet Archive -- Free transcoding and storage Detecting when no sources have loaded To detect that all
child <source> elements have failed to load, check the value of the media element's networkState attribute. If this is HTMLMediaElement.NETWORK_NO_SOURCE, you know that all the sources failed to load. If at that point you add another source, by inserting a new <source> element as a
child of the media element, Gecko attempts to load the specified resource. Showing fallback content when no source could be decoded Another way to show the fallback content of a video, when none of the sources could be decoded in the current browser, is to add an error handler on the last source element. Then you can replace the video with its fallback content: <video controls> <source src="dynami...
...The most popular libraries allow you to choose a consistent player design over all browsers and provide a fallback for browsers that don't support audio and video natively. Fallbacks often use Adobe Flash or Microsoft Silverlight plugins. Other functionality such as the track element for s...
Object.getOwnPropertyNames() - JavaScript
["foo", "getFoo"] If you want only the enumerable properties, see Object.keys() or use a for...in loop (note that this will also return enumerable properties found along the prototype chain for the object unless the latter is filtered with hasOwnProperty()). ...
...see Object.keys() or use a for...in loop (note that this will also return enumerable properties found along the prototype chain for the object unless the latter is filtered with hasOwnProperty()). ...
... (note that this will also return enumerable properties found along the prototype chain for the object unless the latter is filtered with hasOwnProperty()). ...
...ess the latter is filtered with hasOwnProperty()). Items on the prototype chain are not listed: function ParentClass() {} ParentClass.prototype.inheritedMethod = function() {}; function
ChildClass() { this.prop = 5; this.method = function() {}; }
ChildClass.prototype = new ParentClass;
ChildClass.prototype.prototypeMethod = function() {}; console.log( Object.getOwnPropertyNames( new
ChildClass() // ["prop", "method"] ) ); Get non-enumerable properties only This uses the Array.prototype.filter() function to remove the enumerable keys (obtained with Object.keys()) from a list of all keys (obtained with Object.getOwnPropertyNames()) thus giving only the non-enumerable keys as output. var target = myObject; var enum_and_nonenum = Object.getOwnPropertyNames(target); var enum_only...
Namespaces crash course - SVG: Scalable Vector Graphics
ch dialect the element names belong to by giving them explicit "namespace declarations". Declaring namespaces So what do these namespace declarations look like, and where do they go? Here is a short example. <svg xmlns="http://www.w3.org/2000/svg"> <!-- more tags here --> </svg> The namespace declaration is provided by the xmlns parameter. 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. Note that the namespace declaration only needs to be provided once on a root element. The declaration defines the default namespace, so the user agent knows that all the <svg> element's descendants also belong to the same namespace. User agents check to see if they recognize the ...
...le. <html xmlns="http://www.w3.org/1999/xhtml"> <body> <!-- some XHTML tags here --> <svg xmlns="http://www.w3.org/2000/svg" width="300px" height="200px"> <!-- some SVG tags here --> </svg> <!-- some XHTML tags here --> </body> </html> In this example the xmlns parameter on the root <html> element declares the default namespace to be XHTML. As a result, it and all its
child elements are interpreted by the user agent as belonging to XHTML, except for the <svg> element. The <svg> element has its own xmlns parameter, and by redeclaring the default namespace, this tells the user agent that the <svg> element and its descendants (unless they also redeclare the default namespace) belong to SVG. See, namespaces really aren't that hard. Declaring namespace prefixes XML di...
...l for the xlink:href parameter to not cause an error. This XLink parameter is also frequently used in SVG on the <a>, <use> and <image> elements among others, so it's a good idea to always include the XLink declaration in your documents. As an aside, it's useful to know that namespace prefixes can also be used for element names. This tells the user agent that that particular element (but not its
children this time!) belongs to the namespace assigned to the prefix. Knowing this will save you some confusion if you come across markup like in the following example: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <body> <h1>SVG embedded inline in XHTML</h1> <svg:svg width="300px" height="200px"> <svg:circle cx="150" cy="100" r="50" fill="#ff...
...In general though it is better to redeclare the default namespace rather than prefix lots of elements in this way. Scripting in namespaced XML Namespaces affect not only markup, but also scripting. If you write scripts for namespaced XML such as SVG, read on. The DOM Level 1 recommendation was created before the original Nam...
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
LinkStyle on SVGStyleElement Implemented (bug 1239128 (Firefox 46.0 / Thunderbird 46.0 / SeaMonkey 2.43)) Inner <svg>s and <foreignObjects>s not overflow: hidden; in UA style sheet Implementation status unknown overflow: hidden; on <hatch> in UA style sheet Implementation status unknown 0 0 as default value of transform-origin except root <svg> and <svg>
children of <foreign> Implementation status unknown Use of white-space instead of deprecated xml:space attribute in UA style sheet Implementation status unknown @font-face, ::first-letter and ::first-line on <text> Implementation status unknown SVG and HTML style sheets in HTML document with inline SVG applying to whole document content Implementation status unkno...
...atus unknown Painting Change Notes paint-order Implemented (bug 828805) will-change instead of buffered-rendering Implementation status unknown context-fill and context-stroke paint values Implemented (bug 719286 (Firefox 18.0 / Thunderbird 18.0 / SeaMonkey 2.15) and bug 798843 (Firefox 26.0 / Thunderbird 26.0 / SeaMonkey 2.23))
child keyword for <paint> values and marker properties Implementation status unknown vector-effect property Only none and non-scaling-stroke values are supported (bug 528332 (Firefox 15 / Thunderbird 15 / SeaMonkey 2.12), bug 1318208) arcs value for stroke-linejoin Not implemented (bug 1239142) auto-start-reverse value for <marker>'s orient attribute Implemented (...
... 15 / SeaMonkey 2.12), bug 1318208) arcs value for stroke-linejoin Not implemented (bug 1239142) auto-start-reverse value for <marker>'s orient attribute Implemented (bug 879659) SVGPaint removed Implementation status unknown fill and stroke taking multiple paints Implementation status unknown z-index Not implemented (bug 360148
child(<integer>) paint value Implementation status unknown Display of zero-length subpaths depends on stroke-linecap attribute Implementation status unknown Markers on all shapes Implementation status unknown <marker> element display defined in UA style sheet Implementation status unknown Only single paints for fills and strokes Implementation status u...
... Linking Change Notes Link SVG resources with fragment identifiers Implementation status unknown xlink:type, xlink:role, xlink:arcrole, xlink:show, and xlink:actuate attributes removed Implementation status unknown xlink:href attribute deprecated in favor of href Implemented (bug 1245751) xlink:title attribute deprecated in favor of
child <title> Implementation status unknown Spaces in SVG view fragments Implementation status unknown pixel: and percent: spatial media fragments Implementation status unknown Linking to <view> elements does not cause implicit box transformation to show nearest ancestor <svg> element Implementation status unknown Unspecified SVG view fragment parameters ...
places/bookmarks - Archive of obsolete content
This will be saved implicitly. save(bookmarks).on("data", function (saved, input) { // A data event is called once for each item saved, as well // as implicit items, like `group` console.log(input === group || ~bookmarks.indexOf(input)); // true }).on("end", function (saves, inputs) { // like the previous example, the "end" event returns an // array of all of our upda...
...st snapshot from the // host, so this is a new instance of the bookmark item, // where `item !== myBookmark`. To match it with the input item, // use the second argument, so `inputItem === myBookmark` // All explicitly saved items have data events called, as // well as implicitly saved items. In this case, // `myGroup` has to be saved before `myBookmark`, since // `myBookmark` is a
child of `myGroup`. `myGroup` will // also have a `data` event called for it. }).on("end", function (items, inputItems) { // The `end` event returns all items that are explicitly // saved. So `myGroup` will not be in this array, // but `myBookmark` will be. // `inputItems` matches the initial input as an array, // so `inputItems[0] === myBookmark` }); // Saving multiple bookmarks, as duck-...
...hereas end events are emitted as the aggregate of an operation, passing an array of objects into the handler. Events data The data event is emitted when a bookmark item that was passed into the save method has been saved to the platform. This includes implicit saves that are dependencies of the explicit items saved. For example, when creating a new bookmark group with two bookmark items as its
children, and explicitly saving the two bookmark
children, the unsaved parent group will also emit a data event. let { Bookmark, Group, save } = require("sdk/places/bookmarks"); let group = Group({ title: "my group" }); let bookmarks = [ Bookmark({ title: "mozilla", url: "http://mozilla.com", group: group }), Bookmark({ title: "w3", url: "http://w3.org", group: group }) ]; save(bookmarks).on("da...
Low-Level APIs - Archive of obsolete content
aces/bookmarks Create, modify, and retrieve bookmarks. places/favicon Helper functions for working with favicons. places/history Access the user's browsing history. platform/xpcom Implement XPCOM objects, factories, and services. preferences/event-target Listen to changes to the Preferences system in Firefox. preferences/service Access the Preferences system in Firefox. remote/
child Enables an SDK module loaded into a
child process to access web content in the
child process and communicate with modules in the main process. remote/parent Enables you to load modules, and privileged parts of your add-on in general, into
child processes. stylesheet/style Modify styles using stylesheet files or CSS rules. stylesheet/utils Helper functions for working with stylesheets. sys...
... system/environment Access, set and clear environment variables. system/events API for working with the application observer service. system/runtime Access to information about Firefox's runtime environment. system/unload Register callbacks that are called when a module is unloaded. ...
... system/environment Access, set and clear environment variables. system/events API for working with the application observer service. system/runtime Access to information about Firefox's runtime environment. system/unload Register callbacks that are called when a module is unloaded. ...
Finding window handles - Archive of obsolete content
string. When working on Windows platforms, many APIs and frameworks require a window handle (HWND type). Since Mozilla tries to be as cross-platform as possible, it can be difficult to get the handle you need. Note: Starting in Gecko 2.0, only the top level browser window has an HWND. Web content windows (in tabs) do not have their own HWNDs. Typically the top level browser window HWND has no
children, although if there are windowed plugins (such as Flash) visible in the window, they will have HWNDs whose parent is the top level browser window HWND. Here is some simple code that can get access to Mozilla window handles. This code can be used from external application or from an XPCOM component within an extension. Finding the content window handle HWND hContent = 0; // first we need ...
...nt window handle HWND hContent = 0; // first we need to find the main browser window HWND hFF = ::FindWindowEx(0, 0, "MozillaUIWindowClass", 0); if (hFF) { // next we step down through a fixed structure HWND hTemp; hTemp = ::FindWindowEx(hFF, 0, "MozillaWindowClass", 0); hTemp = ::FindWindowEx(hTemp, 0, "MozillaWindowClass", 0); // assume only 1 window at this level has
children // and the 1 with
children is the one we want HWND h
Child = ::GetWindow(hTemp, GW_
CHILD); while (hTemp && !h
Child) { hTemp = ::GetWindow(hTemp, GW_HWNDNEXT); h
Child = ::GetWindow(hTemp, GW_
CHILD); } // did we find a window with
children? // that
child is hopefully the content window if (hTemp) { hTemp = ::GetWindow(hTemp, GW_
CHILD); hContent...
...of this code will get the the parent window handle of the nsIBaseWindow you give as a param. That means if you use the top level nsIBaseWindow as a param, NULL will be returned in the chain and cause crash of Firefox, that's a bug of firefox.(https://bugzilla.mozilla.org/show_bug.cgi?id=489045) Now, let's move forward. First, in JavaScript, the code gets the nsIBaseWindow we want, it's a direct
child of the top nsIBaseWindow. var baseWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIWebNavigation) .QueryInterface(Components.interfaces.nsIDocShellTreeItem) .treeOwner .QueryInterface(Components.interfaces.nsIInterfaceRequestor)...
Tabbox - Archive of obsolete content
Examples: .tabs-closebutton { list-style-i...
... Examples: .tabs-closebutton { list-style-image: url(http:/...
...ox"); var currentIndex = tabbox.selectedIndex; if(currentIndex>=0){ var tabs=document.getElementById("tabs"); var tabpanels=document.getElementById("tabpanels"); tabpanels.remove
Child(tabpanels.
childNodes[currentIndex]); tabs.removeItemAt(currentIndex); /*Work around If last tab is removed, widget fails to advance to next tab*/ if(-1 == tabbox.selectedIndex && tabs.
childNodes.length>0){ tabbox.selectedIndex=0; } } Creating a close tab button To have a tab close button, you must configure the style. Examples: .tabs-closebutton { list-style-image: url(http://mozilla.org/favicon.ico); } .tabs-closebutton { list-style-image: url("chrome://global/skin/icons/Close.gif"); } ...
Tree - Archive of obsolete content
tead, you can add the event handler to the <tree> element. You can then use the event and some utility methods to find the <treecell>. ...
...nt. You can then use the event and some utility methods to find the <treecell>. ...
...treecell>. ...
Adding menus and submenus - Archive of obsolete content
m. Adding a New Menu We already saw how to add menus in overlays and, as you may have imagined, you can nest submenus as deep as you want. You should avoid having deep menus or too many options, since they are confusing for most users. If your extension requires custom XUL windows, you may also need to have menus on those windows. You can do this with a menubar. The menubar element should be a
child of a toolbox element because it is treated like another toolbar on systems other than Mac OS X. Mac OS X treats menus in a very different way than other systems. If your extension involves menus in any way, you should test it on Mac OS X to make sure everything works adequately. The toolbox should be positioned near the top of the XUL document, and the code should be similar to this: <toolbo...
...simple menu with options for 3 different types of greetings, a menuseparator, and finally an option to show a custom greeting. 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. ...
... </menu> <menuitem label="&xulschoolhello.greet.custom.label;" oncommand="XULSchoolChrome.GreetingDialog.greetingCustom(event);" /> </menupopup> </menu> </menubar> </toolbox> In this case we grouped the 3 greeting items into a submenu. It doesn't make much sense to do that in this case because we end up with only two menu items, one of them being a menu with 3
child items. You can also have menus that are filled dynamically. Instead of setting the menupopup directly in the XUL, you can use the onpopupshowing event to fill the
children when the popup is about to be displayed. DOM functions like createElement and append
Child can be used to accomplish this. If you have nothing to show on a menu, you should follow the standard used in Firefox: show a single d...
Custom XUL Elements with XBL - Archive of obsolete content
g. In this case we're adding the "Persons" dynamically, so you'll have to look into the JS file to see how xshelloperson elements are created and added to the DOM just like any other. addPerson : function(aEvent) { // ... let person = document.createElement("xshelloperson"); // ... person.setAttribute("name", name); person.setAttribute("greeting", greeting); // ... personList.append
Child(person); // ... }, This is where the advantage of XBL is obvious: we only need to create a single node and set some attributes. We didn't need to create a whole XUL structure that would require around 7 nodes every time a "Person" is created. XBL provides the encapsulation we needed to manage these nodes as a unit. As a bonus, you should look into the usage of nsIFilePicker to open a "Open...
.... The oncommand attribute of the button has some code you've probably never seen before: document.getBindingParent(this). This code gets the DOM object that corresponds to the xshelloperson tag, allowing you access to its methods and properties. In this case we're calling the remove method, which we will discuss later on. If you need to create a container element, or any other element that has
child nodes, you can use the XBL
children tag in your content to indicate the place where the
child nodes will be inserted. The includes attribute gives you a little more flexibility with
children, but it's rarely needed. One important thing to take into account is that you shouldn't use the id attribute in any content nodes. These nodes are part of the XUL DOM just like any other, and having an id at...
...the node will be lost. This means that all your properties and fields will be reset. If you want some value to be preserved after such DOM operations, you must set it as an attribute and not an internal value. Methods Our "Person" binding has a single method that removes the item from the list: <method name="remove"> <parameter name="aEvent" /> <body><![CDATA[ this.parentNode.remove
Child(this); ]]></body> </method> As you can see, it's very easy to define a method and the parameters it takes. You can also have a return value using the return keyword, just like on regular JS code. The method uses the parent node to remove the Person node. Simple enough. You can do almost anything from XBL code, including using XPCOM components, JS Code Modules and available chrome scripts. T...
XPCOM Objects - Archive of obsolete content
otice is that both paratemers have the in keyword. This specifies that these are input parameters, values that the method will use to perform its actions. When is a parameter not an in parameter? In some methods the out keyword is used for parameters that are return values in reality. This is done for certain value types that are not valid as return values in IDL, such as typed arrays. void get
ChildList(in string aStartingAt, out unsigned long aCount,[array, size_is(aCount), retval] out string a
ChildArray); This method returns an array of strings. The first parameter is an input that tells the method where to start looking. The second one will hold the length of the return array, and the third parameter will hold the array itself. Note the metadata included in the square brackets, indicat...
...ray of strings. The first parameter is an input that tells the method where to start looking. The second one will hold the length of the return array, and the third parameter will hold the array itself. Note the metadata included in the square brackets, indicating that the parameter is an array, and that its size is determined by the aCount parameter. Here's one way to invoke this method: let
childArrayObj = new Object(); let
childArray; this._prefService.get
ChildList("", {},
childArrayObj); // .value holds the actual array.
childArray =
childArrayObj.value; The general rule for out parameters is that you can pass an empty object, and then you can get the result by accessing the value attribute in this object after the method call. The method will set value for you. Also, since JS arra...
...; } }; The instructions on how to build an IDL file are included in the section Setting up a Development Environment. C++ XPCOM Components C++ XPCOM components are no longer supported in Firefox extensions. They are only available to code built into Firefox itself. If you are writing an extension and need to interact with 3rd-party binary code, the best way to do that is to use the system/
child_process IPC layer from the Addon SDK. The c-types module is also available as a bridge to load and use shared libraries from extension code. << PreviousNext >> This tutorial was kindly donated to Mozilla by Appcoast. ...
Drag and Drop Example - Archive of obsolete content
ppropriate type. var boardObserver = { getSupportedFlavours : function () { var flavours = new FlavourSet(); flavours.appendFlavour("text/unicode"); return flavours; }, onDragOver: function (event, flavour, session) {}, onDrop: function (event, dropdata, session) { if (dropdata.data != "") { var elem = document.createElement(dropdata.data); event.target.append
Child(elem); elem.setAttribute("left", "" + event.pageX); elem.setAttribute("top", "" + event.pageY); elem.setAttribute("label", dropdata.data); } } } The getSupportedFlavours function needs only to return a list of flavours that the stack can accept to be dropped on it. In this case, it only accepts text. We don't need to do anything special for the onDragOver function, so no ...
... } } } The getSupportedFlavours function needs only to return a list of flavours that the stack can accept to be dropped on it. In this case, it only accepts text. We don't need to do anything special for the onDragOver function, so no code is added in its body. The onDrop handler first uses the createElement function to create a new element of the type stored in the drag session. Next, append
Child is called to add the new element to the stack, which is the target of the event. Finally, we set some attributes on the new element. The position of elements in a stack is determined by the left and top attributes. The values of the pageX and pageY properties store the mouse pointer coordinates on the window where the drop occured. This allows us to place the new element at the position where the...
...", txt); } }; var boardObserver = { getSupportedFlavours : function () { var flavours = new FlavourSet(); flavours.appendFlavour("text/unicode"); return flavours; }, onDragOver: function (event, flavour, session) {}, onDrop: function (event, dropdata, session) { if (dropdata.data != "") { var elem = document.createElement(dropdata.data); event.target.append
Child(elem); elem.setAttribute("left", "" + event.pageX); elem.setAttribute("top", "" + event.pageY); elem.setAttribute("label", dropdata.data); } } }; << Previous Original Document Information Author(s): Neil Deakin Original Document: http://xulplanet.com/tutorials/mozsdk/dragex.php Copyright Information: Copyright (C) Neil Deakin ...
Layout System Overview - Archive of obsolete content
s responsible for resolving style values for content elements and creating the appropriate frames corresponding to that element. In addition to managing the creation of frames, the Frame Constructor is responsible for managing changes to the frames. Frame Construction is generally achieved by the use of stateless methods, but in some cases there is the need to provide context to frames created as
children of a container. The Frame Manager uses the Frame Constructor State class to manage the important information about the container of a frame being created (and lots of other state-stuff too - need to describe more fully). Frame The Frame is the most fundamental layout object. The class nsFrame is the base class for all frames, and it inherits from the base class nsIFrame (note: nsIFrame is NOT ...
... NOT an interface, it is an abstract base class. It was once an interface but was changed to be a base class when the Style System was modified - the name was not changed to reflect that it is not an interface). The Frame provides generic functionality that can be used by subclasses but cannot itself be instantiated. nsFrame: The Frame provides a mechanism to navigate to a parent frame as well as
child frames. All frames have a parent except for the root frame. The Frame is able to provide a reference to its parent and to its
children upon request. The basic data that all frames maintain include: a rectangle describing the dimensions of the frame, a pointer to the content that the frame is representing, the style context representing all of the stylistic data corresponding to the frame, a paren...
...e is representing, the style context representing all of the stylistic data corresponding to the frame, a parent frame pointer, a sibling frame pointer, and a series of state bits. Frames are chained primarily by the sibling links. Given a frame, one can walk the sibling of that frame, and can also navigate back up to the parent frame. Specializations of the frame also allow for the management of
child frames; this functionality is provided by the Container Frame. Container Frames: The Container Frame is a specialization of the base frame class that introduces the ability to manage a list of
child frames. All frames that need to manage
child frames (e.g. frames that are not themselves leaf frames) derive from Container Frame. Block Frame Reflow State Reflow Metrics Space Manager StyleSet StyleC...
Space Manager High Level Design - Archive of obsolete content
lients of the Space Manager also play an important part in the management of he available and used space. The primary classes that interact with the Space Manager are: nsBlockReflowState nsBlockFrame nsBoxToBlockAdaptor The general interaction model is to create a Space Manager for a block frame in the context of a Reflow, and to associate it with the BlockReflowState so it is passed down to
child frames' reflow methods. After reflow, the Space Manager is destroyed. During reflow, the space manager stores the space taken up by floats (UpdateSpaceManager in nsBlockFrame) and provides information about the space available for other elements (GetAvailableSpace in nsBlockReflowState). Additionally, there is a need to manage impacts to lines caused by changes to floated elements. This is referr...
...BlockFrame::UpdateSpaceManager). The general algorithm in nsBlockReflowState::RecoverFloats is: For each line in the block, see if it has floated blocks If floats are in the line, iterate over the floats and add each one to the Space Manager via the AddRectRegion method. The actual rect for the frame is cached in an nsFloatCache so it does not have to be recomputed. If the block has any block
children, then translate the Space Manager to the
child block's origin and update the space manager in the context for the
child block, recursively. When done with the
child, restore the Space Managers coordinates by translating by the negative of the
child block's origin. The general algorithm in nsBlockReflowState::FlowAndPlaceFloat is: The region that the float currently occupies is recorded. Th...
...The block frame uses a helper method on the nsBlockReflowState class to do the actual computation of available space based on the data in the Space Manager. Here is how it works for reflowing an inline frame within a block (this also occurs for reflowing a block frame and, partially, for preparing for a resize reflow). nsBlockFrame first frees all float information f...
Example Sticky Notes - Archive of obsolete content
url(notes.xml#default) This ID is local within the binding file (not visible in the target document DOM tree). --> <resources> <!-- Obtaining the stylesheet we'll use to (re)style the bound element. --> <stylesheet src="notes.css"/> </resources> <content> <!-- This SVG graphics will be added automatically around each bound element. The position of the original content is indicated by <
children/> tag. --> <svg:svg width="60px" height="60px"> <svg:g fill-opacity="0.6" stroke="#FFFFFF" stroke-width="1px"> <svg:circle cx="25px" cy="12px" r="12" fill="#FF0000" transform="translate(0,0)"/> <svg:circle cx="25px" cy="12px" r="12" fill="#00FF00" transform="translate(7,12)"/> <svg:circle cx="25px" cy="12px" r="12" fill="#0000FF" transform="translate(-7,12)"/> </svg:g> </svg:svg...
...> tag. --> <svg:svg width="60px" height="60px"> <svg:g fill-opacity="0.6" stroke="#FFFFFF" stroke-width="1px"> <svg:circle cx="25px" cy="12px" r="12" fill="#FF0000" transform="translate(0,0)"/> <svg:circle cx="25px" cy="12px" r="12" fill="#00FF00" transform="translate(7,12)"/> <svg:circle cx="25px" cy="12px" r="12" fill="#0000FF" transform="translate(-7,12)"/> </svg:g> </svg:svg> <
children/> </content> <implementation> <!-- Here and futher CDATA wrappers around JavaScript code are not mandatory but recommended. This way you protect yourselve from < and > signs breaking your XML layout. It also speeds up the parsing as the engine doesn't go through CDATA sections but simply skip on them. --> <constructor><![CDATA[ /** * The code below will be called one time only afte...
... also may define any amount of named arguments using <parameter name="argumentName"/> --> <parameter name="arg"/> <body><![CDATA[ this.style.border = arg; ]]></body> </method> </implementation> <handlers> <!-- Event handlers. Mouse events sent to bindings are refactored, so event.target / event.relatedTarget always points to the bound element, even if it was originated to/from a
child. --> <handler event="click"><![CDATA[ if (this.priority == 'normal') { this.priority = 'high'; this.setBorder('2px solid red'); } else { this.priority = 'normal'; this.setBorder('2px solid blue'); } var str = this.innerText + '\n\n'; str+= ('On ' + event.type + ' priority set to: ' + this.priority); window.alert(str); ]]></handler> <handler event="mouseover"><![CDATA[ this.$...
A XUL Bestiary - Archive of obsolete content
f documents and also to different proprietary notions about what in a document should be exposed programmatically. The W3C has standardized on a particular DOM and already has a candidate recommendation for an updated version. This is the DOM that is reflected in XUL and in the Mozilla browser. At the highest level in the tree of nodes that is the DOM sits the window object itself. The window has
child nodes like the document itself, a history object which records the pages a user has seen, frame nodes, and so on, all of which are accessible programmatically. With the dramatic improvements in the object model and the power of the W3C DOM Level 2, the concept of the DOM is displacing that of the more abstract DHTML. Since any dynamic web development is dependent upon programmatic access to the ...
... parlance, the element is analogous to the object itself while the attribute is like a property. The attribute has a value associated with it (such as the string "file" for the id attribute in the example above). Note that the menu element includes both the opening tag at the top and the closing tag at the bottom of the example. In a way, the menu element comprises the menu element itself and its
children, the popup and menuitems. Events Events are also a source of confusion for many less-hardened developers. In fact, I'm not sure I understand them adequately myself, but here goes a simple explanation of events and of how they are used, basically, in a event-based interface like those created in XUL. Events are messages that are sent from an object when that object performs some action. For e...
... it. To create an event handler, simple place the code you want executed within the appropriate event listener: <menuitem value="Click Me" onclick="alert('Event Handled.')" /> It follows from the description above that event handlers can be written for events that are fired somewhere below them in the hierarchy. A menubar in XUL, for instance, can contain event handlers for events fired by its
child menuitems. Mozilla XPArchitecture Mozilla is obviously a lot more than simply an interface. It's cross-platform, and standards-based, and yet in some way, the event handlers written once in JavaScript and living in the XUL interface are getting very serious things done down in the application core. Things like socket interfaces, editing, mail/news, security. The technologies that make this poss...
Property - Archive of obsolete content
<< XUL Reference accessible accessibleType accessKey align allNotifications allowEvents alwaysOpenPopup amIndicator appLocale autoCheck autoFill autoFillAfterMatch boxObject browsers builder builderView buttons canAdvance canGoBack canGoForward canRewind checked checkState
child children className clickSelectsAll clientHeight clientWidth collapsed color columns command commandManager completeDefaultIndex container contentDocument contentPrincipal contentTitle contentView contentViewerEdit contentViewerFile contentWindow contextMenu control controller controllers crop current currentIndex currentItem currentNotification currentPage currentPane currentSet currentURI customT...
...Places decimalSymbol defaultButton defaultValue description dir disableAutocomplete disableAutoComplete disableautoselect disabled disableKeyNavigation dlgType docShell documentCharsetInfo editable editingColumn editingRow editingSession editor editortype emptyText Deprecated since Gecko 2 enableColumnDrag eventNode firstOrdinalColumn firstPermanent
Child flex focused focusedItem forceComplete group handleCtrlPageUpDown handleCtrlTab hasUserValue height hidden hideSeconds highlightNonMatches homePage hour hourLeadingZero id ignoreBlurWhileSearching image increment inputField inverted is24HourClock isPM isSearching isWaiting itemCount label labelElement lastPermanent
Child lastSelected l...
...crolling tabpanels tag textLength textValue timeout title toolbarName toolbarset tooltip tooltipText top treeBoxObject type uri userAction value valueNumber view webBrowsereFind webNavigation webProgress width wizardPages wrapAround year yearLeadingZero Related DOM element properties DOM:element.attributes DOM:element.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.first
Child DOM:element.firstElement
Child DOM:element.last
Child DOM:element.lastElement
Child DOM:element.localName DOM:element.namespaceURI DOM:element.nextElementSibling DOM:element.nex...
Things I've tried to do with XUL - Archive of obsolete content
ing property, all of that from c++ instead of JS. Multi-column listboxes When adding items to multi-column listboxes, you can't use the appendItem API: // Auto-create and attach 1st cell var row = myListBox.appendItem( label, value ); // Create and attach 2nd cell var cell = document.createElement('listcell'); cell.setAttribute('label', label2 ); cell.setAttribute('value', value2 ); row.append
Child( cell ); // etc // ... While this works at first, after a number of rows have been added it breaks and stops displaying the first cell (the one specified by the appendItem call). Instead, you must build up your own listitem full of listcells, and then add that listitem to the listbox, using generic DOM calls: var row = document.createElement('listitem'); // Create and attach 1st cell var cell =...
...ng the first cell (the one specified by the appendItem call). ...
...ng generic DOM calls: var row = document.createElement('listitem'); // Create and attach 1st cell var cell = document.createElement('listcell'); cell.setAttribute('label', label ); cell.setAttribute('value', value ); row.append
Child( cell ); // Create and attach 2nd cell cell = document.createElement('listcell'); cell.setAttribute('label', label2 ); cell.setAttribute('value', value2 ); row.append
Child( cell ); // etc // ... // Attach row myListBox.append
Child( row ); ...
Tree Widget Changes - Archive of obsolete content
clear the checkbox for a particular cell in that column by setting the value attribute to true, or leaving out the attribute. Note that it's the value attribute you use, not the label attribute. <treecell/> <treecell value="true"/> You need to specify the checkbox image with CSS for the checkbox to display. (Do NOT set id of the column to be 'checked' it will cause problems with the CSS) tree
children::-moz-tree-checkbox(checked) { /* css for checked cells */ list-style-image: url("chrome://global/skin/checkbox/cbox-check.gif"); } In addition, checkmark columns support editing: <tree editable="true"> <treecols> <treecol type="checkbox" editable="true"> ... </treecol> </treecols> </tree> If the column is editable, the user can click the cell to change the state...
...ipt for other types of cells. For instance: var col = tree.columns.getPrimaryColumn(); treecell.setCellText(5, col, "Banana"); This will change the label of the cell in row 5 and the primary column to Banana. However, this paves the way in the future for more general tree editing features. Style improvements You can now specify the cursor to use for a cell using the CSS cursor property. ...
...ure for more general tree editing features. Style improvements You can now specify the cursor to use for a cell using the CSS cursor property. tree
children::-moz-tree-cell-text { cursor: pointer; } This allows you to create separate cursors for cells. The :-moz-tree-separator pseudo has been improved to make it a proper box type and now has additional styling capabilities. ...
Custom Tree Views - Archive of obsolete content
e an object which implements the nsITreeView interface. You can create these objects in JavaScript, but you will need a separate object for each tree. Naturally, since a custom tree view is being used, the content tree view will not be used, so the treeitem, treerow, and treecell elements will have no purpose since the custom view will get its data from elsewhere. ...
...w will not be used, so the treeitem, treerow, and treecell elements will have no purpose since the custom view will get its data from elsewhere. Thus, you can just leave the tree
children element empty. The following example shows this: <tree id="my-tree" flex="1"> <treecols> <treecol id="namecol" label="Name" flex="1"/> <treecol id="datecol" label="Date" flex="1"/> </treecols> <tree
children/> </tree> To assign data to be displayed in the tree, the view object needs to be created which is used to indicate the value of each cell, the total number of rows plus other optional information. The tree will call methods of the view to get the information that it needs to display. In general, although the tree view has thirty or so functions that may be implemented, you only need to imp...
...The setView() function has been called in the onload() handler for the window, but you could also set the view later if you wish. You can change the view at any time. One thing to note is that the getCellText() function is only called when necessary to display the contents. In t...
XUL Questions and Answers - Archive of obsolete content
enu and you generate the XUL on client by applying an XSLT transform.) Can I change a XUL tree cell/row/item background color with JavaScript? To set the background color you need to set the property for the cell/row and not for the item. ...
...OM in order to clean "target" attributes on links, and so on. */ How do I create XUL elements dynamically in JavaScript? Use the following snippet of code to add a new element under an existing element: var elem = document.getElementById(XUL_ELEMENT_ID); var node = document.createElement(XUL_ELEMENT_NAME); node.setAttribute(ATTRIBUTE, VALUE); node.setAttribute(ATTRIBUTE, VALUE); elem.append
Child(node); How do I access XUL elements in a sidebar from the context menu JavaScript? The sidebar's content is a separate document, so you should use document.getElementById("sidebar").contentDocument.getElementById(...) This is something you could see using the DOMi. See also http://developer.mozilla.org/en/docs...in_chrome_code How can I include a .js document from inside a JavaScript do...
... You can send documents using send(document), so you should be able to insert the fragment into an empty document. How can I manage scrolling outside the browser? This problem can be solved by capturing the focus events and giving the focus to another xul element or capturing and canceling the keypress events. How to display addressbook RDF and MenuList on the same list? Mailing lists are
children of directories. As such, you cannot use a template to display them in the same list. The best you can do is a cascading menu along the lines of the move/copy menus, but then of course you lose the ability to easily select from the list. Instead of <menulist id="abPopup"> <menupopup id="abPopup-menupopup" ref="moz-abdirectory://" datasources="rdf:addressdirectory" sortActive="tr...
Accessibility/XUL Accessibility Reference - Archive of obsolete content
abbrowser. See browser element for more info. ...
... See tabbox textbox <label control="inputId"> <!--First name:--> </label> <textbox id='inputId'> tree <tree hidecolumnpicker="true" > <treecols> <treecol label="Cats" primary="true"/> </treecols> <tree
children> <treeitem container="true" open="true"> <treerow> <treecell label="<!--Male-->" /> </treerow> <tree
children> <treeitem> <treerow> <treecell label="<!--Aramis-->" /> </treerow> </treeitem> <treeitem> <treerow> <treecell label="<!--Fergus-->" /> </treerow> </treeitem> </tree
children> </treeitem> </tree
children> </tree> There is no keyboard access to the column picker (the widge...
... in the main menu, e.g. the Manage Bookmarks window in Firefox 2 or the Places window in Firefox 3). JAWS 7.10 can not read the column headers. The main tree is accessible like a regular tree control. ...
caption - Archive of obsolete content
More information is available in the XUL tutorial. ...
...ring Gets and sets the value of the crop attribute. image Type: image URL Gets and sets the value of the image attribute. label Type: string Gets and sets the value of the label attribute. tabIndex Type: integer Gets and sets the value of the tabindex attribute. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elem...
columns - Archive of obsolete content
The columns element may be nested inside another columns element. Other elements placed inside a columns element occupy the full height of the grid and are placed in their corresponding positions between the columns. More information about columns is available in the XUL tutorial. Example See grid for an example. ...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
content - Archive of obsolete content
-editable, querytype, ref, removeelement, sortDirection, sortResource, sortResource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width Propiedades tag Type: tag name This may be set to a tag name. If set, the conditions will only match if the template builder is parsing content for an element directly inside this tag. For example, by using a value of tree
children, the condition will only match when placing elements directly inside a tree
children 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. uri Type: ? Used to specify the variable name for the content. When a rule is evaluated, it scans through each resource...
... Type: ? Used to specify the variable name for the content. When a rule is evaluated, it scans through each resource in the RDF datasource looking for a match. Each resource is placed in the variable specified in the uri attribute in turn. Then, the other rules are evaluated for a match. This attribute should always be present. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Relacionados TBD ...
description - Archive of obsolete content
<< XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] This element is used to create a block of text. The text can be set either with the value attribute or by placing text inside the open and close description tags. The value attribute is used to set text that appears in a single line. If text appears as a
child of the description, it will wrap to multiple lines. It may contain arbitrary markup, which can be styled as needed. More information is available in the XUL tutorial. Attributes crop, disabled, tabindex value Properties accessibleType, crop, disabled, tabIndex, value Style classes header, indent, monospace, plain, small-margin Examples This is a long section of text that will word wrap when displayed <description> This i...
...e. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Style classes he...
grid - Archive of obsolete content
Note: This page is about Grids in Mozilla's XUL Technology. If you are looking for information on CSS Grids, you should go to our CSS Grid Layout page instead. << XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] A grid is a layout type that arranges elements in rows and columns. The grid is expected to contain both a columns element as a
child which defines the structure of the columns and a rows element as
child to define the rows. 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. It is most common to place elements within the rows and use the colu...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
hbox - Archive of obsolete content
This is equivalent to the box element, except it defaults to horizontal orientation. More information is available in the XUL tutorial. ...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
key - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Details on key, key...
...o change one of the <key>'s attributes, such as the modifiers attribute, the keyset element has to be re-added to its parent node; otherwise the new attributes won't be applied. For example: // modify some attributes let key = document.getElementById(KEY_ID); key.setAttribute("modifiers", "alt shift"); // apply the changes let keyset = document.getElementById(KEYSET_ID); keyset.parentNode.append
Child(keyset); ...
listcell - Archive of obsolete content
e position of the image is determined by the dir and orient attributes. label Type: string The label that will appear on the element. If this is left out, no text appears. For an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. type Type: string This attribute is reserved for use by anonymous
children of listitem; do not use. Properties disabled Type: boolean Gets and sets the value of the disabled attribute. Inherited Properties align, , allowEvents, , boxObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , ,...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Style classes li...
menuitem - Archive of obsolete content
s value is set, it overrides an assigned key set in the key attribute. This attribute does not apply to menus directly on the menubar. accesskey Type: character This should be set to a character that is used as a shortcut key. This should be one of the characters that appears in the label attribute for the element. allowevents Type: boolean If true, events are passed to
children of the element. Otherwise, events are passed to the element only. autocheck Type: boolean If this attribute is true or left out, the checked state of the button will be switched each time the button is pressed. If this attribute is false, the checked state must be adjusted manually. When autocheck is true, the button type should be "checkbox" or "radio". checked Type: boolea...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Style classes me...
menuseparator - Archive of obsolete content
value is set, it overrides an assigned key set in the key attribute. This attribute does not apply to menus directly on the menubar. accesskey Type: character This should be set to a character that is used as a shortcut key. This should be one of the characters that appears in the label attribute for the element. allowevents Type: boolean If true, events are passed to
children of the element. Otherwise, events are passed to the element only. command Type: id Set to the id of a command element that is being observed by the element. crop Type: one of the values below If the label of the element is too big to fit in its given space, the text will be cropped on the side specified by the crop attribute. An ellipsis will be used in...
... 3. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
notificationbox - Archive of obsolete content
e an element. Typically the element will be a browser, but any element may be used. The notification element is used for each notification, and will be created automatically for each item. Each notification will slide in and out as needed. This element is used, for example, to implement the yellow information bar in various Firefox windows. The notification box is a vertical box which may have
children. The notifications appear at the top of the box. The notifications may be placed at the bottom by setting the dir attribute to reverse. Finding the current notification box Within a Firefox extension, you can retrieve the current notification box for a specific tab by calling the global function getNotificationBox(): notifyBox = chromeWin.getNotificationBox(notifyWindow) notifyBox = getNoti...
... Type: nodeList NodeList of all notifications. This property is read-only. notificationsHidden Type: boolean Indicating whether the notification area should be hidden. Events AlertActive Type: Event Fired when a notification element is shown. AlertClose Type: Event Fired when a notification element is closed. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData appendNotificatio...
param - Archive of obsolete content
For more information, see Query_Parameters. Attributes index, name, type Attributes index Type: integer The index within the SQL statement of the parameter. name Type: string The name of a parameter within the SQL statement. This name should appear within the query preceded by a colon. ...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
preferences - Archive of obsolete content
<preferences> element should contain one or more <preference> elements. Note: it's not clear which of the following methods and properties are public. Examples <preferences> <preference id="pref_one" name="extensions.myextension.one" type="bool"/> <preference id="pref_two" name="extensions.myextension.two" type="string"/> ... etc ... ...
...OMElement preference); Creates and dispatches a changed (non-bubbling) event to the specified preference element. Also executes code specified in onchanged attribute of the element. See also the description of change event of <preference>. void observe(in nsISupports aSubject, in string aTopic, in wstring aData); nsIObserver method used internally to react to changes to preferences listed as
children of this element. Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTa...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Preferen...
prefpane - Archive of obsolete content
ies | Methods | Related ] A single preference panel in a prefwindow. A prefpane is made up of two parts, the preferences descriptions, which specify the set of preferences that will be modified, and the user interface for adjusting those preferences. The former is specified using a preferences element while the latter may be specified using other XUL elements. Both may be specified directly as
children of the prefpane element, or the src attribute may be used to put a pane in a separate file. In this latter case, the separate file should use an overlay tag as its root tag since it will be loaded as an overlay to the main preferences window. More information is available in the Preferences System article. Attributes helpURI, image, label, onpaneload, selected, src Proper...
...ause the preference's value to change. (1) an example of a widget that has state changes tracked for it includes the checkbox element, whose state is tracked automatically when the "command" event fires. void writePreferences(in boolean flushToDisk); Writes all changes in this pane to preferences, optionally flushes to disk. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Events panel...
richlistitem - Archive of obsolete content
the user. Properties accessible Type: nsIAccessible Returns the accessibility object for the element. control Type: element id Gets and sets the value of the control attribute. disabled Type: boolean Gets and sets the value of the disabled attribute. label Type: string Gets the concatentation of text from any
child label elements. Does not support setting label values. Use the
child elements directly to set label text. searchLabel Type: string Gets and sets the value of the searchlabel attribute. selected Type: boolean This property's value is true if this element is selected, or false if it is not. This property is read only. This property is available for menuitem and menus...
... 3. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Interfac...
rows - Archive of obsolete content
Each
child of a rows element should be a row element. The rows element may be nested inside another rows element. The
children of these nested rows are counted as normal rows as if they were part of the parent. 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. ...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
scale - Archive of obsolete content
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. reverse For scales, the scale's values are ordered from right to left (for horizontal scales) or f...
...te. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData decrease() ...
scrollbox - Archive of obsolete content
vbox to get smaller and sprout its scroll bars instead. Note that this example doesn't use a scrollbox tag; you only need that tag if you want to programmatically scroll in addition to the automatic scroll bars. Note: avoid nested scroll boxes; it's maddening for the experienced user and confusing for the less experienced user. Instead, figure out some other way to lay things out. Scrolling a
child element into view See element.scrollIntoView. Prior to Gecko 19, scrollIntoView() didn't exist in XUL. Do this instead: var xpcomInterface =scrollbox_element.boxObject.QueryInterface( Components.interfaces.nsIScrollBoxObject); xpcomInterface.ensureElementIsVisible(
child_element_to_make_visible); See the nsIScrollBoxObject API for other scroll-related methods. Attributes ...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
stack - Archive of obsolete content
<< XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] An element that renders its
children on top of each other. The first element is placed on the bottom and each successive
child is placed above the previous. All elements are displayed at once.
Child elements may also be placed at absolute positions within the stack. The top, right, bottom, and left attributes on a
child of the stack specify the position of that element. The bottom and right attributes can also be used in conjunction with top and left to set the width and/or height of the
children of the stack. Note that bottom and right attributes, unlike rect, are relative to the bottom and right of the stack. When using these attributes to set width or height, both attributes for the give...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related deck ...
tabbox - Archive of obsolete content
More information is available in the XUL tutorial. ...
...ence to the currently selected tab, which will always be one of the tab elements in the tabs element. Assign a value to this property to modify the currently selected tab. tabs Type: tabs element The tabs element contained within the tabbox. tabpanels Type: tabpanels element The tabpanels element contained within the tabbox. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
toolbarpalette - Archive of obsolete content
Do not add the various spacing items, as those are added automatically. ...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
toolbox - Archive of obsolete content
placed inside a toolbox, a grippy is displayed on its left or upper edge. The user may click the grippy to collapse the toolbar. If multiple toolbars are placed in the same toolbox, they will all collapse into the same row. The Firefox browser does not have grippies so toolbars cannot be collapsed and expanded. Note: Gecko 2.0 adds support for external toolbars. These are toolbars that are not
children of a toolbox. You can associate an external toolbar with a toolbox for the purpose of managing your toolbars by setting the toolboxid property on the toolbar. The external toolbars associated with a toolbox are listed in the array of elements provided by the toolbox's externalToolbars property. More information is available in the XUL tutorial. If you'd like to detect when toolbars in a too...
...e: nsIAccessible Returns the accessibility object for the element. customToolbarCount Firefox only Type: integer The number of custom toolbars currently within the toolbox. 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. palette Firefox only Type: element The toolbarpalette within the toolbox. toolbarset Firefox only Type: element The toolbarset within the toolbox. Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAt...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData appendCustomToolb...
treecell - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
... ...
treecols - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
... Interfaces nsIAccessibleProvider ...
treeseparator - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
... ...
triple - Archive of obsolete content
lement. It is used to check for an assertion within a graph. If such an assertion exists, the rule may match, assuming that all the conditions match. If the assertion does not exist, the rule will not match. Both the subject and object attributes may be variables. The subject of a triple is an RDF resource. In an RDF file this would usually be an RDF Description element. The predicate would be a
child element or property. For example, for a bookmark resource, the name and URL would be predicates. They should be specified in their full URI form. The object is the value of the RDF property. More information is available in the XUL tutorial. Attributes object, predicate, subject Examples (example needed) Attributes object Type: string The object of the element. It can be a variab...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
vbox - Archive of obsolete content
This is equivalent to the box element, except it defaults to vertical orientation. More information is available in the XUL tutorial. ...
...bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
Implementation Status - Archive of obsolete content
292333; 3.4 Extension Module unsupported 300760; ...
...n Title Status Notes Bugs 6.1.1 type partial limited to types mentioned above 6.1.2 readonly supported 6.1.3 required supported 6.1.4 relevant partial relevancy applied via a bind to an element fails to apply to
child attributes 342319; 6.1.5 calculate supported 6.1.6 constraint supported 6.1.7 p3ptype unsupported 279049; 6.2.1 Atomic Datatype partial We will support simpleType's using length, minlength, maxlength, pattern, maxinclusive, minin...
... supported 10.18 Iteration of XForms Actions supported 11. 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. But the user can choose to remove this restriction on a site by site basis via a preference. Click for more details. 330557; 11.3 xforms-submit-serialize supported ...
Bounding volume collision detection with THREE.js - Game development
erty takes the Geometry itself as reference, and not the Mesh. So any transformations such as scale, position, etc. applied to the Mesh will be ignored while computing the calculating box. A more simple alternative that fixes the previous issue is to set those boundaries later on with Box3.setFromObject, which will compute the dimensions taking into account a 3D entity's transformations and any
child meshes as well. var knot = new THREE.Mesh( new THREE.TorusKnotGeometry(0.5, 0.1), new MeshNormalMaterial({})); var knotBBox = new Box3(new THREE.Vector3(), new THREE.Vector3()); knotBBox.setFromObject(knot); Instantiating spheres Instantiating Sphere objects is similar. We need to provide the sphere's center and radius, which can be added to the boundingSphere property available in Geomet...
...urce code to examine. Point vs. Box and Sphere Box vs. Box and Sphere Sphere vs. Box and Sphere Using BoxHelper As an alternative to using raw Box3 and Sphere objects, Three.js has a useful object to make handling bounding boxes easier: BoxHelper (previously BoundingBoxHelper, which has been deprecated). This helper takes a Mesh and calculates a bounding box volume for it (including its
child meshes). This results in a new box Mesh representing the bounding box, which shows the bounding box's shape, and can passed to the previously seen setFromObject method in order to have a bounding box matching the Mesh. BoxHelper is the recommended way to handle 3D collisions with bounding volumes in Three.js. You will miss sphere tests, but the tradeoffs are well worth it. The advantages of u...
... box matching the Mesh. BoxHelper is the recommended way to handle 3D collisions with bounding volumes in Three.js. You will miss sphere tests, but the tradeoffs are well worth it. The advantages of using this helper are: It has an update() method that will resize its bounding box Mesh if the linked Mesh rotates or changes its dimensions, and update its position. It takes into account the
child meshes when computing the size of the bounding box, so the original mesh and all its
children are wrapped. We can easily debug collisions by rendering the Meshes that BoxHelper creates. By default they are created with a LineBasicMaterial material (a three.js material for drawing wireframe-style geometries). The main disadvantage is that it only creates box bounding volumes, so if you need sph...
Async scripts for asm.js - Game development
in Firefox 28). To see the difference, toggle javascript.options.parallel_parsing in about:config. ...
...js"; document.body.append
Child(script); (Scripts created from script default to async.) The default HTML shell Emscripten generates produces the latter. When is async not async? Two common situations in which a script is *not* async (as defined by the HTML spec) are: <script async>code</script> and var script = document.createElement('script'); script.innerHTML = "code"; document.body.append
Child(script); Both are counted as 'inline' scripts and get compiled and then run immediately. What if your code is in a JS string? Instead of using eval or innerHTML, both of which trigger synchronous compilation, you should use a Blob with an object URL: var blob = new Blob([codeString]); var script = document.createElement('script'); var url = URL.createObjectURL(blob); script.onload = script.one...
...ly. What if your code is in a JS string? Instead of using eval or innerHTML, both of which trigger synchronous compilation, you should use a Blob with an object URL: var blob = new Blob([codeString]); var script = document.createElement('script'); var url = URL.createObjectURL(blob); script.onload = script.onerror = function() { URL.revokeObjectURL(url); }; script.src = url; document.body.append
Child(script); The setting of src rather than innerHTML is what makes this script async. ...
Combinators - Learn web development
electors 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. Selectors that utilize a descendant combinator are called descendant selectors. body article p In the example below, we are matching only the <p> element which is inside an element with a class of .box.
Child combinator The
child combinator (>) is placed between two CSS selectors. 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. For example, to select only <p> elements that are direct
children of <article> elements: article > p In this next example, we have an unor...
...ors. 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. For example, to select only <p> elements that are direct
children of <article> elements: article > p In this next example, we have an unordered list, nested inside of which is an ordered list. I am using the
child combinator to select only the <li> elements which are a direct
child of a <ul>, and have given them a top border. If you remove the > that designates this as a
child combinator, you end up with a descendant selector and all <li> elements will get a red border. Adjacent sibling combinator The adjacent sibling selector (+) is used to select something if it is right next to another element at t...
...we are selecting all <p> elements that come after the <h1>, and even though there is a <div> in the document as well, the <p> that comes after it is selected. Using combinators You can combine any of the selectors that we discovered in previous lessons with combinators in order to pick out part of your document. For example if we want to select list items with a class of "a", which are direct
children of a <ul>, I could use the following. ul > li[class="a"] { } Take care however when creating big lists of selectors that select very specific parts of your document. It will be hard to reuse the CSS rules as you have made the selector very specific to the location of that element in the markup. It is often better to create a simple class and apply that to the element in question. That sai...
Type, class, and ID selectors - Learn web development
ps out all of the browser styling. Since the universal selector makes global changes, we use it to deal with very specific situations such as the one outlined below. Using the universal selector to make your selectors easier to read One use of the universal selector is to make selectors easier to read and more obvious in terms of what they are doing. ...
...fic situations such as the one outlined below. Using the universal selector to make your selectors easier to read One use of the universal selector is to make selectors easier to read and more obvious in terms of what they are doing. 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. To avoid this confusion we can add the universal selector to the :...
...tor, 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. To avoid this confusion we can add the universal selector to the :first-
child selector, so it is obvious what the selector is doing. It is selecting any element which is the first-
child of any descendant element of <article>: article *:first-
child { } Although both do the same thing, the readability is significantly improved. Class selectors The class selector starts with a full stop (.) character and will select everything in the document with that class applied to ...
CSS selectors - Learn web development
itself. For example, ::first-line always selects the first line of text inside an element (a <p> in the below case), acting as if a <span> was wrapped around the first formatted line and then selected. p::first-line { } Combinators The final group of selectors combine other selectors in order to target elements within our documents. The following for example selects paragraphs that are direct
children of <article> elements using the
child combinator (>): article > p { } Next steps You can take a look at the reference table of selectors below for direct links to the various types of selectors in this Learn section or on MDN in general, or continue on to start your journey by finding out about type, class, and ID selectors. Previous Overview: Building blocks Next Reference table ...
...nerally. ...
... Class selector .box { } Class selectors id selector #unique { } ID selectors Attribute selector a[title] { } Attribute selectors Pseudo-class selectors p:first-
child { } Pseudo-classes Pseudo-element selectors p::first-line { } Pseudo-elements Descendant combinator article p Descendant combinator
Child combinator article > p
Child combinator Adjacent sibling combinator h1 + p Adjacent sibling General sibling combinator h1 ~ p General sibling 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 ...
Test your skills: Grid Layout - Learn web development
covered. Note: You can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as CodePen, jsFiddle, or Glitch to work on the tasks. If you get stuck, then ask us for help -- see the Assessment or further help section at the bottom of this page. Grid Layout One In this task you should create a grid into which the four
child elements will auto-place. The grid should have three columns sharing the available space equally, and a 20-pixel gap between the column and row tracks. Try updating the live code below to recreate the finished example: For assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor. Grid Layout Two In this example we a...
...ring the available space equally, and a 20-pixel gap between the column and row tracks. Try updating the live code below to recreate the finished example: For assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor. Grid Layout Two In this example we already have a grid defined. 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. Try updating the live code below to recreate the finished example: Additional questions: Can you now cause the first item to display on top without changing the order of items in the source? For assessment or further work purposes, download the starting point for...
...in the image below. Try updating the live code below to recreate the finished example: Additional questions: Can you now cause the first item to display on top without changing the order of items in the source? For assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor. Grid Layout Three There are four direct
children in this grid; the starting point has them displayed using auto-placement. Use the grid-area and grid-template-areas properties to lay the items out as shown in the image. Try updating the live code below to recreate the finished example: For assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor. Grid and Flex L...
How CSS works - Learn web development
isual display of the page is shown on the screen (this stage is called painting). The following diagram also offers a simple view of the process. About the DOM A DOM has a tree-like structure. Each element, attribute, and piece of text in the markup language becomes a DOM node in the tree structure. The nodes are defined by their relationship to other DOM nodes. Some elements are parents of
child nodes, and
child nodes have siblings. Understanding the DOM helps you design, debug and maintain your CSS because the DOM is where your CSS and the document's content meet up. When you start working with browser DevTools you will be navigating the DOM as you select items in order to see which rules apply. A real DOM representation Rather than a long, boring explanation, let's look at an exampl...
... as you select items in order to see which rules apply. A real DOM representation Rather than a long, boring explanation, let's look at an example to see how a real HTML snippet is converted into a DOM. Take the following HTML code: <p> Let's use: <span>Cascading</span> <span>Style</span> <span>Sheets</span> </p> In the DOM, the node corresponding to our <p> element is a parent. ...
...example to see how a real HTML snippet is converted into a DOM. Take the following HTML code: <p> Let's use: <span>Cascading</span> <span>Style</span> <span>Sheets</span> </p> In the DOM, the node corresponding to our <p> element is a parent. Its
children are a text node and the three nodes corresponding to our <span> elements. The SPAN nodes are also parents, with text nodes as their
children: P +- "Let's use:" +- SPAN | +- "Cascading" +- SPAN | +- "Style" +- SPAN +- "Sheets" This is how a browser interprets the previous HTML snippet --it renders the above DOM tree and then outputs it in the browser like so: p {margin:0;} Applying CSS to the DOM Let's say we added some CSS to our document, to style it. Again, the HTML is as follows: <p> Let's use: <span>Cascadin...
Looping code - Learn web development
provided you with an initializer -- let i = 10;. For each iteration, create a new paragraph and append it to the output <div>, which we've selected using const output = document.querySelector('.output');. In comments, we've provided you with three code lines that need to be used somewhere inside the loop: const para = document.createElement('p'); -- creates a new paragraph. output.append
Child(para); -- appends the paragraph to the output <div>. para.textContent = -- makes the text inside the paragraph equal to whatever you put on the right-hand side, after the equals sign. Different iteration numbers require different text to be put in the paragraph for that iteration (you'll need a conditional statement and multiple para.textContent = lines): If the number is 10, print...
...flow: auto;"> </div> <h2>Editable code</h2> <p class="a11y-label">Press Esc to move focus away from the code area (Tab inserts a tab character).</p> <textarea id="code" class="playable-code" style="height: 300px;width: 95%"> let output = document.querySelector('.output'); output.innerHTML = ''; // let i = 10; // const para = document.createElement('p'); // para.textContent = ; // output.append
Child(para); </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="Reset"> <input id="solution" type="button" value="Show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } const textarea = document.g...
....value = 'Show solution'; } updateCode(); }); let jsSolution = 'const output = document.querySelector(\'.output\');\noutput.innerHTML = \'\';\n\nlet i = 10;\n\nwhile(i >= 0) {\n let para = document.createElement(\'p\');\n if(i === 10) {\n para.textContent = \'Countdown \' + i;\n } else if(i === 0) {\n para.textContent = \'Blast off!\';\n } else {\n para.textContent = i;\n }\n\n output.append
Child(para);\n\n i--;\n}'; let solutionEntry = jsSolution; textarea.addEventListener('input', updateCode); window.addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.b...
Debugging on Mac OS X
mended. See "Having a profile for debugging purposes" below. Select the "Arguments" tab in the scheme editor, and click the '+' below the "Arguments passed on launch" field. Add "-P profilename", where profilename is the name of a profile you created previously. Repeat that to also add the argument "-no-remote". Also in the "Arguments" panel, you may want to add an environment variable MOZ_DEBUG_
CHILD_PROCESS set to the value 1 to help with debugging e10s. Select "Build" from the left of the scheme editor window, and check that there is nothing listed under Targets (otherwise it may cause problems when you try to run the executable for debugging since you will get build errors). Click "Close" to close the scheme editor. At this point you can run the application from Xcode, and when you pau...
...oint-strategy always in your $HOME/.lldbinit as recommended on Debugging Mozilla with lldb. Using Mozilla-specific lldb commands If you included the .lldbinit when Setting up lldb, you can use Mozilla-specific lldb commands in the console, located in the Debug area of XCode. For example, type js to see the JavaScript stack. For more information, see Debugging Mozilla with lldb. Debugging e10s
child processes Using XCode to debug
child processes created by an e10s-enabled browser is a little trickier than debugging a single-process browser, but it can be done. These directions were written using XCode 6.3.1 Complete all the steps above under "Creating the Project" From the "Product" menu, ensure the scheme you created is selected under "Scheme", then choose "Scheme > Edit Scheme" In th...
... be launched" On the "Arguments" tab, remove all arguments passed on launch. Now you're ready to start debugging: From the "Product" menu, ensure the scheme you created above is selected under "Scheme" Click the "Run" button. The information area at the top of the window will show "Waiting for plugin-container to launch" From a command line, run your build of Firefox. When that launches a
child process (for example, when you start to load a webpage), XCode will notice and attach to that
child process. You can then debug the
child process like you would any other process. When you are done debugging, click the "Stop" button and quit the instance of Firefox that you were debugging in the normal way. For some help on using lldb see Debugging Mozilla with lldb. Other resources Apple ha...
Process scripts
once, then you will get multiple notifications for that event. The solution in these cases is to use a process script instead of a frame script. You can load a process script by accessing a parent process message manager and calling its loadProcessScript() function. ...
...he global parent process message manager, which will load the script into the the chrome process and any
child processes: // chrome code let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIProcessScriptLoader); ppmm.loadProcessScript("chrome://whatever/process-script.js", true); ppmm.addMessageListener("Hello", function(msg) { ... ...
...aded until their host process is closed. the environment for process scripts is similar to that for frame scripts. However, you don't get access to web content or DOM events from a process script. Retrieving the content frame message manager for a content window When an observer notification in a process script contains a content document or window it can be useful to not use talk through the
child/parent process message managers but through the window's content frame message manager, e.g. if responses should be processed by a frame script instead of the process script. This can be achieved by traversing the docshell tree up to the top window and then retrieving its content message manager, as follows: function contentMMFromContentWindow(window) { let tree = window.QueryInterface(Ci.nsI...
How to get a stacktrace with WinDbg
t.com/download/symbols .symfix+ c:\symbols .reload /f Now wait for the symbols to download. This may take some time depending on your connection speed; the total size of the Mozilla and Microsoft symbols download is around 1.4GB. WinDbg will show "Busy" at the bottom of the application window until the download is complete. ...
...e application window until the download is complete. Once the download is complete, you need to configure WinDbg to examine
child processes, ignore a specific event caused by Flash Player, and record a log of loaded modules. You will also want to open a log file to save data you collect. To do this, enter these four commands, pressing enter after each one. .logopen /t c:\temp\firefox-debug.log .
childdbg 1 .tlist sxn gp lm If you see firefox.exe listed in the output from .tlist more than once, then you are already running the application and need to close the running instance first before you start debugging, otherwise you won't get useful results. Now run Firefox by opening the Debug menu and clicking Go. While Firefox is running, you will not be able to type any commands into the debugger...
...version of Windows, you need to replace "ntdll" in these commands with "ntdll32". Q: The first four frames of my stack trace look like this: 0012fe20 7c90e89a ntdll!KiFastSystemCallRet 0012fe24 7c81cd96 ntdll!ZwTerminateProcess+0xc 0012ff20 7c81cdee kernel32!_ExitProcess+0x62 0012ff34 6000179e kernel32!ExitProcess+0x14 This looks wrong to me?! A: You ran the application without the "Debug
child processes also" check box being checked. You need to detach the debugger and open the application again, this time with the check box being checked. Q: WinDbg tells me that it is unable to verify checksum for firefox.exe. Is this normal? A: Yes, this is normal and can be ignored. Q: Should I click yes or no when WinDbg asks me to "Save information for workspace?" A: Click yes and WinDbg will ...
IPDL Best Practices
an IPDL interface, but it also outlives it (case in point: reference-counted). Is there any chance that an IPDL function could be called after the protocol itself has been destroyed, or before it has been created? Don't let it happen - that is a guaranteed crash right there. Use a flag and the generated ActorDestroy function to control when IPDL functions can be called; see PHttpChannelParent/
Child for an example. When to run code Here's a rundown on appropriate places to run certain kinds of code: Manager::AllocPProtocol - allocation Manager::RecvPProtocolConstructor - initialization, protocol deletion (the TypeAheadFind protocol uses one-shot protocols like this) Actor::Recv__delete__ - cleanup, IPDL calls still valid but ill-advised Actor::ActorDestroy - non-IPDL cleanup Manag...
...igger protocol deletion a second time. While this can be worked around with ActorDestroy, being explicit about deleting the protocol with Send__delete__ is easier to maintain, with symmetric Alloc/DeallocPProtocol functions also being easier to reason about. Minimize overall use of messages Reducing IPC traffic is a righteous goal. Consider the following protocol: async protocol PAsyncQuerier {
child: PAsyncQuery(); } async protocol PAsyncQuery {
child: KickOffQuery(nsString query); parent: ReturnResult(nsString result); __delete__(); } In this situation, there is a guaranteed sequence of messages that will be sent. Following actor construction, the parent will send a KickOffQuery message and presumably ignore the actor until it receives ReturnResult, at which point it will be del...
... of messages that will be sent. ...
CustomizableUI.jsm
ntainer, a toolbar, anymore. onWindowOpened(aWindow) Fired when a new customizable (ie browser) window is opened. onWindowClosed(aWindow) Fired when a customizable (ie browser) window is closed. ...
...ts you have fixed content in a toolbar (e.g. the panel menu item in the navbar) and have all the customizable widgets use the customization target. Using this API yourself is discouraged; you should generally not need to be asking for the DOM container node used for a particular area. In particular, if you're wanting to check it in relation to a widget's node, your DOM node might not be a direct
child of the customize target in a window if, for instance, the window is in customization mode, or if this is an overflowable toolbar and the widget has been overflowed. Parameters aArea the ID of the area whose customize target you want to have aWindow the window where you want to fetch the DOM node. Return value The customize target DOM node for aArea in aWindow reset() Reset the customi...
...The code is more advanced. It can be found summarized at this gist: https://gist.github.com/Noitidart/10902...
Profiling with the Firefox Profiler
several rows of tracing markers (colored segments) which indicate interesting events. Hover over them to see more information. Below the tracing markers are rows corresponding with activity on a variety of threads. Tip: Threads that are annotated with "[default]" are in the parent (aka "UI", aka "browser chrome", aka "main") process and those annotated with "[tab]" are in the Web content (aka "
child") processes. Tip: Long-running tasks in the parent process will block all input or drawing with the browser UI (aka "UI jank") whereas long-running tasks in the content process will block interactivity with the page but still allowing the user to pan and zoom around thanks to APZ. Tracing markers Red: These indicate that the event loop is being unresponsive. Note that high priority events...
...per into the call tree by holding down your right arrow key. Alternatively, expand an entire tree segment by holding Alt and clicking on the arrow to the left of the collapsed tree segment. As we progress into a more specific part of the tree, you'll notice that the 'Running time' decreases. This happens when a function has 2 or more non-trivial calls: the running time will be split between its
children. Tip: Focus on one section of the tree by clicking on the "arrow-in-a-circle" icon that appears to the right of the tree element as you hover over it. A "tree breadcrumb" will appear similar to the range breadcrumbs noted above. Clicking the "JavaScript only" option will only show JavaScript code in the Call Tree. You could compare the time with this option checked and the total time to ge...
...ame things you are seeing. Tips Understanding profiles can be difficult. If you're unfamiliar with Gecko's internals, you can click the JavaScript only button to see where your JavaScript code is slow. Each entry in the Call Tree shows a call stack and how much time is spent in that call stack. For example:In the results above we can see that we're spending ~287 milliseconds in Startup::XRE_Init
ChildProcess, 194 ms of which are spent in PVsync::Msg_Notify and all
child functions that it calls. It is useful to scan down the "Running Time" column and look for when the time changes. While looking for performance problems, you're looking for the processes that are taking the most time; then you can figure out how to optimize them. Common Performance Bugs in Firefox Inefficient code that is on t...
Gecko states
<< AT APIs Support Page Introduction Below you will find a list of supported states by Gecko. State constants are defined in nsIAccessibleStates. States List STATE_UNAVAILABLE The object is unavailable, i.e. disabled. Applied to: all roles. STATE_SELECTED The object is selected, i.e. indicates this object is the
child of an object that allows its
children to be selected and that this
child is one of those
children that has been selected. Applied to: ROLE_MENUITEM, ROLE_CELL, ROLE_OUTLINEITEM, XXX: continue Events: EVENT_STATE_CHANGE ?oncomitant state: STATE_SELECTABLE STATE_FOCUSED The object is focused Applied to: Events: Concomitant state: STATE_FOCUSABLE STATE_PRESSED The object is pressed. STATE_CHECKED The object is checked STATE_MIXED Indicates tha...
...eck box is neither checked nor unchecked and is therefore in the third or mixed state. STATE_READONLY The object is designated read-only. STATE_HOTTRACKED The object is hot-tracked by the mouse, which means that its appearance has changed to indicate that the mouse pointer is located over it. Isn't used STATE_DEFAULT This state represents the default button in a window. STATE_EXPANDED
Children of this object that have the ROLE_OUTLINEITEM role are displayed. STATE_COLLAPSED
Children of this object that have the ROLE_OUTLINEITEM role are hidden. STATE_BUSY The control cannot accept input at this time. STATE_FLOATING
Children "owned" not "contained" by parent STATE_CHECKABLE Indicates scrolling or moving text or graphics. STATE_ANIMATED The object's appearance changes rapidl...
... the list to users. STATE_OFFSCREEN Scrolled off STATE_SIZEABLE The object can be resized. For example, a user could change the size of a window by clicking the border with a mouse and dragging the mouse. STATE_MOVEABLE Indicates that the object can be moved. For example, a user can click on the titlebar for the object and drag the object to a new location. STATE_SELFVOICING The object or
child uses text-to-speech (TTS) technology for description purposes. A speech-based accessibility aid does not announce information when an object with this state has the focus because the object automatically announces information. Isn't used STATE_FOCUSABLE The object can be focused. Applied to: Events: Concomitant state: STATE_FOCUSED STATE_SELECTABLE The object can be selected. Ap...
XForms Accessibility
use xhtml1.x use tabindex. If you use Xhtml2 use nextfocus. Therefore since Mozilla XForms works in XHTML (1.x) or XUL documents only then we use tabindex instead. Note, we support -moz-user-focus style neither for XHTML or XUL. AT API Accessible properties This section describes common rules how accessibility properties are formed for forms control elements. name It is formed from value of
child XForms label element if the element doesn't have labelledby attribute. description It is formed from value of
child XForms hint element if the element doesn't have describedby attribute. state It is formed as well from model item properties (MIPs) of instance node that XForms element is bound to as from valid/invalid or in-range/out-of-range states of instance node. Instance node states are m...
...e states are mapped to accessibility state constants declared in nsIAccessibleStates interface like it shown below: relevant - STATE_UNAVAILABLE readonly - STATE_READONLY required - STATE_REQUIRED invalid - STATE_INVALID out of range - STATE_INVALID attributes Redefines datatype ARIA attribute. Its value is XML Schema builit-in datatype of instance node that XForms element is bound to.
children Mozilla XForms implementation allows form control elements to have
child elements. Therefore accessible
children are formed from any accessible
child elements of form control element and from elements that are introduced by its presentation. Forms Controls Module Some of form control elements may be represented in few ways by different widgets. This section lists accessible presentations fo...
...se one or multiple values from a list of pre-defined values (see the spec, the docs). It can have the following representations: listbox checkboxes group select1 Allows the user to choose a single value from a list of pre-defined values (see the spec, the docs). It can have the following representations: combobox listbox radio group Additional Elements These elements may be used as
child elements to the form controls described above. Some of these elements are not accessible itself but they makes accessibility properties for XForms elements that hold them. label Specifies the label for the xforms control (see the spec, the docs). Every form control other than the output element must contain a label element. The value of label element is used as name of accessible object. help ...
Querying Places
, title, and other general info. nsINavHistoryVisitResultNode: Derived from nsINavHistoryResultNode, contains session information. nsINavHistoryFullVisitResultNode: Derived from nsINavHistoryVisitResultNode, contains information about how the user navigated to this page. Note: currently unimplemented, see bug 320831. nsINavHistoryContainerResultNode: General container node giving access to its
children. Derived from nsINavHistoryResultNode. Bookmark folders are of this type. nsINavHistoryQueryResultNode: A type of container representing a query of the history system. It allows you to get the query options and parameters. Example of detecting the type of a node switch(node.type) { case node.RESULT_TYPE_URI: dump("URI result " + node.uri + "\n"); break; case node.RESULT_TYPE_VI...
...uri, title, time, icon...) // see : https://developer.mozilla.org/en/nsINavHistoryResultNode dump(node.title+ "\n"); } // Close container when done // see : https://developer.mozilla.org/en/nsINavHistoryContainerResultNode cont.containerOpen = false; See also Places query URIs ...
...uri, title, time, icon...) // see : https://developer.mozilla.org/en/nsINavHistoryResultNode dump(node.title+ "\n"); } // Close container when done // see : https://developer.mozilla.org/en/nsINavHistoryContainerResultNode cont.containerOpen = false; See also Places query URIs Displaying Places information using views ...
Avoiding leaks in JavaScript XPCOM components
The _filterRadioGroup object is a JavaScript function that is wrapped so that XPCOM code can use it. The reason closures matter here is that the _filterRadioGroup function has access to the iterator vari...
...The _filterRadioGroup object is a JavaScript function that is wrapped so that XPCOM code can use it. The reason closures matter here is that the _filterRadioGroup function has access to the iterator variable. (var declarations inside JavaScript functions are function-sc...
...The _filterRadioGroup object is a JavaScript function that is wrapped so that XPCOM code can use it. The reason closures matter here is that the _filterRadioGroup function has access to the iterator variable. (var declarations inside JavaScript functions are function-scope, including t...
nsIAccessibleStates
pports Last changed in Gecko 1.9 (Firefox 3) Prior to Gecko 1.9, these constants were implemented in nsIAccessible. Constants State constants MSAA State flags - used for bitfield. More than 1 allowed. Constant Value Description STATE_UNAVAILABLE 0x00000001 The object is unavailable, that is disabled. STATE_SELECTED 0x00000002 The object is selected, That is it indicates this object is the
child of an object that allows its
children to be selected and that this
child is one of those
children that has been selected. STATE_FOCUSED 0x00000004 The object is focused. STATE_PRESSED 0x00000008 The object is pressed. STATE_CHECKED 0x00000010 The object is checked. STATE_MIXED 0x00000020 Indicates that the state of a three-state check box or toolbar button is not determined. The check box...
... therefore in the third or mixed state. STATE_READONLY 0x00000040 The object is designated read-only. STATE_HOTTRACKED 0x00000080 The object is hot-tracked by the mouse, which means that its appearance has changed to indicate that the mouse pointer is located over it. Currently unused. STATE_DEFAULT 0x00000100 This state represents the default button in a window. STATE_EXPANDED 0x00000200
Children of this object that have the ROLE_OUTLINEITEM role are displayed. (See nsIAccessibleRole.Constants). STATE_COLLAPSED 0x00000400
Children of this object that have the ROLE_OUTLINEITEM role are hidden. (See nsIAccessibleRole.Constants). STATE_BUSY 0x00000800 The control cannot accept input at this time. STATE_FLOATING 0x00001000
Children "owned" not "contained" by parent. STATE_MARQUEED ...
...FSCREEN 0x00010000 Scrolled off. STATE_SIZEABLE 0x00020000 The object can be resized. For example, a user could change the size of a window by clicking the border with a mouse and dragging the mouse. STATE_MOVEABLE 0x00040000 The object can be moved. For example, a user can click on the titlebar for the object and drag the object to a new location. STATE_SELFVOICING 0x00080000 The object or
child uses text-to-speech (TTS) technology for description purposes. A speech-based accessibility aid does not announce information when an object with this state has the focus because the object automatically announces information. Currently unused. STATE_FOCUSABLE 0x00100000 The object can be focused. STATE_SELECTABLE 0x00200000 The object can be selected. STATE_LINKED 0x00400000 The object is ...
nsIFile
0x80000000 Optional parameter used by openNSPRFileDesc Methods append() This function is used for constructing a descendant of the current nsIFile. Note: This method does not return a new nsIFile; it modifies the object it was called on. If the old nsIFile should be retained, use clone(). void append( in AString node ); Parameters node A string which is intended to be a
child node of the nsIFile. This string must not contain a path separator character. Exceptions thrown NS_ERROR_FILE_UNRECOGNIZED_PATH Indicates that aNode incorrectly contains a path separator character. Native code only! appendNative This method is used for constructing a descendant of the current nsIFile. [native character encoding variant] void appendNative( in ACString node ); P...
...path separator character. Exceptions thrown NS_ERROR_FILE_UNRECOGNIZED_PATH Indicates that aNode incorrectly contains a path separator character. Native code only! appendNative This method is used for constructing a descendant of the current nsIFile. [native character encoding variant] void appendNative( in ACString node ); Parameters node A string that is intended to be a
child node of the current nsIFile. This string must not contain a path separator character. This string must be encoded using the native character encoding. Exceptions thrown NS_ERROR_FILE_UNRECOGNIZED_PATH Indicates that aNode incorrectly contains a path separator character. clone() This method creates a clone of the nsIFile. (It does NOT clone the file itself; see the copy methods.) nsIFile...
...path represented by the specified nsIFile instance is a descendant of the path represented by this nsIFile. This nsIFile should point to a directory, while the specified argument can point to a file or directory. boolean contains( in nsIFile inFile ); Parameters inFile The nsIFile to test. Return value true if inFile is a descendant of this nsIFile. inFile does not need to be a direct
child of this nsIFile to be considered a descendant. copyTo() This method copies a source file to a new location if it does not already exist. This method will NOT resolve aliases/shortcuts during the copy. void copyTo( in nsIFile newParentDir, in AString newName ); Parameters newParentDir This parameter specifies the parent directory to copy the file into. If this parameter is null, then...
nsINavHistoryQueryResultNode
vHistoryService.idlScriptable Used for Places queries and as a base class for bookmark folders. 1.0 66 Introduced Gecko 1.8 Inherits from: nsINavHistoryContainerResultNode Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Note: If you request that places not be expanded in the options that generated the node, the node will report that it has no
children and will never try to populate itself. Method overview void getQueries([optional] out unsigned long queryCount, [retval,array,size_is(queryCount)] out nsINavHistoryQuery queries); Attributes Attribute Type Description folderItemId long long For both simple folder nodes and simple-folder-query nodes, this is set to the concrete itemId of the folder. Otherwise, this is set to -1. Read...
...onal] out unsigned long queryCount, [retval,array,size_is(queryCount)] out nsINavHistoryQuery queries); Attributes Attribute Type Description folderItemId long long For both simple folder nodes and simple-folder-query nodes, this is set to the concrete itemId of the folder. Otherwise, this is set to -1. Read only. queryOptions nsINavHistoryQueryOptions The options that group the node's
children; only valid for RESULT_TYPE_QUERY nodes. Read only. Methods getQueries() Returns the queries that build the node's
children; only valid for RESULT_TYPE_QUERY nodes. void getQueries( out unsigned long queryCount, Optional from Gecko 2.0 [retval,array,size_is(queryCount)] out nsINavHistoryQuery queries ); Parameters queryCount Optional from Gecko 2.0 The number of queries in the quer...
...There are queryCount elements in the array. ...
nsINavHistoryResultNode
es history result nodes, containing the URI, title, and other general information. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Attributes Attribute Type Description accessCount unsigned long Total number of times the URI has been accessed. For hosts, this is the total number of the
children under it, rather than the total number of times the host has been accessed (getting that information would require an additional query, so for performance reasons that information isn't given by default). Read only. bookmarkIndex long When this item is in a bookmark folder (its parent is of type folder), this is the index into that folder at which this node resides. These indices start at 0 ...
...ion URI that will query the favicon service. If the entry doesn't have a favicon, this is the chrome URI of the default favicon. If the favicon originally lived in chrome, this will be the original chrome URI of the icon. Read only. Note: Prior to Gecko 1.9.2, this was an nsIURI. indentLevel long This is the number of levels between this node and the top of the hierarchy. The members of result.
children have an indentLevel value of zero, their
children have an indentLevel of 1, and so forth. The indent level of the root node is set to -1. Read only. itemId long long If the node is an item (bookmark, folder, or separator), this value is the row ID of that bookmark in the database. For other nodes, this value is set to -1. Read only. lastModified PRTime If the node is an item (bookmark, fo...
...is an empty string. Read only. time PRTime The time at which the user accessed the page. Read only. For visits, this is the exact time at which the page visit occurred. For URIs, this is the most recent time at which the URI was visited. Even if you ask for all URIs for a given date range long ago, this might contain today's date if the URI was visited today. For hosts, or other node types with
children, this is the most recent access time for any of the
children. For days, this is midnight on the morning of the day in question in UTC. title AUTF8String Title of the web page or of the node's grouping (day, host, folder, and so on.). Read only. type unsigned long Identifies the type of node. You can use QueryInterface to access the corresponding specialized result node interface. Read onl...
nsITreeBoxObject
alidateRow(in long index); void invalidateCell(in long row, in nsITreeColumn col); void invalidateRange(in long startIndex, in long endIndex); void invalidateColumnRange(in long startIndex, in long endIndex, in nsITreeColumn col); long getRowAt(in long x, in long y); void getCellAt(in long x, in long y, out long row, out nsITreeColumn col, out ACString
childElt); void getCoordsForCellItem(in long row, in nsITreeColumn col, in ACString element, out long x, out long y, out long width, out long height); boolean isCellCropped(in long row, in nsITreeColumn col); void rowCountChanged(in long index, in long count); void beginUpdateBatch(); void endUpdateBatch(); void clearStyleAndImageCaches(); Att...
... nsITreeView The view that backs the tree and that supplies it with its data. It is dynamically settable, either using a view attribute on the tree tag or by setting this attribute to a new value. focused boolean Whether or not we are currently focused. treeBody nsIDOMElement Readonly: Obtain the treebody content node. This is a node that corresponds to the tree
children tag. rowHeight long Readonly: Obtain the height of a row. rowWidth long Readonly: Obtain the width of a row. horizontalPosition long Readonly: Get the pixel position of the horizontal scrollbar. selectionRegion nsIScriptableRegion Readonly: Return the region for the visible parts of the selection, in device pixels. Methods getFi...
...g y); Parameters x The x coordinate y The y coordinate getCellAt() A hit test that can tell you what cell the mouse is over. Returns -1 for invalid mouse coordinates. The coordinate system is the client coordinate system for the document this boxObject lives in, and the units are CSS pixels. void getCellAt(in long x, in long y, out long row, out nsITreeColumn col, out ACString
childElt); Parameters x The x coordinate y The y coordinate Returns row The row index at the coordinates col The nsITreeColumn hit.
ChildElt The pseudoelement hit: this can have values of "cell", "twisty", "image", and "text". getCoordsForCellItem() Find the coordinates of an element within a specific cell. void getCoordsForCellItem(in long row, in nsITreeC...
nsIWebProgressListener
uriloader/base/nsIWebProgressListener.idlScriptable This interface is implemented by clients wishing to listen in on the progress associated with the loading of asynchronous requests in the context of a nsIWebProgress instance as well as any
child nsIWebProgress instances. Inherits from: nsISupports Last changed in Gecko 15 (Firefox 15 / Thunderbird 15 / SeaMonkey 2.12) nsIWebProgress describes the parent-
child relationship of nsIWebProgress instances. Method overview void onLocationChange(in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI aLocation, [optional] in unsigned long aFlags); void onProgressChange(in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in lon...
...g indicates that the state transition corresponds to the start or stop of activity in the indicated nsIWebProgress instance. This flag is accompanied by either STATE_START or STATE_STOP, and it may be combined with other State Type Flags. Unlike STATE_IS_WINDOW, this flag is only set when activity within the nsIWebProgress instance being observed starts or stops. If activity only occurs in a
child nsIWebProgress instance, then this flag will be set to indicate the start and stop of that activity. For example, in the case of navigation within a single frame of a HTML frameset, a nsIWebProgressListener instance attached to the nsIWebProgress of the frameset window will receive onStateChange() calls with the STATE_IS_NETWORK flag set to indicate the start and stop of said navigation. In o...
... For example, in the case of navigation within a single frame of a HTML frameset, a nsIWebProgressListener instance attached to the nsIWebProgress of the frameset window will receive onStateChange() calls with the STATE_IS_NETWORK flag set to indicate the start and stop of said navigation. In other words, an observer of an outer window can determine when activity, that may be constrained to a
child window or set of
child windows, starts and stops. STATE_IS_WINDOW 0x00080000 This flag indicates that the state transition corresponds to the start or stop of activity in the indicated nsIWebProgress instance. This flag is accompanied by either STATE_START or STATE_STOP, and it may be combined with other State Type Flags. This flag is similar to STATE_IS_DOCUMENT. However,...
nsIXULTemplateBuilder
d a reference point, generates a list of results from the input, and copies part of the template for each result. Templates may generate content recursively, using the same template, but with the previous iteration's results as the reference point. As an example, for an XML data source the initial reference point would be a specific node in the DOM tree and a template might generate a list of all
child nodes. For the next iteration, those
children would be used to generate output for their
child nodes and so forth. A template builder is attached to a single DOM node; this node is called the root node and is expected to contain a XUL template element as a direct
child. Different template builders may be specialized in the manner in which they generate and display the resulting content from the t...
... root node is used to identify the source of data to be used. The ref attribute is used to specify the reference point for the query. The <queryset> element contains a single query and one or more <rule> elements. There may be more than one <queryset> if multiple queries are desired, and this element is optional if only one query is needed -- in that case the <query> and <rule>s are allowed to be
children of the <template> node. The contents of the query are processed by a separate component called a query processor. This query processor is expected to use this query to generate results when asked by the template builder. The template builder then generates output for each result based on the <rule> elements. This allows the query processor to be specific to a particular kind of input data or q...
...lled to initialize a XUL content builder on a particular root element. This element presumably has a datasources attribute, which the builder will parse to set up the template builder's data sources. [noscript] void init( in nsIContent aElement ); Parameters aElement The root element from which to derive the data. Native code only!createContents Invoked lazily by a XUL element that needs its
child content built. [noscript] void createContents( in nsIContent aElement, in boolean aForceCreation ); Parameters aElement The element whose contents need to be built. aForceCreation If true, the contents of the element are generated even if the element is closed; this behavior is used with menus. If false, the element's contents are only generated if it's open. addListener() Adds a listener t...
Break on DOM mutation - Firefox Developer Tools
DOM node on which you have set the breakpoint is modified. You set a DOM Mutation Breakpoint in the Page Inspector. Navigate to the DOM node in which you are interested and use the context menu to set the breakpoint. There are three choices: Subtree Modification Execution pauses if any of the element's descendant nodes are modified. That means, the script execution is stopped whenever a
child node or descendant node deeper in the DOM structure is added to or removed from the element the option is set on. Examples for when this breakpoint is triggered are calling Node.append
Child() and Node.remove
Child(), calling
ChildNode.remove() or setting Element.innerHTML on one of the subnodes. Attribute Modification Execution pauses when any of the elements' attributes are modified. That m...
...n is set on or the value of one of its attributes is changed. Examples for when this breakpoint is triggered are calling Element.setAttribute(), Element.removeAttribute(), and Element.classList.add(), or setting Element.id. Node Removal Execution pauses if the element the option is set on is removed. Examples for when this breakpoint is triggered are calling Element.remove() or Node.remove
Child() on its parent node. Once you set the breakpoint, go to the Debugger. You can see the breakpoint listed in the right-most panel under DOM Mutation Breakpoints. Click on the icon following the node name to go back to the Page Inspector with the node selected. When you execute the code, the debugger will pause execution when the DOM mutation occurs. In the following example, the selected nod...
...t, go to the Debugger. You can see the breakpoint listed in the right-most panel under DOM Mutation Breakpoints. Click on the icon following the node name to go back to the Page Inspector with the node selected. When you execute the code, the debugger will pause execution when the DOM mutation occurs. In the following example, the selected node (the unordered list) is modified by adding a new
child node. The panel on the right shows that execution is "Paused on DOM mutation" and you, as with any other breakpoint, you can see the call stack and view any Watch expressions you may have set up. Inline variable preview New in Firefox 71, the source pane now gives you an instant preview of the variables on each line of code you've stepped through. See Set a breakpoint > Inline variable previ...
Background Tasks API - Web APIs
We'll use that to determine if we should update the scroll position to ensure that the log stays at the e...
...umber of tasks processed so far; if progressBarElem.value is different from the task number currently being processed (currentTaskNumber), then we update the displayed value of the currently-being-processed task and the current value of the progress bar. Then, if there's text waiting to be added to the log (that is, if logFragment isn't null), we append it to the log element using Element.append
Child() and set logFragment to null so we don't add it again. If the log was scrolled to the end when we started, we make sure it still is. Then we set statusRefreshScheduled to false to indicate that we've handled the refresh and that it's safe to request a new one. Adding text to the log The log() function adds the specified text to the log. Since we don't know at the time log() is called whether ...
... will cache the log text until it's safe to update. Above, in the code for updateDisplay(), you can find the code that actually adds the logged text to the log element when the animation frame is being updated. function log(text) { if (!logFragment) { logFragment = document.createDocumentFragment(); } let el = document.createElement("div"); el.innerHTML = text; logFragment.append
Child(el); } First, we create a DocumentFragment object named logFragment if one doesn't currently exist. This element is a pseudo-DOM into which we can insert elements without immediately changing the main DOM itself. We then create a new <div> element and set its contents to match the input text. Then we append the new element to the end of the pseudo-DOM in logFragment. logFragment will accumulat...
CustomElementRegistry.define() - Web APIs
e('class','info'); // Take attribute content and put it inside the info span var text = this.getAttribute('text'); info.textContent = text; // Insert icon var imgUrl; if(this.hasAttribute('img')) { imgUrl = this.getAttribute('img'); } else { imgUrl = 'img/default.png'; } var img = document.createElement('img'); img.src = imgUrl; icon.append
Child(img); // Create some CSS to apply to the shadow dom var style = document.createElement('style'); style.textContent = '.wrapper {' + 'position: relative;' + '}' + '.info {' + 'font-size: 0.8rem;' + 'width: 200px;' + 'display:...
... 'z-index: 3;' + '}' + 'img {' + 'width: 1.2rem' + '}' + '.icon:hover + .info, .icon:focus + .info {' + 'opacity: 1;' + '}'; // attach the created elements to the shadow dom shadow.append
Child(style); shadow.append
Child(wrapper); wrapper.append
Child(icon); wrapper.append
Child(info); } } // Define the new element customElements.define('popup-info', PopUpInfo); <popup-info img="img/alt.png" text="Your card validation code (CVC) is an extra security feature -- it is the last 3 or 4 numbers on the back...
...ext = node.innerText || node.textContent return text.split(/\s+/g).length; } var count = 'Words: ' + countWords(wcParent); // Create a shadow root var shadow = this.attachShadow({mode: 'open'}); // Create text node and add word count to it var text = document.createElement('span'); text.textContent = count; // Append it to the shadow root shadow.append
Child(text); // Update count when element content changes setInterval(function() { var count = 'Words: ' + countWords(wcParent); text.textContent = count; }, 200) } } // Define the new element customElements.define('word-count', WordCount, { extends: 'p' }); <p is="word-count"></p> Specifications Specification Status Comment HTML Living StandardT...
Document.createElementNS() - Web APIs
This particular example is actually an XUL document with embedded XHTML, however,...
...This particular example is actually an XUL document with embedded XHTML, however, the recommendation still ...
...This particular example is actually an XUL document with embedded XHTML, however, the recommendation still applies. Specifications ...
Document.importNode() - Web APIs
Unlike document.adoptNode(), the original node is not removed from its original document. The imported node is a clone of the original. ...
...eep]); Parameters externalNode The external Node or DocumentFragment to import into the current document. deep Optional A Boolean which controls whether to include the entire DOM subtree of the externalNode in the import. If deep is set to true, then externalNode and all of its descendants are copied. If deep is set to false, then only externalNode is imported -- the new node has no
children. Note: In the DOM4 specification, deep was an optional argument with a default value of true. This default has changed in the latest spec! The new default value is false. Best Practice: Though it's still an optional argument, you should always provide the deep argument for backward and forward compatibility. With Gecko 28.0 (Firefox 28 / Thunderbird 28 / SeaMonkey 2.25 / Firefox...
... The copied importedNode in the scope of the importing document. Note: importedNode's Node.parentNode is null, since it has not yet been inserted into the document tree! Example const iframe = document.querySelector("iframe"); const oldNode = iframe.contentWindow.document.getElementById("myNode"); const newNode = document.importNode(oldNode, true); document.getElementById("container").append
Child(newNode); Notes Before they can be inserted into the current document, nodes from external documents should either be: cloned using document.importNode(); or adopted using document.adoptNode(). Best Practice: Although Firefox doesn't currently enforce this rule, we encourage you to follow this rule for improved future compatibility. For more on the Node.ownerDocument issues, see the W...
How to create a DOM tree - Web APIs
); personElem1.setAttribute("first-name", "eric"); personElem1.setAttribute("middle-initial", "h"); personElem1.setAttribute("last-name", "jung"); var addressElem1 = doc.createElement("address"); addressElem1.setAttribute("street", "321 south st"); addressElem1.setAttribute("city", "denver"); addressElem1.setAttribute("state", "co"); addressElem1.setAttribute("country", "usa"); personElem1.append
Child(addressElem1); var addressElem2 = doc.createElement("address"); addressElem2.setAttribute("street", "123 main st"); addressElem2.setAttribute("city", "arlington"); addressElem2.setAttribute("state", "ma"); addressElem2.setAttribute("country", "usa"); personElem1.append
Child(addressElem2); var personElem2 = doc.createElement("person"); personElem2.setAttribute("first-name", "jed"); personElem2.s...
...); var personElem2 = doc.createElement("person"); personElem2.setAttribute("first-name", "jed"); personElem2.setAttribute("last-name", "brown"); var addressElem3 = doc.createElement("address"); addressElem3.setAttribute("street", "321 north st"); addressElem3.setAttribute("city", "atlanta"); addressElem3.setAttribute("state", "ga"); addressElem3.setAttribute("country", "usa"); personElem2.append
Child(addressElem3); var addressElem4 = doc.createElement("address"); addressElem4.setAttribute("street", "123 west st"); addressElem4.setAttribute("city", "seattle"); addressElem4.setAttribute("state", "wa"); addressElem4.setAttribute("country", "usa"); personElem2.append
Child(addressElem4); var addressElem5 = doc.createElement("address"); addressElem5.setAttribute("street", "321 south avenue"); add...
...ty", "seattle"); addressElem4.setAttribute("state", "wa"); addressElem4.setAttribute("country", "usa"); personElem2.append
Child(addressElem4); var addressElem5 = doc.createElement("address"); addressElem5.setAttribute("street", "321 south avenue"); addressElem5.setAttribute("city", "denver"); addressElem5.setAttribute("state", "co"); addressElem5.setAttribute("country", "usa"); personElem2.append
Child(addressElem5); peopleElem.append
Child(personElem1); peopleElem.append
Child(personElem2); doc.append
Child(peopleElem); See also the DOM chapter of the XUL Tutorial. You can automate the creation of a DOM tree using a JXON reverse algorithm in association with the following JSON representation: { "people": { "person": [{ "address": [{ "@street": "321 south st", "@c...
Example - Web APIs
<html> <head> <title>My Document</title> <script type="text/javascript"> function change() { // document.getElementsByTagName("H1") returns a NodeList of the h1 // elements in the document, and the first is number 0: var header = document.getElementsByTagName("H1").item(0); // the first
Child of the header is a Text node: header.first
Child.data = "A dynamic document"; // now the header is "A dynamic document". ...
...ntsByTagName("H1") returns a NodeList of the h1 // elements in the document, and the first is number 0: var header = document.getElementsByTagName("H1").item(0); // the first
Child of the header is a Text node: header.first
Child.data = "A dynamic document"; // now the header is "A dynamic document". ...
...ment.getElementsByTagName("P").item(0); para.first
Child.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.append
Child(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.append
Child(newElement); } </script> </head> <body> <input type="button" value="Change this document." onclick="change()"> <h1>Header</h1> <p>Paragraph</p> </body> </head> ...
Element: mouseout event - Web APIs
Bubbles Yes Cancelable Yes Interface MouseEvent Event handler property onmouseout Examples The following examples show the use of the mouseout event. ...
... Bubbles Yes Cancelable Yes Interface MouseEvent Event handler property onmouseout Examples The following examples show the use of the mouseout event. ...
... Bubbles Yes Cancelable Yes Interface MouseEvent Event handler property onmouseout Examples The following examples show the use of the mouseout event. ...
Element.outerHTML - Web APIs
rialization of the element and its descendants. Setting the value of outerHTML replaces the element and all of its descendants with a new DOM tree constructed by parsing the specified htmlString. Exceptions SyntaxError An attempt was made to set outerHTML using an HTML string which is not valid. NoModificationAllowedError An attempt was made to set outerHTML on an element which is a direct
child of a Document, such as Document.documentElement. Examples Getting the value of an element's outerHTML property: HTML <div id="d"> <p>Content</p> <p>Further Elaborated</p> </div> Javascript var d = document.getElementById("d"); console.log(d.outerHTML); // The string '<div id="d"><p>Content</p><p>Further Elaborated</p></div>' // is written to the console window Replacing a node by se...
... Notes If the element has no parent element, setting its outerHTML property will not change it or its descendants. Many browsers will also throw an exception. ...
...e console window Replacing a node by setting the outerHTML property: HTML <div id="container"> <div id="d">This is a div.</div> </div> Javascript var container = document.getElementById("container"); var d = document.getElementById("d"); console.log(container.first
Child.nodeName); // logs "DIV" d.outerHTML = "<p>This paragraph replaced the original div.</p>"; console.log(container.first
Child.nodeName); // logs "P" // The #d div is no longer part of the document tree, // the new paragraph replaced it. Notes If the element has no parent element, setting its outerHTML property will not change it or its descendants. Many browsers will also throw an exception. For example: var div = document.createElement("div"); div.outerHTML = "<div class=\"test\">test</div>"; console.log(div.outer...
Element.part - Web APIs
e parts of a shadow DOM, via the ::part pseudo-element. Syntax let elementPartList = element.part Examples The following excerpt is from our shadow-part example. Here the part attribute is used to find the shadow parts, and the part property is then used to change the part identifiers of each tab so the correct styling is applied to the active tab when tabs are clicked. ...
...a the ::part pseudo-element. Syntax let elementPartList = element.part Examples The following excerpt is from our shadow-part example. Here the part attribute is used to find the shadow parts, and the part property is then used to change the part identifiers of each tab so the correct styling is applied to the active tab when tabs are clicked. ...
.... Syntax let elementPartList = element.part Examples The following excerpt is from our shadow-part example. Here the part attribute is used to find the shadow parts, and the part property is then used to change the part identifiers of each tab so the correct styling is applied to the active tab when tabs are clicked. ...
Event.target - Web APIs
bject onto which the event was dispatched. It is different from Event.currentTarget when the event handler is called during the bubbling or capturing phase of the event. Syntax const theTarget = someEvent.target; Value EventTarget Example The event.target property can be used in order to implement event delegation. ...
...r is called during the bubbling or capturing phase of the event. Syntax const theTarget = someEvent.target; Value EventTarget Example The event.target property can be used in order to implement event delegation. ...
...e bubbling or capturing phase of the event. Syntax const theTarget = someEvent.target; Value EventTarget Example The event.target property can be used in order to implement event delegation. ...
EventTarget.addEventListener() - Web APIs
Web Incubator Community Group. Examples Add a simple listener This example demonstrates how to use addEventListener() to watch for mouse clicks on an element. HTML <table id="outside"> <tr><td id="t1">one</td></tr> <tr><td id="t2">two</td></tr> </table> JavaScript // Function to change the content of t2 function modifyText() { const t2 = document.getElementById("t2"); if (t2.first
Child.nodeValue == "three") { t2.first
Child.nodeValue = "two"; } else { t2.first
Child.nodeValue = "three"; } } // Add event listener to table const el = document.getElementById("outside"); el.addEventListener("click", modifyText, false); In this code, modifyText() is a listener for click events registered using addEventListener(). A click anywhere in the table bubbles up to the handler a...
...t(). Result Event listener with anonymous function Here, we'll take a look at how to use an anonymous function to pass parameters into the event listener. HTML <table id="outside"> <tr><td id="t1">one</td></tr> <tr><td id="t2">two</td></tr> </table> JavaScript // Function to change the content of t2 function modifyText(new_text) { const t2 = document.getElementById("t2"); t2.first
Child.nodeValue = new_text; } // Function to add event listener to table const el = document.getElementById("outside"); el.addEventListener("click", function(){modifyText("four")}, false); Notice that the listener is an anonymous function that encapsulates code that is then, in turn, able to send parameters to the modifyText() function, which is responsible for actually responding to the event. Res...
...g to the event. Result Event listener with an arrow function This example demonstrates a simple event listener implemented using arrow function notation. HTML <table id="outside"> <tr><td id="t1">one</td></tr> <tr><td id="t2">two</td></tr> </table> JavaScript // Function to change the content of t2 function modifyText(new_text) { const t2 = document.getElementById("t2"); t2.first
Child.nodeValue = new_text; } // Add event listener to table with an arrow function const el = document.getElementById("outside"); el.addEventListener("click", () => { modifyText("four"); }, false); Result Please note that while anonymous and arrow functions are similar, they have different this bindings. While anonymous (and all traditional JavaScript functions) create their own this bindings, a...
FileSystemEntrySync - Web APIs
. Moving a file over an existing file replaces that existing file. Moving a directory over an existing empty directory replaces that directory. [todo: What if the directory is not empty? ] [todo: Verify ] This is the same method for renaming files. You can keep it in the same location and then define the newName parameter. You cannot do the following: Move a directory inside itself or to any
child at any depth Move an entry into its parent if a name different from its current one isn't provided Move a file to a path occupied by a directory or move a directory to a path occupied by a file Move any element to a path occupied by a directory that is not empty. FileSystemEntrySync moveTo ( in DirectoryEntrySync parent, optional DOMString newName ) raises (FileException); Parameters p...
...se at least one of the characters is reserved or illegal. Examples include a backslash (\), dot (.), and two dots (..). NOT_FOUND_ERR The target directory does not exist. INVALID_MODIFICATION_ERR You tried one of the following disallowed operations: Moving an entry into its parent without changing its name Moving a parent directory into one of its
child directories. [todo: verify ] NO_MODIFICATION_ALLOWED_ERR One of the following is not writable: the source entry, its parent directory, and the target directory. copyTo() Copy an entry to a different location on the file system. You cannot copy an entry inside itself if it is a directory, nor can you copy it into its parent without providing a new name. Directory copie...
...se at least one of the characters is reserved or illegal. Examples include a backslash (\), dot (.), and two dots (..). NOT_FOUND_ERR The target directory does not exist. INVALID_MODIFICATION_ERR You tried one of the following disallowed operations: Moving an entry into its parent without changing its name Moving a parent directory into one of its
child directories. NO_MODIFICATION_ALLOWED_ERR One of the following is not writable: the source entry, its parent directory, and the target directory. QUOTA_EXCEEDED_ERR The operation would cause the application to exceed its storage quota. You can ask for a larger persistent storage, which your user must explicitly grant. For more information, see the article on basic...
HTMLFormElement - Web APIs
ated. Named inputs are added to their owner form instance as properties, and can overwrite native properties if they share the same name (e.g. a form with an input named action will have its action property return that input instead of the form's action HTML attribute). Methods This interface also inherits methods from its parent, HTMLElement. checkValidity() Returns true if the element's
child controls are subject to constraint validation and satisfy those contraints; returns false if some controls do not satisfy their constraints. Fires an event named invalid at any control that does not satisfy its constraints; such controls are considered invalid if the event is not canceled. It is up to the programmer to decide how to respond to false. reportValidity() Returns true if the element...
...ntrols are subject to constraint validation and satisfy those contraints; returns false if some controls do not satisfy their constraints. Fires an event named invalid at any control that does not satisfy its constraints; such controls are considered invalid if the event is not canceled. It is up to the programmer to decide how to respond to false. reportValidity() Returns true if the element's
child controls satisfy their validation constraints. When false is returned, cancelable invalid events are fired for each invalid
child and validation problems are reported to the user. requestSubmit() Requests that the form be submitted using the specified submit button and its corresponding configuration. reset() Resets the form to its initial state. submit() Submits the form to the server. D...
...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. ...
HTMLTableRowElement.insertCell() - Web APIs
You can not use insertCell() to create a new <th> element though. ...
... defaults to -1. Return value newCell is an HTMLTableCellElement that references the new cell. Example This example uses HTMLTableElement.insertRow() to append a new row to a table. We then use insertCell(0) to insert a new cell in the new row. (To be valid HTML, a <tr> must have at least one <td> element.) Finally, we add some text to the cell using Document.createTextNode() and Node.append
Child(). HTML <table id="my-table"> <tr><td>Row 1</td></tr> <tr><td>Row 2</td></tr> <tr><td>Row 3</td></tr> </table> JavaScript function addRow(tableID) { // Get a reference to the table let tableRef = document.getElementById(tableID); // Insert a row at the end of the table let newRow = tableRef.insertRow(-1); // Insert a cell in the row at index 0 let newCell = newRow.insertCe...
... Living Standard Document Object Model (DOM) Level 2 HTML SpecificationThe definition of 'HTMLTableRowElement.insertCell()' in that sp...
MediaDevices.ondevicechange - Web APIs
The fulfillment handler is called when t...
...The fulfillment handler is called when the device list is ready. The list is passed into the fulfillment handler a...
...dia type and the direction the media flows, such as "audioinput" or "videooutput". This line, then, pulls out the type ("audio" or "video") and direction ("input" or "output") so they can be used to construct the string displayed in the list. Once the string is assembled, containing the device's name in bold and the direction in parentheses, it's appended to the appropriate list by calling append
Child() on either audioList or videoList, as appropriate based on the device type. Handling device list changes We call updateDeviceList() in two places. The first is in the getUserMedia() promise's fulfillment handler, to initially fill out the list when the stream is opened. The second is in the event handler for devicechange: navigator.mediaDevices.ondevicechange = function(event) { updateDevic...
Node.normalize() - Web APIs
The Node.normalize() method puts the specified node and all of its sub-tree into a "normalized" form. In a normalized sub-tree, no text nodes in the sub-tree are empty and there are no adjacent text nodes. ...
... The Node.normalize() method puts the specified node and all of its sub-tree into a "normalized" form. In a normalized sub-tree, no text nodes in the sub-tree are empty and there are no adjacent text nodes. ...
...pecified node and all of its sub-tree into a "normalized" form. In a normalized sub-tree, no text nodes in the sub-tree are empty and there are no adjacent text nodes. Syntax element.normalize(); Example let wrapper = document.createElement("div"); wrapper.append
Child( document.createTextNode("Part 1 ") ); wrapper.append
Child( document.createTextNode("Part 2 ") ); // At this point, wrapper.
childNodes.length === 2 // wrapper.
childNodes[0].textContent === "Part 1 " // wrapper.
childNodes[1].textContent === "Part 2 " wrapper.normalize(); // Now, wrapper.
childNodes.length === 1 // wrapper.
childNodes[0].textContent === "Part 1 Part 2 " Specifications Specification Status Comment DOMThe definition of 'Node: normalize' in that specification. Living Standard ...
NodeFilter.acceptNode() - Web APIs
ation algorithm. This method is expected to be written by the user of a NodeFilter. Possible return values are: Constant Description NodeFilter.FILTER_ACCEPT Value returned by the NodeFilter.acceptNode() method when a node should be accepted. NodeFilter.FILTER_REJECT Value to be returned by the NodeFilter.acceptNode() method when a node should be rejected. ...
...ription NodeFilter.FILTER_ACCEPT Value returned by the NodeFilter.acceptNode() method when a node should be accepted. NodeFilter.FILTER_REJECT Value to be returned by the NodeFilter.acceptNode() method when a node should be rejected. The
children of rejected nodes are not visited by the NodeIterator or TreeWalker object; this value is treated as "skip this node and all its
children". NodeFilter.FILTER_SKIP Value to be returned by NodeFilter.acceptNode() for nodes to be skipped by the NodeIterator or TreeWalker object. The
children of skipped nodes are still considered. This is treated as "skip this node but not its
children". The function should return NodeFilter.FILTER_ACCEPT, which causes the TreeWalker to return the node, NodeFilter.FILTER_REJECT, w...
... Living Standard No change from Document Object Model (DOM) Level 2 Traversal and Range Specification Document Object Model (DOM) Level 2 Traversal and Range Specif...
Range.setStart() - Web APIs
Setting the start point below (lower in the document) the end point will result in a collapsed range with the start and end points both set to the specified start position. ...
...ted using Range.surroundContents(). The address contains nine nodes: five text nodes, and four <br> elements. HTML <p id="address">Wyatt Earp<br> 101 E. Main St.<br> Dodge City, KS<br> 67801<br> USA</p> <hr> <p>Nodes in the original address:</p> <ol id="log"></ol> JavaScript const address = document.getElementById('address'); const log = document.getElementById('log'); // Log info address.
childNodes.forEach(node => { const li = document.createElement('li'); li.textContent = `${node.nodeName}, ${node.nodeValue}`; log.append
Child(li); }); // Highlight the street and city const startOffset = 2; // Start at third node: 101 E. Main St. const endOffset = 5; // End at fifth node: Dodge City, KS const range = document.createRange(); range.setStart(address, startOffset); range.setEnd(...
...e.surroundContents(mark); Result Get characters from a text node This example uses the Range.setStart() and Range.setEnd() methods to define the contents of a range. The resulting range contains the first through fifth characters within a text node. HTML <p id="content">0123456789</p> <p id="log"></p> JavaScript const element = document.getElementById('content'); const textNode = element.
childNodes[0]; const range = document.createRange(); range.setStart(textNode, 0); // Start at first character range.setEnd(textNode, 5); // End at fifth character document.getElementById('log').textContent = range; Result Specifications Specification Status Comment DOMThe definition of 'Range.setStart()' in that specification. Living Standard No change. D...
Selection.setBaseAndExtent() - Web APIs
The setBaseAndExtent() method of the Selection interface sets the selection to be a range including all or parts of two specified DOM nodes, and any content located between them. Syntax sel.setBaseAndExtent(anchorNode,anchorOffset,focusNode,focusOffset) Parameters anchorNode The node at the start of the selection. anchorOffset The number of
child nodes from the start of the anchor node that should be excluded from the selection. So for example, if the value is 0 the whole node is included. If the value is 1, the whole node minus the first
child node is included. And so on. focusNode The node at the end of the selection. focusOffset The number of
child nodes from the start of the focus node that should be included in the selection. So for example, if the value is 0 the w...
...And so on. Note: If the focus position appears before the anchor position in the document, the direction of the selection is reversed -- the caret is placed at the beginning of the text rather the end, which matters for any keyboard command that might follow. ...
...before the anchor position in the document, the direction of the selection is reversed -- the caret is placed at the beginning of the text rather the end, which matters for any keyboard command that might follow. For example, Shift + ? would cause the selection to narrow from the beginning rather than grow at the end. Return Value Void. Exceptions If anchorOffset is larger than the number of
child nodes inside anchorNode, or if focusOffset is larger than the number of
child nodes inside focusNode, an IndexSizeError exception is thrown. Examples In this example, we have two paragraphs containing spans, each one containing a single word. The first one is set as the anchorNode and the second is set as the focusNode. We also have an additional paragraph that sits in between the two nodes. N...
Example and tutorial: Simple synth keyboard - Web APIs
kip any that are sharp or flat; for // our purposes we don't need them. Each octave is inserted // into a <div> of class "octave". ...
...ach octave is inserted // into a <div> of class "octave". ...
...ents we care about. ...
Window: unload event - Web APIs
The unload event is fired when the document or a
child resource is being unloaded. Bubbles No Cancelable No Interface Event Event handler property onunload It is fired after: beforeunload (cancelable event) pagehide The document is in the following state: All the resources still exist (img, iframe etc.) Nothing is visible anymore to the end user UI interactions are ineffective (window.open, alert, confirm, etc.) An error won't stop the unloading workflow Please note that the unload event also follows the document tree: parent frame unload will happen before
child frame unload (see example below). Examples <!DOCTYPE html> <html> <head> <title>Parent Frame</title> <script> window.addEventListener('beforeunloa...
...d frame unload (see example below). ...
... <head> <title>Parent Frame</title> <script> window.addEventListener('beforeunload', function(event) { console.log('I am the 1st one.'); }); window.addEventListener('unload', function(event) { console.log('I am the 3rd one.'); }); </script> </head> <body> <iframe src="
child-frame.html"></iframe> </body> </html> Below, the content of
child-frame.html: <!DOCTYPE html> <html> <head> <title>
Child Frame</title> <script> window.addEventListener('beforeunload', function(event) { console.log('I am the 2nd one.'); }); window.addEventListener('unload', function(event) { console.log('I am the 4th and last one...'); }); </script> </head> <body> :) </body> </html> When the par...
Using the aria-activedescendant attribute - Accessibility
This article describes the aria-activedescendant property. Description The aria-activedescendant attribute contains the ID of the currently active
child object that is part of a composite widget within the Document Object Model. It makes do with the overhead of having all or more than one
child focusable. As the name specifies, it helps in managing the current active
child of the composite widget. ...
... Note: Opinions may differ on how assistive technology should handle this technique. The information provided below is one of those opinions and therefore not normative. ...
... Note: Opinions may differ on how assistive technology should handle this technique. The information provided below is one of those opinions and therefore not normative. ...
ARIA Test Cases - Accessibility
Orca - - - - Img Tiled image Expected AT Behavior: Screen readers should announce the image is a single graphic element along with its associated label, even though it is built from numerous sub-images. Markup used: role="img" Notes: If the screen reader does not provide the required behavior, then most likely it is a browser issue, for not respecting "
Children Presentational: true" for that role. The accessible hierarchy should contain no
children for the img. Results: AT Firefox IE Opera Safari JAWS 9 - - n/a n/a JAWS 10 - - - - VoiceOver (Leopard) n/a n/a - fail Window-Eyes - - - - NVDA - n/a - - Zoom (Leopard) ...
...ole and position of the slider. When not in a virtual buffer mode, the user can control the slider using keys such as the arrow keys, home and end. In virtual buffer mode, the slider exists in the virtual buffer as a single entity, and any images or text that create the sliders appearance are not presented to the user separately. ...
...n not in a virtual buffer mode, the user can control the slider using keys such as the arrow keys, home and end. In virtual buffer mode, the slider exists in the virtual buffer as a single entity, and any images or text that create the sliders appearance are not presented to the user separately. ...
ARIA: row role - Accessibility
nheaders, or rowheaders within a static tabular structure. Using native HTML <tr> elements, whenever possible, is strongly encouraged. To create an ARIA row, add role="row" to the container element. That row should be nested within a grid, table or treegrid. A group of rows can be nested within a grid, table or treegrid directly, or within a rowgroup in one of those containers. Each row contains
child cells. These cells can be of different types, depending on whether they are column or row headers, or grid or regular cells. A row can contain a number of attributes clarifying the row's role, including aria-colindex, aria-level, aria-rowindex, and aria-selected. If the row is within a treegrid, rows can include the aria-expanded attribute, using the attribute to indicate the present status. Th...
...ia-selected attribute can take one of three values, or be omitted: aria-selected="true: Row is currently selected aria-selected="false": Row is not currently selected. aria-selected="undefined" or the attribute is missing: The row is not selectable. aria-colindex attribute The aria-colindex attribute is only needed if columns are hidden from the DOM. It is generally placed on row
children, rather than on the row itself. If the columns displayed are contiguous, then it can be placed on the row. The attribute takes as its value an integer between 1 and the total number of columns within the table, grid or treegrid. When placed on the row, the aria-colindex defines an element's column index or position with respect to the total number of columns within a row. For example, in ...
...defines an element's column index or position with respect to the total number of columns within a row. For example, in a table with 15 columns, and columns 4, 5, and 6 are in the DOM, aria-colindex="4" could be set on every row. If the set of columns which is present in the DOM is not contiguous, or if there are cells spanning more than one row or column, put the aria-colindex on all of the
children of each row instead of on the row itself. If all the columns are in the DOM, this attribute is not necessary. aria-rowindex attribute The aria-rowindex attribute is only needed if rows are hidden from the DOM, to indicate which row, in the list of total rows, is being read. The attribute, placed with a unique value on each row, takes as its value an integer between 1 and the total numb...
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. Description The listbox role is used to identify an element that creates a list from which a user may select one or more static items, similar to the HTML <select> element. Unlike <select>, a listbox can contain images. Each
child of a listbox should have a role of option. 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 lis...
... of the most recently interacted with option, regardless of whether that option has an aria-selected value of true or not. Takes the value of only one id, even in a multiselectable listbox. If the id does not refer to a DOM descendant of the listbox, then that id must be included among the IDs in the aria-owns attrubute. aria-owns This is a space-separated list of element IDs which are not DOM
child elements of the listbox. IDs listed here cannot also be listed in aria-owns attributes of any other elements. aria-multiselectable Include and set to true if the user can select more than one option. If set to true, every selectable option should have an aria-selected attribute included and set to true or false. Options which are not selectable should not have the aria-selected attribute. If...
... To be keyboard accessible, authors should manage focus of all descendants of this role. It is recommended that authors use different styling for the selection when the list is not focused, e.g. a non-active selection is often shown with a lighter background colour. If the listbox is not part of another widget, it should have the aria-labelledby property set. If one or more entries are not DOM
children of listbox, additional aria-* properties will need to be set (see ARIA Best Practices). If there is a valid reason to expand the listbox, the combobox role may be more appropriate. Specifications Specification Status Accessible Rich Internet Applications (WAI-ARIA) 1.1The definition of 'ARIA listbox role' in that specification. Recommendation WAI-ARIA Autho...
:-moz-last-node - CSS: Cascading Style Sheets
Note: Any whitespace at the end of an element is ignored for the determination of :-moz-last-node. ...
... Note: Any whitespace at the end of an element is ignored for the determination of :-moz-last-node. ...
... Note: Any whitespace at the end of an element is ignored for the determination of :-moz-last-node. ...
:host() - CSS: Cascading Style Sheets
ample</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.append
Child(style); shadowRoot.append
Child(span); style.textContent = 'span:hover { text-decoration: underline; }' + ':host-context(h1) { font-style: italic; }' + ':host-context(h1):after { content: " - no links in headers!" }' + ':host-context(article, aside) { color: gray; }' + ':host(.footer) { color : red; }' + ...
...eds to be set to true). ...
...om.webcomponents.shadowdom.enabled preference (needs to be set to true). ...
@supports - CSS: Cascading Style Sheets
gin property considers 5% 5% valid: @supports (transform-origin: 5% 5%) {} Function syntax The second basic supports condition is a supports function, the syntax for these is supported by all browsers, but the functions themselves are still being standardized. selector() Tests if the browser supports the tested selector syntax. The following example returns true if the browser supports the
child combinator: @supports selector(A > B) {} The not operator The not operator can precede any expression to create a new expression, resulting in the negation of the original one. The following example returns true if the browser's transform-origin property doesn't consider 10em 10em 10em valid: @supports not (transform-origin: 10em 10em 10em) {} As with any operator, the not operator can be ap...
... of a selector (eg. :is()) /* This rule won't be applied in browsers which don't support :is() */ :is(ul, ol) > li { ... /* CSS applied when the :is(...) selector is supported */ } @supports not selector(:is(a, b)) { /* Fallback for when :is() is unsupported */ ul > li, ol > li { ... ...
.../ } @supports not selector(:is(a, b)) { /* Fallback for when :is() is unsupported */ ul > li, ol > li { ... /* The above expanded for browsers which don't support :is(...) */ } } @supports selector(:nth-
child(1n of a, b)) { /* This rule needs to be inside the @supports block, otherwise it will be partially applied in browsers which don't support the `of` argument of :nth-
child(...) is supported */ :is(:nth-
child(1n of ul, ol) a, details > summary) { ... /* CSS applied when the :is(...) selector and the `of` argument of :nth-
child(...) are both supported */ } } Specifications Specification Status Comment CSS Conditional Rules Module Level 4The definition of '@supports' in that specification. Editor's Draft Adds the...
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
This means that you can set the property individually, by using align-self on a grid item. In this next example, I am using th...
...This means that you can set the property individually, by using align-self on a grid item. In this next example, I am using the align-self property, to demonstrate the different alignment values. ...
... items which have an intrinsic aspect ratio, in this case they behave as start. The reason for this, is that if items with an aspect ratio are set to stretch, this default would distort them. This behavior has now been clarified in the specification, with browsers yet to implement the correct behavior. Until that happens, you can ensure that items do not stretch, such as images, which are direct
children of the grid, by setting align-self and justify-self to start. This will mimic the correct behavior once implemented. Justifying Items on the Inline Axis As align-items and align-self deal with the alignment of items on the block axis, justify-items and justify-self do the same job on the inline axis. The values you can choose from are the same as for align-self. auto normal start end ...
Subgrid - CSS: Cascading Style Sheets
fication includes a subgrid value for grid-template-columns and grid-template-rows. This guide details what subgrid does, and gives some use cases and design patterns that are solved by the feature. Important: This feature is shipped in Firefox 71, which is currently the only browser to implement subgrid. Introduction to subgrid When you add display: grid to a grid container, only the direct
children become grid items and can then be placed on the grid that you have created. The
children of these items display in normal flow. You can "nest" grids by making a grid item a grid container. These grids however are independent of the parent grid and of each other, meaning that they do not take their track sizing from the parent grid. This makes it difficult to line nested grid items up with the...
...omponent that may be placed in different positions on the main grid, knowing that the line numbers on the component will always be the same. Subgrid for rows The next example is the same setup, however we are using subgrid as the value of grid-template-rows and defining explicit column tracks. So the column tracks behave as a regular nested grid, but the rows are tied to the two tracks that the
child spans. A subgrid in both dimensions You can of course define both rows and columns as a subgrid, as in the example below. This means that your subgrid is tied in both dimensions to the number of tracks on the parent. No implicit grid in a subgridded dimension If you need to autoplace items, and do not know how many items you will have, take care when creating a subgrid, as it will prevent...
...ple below. This means that your subgrid is tied in both dimensions to the number of tracks on the parent. No implicit grid in a subgridded dimension If you need to autoplace items, and do not know how many items you will have, take care when creating a subgrid, as it will prevent additional rows being created to hold those items. Take a look at the next example -- it uses the same parent and
child grid as in the example above, however inside the subgrid I have twelve items trying to autoplace into ten grid cells. As the subgrid is on both dimensions there is nowhere for the extra two items to go and so they go into the last track of the grid, as defined in the specification. If we remove the grid-template-rows value we enable regular creation of implicit tracks and, although these won't...
CSS selectors - CSS: Cascading Style Sheets
Basic selectors Universal selector Selects all elements. Optionally, it may be restricted to a specific namespace or to all namespaces. Syntax: * ns|* *|* Example: * will match all the elements of the document. Type selector Selects all elements that have the given node name. Syntax: elementname Example: input will match any <input> element. Class selector Selects all elements that have the given class attribute. ...
.... Grouping selectors Selector list The , is a grouping method, it selects all the matching nodes. Syntax: A, B Example: div, span will match both <span> and <div> elements. Combinators Descendant combinator The (space) combinator selects nodes that are descendants of the first element. Syntax: A B Example: div span will match all <span> elements that are inside a <div> element.
Child combinator The > combinator selects nodes that are direct
children of the first element. Syntax: A > B Example: ul > li will match all <li> elements that are nested directly inside a <ul> element. General sibling combinator The ~ combinator selects siblings. This means that the second element follows the first (though not necessarily immediately), and both share the same parent. Syntax: A ~...
... state, linguistic and UI pseudo-classes, modifier for ASCII case-sensitive and case-insensitive attribute value selection. Selectors Level 3 Recommendation Added the ~ general sibling combinator and tree-structural pseudo-classes. Made pseudo-elements use a :: double-colon prefix. Additional attribute selectors CSS Level 2 (Revision 1) Recommendation Added the >
child and + adjacent sibling combinators. Added the universal and attribute selectors. CSS Level 1 Recommendation Initial definition. See the pseudo-class and pseudo-element specification tables for details on those. ...
box-ordinal-group - CSS: Cascading Style Sheets
This is a property of the original CSS Flexible Box Layout Module draft, and has been replaced by a newer standard. See flexbox for information about the current standard. The box-ordinal-group CSS property assigns the flexbox's
child elements to an ordinal group. /* <integer> values */ box-ordinal-group: 1; box-ordinal-group: 5; /* Global values */ box-ordinal-group: inherit; box-ordinal-group: initial; box-ordinal-group: unset; Ordinal groups may be used in conjunction with the box-direction property to control the order in which the direct
children of a box appear. 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 (f...
...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. In the reverse direction, the ordinal groups are examined in the same order, except the elements appear reversed. Syntax The box-ordinal-group property is specified as any positive <integer>. ...
...nts appear reversed. Syntax The box-ordinal-group property is specified as any positive <integer>. Formal definition Initial value1Applies to
children of box elementsInheritednoComputed valueas specifiedAnimation typediscrete Formal syntax <integer> Examples Basic usage example In an older version of the spec, box-ordinal-group was included to allow you to change the display order of flex
children inside a flex container: article:nth-
child(1) { -webkit-box-ordinal-group: 2 -moz-box-ordinal-group: 2 box-ordinal-group: 2 } article:nth-
child(2) { -webkit-box-ordinal-group: 1 -moz-box-ordinal-group: 1 box-ordinal-group: 1 } The modern flexbox equivalent is order. Specifications Not part of any standard. ...
box-pack - CSS: Cascading Style Sheets
property is specified as one of the keyword values listed below. Values start The box packs contents at the start, leaving any extra space at the end. center The box packs contents in the center, dividing any extra space equally between the start and the end. end The box packs contents at the end, leaving any extra space at the start. justify The space is divided evenly in-between each
child, with none of the extra space placed before the first
child or after the last
child. If there is only one
child, treat the value as if it were start. Notes The edge of the box designated the start for packing purposes depends on the box's orientation and direction: Normal Reverse Horizontal left right Vertical top bottom The edge opposite t...
...efinition Initial valuestartApplies toelements with a CSS display value of -moz-box, -moz-inline-box, -webkit-box or -webkit-inline-boxInheritednoComputed valueas specifiedAnimation typediscrete Formal syntax start | center | end | justify Examples div.example { border-style: solid; display: -moz-box; /* Mozilla */ display: -webkit-box; /* WebKit */ /* Make this box taller than the
children, so there is room for the box-pack */ height: 300px; /* Make this box wide enough to show the contents are centered horizontally */ width: 300px; /*
Children should be oriented vertically */ -moz-box-orient: vertical; /* Mozilla */ -webkit-box-orient: vertical; /* WebKit */ /* Align
children to the horizontal center of this box */ -moz-box-align: center; /* Mozilla ...
... 300px; /* Make this box wide enough to show the contents are centered horizontally */ width: 300px; /*
Children should be oriented vertically */ -moz-box-orient: vertical; /* Mozilla */ -webkit-box-orient: vertical; /* WebKit */ /* Align
children to the horizontal center of this box */ -moz-box-align: center; /* Mozilla */ -webkit-box-align: center; /* WebKit */ /* Pack
children to the bottom of this box */ -moz-box-pack: end; /* Mozilla */ -webkit-box-pack: end; /* WebKit */ } div.example p { /* Make
children narrower than their parent, so there is room for the box-align */ width: 200px; } <div class="example"> <p>I will be second from the bottom of div.example, centered horizontally.</p> <p>I will be on the bottom of div.exam...
pointer-events - CSS: Cascading Style Sheets
element is not the target of pointer events, the value none instructs the pointer event to go "through" the element and target whatever is "underneath" that element instead. Note that preventing an element from being the target of pointer events by using pointer-events does not necessarily mean that pointer event listeners on that element cannot or will not be triggered. ...
...one instructs the pointer event to go "through" the element and target whatever is "underneath" that element instead. Note that preventing an element from being the target of pointer events by using pointer-events does not necessarily mean that pointer event listeners on that element cannot or will not be triggered. ...
...atever is "underneath" that element instead. Note that preventing an element from being the target of pointer events by using pointer-events does not necessarily mean that pointer event listeners on that element cannot or will not be triggered. If one of the element's
children has pointer-events explicitly set to allow that
child to be the target of pointer events, then any events targeting that
child will pass through the parent as the event travels along the parent chain, and trigger event listeners on the parent as appropriate. Of course any pointer activity at a point on the screen that is covered by the parent but not by the
child will not be caught by either the
child or the parent (it will go "through" the parent and target whatever is underneath). Elements with pointer-events: none wi...
scroll-margin-inline-end - CSS: Cascading Style Sheets
flex; box-sizing: border-box; border: 1px solid #000; scroll-snap-type: x mandatory; } The main parts relevant to the scroll snapping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point. ...
...ates that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point. 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 right-hand edges (the "ends" along the x axis, in our case) are the designated snap points. ...
...; 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 right-hand edges (the "ends" along the x axis, in our case) are the designated snap points. 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>. Result Try it for yourself: Specifications ...
scroll-margin-inline-start - CSS: Cascading Style Sheets
flex; box-sizing: border-box; border: 1px solid #000; scroll-snap-type: x mandatory; } The main parts relevant to the scroll snapping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point. ...
...es that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point. 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 left-hand edges (the "starts" along the x axis, in our case) are the designated snap points. ...
...ustify-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 left-hand edges (the "starts" along the x axis, in our case) are the designated snap points. 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>. Result Try it for yourself: Specifica...
scroll-margin-inline - CSS: Cascading Style Sheets
flex; box-sizing: border-box; border: 1px solid #000; scroll-snap-type: x mandatory; } The main parts relevant to the scroll snapping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point. ...
...ates that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point. 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 right-hand edges (the "ends" along the x axis, in our case) are the designated snap points. ...
...; 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 right-hand edges (the "ends" along the x axis, in our case) are the designated snap points. 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>. Note: Here we are setting scroll-margin on the start and...
scroll-margin - CSS: Cascading Style Sheets
flex; box-sizing: border-box; border: 1px solid #000; scroll-snap-type: x mandatory; } The main parts relevant to the scroll snapping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point. ...
...es that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point. 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 left-hand edges (the "starts" along the x axis, in our case) are the designated snap points. ...
...ustify-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 left-hand edges (the "starts" along the x axis, in our case) are the designated snap points. 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>. Note: Here we are setting scroll-margin on all sides at once, but only the start e...
scroll-snap-coordinate - CSS: Cascading Style Sheets
<div> <p>At coordinate (25, 0)</p> <div class="scrollContainer coordinate25"> <div>1</div> <div>2</div> <div>3</div> </div> </div> <div> <p>At coordinate (50, 0)</p> <div class="scrollContainer coordinate50"> <div>1</div> <div>2</div> <div>3</div> </div> </div> </div> CSS #container { display: flex; } #container > div:nth-
child(-n+2) { margin-right: 20px; } .scrollContainer { width: 100px; overflow: auto; white-space: nowrap; scroll-snap-type: mandatory; font-size: 0; } .scrollContainer > div { width: 100px; height: 100px; display: inline-block; line-height: 100px; text-align: center; font-size: 50px; } .coordinate0 > div { scroll-snap-coordinate: 0 0; } .coordinate25 > div { scroll-snap-...
... ...
... ...
scroll-snap-destination - CSS: Cascading Style Sheets
<div> <p>At coordinate (25, 0)</p> <div class="scrollContainer destination25"> <div>1</div> <div>2</div> <div>3</div> </div> </div> <div> <p>At coordinate (50, 0)</p> <div class="scrollContainer destination50"> <div>1</div> <div>2</div> <div>3</div> </div> </div> </div> CSS #container { display: flex; } #container > div:nth-
child(-n+2) { margin-right: 20px; } .scrollContainer { width: 100px; overflow: auto; white-space: nowrap; scroll-snap-points-x: repeat(100%); scroll-snap-type: mandatory; scroll-snap-destination: 20px 0; font-size: 0; } .destination0 { scroll-snap-destination: 0 0; } .destination25 { scroll-snap-destination: 25px 0; } .destination50 { scroll-snap-destination: 50px 0; } .scrol...
... ...
... ...
scroll-snap-stop - CSS: Cascading Style Sheets
LTR </div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </div> <div class="container x proximity-scroll-sn...
...LTR </div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </div> <div class="container x proximity-scroll-snapping" dir="ltr"> <div>X Proximity LTR</div> <div>2</div> <div>3</div> <div>4<...
...} .x.container > div { line-height: 128px; font-size: 64px; width: 100%; height: 128px; } .y.container > div { line-height: 256px; font-size: 128px; width: 256px; height: 256px; } /* appearance fixes */ .y.container > div:first-
child { line-height: 1.3; font-size: 64px; } /* coloration */ .container > div:nth-
child(even) { background-color: #87EA87; } .container > div:nth-
child(odd) { background-color: #87CCEA; } HTML <div class="container x mandatory-scroll-snapping" dir="ltr"> <div>X Mand. LTR </div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </div> <div class="container x proximity-scroll-snapping" dir="ltr"> <div>X Proximity LTR</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </div> <div class="container y mandatory-scro...
Event reference
A pointing device is moved onto the element that has the listener attached. mouseleave A pointing device is moved off the element that has the listener attached. mousemove A pointing device is moved over an element (fired continuously as the mouse moves). mouseover A pointing device is moved onto the element that has the listener attached or onto one of its
children. mouseout A pointing device is moved off the element that has the listener attached or off one of its
children. mouseup A pointing device button is released over an element. pointerlockchange The pointer was locked or released. pointerlockerror It was impossible to lock the pointer for technical reasons or because the permission was denied. ...
...eEvent DOM L3 Removed The name of an element changed (use mutation observers instead). DOMFocusIn FocusEvent DOM L3 An element has received focus (use focus or focusin instead). DOMFocusOut FocusEvent DOM L3 An element has lost focus (use blur or focusout instead). DOMNodeInserted MutationEvent DOM L3 A node has been added as a
child of another node (use mutation observers instead). DOMNodeInsertedIntoDocument MutationEvent DOM L3 A node has been inserted into the document (use mutation observers instead). DOMNodeRemoved MutationEvent DOM L3 A node has been removed from its parent node (use mutation observers instead). DOMNodeRemovedFromDocument MutationEvent DOM L3 ...
...d onto the element that has the listener attached. mouseleave MouseEvent DOM L3 A pointing device is moved off the element that has the listener attached. mousemove MouseEvent DOM L3 A pointing device is moved over an element. mouseout MouseEvent DOM L3 A pointing device is moved off the element that has the listener attached or off one of its
children. mouseover MouseEvent DOM L3 A pointing device is moved onto the element that has the listener attached or onto one of its
children. mouseup MouseEvent DOM L3 A pointing device button is released over an element. nomatch SpeechRecognitionEvent Web Speech API The speech recognition service returns a final result with no significant recogni...
Block formatting context - Developer guides
y created by the elements with display: table, table-row, table-row-group, table-header-group, table-footer-group (which is the default for HTML tables, table rows, table bodies, table headers, and table footers, respectively), or inline-table. Block elements where overflow has a value other than visible. display: flow-root. Elements with contain: layout, content, or paint. Flex items (direct
children of the element with display: flex or inline-flex) if they are neither flex nor grid nor table containers themselves. Grid items (direct
children of the element with display: grid or inline-grid) if they are neither flex nor grid nor table containers themselves. Multicol containers (elements where column-count or column-width isn't auto, including elements with column-count: 1). column-span:...
... floats rather than changing the layout, because an element that establishes a new block formatting context will: contain internal floats. exclude external floats. suppress margin collapsing. Note: a Flex/Grid container(display: flex/grid/inline-flex/inline-grid) establishes a new Flex/Grid formatting context, which is similar to block formatting context except layout. There's no floating
children avaliable inside a flex/grid container, but exclude external floats and suppress margin collapsing still works. Examples Contain internal floats Make float content and alongside content the same height. Let's have a look at a couple of these in order to see the effect creating a new BFC. In the following example, we have a floated element inside a <div> with a border applied. The conten...
...oat. As explained in the guide to in-flow and out of flow elements, the float has been taken out of flow so the background and border of the <div> only contain the content and not the float. using overflow: auto Setting overflow: auto or set other values than the initial value of overflow: visible created a new BFC containing the float. Our <div> now becomes a mini-layout inside our layout. Any
child element will be contained inside it. The problem with using overflow to create a new BFC is that the overflow property is meant for telling the browser how you want to deal with overflowing content. There are some occasions in which you will find you get unwanted scrollbars or clipped shadows when you use this property purely to create a BFC. In addition, it is potentially not readable for a fut...
<colgroup> - HTML: Hypertext Markup Language
ctive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Content categories None. Permitted content If the span attribute is present: none, it is an empty element. If the attribute is not present: zero or more <col> element Tag omission The start tag may be omitted, if it has a <col> element as its first
child and if it is not preceded by a <colgroup> whose end tag has been omitted. The end tag may be omitted, if it is not followed by a space or a comment. Permitted parents A <table> element. The <colgroup> must appear after any optional <caption> element but before any <thead>, <th>, <tbody>, <tfoot> and <tr> element. Implicit ARIA role No corresponding role Permit...
... If this attribute is not set, the left value is assumed. The descendant <col> elements may override this value using their own align attribute. Note: Do not try to set the text-align property on a selector giving a <colgroup> element. Because <td> elements are not descendant of the <colgroup> element, they won't inherit it. If the table doesn't use a colspan attribute, use one td:nth-
child(an+b) CSS selector per column, where a is the total number of the columns in the table and b is the ordinal position of this column in the table. Only after this selector the text-align property can be used. If the table does use a colspan attribute, the effect can be achieved by combining adequate CSS attribute selectors like [colspan=n], though this is not trivial. bgcolor The bac...
...ble; middle, which will center the text in the cell; and top, which will put the text as close to the top of the cell as it is possible. Note: Do not try to set the vertical-align property on a selector giving a <colgroup> element. Because <td> elements are not descendant of the <colgroup> element, they won't inherit it. If the table doesn't use a colspan attribute, use the td:nth-
child(an+b) CSS selector per column, where a is the total number of the columns in the table and b is the ordinal position of the column in the table. Only after this selector the vertical-align property can be used. If the table does use a colspan attribute, the effect can be achieved by combining adequate CSS attribute selectors like [colspan=n], though this is not trivial. Examples Please...
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
media condition-length pairs. This information is used by the browser to determine, before laying the page out, which image defined in srcset to use. Please note that sizes will have its effect only if width dimension descriptors are provided with srcset instead of pixel ratio values (200w instead of 2x for example). The sizes attribute has an effect only when the <source> element is the direct
child of a <picture> element. src Required for <audio> and <video>, address of the media resource. The value of this attribute is ignored when the <source> element is placed inside a <picture> element. srcset A list of one or more strings separated by commas indicating a set of possible images represented by the source for the browser to use. Each string is composed of: One URL specifying ...
...s 1x. Each string in the list must have at least a width descriptor or a pixel density descriptor to be valid. Among the list, there must be only one string containing the same tuple of width descriptor and pixel density descriptor. The browser chooses the most adequate image to display at a given point of time. The srcset attribute has an effect only when the <source> element is the direct
child of a <picture> element. type The MIME media type of the resource, optionally with a codecs parameter. If the type attribute isn't specified, the media's type is retrieved from the server and checked to see if the user agent can handle it; if it can't be rendered, the next <source> is checked. If the type attribute is specified, it's compared against the types the user agent can present, and...
...t be rendered, the next <source> is checked. If the type attribute is specified, it's compared against the types the user agent can present, and if it's not recognized, the server doesn't even get queried; instead, the next <source> element is checked at once. When used in the context of a <picture> element, the browser will fall back to using the image specified by the <picture> element's <img>
child if it is unable to find a suitable image to use after examing every provided <source>. Usage notes The <source> element is an empty element (or void element), which means that it not only has no content but also has no closing tag. That is, you never use "</source>" in your HTML. For information about image formats supported by web browsers and guidance on selecting appropriate formats to use,...
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
e <details> element. Implicit ARIA role button Permitted ARIA roles No role permitted DOM interface HTMLElement Attributes This element only includes the global attributes. Usage notes The <summary> element's contents can be any heading content, plain text, or HTML that can be used within a paragraph. ...
... Default style Per the HTML specification, the default style for <summary> elements includes display: list-item. ...
...ding 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. The <h4> will have its role removed and thus will not be treated as a heading for these users. HTML in summaries This example adds some semantics to the <summary> element to indicate the label as important: <details open> <summary><strong>Overview</strong></summary> <ol> <li>Cash on hand:...
Object - JavaScript
s, name); this.title = title; }; Employee.prototype = Object.create(Person.prototype); Employee.prototype.constructor = Employee; //If you don't set Object.prototype.constructor to Employee, //it will take prototype.constructor of Person (parent). //To avoid that, we set the prototype.constructor to Employee (
child). Employee.prototype.greet = function() { if (this.canTalk) { console.log('Hi, I am ' + this.name + ', the ' + this.title); } }; var Customer = function(name) { Person.call(this, name); }; Customer.prototype = Object.create(Person.prototype); Customer.prototype.constructor = Customer; //If you don't set Object.prototype.constructor to Customer, ...
...e) { Person.call(this, name); }; Customer.prototype = Object.create(Person.prototype); Customer.prototype.constructor = Customer; //If you don't set Object.prototype.constructor to Customer, //it will take prototype.constructor of Person (parent). //To avoid that, we set the prototype.constructor to Customer (
child). var Mime = function(name) { Person.call(this, name); this.canTalk = false; }; Mime.prototype = Object.create(Person.prototype); Mime.prototype.constructor = Mime; //If you don't set Object.prototype.constructor to Mime, //it will take prototype.constructor of Person (parent). //To avoid that, we set the prototype.const...
...function(name) { Person.call(this, name); this.canTalk = false; }; Mime.prototype = Object.create(Person.prototype); Mime.prototype.constructor = Mime; //If you don't set Object.prototype.constructor to Mime, //it will take prototype.constructor of Person (parent). //To avoid that, we set the prototype.constructor to Mime (
child). var bob = new Employee('Bob', 'Builder'); var joe = new Customer('Joe'); var rg = new Employee('Red Green', 'Handyman'); var mike = new Customer('Mike'); var mime = new Mime('Mime'); bob.greet(); // Hi, I am Bob, the Builder joe.greet(); // Hi, I am Joe rg.greet(); // Hi, I am Red Green, the Handyman mike.greet(); // Hi, I am Mike mime.greet(); Specifications Specification ...
MathML attribute reference - MathML
spacing <mtable> A length value specifing the minimum space between a label and the adjacent cell in the row. minsize <mo> The minimum size of the operator. movablelimits <mo> Specifies whether attached under- and overscripts move to sub- and superscript positions. notation <menclose> A list of notations, separated by white space, to apply to the
child elements. numalign <mfrac> The alignment of the numerator over the fraction. open <mfenced> A string for the opening delimiter. Unimplemented overflow <math> If an expression is too long to fit in the allowed width, this attribute sets the preferred handling. Unimplemented position <msgroup>, <msrow>, <mscarries>, <msline> ro...
... scriptlevel <mstyle> Controls mostly the font-size. The higher the scriptlevel, the smaller the font size. scriptminsize <mstyle> Specifies a minimum font size allowed due to changes in scriptlevel. scriptsizemultiplier <mstyle> Specifies the multiplier to be used to adjust font size due to changes in scriptlevel. selection <maction> The
child element which is addressed by the action. separator <mo> There is no visual effect for this attribute, but it specifies whether the operator is a separator (such as commas). separators <mfenced> A sequence of zero or more characters to be used for different separators. Unimplemented shift <msgroup> Unimplemented side <mtable> Specifies ...
...supscriptshift <mmultiscripts>, <msup>, <msubsup> The minimum space by which to shift the superscript above the baseline of the expression. symmetric <mo> If stretchy is true, this attribute specifies whether the operator should be vertically symmetric around the imaginary math axis (centered fraction line). voffset <mpadded> Sets the vertical position of the
child content. width <mglyph>, <mpadded>, <mspace>, <mtable> Specifies the desired width. See lengths for possible values. xlink:href All Can be used to set a hyperlink to a specfied URI. However, authors are encouraged to use the href attribute instead. xmlns <math> Specifies the URI for the MathML namespace (http://www.w3.org/1998/Math/MathML) ...
<semantics> - MathML
e semantic mathematical meaning and to make expressions understandable to computer algebra systems. 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. ...
...e <semantics> element acts as a container element associating annotations and must have
child elements (it will raise an invalid markup error otherwise). The <annotation> element is the container element containing semantic information in a non-XML format, whereas the <annotation-xml> element contains content in an XML format, e.g. Content MathML or OpenMath. The rules of determining the visible
child in a <semantics> element are the following: If no rule other rule applies: By default only the first
child is rendered, which is supposed to be presentation markup. If the first
child is a presentation MathML element other than <annotation> or <annotation-xml>, render the first
child. ...
... 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". ...
MathML documentation index - MathML
ference, MathML:Element, MathML:Enlivening Expressions The following example uses the "toggle" actiontype: 11 <math> MathML, MathML Reference, MathML:Element The top-level element in MathML is <math>. Every valid MathML instance must be wrapped in <math> tags. 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. 12 <menclose> MathML, MathML Reference, MathML:Element, MathML:General Layout Schemata The MathML <menclose> element renders its content inside an enclosing notation specified by the notation attribute. 13 <merror> MathML, MathML Reference, MathML:Element, MathML:General Layout Schemata The MathML <merror> element is used to display conten...
...an identifier such as function names, variables or symbolic constants. You can also have arbitrary text in it to mark up terms. 18 <mlabeledtr> MathML, MathML Reference, MathML:Element, MathML:Tabular Math The MathML <mlabeledtr> element is used to represent a label in a row either on the left or on the right side (determined using the side attribute on the <mtable> element).
Child elements of <mlabeledtr> must be <mtd> elements. The first
child is the label whereas all other
children are representing row contents and are treated identically to
children of <mtr> elements. 19 <mmultiscripts> MathML, MathML Reference, MathML:Element, MathML:Script and Limit Schemata The MathML <mmultiscripts> element allows you to create tensor-like objects. In a descript...
...:Element, MathML:General Layout Schemata The MathML <msqrt> element is used to display square roots (no index is displayed). The square root accepts only one argument, which leads to the following syntax: <msqrt> base </msqrt>. 30 <mstyle> MathML, MathML Reference, MathML:Element, MathML:General Layout Schemata The MathML <mstyle> element is used change the style of its
children. It accepts all attributes of all MathML presentation elements with some exceptions and additional attributes listed below. 31 <msub> MathML, MathML Reference, MathML:Element, MathML:Script and Limit Schemata The MathML <msub> element is used to attach a subscript to an expression. 32 <msubsup> MathML, MathML Reference, MathML:Element, MathML:Script and Limi...
Populating the page: how browsers work - Web Performance
alues. If the document is well-formed, parsing it is straightforward and faster. The parser parses tokenized input into the document, building up the document tree. The DOM tree describes the content of the document. The <html> element is the first tag and root node of the document tree. The tree reflects the relationships and hierarchies between different tags. Tags nested within other tags are
child nodes. The greater the number of DOM nodes, the longer it takes to construct the DOM tree. When the parser finds non-blocking resources, such as an image, the browser will request those resources and continue parsing. Parsing can continue when a CSS file is encountered, but <script> tags--particularly those without an async or defer attribute--block rendering, and pause the parsing of HTML. Th...
... the CSSOM The second step in the critical rendering path is processing CSS and building the CSSOM tree. The CSS object model is similar to the DOM. The DOM and CSSOM are both trees. They are independent data structures. The browser converts the CSS rules into a map of styles it can understand and work with. The browser goes through each rule set in the CSS, creating a tree of nodes with parent,
child, and sibling relationships based on the CSS selectors. As with HTML, the browser needs to convert the received CSS rules into something it can work with. Hence, it repeats the HTML-to-object process, but for the CSS. The CSSOM tree includes styles from the user agent style sheet. The browser begins with the most general rule applicable to a node and recursively refines the computed styles by ap...
...ng performance by painting portions of the screen on the GPU instead of the CPU, freeing up the main thread. Style The third step in the critical rendering path is combining the DOM and CSSOM into a render tree.The computed style tree, or render tree, construction starts with the root of the DOM tree, traversing each visible node. Tags that aren't going to be displayed, like the <head> and its
children and any nodes with display: none, such as the script { display: none; } you will find in user agent stylesheets, are not included in the render tree as they will not appear in the rendered output. Nodes with visibility: hidden applied are included in the render tree, as they do take up space. As we have not given any directives to override the user agent default, the script node in our code ex...
Mobile first - Progressive web apps (PWAs)
ing at the source code in app.css. Particular bits of interest to point out are as follows. article { display: table; } nav { display: table-caption; caption-side: bottom; } This is a rather nice hacky bit of CSS you can use to make the navigation menu display at the bottom, even though it is at the top in the source order. And it works in IE8+. display: table makes the <article> and its
children display in a table layout, without abusing table markup. display: table-caption makes the <nav> element think it's the caption of the table, and caption-side: bottom makes it jump down to the bottom of the table. One word of warning about this technique though - positioning doesn't work as expected on elements with display: table set on them. I have included two links in my markup: <a id="to...
... work as expected on elements with display: table set on them. I have included two links in my markup: <a id="top" href="#bottom">Jump to menu</a> ... <a id="bottom" href="#top">Back to top</a> The first one is to jump down from the top of the article to the navigation menu, and the second one is to jump back up to the top of the article again. ...
...top, I put in the following media queries: @media (min-width: 480px) { #bottom, #top { display: none; } article, nav { display: block; } nav ul { text-align: center; } nav li { display: inline; } nav li a { border-right: 1px solid #AD66D5; border-bottom: none; display: inline-block; padding: 0 5px; font-size: 1.6em; } nav li:last-
child a { border-right: none; } } @media (min-width: 600px) { html { background: #eee; height: 100%; } body { width: 600px; height: inherit; margin: 0 auto; background: url(../img/firefox-os.png) bottom left no-repeat, linear-gradient(to bottom, #fff, #eee); } .main > p { background: rgba(255,255,255,0.3); } nav li a { padding: 0 10px; font...
Index - XPath
ncestor Axe, XPath No summary! 4 ancestor-or-self Axe, XPath The ancestor-or-self axis indicates the context node and all of its ancestors, including the root node. 5 attribute Axe, XPath The attribute axis indicates the attributes of the context node. Only elements have attributes. This axis can be abbreviated with the at sign (@). ...
... summary! 4 ancestor-or-self Axe, XPath The ancestor-or-self axis indicates the context node and all of its ancestors, including the root node. 5 attribute Axe, XPath The attribute axis indicates the attributes of the context node. Only elements have attributes. This axis can be abbreviated with the at sign (@). 6
child Axe, XPath The
child axis indicates the
children of the context node. If an XPath expression does not specify an axis, the
child axis is understood by default. Since only the root node or element nodes have
children, any other use will select nothing. 7 descendant Axe, XPath The descendant axis indicates all of the
children of the context node, and all of their
children, and so forth. Attribute a...
...stood by default. Since only the root node or element nodes have
children, any other use will select nothing. 7 descendant Axe, XPath The descendant axis indicates all of the
children of the context node, and all of their
children, and so forth. Attribute and namespace nodes are not included - the parent of an attribute node is an element node, but attribute nodes are not the
children of their parents. 8 descendant-or-self Axe, XPath The descendant-or-self axis indicates the context node and all of its descendants. Attribute and namespace nodes are not included - the parent of an attribute node is an element node, but attribute nodes are not the
children of their parents. 9 following Axe, XPath The following axis indicates all the n...
window/utils - Archive of obsolete content
for the given nsIDOMWindow: var { Ci } = require('chrome'); var utils = require('sdk/window/utils'); var active = utils.getMostRecentBrowserWindow(); active instanceof Ci.nsIBaseWindow // => false utils.getBaseWindow(active) instanceof Ci.nsIBaseWindow // => true Parameters window : nsIDOMWindow Returns nsIBaseWindow getToplevelWindow(window) Returns the toplevel nsIDOMWindow for the given
child nsIDOMWindow: var { Ci } = require('chrome'); var utils = require('sdk/window/utils'); var browserWindow = utils.getMostRecentBrowserWindow(); var window = browserWindow.content; // `window` object for the current webpage utils.getToplevelWindow(window) == browserWindow // => true Parameters window : nsIDOMWindow Returns nsIDOMWindow getWindowDocShell(window) Returns the nsIDocShell for th...
...e://browser/content/browser.xul". Parameters window : nsIDOMWindow Returns boolean getWindowTitle(window) Get the title of the document hosted by the given window Parameters window: nsIDOMWindow Returns string: this document's title. isXULBrowser(window) Returns true if the given window is a XUL window. Parameters window : nsIDOMWindow Returns boolean getFocusedWindow() Gets the
child window within the topmost browser window that is focused. See nsIFocusManager for more details. Returns nsIDOMWindow getFocusedElement() Get the element that is currently focused. This will always be an element within the document loaded in the focused window, or null if no element in that document is focused. Returns nsIDOMElement getFrames(window) Get the frames contained by the given w...
Canvas code snippets - Archive of obsolete content
illRect', 'fillText', 'lineTo', 'moveTo', 'quadraticCurveTo', 'rect', 'restore', 'rotate', 'save', 'scale', 'setTransform', 'stroke', 'strokeRect', 'strokeText', 'transform', 'translate']; var getterMethods = ['createPattern', 'drawFocusRing', 'isPointInPath', 'measureText', // drawFocusRing not currently supported // The following might instead be wrapped to be able to chain their
child objects 'createImageData', 'createLinearGradient', 'createRadialGradient', 'getImageData', 'putImageData' ]; var props = ['canvas', 'fillStyle', 'font', 'globalAlpha', 'globalCompositeOperation', 'lineCap', 'lineJoin', 'lineWidth', 'miterLimit', 'shadowOffsetX', 'shadowOffsetY', 'shadowBlur', 'shadowColor', 'strokeStyle', 'textAlign', 'textBaseline']; for (let m of methods...
...iframe'); iframe.id = 'test-iframe'; iframe.height = '10px'; iframe.width = windowWidth + 'px'; iframe.style.visibility = 'hidden'; iframe.src = this.url; // Here is where the magic happens... ...
XML Assignments - Archive of obsolete content
It allows us to declare additional variables that may be used in the action body. The expr attribute specifies the XPath expression and the var attribute specifies the variable to assign to. Note that while the query expression uses the root node (or reference node) as the XPath context, the expressions for the assign element are evaluated using each result node as the co...
...iable will be assigned the length of the name attribute on the result node, and the ?siblings variable will be assigned the number of sibling nodes the result has. (In this case, the number of XML node siblings in the document, not the number of real siblings the people have, clearly the people in the datasource aren't actually siblings). Naturally, the number of siblings will be the same for all
children, but you could imagine a more complex query expression that generated nodes where this wasn't actually the case. The two variable assignments may then be used in the action body to replace attributes in the generated content. If a variable is used in the action that doesn't correspond to one declared in an assign element, the default behaviour is to take the corresponding attribute on the resu...
textbox (Toolkit autocomplete) - Archive of obsolete content
ut attribute. type Type: string Set to the value autocomplete to have an autocomplete textbox. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData getSearchAt( inde...
Textbox (XPFE autocomplete) - Archive of obsolete content
he type attribute. userAction Type: string Gets and sets the value of the userAction attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData addSession( sessi...
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
Watch for a snippet that you can copy and paste into Scratchpad, and then run on Gists@GitHub here: _ff-addon-snippet-AddToolbarButtonToPalette.js . It is based on the code from the repo above. Here are some discussions at Mozillazine about adding a toolbar bu...
...ste into Scratchpad, and then run on Gists@GitHub here: _ff-addon-snippet-AddToolbarButtonToPalette.js . It is based on the code from the repo above. Here are some discussions at Mozillazine about adding a toolbar button in a Bootstrap addon: Programmatically add a button to toolbar palette? The advantage to adding the toolbar button to the palette rather than creating an element and then append
Child to the toolbar (document.getElementById('nav-bar')) or append
Child to the addon bar (document.getElementById('addon-bar')) is that once in the toolbar palette, users can configure it through the customize menu. They can drag it to the addon bar or to the toolbar. Styling the button Most toolbar buttons have icons. To attach an image to the button we use standard Mozilla skinning facilities. If ...
Adding Properties to XBL-defined Elements - Archive of obsolete content
get or set the additional properties and call the methods on it. There are three types of items you can add. Fields are used to hold a simple value. Properties can also be used to hold a value but may have code execute when an attempt is made to retrieve or modify the value. Methods are functions which may be executed. All three are defined within an implementation element, which should be a
child of the binding element. Within the implementation, you define individual field, property, and method elements, one for each one that you want. The general syntax is as follows: <binding id="element-name"> <content> -- content goes here -- </content> <implementation> <field name="field-name-1"/> <field name="field-name-2"/> <field name="field-name-3"/> <property name="pr...
... Whenever a script attempts to set the value of a property, it is set as an attribute on the element. This is convenient because then you can modify the property or the attribute and both will have the same value. Getter Element and Setter Element You can use an alternate syntax for the onget and onset attributes that is useful if the scripts are longer. You can replace the onget attribute with a
child element called getter. Similarly, you can replace the onset attribute with a setter element. The example below shows this: <property name="number"> <getter> return this.getAttribute('number'); </getter> <setter> var v = parseInt(val,10); if (!isNaN(v)) { this.setAttribute('number', '' + v); } </setter> </property> The property in this example will only be able to ho...
Box Model Details - Archive of obsolete content
st interface is one that can be displayed at various sizes without problems. The box model may be difficult to understand without trying various various things out for yourself. The following is an outline of both types of boxes: Horizontal boxes Lay out their elements next to each other horizontally. Flexible elements are flexed horizontally. Packing controls their horizontal placement of
child elements. Alignment controls how the row of elements are aligned vertically. Vertical boxes Lay out their elements vertically in a column. Flexible elements are flexed vertically. Packing controls the vertical placement of
child elements. Alignment controls how the column of
child elements are aligned horizontally. You can put boxes anywhere in a XUL file, including inside an HTML el...
... textbox also enforces a minimum width of 100 pixels. The check box appears in the right box along with its label. Just below the check box is a spacer. The spacer will grow and shrink but not exceed 30 pixels. The result is that the check box and the Find button will be spaced apart from each other by some space of no more than 30 pixels. The second box has an alignment of start. This causes the
child elements to be aligned on the left edge. If this was not specified, the default would be stretch, which would make the
child elements stretch horizontally. Because we don't want the Find button to change size, we need to set an alignment. Next, we will learn about a more specialized type of box, the groupbox. << PreviousNext >> ...
Content Panels - Archive of obsolete content
Sometimes, you will want to change part of the window. A good example is a step-by-step wizard that guides you through a number of screens, asking a set of questions. Each time the user clicks the Next button, the next screen of the wizard is displayed. You could create a wizard interface by opening a different window for each screen. There are three problems with this approach. ...
...specified using the type attribute. The first type is the default and is used if you don't specify a type. In this case, the content loaded inside the browser is treated as if it was part of the same application and has access to the outer window. That means that when a script loaded inside the browser tries to get the topmost window, it will get the outer XUL window. This would be suitable for a
child XUL panel that is part of your application, but this isn't what you want for a browser that loads a web page. Instead, you would want to restrict the web page to only getting access to the web page content. You might note that a Mozilla browser window has XUL content for the toolbars and statusbar and so forth with a tabbrowser forming the main area. This inner area displays a web page, but the w...
Creating a Skin - Archive of obsolete content
ong the bottom of the window. 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. You can see this if you look closely. The background color of the caption has also been changed to match the background. The first rule above (for 'window > box') specifies that the
child box of the window has a different color. This probably isn't the best way to do this. We should really change this to use a style class. Let's do this. That way, we can modify the XUL without needing to keep the box as the first
child of the window. CSS: .findfilesbox { background-color: #0088CC; } XUL: <vbox class="findfilesbox" orient="vertical" flex="100%"> <toolbox> Rounding on the Tabs...
...s to use a style class. Let's do this. That way, we can modify the XUL without needing to keep the box as the first
child of the window. CSS: .findfilesbox { background-color: #0088CC; } XUL: <vbox class="findfilesbox" orient="vertical" flex="100%"> <toolbox> Rounding on the Tabs Next, let's modify the tabs. We will make the selected tab bold and change the rounding on the tabs. tab:first-
child { -moz-border-radius: 4px 0px 0px 0px; } tab:last-
child { -moz-border-radius: 0px 4px 0px 0px; } tab[selected="true"] { color: #000066; font-weight: bold; text-decoration: underline; } Two rules change the normal tab appearance, the first sets the rounding on the first tab and the second sets the rounding on the last tab. Used here is a special Mozilla style rule, -moz-border-radi...
Groupboxes - Archive of obsolete content
ned according to the XUL box rules. However, there are several differences between groupboxes and regular boxes: The groupbox can be labeled using the caption element. The groupbox is displayed in a special way--usually with a beveled border and a caption, although you can change the appearance using CSS. You can create a caption for your groupbox by inserting a caption element as the first
child. Groupboxes are box elements, so you can use the box attributes, such as orient and flex. A simple groupbox example The example below shows a simple groupbox: Example 1 : Source View <groupbox> <caption label="Answer"/> <description value="Banana"/> <description value="Tangerine"/> <description value="Phone Booth"/> <description value="Kiwi"/> </groupbox> This will cause four piece...
...n value="Banana"/> <description value="Tangerine"/> <description value="Phone Booth"/> <description value="Kiwi"/> </groupbox> This will cause four pieces of text to be displayed surrounded by a box with the label Answer. Note that the groupbox has a vertical orientation by default which is necessary to have the text elements stack in a single column. More complex captions You can also add
child elements inside the caption element to create a more complex caption. For example, Mozilla's Font preferences panel uses a drop-down menu as a caption. Although any content can be used, usually you would use a checkbox or dropdown menu. Example 2 : Source View <groupbox flex="1"> <caption> <checkbox label="Enable Backups"/> </caption> <hbox> <label control="dir" value="Directory...
Skinning XUL Files by Hand - Archive of obsolete content
The parent-
child relationship...
...la development community (again, refer to the skinning guidelines in Writing Skinnable XUL and CSS for more info); CSS2 also provides some new ways to group elements for styling, which we summarize briefly here, because they appear in Mozilla with some frequency, but reserve for another article: Pseudo-class Parent-
Child element:pseudo-class { attribute: value; } parent >
child { attribute: value; } button:hover { border: 1px; } menu#file > menuitem { font-weight: bold; } Pseudo-classes reflect states of the element: when the mouse moves over a button, for example, the appropriate pseudo-class stylesheet rules are applied. The parent-
child relationship is more economical than the aforementioned contextual subgrouping, wh...
Templates - Archive of obsolete content
hould place the template element inside a tree element. Simple Template Example This is better explained with an example. Let's take a simple example where we want to create a button for each top-level bookmark. Mozilla provides a bookmarks datasource so it can be used to get the data. This example will only get the top-level bookmarks (or bookmark folders) as we're going to create buttons. For
child bookmarks, we would need to use an element that displays a hierarchy such as a tree or menu. This example and any others that reference internal RDF datasources will only work if you load them from a chrome URL. For security reasons, Mozilla doesn't allow access to them from other sources. To view this example, you will need to create a chrome package and load the file from there (you can do ...
... There are two different types of builders. The first is a content builder and is used in most situations, and the other is a tree builder which is used only for trees. Content Builder The content builder takes the content inside the template element and duplicates it for each row. For instance, if the user had ten bookmarks in the example above, ten label elements would be created and added as
children of the vbox element. If you were to use DOM functions to traverse the tree, you will find these elements there and can query their properties. These elements get displayed, but the template itself is not displayed, although it still exists in the document tree. In addition, the id of each of the labels will be set to the RDF resource for that row. The content builder always starts at the plac...
XUL Reference - Archive of obsolete content
stringbundleset tab tabbrowser (Firefox-only starting with Firefox 3/Gecko 1.9) tabbox tabpanel tabpanels tabs template textnode textbox textbox (Firefox autocomplete) textbox (Mozilla autocomplete) timepicker titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip tree treecell tree
children 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...
...s tab tabpanels tabpanel groupbox caption separator spacer button checkbox colorpicker datepicker menulist progressmeter radio radiogroup scale splitter textbox textbox (Firefox autocomplete) textbox (Mozilla autocomplete) timepicker description label image listbox listitem listcell listcol listcols listhead listheader richlistbox richlistitem tree treecell tree
children treecol treecols treeitem treerow treeseparator box hbox vbox bbox deck stack grid columns column rows row scrollbox action assign binding bindings conditions content member param query queryset rule template textnode triple where script commandset command broadcaster broadcasterset observes key keyset stringbundle stringbundleset arrowscrollbox drop...
XUL controls - Archive of obsolete content
</menupopup> </toolbarbutton> More information about this type of menu toolbarbutton element. Toolbarbutton Reference Related Elements: menupopup menuitem toolbar <tree> A tree displays a hierarchy of items in multiple columns. <tree> <treecols> <treecol label="Name" flex="1"/> <treecol label="Size" flex="1"/> </treecols> <tree
children> <treeitem> <treerow> <treecell label="Popcorn"/> <treecell label="Large"/> </treerow> </treeitem> <treeitem> <treerow> <treecell label="Root Beer"/> <treecell label="Small"/> </treerow> </treeitem> </tree
children> </tree> More information about the tree element. Tree Reference Related Elements: tre...
...treeitem> <treerow> <treecell label="Popcorn"/> <treecell label="Large"/> </treerow> </treeitem> <treeitem> <treerow> <treecell label="Root Beer"/> <treecell label="Small"/> </treerow> </treeitem> </tree
children> </tree> More information about the tree element. Tree Reference Related Elements: treecell tree
children treecol treecols treeitem treerow ...
action - Archive of obsolete content
Object, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
arrowscrollbox - Archive of obsolete content
lines, or a negative value to scroll backward that many lines. scrollByPixels( pixels ) Return type: no return value Scrolls the contents of the arrowscrollbox by a certain number of pixels. Use a positive value as the pixels argument to scroll forward that many pixels, or a negative value to scroll backward that many pixels. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
assign - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
bbox - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
binding - Archive of obsolete content
xObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related TBD ...
bindings - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related TBD ...
broadcaster - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
broadcasterset - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
browser - Archive of obsolete content
methods are callable directly on the element itself, such as goBack and goForward. It also contains the load constants used by reloadWithFlags and loadURIWithFlags. webProgress Type: nsIWebProgress This read-only property contains an nsIWebProgress object which is used to monitor the progress of a document loading. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData addProgres...
checkbox - Archive of obsolete content
led Type: boolean Gets and sets the value of the disabled attribute. src Type: URL Gets and sets the value of the src attribute. label Type: string Gets and sets the value of the label attribute. tabIndex Type: integer Gets and sets the value of the tabindex attribute. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Interfac...
colorpicker - Archive of obsolete content
value of the disabled attribute. open Type: boolean Returns true if the popup for a button-type colorpicker is open. Set this property to true to open the popup or false to close the popup. tabIndex Type: integer Gets and sets the value of the tabindex attribute. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Interfac...
command - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related XUL:List...
commandset - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
conditions - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
datepicker - Archive of obsolete content
property to change the selected date. year Type: integer The currently selected year from 1 to 9999. Set this property to change the selected year. yearLeadingZero Type: boolean A read only value indicating whether a leading zero should be displayed before the year when it is less than 1000. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Interfac...
dialog - Archive of obsolete content
ttribute. defaultButton Type: string Normally this attribute should not be set, but if it is, it specifies the default button in the dialog. Typically, this means that the button will be activated when the Enter key is pressed. This should be set to one of the same values as those for the buttons attribute. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData acceptDialo...
dialogheader - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
dropmarker - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
editor - Archive of obsolete content
indow ) Return type: nsIHTMLEditor Returns the HTML editing interface for the editor which contains methods for manipulating an HTML document. Pass the editor's contentWindow as the argument. makeEditable( editortype, waitForLoad ) Return type: no return value This function enables editing for an editor. Specify text or html as the editortype. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Interfac...
grippy - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
groupbox - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Interfac...
image - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Style classes ...
keyset - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
label - Archive of obsolete content
e. disabled Type: boolean Gets and sets the value of the disabled attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Style classes The fo...
listcol - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
listcols - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
listhead - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
listheader - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
listitem - Archive of obsolete content
ox 3. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Style classes The ...
menubar - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
menupopup - Archive of obsolete content
This state will occur during the popupshowing event. hiding: The popup is about to be hidden. This state will occur during the popuphiding event. triggerNode Type: nsIDOMNode This read-only property holds the DOM node that generated the event triggering the opening of the popup. The value is null if the popup isn't open. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData hidePopup()...
notification - Archive of obsolete content
attribute. type Type: string Gets and sets the value of the type attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData close() Return t...
observes - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
page - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
popupset - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
preference - Archive of obsolete content
boolean isElementEditable(in DOMElement element) Returns true, if the given element is "editable" (see below). void setElementValue(in DOMElement element); Initializes the supplied element from the value stored in the preference. This function calls onsyncfrompreference. void updateElements(); Update all elements that observe this preference. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Events change W...
progressmeter - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Interfac...
query - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
queryset - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
radio - Archive of obsolete content
3. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
resizer - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
script - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
scrollbar - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
scrollcorner - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
separator - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Style classes The ...
spacer - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
spinbuttons - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
statusbar - Archive of obsolete content
xObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements ...
<statusbarpanel> - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Style classes The ...
stringbundle - Archive of obsolete content
vely, numbered indices of the format %n$S (e.g. %1$S, %2$S, etc.) can be used to specify the position of the corresponding parameter explicitly. If you need to handle substitutions involving plurals, take a look at Localization and Plurals. getString( key ) Return type: string Returns the string with the given key name from the string bundle. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related XUL Prop...
stringbundleset - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
tab - Archive of obsolete content
3. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Notes Note: Prior...
tabbrowser - Archive of obsolete content
methods are callable directly on the element itself, such as goBack and goForward. It also contains the load constants used by reloadWithFlags and loadURIWithFlags. webProgress Type: nsIWebProgress This read-only property contains an nsIWebProgress object which is used to monitor the progress of a document loading. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData addProgressL...
tabpanel - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
template - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
textbox - Archive of obsolete content
start, end ) Return type: no return value Sets the selected portion of the textbox, where the start argument is the index of the first character to select and the end argument is the index of the character after the selection. Set both arguments to the same value to move the cursor to the corresponding position without selecting text. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Style classes The ...
textnode - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
timepicker - Archive of obsolete content
read only value indicating whether a leading zero should be displayed before the second when it is less than 10. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value Type: string The currently entered time of the form HH:MM:SS. Set this property to change the time. ...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Interfac...
titlebar - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
toolbargrippy - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
toolbaritem - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
toolbarseparator - Archive of obsolete content
xObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elem...
toolbarset - Archive of obsolete content
xObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elem...
toolbarspacer - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elements...
toolbarspring - Archive of obsolete content
xObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData Related Elem...
tooltip - Archive of obsolete content
ed: The popup is closed and not visible. open: The popup is open and visible on screen. showing: A request has been made to open the popup, but it has not yet been shown. This state will occur during the popupshowing event. hiding: The popup is about to be hidden. This state will occur during the popuphiding event. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData hidePopup() ...
where - Archive of obsolete content
bject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width Methods Inherited Methods addEventListener(), append
Child(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAtt...
...k, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData ...
wizard - Archive of obsolete content
se pages are not necessarily navigated in order. title Type: string The title that appears at the top of the wizard. This is overridden by the label attribute on the individual pages. wizardPages Type: DOM NodeList of wizardpage elements This property holds the list of wizardpage elements in the wizard. ...
..., blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), has
ChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), remove
Child(), removeEventListener(), replace
Child(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData << XUL Refere...
Using SSH to connect to CVS - Archive of obsolete content
atch file to set things up, just add the commands below to the end of your file. POSIX shell eval `ssh-agent -s` ssh-add ~/.ssh/id_dsa $SHELL ssh-agent -k exit X Windows In "~/.xinitrc" add "ssh-add". This will bring up a graphic box just after login, and before the desktop loads, asking for your passphrase. The passphrase will be held for the length of the x session, and be passed on to all
child shells. MS-DOS command prompt Cygwin for /f "tokens=1,2,3* delims=; " %%a in ('ssh-agent -c') do if "%%a"=="setenv" set %%b=%%c set HOME=/cygdrive/c/path/to/your/cygwin/home/directory ssh-add ~/.ssh/id_dsa start /b /wait cmd.exe ssh-agent -k exit Essentially both sets of commands do the same thing. First ssh-agent is called and its output is evaluated in the current environment. This sets en...
... same thing. First ssh-agent is called and its output is evaluated in the current environment. This sets environment variables that let cvs know how to find and use the agent. Your private key is then added to ssh-agent using ssh-add at which point you will be prompted for the key's passphrase. Since it's important that you kill the agent when you're finished with it, the last three lines start a
child environment that, when exited, will result in the agent's process being killed. The environment you will actually use to build is the
child environment. There are a few things to note about the commands for the MS-DOS Command Prompt. First of all they will only work in versions of Windows based on NT (NT/2000/XP). If you're building on Win9x/WinME you'll need to find an alternative solution. If ...
-moz-stack-sizing - Archive of obsolete content
-moz-stack-sizing is an extended CSS property. Normally, a <xul:stack> will change its size so that all of its
child elements are completely visible. For example, moving a
child of the stack far to the right will widen the stack so the
child remains visible. /* Keyword values */ -moz-stack-sizing: auto; -moz-stack-sizing: ignore; /* Global values */ -moz-stack-sizing: inherit; -moz-stack-sizing: initial; -moz-stack-sizing: unset; If you wish to prevent the stack from resizing automatically to accommodate its
children, you can set -moz-stack-sizing to ignore on the
child element. The property is set not on the stack itself, but on the stack's
children. This lets you ignore certain
children, but not others. Note: In previous versions of Gecko it was possible to work around the pro...
... set -moz-stack-sizing to ignore on the
child element. The property is set not on the stack itself, but on the stack's
children. This lets you ignore certain
children, but not others. Note: In previous versions of Gecko it was possible to work around the problem by setting very large negative bottom and right margins on the stack element and equally large positive bottom and right margins on the
children whose size you didn't want to ignore. (The problem does not affect
children moved above or to the left of the stack.) Initial valuestretch-to-fitApplies toall elementsInheritedyesComputed valueas specifiedAnimation typediscrete Syntax Values stretch-to-fit The
child will influence the stack's size. ignore The stack won't consider this
child when calculating its size. Formal syntax ...
display-outside - Archive of obsolete content
e layout-specific internal types. ruby-base, ruby-text, ruby-base-container, ruby-text-container The element is an internal ruby element, and participates in a ruby layout context. ruby-base and ruby-text are layout-specific leaf types; ruby-base-container and ruby-text-container are layout-specific internal types. layout-specific internal types These display types require their parent and
children to be of particular display types. For example, a table-row box requires its parent to be a table row group box and its
children to be table-cell boxes. layout-specific leaf types These display types require their parent to be of a particular display type, but can accept any display-inside value. For example, a table-caption box must have a table parent, but can establish any kind of formatt...
...lar display types. For example, a table-row box requires its parent to be a table row group box and its
children to be table-cell boxes. layout-specific leaf types These display types require their parent to be of a particular display type, but can accept any display-inside value. For example, a table-caption box must have a table parent, but can establish any kind of formatting context for its
children. Formal syntax Syntax not found in DB! Specifications Specification Status Comment CSS Display Module Level 3The definition of 'display-outside' in that specification. Candidate Recommendation Initial definition ...
Displaying notifications (deprecated) - Archive of obsolete content
whether by being clicked or by some other means). Note: If the notification is dismissed by the user clicking on it, both events will get fired. ...
...append a little HTML to our document when these events fire: notification.onclick = function() { var e = document.createElement("p"); e.innerHTML = "<strong>The notification was clicked.</strong>"; document.body.append
Child(e); }; notification.onclose = function() { var e = document.createElement("p"); e.innerHTML = "<strong>The notification was closed.</strong>"; document.body.append
Child(e); }; Displaying the notification Once the notification is configured the way you want it to be, call its show() method to display the notification: notification.show(); On Android, for example, the resulting notification panel looks like this: When the user taps on the "Hey, check this out!" notification here, the resulting changes to the document look like this: If you're using Fire...
E4X for templating - Archive of obsolete content
low) ++it; } } else { for (k in arr) { if (it < min) { ++it; continue; } if (it > max) { break; } ret+=h(k, arr[k], it, lev); ++it; } } return ret; } The following real case example iterates over an array of the lines in an E4X
child element to produce an XMLList of multiple vbox's representing each line: <vbox> {foreach(e(someEl.some
Child[0]).split('\n'), function (line) <description>{line}</description> )} </vbox> The following example shows iteration over an E4X object itself: {foreach(elems, function (k, elem, iter) <> <row>{k}: {elem}</row> <row><image src="chrome://myExt/skin/images/FillerRow.jpg" /></ro...
...LList of multiple vbox's representing each line: <vbox> {foreach(e(someEl.some
Child[0]).split('\n'), function (line) <description>{line}</description> )} </vbox> The following example shows iteration over an E4X object itself: {foreach(elems, function (k, elem, iter) <> <row>{k}: {elem}</row> <row><image src="chrome://myExt/skin/images/FillerRow.jpg" /></row> </>)} or if the E4X
child element had its own
children and text: {foreach(elems, function (k, elem, iter) <> <row>{k}: {elem.text()} {elem.some
Child}</row> <row><image src="chrome://myExt/skin/images/FillerRow.jpg" /></row> </>)} Sorting /* @param {XMLList} xmllist The XMLList to sort @param {Function} h The sorting handler */ function sort (xmllist, h) { var k, arr=[], ret = <></>; for (k in xmllist) ...
Introduction - Archive of obsolete content
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. However, many of the same functions that you would use in the DOM can be used in E4X. The most basic is append
Child var element1 = <foo/>; var element2 = <bar/>; element1.append
Child(element2); which produces exactly the XML document you'd expect <foo> <bar/> </foo> Javascript Variables The true power of E4X only begins to come to light, however, when the XML document can interact closely with other JavaScript. With special syntax, we can assign the value of a JavaScript variable to be the value of an ...
...= a.toUpperCase(); var d = 5 * 5; return c + d;}()}</bar>; where the above produces: <bar>FOO25</bar>. See E4X for templating for more discussion on this usage. Serializing One of the most powerful tools of E4X is its ability to serialize an entire XML document (or portion thereof) into a string with one simple call to .toXMLString() var element1 = <foo/>; var element2 = <bar/>; element1.append
Child(element2); element1.toXMLString(); This will print <foo> <bar/> </foo> Calling toString() will achieve the same effect in this case, though calling toString() on an element with only text content will product the text content (e.g., <foo>abc</foo>.toString(); will simply provide 'abc'). << PreviousNext >> ...
Mozilla XForms User Interface - Archive of obsolete content
esentation checkbox group - used when appearance = 'full' select1 Combobox control. Allows the user to choose a single value from a list of pre-defined values (see the spec). It can have the following representations: combobox - default representation listbox - used when appearance = 'compact' radio group - used when appearance = 'full' Additional Elements These elements may be used as
child elements to the form controls described above. label Specifies the label for the xforms control (see the spec). Every form control other than the output element must contain a label element. It is valid for a form control to have an empty label element. help Specifies contextual help for the containing form control (see the spec). The help will be displayed if the F1 key is pressed while the cont...
... the specified range of selectable values (see the spec). message Used in combination with event listeners to display a message to the user when the specified event occurs (see the spec). XForms User Interface These elements are mainly used to organize and manage the form's markup. They can be bound to instance nodes to define context for the xforms controls that they contain, should any of their
child nodes happen to use relative xpath expressions. Binding these elements to instance data is also a way to apply Model Item Properties (for example, relevancy) to the elements. Elements in this section do not have any behaviors that are dependent on the host language. group This element is used to logically group xforms elements together (see the spec). switch This element is used in conjunction wi...
Building up a basic demo with A-Frame - Game development
After that it's all about setting the proper attributes: color, height, radius and position. The last line adds the newly created cylinder to the scene. That's it -- you've created three different shapes with A-Frame! Here's how it looks right now: It is impressive to be...
...such a scene with just a few lines of HTML and JavaScript. Animation We've already used rotation and position to move the shapes on the scene, and we can also scale them. These attributes can be manipulated to create the illusion of animation. Rotation There's a special <a-animation> entity that can help us animate elements. Add the <a-animation> element seen below to the <a-box> element as a
child, as shown: <a-box color="#0095DD" rotation="20 40 0" position="0 1 0"> <a-animation attribute="rotation" from="20 0 0" to="20 360 0" direction="alternate" dur="4000" repeat="indefinite" easing="ease"> </a-animation> </a-box> As with any other entities, you can define key properties for the animation. We'll be animating the rotation attribute from 20 0 0 to...
Positioning - Learn web development
se properties can take any units you'd logically expect -- pixels, mm, rems, %, etc. If you now save and refresh, you'll get a result something like this: <h1>Relative positioning</h1> <p>I am a basic block level element. My adjacent block level elements sit on new lines below me.</p> <p class="positioned">By default we span 100% of the width of our parent element, and we are as tall as our
child content. Our total width and height is our content + padding + border width/height.</p> <p>We are separated by our margins. Because of margin collapsing, we are separated by the width of one of our margins, not both.</p> <p>inline elements <span>like this one</span> and <span>this one</span> sit on the same line as one another, and adjacent text nodes, if there is space on the same line. Overfl...
...s. Let's try changing the position declaration in your code as follows: position: absolute; If you now save and refresh, you should see something like so: <h1>Absolute positioning</h1> <p>I am a basic block level element. My adjacent block level elements sit on new lines below me.</p> <p class="positioned">By default we span 100% of the width of our parent element, and we are as tall as our
child content. Our total width and height is our content + padding + border width/height.</p> <p>We are separated by our margins. Because of margin collapsing, we are separated by the width of one of our margins, not both.</p> <p>inline elements <span>like this one</span> and <span>this one</span> sit on the same line as one another, and adjacent text nodes, if there is space on the same line. Overfl...
Styling links - Learn web development
rySelector(".html-input"); var cssInput = document.querySelector(".css-input"); var reset = document.getElementById("reset"); var htmlCode = htmlInput.value; var cssCode = cssInput.value; var output = document.querySelector(".output"); var solution = document.getElementById("solution"); var styleElem = document.createElement('style'); var headElem = document.querySelector('head'); headElem.append
Child(styleElem); function drawOutput() { output.innerHTML = htmlInput.value; styleElem.textContent = cssInput.value; } reset.addEventListener("click", function() { htmlInput.value = htmlCode; cssInput.value = cssCode; drawOutput(); }); solution.addEventListener("click", function() { htmlInput.value = htmlCode; cssInput.value = 'p {\n font-size: 1.2rem;\n font-family: sans-serif;\n ...
...usic</a></li><li><a href="#">Wombats</a></li><li><a href="#">Finland</a></li> </ul> And now our CSS: body,html { margin: 0; font-family: sans-serif; } ul { padding: 0; width: 100%; } li { display: inline; } a { outline: none; text-decoration: none; display: inline-block; width: 19.5%; margin-right: 0.625%; text-align: center; line-height: 3; color: black; } li:last-
child a { margin-right: 0; } a:link, a:visited, a:focus { background: yellow; } a:hover { background: orange; } a:active { background: red; color: white; } This gives us the following result: Let's explain what's going on here, focusing on the most interesting parts: Our second rule removes the default padding from the <ul> element, and sets its width to span 100% of the outer conta...
Styling lists - Learn web development
10px; } h2 { font-size: 2rem; } ul,ol,dl,p { font-size: 1.5rem; } li, p { line-height: 1.5; } /* Description list styles */ dd, dt { line-height: 1.5; } dt { font-weight: bold; } The first rule sets a sitewide font and a baseline font size of 10px. These are inherited by everything on the page. Rules 2 and 3 set relative font sizes for the headings, different list types (the
children of the list elements inherit these), and paragraphs. This means that each paragraph and list will have the same font size and top and bottom spacing, helping to keep the vertical rhythm consistent. Rule 4 sets the same line-height on the paragraphs and list items -- so the paragraphs and each individual list item will have the same spacing between lines. This will also help to keep the vertic...
...rySelector(".html-input"); var cssInput = document.querySelector(".css-input"); var reset = document.getElementById("reset"); var htmlCode = htmlInput.value; var cssCode = cssInput.value; var output = document.querySelector(".output"); var solution = document.getElementById("solution"); var styleElem = document.createElement('style'); var headElem = document.querySelector('head'); headElem.append
Child(styleElem); function drawOutput() { output.innerHTML = htmlInput.value; styleElem.textContent = cssInput.value; } reset.addEventListener("click", function() { htmlInput.value = htmlCode; cssInput.value = cssCode; drawOutput(); }); solution.addEventListener("click", function() { htmlInput.value = htmlCode; cssInput.value = 'ul {\n list-style-type: square;\n}\n\nul li, ol li {\n ...
What are browser developer tools? - Learn web development
alert('hello!); document.cheeseSelector('html').style.backgroundColor = 'purple'; const myWordmark = document.createElement('img'); myBanana.setAttribute('src','https://blog.mozilla.org/press/wp-content/themes/OneMozilla/img/mozilla-wordmark.png'); document.querySelector('h1').ap...
...ordmark); Now try entering the following incorrect versions of the code and see what you get. alert('hello!); document.cheeseSelector('html').style.backgroundColor = 'purple'; const myWordmark = document.createElement('img'); myBanana.setAttribute('src','https://blog.mozilla.org/press/wp-content/themes/OneMozilla/img/mozilla-wordmark.png'); document.querySelector('h1').append
Child(myWordmark); You'll start to see the kind of errors that the browser returns. Often these errors are fairly cryptic, but it should be pretty simple to figure these problems out! Find out more Find more out about the JavaScript console in different browsers: Firefox Web Console IE JavaScript console Chrome JavaScript Console (Opera's inspector works the same as this) Safari Console ...
Other form controls - Learn web development
x, and the autocomplete box. In both cases the interaction is the same -- once the control is activated, the browser displays a list of values the user can select between. Note: You can find examples of all the drop-down box types on GitHub at drop-down-content.html (see it live also). Select box A simple select box is created with a <select> element with one or more <option> elements as its
children, each of which specifies one of its possible values. <select id="simple" name="simple"> <option>Banana</option> <option selected>Cherry</option> <option>Lemon</option> </select> If required, the default value for the select box can be set using the selected attribute on the desired <option> element -- this option is then preselected when the page loads. The <option> elements can b...
...x no longer displays the values as drop-down content -- instead, all values are displayed at once in a list, with the optional size attribute determining the height of the widget. Note: All browsers that support the <select> element also support the multiple attribute. Autocomplete box You can provide suggested, automatically-completed values for form widgets using the <datalist> element with
child <option> elements to specify the values to display. The <datalist> needs to be given an id. The data list is then bound to an <input> element (e.g. a text or email input type) using the list attribute, the value of which is the id of the data list to bind. Once a data list is affiliated with a form widget, its options are used to auto-complete text entered by the user; typically, this is prese...
UI pseudo-classes - Learn web development
Then we give the generated content the content "required", which is what we wanted our label to say, and style and position it as we want. The result is seen below. Styling controls based on whether their data is valid The other really important, fundamental concept in form validation is whether a form control's data i...
...r other) focus. The :placeholder-shown pseudo-class matches <input> and <textarea> elements that have their placeholder showing (i.e. the contents of the placeholder attribute) because the value of the element is empty. The following are also interesting, but as yet not well-supported in browsers: The :blank pseudo-class selects empty form controls. :empty also matches elements that have no
children, like <input>, but it is more general -- it also matches other empty elements like <br> and <hr>. :empty has reasonable browser support; the :blank pseudo-class's specification is not yet finished, so it not yet supported in any browser. The :user-invalid pseudo-class, when supported, will be similar to :invalid, but with better user experience. If the value is valid when the input receives f...
A first splash into JavaScript - Learn web development
Let's imagine your boss has giv...
...hat when it is clicked, a function called resetGame() is run. Now we need to define this function too! Add the following code, again to the bottom of your JavaScript: function resetGame() { guessCount = 1; const resetParas = document.querySelectorAll('.resultParas p'); for (let i = 0 ; i < resetParas.length ; i++) { resetParas[i].textContent = ''; } resetButton.parentNode.remove
Child(resetButton); guessField.disabled = false; guessSubmit.disabled = false; guessField.value = ''; guessField.focus(); lastResult.style.backgroundColor = 'white'; randomNumber = Math.floor(Math.random() * 100) + 1; } This rather long block of code completely resets everything to how it was at the start of the game, so the player can have another go. It: Puts the guessCount back do...
Object-oriented JavaScript for beginners - Learn web development
class's constructor function is run to create it. This process of creating an object instance from a class is called instantiation -- the object instance is instantiated from the class. Specialist classes In this case we don't want generic people -- we want teachers and students, which are both more specific types of people. In OOP, we can create new classes based on other classes -- these new
child classes can be made to inherit the data and code features of their parent class, so you can reuse functionality common to all the object types rather than having to duplicate it. Where functionality differs between classes, you can define specialized features directly on them as needed. This is really useful -- teachers and students share many common features such as name, gender, and age, so...
...e.g Yo, I'm Sam), whereas a teacher might use something more formal, such as "Hello, my name is [Prefix] [lastName], and I teach [Subject]." (e.g Hello, My name is Mr Griffiths, and I teach Chemistry). Note: The fancy word for the ability of multiple object types to implement the same functionality is polymorphism. Just in case you were wondering. You can now create object instances from your
child classes. For example: In the rest of the article, we'll start to look at how OOP theory can be put into practice in JavaScript. Constructors and object instances JavaScript uses special functions called constructor functions to define and initialize objects and their features. They are useful because you'll often come across situations in which you don't know how many objects you will be cre...
React interactivity: Events and state - Learn web development
one component: events that happen in one component will affect other parts of the app. When we start giving ourselves the power to make new tasks, things that happen in the <Form /> component will affect the list rendered in <App />. We want our handleSubmit() function to ultimately help us create a new task, so we need a way to pass information from <Form /> to <App />. We can't pass data from
child to parent in the same way as we pass data from parent to
child using standard props. Instead, we can write a function in <App /> that will expect some data from our form as an input, then pass that function to <Form /> as a prop. This function-as-a-prop is called a callback prop. Once we have our callback prop, we can call it inside <Form /> to send the right data to <App />. Handling form submi...
...to the form and click "Add" (or press the Enter key) and you'll see your new todo item appear in the UI! However, we have another problem: our addTask() function is giving each task the same id. This is bad for accessibility, and makes it impossible for React to tell future tasks apart with the key prop. In fact, React will give you a warning in your DevTools console -- "Warning: Encountered two
children with the same key..." We need to fix this. Making unique identifiers is a hard problem - one for which the JavaScript community has written some helpful libraries. We'll use nanoid because it's tiny, and it works. Make sure you're in the root directory of your application and run the following terminal command: npm install nanoid Note: If you're using yarn, you'll need the following inste...
React resources - Learn web development
see all of the components that make up our application, including some unique keys for the things that are rendered from arrays. On the right, we see the props and hooks that our App component utilizes. Notice, too, that the Form, FilterButton, and Todo components are indented to the right - this indicates that App is their parent. In more complex apps, this view is great for understanding parent/
child relationships at a glance. React DevTools is available in a number of forms: A Chrome browser extension. A Firefox browser extension. A Chromium Edge browser extension (available soon). A stand-alone application you can install with NPM or Yarn. Try installing one of these, then using it to inspect the app you've just built! You can read more about React DevTools on the React blog. The...
...extension. A Chromium Edge browser extension (available soon). A stand-alone application you can install with NPM or Yarn. Try installing one of these, then using it to inspect the app you've just built! You can read more about React DevTools on the React blog. The Context API The application that we built in this tutorial utilized component props to pass data from its App component to the
child components that needed it. Most of the time, props are an appropriate method for sharing data; for complex, deeply nested applications, however, they're not always best. React provides the Context API as a way to provide data to components that need it without passing props down the component tree. There's also a useContext hook that facilitates this. If you'd like to try this API for yourself,...
Working with Svelte stores - Learn web development
e of the terminal/command line. You'll need a terminal with node + npm installed to compile and build your app. Objective: Learn how to use Svelte stores Using stores we will create an Alert component that shows notifications on screen, which can receive messages from any component. In this case, the Alert component is independent from the rest -- it is not a parent or
child of any other -- so the messages don't fit into the component hierarchy. We will also see how to develop our own custom store to persist the todo information to web storage, allowing our todos to persist over page reloads. Code along with us Git Clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git Then to get to the current...
... npm run dev to start your app in development mode. REPL To code along with us using the REPL, start at https://svelte.dev/repl/d1fa84a5a4494366b179c87395940039?version=3.23.2 Dealing with our app state We have already seen how our components can communicate with each other using props, two-way data binding, and events. In all these cases we were dealing with communication between parent and
child components. But not all application state belongs inside your application's component hierarchy. For example, information about the logged in user, or whether the dark theme is selected or not. Sometimes, your app state will need to be accessed by multiple components that are not hierarchically related, or by a regular JavaScript module. Moreover, when your app becomes complicated and your com...
Focus management with Vue refs - Learn web development
Next We are nearly done with Vue. The last bit of functionality to look at is focus management, or put another way, how we can improve our app's keyboard accessibility. We'll look at using Vue refs to handle this -- an advanced feature that allows you to have direct access to the underlying DOM nodes below the virtual DOM, or direct access from one component to the internal DOM structure of a
child component. Prerequisites: Familiarity with the core HTML, CSS, and JavaScript languages, knowledge of the terminal/command line. Vue components are written as a combination of JavaScript objects that manage the app's data and an HTML-based template syntax that maps to the underlying DOM structure. For installation, and to use some of the more advanced features of Vue (like ...
...ou 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. Instead, if you need to access the underlying DOM nodes (like when setting focus), you can use Vue refs. For custom Vue components, you can also use refs to directly access the internal structure of a
child component, however this should be done with caution as it can make code harder to reason about and understand. To use a ref in a component, you add a ref attribute to the element that you want to access, with a string identifier for the value of the attribute. It's important to note that a ref needs to be unique within a component. No two elements rendered at the same time should have the same r...
Styling Vue components with CSS - Learn web development
ur app. While adding these files directly to the reset.css stylesheet would work, we'll instead add them to the <style> tags in App.vue to demonstrate how this can be used. There are already some styles present in the file. Let's remove those and replace them with the styles below. These styles do a few things -- adding some styling to buttons and inputs, and customizing the #app element and its
children. Update your App.vue file's <style> element so it looks like so: <style> /* Global styles */ .btn { padding: 0.8rem 1rem 0.7rem; border: 0.2rem solid #4d4d4d; cursor: pointer; text-transform: capitalize; } .btn__danger { color: #fff; background-color: #ca3c3c; border-color: #bd2130; } .btn__filter { border-color: lightgrey; } .btn__danger:focus { outline-color: #c82333; } .
...: #c82333; } .btn__primary { color: #fff; background-color: #000; } .btn-group { display: flex; justify-content: space-between; } .btn-group > * { flex: 1 1 auto; } .btn-group > * + * { margin-left: 0.8rem; } .label-wrapper { margin: 0; flex: 0 0 100%; text-align: center; } [class*="__lg"] { display: inline-block; width: 100%; font-size: 1.9rem; } [class*="__lg"]:not(:last-
child) { margin-bottom: 1rem; } @media screen and (min-width: 620px) { [class*="__lg"] { font-size: 2.4rem; } } .visually-hidden { position: absolute; height: 1px; width: 1px; overflow: hidden; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); clip-path: rect(1px, 1px, 1px, 1px); white-space: nowrap; } [class*="stack"] > * { margin-top: 0; margin-bottom: 0; } .s...
Handling common HTML and CSS problems - Learn web development
kes sense compared to it. For example, in the Firefox dev tools, you get this kind of output at the bottom of the DOM inspector: If for example you were trying to use this selector, you'd be able to see that it wouldn't select the input element as desired: form > #date (The date form input isn't directly inside the <form>; you'd be better off using a general descendant selector instead of a
child selector). However, another issue that appears in versions of IE older than 9 is that none of the newer selectors (mainly pseudo-classes and pseudo-elements like :nth-of-type, :not, ::selection, etc.) work. If you want to use these in your CSS and you need to support older IE versions, a good move is to use Keith Clark's Selectivizr library -- this is a small JavaScript library that works on top...
...rsions, a good move is to use Keith Clark's Selectivizr library -- this is a small JavaScript library that works on top of an existing JavaScript library like jQuery or MooTools. To try this example, make a local copy of selectivizr-example-start.html. If you look at this running live, you'll see that it contains two paragraphs, one of which is styled. We've selected the paragraph with p:first-
child, which won't work in old versions of IE. Now download MooTools and Selectivizr, and save them in the same directory as your sample HTML. Put the following code into the head of your HTML document, just before the opening <style> tag: <script type="text/javascript" src="MooTools-Core-1.6.0.js"></script> <!--[if (gte IE 6)&(lte IE 8)]> <script type="text/javascript" src="selectivizr-m...
Accessibility/LiveRegionDevGuide
method will be explained in detail below. Event Types The table for web page mutation event types lists the two major event types associated with live regions, namely text-changed and object changed events. Both will be discussed in detail below. Object Changed The object changed events are slightly different in AT-SPI and IAccessible2. In AT-SPI, the object changed event are called object:
children-changed events because the event is triggered on the parent of the object. The actual object that change can then be found in the event.any_data field. In IAccessible2, the EVENT_OBJECT_* events are triggered on the actual object that changed. The object changed events can be further subdivided into object addition and removal events. In AT-SPI, this is accomplished by appending ":add" or ":re...
... AT-SPI, this is accomplished by appending ":add" or ":remove" to the event string. In IAccessible2, there are two separate event types, namely EVENT_OBJECT_SHOW and EVENT_OBJECT_HIDE. Text Changed The text changed events are quite similar in AT-SPI and IAccessible2 with both having an insert and delete or removal events. The text changed event type in AT-SPI has a similar scheme as the object:
children-changed events. In this case, the root event string is object:text-changed with ":delete" and ":insert" being appended to complete the event type. In IAccessible2, there are two distinct event types - IA2_EVENT_TEXT_REMOVED and IA2_EVENT_TEXT_INSERTED. The text associated with an AT-SPI text changed event is directly in the event object. The event.any_data field holds the entire text string wh...
Multiprocess on Windows
...
...nd know how to wrap a COM interface with an interceptor, we need to discuss how these things fit into the a11y tree. In general, the only COM objects which should need to be explicitly wrapped are the IAccessibles for top-level documents in the content process. As mentioned previously, the interceptor will automatically wrap outparams. When a wrapped COM object is queried for its
children, those
children are provided as outparams, and will themselves be wrapped. ...
Debugging Frame Reflow
ble width is 9180 twips. The available height is 4470 twips (a=9180,4470). The computed width is 9180 twips. The computed height is 4470 twips (c=9180,4470). The line count is 856 (cnt=856). Below this is a line that reads: tblO 02D7B5F0 r=0 a=8940,UC c=0,0 cnt=870 Here the UC shows that on initial reflow the available height for the outer table frame is unconstrained. The table cell requires its
children to compute the MES. It is reported back from the block as: block 02D7BCF8 d=300,300 me=300 The block max. element size is 300 twips. The second table reflow is started at rowG 00B984A4 r=2 a=1500,UC c=1500,UC cnt=879 where the previous information is used. The block has been required to compute the max. element size only once and it reports now: block 02D7BCF8 d=1410,300 The block shows the sa...
...from the block as: block 02D7BCF8 d=300,300 me=300 The block max. element size is 300 twips. The second table reflow is started at rowG 00B984A4 r=2 a=1500,UC c=1500,UC cnt=879 where the previous information is used. The block has been required to compute the max. element size only once and it reports now: block 02D7BCF8 d=1410,300 The block shows the same address as the previous one. Frames with
children that overflow the parent have the NS_FRAME_OUTSIDE_
CHILDREN flag set. For these frames the overflow area is displayed as block 025ED8F0 d=8940,1020 o=(0,0) 9180 x 1020. The overflow area is specified as (x,y) origin and width x height. The reflow finishes at the same level where it started. Advanced reflow debugging The previously described technique dumps the data for every frame. Sometimes t...
Debugging on Windows
is document explains how to debug Mozilla-derived applications such as Firefox, Thunderbird, and SeaMonkey on Windows using the Visual C++ IDE. If VC++ and your Mozilla application hang shortly after you launch the application under the debugger, see Problems Loading Debug Symbols. Ways to start the debugger First of all, it's necessary to install a Visual Studio extension to be able to follow
child processes as they are created. Firefox, in general, and even in non-e10s mode, does not start the main process directly, it starts it via a Launcher Process. This means that Visual Studio will only attach to the first process it finds, and will not hit any break-point (and even notifies you that it cannot find their location). Microsoft
Child Process Debugging Power Tool allows automatically atta...
...s as they are created. Firefox, in general, and even in non-e10s mode, does not start the main process directly, it starts it via a Launcher Process. This means that Visual Studio will only attach to the first process it finds, and will not hit any break-point (and even notifies you that it cannot find their location). Microsoft
Child Process Debugging Power Tool allows automatically attaching to
child processes, such as Web Content process, GPU process, etc. Enable it by going its configuration menu in "Debug > Other debugging targets >
Child process debugging settings", and ticking the box. If you have followed the steps in Building Firefox for Windows and have a local debug build, you can execute ./mach run --debug from the same command line. It would open Visual Studio with Firefox's run o...
How Mozilla's build system works
This is when header files are installed, C++ files are compiled, files are preprocessed, and so on. Recursive Make Backend The recursive make backend is the tried-and-true backend used to build the tree. It's what's been used since the dawn of Mozilla. Essentially, there are makefiles in each directory. make starts processing the makefile in the root directory and then recursively descends into
child directories until it's done. But there's more to the process than that. The recursive make backend divides the source tree into tiers. A tier is a grouping of related directories containing makefiles of their own. For example, there is a tier for the Netscape Portable Runtime (nspr), one for the JavaScript engine, one for the core Gecko platform, one for the XUL app being built, and so on. The ...
...res are the classes defined in data.py. Each class defines a specific aspect of the build system, such as directories to traverse, C++ files to compile, and so on. The TreeMetadataEmitter output is a stream of instances of these classes. The build system stream describing class instances emitted from TreeMetadataEmitter is then fed into a build backend. A build backend is simply an instance of a
child class of a BuildBackend from base.py (in the mozbuild.backend package now, not mozbuild.frontend). The
child class implements methods for processing individual class instances as well as common hook points, such as processing has finished. See recursivemake.py for an implementation of a BuildBackend. Although we call the base class BuildBackend, the class doesn't need to be focused with building...
Gecko Logging
at the application level to control what's actually printed via RUST_LOG. You can set an overall logging level, though it could be quite verbose: set RUST_LOG="debug" You can also target individual modules by path: set RUST_LOG="style::style_resolver=debug" For Linux/MacOS users, you need to use export rather than set. If you're only interested in the content process you can use RUST_LOG_
CHILD rather than RUST_LOG. The log crate lists the available log levels: Log Level Purpose Rust Logging Levels error Designates very serious errors. warn Designates hazardous situations. info Designates useful information. debug Designates lower priority information. trace Designates very low priority, often extremely verbo...
...o Designates useful information. debug Designates lower priority information. trace Designates very low priority, often extremely verbose, information. It is common for debug and trace to be disabled at compile time in release builds, so you may need a debug build if you want logs from those levels. Check the env_logger docs for more details on logging options.
Child Processes / e10s Sometimes it can be useful to only log
child processes and ignore the parent process. In Firefox 57 and later, you can use RUST_LOG_
CHILD to specify log settings that will only apply to
child processes. ...
Limitations of chrome scripts
the content process. With the shim The shim enables you to add content policies in the chrome process. It transparently registers an nsIContentPolicy in the content process, whose shouldLoad just forwards to the chrome process. The content to check is forwarded as a CPOW. The chrome process then checks the content against the policy supplied by the add-on, and forwards the response back to the
child to be enforced. To make the shim unnecessary: define and register nsIContentPolicy in the content process. If you need to ensure that the policy is only registered once, use a process script to register the policy. nsIWebProgressListener This API will work in the chrome process. There is a shim that gives you access to the DOMWindow property of the nsIWebProgress object passed into onStateChan...
...cesses. If an add-on wants to use a JSM to share state in this way, it's best to load the JSM in the chrome process, and have frame scripts store and access the JSM's state by sending messages to the chrome process using the message manager. nsIProtocolHandler In multiprocess Firefox, code which registers a custom protocol using nsIProtocolHandler must register the custom protocol in the
child content process. If the custom protocol is registered only in the chrome process, no iframes or tabs will be able to load any resource from the custom procotol. The solution is to register the custom protocol in the content process. You can do this by loading a frame script or, with the Add-on SDK, you can use remoteRequire() in the "remote/parent" module. ...
Services.jsm
ache nsICacheService Cache service cache2 nsICacheStorageService Cache storage service clipboard nsIClipboard Clipboard console nsIConsoleService Error console service contentPrefs nsIContentPrefService Content Preferences service cookies nsICookieManager2 Cookie Manager 2 service cpmm nsIMessageSender
Child process message manager4 crashmanager CrashManager.jsm dirsvc nsIDirectoryService nsIProperties Directory service domStorageManager nsIDOMStorageManager DOM Storage Manager DOMRequest nsIDOMRequestService DOMRequest service downloads nsIDownloadManager Download manager droppedLinkHandler nsIDroppedLinkHan...
...dManager Thread Manager service uriFixup nsIURIFixup URI Fixup service urlFormatter nsIURLFormatter URL Formatter service vc nsIVersionComparator Version comparator service wm nsIWindowMediator Window mediator service ww nsIWindowWatcher Window watcher service 1 Mobile only 2 Windows only 3 Main process only 4
Child process only ...
BloatView
cumulative) LEAK AND BLOAT STATISTICS, tab process 1862 |<----------------Class--------------->|<-----Bytes------>|<----Objects---->| | | Per-Inst Leaked| Total Rem| 0 |TOTAL | 17 2484|253953338 38| 17 |AsyncTransactionTrackersHolder | 40 40| 10594 1| 78 |Compositor
Child | 472 472| 1 1| 79 |CondVar | 24 48| 3086 2| 279 |MessagePump | 8 8| 30 1| 285 |Mutex | 20 60| 89987 3| 302 |PCompositor
Child | 412 412| 1 1| 308 |PImag...
... Here's how you interpret the columns. The first, numerical column is the index of the leaking class. Class - The name of the class in question (truncated to 20 characters). Bytes Per-Inst - The number of bytes returned if you were to write size...
powermetrics
nd. Quick start powermetrics provides a vast number of measurements. The following command encompasses the most useful ones: sudo powermetrics --samplers tasks --show-process-coalition --show-process-gpu -n 1 -i 5000 --samplers tasks tells it to just do per-process measurements. --show-process-coalition tells it to group coalitions of related processes, e.g. the Firefox parent process and
child processes. --show-process-gpu tells it to show per-process GPU measurements. -n 1 tells it to take one sample and then stop. -i 5000 tells it to use a sample length of 5 seconds (5000 ms). Change this number to get shorter or longer samples. The following is example output from such an invocation: *** Sampled system activity (Fri Sep 4 17:15:14 2015 +1000) (5009.63ms elapsed) *** *** Runn...
...9.18 10.58 5.59 124.55 63.48 0.00 This sample was taken while the following programs were running: Firefox Beta (single process, invoked from the Mac OS dock, shown in the org.mozilla.firefox coalition.) Firefox Nightly (multi-process, invoked from the command line, shown in the com.apple.Terminal coalition.) Google Chrome. Safari. The grouping of parent and
child processes (in coalitions) is obvious. The meaning of the columns is as follows. Name: Coalition/process name. Process names within coalitions are indented. ID: Coalition/process ID number. CPU ms/s: CPU time used by the coalition/process, per second, during the sample period. The sum of the process values typically exceeds the coalition value slightly, for unknown reasons. User%: Percentage...
SavedFrame
captured, allocated, and live within the compartment that is being observed or debugged. Usually this is a content compartment. Capturing SavedFrame Stacks From C++ Use JS::CaptureCurrentStack declared in jsapi.h. From JS Use saveStack, accessible via Components.utils.getJSTestingFunction(). Including and Excluding Chrome Frames Consider the following SavedFrame stack. Arrows represent links from
child to parent frame, content.js is from a compartment with content principals, and chrome.js is from a compartment with chrome principals. function A from content.js | V function B from chrome.js | V function C from content.js The content compartment will ever have one view of this stack: A -> C. However, a chrome compartment has a choice: it can either...
...ack frame, as a string. line The line number for this stack frame. column The column number for this stack frame. functionDisplayName Either SpiderMonkeyaEUR(TM)s inferred name for this stack frameaEUR(TM)s function, or null. asyncCause If this stack frame is the asyncParent of other stack frames, then this is a string representing the type of asynchronous call by which this frame invoked its
children. For example, if this frameaEUR(TM)s
children are calls to handlers for a promise this frame created, this frameaEUR(TM)s asyncCause would be "Promise". If the asynchronous call was started in a descendant frame to which the requester of the property does not have access, this will be the generic string "Async". If this is not an asynchronous call point, this will be null. asyncParent If this...
Gecko events
a layout occurance and is thus asynchronous Is Supported: yes EVENT_ASYNCH_SIGNIFICANT_CHANGE An object had a significant layout change which could affect the type of accessible object -- this is a layout occurance and is thus asynchronous Is Supported: yes EVENT_ACTIVE_DECENDENT_CHANGED The active descendant of a component has changed. The active descendant is used in objects with transient
children. Is Supported: no EVENT_FOCUS An object has received the keyboard focus. Is Supported: yes EVENT_STATE_CHANGE An object's state has changed. Is Supported: yes States: STATE_FOCUSED, STATE_BUSY, XXX: EVENT_LOCATION_CHANGE An object has changed location, shape, or size. Is Supported: no EVENT_NAME_CHANGE An object's Name property has changed. Is Supported: yes Targets: TABLE_CELL - th...
...NT_HYPERTEXT_NLINKS_CHANGED The number of hyperlinks associated with a hypertext object changed. EVENT_OBJECT_ATTRIBUTE_CHANGED An object's attributes changed. Also see EVENT_TEXT_ATTRIBUTE_CHANGED. EVENT_PAGE_CHANGED A slide changed in a presentation document or a page boundary was crossed in a word processing document. EVENT_INTERNAL_LOAD Used internally in Gecko. EVENT_REORDER An object's
children have changed ...
Building the WebLock UI
nippet introduces a couple of new general layout widgets in XUL. The separator that appears at the top of this snippet creates a little divider between widgets like the kind you see in menus that divide sets of functionality available there. The parent of the textbox that users enter an URL into is something called an <hbox/>, which is a layout widget - often invisible - that controls the way its
child elements are rendered. In this case the <hbox/> centers the textbox and the button
children, and it orients them horizontally (in contrast to the <vbox/>, which orients its
children vertically). Notice also that when it's clicked, the button executes a JavaScript function called addThisSite(), which we've already defined in the weblock.js file in Client Code Overview above. weblock.xul <?xml v...
...ock();" status="none"/> </statusbar> </overlay> Note that the root element for this file is not a <window/> but an <overlay/>. In overlays the ordinarily unique id attributes that XUL elements use to distinguish themselves are purposely made redundant with UI in the existing browser with which they should be merged. In this case, the weblock <statusbarpanel/> appears as a
child of the <statusbar/> element with id "status-bar". This id is the same one used by the <statusbar/> in navigator.xul, which means that the overlay mechanism will merge the new UI here (i.e., the weblock statusbarpanel) and the UI already defined within that browser <statusbar/> at runtime. Other Resources This chapter describes the remaining files that must be added to and packaged up with the W...
Interfacing with the XPCOM cycle collector
N, for nonzero N). Periodically the collector wakes up and examines any suspicious pointers that have been sitting in its buffer for a while. This is the scanning stage of the collector's operation. In this stage the collector repeatedly asks each candidate for a singleton cycle-collection helper class, and if that helper exists, the collector asks the helper to describe the candidate's (owned)
children. This way the collector builds a picture of the ownership subgraph reachable from suspicious objects. If the collector finds a group of objects that all refer back to one another, and establishes that the objects' reference counts are all accounted for by internal pointers within the group, it considers that group cyclical garbage, which it then attempts to free. This is the unlinking stage o...
...' reference counts are all accounted for by internal pointers within the group, it considers that group cyclical garbage, which it then attempts to free. This is the unlinking stage of the collectors operation. In this stage the collector walks through the garbage objects it has found, again consulting with their helper objects, asking the helper objects to "unlink" each object from its immediate
children. Note that the collector also knows how to walk through the JS heap, and can locate ownership cycles that pass in and out of it. How the collector can fail The cycle collector is a conservative device. There are situations in which it will fail to collect a garbage cycle. It does not suspect any pointers by default; objects must suspect themselves, typically by using an nsCycleCollecting...
IAccessible2
ll the objects at the same group level. Return value S_FALSE if no values are valid. S_OK if at least one value is valid. indexInParent() Returns the index of this object in its parent object. [propget] HRESULT indexInParent( [out] long indexInParent ); Parameters indexInParent 0 based; -1 indicates there is no parent; the upper bound is the value returned by the parent's IAccessible::get_acc
ChildCount. Return value S_FALSE if no parent, [out] value is -1. S_OK. locale() Returns the IA2Locale of the accessible object. [propget] HRESULT locale( [out] IA2Locale locale ); Parameters locale Return value S_OK. localizedExtendedRole() Returns the localized extended role. [propget] HRESULT localizedExtendedRole( [out] BSTR localizedExtendedRole ); Parameters localizedExtendedRole Ret...
...tes( [out] AccessibleStates states ); Parameters states Return value S_OK. uniqueID() Returns the unique ID. The uniqueID is an identifier for this object, is unique within the current window, and remains the same for the lifetime of the accessible object. The uniqueID is not related to: The MSAA objectID which is used by the server to disambiguate between IAccessibles per HWND or The MSAA
childID which is used to disambiguate between
children being managed by an IAccessible. This value is provided so the AT can have access to a unique runtime persistent identifier even when not handling an event for the object. An example of when this value is useful is if the AT wants to build a cache. The AT could cache the uniqueIDs in addition to other data being cached. When an event is fired the A...
nsIDOMWindow
dom/interfaces/base/nsIDOMWindow.idlScriptable This interface is the primary interface for a window object. It represents a single window object that may contain
child windows if the document in the window contains an HTML frameset document, or if the document contains iframe elements. 66 Introduced Gecko 1.0 Deprecated Gecko 44 Inherits from: nsISupports Last changed in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) Starting with Firefox 44, this file is empty as its features were either no longer used or are only available from C++ code; see dom/base/nsPIDOMWindow.h for those. While this interface is not officially defined by any standard bodies, it originates from the de-facto DOM Level 0 standard. Starting in Firefox 3, DOM windows...
...izeToContent(); Attributes Attribute Type Description applicationCache nsIDOMOfflineResourceList Get the application cache object for this window. Read only. Note: Prior to Gecko 7.0 this attribute was part of nsIDOMWindow2. document nsIDOMDocument The document contained in the window. Read only. frames nsIDOMWindowCollection The
child windows for this window. Read only. Native code only! globalStorage nsIDOMStorageList Global storage, accessible by domain. Read only. Note: Prior to Gecko 8.0 this attribute was part of nsIDOMStorageWindow. localStorage nsIDOMStorage Local storage for the current browsing context. Data stored in local storage may only be accessed from the same origin that inserted t...
nsIEditor
DOMNode createNode(in AString tag, in nsIDOMNode parent, in long position); void insertNode(in nsIDOMNode node, in nsIDOMNode parent, in long aPosition); void splitNode(in nsIDOMNode existingRightNode, in long offset, out nsIDOMNode newLeftNode); void joinNodes(in nsIDOMNode leftNode, in nsIDOMNode rightNode, in nsIDOMNode parent); void deleteNode(in nsIDOMNode
child); void markNodeDirty(in nsIDOMNode node); Direction Controller void switchTextDirection(); Output Methods AString outputToString(in AString formatType, in unsigned long flags); Example: // flags are declared in base/public/nsIDocumentEncoder.idl // OutputSelectionOnly = 1, OutputFormatted = 2, // OutputRaw = 4, Outp...
...// tag name are in lower case with <br>. editorAPI.outputToString('text/html', 8); // XML: all in xml with _moz_dirty="" in new tags, HTML tags are in upper case // application/xhtml+xml format do the same editorAPI.outputToString('text/xml', 2); // the body is not recognized, everything is printed void outputToStream(in nsIOutputStream aStream, ...
place-self - CSS: Cascading Style Sheets
lock and inline directions. ...
...container"> <span>First</span> <span>Second</span> <span>Third</span> <span>Fourth</span> </article> CSS html { font-family: helvetica, arial, sans-serif; letter-spacing: 1px; } article { background-color: red; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 80px; grid-gap: 10px; width: 300px; } span:nth-
child(2) { place-self: start center; } span:nth-
child(3) { place-self: center start; } span:nth-
child(4) { place-self: end; } article span { background-color: black; color: white; margin: 1px; text-align: center; } article, span { padding: 10px; border-radius: 7px; } article { margin: 20px; } Result Specifications Specification Status Comment CSS Box Alignment Module Level 3The definition of 'pl...
position - CSS: Cascading Style Sheets
positioned relative to the ICB (initial containing block -- see also the W3C definition), which is the containing block of the document's root element. HTML <h1>Absolute positioning</h1> <p>I am a basic block level element. My adjacent block level elements sit on new lines below me.</p> <p class="positioned">By default we span 100% of the width of our parent element, and we are as tall as our
child content. Our total width and height is our content + padding + border width/height.</p> <p>We are separated by our margins. Because of margin collapsing, we are separated by the width of one of our margins, not both.</p> <p>inline elements <span>like this one</span> and <span>this one</span> sit on the same line as one another, and adjacent text nodes, if there is space on the same line. Overfl...
...ollapse applied to them (bug 1379306).Notes Before Firefox 30, absolute positioning of table rows and row groups was not supported (bug 63895).Opera Android Full support 14Safari iOS Full support 1Samsung Internet Android Full support 1.0Absolutely-positioned flex
childrenChrome Full support 52Edge Full support 12Firefox Full support 52IE Full support 10Opera Full support 39Safari Full support 11W...
transform-style - CSS: Cascading Style Sheets
The transform-style CSS property sets whether
children of an element are positioned in the 3D space or are flattened in the plane of the element. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. If flattened, the element's
children will not exist on their own in the 3D-space. As this property is not inherited, it must be set for all non-leaf descendants of the element. ...
...st. If flattened, the element's
children will not exist on their own in the 3D-space. As this property is not inherited, it must be set for all non-leaf descendants of the element. Syntax /* Keyword values */ transform-style: flat; transform-style: preserve-3d; /* Global values */ transform-style: inherit; transform-style: initial; transform-style: unset; Values flat Indicates that the
children of the element are lying in the plane of the element itself. preserve-3d Indicates that the
children of the element should be positioned in the 3D-space. Formal definition Initial valueflatApplies totransformable elementsInheritednoComputed valueas specifiedAnimation typediscreteCreates stacking contextyes Formal syntax flat | preserve-3d Examples Transform style demonstration In thi...
Video player styling basics - Developer guides
A value for margin-left is also set, but the first element (in this case the play/pause button) has this property overridden by the va...
...idth of nearly 4% (again the actual value was calculated based on the required dimensions of the buttons), and a height of 100%. A value for margin-left is also set, but the first element (in this case the play/pause button) has this property overridden by the value 0. 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. Each button has some basic styling: .controls button { border:none; cursor:pointer; background:transparent; background-size:contain; ...
Printing - Developer guides
e a hidden <iframe> (see: HTMLIFrameElement), automatically removing it after the user prints its contents. ...
... ...
HTML attribute reference - HTML: Hypertext Markup Language
<embed>, <iframe>, <img>, <input>, <object>, <video> Specifies the height of elements listed here. For all other elements, use the CSS height property. Note: In some instances, such as <div>, this is a legacy attribute, in which case the CSS height property should be used instead. hidden Global attribute Prevents rendering of given element, while keeping
child elements, e.g. script elements, active. high <meter> Indicates the lower bound of the upper range. href <a>, <area>, <base>, <link> The URL of a linked resource. hreflang <a>, <area>, <link> Specifies the language of the linked resource. http-equiv <meta> Defines a pragma directive. icon <command> Specifies a picture which...
...rea>, <base>, <form> Specifies where to open the linked document (in the case of an <a> element) or where to display the response recieved (in the case of a <form> element) title Global attribute Text to be displayed in a tooltip when hovering over the element. translate Global attribute Specify whether an element's attribute values and the values of its Text node
children are to be translated when the page is localized, or whether to leave them unchanged. type <button>, <input>, <command>, <embed>, <object>, <script>, <source>, <style>, <menu> Defines the type of the element. usemap <img>, <input>, <object> value <button>, <data>, <input>, <li>, <meter>, <option>, <progress>, <param> Defines a default value which wi...
<col> - HTML: Hypertext Markup Language
<col> element belongs too. If there are none, the left value is assumed. Note: To achieve the same effect as the left, center, right or justify values: Do not try to set the text-align property on a selector giving a <col> element. Because <td> elements are not descendant of the <col> element, they won't inherit it. If the table doesn't use a colspan attribute, use the td:nth-
child(an+b) CSS selector. Set a to zero and b to the position of the column in the table, e.g. td:nth-
child(2) { text-align: right; } to right-align the second column. If the table does use a colspan attribute, the effect can be achieved by combining adequate CSS attribute selectors like [colspan=n], though this is not trivial. bgcolor The background color of the table. It is a 6...
...it is possible; middle, which will center the text in the cell; and top, which will put the text as close to the top of the cell as it is possible. Note: Do not try to set the vertical-align property on a selector giving a <col> element. Because <td> elements are not descendant of the <col> element, they won't inherit it. If the table doesn't use a colspan attribute, use the td:nth-
child(an+b) CSS selector where a is the total number of the columns in the table and b is the ordinal position of the column in the table. Only after this selector the vertical-align property can be used. If the table does use a colspan attribute, the effect can be achieved by combining adequate CSS attribute selectors like [colspan=n], though this is not trivial. width This attribute speci...
<hgroup> - HTML: Hypertext Markup Language
3C) specification provides advice on how to mark up Subheadings, subtitles, alternative titles and taglines without using <hgroup>. The <hgroup> element allows the primary heading for a document section to be grouped with any secondary headings--such as subheadings or alternative titles--to form a multi-level heading. ...
...group> element allows the primary heading for a document section to be grouped with any secondary headings--such as subheadings or alternative titles--to form a multi-level heading. In other words, the <hgroup> element prevents any of its secondary <h1>-<h6>
children from creating separate sections of their own in the outline--as those <h1>-<h6> elements otherwise normally would if they were not
children of any <hgroup>. So in the abstract outline produced by the HTML outline algorithm defined in the HTML specification, the <hgroup> as a whole forms a single logical heading, with the entire set of <h1>-<h6>
children of the <hgroup> going into the outline as one multi-level unit, to comprise that single logical heading in the abstract outline. To produce any (non-abstract) rendered view of su...
<menu> - HTML: Hypertext Markup Language
The HTML <menu> element represents a group of commands that a user can perform or activate. This includes both list menus, which might appear across the top of a screen, as well as context menus, such as those that might appear underneath a button after it has been clicked. Content categories Flow content. If the element's
children include at least one <li> element: Palpable content. Permitted content If the element is in the list menu state: flow content, or alternatively, zero or more occurrences of <li>, <script>, and <template>. (list menu is the default state, unless the parent element is a <menu> in the context menu state.) If the element is in the context menu state: zero or more occurrences, in any order, of <menu> (context menu state only)...
...ent, or as context menu for an element with a contextmenu attribute. This value is the default if the attribute is missing and the parent element is also a <menu> element. toolbar: Indicates the toolbar state, which represents a toolbar consisting of a series of commands for user interaction. 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. This value is the default if the attribute is missing. Usage notes The <menu> and <ul> elements both represent an unordered list of items. The key difference is that <ul> primarily contains items for display, whilst <menu> is intended for interactive items, to act on. An HTML menu can be used to create context menus (typically activated by r...
<picture>: The Picture element - HTML: Hypertext Markup Language
If no matches are found--or the browser doesn't support the <picture> element--the URL of the <img> element's src attribute is selected. The selected image is then presented in the space occupied by the <img> element. The source for this interactive example is stored in a GitHub repository. ...
... Permitted ARIA roles No role permitted DOM interface HTMLPictureElement Attributes This element includes only global attributes. Usage notes You can use the object-position property to adjust the positioning of the image within the element's frame, and the object-fit property to control how the image is resized to fit within the frame. Note: Use these properties on the
child <img> element, not the <picture> element. Examples These examples demonstrate how different attributes of the <source> element change the selection of the image inside <picture>. The media attribute The media attribute specifies a media condition (similar to a media query) that the user agent will evaluate for each <source> element. If the <source>'s media condition evaluates to false, the ...
<tbody>: The Table Body element - HTML: Hypertext Markup Language
-examples and send us a pull request. The <tbody> element, along with its cousins <thead> and <tfoot>, provide useful semantic information that can be used when rendering for either screen or printer as well as for accessibility purposes. Content categories None. Permitted content Zero or more <tr> elements. Tag omission The <tbody> element is not a required
child element for a parent <table> element to graphically render. However, it must not be present, if its parent <table> element has a <tr> element as a
child. Permitted parents Within the required parent <table> element, the <tbody> element can be added after a <caption>, <colgroup>, and a <thead> element. Implicit ARIA role rowgroup Permitted ARIA roles Any ...
...n the cell; and top, which will put the text as close to the top of the cell as it is possible. As this attribute is deprecated, use the CSS vertical-align property instead. Usage notes If the table includes a <thead> block (to semantically identify header rows), the <tbody> block must come after it. 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>. All non-header and non-footer rows must be inside the <tbody> if one is used. When printing a document, the <thead> and <tfoot> elements specify information that may be the same--or at least very similar--on every page of a multi-page table, while the <tbody> element's contents generally will differ from page to page. When a table is presen...
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
It lets you specify timed text tracks (or time-based data), for example to automatically handle subtitles. The tracks are formatted in WebVTT format (.vtt files) -- Web Video Text Tracks. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Content categories None Permitted content None, it is an empty element. Tag omission As it is a void element, the start tag must be present and the end tag must not be present. ...
...A media element cannot have more than one track with the same kind, srclang, and label. Detecting cue changes The underlying TextTrack, indicated by the track property, receives a cuechange event every time the currently-presented cue is changed. This happens even if the track isn't associated with a media element. If the track is associated with a media element, using the <track> element as a
child of the <audio> or <video> element, the cuechange event is also sent to the HTMLTrackElement. let textTrackElem = document.getElementById("texttrack"); textTrackElem.addEventListener("cuechange", (event) => { let cues = event.target.track.activeCues; }); In addition, you can use the oncuechange event handler: let textTrackElem = document.getElementById("texttrack"); textTrackElem.oncuechan...
HTML documentation index - HTML: Hypertext Markup Language
Global attributes, HTML, Reference, Title The title global attribute contains text representing advisory information related to the element it belongs to. 33 translate Experimental, Global attributes, HTML, Reference The translate global attribute is an enumerated attribute that is used to specify whether an element's translateable attribute values and its Text node
children should be translated when the page is localized, or whether to leave them unchanged. 34 x-ms-acceleratorkey Attribute, HTML, HTML:Microsoft Extensions, Non-standard, Reference, x-ms-acceleratorkey The x-ms-acceleratorkey attribute accessibly declares that an accelerator key has been assigned to an element: the element is activated via JavaScript when the key(s) are pressed...
...g, tr, tr tag The HTML <tr> element defines a row of cells in a table. The row's cells can then be established using a mix of <td> (data cell) and <th> (header cell) elements. 213 <track>: The Embed Text Track element Accessibility, Cues, Element, HTML, HTML embedded content, HTML5, Multimedia, Reference, TextTrack, Web, a11y, track The HTML <track> element is used as a
child of the media elements, <audio> and <video>. It lets you specify timed text tracks (or time-based data), for example to automatically handle subtitles. 214 <tt>: The Teletype Text element (obsolete) Element, HTML, Monospace, Monotype, Non-proportional Type, Obsolete, Reference, Teletype, Teletype Text, Web, font-family, tt The obsolete HTML Teletype Text element (<tt>) creates...
Content-Security-Policy - HTTP
Content Security Policy (CSP). Header type Response header Forbidden header name no Syntax Content-Security-Policy: <policy-directive>; <policy-directive> where <policy-directive> consists of: <directive> <value> with no internal punctuation. Directives Fetch directives Fetch directives control the locations from which certain resource types may be loaded.
child-src Defines the valid sources for web workers and nested browsing contexts loaded using elements such as <frame> and <iframe>. Instead of
child-src, if you want to regulate nested browsing contexts and workers, you should use the frame-src and worker-src directives, respectively. connect-src Restricts the URLs which can be loaded using script interfaces default-src Serves as a fall...
...deprecates frame-src. Deprecates report-uri in favor if report-to. Mixed Content Candidate Recommendation Adds block-all-mixed-content. Subresource Integrity Recommendation Adds require-sri-for. Upgrade Insecure Requests Candidate Recommendation Adds upgrade-insecure-requests. Content Security Policy Level 2 Recommendation Adds base-uri,
child-src, form-action, frame-ancestors, plugin-types, referrer, and report-uri. Deprecates frame-src. Content Security Policy 1.0 Obsolete Defines connect-src, default-src, font-src, frame-src, img-src, media-src, object-src, report-uri, sandbox, script-src, and style-src. ...
Feature-Policy: fullscreen - HTTP
This directive allows or prevents cross-origin frames from using fullscreen mode. This includes same-origin frames. If both this directive (i.e. ...
...l example SecureCorp Inc. wants to disable the Fullscreen API within all browsing contexts except for its own origin and those whose origin is https://example.com. It can do so by delivering the following HTTP response header to define a feature policy: Feature-Policy: fullscreen 'self' https://example.com With an <iframe> element FastCorp Inc. wants to disable fullscreen for all cross-origin
child frames, except for a specific <iframe>. It can do so by delivering the following HTTP response header to define a feature policy: Feature-Policy: fullscreen 'self' Then include an allow attribute on the <iframe> element: <iframe src="https://other.com/videoplayer" allow="fullscreen"></iframe> iframe attributes can selectively enable features in certain frames, and not in others, even if those...
Feature-Policy: geolocation - HTTP
Feature-Policy header geolocation directive controls whether the current document is allowed to use the Geolocation Interface. When this policy is enabled, calls to getCurrentPosition() and watchPosition() will cause those functions' callbacks to be invoked with a PositionError code of PERMISSION_DENIED. By default, the Geolocation API can be used within top-level documents and their same-origin
child frames. This directive allows or prevents cross-origin frames from accessing geolocation. This includes same-origin frames. Syntax Feature-Policy: geolocation <allowlist>; <allowlist> An allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: The feature will be allowed in this document, and all nested browsing contexts (iframes) regardless ...
...xample SecureCorp Inc. wants to disable the Geolocation API within all browsing contexts except for its own origin and those whose origin is https://example.com. It can do so by delivering the following HTTP response header to define a feature policy: Feature-Policy: geolocation 'self' https://example.com With an <iframe> element FastCorp Inc. wants to disable geolocation for all cross-origin
child frames, except for a specific <iframe>. It can do so by delivering the following HTTP response header to define a feature policy: Feature-Policy: geolocation 'self' Then include an allow attribute on the <iframe> element: <iframe src="https://other.com/map" allow="geolocation"></iframe> iframe attributes can selectively enable features in certain frames, and not in others, even if those frame...
A re-introduction to JavaScript (JS tutorial) - JavaScript
block scope in C: var a = 1; var b = 2; (function() { var b = 3; a += b; })(); a; // 4 b; // 2 JavaScript allows you to call functions recursively. This is particularly useful for dealing with tree structures, such as those found in the browser DOM. function countChars(elm) { if (elm.nodeType == 3) { // TEXT_NODE return elm.nodeValue.length; } var count = 0; for (var i = 0,
child;
child = elm.
childNodes[i]; i++) { count += countChars(
child); } return count; } This highlights a potential problem with anonymous functions: how do you call them recursively if they don't have a name? JavaScript lets you name function expressions for this. You can use named IIFEs (Immediately Invoked Function Expressions) as shown below: var charsInBody = (function counter(elm) { i...
... potential problem with anonymous functions: how do you call them recursively if they don't have a name? JavaScript lets you name function expressions for this. You can use named IIFEs (Immediately Invoked Function Expressions) as shown below: var charsInBody = (function counter(elm) { if (elm.nodeType == 3) { // TEXT_NODE return elm.nodeValue.length; } var count = 0; for (var i = 0,
child;
child = elm.
childNodes[i]; i++) { count += counter(
child); } return count; })(document.body); The name provided to a function expression as above is only available to the function's own scope. This allows more optimizations to be done by the engine and results in more readable code. The name also shows up in the debugger and some stack traces, which can save you time when debugging. N...
Classes - JavaScript
nd on internals, which may change version to version. Private fields can only be declared up-front in a field declaration. Private fields cannot be created later through assigning to them, the way that normal properties can. For more information, see private class fields. Sub classing with extends The extends keyword is used in class declarations or class expressions to create a class as a
child of another class. class Animal { constructor(name) { this.name = name; } speak() { console.log(`${this.name} makes a noise.`); } } class Dog extends Animal { constructor(name) { super(name); // call the super class constructor and pass in the name parameter } speak() { console.log(`${this.name} barks.`); } } let d = new Dog('Mitzie'); d.speak(); // Mitzie bark...
...call super() before using "this". One may also extend traditional function-based "classes": function Animal (name) { this.name = name; } Animal.prototype.speak = function () { console.log(`${this.name} makes a noise.`); } class Dog extends Animal { speak() { console.log(`${this.name} barks.`); } } let d = new Dog('Mitzie'); d.speak(); // Mitzie barks. // For similar methods, the
child's method takes precedence over parent's method Note that classes cannot extend regular (non-constructible) objects. If you want to inherit from a regular object, you can instead use Object.setPrototypeOf(): const Animal = { speak() { console.log(`${this.name} makes a noise.`); } }; class Dog { constructor(name) { this.name = name; } } // If you do not do this you will get a Ty...
export - JavaScript
ingle value or to have a fallback value for your module, you could use a default export: // module "my-module.js" export default function cube(x) { return x * x * x; } Then, in another script, it is straightforward to import the default export: import cube from './my-module.js'; console.log(cube(3)); // 27 Using export from Let's take an example where we have the following hierarchy:
childModule1.js: exporting myFunction and myVariable
childModule2.js: exporting myClass parentModule.js: acting as an aggregator (and doing nothing else) top level module: consuming the exports of parentModule.js This is what it would look like using code snippets: // In
childModule1.js let myFunction = ...; // assign something useful to myFunction let myVariable = ...; // assign something useful...
...dule2.js: exporting myClass parentModule.js: acting as an aggregator (and doing nothing else) top level module: consuming the exports of parentModule.js This is what it would look like using code snippets: // In
childModule1.js let myFunction = ...; // assign something useful to myFunction let myVariable = ...; // assign something useful to myVariable export {myFunction, myVariable}; // In
childModule2.js let myClass = ...; // assign something useful to myClass export myClass; // In parentModule.js // Only aggregating the exports from
childModule1 and
childModule2 // to re-export them export { myFunction, myVariable } from '
childModule1.js'; export { myClass } from '
childModule2.js'; // In top-level module // We can consume the exports from a single module since parentModule // "coll...
<maction> - MathML
Attributes actiontype The action which specifies what happens for this element. Possible values are: statusline: If there is a click on the expression or the reader moves the pointer over it, the message is sent to the browser's status line. ...
... The syntax is: <maction actiontype="tooltip"> expression message </maction>. class, id, style Provided for use with stylesheets. href Used to set a hyperlink to a specified URI. mathbackground The background color. You can use #rgb, #rrggbb and HTML color names. mathcolor The text color and also the fraction line color. You can use #rgb, #rrggbb and HTML color names. selection The
child element which is addressed by the action. The default value is 1, which is the first
child element. Examples The following example uses the "toggle" actiontype: <math> <maction actiontype="toggle"> <mfrac> <mn>6</mn> <mn>8</mn> </mfrac> <mfrac> <mrow> <mn>3</mn> <mo>⋅</mo> <mn>2</mn> </mrow> <mrow> <mn>4</mn> <mo>⋅</mo> ...
display - SVG: Scalable Vector Graphics
The display attribute lets you control the rendering of graphical or container elements. A value of display="none" indicates that the given element and its
children will not be rendered. Any value other than none or inherit indicates that the given element will be rendered by the browser. 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. This means that any
child of an element with display="none" will never be rendered even if the
child has a value for display other than none. When the display attribute is set to none, then the given element does not become part of the rendering tree. It has implications for the <tspan>, <tref>, and <altGlyph> elements, event processing, ...
...vent that element from getting rendered directly onto the canvas, but the <path> element can still be referenced by a <textPath> element; furthermore, its geometry will be used in text-on-a-path processing even if the <path> has a display value of none. This attribute also affects direct rendering into offscreen canvases, such as occurs with masks or clip paths. Thus, setting display="none" on a
child of a <mask> will prevent the given
child element from being rendered as part of the mask. Similarly, setting display="none" on a
child of a <clipPath> element will prevent the given
child element from contributing to the clipping path. Note: As a presentation attribute, display can be used as a CSS property. See css display for further information. As a presentation attribute, it can be applied...
<g> - SVG: Scalable Vector Graphics
It can also group multiple elements to be referenced later with the <use> element. ...
...It can also group multiple elements to be referenced later with the <use> element. ...
<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. Other direct
children will be bypassed and therefore not rendered. If a
child element is a container element, like <g>, then its subtree is also processed/rendered or bypassed/not rendered. The display and visibility properties have no effect on <switch> element processing. In particular, setting display:none on a
child has no effect on the true/false testing for <switch> processing. Usage context CategoriesContainer elementPermitted contentAny number of the following elements, in any order:Animation elementsDescriptive elementsShape elements<a>, <foreignObject>, <g>, <imag...
...itional processing attributes Core attributes Graphical event attributes Presentation attributes class style externalResourcesRequired transform DOM Interface This element implements the SVGSwitchElement interface. SVG <switch> example This example demonstrates showing different text content depending on the browser's language settings. 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. HTML Content <svg viewBox="0 -20 100 50"> <switch> <text systemLanguage="ar">?????</text> <text systemLanguage="de,nl">Hallo!</text> <text systemLanguage="en-us">Howdy!</text> <text systemLanguage="en-gb">Wotcha!</text> ...
Axes - XPath
section in the xpath spec. ancestor Indicates all the ancestors of the context node beginning with the parent node and traveling through to the root node. ancestor-or-self Indicates the context node and all of its ancestors, including the root node. attribute Indicates the attributes of the context node. Only elements have attributes. This axis can be abbreviated with the at sign (@).
child Indicates the
children of the context node. If an XPath expression does not specify an axis, this is understood by default. Since only the root node or element nodes have
children, any other use will select nothing. descendant Indicates all of the
children of the context node, and all of their
children, and so forth. Attribute and namespace nodes are not included - the parent of an attribute n...
...h expression does not specify an axis, this is understood by default. Since only the root node or element nodes have
children, any other use will select nothing. descendant Indicates all of the
children of the context node, and all of their
children, and so forth. Attribute and namespace nodes are not included - the parent of an attribute node is an element node, but attribute nodes are not the
children of their parents. descendant-or-self Indicates the context node and all of its descendants. Attribute and namespace nodes are not included - the parent of an attribute node is an element node, but attribute nodes are not the
children of their parents. following Indicates all the nodes that appear after the context node, except any descendant, attribute, and namespace nodes. following-sibl...
Comparison of CSS Selectors and XPath - XPath
e: XSLT elements, EXSLT functions, XPath functions, XPath axes This article seeks to document the difference between CSS Selectors and XPath for web developers to be able to better choose the right tool for the right job. ...
...ts, EXSLT functions, XPath functions, XPath axes This article seeks to document the difference between CSS Selectors and XPath for web developers to be able to better choose the right tool for the right job. ...
Introduction to using XPath in JavaScript - XPath
will be given below. var xpathResult = document.evaluate( xpathExpression, contextNode, namespaceResolver, resultType, result ); Parameters The evaluate function takes a total of five parameters: xpathExpression: A string containing the XPath expression to be evaluated. contextNode: A node in the document against which the xpathExpression should be evaluated, including any and all of its
child nodes. The document node is the most commonly used. namespaceResolver: A function that will be passed any namespace prefixes contained within xpathExpression which returns a string representing the namespace URI associated with that prefix. This enables conversion between the prefixes used in the XPath expressions and the possibly different prefixes used in the document. The function can be eith...
...or;1"].createInstance(Components.interfaces.nsIDOMXPathEvaluator) Appendix Implementing a User Defined Namespace Resolver This is an example for illustration only. This function will need to take namespace prefixes from the xpathExpression and return the URI that corresponds to that prefix. For example, the expression: '//xhtml:td/mathml:math' will select all MathML expressions that are the
children of (X)HTML table data cell elements. In order to associate the 'mathml:' prefix with the namespace URI 'http://www.w3.org/1998/Math/MathML' and 'xhtml:' with the URI 'http://www.w3.org/1999/xhtml' we provide a function: function nsResolver(prefix) { var ns = { 'xhtml' : 'http://www.w3.org/1999/xhtml', 'mathml': 'http://www.w3.org/1998/Math/MathML' }; return ns[prefix] || null; ...
Advanced Example - XSLT: Extensible Stylesheet Language Transformations
xmlRef = document.implementation.createDocument("", "", null); // we want to move a part of the DOM from an HTML document to an XML document. ...
...ter(null, "myOrder", "ascending"); else xsltProcessor.setParameter(null, "myOrder", "descending"); // initiate the transformation var fragment = xsltProcessor.transformToFragment(xmlRef, document); // clear the contents document.getElementById("example").innerHTML = ""; myDOM = fragment; // add the new content from the transformation document.getElementById("example").append
Child(fragment) } // XSL Stylesheet: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes" /> <xsl:param name="myOrder" /> <xsl:template match="/"> <xsl:apply-templates select="/div//div"> <xsl:sort se...