Search completed in 1.29 seconds.
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.
... with(node) { remove(); } // referenceerror: remove is not defined polyfill you can polyfill the remove() method in internet explorer 9 and higher with the following code: // from:https://github.com/jserz/js_piece/blob/master/dom/
childnode/remove()/remove().md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('remove')) { return; } object.defineproperty(item, 'remove', { configurable: true, enumerable: true, writable: true, value: function remove() { this.parentnode.remove
child(this); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); specifications specification status comment domthe definition o...
...f '
childnode.remove' in that specification.
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.
... (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...
...rz/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) { return el; } } return null; }, set: undefined }); }); })([element.prototype, characterdata.prototype]); specifications specification status comment domthe definition of '
childnodenextelementsibling' in that specification.
... living standard split the elementtraversal interface in
childnode, parentnode, and nondocumenttype
childnode.
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.
...div polyfills polyfill for internet explorer 8 this property is unsupported prior to ie9, so the following snippet can be used to add support to ie8: // source: https://github.com/alhadis/snippets/blob/master/js/polyfills/ie8-
child-elements.js if(!("previouselementsibling" 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/maste...
...r/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.nodetype === 1) { return el; } } return null; }, set: undefined }); }); })([element.prototype, characterdata.prototype]); specifications specification status comment domthe definition of 'nondocumenttype
childnode.previouselementsibling' in that specification.
... living standard splitted the elementtraversal interface in
childnode, parentnode, and nondocumenttype
childnode.
: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.
... syntax :last-
child examples basic example html <div> <p>this text isn't selected.</p> <p>this text is selected!</p> </div> <div> <p>this text 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 tha...
... selectors level 3the definition of ':last-
child' in that specification.
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>.
... 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.
... 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.
... content security policy level 2the definition of '
child-src' in that specification.
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...
...ributes(), 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="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, treerow, treecell and treeseparator.
Children
« nsiaccessible page summary array of all this node's
children.
... attribute nsiarray
children; remark every
child node in the array implements nsiaccessible interface.
... see also nsiaccessible.first
child nsiaccessible.last
child nsiaccessible.
childcount nsiaccessible.get
childat() nsiaccessible.parent nsiaccessible.nextsibling nsiaccessible.previoussibling ...
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.
... see also nsiaccessible.last
child nsiaccessible.
children nsiaccessible.
childcount nsiaccessible.get
childat() nsiaccessible.parent nsiaccessible.nextsibling nsiaccessible.previoussibling ...
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.
... see also nsiaccessible.first
child nsiaccessible.
children nsiaccessible.
childcount nsiaccessible.get
childat() nsiaccessible.parent nsiaccessible.nextsibling nsiaccessible.previoussibling ...
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.
... example let foo = document.getelementbyid('foo'); if (foo.has
childnodes()) { // do something with 'foo.
childnodes' } polyfill here is one possible polyfill: ;(function(prototype) { prototype.has
childnodes = prototype.has
childnodes || function() { return !!this.first
child; } })(node.prototype); there are various ways to determine whether the node has a
child node: node.has
childnodes() node.first
child != null (or just node.first
child) node.
childnodes && node.
childnodes.length (or node.
childnodes.length > 0) specifications specification status comment domthe definition of 'node: has
childnodes' in that specification.
Selection.selectAllChildren() - Web APIs
the selection.selectall
children() method adds all the
children of the specified node to the selection.
... syntax sel.selectall
children(parentnode) parameters parentnode all
children of parentnode will be selected.
... example html <main> <button>select footer</button> <p>welcome to my website.</p> <p>i hope you enjoy your visit.</p> </main> <footer> <address>webmaster@example.com</address> <p>© 2019</p> </footer> javascript const button = document.queryselector('button'); const footer = document.queryselector('footer'); button.addeventlistener('click', (e) => { window.getselection().selectall
children(footer); }); result specifications specification status comment selection apithe definition of 'selection.selectall
children()' in that specification.
child - Archive of obsolete content
« xul reference
child type: ?
... a variable reference to a node that is expected to be a
child of the element that is referred to by the container element.
lastPermanentChild - Archive of obsolete content
« 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.
ChildCount
« nsiaccessible page summary number of accessible
children.
... attribute long
childcount; see also nsiaccessible.first
child nsiaccessible.last
child nsiaccessible.
children nsiaccessible.get
childat() nsiaccessible.parent nsiaccessible.nextsibling nsiaccessible.previoussibling ...
Index
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().
...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.
...And 26 more matches
Web Replay
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.
...And 23 more matches
Anonymous Content - Archive of obsolete content
an element declared in a bound document using a single tag can then be constructed out of multiple
child elements, and this implementation is hidden from the bound document.
... 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.
...using parentnode, anonymous content nodes can refer to their explicit parents, but explicit parents have no knowledge of their anonymous
children.
...And 22 more matches
Mozilla accessibility architecture
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.
...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 algorithm used to calculate the number of accessible
children for an accessible node is expensive.
...And 22 more matches
Tree View Details - Archive of obsolete content
this is a fairly tricky process as it involves keeping track of which items have
children and also which rows are open and closed.
...the topmost rows are at level 0, the
children of those rows are at level 1, their
children at level 2 and so on.
...all of these methods must be implemented by the view for
children to be handled properly.
...And 21 more matches
Gecko info for Windows accessibility vendors
iaccessible methods that we support: get_accparent get_acc
childcount get_acc
child get_accname get_accvalue get_accdescription get_accrole get_accstate get_accfocus get_accdefaultaction acclocation accselect acchittest accdodefaultaction accnavigate get_acckeyboardshortcut msaa support: iaccessible events and unique id's what msaa events do we support?
... 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.
...And 20 more matches
JXON - Archive of obsolete content
the text content of each element is stored into the keyvalue property, while nodeattributes, if they exist, are listed under the
child object keyattributes.
...ion parsetext (svalue) { if (/^\s*$/.test(svalue)) { return null; } if (/^(?:true|false)$/i.test(svalue)) { return svalue.tolowercase() === "true"; } if (isfinite(svalue)) { return parsefloat(svalue); } if (isfinite(date.parse(svalue))) { return new date(svalue); } return svalue; } function jxontree (oxmlparent) { var nattrlen = 0, nlength = 0, scollectedtxt = ""; if (oxmlparent.has
childnodes()) { for (var onode, sprop, vcontent, nitem = 0; nitem < oxmlparent.
childnodes.length; nitem++) { onode = oxmlparent.
childnodes.item(nitem); if ((onode.nodetype - 1 | 1) === 3) { scollectedtxt += onode.nodetype === 3 ?
... for (var skey in this) { if (ncount === nitem) { return this[skey]; } ncount++; } return null; }; jxontree.prototype.getattribute = function (nattrid) { if (nattrlen === 0 || nattrid + 1 > nattrlen) { return null; } var nattr = 0; for (var sattrname in this.keyattributes) { if (nattr === nattrid) { return this.keyattributes[sattrname]; } nattr++; } return null; }; jxontree.prototype.has
children = function () { return this.keylength > 0; }; */ var myobject = new jxontree(doc); // we got our javascript object!
...And 19 more matches
Message manager overview
in multiprocess firefox there are (at least) two processes: the chrome process, also called the parent process, runs the browser ui (chrome) code and code inserted by extensions one or more content processes, also called
child processes.
... 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.
...And 18 more matches
IAccessibleTable
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().
...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.
...And 18 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...
...cker); 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; 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'; previe...
...w_color.classname = 'preview-color'; this.preview_color = preview_color; preview_box.append
child(preview_color); this.node.append
child(preview_box); }; colorpicker.prototype.newinputcomponent = function newinputcomponent(title, topic, onchangefunc) { var wrapper = document.createelement('div'); var input = document.createelement('input'); var info = document.createelement('span'); wrapper.classname = 'input'; wrapper.setattribute('data-topic', topic); info.textcontent = title; info.classname = 'name'; input.setattribute('type', 'text'); wrapper.append
child(info); wrapper.append
child(input); this.node.append
child(wrapper); input.addeventlistener('change', onchangefunc); input.addeventlistener('click', function() { this.select(); }); this.subscribe(...
...And 18 more matches
More Tree Features - Archive of obsolete content
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 draw the open and close icons to open and close a parent item as well as lines connecting the
children to their parents.
...to create a set of nested rows, all we need to do is add a second tree
children element inside the parent treeitem.
...And 17 more matches
nsINavBookmarksService
obsolete since gecko 2.0 nsiuri getbookmarkuri(in long long aitemid); long long get
childfolder(in long long afolder, in astring asubfolder); obsolete since gecko 2.0 long long getfolderidforitem(in long long aitemid); boolean getfolderreadonly(in long long aitemid); astring getfoldertitle(in print64 folder); obsolete since gecko 1.9 nsiuri getfolderuri(in print64 folder); obsolete since gecko 1.9 long long getidforitemat(in long long apar...
...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...
... createfolder() this method creates a new
child folder and inserts it under the given parent.
...And 16 more matches
nsIWindowsRegKey
method overview void 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 rootk...
...ey, 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 readintvalue(in astring name); astring readstringvalue(in astring name); void remove
child(in astring relpath); void removevalue(in astring name); void startwatching(in boolean recurse); void stopwatching(); void writebinaryvalue(in astring name, in acstring data); void writeint64value(in astring name, in unsigned long long data); void writeintvalue(in astring name, in unsigned long data); void writestringvalue(in astring name, in astring data); attri...
...butes attribute type description
childcount unsigned long this attribute returns the number of
child keys.
...And 16 more matches
Microsummary XML grammar reference - Archive of obsolete content
child elements: <template> (required) defines how to transform pages into their microsummaries.
...
child elements: <stylesheet> or <transform> (required) the xslt stylesheet which performs the transformation.
... per xslt, you may specify the stylesheet
child element using either the <stylesheet> or the <transform> tag, which are interchangeable.
...And 15 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
internet explorer supports these apis as well, but it also supports its legacy apis for walking a dom tree, such as the
children property.
...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.
...And 15 more matches
Message manager overview
in the initial version of multiprocess firefox there are two processes: the chrome process, also called the parent process, runs the browser ui (chrome) code and code inserted by extensions the content processes, also called the
child processes, run all web content.
... 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.
...And 11 more matches
sslfnc.html
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.
... 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.
... there are two ways to transfer the content of ssl_inheritance from parent to
child: the
child inherits the parent's environment, which must include the ssl_inheritance variable.
...And 11 more matches
Node - Web APIs
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.
... node.
childnodesread only returns a live nodelist containing all the
children of this node.
...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
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.
...And 10 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.
...And 10 more matches
Manipulating documents - Learn web development
you can use this object to return and manipulate information on the html and css that comprises the document, for example get a reference to an element in the dom, change its text content, apply new styles to it, create new elements and add them to the current element as
children, or even delete it altogether.
...
child node: a node directly inside another node.
... for example, img is a
child of section in the above example.
...And 10 more matches
Accessing the Windows Registry Using XPCOM
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.
... you can call these methods on an already-opened registry key to open a
child key.
...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", wrk.access_read); var subkey = wrk.open
child("windows\\currentversion", wrk.access_read); var id = subkey.readstringvalue("productid"); subkey.close(); wrk.close(); once you've opened a registry key, you can begin to make use of it.
...And 10 more matches
nsINavHistoryContainerResultNode
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.
...
childrenreadonly boolean false if the node's list of
children can be modified (by adding or removing
children, or rearranging them), or true if the user interface should not allow the list of
children to be altered.
...when closed, attempting to call get
child() or access
childcount results in an error.
...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
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...
...true : false; this.topic = topic; this.node = node; var pointer = document.createelement('div'); pointer.classname = 'ui-slider-pointer'; node.append
child(pointer); this.pointer = pointer; setmousetracking(node, updateslider.bind(this)); sliders[topic] = this; setvalue(topic, this.value); } var setbuttoncomponent = function setbuttoncomponent(node) { var type = node.getattribute('data-type'); var topic = node.getattribute('data-topic'); if (type === "sub") { node.textcontent = '-'; node.addeventlistener("click", function() ...
...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 10 more matches
Adding sidebars - Archive of obsolete content
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.
...And 9 more matches
Element Positioning - Archive of obsolete content
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.
... box packing let's say you have a box with two
child elements, both of which are not flexible, but the box is flexible.
...And 9 more matches
Stack Positioning - Archive of obsolete content
placement of stack
children normally, the
child elements of a stack stretch to fit the size of the stack.
... 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.
...And 9 more matches
Styling a Tree - Archive of obsolete content
the outer tree
children is the only real element in the tree body.
...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.
...all of the content inside the tree's body is rendered by the tree
children element.
...And 9 more matches
Accessible Toolkit Checklist
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.
...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.
... for example, a unique
child id would be required for each tree item supporting the most important basic iaccessible events get_accparent: get the parent of an iaccessible.
...And 7 more matches
nsIAccessibleRole
role_window 9 represents the window frame, which contains
child objects such as a title bar, client, and other objects contained in a window.
...it is used for the first
child of a or iframe.
...there is not always a parent-
child relationship between the grouping object and the objects it contains.
...And 7 more matches
nsIMsgThread
inherits from: nsisupports method overview void add
child(in nsimsgdbhdr
child, in nsimsgdbhdr inreplyto, in boolean threadinthread, in nsidbchangeannouncer announcer); nsimsgdbhdr get
childat(in long index); nsmsgkey get
childkeyat(in long index); nsimsgdbhdr get
child(in nsmsgkey msgkey); nsimsgdbhdr get
childhdrat(in long index); nsimsgdbhdr getroothdr(out long index); void remove
childat(in long index); void remove
childhdr(in nsimsgdbhdr
child, in nsidbchangeannouncer announcer); void mark
childread(in boolean bread); nsimsgdbhdr getfirstunread
child(); nsisimpleenumerator enumeratemessages(in nsmsgkey parent); ...
... subject acstring subject of the thread newestmsgdate unsigned long num
children unsigned long readonly: number of messages in the thread.
... numunread
children unsigned long readonly: number of unread messages in the thread.
...And 7 more matches
Architecture - Accessibility
in addition, nsiaccessiblehyperlink is implemented on any non-text
child inside a container that also has text.
...they support the nsiaccessiblehypertext is implemented on any container element that has both text and embedded objects for accessible
children.
...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.
...And 7 more matches
Building accessible custom components in XUL - Archive of obsolete content
we need to find the nth
child of the previous column.
...ell_down(current); if (next) { next.focus(); } } function spreadsheet_left(current) { var next = find_cell_left(current); if (next) { next.focus(); } } function spreadsheet_right(current) { var next = find_cell_right(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 ?
...And 6 more matches
ContextMenus - Archive of obsolete content
<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.
...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'.
...And 6 more matches
Trees and Templates - Archive of obsolete content
with hierarchical trees, the
children don't get generated until the parent nodes have been opened by the user.
...example 1 : source <tree id="my-tree" flex="1" datasources="rdf:files" ref="nc:filesroot" flags="dont-build-content"> <treecols> <treecol id="name" label="name" primary="true" flex="1"/> <splitter/> <treecol id="date" label="date" flex="1"/> </treecols> <template> <rule> <tree
children> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://home.netscape.com/nc-rdf#name"/> <treecell label="rdf:http://home.netscape.com/web-rdf#lastmodifieddate"/> </treerow> </treeitem> </tree
children> </rule> </template> </tree> here, a tree is created with two columns, for the name and date of a ...
...because we don't want multiple tree
children elements, we don't put it there.
...And 6 more matches
Places Developer Guide
nsinavbookmarksservice.tagsfolder - subfolders of this folder are tags, and their
children are uris that have been tagged with that folder's name.
... 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.
...foldernode.containeropen = true; for (var i=0; i < foldernode.
childcount; ++i) { var
childnode = foldernode.get
child(i); // some item properties.
...And 6 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 6 more matches
nsITransactionList
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.
... 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.
...And 6 more matches
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
if (array.isarray(elemnameorarray)) { var frag = doc.createdocumentfragment(); array.foreach(arguments, function(thiselem) { frag.append
child(tag.apply(null, thiselem)); }); return frag; } // single element?
...they're not in any namespace) elem.setattributens(attrns.namespace || "", attrns.shortname, val); } } // create and append this element's
children var
childelems = array.slice(arguments, 2);
childelems.foreach(function(
childelem) { if (
childelem != null) { elem.append
child(
childelem instanceof doc.defaultview.node ?
...
childelem : array.isarray(
childelem) ?
...And 5 more matches
pack - Archive of obsolete content
« xul reference home pack type: one of the values below the pack attribute specifies where
child elements of the box are placed when the box is larger that the size of the
children.
... for boxes with horizontal orientation, it is used to indicate the position of
children horizontally.
... for boxes with vertical orientation, it is used to indicate the position of
children vertically.
...And 5 more matches
Building Trees - Archive of obsolete content
here is an example (using an rdf source): <tree id="photoslist" flex="1" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos" flags="dont-build-content"> <treecols> <treecol id="name" label="name" flex="1"/> <treecol id="date" label="date" flex="1"/> </treecols> <template> <tree
children> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://purl.org/dc/elements/1.1/title"/> <treecell label="rdf:http://purl.org/dc/elements/1.1/date"/> </treerow> </treeitem> </tree
children> </template> </tree> note: the tree columns (treecols) are declared outside the template as static content, since they only need to be declared...
...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...
...for example: <tree id="photoslist" flex="1" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos" flags="dont-build-content"> <treecols> <treecol id="photo" label="photo" flex="1"/> </treecols> <template> <tree
children> <treeitem uri="rdf:*"> <treerow> <treecell src="rdf:*"/> </treerow> </treeitem> </tree
children> </template> </tree> this tree displays each photo in the tree cells.
...And 5 more matches
Containment Properties - Archive of obsolete content
« previousnext » so far, we've seen how the simple query syntax can generate results from the
children of an rdf container.
... however, the simple query syntax may also iterate over a single predicate pointing out of a resource, rather than use the
children.
...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.
...And 5 more matches
Adding Methods to XBL-defined Elements - Archive of obsolete content
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.
... 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.
...And 5 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
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.
... 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).
...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.
...And 4 more matches
Build your own function - Learn web development
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.
... 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.
...And 4 more matches
Accessibility API cross-reference
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.
... 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.
...And 4 more matches
Anonymous Shared Memory
the anonymous file-mapped shared memory provides an inheritable shared memory, as in: the
child process inherits the shared memory.
...the intent is to provide a shared memory that is accessbile only by parent and
child processes.
... the file-mapped shared memory requires a protocol for the parent process and
child process to share the memory.
...And 4 more matches
Gecko Roles
role_window represents the window frame, which contains
child objects such as a title bar, client, and other objects contained in a window.
... role_pagetab represents a page tab, it is a
child of a page tab list.
... role_html_container a document container for html, whose
children represent the document content.
...And 4 more matches
nsIAccessNode
method overview nsiaccessnode get
childnodeat(in long
childnum); obsolete since gecko 2.0 nsidomcssprimitivevalue getcomputedstylecssvalue(in domstring pseudoelt, in domstring propertyname); domstring getcomputedstylevalue(in domstring pseudoelt, in domstring propertyname); void scrollto(in unsigned long ascrolltype); void scrolltopoint(in unsigned long acoordinatetype, in long ax, in long ay); ...
... first
childnode nsiaccessnode the first nsiaccessnode
child.
... last
childnode nsiaccessnode the last nsiaccessnode
child.
...And 4 more matches
nsIFocusManager
setting the activewindow raises it, and focuses the current
child window's current element, if any.
... 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.
...And 4 more matches
nsIXULWindow
method overview void add
childwindow(in nsixulwindow a
child); void applychromeflags(); native code only!
... void assumechromeflagsarefrozen(); void center(in nsixulwindow arelative, in boolean ascreen, in boolean aalert); nsixulwindow createnewwindow(in print32 achromeflags, in nsiappshell aappshell); nsidocshelltreeitem getcontentshellbyid(in wstring id); void remove
childwindow(in nsixulwindow a
child); void showmodal(); attributes attribute type description chromeflags pruint32 chromeflags are from nsiwebbrowserchrome.
... highestz 9 methods add
childwindow() tell this window that it has picked up a
child xul window.note that xul windows do not currently track
child xul windows.
...And 4 more matches
Drawing and Event Handling - Plugins
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.
... 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.
... on ms windows and unix, the browser creates a
child window for each plug-in instance and passes it a window through npp_setwindow.
...And 4 more matches
Examine and edit HTML - Firefox Developer Tools
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.
...modification node removal use in console show dom properties show accessibility properties change pseudo-class hover active focus focus-within visited screenshot node scroll into view copy inner html outer html css selector css path xpath image data-url attribute paste inner html outer html before after as first
child as last
child expand all collapse all open link in new tab * open file in debugger * open file in style-editor * copy link address * * these options only appear in certain contexts, for example the "open file in style-editor" option only appears when you context-click over the top of a link to a css file.
... (paste) as first
child paste the clipboard contents into the document as the first
child of this node.
...And 4 more matches
AbstractRange - Web APIs
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.
... 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.
...And 4 more matches
Attr - Web APIs
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.
... last
child obsolete since gecko 14 this property now always returns null.
...And 4 more matches
Timing element visibility with the Intersection Observer API - Web APIs
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.
... .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.
...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.
...And 4 more matches
ParentNode.append() - Web APIs
the parentnode.append() method inserts a set of node objects or domstring objects after the last
child of the parentnode.
... 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.
...And 4 more matches
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
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.
... in the below example i have a wrapper containing four
child items.
... 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.
...And 4 more matches
box-lines - CSS: Cascading Style Sheets
/* 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.
... 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.
...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...
... oletter.val : this.pool[parseint(math.random() * this.pool.length)]; } } }, 33, 30); onload = function () { ounhide.owner.target.id = "animate-me"; document.body.append
child(ounhide.owner.target); ounhide.play(); }; </script> <style type="text/css"> body { font-family: monospace, sans-serif; background: #dddddd; overflow: hidden; } #animate-me { margin: 50px; font-size: 20px; line-height: 20px; } </style> </head> <body> <h1>daemon.buildaround()</h1> <p><button onclick="ounhide.skipto(11);">skipto(11)</button> <button onclick="ounhide.makesteps(29);">makesteps(29)</button> <button onclick="ounhide.fixposition(-13);">fixposition(-13)</button> <button onclick="ounhide.play();">play</button> <button onclick="ounhide.turn();">...
...And 3 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
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.
...ding their own events use their own prefix to avoid confusion and lessen the probability of conflicts with other new events.") in the case where your extension's overlay does not interact directly with browser.xul, such as in a sidebar, it might be easier to add the event listener to the top-level document directly as shown below (also see: accessing the elements of the top-level document from a
child window).
... document.addeventlistener("message", function(e) { yourfunction(e); }, false, true); sending data from chrome to unprivileged document to "answer" the web page (e.g., return code), your extension can set an attribute or attach
child elements on the event target element (<myextensiondataelement/> in this example).
...And 3 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
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.
... 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.
...And 3 more matches
The Box Model - Archive of obsolete content
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.
... here's a very simple example of an hbox with 3
child buttons: <hbox> <button label="cat" /> <button label="parrot" /> <button label="porcupine" /> </hbox> this is how it looks on mac os (the black border was added for illustrative purposes, boxes don't have borders by default): if you use a vbox instead, it looks like this: the orientation of boxes (and most xul elements) can be controlled using the orient attribute or the -moz-box-orient css property.
...And 3 more matches
Layout System Overview - Archive of obsolete content
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.
...nsframe: the frame provides a mechanism to navigate to a parent frame as well as
child frames.
...the frame is able to provide a reference to its parent and to its
children upon request.
...And 3 more matches
Additional Navigation - Archive of obsolete content
here is an example triple that we could use in the photos example: <query> <content uri="?start"/> <member container="?start"
child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="canal"/> </query> this new triple has a static value for the object attribute instead of a variable reference.
...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 member tag must have variables for both the container and
child attributes.
...And 3 more matches
Rule Compilation - Archive of obsolete content
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.
...however, there are two cases where content is not generated automatically: menus and
child tree items.
...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.
...And 3 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.
...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.
...And 3 more matches
Special Condition Tests - Archive of obsolete content
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.
...here is the same example using the extended template syntax: <vbox datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood"> <template> <query> <content uri="?start"/> <member container="?start"
child="?item"/> </query> <rule parent="vbox"> <binding subject="?item" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <action> <groupbox uri="?item"> <caption label="?title"/> </groupbox> </action> </rule> <rule> <binding subject="?item" predicate="http://www.xulplanet.com/rdf/address" object="?address"/> <acti...
...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.
...And 3 more matches
Template Logging - Archive of obsolete content
<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.
...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.
...And 3 more matches
Box Objects - Archive of obsolete content
recall that dom properties such as
childnodes, first
child, and nextsibling may be used to navigate the document tree.
...the box object provides several properties, first
child, last
child, nextsibling, previoussibling, and parentbox.
...these properties return elements, for example, the first
child property returns the first displayed
child element.
...And 3 more matches
The Implementation of the Application Object Model - Archive of obsolete content
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.
...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.
...And 3 more matches
box - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of
child elements.
... if the box has an orient attribute that is set to horizontal, the
child elements are laid out from left to right in the order that they appear in the box.
... if orient is set to vertical, the
child elements are laid out from top to bottom.
...And 3 more matches
button - Archive of obsolete content
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.
... orient type: one of the values below used to specify whether the
children of the element are oriented horizontally or vertically.
... 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.
...And 3 more matches
menu - Archive of obsolete content
when the user clicks the menu element, the
child menupopup of the menu will be displayed.
... allowevents type: boolean if true, events are passed to
children of the element.
... itemcount type: integer read only property holding the number of
child items.
...And 3 more matches
prefwindow - Archive of obsolete content
type type: string set this attribute to
child for preference dialogs that are
child dialogs of a main preferences window.
... methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...as
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() return type: no return value accepts the dialog and closes it, similar to pressing the ok button.
...And 3 more matches
rule - Archive of obsolete content
the
children of the rule are used to declare the conditions in which the rule matches and the content that is generated.
...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.
...And 3 more matches
toolbarbutton - Archive of obsolete content
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.
... orient type: one of the values below used to specify whether the
children of the element are oriented horizontally or vertically.
... 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.
...And 3 more matches
Processing XML with E4X - Archive of obsolete content
they support javascript's regular dot and [] notation, but instead of accessing object properties e4x overloads these operators to access the element's
children: var person = <person> <name>bob smith</name> <likes> <os>linux</os> <browser>firefox</browser> <language>javascript</language> <language>python</language> </likes> </person>; alert(person.name); // 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 ..
...And 3 more matches
Combinators - Learn web development
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.
...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.
...And 3 more matches
Making asynchronous programming easier with async and await - Learn web development
status: ${response.status}`); } else { return response.blob(); } }) .then(myblob => { let objecturl = url.createobjecturl(myblob); let image = document.createelement('img'); image.src = objecturl; document.body.append
child(image); }) .catch(e => { console.log('there has been a problem with your fetch operation: ' + e.message); }); by now, you should have a reasonable understanding of promises and how they work, but let's convert this to use async/await to see how much simpler it makes things: async function myfetch() { let response = await fetch('coffee.jpg'); if (!response.ok) { throw new error(`http ...
...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!
...status: ${response.status}`); } else { return await response.blob(); } } myfetch().then((blob) => { let objecturl = url.createobjecturl(blob); let image = document.createelement('img'); image.src = objecturl; document.body.append
child(image); }).catch(e => console.log(e)); you can try typing in the example yourself, or running our live example (see also the source code).
...And 3 more matches
Making decisions in your code — conditionals - Learn web development
imagine a
child being asked for help with a chore by their mother or father.
...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.
...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
pbackground is a mechanism available since gecko 30 (see bug 956218) that builds on top of ipdl to provide a solution to common problems that arise when handling multiple threads in the chrome process, for example communication between workers and multiple
child processes and other parent-process worker threads.
... when used at run time, every protocol has two actors — a parent and a
child.
...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.
...And 3 more matches
IAccessibleText
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.
...three" and a
child text() object containing "two" and if the caret is in the descendant object just before the 'o' in "two", then: the caretoffset for the "one ?
...also, note that the server may have different life cycle management strategies for controls depending on whether or not a control manages its
children.
...And 3 more matches
Mail and RDF
msgaccounts:/ +-- http://home.netscape.com/nc-rdf#
child --> | 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#me...
...ssage
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 --> | imap_message://alecf@imap.mywork.com/inbox#4 | etc...
... +-- http://home.netscape.com/nc-rdf#
child --> | mailbox://alecf@pop.mywork.com | +-- http://home.netscape.com/nc-rdf#isserver --> "true" | +-- http://home.netscape.com/nc-rdf#
child --> | mailbox://alecf@pop.mywork.com/inbox | +-- http://home.netscape.com/nc-rdf#totalmessages --> "2" | +-- http://home.netscape.com/nc-rdf#isserver --> "false" | +-- http://home.netscape.com/nc-rdf#message
child --> | | mailbox_message://alecf@pop.mywork.com/inbox#1 | +-- http://home.netscape.com/nc-rdf#message
child --> | mailbox_message://alecf@pop.mywork.com/inbox#2 | etc...
...And 3 more matches
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
site = components.utils.waivexrays(site.frame); if (!counts.has(site)) counts.set(site, 0); counts.set(site, counts.get(site) + 1); } // walk from each site that allocated something up to the // root, computing allocation totals that include //
children.
... 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.
... var root
children = new map; function
childmapfor(site) { if (!site) return root
children; let parentmap =
childmapfor(site.parent); if (parentmap.has(site)) return parentmap.get(site); var m = new map; parentmap.set(site, m); return m; } for (let [site, total] of totals) {
childmapfor(site); } // print the allocation count for |site|.
...And 3 more matches
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.
... 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.
...And 3 more matches
DocumentFragment - Web APIs
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.
...And 3 more matches
Using files from web applications - Web APIs
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.
...we use node.append
child() to add the new thumbnail to the preview area of our document.
...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
Basic Concepts of grid layout - CSS: Cascading Style Sheets
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.
... .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.
...And 3 more matches
The stacking context - CSS: Cascading Style Sheets
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.
... within a stacking context,
child elements are stacked according to the same rules previously explained.
...And 3 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 3 more matches
Object.prototype.constructor - JavaScript
*/ } 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?
... function parentwithstatic() {} parentwithstatic.startposition = { x: 0, y:0 } // static member property parentwithstatic.getstartposition = function getstartposition() { return this.startposition } function
child(x, y) { this.position = { x: x, y: y } }
child = object.assign(parentwithstatic)
child.prototype = object.create(parentwithstatic.prototype)
child.prototype.constructor =
child child.prototype.getoffsetbyinitialposition = function getoffsetbyinitialposition() { let position = this.position let startposition = this.constructor.getstartposition() // error undefined is not a functi...
...on, since the constructor is
child return { offsetx: startposition.x - position.x, offsety: startposition.y - position.y } }; for this example we need either to stay parent constructor to continue to work properly or reassign static properties to
child's constructor: ...
...And 3 more matches
SVG documentation index - SVG: Scalable Vector Graphics
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.
... 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.
... 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.
...And 3 more matches
Using templates and slots - Web Components
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.
...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.
... 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.
...And 3 more matches
Index - XPath
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.
...And 3 more matches
Adding menus and submenus - Archive of obsolete content
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.
...menus require a menupopup element as a container for its
children, which are usually menuitem elements, but can also be menuseparator, or menu in order to have multiple nesting levels: <toolbox> <menubar id="xulschoolhello-menubar"> <menu id="xulschoolhello-greeting-menu" label="&xulschoolhello.greeting.label;"> <menupopup> <menu id="xulschoolhello-greeting-sizes-menu" label="&xulschoolhello.greetingsizes.label;"> <menupopup> ...
...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.
...And 2 more matches
Using microformats - Archive of obsolete content
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.
...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.
... getparent() returns the parent node of the specified microformat or
child of a microformat.
...And 2 more matches
Building Menus With Templates - Archive of obsolete content
here is an example using an xml source: <button type="menu" datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="person"/> <action> <menupopup> <menuitem uri="?" label="?name"/> </menupopup> </action> </template> </button> <button label="
children" oncommand="alert(this.previoussibling.
childnodes.length);"/> in this example, the datasources attribute has been placed on a menu-type button.
...the uri attribute has not been placed on the menupopup element which is the direct
child of the action element but has instead been placed on the menuitem element.
...the second button in the example displays an alert with the number of
children the template-driven button has.
...And 2 more matches
Box Model Details - Archive of obsolete content
packing controls their horizontal placement of
child elements.
... packing controls the vertical placement of
child elements.
... alignment controls how the column of
child elements are aligned horizontally.
...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...
...ldren> </tree> <label value="row:"/> <label id="row"/> <label value="column:"/> <label id="column"/> <label value="
child type:"/> <label id="part"/> the getcellat() function takes five arguments, the coordinates to look up and three out parameters.
...And 2 more matches
listbox - Archive of obsolete content
price: "$3,500 - $4,600"}, {gem: "emerald", price: "$700 - 4,250"}, {gem: "blue sapphire", price: "$3,400 - $4,500"}, {gem: "diamond", price: "$5,600 - $16,000"} ]; for (var i = 0; i < gems.length; i++) { var row = document.createelement('listitem'); var cell = document.createelement('listcell'); cell.setattribute('label', gems[i].gem); row.append
child(cell); cell = document.createelement('listcell'); cell.setattribute('label', gems[i].price ); row.append
child(cell); thelist.append
child(row); } attributes disabled type: boolean indicates whether the element is disabled or not.
... itemcount type: integer read only property holding the number of
child items.
... methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...And 2 more matches
member - Archive of obsolete content
both the container and
child attributes may use variables.
... properties
child, container examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties
child type: ?
... a variable reference to a node that is expected to be a
child of the element that is referred to by the container element.
...And 2 more matches
radiogroup - Archive of obsolete content
the radio buttons may either direct
children of the radiogroup or descendants.
... itemcount type: integer read only property holding the number of
child items.
... methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...And 2 more matches
rows - Archive of obsolete content
child row elements define the individual rows to appear in the grid.
... each
child of a rows element should be a row element.
...the
children of these nested rows are counted as normal rows as if they were part of the parent.
...And 2 more matches
treeitem - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a treeitem should be placed inside a tree
children element and should contain treerow elements.
... attributes container, empty, label, open, uri examples (example needed) attributes container type: boolean set to true if the element is to act as a container which can have
child elements.
... empty type: boolean set to true if the element is a container that contains no
children.
...And 2 more matches
Building up a basic demo with the PlayCanvas engine - Game development
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.
...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.
... 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.
...And 2 more matches
Styling tables - Learn web development
to do this, add the following css to your style.css file: /* spacing */ table { table-layout: fixed; width: 100%; border-collapse: collapse; border: 3px solid purple; } thead th:nth-
child(1) { width: 30%; } thead th:nth-
child(2) { width: 20%; } thead th:nth-
child(3) { width: 15%; } thead th:nth-
child(4) { width: 35%; } th, td { padding: 20px; } the most important parts to note are as follows: a table-layout value of fixed is generally a good idea to set on your table, as it makes the table behave a bit more predictably by default.
...this is why we've selected the four different headings with the thead th:nth-
child(n) (:nth-
child) selector ("select the nth
child that is a <th> element in a sequence, inside a <thead> element") and given them set percentage widths.
...add the following css to the bottom of your style.css file: /* zebra striping */ tbody tr:nth-
child(odd) { background-color: #ff33cc; } tbody tr:nth-
child(even) { background-color: #e495e4; } tbody tr { background-image: url(noise.png); } table { background-color: #ff33cc; } earlier on you saw the :nth-
child selector being used to select specific
child elements.
...And 2 more matches
Introduction to CSS layout - Learn web development
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.
... as a simple example of this, we can add the flex property to all of our
child items, with a value of 1.
...the below example uses similar markup to the flex example, with a container and some
child elements.
...And 2 more matches
Third-party APIs - Learn web development
function displayresults(json) { while (section.first
child) { section.remove
child(section.first
child); } const articles = json.response.docs; if(articles.length === 10) { nav.style.display = 'block'; } else { nav.style.display = 'none'; } if(articles.length === 0) { const para = document.createelement('p'); para.textcontent = 'no results returned.' section.append
child(para); } else { for(var i = 0; i < artic...
... articles[i]; console.log(current); link.href = current.web_url; link.textcontent = current.headline.main; para1.textcontent = current.snippet; para2.textcontent = 'keywords: '; for(let j = 0; j < current.keywords.length; j++) { const span = document.createelement('span'); span.textcontent += current.keywords[j].value + ' '; para2.append
child(span); } if(current.multimedia.length > 0) { img.src = 'http://www.nytimes.com/' + current.multimedia[0].url; img.alt = current.headline.main; } clearfix.setattribute('class','clearfix'); article.append
child(heading); heading.append
child(link); article.append
child(img); article.append
child(para1); article.append
child(para2);...
... article.append
child(clearfix); section.append
child(article); } } } there's a lot of code here; let's explain it step by step: the while loop is a common pattern used to delete all of the contents of a dom element, in this case, the <section> element.
...And 2 more matches
Displaying Places information using views
<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"].
...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.
... 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.
...And 2 more matches
Gecko states
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_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.
...And 2 more matches
XForms Accessibility
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.
...
children mozilla xforms implementation allows form control elements to have
child elements.
...And 2 more matches
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...
... 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.
...And 2 more matches
nsIAccessibleStates
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_expanded 0x00000200
children of this object that have the role_outlineitem role are displayed.
... state_collapsed 0x00000400
children of this object that have the role_outlineitem role are hidden.
...And 2 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...
... get
childlist() returns an array of strings representing the
child preferences of the root of this branch.
... (to call from javascript use
children = nsiprefbranch.get
childlist("",obj), which will fill in obj.value with the count and return an array of keys!
...And 2 more matches
nsIXULTemplateBuilder
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.
...And 2 more matches
Document - Web APIs
document.documentelementread only returns the element that is a direct
child of the document.
... 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.
...And 2 more matches
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 = ...
...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> </body> </html> example 8: using the dom table interface the dom htmltableelement interface provides some convenience methods for creating and manipulating tables.
...And 2 more matches
MutationObserver.MutationObserver() - Web APIs
example this example simply creates a new mutationobserver configured to watch a node and all of its
children for additions and removals of elements to the tree, as well as any changes to attributes on any of the elements in the tree.
... 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.
... 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.
...And 2 more matches
ParentNode.prepend() - Web APIs
the parentnode.prepend() method inserts a set of node objects or domstring objects before the first
child of the parentnode.
... syntax parentnode.prepend(...nodestoprepend); parameters nodestoprepend one or more nodes to insert before the first
child node currently in the parentnode.
... examples prepending an element var parent = document.createelement("div"); var p = document.createelement("p"); var span = document.createelement("span"); parent.append(p); parent.prepend(span); console.log(parent.
childnodes); // nodelist [ <span>, <p> ] prepending text var parent = document.createelement("div"); parent.append("some text"); parent.prepend("headline: "); console.log(parent.textcontent); // "headline: some text" appending an element and text var parent = document.createelement("div"); var p = document.createelement("p"); parent.prepend("some text", p); console.log(parent.
childnodes); // nod...
...And 2 more matches
Selection.setBaseAndExtent() - Web APIs
anchoroffset the number of
child nodes from the start of the anchor node that should be excluded from the selection.
...if the value is 1, the whole node minus the first
child node is included.
... focusoffset the number of
child nodes from the start of the focus node that should be included in the selection.
...And 2 more matches
Selection - Web APIs
if anchornode is an element, this is the number of
child nodes of the anchornode preceding the anchor.
...if focusnode is an element, this is the number of
child nodes of the focusnode preceding the focus.
... selection.selectall
children() adds all the
children of the specified node to the selection.
...And 2 more matches
Using the aria-activedescendant attribute - Accessibility
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.
...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
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
in addition to the ability to place items accurately onto a created grid, the css grid layout specification contains rules that control what happens when you create a grid and do not place some or all of the
child items.
...-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 10px; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> default rules for auto-placement as you can see with the above example, if you create a grid all
child items will lay themselves out one into each grid cell.
... } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> <div>six</div> <div>seven</div> <div>eight</div> <div>nine</div> <div>ten</div> <div>eleven</div> <div>twelve</div> </div> .wrapper { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 100px; grid-gap: 10px; } .wrapper div:nth-
child(2) { grid-column: 3; grid-row: 2 / 4; } .wrapper div:nth-
child(5) { grid-column: 1 / 3; grid-row: 1 / 3; } deal with items that span tracks you can use placement properties while still taking advantage of auto-placement.
...And 2 more matches
Event reference
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.
... domnodeinserted mutationevent dom l3 a node has been added as a
child of another node (use mutation observers instead).
...And 2 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
l.style.display = 'block'; // populate the days and years dynamically // (the months are always the same, therefore hardcoded) populatedays(monthselect.value); populateyears(); populatehours(); populateminutes(); } function populatedays(month) { // delete the current set of <option> elements out of the // day <select>, ready for the next set to be injected while(dayselect.first
child){ dayselect.remove
child(dayselect.first
child); } // create variable to hold new number of days to inject var daynum; // 31 or 30 days?
...daynum = 29 : daynum = 28; } // inject the right number of new <option> elements into the day <select> for(i = 1; i <= daynum; i++) { var option = document.createelement('option'); option.textcontent = i; dayselect.append
child(option); } // if previous day has already been set, set dayselect's value // to that day, to avoid the day jumping back to 1 when you // change the year if(previousday) { dayselect.value = previousday; // if the previous day was set to a high number, say 31, and then // you chose a month with less total days in it (e.g.
...=== "") { dayselect.value = previousday - 3; } } } function populateyears() { // get this year as a number var date = new date(); var year = date.getfullyear(); // make this year, and the 100 years before it available in the year <select> for(var i = 0; i <= 100; i++) { var option = document.createelement('option'); option.textcontent = year-i; yearselect.append
child(option); } } function populatehours() { // populate the hours <select> with the 24 hours of the day for(var i = 0; i <= 23; i++) { var option = document.createelement('option'); option.textcontent = (i < 10) ?
...And 2 more matches
display - SVG: Scalable Vector Graphics
a value of display="none" indicates that the given element and its
children will not be rendered.
... 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.
...And 2 more matches
<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.
...And 2 more matches
Using shadow DOM - Web Components
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.
...dom to a custom element as part of its constructor (by far the most useful application of the shadow dom), you would use something like this: let shadow = this.attachshadow({mode: 'open'}); when you've attached a shadow dom to an element, manipulating it is a matter of just using the same dom apis as you use for the regular dom manipulation: let para = document.createelement('p'); shadow.append
child(para); // etc.
...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
Axes - XPath
child indicates the
children of the context node.
...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.
...And 2 more matches
Index - XSLT: Extensible Stylesheet Language Transformations
a top-level element must appear as the
child of either <xsl:stylesheet> or <xsl:transform>.
...it does not copy any
children or attributes of the current node.
...if one or more <xsl:sort> elements appear as the
children of this element, sorting occurs before processing.
...And 2 more matches
Finding window handles - Archive of obsolete content
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.
...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 = ::findwindowex(htemp, 0, "mozillacontentwindowclass", 0); } } // at this point hcontent is null or the content window hwnd i am not sure how "fragile" the assumptions are about the window structure, but it matched the values i got from spy++.
...first, in javascript, the code gets the nsibasewindow we want, it's a direct
child of the top nsibasewindow.
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) { ...
... 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 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.classname = sprefs + "-active-cell"; otd.id = sprefs + "-day-" + this.id + "-" + nday; otd.onclick = ondayclick; otd.append
child(document.createtextnode(nday)); } else { otd.classname = sprefs + "-empty-cell"; } otr.append
child(otd); } this.display.innerhtml = smonthsnames[this.current.getmonth()] + " " + this.current.getfullyear(); this.container.append
child(this.otbody); }; function ondocclick (opssevt) { const oevt = opssevt || /* ie */ window...
..."getmonth" : "getfullyear"]() + ndelta); othiscal.writedays(); return false; } function ondayclick () { const othiscal = ainstances[this.id.replace(rbgnandend, "")]; othiscal.target.value = (this.innerhtml / 100).tofixed(2).substr(-2) + "\/" + (othiscal.current.getmonth() + 1) + "\/" + othiscal.current.getfullyear(); othiscal.container.parentnode.remove
child(othiscal.container); return false; } function buildcalendars () { const afields = document.getelementsbyclassname(sdpclass), nlen = afields.length; for (var nitem = 0; nitem < nlen; new datepicker(afields[nitem++])); } const /* customizable by user */ sprefs = "zdp"; sdpclass = "date-picker", smonthsnames = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "...
Custom XUL Elements with XBL - Archive of obsolete content
personlist.append
child(person); // ...
... 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.
... 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.
XPCOM Objects - Archive of obsolete content
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.
... 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.
... 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.
Space Manager High Level Design - Archive of obsolete content
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.
... 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.
...add the float using nsspacemanager::addrectregion compare the area that the float used to occupy with the area that it now occupies: if different, record the vertically affected interval using nsspacemanager::includeindamage use case 3: space manager is used to find available space to reflow into the nsblockframe makes use of the space manager indirectly to get the available space to reflow a
child block or inline frame into.
equalsize - Archive of obsolete content
« xul reference home equalsize type: one of the values below this attribute can be used to make the
children of the element equal in size.
... always for a horizontally oriented element, this will make all of its
children have the width of the widest
child.
... for a vertically oriented element, this will make its
children all have the height of the tallest
child.
... never all of the
children are displayed at the size required by the content or as specified by the width and height attributes or the css width and height properties.
treecol.type - Archive of obsolete content
here is an example css style using the current theme's checkboxes: 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) { /* checked checkbox treecells.
...*/ list-style-image: url("chrome://global/skin/checkbox/cbox-check.gif"); } tree
children::-moz-tree-checkbox(disabled) { /* disabled checkbox treecells.
Tree Selection - Archive of obsolete content
child items are included in the count just after their parents.
... this means that if there are 3 top-level items and each has two
child items, there will be a total of 9 items.
...the next item at index 1 will be its first
child.
... the second
child will be at index 2 and the second parent item will be at position 3 and so on.
column - Archive of obsolete content
each
child of the column element is placed in each successive cell of the grid.
... the column with the most
child elements determines the number of rows in each column.
...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...
...ributes(), 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 grid, columns, rows, row ...
deck - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element that displays only one of its
children at a time.
... the selectedindex attribute determines which
child is displayed.
...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...
...ributes(), 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
the
children of the iframe are ignored.
...nupopup> <menuitem label="mozilla" value="http://mozilla.org" /> <menuitem label="slashdot" value="http://slashdot.org"/> <menuitem label="sourceforge" value="http://sf.net" /> <menuitem label="freshmeat" value="http://freshmeat.net"/> </menupopup> </menulist> <iframe id="myframe" flex="1"/> <script> function donav(obj) { var url = obj.selecteditem.value; // note the first
child is the menupopup element document.getelementbyid('myframe').setattribute('src', url); } </script> attributes showcaret type: boolean whether or not to cause a typing caret to be visible in the content area.
... 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...
...ributes(), 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 nsiaccessibleprovider ...
menulist - Archive of obsolete content
itemcount type: integer read only property holding the number of
child items.
... methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...as
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, value, description ) return type: element creates a new menuitem element and adds it to the end of the menulist.
... removeitemat( index ) return type: element removes the
child item in the element at the specified index.
panel - Archive of obsolete content
for those versions of firefox, it is best to avoid
child frames in a panel, if possible.
...if anchored, the
child window maintains its relative position to its parent window.
... methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...as
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() return type: no return value closes the popup immediately.
richlistbox - Archive of obsolete content
itemcount type: integer read only property holding the number of
child items.
... methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...as
childnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), remove
child(), removeeventlistener(), replace
child(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata additemtoselection( item ) return type: no return value selects the given item, without deselecting any other items that are already selected.
... removeitemat( index ) return type: element removes the
child item in the element at the specified index.
richlistitem - Archive of obsolete content
label type: string gets the concatentation of text from any
child label elements.
...use the
child elements directly to set label text.
... 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...
...ributes(), 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 interfaces nsiaccessibleprovider, nsidomxulselectcontrolitemelement ...
row - Archive of obsolete content
each
child of the row element is placed in each successive cell of the grid.
... the row with the most
child elements determines the number of columns in each row, which may be smaller or larger than the number of column elements defined in the grid.
...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...
...ributes(), 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 grid, columns, column, rows.
scrollbox - Archive of obsolete content
scrolling a
child element into view see element.scrollintoview.
...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.
...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...
...ributes(), 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...
...ributes(), 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 following classes may be used to style the element.
... <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: <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.
tabpanels - Archive of obsolete content
the tabpanels element should be placed in a tabbox although it does not have to be a direct
child.
... the
children of the tabpanels element become the panels of the tabbox.
... 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...
...ributes(), 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 tabbox, tabs, tab, tabpanel.
tabs - Archive of obsolete content
itemcount type: integer read only property holding the number of
child items.
... methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...as
childnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), remove
child(), removeeventlistener(), replace
child(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata advanceselectedtab( dir, wrap ) return type: no return value if the argument dir is set to 1, the currently selected tab changes to the next tab.
... removeitemat( index ) return type: element removes the
child item in the element at the specified index.
toolbox - Archive of obsolete content
these are toolbars that are not
children of a 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.
... methods inherited methods addeventlistener(), append
child(), 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 appendcustomtoolbar( name, currentset ) firefox only return type: element adds a custom toolbar to the toolbox with the given name.
treerow - Archive of obsolete content
children of the treerow should be treecell elements.
... if
child rows are necessary, they should be placed in a tree
children element inside the parent treeitem.
...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...
...ributes(), 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 tree, treecols, treecol, tree
children, treeitem, treecell and treeseparator.
wizardpage - Archive of obsolete content
the wizard always starts with the wizardpage that appears first in the wizard
child list.
...the wizard always starts with the wizardpage that appears first in the wizard
child list.
...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...
...ributes(), 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 wizard ...
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 ...
... for (j=0; j < xifallback
children.length ; j++) { xincludeparent.insertbefore(xifallback
children[j], xinclude); } xincludeparent.remove
child(xinclude); } } } return docu; } ...
Cascade and inheritance - Learn web development
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.
... the color has applied to the direct
children, but also the indirect
children — the immediate
child <li>s, and those inside the first nested list.
...this then inherits down through its
children.
...if a border were to be inherited by the
children of our list, every single list and list item would gain a border — probably not an effect we would ever want!
Type, class, and ID selectors - Learn web development
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 :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.
Choosing the right approach - Learn web development
e, and see the source): function loadasset(url, type, callback) { let xhr = new xmlhttprequest(); xhr.open('get', url); xhr.responsetype = type; xhr.onload = function() { callback(xhr.response); }; xhr.send(); } function displayimage(blob) { let objecturl = url.createobjecturl(blob); let image = document.createelement('img'); image.src = objecturl; document.body.append
child(image); } loadasset('coffee.jpg', 'blob', displayimage); pitfalls nested callbacks can be cumbersome and hard to read (i.e.
...see promise.all(), below code example the following code fetches an image from the server and displays it inside an <img> element; see it live also, and see also the source code: fetch('coffee.jpg') .then(response => response.blob()) .then(myblob => { let objecturl = url.createobjecturl(myblob); let image = document.createelement('img'); image.src = objecturl; document.body.append
child(image); }) .catch(e => { console.log('there has been a problem with your fetch operation: ' + e.message); }); pitfalls promise chains can be complex and hard to parse.
...s in separate variables; create object urls from the blobs let objecturl1 = url.createobjecturl(values[0]); let objecturl2 = url.createobjecturl(values[1]); let desctext = values[2]; // display the images in <img> elements let image1 = document.createelement('img'); let image2 = document.createelement('img'); image1.src = objecturl1; image2.src = objecturl2; document.body.append
child(image1); document.body.append
child(image2); // display the text in a paragraph let para = document.createelement('p'); para.textcontent = desctext; document.body.append
child(para); }); pitfalls if a promise.all() rejects, then one or more of the promises you are feeding into it inside its array parameter must be rejecting, or might not be returning promises at all.
...or of the simple promise example we saw earlier that fetches and displays an image, written using async/await (see it live, and see the source code): async function myfetch() { let response = await fetch('coffee.jpg'); let myblob = await response.blob(); let objecturl = url.createobjecturl(myblob); let image = document.createelement('img'); image.src = objecturl; document.body.append
child(image); } myfetch(); pitfalls you can't use the await operator inside a non-async function, or in the top level context of your code.
Introducing asynchronous JavaScript - Learn web development
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.
... 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.
...e, and see the source): function loadasset(url, type, callback) { let xhr = new xmlhttprequest(); xhr.open('get', url); xhr.responsetype = type; xhr.onload = function() { callback(xhr.response); }; xhr.send(); } function displayimage(blob) { let objecturl = url.createobjecturl(blob); let image = document.createelement('img'); image.src = objecturl; document.body.append
child(image); } loadasset('coffee.jpg', 'blob', displayimage); here we create a displayimage() function that simply represents a blob passed to it as an object url, then creates an image to display the url in, appending it to the document's <body>.
... 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.
Client-side storage - Learn web development
add this to your code, below the previous function definition: // define the displaydata() function function displaydata() { // here we empty the contents of the list element each time the display is updated // if you didn't do this, you'd get duplicates listed each time a new note is added while (list.first
child) { list.remove
child(list.first
child); } // open our object store and then get a cursor - which iterates through all the // different data items in the store let objectstore = db.transaction('notes_os').objectstore('notes_os'); objectstore.opencursor().onsuccess = function(e) { // get a reference to the cursor let cursor = e.target.result; // if there is still another d...
...ata item to iterate through, keep running this code if(cursor) { // create a list item, h3, and p to put each data item inside when displaying it // structure the html fragment, and append it inside the list const listitem = document.createelement('li'); const h3 = document.createelement('h3'); const para = document.createelement('p'); listitem.append
child(h3); listitem.append
child(para); list.append
child(listitem); // put the data from the cursor inside the h3 and para h3.textcontent = cursor.value.title; para.textcontent = cursor.value.body; // store the id of the data item inside an attribute on the listitem, so we know // which item it corresponds to.
... this will be useful later when we want to delete items listitem.setattribute('data-note-id', cursor.value.id); // create a button and place it inside each listitem const deletebtn = document.createelement('button'); listitem.append
child(deletebtn); deletebtn.textcontent = 'delete'; // set an event handler so that when the button is clicked, the deleteitem() // function is run deletebtn.onclick = deleteitem; // iterate to the next item in the cursor cursor.continue(); } else { // again, if list item is empty, display a 'no notes stored' message if(!list.first
child) { const listitem = document.createelement('li'); listitem.textcontent = 'no notes stored.'; list.append
child(listitem); } ...
... above let transaction = db.transaction(['notes_os'], 'readwrite'); let objectstore = transaction.objectstore('notes_os'); let request = objectstore.delete(noteid); // report that the data item has been deleted transaction.oncomplete = function() { // delete the parent of the button // which is the list item, so it is no longer displayed e.target.parentnode.parentnode.remove
child(e.target.parentnode); console.log('note ' + noteid + ' deleted.'); // again, if list item is empty, display a 'no notes stored' message if(!list.first
child) { let listitem = document.createelement('li'); listitem.textcontent = 'no notes stored.'; list.append
child(listitem); } }; } the first part of this could use some explaining — we retrieve the id of th...
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...
... list.innerhtml = ''; // loop through the array, and display all the search terms in the list for (let i = 0; i < myhistory.length; i++) { itemtext = myhistory[i]; const listitem = document.createelement('li'); listitem.textcontent = itemtext; list.append
child(listitem); } // if the array length is 5 or more, remove the oldest search term if (myhistory.length >= 5) { // number 2 } // empty the search input and focus it, ready for the next term to be entered searchinput.value = ''; searchinput.focus(); } } </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solu...
...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
script> now we'll add some javascript inside our <script> element to make the page do something more interesting — add the following code just below the "// javascript goes here" line: document.addeventlistener("domcontentloaded", function() { 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 your file and refresh the browser — now you should see that when you click the button, a new paragraph is generated and placed below.
... 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 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.
... function createparagraph() { let para = document.createelement('p'); para.textcontent = 'you clicked the button!'; document.body.append
child(para); } /* 1.
Working with JSON - Learn web development
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 the object, then append it to the header using append
child().
...ent = heroes[i].name; mypara1.textcontent = 'secret identity: ' + heroes[i].secretidentity; mypara2.textcontent = 'age: ' + heroes[i].age; mypara3.textcontent = 'superpowers:'; const superpowers = heroes[i].powers; for (let j = 0; j < superpowers.length; j++) { const listitem = document.createelement('li'); listitem.textcontent = superpowers[j]; mylist.append
child(listitem); } myarticle.append
child(myh2); myarticle.append
child(mypara1); myarticle.append
child(mypara2); myarticle.append
child(mypara3); myarticle.append
child(mylist); section.append
child(myarticle); } } to start with, we store the members property of the javascript object in a new variable.
... use another for loop to loop through the current hero's superpowers — for each one we create an <li> element, put the superpower inside it, then put the listitem inside the <ul> element (mylist) using append
child().
Introduction to client-side frameworks - Learn web development
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.
...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.append
child(item); }); while (todolistel.first
child) { todolistel.remove
child(todolistel.first
child); } todolistel.append
child(frag); } we've now got well over thirty lines of code dedicated just to the ui – just to the step of rendering something in the dom – and at no point do we add classes that we could use later to style our list-items!
... read more about the javascript used in this section: document.createelement() document.createtextnode() document.createdocumentfragment() eventtarget.addeventlistener() node.append
child() node.remove
child() another way to build uis every javascript framework offers a way to write user interfaces more declaratively.
Debugging on Mac OS X
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.
... 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.
...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.
Performance
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?
...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.
... if(resultlist.every((r) => r == true)) return ci.nsicontentpolicy.accept; return ci.nsicontentpolicy.reject_request; } }); // more boilerplate code here this example is a (somewhat condensed) content policy which gets triggered for every network request in a
child process to either allow or deny the request.
... 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.
Performance best practices for Firefox front-end engineers
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.
... 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(); // 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.
IME handling guide
mozilla::contentcache this is a base class of contentcachein
child and contentcacheinparent and ipc-aware.
... mozilla::contentcachein
child this exists only in remote processes.
...then, tab
child calls imestatemanager::oninstalledmenukeyboardlistener() in the remote process.
...the instance is created per ns
childview instance.
Introduction to Layout in Mozilla
ailable parser tokenizes & processes content; invokes methods on nsicontentsink with parser node objects some buffering and fixup occurs here opencontainer, closecontainer, addleaf content sink creates and attaches content nodes using nsicontent interface content sink maintains stack of “live” elements more buffering and fixup occurs here insert
childat, append
childto, remove
childat frame construction content sink uses nsidocument interface to notify of Δs in content model contentappended, contentinserted, contentremoved presshell is registered as document observer receives contentappended, etc.
...reset style context object is a placeholder for partially computed stylistic data style data is computed lazily, as it is asked for reflow recursively compute geometry (x, y, w, h) for frames, views, and widgets given w & h constraints of “root frame” compute (x, y, w, h) for all
children constraints propagated “down” via nshtmlreflowstate desired size returned “up” via nshtmlreflowmetrics basic pattern parent frame initializes
child reflow state (available w, h); places
child frame (x, y); invokes
child’s reflow method
child frame computes desired (w, h), returns via reflow metrics parent frame sizes
child frame and view base...
...d on
child’s metrics n.b.
...diately via presshell method incremental reflows targeted at a specific frame dirty, content-changed, style-changed, user-defined nshtmlreflowcommand object encapsulates info queued and processed asynchronously, nsipressshell::appendreflowcommand, processreflowcommands incremental reflow recursively descend to target recovering reflow state
child rs.reason set to incremental incremental reflow process reflow “normally” at target frame
child rs.reason set based on rc’s type incremental reflow propagate damage to frames later “in the flow” incremental reflow multiple reflow commands are batched nsreflowpath maintains a tree of target frames amortize state recovery and damage pro...
Investigating leaks using DMD heap scan mode
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.
... 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.
... 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.
... 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.
PR_ProcessAttrSetInheritableFileMap
prepare filemap for export to my
children processes via pr_createprocess.
... fm pointer to a prfilemap structure to be passed to the
child process.
... shmname pointer to the name for the prfilemap; used by
child.
...a subsequent call to pr_createprocess makes the prfilemap importable by the
child process.
nsIHTMLEditor
createanonymouselement() returns an anonymous nsdomelement of type atag,
child of aparentnode.
...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.
... 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 removelist( in astring alisttype ); parameters alisttype replaceheadcontentswithhtml() replace all
children of <head> with string of html source.
nsINavHistoryQueryResultNode
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.
... queryoptions nsinavhistoryqueryoptions the options that group the node's
children; only valid for result_type_query nodes.
... methods getqueries() returns the queries that build the node's
children; only valid for result_type_query nodes.
...queries an array of nsinavhistoryquery objects describing the set of queries that build the node's
children.
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...
... this is a node that corresponds to the tree
children tag.
... 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".
nsITreeView
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.
...each property, x, that the view gives back will cause the css ::moz-tree-column(x) to be matched on the tree
children element.
...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.
... 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).
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.
...if activity only occurs in a
child nsiwebprogress instance, then this flag will be set to indicate the start and stop of that activity.
...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.
nsIXULTemplateResult
mayprocess
children boolean true if the template builder may use this result as the reference point for additional recursive processing of the template.
... the template builder will reprocess the template using this result as the reference point and generate output content that is expected to be inserted as
children of the output generated for this result.
... if false,
child content is not processed.
...the <rule> element must always be a
child of the <query> element that was used to compile the query.
Adding items to the Folder Pane
that container will have 3
child-items, the numbers 1, 2, and 3.
...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 looks like this: let containerrow = { _numbers: 3, id: "numbers-main-container", text: "numbers", level: 0, open: false, _
children: null, get
children() { if (!this._
children) { this._
children = []; for (var i = 1; i <= this._numbers; i++) this._
children.push(new numberrow(i)); } return this._
children; }, getproperties: function gne_getprops() { // put your css attributes here }, command: function gne_command() { // just going to alert, to do something here components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getservice(components.interfaces.nsipromptservice) .alert(wi...
...ndow, null, this.text); } }; second, our
child items (the numbers 1, 2, and 3) are copies of the following prototype: function numberrow(anumber) { this._number = anumber; } numberrow.prototype = { get id() { return "numbers-
child-row-" + this._number; }, get text() { return this._number; }, level: 1, open: false,
children: [], getproperties: function gne_kid_getprops() {}, // no-op command: function gne_kid_command() { // just going to alert, to do something here components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getservice(components.interfaces.nsipromptservice) .alert(window, null, this.text); } }; putting it all together all that is left at this...
Break on DOM mutation - Firefox Developer Tools
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.
... examples for when this breakpoint is triggered are calling element.remove() or node.remove
child() on its parent node.
...in the following example, the selected node (the unordered list) is modified by adding a new
child node.
Using the CSS Typed Object Model - Web APIs
styleslist = document.queryselector('#regurgitation'); // retrieve all computed styles with computedstylemap() const defaultcomputedstyles = myelement.computedstylemap(); // iterate thru the map of all the properties and values, adding a <dt> and <dd> for each for (const [prop, val] of defaultcomputedstyles) { // properties const cssproperty = document.createelement('dt'); cssproperty.append
child(document.createtextnode(prop)); styleslist.append
child(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.append
child(document.createtextnode(val)); styleslist.append
child(cssvalue); } the computedstylemap() method returns a stylepropertymapreadonly object containing the size property, which indicates how many properties are in the map.
...omputed styles with computedstylemap() const allcomputedstyles = myelement.computedstylemap(); // array of properties we're interested in const ofinterest = ['font-weight', 'border-left-color', 'color', '--color']; // iterate through our properties of interest for ( let i = 0; i < ofinterest.length; i++ ) { // properties const cssproperty = document.createelement('dt'); cssproperty.append
child(document.createtextnode(ofinterest[i])); styleslist.append
child(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.append
child(document.createtextnode( allcomputedstyles.get(ofinterest[i]))); styleslist.append
child(cssvalue); } we included border-left-color to demonstrate that, had we included all the properties, every value that defaults to currentcolo...
...'margin-bottom', 'font-size', 'font-stretch', 'animation-duration', 'animation-iteration-count', 'width', 'height']; // iterate thru our properties of interest for ( let i = 0; i < ofinterest.length; i++ ) { // create a row const row = document.createelement( 'tr' ); // add the name of the property const cssproperty = document.createelement( 'td' ); cssproperty.append
child( document.createtextnode( ofinterest[i] ) ); row.append
child( cssproperty ); // and the unitless value const cssvalue = document.createelement( 'td' ); // shrink long floats to 1 decimal point let propval = allcomputedstyles.get( ofinterest[i] ).value; propval = ( propval % 1 ) ?
... propval.tofixed( 1 ) : propval; cssvalue.append
child(document.createtextnode( propval )); row.append
child( cssvalue ); // and the type of unit const cssunit = document.createelement( 'td' ); cssunit.append
child( document.createtextnode( allcomputedstyles.get( ofinterest[i] ).unit )); row.append
child( cssunit ); //add the row to the table stylestable.append
child( row ); } for those of you using a non-supporting browser, the above output should looks something like this: property value unit padding-top 0 px margin-bottom 16 px font-size 16 px font-stretch 100 percent animation-duration 0 s animation-iteration-count 1 number width auto ...
DocumentType - Web APIs
h="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="326" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">documenttype</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, node, and implements the
childnode interface.
... methods inherits methods from its parent, node, and implements the
childnode interface.
...
childnode.remove() removes the object from its parent
children list.
... living standard added implemention of the
childnode interface.
HTMLFormElement - Web APIs
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.
... 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.
... examples creating a new form element, modifying its attributes, then submitting it: const f = document.createelement("form"); // create a form document.body.append
child(f); // add it to the document body f.action = "/cgi-bin/some.cgi"; // add action and method attributes f.method = "post"; f.submit(); // call the form's submit() method extract information from a <form> element and set some of its attributes: <form name="forma" action="/cgi-bin/test" method="post"> <p>press "info" for form details, or "set" ...
NodeFilter.acceptNode() - Web APIs
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".
...the
children of skipped nodes are still considered.
... this is treated as "skip this node but not its
children".
.../^\s*$/.test(node.data) ) { return nodefilter.filter_accept; } } }, false ); // show the content of every non-empty text node that is a
child of root var node; while ((node = iterator.nextnode())) { alert(node.data); } specifications specification status comment domthe definition of 'nodefilter.acceptnode()' in that specification.
NodeFilter - Web APIs
for treewalker,
child nodes are also rejected.
... the
children of skipped nodes are still considered.
... this is treated as "skip this node but not its
children".
.../^\s*$/.test(node.data) ) { return nodefilter.filter_accept } } }, false ); // show the content of every non-empty text node that is a
child of root let node; while ((node = nodeiterator.nextnode())) { alert(node.data) } specifications specification status comment domthe definition of 'nodefilter' in that specification.
Text.wholeText - Web APIs
<strong>no insipid 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?
...in that case, we have: assert(para.first
child.wholetext == "thru-hiking is great!
...that’s where replacewholetext() comes in: para.first
child.replacewholetext("thru-hiking is great, but "); we’re removing every adjacent text node (all the ones that constituted the whole text) but the one on which replacewholetext() is called, and we’re changing the remaining one to the new text.
Signaling and video calling - Web APIs
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.
... function handleuserlistmsg(msg) { var i; var listelem = document.queryselector(".userlistbox"); while (listelem.first
child) { listelem.remove
child(listelem.first
child); } msg.users.foreach(function(username) { var item = document.createelement("li"); item.append
child(document.createtextnode(username)); item.addeventlistener("click", invite, false); listelem.append
child(item); }); } after getting a reference to the <ul> which contains the list of user names into the variable listelem, we e...
...mpty the list by removing each of its
child elements.
...that text node is added as a
child of the <li> element.
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...
...m_ 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 "activate" n/a input @type=password role_system_ text n/a n/a...
...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...
...tem_ listitem from @label attribute, from
child text nodes n/a state_system_ selected if option is selected n/a "select" event_object_ selectionwithin event_object_ selectionadd if selected event_object_ selectionremove if unselected select @size > 1 role_system_ list n/a n/a state_system_ multiselectable if multiselectable n/a n/a n/a select @size = 1 role_system_ combobox n/a name of focused option state_system_ expanded if combobox open state_system_ collapsed if combobox is collapsed state_system_ haspopup state_system_ focusable n/a "open"/"close" depending on state event_object_ valuechange when selected option is changed table role_system_ table from @summary attribute n/a described_by (0x100e) points to caption element n/a n/a td, th role_system_ cell n/a n/a n/a...
Block and inline layout in normal flow - CSS: Cascading Style Sheets
the flex items however are participating in a flex formatting context, because their parent is the element with display: flex, which has an inner display type of flex, establishing the flex formatting context for the direct
children.
...it then has an inner display type which changes the way its
children behave.
... those
children then have an outer and inner display type too.
...they have an inner display type of flow however, meaning that their
children participate in normal flow.
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
as we have discovered, for an item to become a grid item it needs to be a direct
child of the grid container.
... therefore, where you have a <ul> element inside a grid container, that ul becomes a grid item – the
child <li> elements do not.
... if the subgrid value of display becomes implemented, it would be possible to make these
children of a grid item participate in the overall grid layout by declaring the ul element a subgrid.
...an example would be where some content was semantically marked up as a list but you decide to use a set of <div> elements instead as then you can have the element to be a direct
child of a container set to display: grid.
Subgrid - CSS: Cascading Style Sheets
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.
...so the column tracks behave as a regular nested grid, but the rows are tied to the two tracks that the
child spans.
... 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.
box-flex-group - CSS: Cascading Style Sheets
the box-flex-group css property assigns the flexbox's
child elements to a 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.
... if the box would overflow after the preferred space of the
children has been computed, then space is removed from flexible elements in a manner similar to that used when adding extra space.
... 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...
box-ordinal-group - CSS: Cascading Style Sheets
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.
... 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.
box-pack - CSS: Cascading Style Sheets
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.
...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 ...
...*/ -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.example, centered horizontally.</p> </div> specifications not part of any standard.
justify-self - CSS: Cascading Style Sheets
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.
... html <article class="container"> <span>first
child</span> <span>second
child</span> <span>third
child</span> <span>fourth
child</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: 40px; grid-gap: 10px; width: 300px; justify-items: stretch; } span:nth-
child(2) { justify-self: start...
...; } span:nth-
child(3) { justify-self: center; } span:nth-
child(4) { justify-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 'justify-self' in that specification.
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.
... if flattened, the element's
children will not exist on their own in the 3d-space.
... 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.
Audio and Video Delivery - Developer guides
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.
...miro — free, open-source music and video player handbrake — open source video transcoder firefogg — video and audio encoding for firefox ffmpeg2 — comprehensive command line encoder libav — comprehensive command line encoder vid.ly — video player,transcoding and delivery 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 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.
...pg" alt="dynamic app search in firefox os"> </a> <p>click image to play a video demo of dynamic app search</p> </video> var v = document.queryselector('video'), sources = v.queryselectorall('source'), lastsource = sources[sources.length-1]; lastsource.addeventlistener('error', function(ev) { var d = document.createelement('div'); d.innerhtml = v.innerhtml; v.parentnode.replace
child(d, v); }, false); audio/video javascript libraries a number of audio and video javascript libaries exist.
Block formatting context - Developer guides
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.
...there's no floating
children avaliable inside a flex/grid container, but exclude external floats and suppress margin collapsing still works.
...any
child element will be contained inside it.
<semantics> - MathML
the <semantics> element acts as a container element associating annotations and must have
child elements (it will raise an invalid markup error otherwise).
... 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.
... if no presentation mathml is found, render the first <annotation> or <annotation-xml>
child element of <semantics>.
MathML documentation index - MathML
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.
...
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.
... 30 <mstyle> mathml, mathml reference, mathml:element, mathml:general layout schemata the mathml <mstyle> element is used change the style of its
children.
Namespaces crash course - SVG: Scalable Vector Graphics
this parameter says that the <svg> element and its
child elements belong to whichever xml dialect has the namespace name 'http://www.w3.org/2000/svg' which is, of course, svg.
...as a result, it and all its
child elements are interpreted by the user agent as belonging to xhtml, except for the <svg> element.
...this tells the user agent that that particular element (but not its
children this time!) belongs to the namespace assigned to the prefix.
...oss 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="#ff0000"/> </svg:svg> </body> </html> note that because a namespace prefix is used for the <svg:svg> element and its
child <svg:circle>, it wasn't necessary to redeclare the default namespace.
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 (...
...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 unknown color change notes color managed images implementation status unknown rgba, hsl, lab, icc named colors and device colors implementation ...
... 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 ...
Using custom elements - Web Components
// create a shadow root this.attachshadow({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') ?
... this.getattribute('img') : 'img/default.png'; const info = wrapper.append
child(document.createelement('span')); info.setattribute('class','info'); // take attribute content and put it inside the info span info.textcontent = this.getattribute('data-text'); // create some css to apply to the shadow dom const style = document.createelement('style'); style.textcontent = '.wrapper {' + // css truncated for brevity // attach the created elements to the shadow dom this.shadowroot.append(style,wrapper); finally, we register our custom element on the customelementregistry using the define() method we mentioned earlier — in the parameters we specify the element name, and then the class name that defines its functionality: customelements.define('popup-info', popupinfo); it is now available to u...
... for example, take a look at this code from our popup-info-box-external-stylesheet example (see the source code): // apply external styles to the shadow dom const linkelem = document.createelement('link'); linkelem.setattribute('rel', 'stylesheet'); linkelem.setattribute('href', 'style.css'); // attach the created element to the shadow dom shadow.append
child(linkelem); note that <link> elements do not block paint of the shadow root, so there may be a flash of unstyled content (fouc) while the stylesheet loads.
...the custom element looks like this: <custom-square l="100" c="red"></custom-square> the class constructor is really simple — here we attach a shadow dom to the element, then attach empty <div> and <style> elements to the shadow root: const shadow = this.attachshadow({mode: 'open'}); const div = document.createelement('div'); const style = document.createelement('style'); shadow.append
child(style); shadow.append
child(div); the key function in this example is updatestyle() — this takes an element, gets its shadow root, finds its <style> element, and adds width, height, and background-color to the style.
places/bookmarks - Archive of obsolete content
group({ title: "guitars" }); let bookmarks = [ bookmark({ title: "ran", url: "http://ranguitars.com", group: group }), bookmark({ title: "ibanez", url: "http://ibanez.com", group: group }), bookmark({ title: "esp", url: "http://espguitars.com", group: group }) ]; // save `bookmarks` array -- notice we don't have `group` in the array, // although it needs to be saved since all bookmarks are
children // of `group`.
...in this case, // `mygroup` has to be saved before `mybookmark`, since // `mybookmark` is a
child of `mygroup`.
...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.
Low-Level APIs - Archive of obsolete content
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.
... system/
child_process an implementation of the node.js
child_process api.
HTML to DOM - Archive of obsolete content
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>.
... var frame = document.getelementbyid("sample-frame"); 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.a...
...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
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 yo...
...and
children this.branch = prefservice.getbranch("extensions.myextension."); // now we queue the interface called nsiprefbranch2.
... */ preflistener.prototype.register = function(trigger) { this._branch.addobserver('', this, false); if (trigger) { let that = this; this._branch.get
childlist('', {}).
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
as in all trees, elements can have
children (elements contained within them) and parents (elements that contain them).
...listing 4 shows an 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.
... listing 4: an example manipulation using the dom var bar = document.getelementbyid('toolbar'); bar.remove
child(bar.
childnodes[1]); bar.append
child(document.createelement('button')); bar.last
child.setattribute('label', 'hello!'); « previousnext » ...
Connecting to Remote Content - Archive of obsolete content
request.onload = function(aevent) { let responsexml = aevent.target.responsexml; let rootelement = responsexml.documentelement; if (rootelement && "parseerror" != rootelement.tagname) { let shopelements = rootelement.getelementsbytagname("shop"); let totalelement = rootelement.getelementsbytagname("total")[0]; window.alert(shopelements[1].getelementsbytagname("name")[0].first
child.nodevalue); // => orange window.alert(totalelement.first
child.nodevalue); // => 2 } }; using dom functions is good for simple xml documents, but dom manipulation code can become too complicated if the documents are more complex.
...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.getelementbyid("foo").append
child(xulnode); }; we effectively transformed the xml file into xul and integrated it into the ui.
Drag and Drop Example - Archive of obsolete content
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.
...next, append
child is called to add the new element to the stack, which is the target of the event.
...", 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 ...
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...
...e.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(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 = "d...
... 6: statusstr = "blocked"; style = "color:white background-color:red"; break; case 7: statusstr = "scanning"; style = "color:silver"; break; default: statusstr = "unknown"; break; } cell.setattribute("label", statusstr); cell.setattribute("style", style); row.append
child(cell); loglist.append
child(row); } } finally { statement.reset(); dbconn = null; } } this code is fairly simple.
Example Sticky Notes - Archive of obsolete content
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> <
children/> </content> <implementation> <!-- here and futher cdata wrappers around javascript code are not mandatory but recommended.
... 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.
A XUL Bestiary - Archive of obsolete content
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.
...in a way, the menu element comprises the menu element itself and its
children, the popup and menuitems.
...a menubar in xul, for instance, can contain event handlers for events fired by its
child menuitems.
allowevents - Archive of obsolete content
« xul reference home allowevents type: boolean if true, events are passed to
children of the element.
... on listitem and titlebar elements, mouse events normally do not get sent to their
children; instead they are retargeted to the listitem and titlebar element itself.
...for the latter, the allowevents attribute is set to true to have a click on the
child button receive events instead of targeting all events at the menu.
isempty - Archive of obsolete content
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.
orient - Archive of obsolete content
« xul reference home orient type: one of the values below used to specify whether the
children of the element are oriented horizontally or vertically.
... 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 appear in the xul source.
OpenClose - Archive of obsolete content
if the menu is a
child of another menu and the parent menu is not open.
...if you do want to open a submenu, open the parent menu first, and then open the
child menu in a popupshown event listener.
...however, any
child menus of 'somemenu' in the example will be closed, as 'somemenu' will no longer be open.
Tooltips - Archive of obsolete content
for example: <tooltip id="iconic" onpopupshowing="this.last
child.value = document.tooltipnode.label;"/> the document.tooltipnode property of the document holds the element that the mouse is hovering over.
...this label is then set as the value of the last
child of the tooltip.
... in the earlier example, the last
child of the tooltip is a label.
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...
Multiple Queries - Archive of obsolete content
here is an example using an rdf datasource: <hbox id="photoslist" datasources="template-guide-photos3.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <queryset> <query> <content uri="?start"/> <member container="?start"
child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="canal"/> </query> <action> <button uri="?photo" image="?photo" label="view" orient="vertical"/> </action> </queryset> <queryset> <query> <content uri="?start"/> <member container="?start"
child="?photo"/> ...
...this is because all simple queries will iterate over the same data, usually the
children of an rdf container.
...if, for example, you have six queries, each with a <member> condition, the builder will need to construct the
children six times.
Things I've tried to do with XUL - Archive of obsolete content
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 // ...
...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 = 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
(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"> ...
... tree
children::-moz-tree-cell-text { cursor: pointer; } this allows you to create separate cursors for cells.
...example: tree
children::-moz-tree-separator { margin-top: 1px; border-top: 1px solid threedshadow; border-left: 1px solid threedshadow; border-right: 1px solid threedhighlight; border-bottom: 1px solid threedhighlight; height: 2px; } original document information author: neil deakin source: here ...
Creating a Skin - Archive of obsolete content
the first rule above (for 'window > box') specifies that the
child box of the window has a different color.
...that way, we can modify the xul without needing to keep the box as the first
child of the window.
... 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.
Custom Tree Views - Archive of obsolete content
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.
...getrowproperties: function(row,props){}, getcellproperties: function(row,col,props){}, getcolumnproperties: function(colid,col,props){} }; function setview(){ document.getelementbyid('my-tree').view = treeview; } </script> <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> </window> in the image, you can see two columns, each with data taken from the getcelltext() function.
XUL Questions and Answers - Archive of obsolete content
an example of this is: var tree = document.getelementbyid('treeid'); selectedtreeitem = tree.view.getitematindex(tree.currentindex); selectedtreeitem.first
child.setattribute('style', 'background: #ff0000'); what is an example of tab browser in xul?
... 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?
... mailing lists are
children of directories.
Accessibility/XUL Accessibility Reference - Archive of obsolete content
tabpanel see tabbox tabpanels see tabbox tabs 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 widget visually to the right of the column headers) or the column headers themselves (for sorting by column).
... treecell see tree tree
children see tree treecol see tree treecols see tree treeitem see tree treerow see tree elements that do not expose anything to screen readers/have no discovered accessibility issues yet: arrowscrollbox bbox box grippy hbox menuseparator overlay page script spacer splitter stringbundle stringbundleset vb...
caption - Archive of obsolete content
it may contain either a text label, using the label attribute, or
child elements for a more complex caption.
... 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...
...ributes(), 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 groupbox, checkbox ...
columns - Archive of obsolete content
child column elements define the individual columns to appear in the grid.
...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...
...ributes(), 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 grid, column, rows, row.
content - Archive of obsolete content
for example, by using a value of tree
children, the condition will only match when placing elements directly inside a tree
children tag.
... métodos 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...
...ributes(), 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
if text appears as a
child of the description, it will wrap to multiple lines.
... 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...
...ributes(), 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 header a class used for headings.
grid - Archive of obsolete content
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.
...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...
...ributes(), 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 columns, column, rows, row.
hbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of
child elements.
...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...
...ributes(), 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 box, vbox ...
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...
...ributes(), 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, keycode, and modifiers attributes for example, consider the following key: <key key="r" modifiers="shift"/> this key will only match when the shift key is pressed as well as the r key, and no other keys.
...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
type type: string this attribute is reserved for use by anonymous
children of listitem; do not use.
...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...
...ributes(), 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 listcell-iconic use this class to have an image appear on the listcell.
menuitem - Archive of obsolete content
allowevents type: boolean if true, events are passed to
children of the element.
...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...
...ributes(), 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 menuitem-iconic use this class to have an image appear on the menuitem.
menuseparator - Archive of obsolete content
allowevents type: boolean if true, events are passed to
children of the element.
... 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...
...ributes(), 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 menu, menubar, menuitem, menulist, menupopup interfaces nsiaccessibleprovider, nsidomxulcontaineritemelement, nsidomxulselectcontrolitemelement ...
notificationbox - Archive of obsolete content
the notification box is a vertical box which may have
children.
... methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...as
childnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), remove
child(), removeeventlistener(), replace
child(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata appendnotification( label , value , image , priority , buttons, eventcallback ) return type: element create a new notification and display it.
param - Archive of obsolete content
the value to bind should be text as a
child of the param element.
...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...
...ributes(), 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
it's supposed to be a
child of <prefpane> element.
... 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(), 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(), setatt...
prefpane - Archive of obsolete content
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.
... 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...
...ributes(), 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 paneload this event is fired on the pane element when the pane is fully loaded (e.g.
scale - Archive of obsolete content
max, min, movetoclick, pageincrement, tabindex, value properties disabled, max, min, increment, pageincrement, tabindex, value, methods decrease, decreasepage, increase, increasepage, examples horizontal scale: <scale min="1" max="10"/> vertical scale: <scale min="1" max="10" orient="vertical"/> attributes dir type: one of the values below the direction in which the
child elements of the element are placed.
... 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...
...ributes(), 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() return type: no return value decreases the value of the scale or number box by the increment.
tabbox - Archive of obsolete content
the tabbox should contain two
children, the first a tabs element which contains the tabs and the second a tabpanels element which contains the contents of the pages.
... 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...
...ributes(), 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, tab, tabpanels, tabpanel.
toolbarpalette - Archive of obsolete content
the
children of the toolbarpalette should be the complete list of toolbarbuttons and toolbaritems that can be added to the toolbar.
...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...
...ributes(), 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 toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox ...
triple - Archive of obsolete content
the predicate would be a
child element or property.
...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...
...ributes(), 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
« xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of
child elements.
...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...
...ributes(), 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 box, hbox ...
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...
...ributes(), 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 window object methods note the error message "xml parsing error: undefined entity...<window" can be caused by a missing or unreachable dtd file referenced in the xul file.
...tml="http://www.w3.org/1999/xhtml"> <!-- icon from chrome --> <html:link rel="icon" href="chrome://myextension/content/path/to/favicon.png"/> <!-- from a remote site --> <html:link rel="icon" href="http://www.mozilla.org/favicon.ico"/> since firefox 3.6 the above listed code does not work correctly - it produces the following message: "warning: xul box for box element contained an inline link
child, forcing all its
children to be wrapped in a block".
Using SSH to connect to CVS - Archive of obsolete content
the passphrase will be held for the length of the x session, and be passed on to all
child shells.
...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.
display-outside - Archive of obsolete content
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.
...for example, a table-caption box must have a table parent, but can establish any kind of formatting context for its
children.
Implementation Status - Archive of obsolete content
3.2.4 node-set binding attributes supported 3.2.5 model item property attributes partial in some cases a loop error can occur on valid bindings 302168; 3.3.1 model supported 3.3.2 instance partial instance element with two
child element does not trigger exception 337302; 3.3.3 submission partial no support for @indent and complex schema validation 278761; 278762; 3.3.4 bind partial using the index() function in binds does not work.
...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...
...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.
Bounding volume collision detection with THREE.js - Game development
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.
...this helper takes a mesh and calculates a bounding box volume for it (including its
child meshes).
... 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.
Async scripts for asm.js - Game development
putting async into action getting async compilation is easy: when writing your javascript, just use the async attribute like so: <script async src="file.js"></script> or, to do the same thing via script: var script = document.createelement('script'); script.src = "file.js"; document.body.append
child(script); (scripts created from script default to async.) the default html shell emscripten generates produces the latter.
... 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.
...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.
Test your skills: Grid Layout - Learn web development
grid layout one in this task you should create a grid into which the four
child elements will auto-place.
...by editing the css rules for the two
child elements, cause them to span over several grid tracks each; the second item should overlay the first as in the image below.
... grid layout three there are four direct
children in this grid; the starting point has them displayed using auto-placement.
How CSS works - Learn web development
some elements are parents of
child nodes, and
child nodes have siblings.
...its
children are a text node and the three nodes corresponding to our <span> elements.
... the 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.
Graceful asynchronous programming with Promises - Learn web development
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.
...status: ${response.status}`); } else { return response.blob(); } }) .then(myblob => { let objecturl = url.createobjecturl(myblob); let image = document.createelement('img'); image.src = objecturl; document.body.append
child(image); }) .catch(e => { console.log('there has been a problem with your fetch operation: ' + e.message); }); bear in mind that the value returned by a fulfilled promise becomes the parameter passed to the next .then() block's executor function.
...d from the promises in separate variables; create object urls from the blobs let objecturl1 = url.createobjecturl(values[0]); let objecturl2 = url.createobjecturl(values[1]); let desctext = values[2]; // display the images in <img> elements let image1 = document.createelement('img'); let image2 = document.createelement('img'); image1.src = objecturl1; image2.src = objecturl2; document.body.append
child(image1); document.body.append
child(image2); // display the text in a paragraph let para = document.createelement('p'); para.textcontent = desctext; document.body.append
child(para); save and refresh and you should see your ui components all loaded, albeit in a not particularly attractive way!
Looping code - Learn web development
output.append
child(para); — appends the paragraph to the output <div>.
...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...
Implementing feature detection - Learn web development
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.
...go into modernizr-css.css, and replace the two @supports blocks with the following: /* properties for browsers with modern flexbox */ .flexbox main { display: flex; } .flexbox main div { padding-right: 4%; flex: 1; } .flexbox main div:last-
child { padding-right: 0; } /* fallbacks for browsers that don't support modern flexbox */ .no-flexbox main div { width: 22%; float: left; padding-right: 4%; } .no-flexbox main div:last-
child { padding-right: 0; } .no-flexbox footer { clear: left; } so how does this work?
....coords.latitude,position.coords.longitude); let myoptions = { zoom: 8, center: latlng, maptypeid: google.maps.maptypeid.terrain, disabledefaultui: true } let map = new google.maps.map(document.getelementbyid("map_canvas"), myoptions); }); } else { const para = document.createelement('p'); para.textcontent = 'argh, no geolocation!'; document.body.append
child(para); } try your example out!
Debugging on Windows
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.
...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.
How Mozilla's build system works
make starts processing the makefile in the root directory and then recursively descends into
child directories until it's done.
...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.
Gecko Logging
if you're only interested in the content process you can use rust_log_
child rather than rust_log.
...
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.
Process scripts
the following code uses the 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) { ...
... }); the process script's global is a
child process message manager, which enables the process script to receive messages from the chrome side, and to send messages to the chrome side: // process-script.js if (services.appinfo.processtype == services.appinfo.process_type_content) { dump("welcome to the process script in a content process"); } else { dump("welcome to the process script in the main process"); } // message is sent using contentprocessmessagemanager sendasyncmessage("hello"); in this example, the dump() statement will run once in each content process as well as in the main process.
... 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.
How to get a stacktrace with WinDbg
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.
... .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.
... a: you ran the application without the "debug
child processes also" check box being checked.
IPDL Best Practices
use a flag and the generated actordestroy function to control when ipdl functions can be called; see phttpchannelparent/
child for an example.
... 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.
... it makes sense to fold construction and the first message together, as well as the penultimate and deletion messages, so that the final protocol looks like this: async protocol pasyncquerier {
child: pasyncquery(nsstring query); } async protocol pasyncquery { parent: __delete__(nsstring result); } ...
CustomizableUI.jsm
method overview void addlistener(alistener); void removelistener(alistener); void registerarea(aareaid, aproperties); void registertoolbarnode(atoolbar, aexisting
children); void registermenupanel(apanel); void unregisterarea(aareaid, adestroyplacements); void addwidgettoarea(awidgetid, aareaid, [optional] aposition); void removewidgetfromarea(awidgetid); void movewidgetwithinarea(awidgetid, aposition); void ensurewidgetplacedinwindow(awidgetid, awindow); void beginbatchupdate(); void endbat...
...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.
...d match id of that in cui.jsm (line #2) title: 'activity indicator', align: 'center', pack: 'center', mousethrough: 'always', removable: 'true', sdkstylewidget: 'true', overflows: false }; for (var p in props) { toolbaritem.setattribute(p, props[p]); } toolbaritem.append
child(image); return toolbaritem; } }); when you want to remove this widget run this code: customizableui.destroywidget('navigator-throbber-id-within-customizableui-object'); custom type - involved the browser uses type custom for its zoom controls and edit controls in the panel.
Profiling with the Firefox Profiler
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.
...this happens when a function has 2 or more non-trivial calls: the running time will be split between its
children.
...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.
Process Forking in NSPR
all the threads present in the parent process may be replicated in the
child process, only the calling thread may be replicated in the
child process or only the calling kernel thread may be replicated.
... so, to be consistent across all platforms, it is suggested that when using fork in a nspr thread; the exec function should be called in the
child process.
... no nspr functions should be called in the
child process before the exec call is made.
JS_TracerInit
in the latter case, the only operations the callback may perform on thing are to call js_trace
children or the debug-only js_printtracethinginfo function.
... description js_trace
children and other tracing apis call the tracer callback for each traceable thing directly referenced by a particular object or runtime structure.
... it is the callback's responsibility to ensure the traversal of the full object graph, if desired, by eventually calling js_trace
children on the passed thing.
SavedFrame
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.
... 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 frame’s
children are calls to handlers for a promise this frame created, this frame’s asynccause would be "promise".
Retrieving part of the bookmarks tree
before accessing the
children of any result container, you must first open it, and then you can iterate the
children.
...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!
... components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); var toolbarfolder = bookmarksservice.toolbarfolder; query.setfolders([toolbarfolder], 1); var result = historyservice.executequery(query, options); 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!
Building the WebLock UI
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).
...in this case, the weblock <statusbarpanel/> appears as a
child of the <statusbar/> element with id "status-bar".
nsIFile
void append( in astring node ); parameters node a string which is intended to be a
child node of the 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.
...infile does not need to be a direct
child of this nsifile to be considered a descendant.
nsIMessageBroadcaster
methods void broadcastasyncmessage([optional] in astring messagename, [optional] in jsval obj, [optional] in jsval objects); nsimessagelistenermanager get
childat(in unsigned long aindex); broadcastasyncmessage() like sendasyncmessage(), but also broadcasts this message to all "
child" message managers of this message manager.
... get
childat() return a single subordinate message manager.
...attributes
childcount number: the number of subordinate message managers.
nsINavHistoryResultNode
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).
...the members of result.
children have an indentlevel value of zero, their
children have an indentlevel of 1, and so forth.
...for hosts, or other node types with
children, this is the most recent access time for any of the
children.
nsISelection
nsidomrange getrangeat(in long index); void modify(in domstring alter, in domstring direction, in domstring granularity); void removeallranges(); void removerange(in nsidomrange range); void selectall
children(in nsidomnode parentnode); void selectionlanguagechange(in boolean langrtl); domstring tostring(); attributes attribute type description anchornode nsidomnode returns the node in which the selection begins.
...void removerange( in nsidomrange range ); parameters range selectall
children() adds all
children of the specified node to the selection.
... void selectall
children( in nsidomnode parentnode ); parameters parentnode the parent of the
children to be added to the selection.
nsIWebProgress
nsiwebprogress instances may be arranged in a parent-
child configuration, corresponding to the parent-
child configuration of their respective dom windows.
...the parent-
child relationship of nsiwebprogress instances is not made explicit by this interface, but the relationship may exist in some implementations.
... a nsiwebprogresslistener instance receives notifications for the nsiwebprogress instance to which it added itself, and it may also receive notifications from any nsiwebprogress instances that are
children of that nsiwebprogress instance.
XPCOM ownership guidelines
parents own their
children (and not the reverse).
... though parents may not need to own their
children.
...in the simplest scheme, however, parents point to their
children with owning-pointers,
children point back to their parents with non-owning-pointers.
Accessibility Inspector - Firefox Developer Tools
items with nested
children have arrows that can be clicked to reveal the
children, so you can move deeper into the hierarchy.
...
childcount — the number of
child items the current item has in the accessibility tree hierarchy.
... indexinparent — an index value indicating what number
child the item is, inside its parent.
Background Tasks API - Web APIs
+ 1; if (totaltaskcount) { if (progressbarelem.max != totaltaskcount) { totaltaskcountelem.textcontent = totaltaskcount; progressbarelem.max = totaltaskcount; } if (progressbarelem.value != currenttasknumber) { currenttasknumberelem.textcontent = currenttasknumber; progressbarelem.value = currenttasknumber; } } if (logfragment) { logelem.append
child(logfragment); logfragment = null; } if (scrolledtoend) { logelem.scrolltop = logelem.scrollheight - logelem.clientheight; } statusrefreshscheduled = false; } first, scrolledtoend is set to true if the text in the log is scrolled to the bottom; otherwise it's set to false.
... 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.
... 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.
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 bac...
...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...
CustomElementRegistry.whenDefined() - Web APIs
<menu-item>item n</menu-item> </nav-menu> </nav> const container = document.getelementbyid('menu-container'); const placeholder = container.queryselector('.menu-placeholder'); // fetch all the
children of menu that are not yet defined.
... const undefinedelements = container.queryselectorall(':not(:defined)'); const promises = [...undefinedelements].map( button => customelements.whendefined(button.localname) ); // wait for all the
children to be upgraded, // then remove the placeholder.
... await promise.all(promises); container.remove
child(placeholder); specifications specification status comment html living standardthe definition of 'customelements.whendefined()' in that specification.
Document.createDocumentFragment() - Web APIs
in the dom tree, the document fragment is replaced by all its
children.
... since the document fragment is in memory and not part of the main dom tree, appending
children to it does not cause page reflow (computation of element's position and geometry).
... html <ul id="ul"> </ul> javascript var element = document.getelementbyid('ul'); // assuming ul exists var fragment = document.createdocumentfragment(); var browsers = ['firefox', 'chrome', 'opera', 'safari', 'internet explorer']; browsers.foreach(function(browser) { var li = document.createelement('li'); li.textcontent = browser; fragment.append
child(li); }); element.append
child(fragment); result specifications specification status comment domthe definition of 'document.createdocumentfragment()' in that specification.
Document.importNode() - Web APIs
to include it, you need to call an insertion method such as append
child() or insertbefore() with a node that is currently in the document tree.
... if deep is set to false, then only externalnode is imported — the new node has no
children.
... 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().
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...
...etattribute("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"); 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.
Introduction to the DOM - Web APIs
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.
...ement, and then adds the h1 to the tree for this document: <html> <head> <script> // run this function when the document is loaded window.onload = function() { // create a couple of elements in an otherwise empty html page const heading = document.createelement("h1"); const heading_text = document.createtextnode("big head!"); heading.append
child(heading_text); document.body.append
child(heading); } </script> </head> <body> </body> </html> fundamental data types this reference tries to describe the various objects and types in simple terms.
... 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.
ElementTraversal - Web APIs
it has been split into two interfaces, containing the useful methods and properties for each kind of nodes:
childnode parentnode as it was a pure interface, with no object of this type, this change has no effect on the web.
... specifications specification status comment domthe definition of '
childnode' in that specification.
... living standard splitted the elementtraversal interface in parentnode and
childnode element traversal specificationthe definition of 'elementtraversal' in that specification.
EventTarget.addEventListener() - Web APIs
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().
... 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.
... 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.
FileSystemEntrySync - Web APIs
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.
... 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.
... 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.
HTMLTableRowElement.insertCell() - Web APIs
the cell does not need to be appended separately with node.append
child() as would be the case if document.createelement() had been used to create the new <td> element.
...(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().
... 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.insertcell(0); // append a text node to the cell let newtext = document.createtextnode('new bottom row'); newcell.append
child(newtext); } // call addrow() with the table's id addrow('my-table'); result specifications specification status comment html living standardthe definition of 'htmltablerowelement.insertcell()' in that specification.
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...
...abaaeaaaaziiunink0rnzbtwgpnmgqwmdsngxgjuliweur5owuipz8paeame6twfwyysgo/ipfksaaah+qqjcgaaacwaaaaaeaaqaaadmwi6imkqorfjdoe82p4wgccc4ceuqradylesojembgsuc2g7sdx3lqgbmlajibufbslkaaah+qqjcgaaacwaaaaaeaaqaaadmgi63p7wcrhznfvdmghu2nfwlwci3wgc3tswhufgxtaukgcbtgenbmjaejsxgmlwzpeaach5bakkaaaalaaaaaaqabaaaamyclrc/jdksatlqtsckdcecajdii7hcq4emtcpyrcuubjcyrghvtqlaib1yhicnlsrkaaaowaaaaaaaaaaaa=="; ocover.append
child(oloadingimg); oloadingbox.append
child(ocover); onpopstate = function (oevent) { bupdateurl = false; opageinfo.title = oevent.state.title; opageinfo.url = oevent.state.url; getpage(); }; window.addeventlistener ?
MutationRecord - Web APIs
properties property type description mutationrecord.type string returns "attributes" if the mutation was an attribute mutation, "characterdata" if it was a mutation to a characterdata node, and "
childlist" if it was a mutation to the tree of nodes.
... for
childlist, it is the node whose
children changed.
... for
childlist, it is null.
Node.cloneNode() - Web APIs
the newclone has no parent and is not part of the document, until it is added to another node that is part of the document (using node.append
child() or a similar method).
... deep optional* if true, then node and its whole subtree—including text that may be in
child text nodes—is also copied.
...any text that node contains is not cloned, either (since text is contained by one or more
child text nodes).
Node.previousSibling - Web APIs
the node.previoussibling read-only property returns the node immediately preceding the specified one in its parent's
childnodes list, or null if the specified node is the first in that list.
...therefore a node obtained, for example, using node.first
child or node.previoussibling may refer to a whitespace text node rather than the actual element the author intended to get.
... to navigate the opposite way through the
child nodes list use node.nextsibling.
Node.textContent - Web APIs
for other node types, textcontent returns the concatenation of the textcontent of every
child node, excluding comments and processing instructions.
... (this is an empty string if the node has no
children.) setting textcontent on a node removes all of the node's
children and replaces them with a single text node with the given string value.
...(reflows can be computationally expensive, and thus should be avoided when possible.) unlike textcontent, altering innertext in internet explorer (version 11 and below) removes
child nodes from the element and permanently destroys all descendant text nodes.
Range.setStart() - Web APIs
for other node types, startoffset is the number of
child nodes between the start of the startnode.
...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.
... 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.
Window: unload event - Web APIs
the unload event is fired when the document or a
child resource is being unloaded.
...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('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> ...
Using the aria-hidden attribute - Accessibility
description adding aria-hidden="true" to an element removes that element and all of its
children from the accessibility tree.
...additionally, since this attribute is inherited by an element's
children, it should not be added onto the parent or ancestor of a focusable element.
...</p>
children elements can be omitted from accessibility apis: <p> this is not hidden <span aria-hidden="true">but this is</span>!
ARIA Test Cases - Accessibility
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.
...note: if this does not work, it means the browser is exposing the
children instead of respecting the "
children presentational: true" rule for sliders as the user moves the slider, the new value is spoken markup used: role="slider" aria-valuemin, aria-valuenow, aria-valuemax notes: results: at firefox ie opera safari jaws 9 - - n/a n/a jaws 10 - - - - voiceover (leopard) n/a n/a ...
ARIA: row role - Accessibility
each row contains
child cells.
...it is generally placed on row
children, rather than on the row itself.
... 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.
ARIA: switch role - Accessibility
the switch has two
child elements containing the "off" and "on" labels and is followed by a <label> identifying the switch.
... button.switch { margin: 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; -webk...
...it-user-select: none; -o-user-select: none; } the most interesting part is probably the use of attribute selectors and the :first-
child and :last-
child pseudo-classes to do all the heavy lifting of changing the appearance of the switch based on whether it's on or off.
ARIA: table role - Accessibility
within that container, each row has role="row" set and contains
child cells.
...rows can be
children of the table or within a rowgroup.
... associated wai-aria roles, states, and properties role="rowgroup" an optional
child of the table, the row group encapsulates a group of rows, similar to thead, tbody, and tfoot.
ARIA: listbox role - Accessibility
each
child of a listbox should have a role of option.
... aria-owns this is a space-separated list of element ids which are not dom
child elements of the listbox.
... if one or more entries are not dom
children of listbox, additional aria-* properties will need to be set (see aria best practices).
: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; }' + ...
...to change preferences in firefox, visit about:config.ie no support noopera full support 41safari full support 10notes full support 10notes notes certain css selectors do not work (:host > .local-
child) and styling slotted content (::slotted) is buggy.webview android full support 54chrome android full support 54firefox android full support 63 full support 63 no support 61 — 63disabled disab...
...to change preferences in firefox, visit about:config.opera android full support 41safari ios full support 10notes full support 10notes notes certain css selectors do not work (:host > .local-
child) and styling slotted content (::slotted) is buggy.samsung internet android full support 6.0legend full support full support no support no supportsee implementation notes.see implementation notes.user must explicitly enable this feature.user must explic...
CSS Flexible Box Layout - CSS: Cascading Style Sheets
in the flex layout model, the
children of a flex container can be laid out in any direction, and can “flex” their sizes, either growing to fill unused space or shrinking to avoid overflowing the parent.
... both horizontal and vertical alignment of the
children can be easily manipulated.
... basic example in the following example a container has been set to display: flex, which means that the three
child items become flex items.
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
d" "c c c c d d d d"; align-items: start; } .item1 { grid-area: a; } .item2 { grid-area: b; } .item3 { grid-area: c; } .item4 { grid-area: d; } <div class="wrapper"> <div class="item1">item 1</div> <div class="item2">item 2</div> <div class="item3">item 3</div> <div class="item4">item 4</div> </div> keep in mind that once you set align-items: start, the height of each
child <div> will be determined by the contents of the <div>.
... the align-items property sets the align-self property for all of the
child grid items.
...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.
Basic concepts of CSS Scroll Snap - CSS: Cascading Style Sheets
the scroll-snap-align property must be used on
child elements in order to set the position that scrolling will snap to.
... margins on scroll
children the scroll-margin property can be set set on
child elements, essentially defining an outset from the defined box.
... this allows for different amounts of space for different
child elements, and can be used in conjunction with scroll-padding on the parent.
CSS selectors - CSS: Cascading Style Sheets
note: there are no selectors or combinators to select parent items, siblings of parents, or
children of parent siblings.
...
child combinator the > combinator selects nodes that are direct
children of the first element.
...additional attribute selectors css level 2 (revision 1) recommendation added the >
child and + adjacent sibling combinators.
Pseudo-classes - CSS: Cascading Style Sheets
index of standard pseudo-classes :active :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 ...
... selectors level 3 recommendation defined :target, :root, :nth-
child(), :nth-last-of-
child(), :nth-of-type(), :nth-last-of-type(), :last-
child, :first-of-type, :last-of-type, :only-
child, :only-of-type, :empty and :not().
... css level 2 (revision 1) recommendation defined :lang(), :first-
child, :hover, and :focus.
box-orient - CSS: Cascading Style Sheets
inline-axis (html) the box displays its
children along the inline axis.
... block-axis (html) the box displays its
children along the block axis.
... html <div class="example"> <p>i will be to the left of my sibling.</p> <p>i will be to the right of my sibling.</p> </div> css div.example { display: -moz-box; /* mozilla */ display: -webkit-box; /* webkit */ display: box; /* as specified */ /*
children should be oriented vertically */ -moz-box-orient: horizontal; /* mozilla */ -webkit-box-orient: horizontal; /* webkit */ box-orient: horizontal; /* as specified */ } result specifications not part of any standard.
justify-items - CSS: Cascading Style Sheets
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.
... html <article class="container" tabindex="0"> <span>first
child</span> <span>second
child</span> <span>third
child</span> <span>fourth
child</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: 40px; grid-gap: 10px; width: 300px; justify-items: stretch; } article:hover, article:focus { justify-...
margin-trim - CSS: Cascading Style Sheets
the margin-trim property allows the container to trim the margins of its
children where they adjoin the container’s edges.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax none | in-flow | all examples basic usage once support is implemented for this property, it will probably work like so: when you've got a container with some inline
children and you want to put a margin between each
child but not have it interfere with the spacing at the end of the row, you might do something like this: article { background-color: red; margin: 20px; padding: 20px; display: inline-block; } article > span { background-color: black; color: white; text-align: center; padding: 10px; margin-right: 20px; } the problem here is that yo...
...u'd end up with 20px too much spacing at the right of the row, so you'd maybe do this to fix it: span:last-
child { margin-right: 0; } it is a pain having to write another rule to achieve this, and it is also not very flexible.
max-width - CSS: Cascading Style Sheets
itednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute length or noneanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting max width in pixels in this example, the "
child" will be either 150 pixels wide or the width of the "parent," whichever is smaller.
... html <div id="parent"> <div id="
child"> fusce pulvinar vestibulum eros, sed luctus ex lobortis quis.
... </div> </div> css #parent { background: lightblue; width: 300px; } #
child { background: gold; width: 100%; max-width: 150px; } result specifications specification status comment css box sizing module level 4the definition of 'max-width' in that specification.
opacity - CSS: Cascading Style Sheets
description opacity applies to the element as a whole, including its contents, even though the value is not inherited by
child elements.
... thus, the element and its
children all have the same opacity relative to the element's background, even if they have different opacities relative to one another.
... if you do not want to apply opacity to
child elements, use the background property instead.
WAI ARIA Live Regions/API Support - Developer guides
atk/at-spi event iaccessible2 event object about to be hidden or removed
children_changed::remove (fired on the parent, with event data pointing to the
child index of the accessible object to be removed) event_object_hide* (fired on the actual accessible object about to go away) object shown or inserted
children_changed::add (fired on the parent, with event data pointing to the
child index of the inserted accessible object) event_object_show* (fired on the...
... actual new accessible object) object replaced with different object (this happens especially if an object's interfaces or role changes)
children_changed::remove followed immediately by
children_change::add event_object_hide followed immediately by event_object_show text removed text_changed::delete ia2_event_text_removed (use iaccessibletext::get_oldtext to retrieve the offsets and removed text) text inserted text_changed::insert ia2_event_text_inserted (use iaccessibletext::get_newtext to retrieve the offsets and inserted text) text replaced text_changed::delete followed immediately by text_changed::insert ia2_event_text_removed followed immediately by ia2_event_text_inserted * we do not use msaa's create/destroy at the request...
...the ":system" string is calculated for
children-changed and text-changed events.
<col> - HTML: Hypertext Markup Language
if the table doesn't use a colspan attribute, use the td:nth-
child(an+b) css selector.
...td:nth-
child(2) { text-align: right; } to right-align the second column.
... 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.
<colgroup> - HTML: Hypertext Markup Language
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.
... 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.
... 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.
<input type="date"> - HTML: Hypertext Markup Language
.style.display = 'block'; fallbacklabel.style.display = 'block'; // populate the days and years dynamically // (the months are always the same, therefore hardcoded) populatedays(monthselect.value); populateyears(); } function populatedays(month) { // delete the current set of <option> elements out of the // day <select>, ready for the next set to be injected while(dayselect.first
child){ dayselect.remove
child(dayselect.first
child); } // create variable to hold new number of days to inject var daynum; // 31 or 30 days?
...daynum = 29 : daynum = 28; } // inject the right number of new <option> elements into the day <select> for(i = 1; i <= daynum; i++) { var option = document.createelement('option'); option.textcontent = i; dayselect.append
child(option); } // if previous day has already been set, set dayselect's value // to that day, to avoid the day jumping back to 1 when you // change the year if(previousday) { dayselect.value = previousday; // if the previous day was set to a high number, say 31, and then // you chose a month with less total days in it (e.g.
...=== "") { dayselect.value = previousday - 3; } } } function populateyears() { // get this year as a number var date = new date(); var year = date.getfullyear(); // make this year, and the 100 years before it available in the year <select> for(var i = 0; i <= 100; i++) { var option = document.createelement('option'); option.textcontent = year-i; yearselect.append
child(option); } } // when the month or year <select> values are changed, rerun populatedays() // in case the change affected the number of available days yearselect.onchange = function() { populatedays(monthselect.value); } monthselect.onchange = function() { populatedays(monthselect.value); } //preserve day selection var previousday; // update what day has been set to previously // see end ...
<input type="file"> - HTML: Hypertext Markup Language
function updateimagedisplay() { while(preview.first
child) { preview.remove
child(preview.first
child); } const curfiles = input.files; if(curfiles.length === 0) { const para = document.createelement('p'); para.textcontent = 'no files currently selected for upload'; preview.append
child(para); } else { const list = document.createelement('ol'); preview.append
child(list); for(const file of curfiles) { const listit...
...em = document.createelement('li'); const para = document.createelement('p'); if(validfiletype(file)) { para.textcontent = `file name ${file.name}, file size ${returnfilesize(file.size)}.`; const image = document.createelement('img'); image.src = url.createobjecturl(file); listitem.append
child(image); listitem.append
child(para); } else { para.textcontent = `file name ${file.name}: not a valid file type.
... update your selection.`; listitem.append
child(para); } list.append
child(listitem); } } } the custom validfiletype() function takes a file object as a parameter, then uses array.prototype.includes() to check if any value in the filetypes matches the file's type property.
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
the sizes attribute has an effect only when the <source> element is the direct
child of a <picture> element.
... the srcset attribute has an effect only when the <source> element is the direct
child of a <picture> element.
... 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>.
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
a <summary> element may only be used as the first
child of a <details> element.
... default label text if a <details> element's first
child is not a <summary> element, the user agent will use a default string (typically "details") as the label for the disclosure box.
... 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.
<tbody>: The Table Body element - HTML: Hypertext Markup Language
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.
... 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>.
<template>: The Content Template element - HTML: Hypertext Markup Language
also allowed as a
child of a <colgroup> element that does not have a span attribute.
...existing html tbody // and the row with the template var tbody = document.queryselector("tbody"); var template = document.queryselector('#productrow'); // clone the new row and insert it into the table var clone = template.content.clonenode(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.
... html <div id="container"></div> <template id="template"> <div>click me</div> </template> javascript const container = document.getelementbyid("container"); const template = document.getelementbyid("template"); function clickhandler(event) { alert("clicked a div"); } const firstclone = template.content.clonenode(true); firstclone.addeventlistener("click", clickhandler); container.append
child(firstclone); const secondclone = template.content.firstelement
child.clonenode(true); secondclone.addeventlistener("click", clickhandler); container.append
child(secondclone); result firstclone is a documentfragment instance, so while it gets appended inside the container as expected, clicking on it does not trigger the click event.
Content-Security-Policy - HTTP
child-src defines the valid sources for web workers and nested browsing contexts loaded using elements such as <frame> and <iframe>.
... 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.
... content security policy level 2 recommendation adds base-uri,
child-src, form-action, frame-ancestors, plugin-types, referrer, and report-uri.
Object - JavaScript
//to avoid that, we set the prototype.constructor to employee (
child).
... //to avoid that, we set the prototype.constructor to customer (
child).
... //to avoid that, we set the prototype.constructor to mime (
child).
MathML attribute reference - MathML
notation <menclose> a list of notations, separated by white space, to apply to the
child elements.
... selection <maction> the
child element which is addressed by the action.
... voffset <mpadded> sets the vertical position of the
child content.
<maction> - MathML
to specify which
child elements are addressed by the action, you can make use of the selection attribute.
... selection the
child element which is addressed by the action.
... the default value is 1, which is the first
child element.
Populating the page: how browsers work - Web Performance
tags nested within other tags are
child nodes.
...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.
... 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.
Mobile first - Progressive web apps (PWAs)
display: table makes the <article> and its
children display in a table layout, without abusing table markup.
...i had to make sure both of these were not direct
children of the <article>, otherwise the following would not work: #bottom, #top { font-size: 0.8em; position:absolute; right: 1em; text-decoration: none; } #top { color: white; top: 0.5em; } #bottom { bottom: 0.5em; } i also set their parents to be positioned relatively, so they would become the positioning contexts of the absolutely positioned elements (you don't want them to be pos...
...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...
An Overview - XSLT: Extensible Stylesheet Language Transformations
below the root node are its
children, which can be elements, comments, processing instructions and so on.
... some of those
children may also have
children.
...there are certain constraints on which type of nodes can occur where: for example, text nodes can have no
children.
XUL controls - Archive of obsolete content
<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: 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...
...ributes(), 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
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...
...ributes(), 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...
...ributes(), 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...
...ributes(), 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...
...ributes(), 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...
...ributes(), 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...
...ributes(), 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...
...ributes(), 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 inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...as
childnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), remove
child(), removeeventlistener(), replace
child(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata addprogresslistener( listener ) return type: no return value add a progress listener to the browser which will monitor loaded documents.
checkbox - Archive of obsolete content
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...
...ributes(), 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 interfaces nsiaccessibleprovider, nsidomxulcheckboxelement ...
colorpicker - Archive of obsolete content
value property gets and sets color attribute 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...
...ributes(), 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 interfaces nsidomxulcontrolelement bugs the onchange event only fires if attribute type is set to "button".
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...
...ributes(), 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 of commands ...
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...
...ributes(), 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...
...ributes(), 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
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...
...ributes(), 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 interfaces nsidomxulcontrolelement ...
dialog - Archive of obsolete content
methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...as
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() return type: no return value accepts the dialog and closes it, similar to pressing the ok button.
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...
...ributes(), 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 dialog, window ...
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...
...ributes(), 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
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...
...ributes(), 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 interfaces nsiaccessibleprovider ...
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...
...ributes(), 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...
...ributes(), 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 interfaces nsiaccessibleprovider ...
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...
...ributes(), 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 alert-icon class that adds an alert icon.
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...
...ributes(), 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
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...
...ributes(), 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 following classes may be used to style the element.
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...
...ributes(), 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 listbox, listcell, listcols, listhead, listheader, listitem ...
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...
...ributes(), 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 listbox, listcell, listcol, listhead, listheader, listitem ...
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...
...ributes(), 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 listbox, listcell, listcol, listcols, listheader, listitem ...
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...
...ributes(), 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 listbox, listcell, listcol, listcols, listhead, listitem ...
listitem - Archive of obsolete content
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...
...ributes(), 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 following classes may be used to style the element.
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...
...ributes(), 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 menu, menuitem, menulist, menupopup, menuseparator interfaces nsiaccessibleprovider ...
menupopup - Archive of obsolete content
methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...as
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() return type: no return value closes the popup immediately.
notification - Archive of obsolete content
methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...as
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 type: no return value closes the notification or findbar and removes it from its enclosing notificationbox or findbar.
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...
...ributes(), 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...
...ributes(), 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...
...ributes(), 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 popup, menupopup ...
preference - Archive of obsolete content
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...
...ributes(), 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 when a preference value changes, an onchange/change event is fired on the <preference> element.
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...
...ributes(), 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 interfaces nsiaccessibleprovider ...
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...
...ributes(), 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...
...ributes(), 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
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...
...ributes(), 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 radiogroup, checkbox interfaces nsiaccessibleprovider, nsidomxulselectcontrolitemelement, nsidomxullabeledcontrolelement ...
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...
...ributes(), 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...
...ributes(), 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...
...ributes(), 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...
...ributes(), 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...
...ributes(), 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 following classes may be used to style the element.
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...
...ributes(), 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 separator, splitter ...
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...
...ributes(), 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...
...ributes(), 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 interfaces nsiaccessibleprovider ...
<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...
...ributes(), 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 following classes may be used to style the element.
stringbundle - Archive of obsolete content
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...
...ributes(), 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 property files ...
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...
...ributes(), 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
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...
...ributes(), 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 to gecko 1.9, disabling tabs fails; even while disabled, they still accept events.
tabbrowser - Archive of obsolete content
methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...as
childnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), remove
child(), removeeventlistener(), replace
child(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata addprogresslistener( listener ) return type: no return value add a progress listener to the browser which will monitor loaded documents.
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...
...ributes(), 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 tabbox, tabs, tab, tabpanels.
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...
...ributes(), 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
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...
...ributes(), 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 following classes may be used to style the element.
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...
...ributes(), 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
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...
...ributes(), 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 interfaces nsidomxulcontrolelement ...
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...
...ributes(), 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...
...ributes(), 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 toolbar, toolbarbutton, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
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...
...ributes(), 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 toolbar, toolbarbutton, toolbargrippy, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox ...
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...
...ributes(), 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 toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarset, toolbarspacer, toolbarspring, toolbox ...
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...
...ributes(), 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 toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarspacer, toolbox ...
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...
...ributes(), 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 toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
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...
...ributes(), 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 toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbox interfaces nsiaccessibleprovider ...
tooltip - Archive of obsolete content
methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...as
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() return type: no return value closes the popup immediately.
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...
...ributes(), 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 tree, treecols, treecol, tree
children, treeitem, treerow and treeseparator.
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...
...ributes(), 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 tree, treecol, tree
children, treeitem, treerow, treecell and treeseparator.
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...
...ributes(), 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 tree, treecols, treecol, tree
children, treeitem, treerow and treecell.
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...
...ributes(), 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
methods inherited methods addeventlistener(), append
child(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), h...
...as
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 reference home advance( pageid ) return type: no return value call this method to go to the next page.
NPN_GetValue - Archive of obsolete content
in many cases, a plug-in may still have to create its own window (a transparent
child window of the browser window) to act as the owner window for popup menus and modal dialogs.
... this transparent
child window can have its own windowproc within which the plug-in can deal with wm_command messages sent to it a result of tracking the popup menu or modal dialog.
NPP_HandleEvent - Archive of obsolete content
ms windows the browser gives each windowed plug-in its own native window, often a
child window of the browser window, to draw into.
... mac os the browser does not give a windowed plug-in a native window, because the mac os platform does not support
child windows.
CSS - Archive of obsolete content
normally, a <xul:stack> will change its size so that all of its
child elements are completely visible.
... for example, moving a
child of the stack far to the right will widen the stack so the
child remains visible.-moz-text-blinkthe -moz-text-blink non-standard mozilla css extension specifies the blink mode.-moz-window-shadowthe -moz-window-shadow css property specifies whether a window will have a shadow.
HTML Drag and Drop API - Web APIs
<script> function dragover_handler(ev) { ev.preventdefault(); ev.datatransfer.dropeffect = "move"; } function drop_handler(ev) { ev.preventdefault(); // get the id of the target and add the moved element to the target's dom const data = ev.datatransfer.getdata("text/plain"); ev.target.append
child(document.getelementbyid(data)); } </script> <p id="target" ondrop="drop_handler(event)" ondragover="dragover_handler(event)">drop zone</p> note that each handler calls preventdefault() to prevent additional event processing for this event (such as touch events or pointer events).
...t ev.datatransfer.setdata("application/my-app", ev.target.id); ev.datatransfer.dropeffect = "move"; } function dragover_handler(ev) { ev.preventdefault(); ev.datatransfer.dropeffect = "move" } function drop_handler(ev) { ev.preventdefault(); // get the id of the target and add the moved element to the target's dom const data = ev.datatransfer.getdata("application/my-app"); ev.target.append
child(document.getelementbyid(data)); } </script> <p id="p1" draggable="true" ondragstart="dragstart_handler(event)">this element is draggable.</p> <div id="target" ondrop="drop_handler(event)" ondragover="dragover_handler(event)">drop zone</div> for more information, see: performing a drop drag end at the end of a drag operation, the dragend event fires at the source element — the element t...
InstallEvent - Web APIs
as a
child of extendableevent, it ensures that functional events such as fetchevent are not dispatched during installation.
...rs'}); })).then(function() { console.log('all resources have been fetched and cached.'); }); }).catch(function(error) { console.error('pre-fetching failed:', error); }) ); }); specifications specification status comment service workers working draft as of may 2015, the install event is an instance of extendableevent rather than a
child of it.
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...
...}); textarea.addeventlistener('beforeinput', (e) => { logmessage(`key "${e.data}" about to be input [event: beforeinput]`); }); textarea.addeventlistener('input', (e) => { logmessage(`key "${e.data}" input [event: input]`); }); textarea.addeventlistener('keyup', (e) => { logmessage(`key "${e.key}" released [event: keyup]`); }); btnclearconsole.addeventlistener('click', (e) => { let
child = consolelog.first
child; while (
child) { consolelog.remove
child(
child);
child = consolelog.first
child; } }); result note: on browsers that don't fully implement the inputevent interface which is used for the beforeinput and input events, you may get incorrect output on those lines of the log output.
MediaDevices.ondevicechange - Web APIs
ices() .then(function(devices) { audiolist.innerhtml = ""; videolist.innerhtml = ""; devices.foreach(function(device) { let elem = document.createelement("li"); let [kind, type, direction] = device.kind.match(/(\w+)(input|output)/i); elem.innerhtml = "<strong>" + device.label + "</strong> (" + direction + ")"; if (type === "audio") { audiolist.append
child(elem); } else if (type === "video") { videolist.append
child(elem); } }); }); } updatedevicelist() consists entirely of a call to the function enumeratedevices() on the mediadevices object referenced in the navigator.mediadevices property, as well as the code that's run when the promise returned by enumeratedevices() is fulfilled.
... 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.
MediaRecorder - Web APIs
container = document.createelement('article'); var cliplabel = document.createelement('p'); var audio = document.createelement('audio'); var deletebutton = document.createelement('button'); clipcontainer.classlist.add('clip'); audio.setattribute('controls', ''); deletebutton.innerhtml = "delete"; cliplabel.innerhtml = clipname; clipcontainer.append
child(audio); clipcontainer.append
child(cliplabel); clipcontainer.append
child(deletebutton); soundclips.append
child(clipcontainer); audio.controls = true; var blob = new blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); chunks = []; var audiourl = url.createobjecturl(blob); audio.src = audiourl; console.log("recorder stopped"); deletebutt...
...on.onclick = function(e) { evttgt = e.target; evttgt.parentnode.parentnode.remove
child(evttgt.parentnode); } } mediarecorder.ondataavailable = function(e) { chunks.push(e.data); } }) .catch(function(err) { console.log('the following error occurred: ' + err); }) } this code sample is inspired by the web dictaphone demo.
Using the MediaStream Recording API - Web APIs
ound clip'); const clipcontainer = document.createelement('article'); const cliplabel = document.createelement('p'); const audio = document.createelement('audio'); const deletebutton = document.createelement('button'); clipcontainer.classlist.add('clip'); audio.setattribute('controls', ''); deletebutton.innerhtml = "delete"; cliplabel.innerhtml = clipname; clipcontainer.append
child(audio); clipcontainer.append
child(cliplabel); clipcontainer.append
child(deletebutton); soundclips.append
child(clipcontainer); const blob = new blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); chunks = []; const audiourl = window.url.createobjecturl(blob); audio.src = audiourl; deletebutton.onclick = function(e) { let evttgt = e.target; evttgt.parentnode.parentnode.re...
...move
child(evttgt.parentnode); } } let's go through the above code and look at what's happening.
MediaStream Recording API - Web APIs
} } function download() { var blob = new blob(recordedchunks, { type: "video/webm" }); var url = url.createobjecturl(blob); var a = document.createelement("a"); document.body.append
child(a); a.style = "display: none"; a.href = url; a.download = "test.webm"; a.click(); window.url.revokeobjecturl(url); } // demo: to download after 9sec settimeout(event => { console.log("stopping"); mediarecorder.stop(); }, 9000); examining and controlling the recorder status you can also use the properties of the mediarecorder object to determine the state of the recording process...
... navigator.mediadevices.enumeratedevices() .then(function(devices) { devices.foreach(function(device) { let menu = document.getelementbyid("inputdevices"); if (device.kind == "audioinput") { let item = document.createelement("option"); item.innerhtml = device.label; item.value = device.deviceid; menu.append
child(item); } }); }); code similar to this can be used to let the user restrict the set of devices they wish to use.
MutationObserver.observe() - Web APIs
(for example, if mutationobserverinit.
childlist, mutationobserverinit.attributes, and mutationobserverinit.characterdata are all false.) the value of options.attributes is false (indicating that attribute changes are not to be monitored), but attributeoldvalue is true and/or attributefilter is present.
...ementid"); // create a new instance of `mutationobserver` named `observer`, // passing it a callback function const observer = new mutationobserver(function() { console.log('callback that runs when observer is triggered'); }); // call `observe()` on that mutationobserver instance, // passing it the element to observe, and the options object observer.observe(elementtoobserve, {subtree: true,
childlist: true}); specifications specification status comment domthe definition of 'mutationobserver.observe()' in that specification.
MutationObserverInit - Web APIs
properties at a minimum, one of
childlist, attributes, and/or characterdata must be true when you call observe().
...
childlist optional set to true to monitor the target node (and, if subtree is true, its descendants) for the addition of new
child nodes or removal of existing
child nodes.
Node.getRootNode() - Web APIs
(see the full source code): <!-- source: https://github.com/jserz/js_piece/blob/master/dom/node/getrootnode()/demo/getrootnode.html --> <div class="js-parent"> <div class="js-
child"></div> </div> <div class="js-shadowhost"></div> <script> // works on chrome 54+,opera 41+ var parent = document.queryselector('.js-parent'),
child = document.queryselector('.js-
child'), shadowhost = document.queryselector('.js-shadowhost'); console.log(parent.getrootnode().nodename); // #document console.log(
child.getrootnode().nodename); // #document // create a shado...
...wroot var shadowroot = shadowhost.attachshadow({mode:'open'}); shadowroot.innerhtml = '<style>div{background:#2bb8aa;}</style>' + '<div class="js-shadow
child">content</div>'; var shadow
child = shadowroot.queryselector('.js-shadow
child'); // the default value of composed is false console.log(shadow
child.getrootnode() === shadowroot); // true console.log(shadow
child.getrootnode({composed:false}) === shadowroot); // true console.log(shadow
child.getrootnode({composed:true}).nodename); // #document </script> specifications specification status comment domthe definition of 'getrootnode()' in that specification.
Node.isConnected - Web APIs
examples standard dom a standard dom example: let test = document.createelement('p'); console.log(test.isconnected); // returns false document.body.append
child(test); console.log(test.isconnected); // returns true shadow dom a shadow dom example: // create a shadow root var shadow = this.attachshadow({mode: 'open'}); // create some css to apply to the shadow dom var style = document.createelement('style'); console.log(style.isconnected); // returns false style.textcontent = ` .wrapper { position: relative; } .info { font-size: 0.8rem; width...
...: 200px; display: inline-block; border: 1px solid black; padding: 10px; background: white; border-radius: 10px; opacity: 0; transition: 0.6s all; positions: absolute; bottom: 20px; left: 10px; z-index: 3 } `; // attach the created style element to the shadow dom shadow.append
child(style); console.log(style.isconnected); // returns true polyfill node.isconnected can be polyfilled with the following code for ie10 and edgehtml: /* * node.isconnected polyfill for ie and edgehtml * 2020-02-04 * * by eli grey, https://eligrey.com * public domain.
Node.nextSibling - Web APIs
the node.nextsibling read-only property returns the node immediately following the specified one in their parent's
childnodes, or returns null if the specified node is the last
child in the parent element.
...therefore a node obtained, for example, using node.first
child or node.previoussibling may refer to a whitespace text node rather than the actual element the author intended to get.
Node.nodeType - Web APIs
examples different types of nodes document.nodetype === node.document_node; // true document.doctype.nodetype === node.document_type_node; // true document.createdocumentfragment().nodetype === node.document_fragment_node; // true var p = document.createelement("p"); p.textcontent = "once upon a time…"; p.nodetype === node.element_node; // true p.first
child.nodetype === node.text_node; // true comments this example checks if the first node inside the document element is a comment, and displays a message if not.
... var node = document.documentelement.first
child; if (node.nodetype !== node.comment_node) { console.warn("you should comment your code!"); } specifications specification status comment domthe definition of 'node.nodetype' in that specification.
Node.ownerDocument - Web APIs
syntax var document = element.ownerdocument; value document is the top-level document object in which all the
child nodes are created.
... example // given a node "p", get the top-level html //
child of the document object var d = p.ownerdocument; var html = d.documentelement; specifications specification status comment domthe definition of 'node: ownerdocument' in that specification.
NodeIterator.expandEntityReferences - Web APIs
the nodeiterator.expandentityreferences read-only property returns a boolean flag indicating whether or not the
children of entity reference nodes are visible to the nodeiterator.
... if this value is false, the
children of entity reference nodes (as well as all of their descendants) are rejected.