Search completed in 0.98 seconds.
EventTarget.removeEventListener() - Web APIs
the eventtarget.
removeeventlistener() method
removes from the eventtarget an event listener previously registered with eventtarget.addeventlistener(). the event listener to be
removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see matching event listeners for removal syntax target.
removeeventlistener(type, listener[, options]); target.
removeeventlistener(type, listener[, usecapture]); parameters type a string which specifies the type of event for which to
remove an event listener. listener the eventlistener function of the event handler to
remove from the event target. options optional an options object that specifies characteristics about the event listener. the avail...
... capture: a boolean which indicates that events of this type will be dispatched to the registered listener before being dispatched to any eventtarget beneath it in the dom tree. mozsystemgroup: available only in code running in xbl or in firefox' chrome, it is a boolean defining if the listener is added to the system group. usecapture optional specifies whether the eventlistener to be
removed is registered as a capturing listener or not. if this parameter is absent, a default value of false is assumed. if a listener is registered twice, one with capture and one without,
remove each one separately. removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa. return value undefined matching event listeners for removal given an even...
...if a listener is registered twice, one with capture and one without,
remove each one separately. removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa. return value undefined matching event listeners for removal given an event listener previously added by calling addeventlistener(), you may eventually come to a point at which you need to
remove it. obviously, you need to specify the same type and listener parameters to
removeeventlistener(). ...
...And 17 more matches
JS::Remove*Root
obsolete since jsapi 38this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. this article covers features introduced in spidermonkey 31 unregister a pointer to a gc thing so that it is no longer a member of the garbage collector's root set. this enables any pointed-at gc thing to be garbage collected as needed. ...
...obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. this article covers features introduced in spidermonkey 31 unregister a pointer to a gc thing so that it is no longer a member of the garbage collector's root set. this enables any pointed-at gc thing to be garbage collected as needed. ...
...is discouraged since it could be
removed at any time. try to avoid using it. this article covers features introduced in spidermonkey 31 unregister a pointer to a gc thing so that it is no longer a member of the garbage collector's root set. this enables any pointed-at gc thing to be garbage collected as needed. ...
...And 13 more matches
FileSystemDirectoryEntry.removeRecursively() - Web APIs
receives a fileerror describing the error which occurred as input. return value undefined. ...
...receives a fileerror describing the error which occurred as input. return value undefined. ...
...receives a fileerror describing the error which occurred as input. return value undefined. ...
...And 9 more matches
Element.removeAttribute() - Web APIs
many attributes will not behave as expected if you set them to null. ...
...many attributes will not behave as expected if you set them to null. ...
...many attributes will not behave as expected if you set them to null. ...
...And 7 more matches
Node.removeChild() - Web APIs
the node.
removechild() method
removes a child node from the dom and returns the
removed node. syntax var oldchild = node.
removechild(child); or node.
removechild(child); child is the child node to be
removed from the dom. node is the parent node of child. oldchild holds a reference to the
removed child node, i.e., oldchild === child. the
removed child node still exists in memory, but is no longer part of the dom. with the first syntax form shown, you may reuse the
removed node later in your code, via the oldchild object reference. in the second syntax form, however, there is no oldchild reference kept, so assuming your code has not kept any other reference to the node elsewhere, it will immediately become unusable and irretrievable, and will usually be automatically deleted from memor...
...ence kept, so assuming your code has not kept any other reference to the node elsewhere, it will immediately become unusable and irretrievable, and will usually be automatically deleted from memory after a short time. if child is actually not a child of the element node, the method throws an exception. ...
...ce to the node elsewhere, it will immediately become unusable and irretrievable, and will usually be automatically deleted from memory after a short time. if child is actually not a child of the element node, the method throws an exception. this will also happen if child was in fact a child of element at the time of the call, but was
removed by an event handler invoked in the course of trying to
remove the element (e.g., blur.) errors thrown the method throws an exception in 2 different ways: if the child was in fact a child of element and so existing on the dom, but was
removed the method throws the following exception: uncaught notfounderror: failed to execute '
removechild' on 'node': the node to be
removed is not a child of this node. if the child doesn't exist on the dom of...
...And 7 more matches
JS_Remove*Root
obsolete since jsapi 31this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. unregisters a pointer to a gc thing so that it is no longer a member of the garbage collector's root set. this enables any pointed-at gc thing to be garbage collected as needed. syntax jsbool js_
removevalueroot(jscontext *cx, jsval *vp); jsbool js_
removestringroot(jscontext *cx, jsstring **spp); jsbool js_
removeobjectroot(jscontext *cx, jsobject **opp); jsbool js_
removegcthingroot(jscontext *cx, void **rp); name type description cx jscontext * a context. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. vp jsval * ...
... js_
removestringroot(jscontext *cx, jsstring **spp); jsbool js_
removeobjectroot(jscontext *cx, jsobject **opp); jsbool js_
removegcthingroot(jscontext *cx, void **rp); name type description cx jscontext * a context. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. vp jsval * address of the jsval variable to
remove from the root set. this must have been passed to either js_addvalueroot or js_addnamedvalueroot. spp jsstring * address of the jsstring* variable to
remove from the root set. this must have been passed to either js_addstringroot or js_addnamedstringroot. opp jsobject * address of the jsobject* variable to
remove from the root set. this must have been passed to eit...
...spp jsstring * address of the jsstring* variable to
remove from the root set. this must have been passed to either js_addstringroot or js_addnamedstringroot. opp jsobject * address of the jsobject* variable to
remove from the root set. this must have been passed to either js_addobjectroot or js_addnamedobjectroot. rp void ** address of the pointer variable to
remove from the root set. this must have been passed to either js_addgcthingroot or js_addnamedgcthingroot. description js_
removeroot
removes the variable that rp points to from the garbage collector's root set. the entry for rp is
removed from the root set for the jsruntime associated with the context cx. ...
...And 5 more matches
ChildNode.remove() - Web APIs
the childnode.
remove() method
removes the object from the tree it belongs to. syntax node.
remove(); example using
remove() <div id="div-01">here is div-01</div> <div id="div-02">here is div-02</div> <div id="div-03">here is div-03</div> var el = document.getelementbyid('div-02'); el.
remove(); //
removes the div with the 'div-02' id childnode.
remove() is unscopable the
remove() method is not scoped into the with statement. see symbol.unscopables for more information. ...
...(); example using
remove() <div id="div-01">here is div-01</div> <div id="div-02">here is div-02</div> <div id="div-03">here is div-03</div> var el = document.getelementbyid('div-02'); el.
remove(); //
removes the div with the 'div-02' id childnode.
remove() is unscopable the
remove() method is not scoped into the with statement. see symbol.unscopables for more information. ...
...<div id="div-01">here is div-01</div> <div id="div-02">here is div-02</div> <div id="div-03">here is div-03</div> var el = document.getelementbyid('div-02'); el.
remove(); //
removes the div with the 'div-02' id childnode.
remove() is unscopable the
remove() method is not scoped into the with statement. see symbol.unscopables for more information. ...
...And 5 more matches
XRInputSourcesChangeEventInit.removed - Web APIs
the xrinputsourceschangeeventinit property
removed is an array of zero or more xrinputsource objects, each representing one input source which has been
removed from the xrsession. ...
... the xrinputsourceschangeeventinit property
removed is an array of zero or more xrinputsource objects, each representing one input source which has been
removed from the xrsession. ...
... the xrinputsourceschangeeventinit property
removed is an array of zero or more xrinputsource objects, each representing one input source which has been
removed from the xrsession. ...
...And 4 more matches
dirRemove - Archive of obsolete content
returns an integer error code. for a list of possible values, see return codes. ...
... returns an integer error code. for a list of possible values, see return codes. ...
... returns an integer error code. for a list of possible values, see return codes. ...
...And 3 more matches
Element.removeAttributeNS() - Web APIs
the
removeattributens() method of the element interface
removes the specified attribute from an element. syntax element.
removeattributens(namespace, attrname); parameters namespace is a string that contains the namespace of the attribute. attrname is a string that names the attribute to be
removed from the current node. ...
...
removeattributens(namespace, attrname); parameters namespace is a string that contains the namespace of the attribute. attrname is a string that names the attribute to be
removed from the current node. ...
... living standard ...
...And 3 more matches
Element.removeAttributeNode() - Web APIs
the
removeattributenode() method of the element object
removes the specified attribute from the current element. syntax
removedattr = element.
removeattributenode(attributenode) attributenode is the attr node that needs to be
removed.
removedattr is the
removed attr node. example // given: <div id="top" align="center" /> var d = document.getelementbyid("top"); var d_align = d.getattributenode("align"); d.
removeattributenode(d_align); // align is now
removed: <div id="top" /> notes if the
removed attribute has a default value, it is immediately replaced. the replacing attribute has the same namespace uri and local name, as well as the original prefix, when applicable. ...
...div id="top" align="center" /> var d = document.getelementbyid("top"); var d_align = d.getattributenode("align"); d.
removeattributenode(d_align); // align is now
removed: <div id="top" /> notes if the
removed attribute has a default value, it is immediately replaced. the replacing attribute has the same namespace uri and local name, as well as the original prefix, when applicable. there is no
removeattributenodens method; the
removeattributenode method can
remove both namespaced attributes and non-namespaced attributes. dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes dir...
... living standard ...
...And 3 more matches
MediaQueryList.removeListener() - Web APIs
in the original implementation, the callback was a non-standard mediaquerylistlistener object. in the new implementation the standard event mechanism is used, and the callback is a standard function. return value void. ...
...in the original implementation, the callback was a non-standard mediaquerylistlistener object. in the new implementation the standard event mechanism is used, and the callback is a standard function. return value void. ...
...in the original implementation, the callback was a non-standard mediaquerylistlistener object. in the new implementation the standard event mechanism is used, and the callback is a standard function. return value void. ...
...And 3 more matches
Selection.removeRange() - Web APIs
working draft current browser compatibility the compatibility table on this page is generated from structured data. ...
... working draft current browser compatibility the compatibility table on this page is generated from structured data. ...
... working draft current browser compatibility the compatibility table on this page is generated from structured data. ...
...And 3 more matches
removeItemAt - Archive of obsolete content
« xul reference home
removeitemat( index ) return type: element
removes the child item in the element at the specified index. the method returns the
removed item. ...
... « xul reference home
removeitemat( index ) return type: element
removes the child item in the element at the specified index. the method returns the
removed item. ...
...
removeitemat( index ) return type: element
removes the child item in the element at the specified index. the method returns the
removed item. ...
...And 2 more matches
PL_HashTableRemove
remark this function should return prstatus. ...
... remark this function should return prstatus. ...
... remark this function should return prstatus. ...
...And 2 more matches
MediaStream.onremovetrack - Web APIs
the mediastream.on
removetrack property is an eventhandler which specifies a function to be called when the
removetrack event occurs on a mediastream instance. this happens when a track of any kind is
removed from the media stream. this event is fired when the browser
removes a track from the stream (such as when a rtcpeerconnection is renegotiated or a stream being captured using htmlmediaelement.capturestream() gets a new set of tracks because the media element being captured loaded a new source. the
removetrack event does not get fired when javascript code explicitly
removes tracks from the stream (by calling
removetrack()). ...
... browser
removes a track from the stream (such as when a rtcpeerconnection is renegotiated or a stream being captured using htmlmediaelement.capturestream() gets a new set of tracks because the media element being captured loaded a new source. the
removetrack event does not get fired when javascript code explicitly
removes tracks from the stream (by calling
removetrack()). syntax mediastream.on
removetrack = eventhandler; value this should be set to a function which you provide that accepts as input a mediastreamtrackevent object representing the
removetrack event which has occurred. the mediastreamtrack representing the track which was
removed is specified in the event's track property. ...
...ovetrack()). syntax mediastream.on
removetrack = eventhandler; value this should be set to a function which you provide that accepts as input a mediastreamtrackevent object representing the
removetrack event which has occurred. the mediastreamtrack representing the track which was
removed is specified in the event's track property. example this example adds a listener which, when a track is
removed from the stream, logs the track that was
removed. ...
...And 2 more matches
JS_RemoveRootRT
unregisters a pointer to a gc thing so that it is no longer a member of the garbage collector's root set. this enables any pointed-at gc thing to be garbage collected as needed. syntax jsbool js_
removerootrt(jsruntime *rt, void *rp); name type description rt jsruntime * pointer to the runtime with which the root was registered. rp void * address of the pointer to no longer protect. this must have been passed to one of js_addroot, js_addnamedroot, or js_addnamedrootrt earlier. description js_
removerootrt
removes the gc thing that rp points to from the list of gc things that are protected from garbage collection. rp is thus a pointer to a pointer to a js double, string, or object. do not pass a pointer to a js double, string, or object...
...ier. description js_
removerootrt
removes the gc thing that rp points to from the list of gc things that are protected from garbage collection. rp is thus a pointer to a pointer to a js double, string, or object. do not pass a pointer to a js double, string, or object -- you must pass a pointer to a pointer or a pointer to a jsval that's a gc thing. the entry for the gc thing rp points to is
removed in the garbage collection hash table for the specified runtime, rt. js_
removerootrt always returns js_true. ...
...n. rp is thus a pointer to a pointer to a js double, string, or object. do not pass a pointer to a js double, string, or object -- you must pass a pointer to a pointer or a pointer to a jsval that's a gc thing. ...
...double, string, or object -- you must pass a pointer to a pointer or a pointer to a jsval that's a gc thing. the entry for the gc thing rp points to is
removed in the garbage collection hash table for the specified runtime, rt. js_
removerootrt always returns js_true. ...
DataTransferItemList.remove() - Web APIs
the datatransferitemlist.
remove() method
removes the datatransferitem at the specified index from the list. if the index is less than zero or greater than one less than the length of the list, the list will not be changed. syntax datatransferitemlist.
remove(index); parameters index the zero-based index number of the item in the drag data list to
remove. if the index doesn't correspond to an existing item in the list, the list is left unchanged. return value undefined. exceptions invalidstateerror the drag data store is not in read/write mode, so the item can't be
removed. example this example shows the use of the
remove() method. javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the drop handler will ...
...string(function (s){ console.log("... ...
... recommendation not included in w3c html5 recommendation ...
... recommendation not included in w3c html5 recommendation ...
HTMLSelectElement.remove() - Web APIs
the htmlselectelement.
remove() method
removes the element at the specified index from the options collection for this select element. syntax collection.
remove(index); parameters index is a long for the index of the htmloptionelement to
remove from the collection. if the index is not found the method has no effect. ...
... the htmlselectelement.
remove() method
removes the element at the specified index from the options collection for this select element. syntax collection.
remove(index); parameters index is a long for the index of the htmloptionelement to
remove from the collection. if the index is not found the method has no effect. ...
... obsolete document object model (dom) level 1 specificat...
... to: <select id="existinglist" name="existinglist"> <option value="1">option: value 1</option> <option value="3">option: value 3</option> </select> */ specifications specification status comment html living standardthe definition of 'htmlselectelement.
remove()' in that specification. living standard html5the definition of 'htmlselectelement.
remove()' in that specification. recommendation is a snapshot of html living standard. document object model (dom) level 2 html specificationthe definition of 'htmlselectelement.
remove()' in that specification. obsolete document object model (dom) level 1 specificationthe definition of 'htmlselectelement.
remove()' in that specification. obsolete initial definition. ...
RTCPeerConnection.onremovestream - Web APIs
the
removestream event has been
removed from the webrtc specification in favor of the existing
removetrack event on the remote mediastream and the corresponding mediastream.on
removetrack event handler property of the remote mediastream. the rtcpeerconnection api is now track-based, so having zero tracks in the remote stream is equivalent to the remote stream being
removed and the old
removestream event. the rtcpeerconnection.on
removestream event handler is a property containing the code to execute when the
removestream event, of type mediastreamevent, is received by this rtcpeerconnection. such an event is sent when a mediastream is
removed from this connection. ...
...racks in the remote stream is equivalent to the remote stream being
removed and the old
removestream event. the rtcpeerconnection.on
removestream event handler is a property containing the code to execute when the
removestream event, of type mediastreamevent, is received by this rtcpeerconnection. such an event is sent when a mediastream is
removed from this connection. syntax peerconnection.on
removestream = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}. an event handler always has one single parameter, containing the event, here of type mediastreamevent. ...
...s sent when a mediastream is
removed from this connection. syntax peerconnection.on
removestream = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}. an event handler always has one single parameter, containing the event, here of type mediastreamevent. ...
...om this connection. syntax peerconnection.on
removestream = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}. an event handler always has one single parameter, containing the event, here of type mediastreamevent. ...
TextTrackList: removeTrack event - Web APIs
the
removetrack event is fired when a track is
removed from a texttracklist. ...
... the
removetrack event is fired when a track is
removed from a texttracklist. ...
... the
removetrack event is fired when a track is
removed from a texttracklist. ...
...hen a track is
removed from a texttracklist. bubbles no cancelable no interface trackevent event handler property on
removetrack examples using addeventlistener(): const mediaelement = document.queryselector('video, audio'); mediaelement.texttracks.addeventlistener('
removetrack', (event) => { console.log(`text track: ${event.track.label}
removed`); }); using the on
removetrack event handler property: const mediaelement = document.queryselector('video, audio'); mediaelement.texttracks.on
removetrack = (event) => { console.log(`text track: ${event.track.label}
removed`); }; specifications specification status html living standardthe definition of '
removetrack' in that specification. living standard ...
Animation.onremove - Web APIs
the animation interface's on
remove property (from the web animations api) is the event handler for the
remove event. this event is sent when the animation is
removed (i.e., put into an active replace state). syntax var
removehandler = animation.on
remove; animation.on
remove =
removehandler; value a function to be called to handle the
remove event, or null if no
remove event handler is set. ...
...s set. examples in our simple replace indefinite animations demo, you can see the following code: const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); //anim.persist() anim.on
remove = function() { console.log('animation
removed'); } console.log(anim.replacestate); }); here we have a <div> element, and an event listener that fires the event handler code whenever the mouse moves. the event handler sets up an animation that animates the <div> element to the position of the mouse pointer. this could result in a huge animations list, which could create a memory leak. fo...
...moved'); } console.log(anim.replacestate); }); here we have a <div> element, and an event listener that fires the event handler code whenever the mouse moves. the event handler sets up an animation that animates the <div> element to the position of the mouse pointer. this could result in a huge animations list, which could create a memory leak. for this reason, modern browsers automatically
remove overriding forward filling animations. a console message is logged each time an animation it
removed, invoked when the
remove event is fired. specifications specification status comment web animationsthe definition of 'animation.on
remove' in that specification. working draft editor's draft. ...
AudioTrackList.onremovetrack - Web APIs
the audiotracklist on
removetrack event handler is called when the
removetrack event occurs, indicating that an audio track has been
removed from the media element, and therefore also from the audiotracklist. the event is passed into the event handler in the form of a trackevent object, whose track property identifies the track that was
removed from the media element's audiotracklist. note: you can also add a handler for the
removetrack event using addeventlistener(). syntax audiotracklist.on
removetrack = eventhandler; value set on
removetrack to a function that accepts as input a trackevent object which indicates in its track property which audio track has been
removed from the media element. example this simple example just fetches the current number of audio tracks in the media eleme...
...he
removetrack event using addeventlistener(). syntax audiotracklist.on
removetrack = eventhandler; value set on
removetrack to a function that accepts as input a trackevent object which indicates in its track property which audio track has been
removed from the media element. example this simple example just fetches the current number of audio tracks in the media element whenever a track is
removed from the media element. document.queryselector("my-video").audiotracks.on
removetrack = function(event) { mytrackcount = document.queryselector("my-video").audiotracks.length; }; the current number of audio tracks remaining in the media element is obtained from audiotracklist property length. specifications specification status comment html living standardthe de...
...ument.queryselector("my-video").audiotracks.on
removetrack = function(event) { mytrackcount = document.queryselector("my-video").audiotracks.length; }; the current number of audio tracks remaining in the media element is obtained from audiotracklist property length. specifications specification status comment html living standardthe definition of 'audiotracklist.on
removetrack' in that specification. living standard html5the definition of 'audiotracklist.on
removetrack' in that specification. recommendation ...
DOMTokenList.remove() - Web APIs
the
remove() method of the domtokenlist interface
removes the specified tokens from the list. syntax tokenlist.
remove(token1[, token2[, ...tokenn]]); parameters tokenn a domstring representing the token you want to
remove from the list. if the string is not in the list, no error is thrown, and nothing happens. return value undefined examples in the following example we retrieve the list of classes set on a <span> element as a domtokenlist using element.classlist. we then
remove a token from the list, and write the list into the <span>'s node.textcontent. ...
...turn value undefined examples in the following example we retrieve the list of classes set on a <span> element as a domtokenlist using element.classlist. we then
remove a token from the list, and write the list into the <span>'s node.textcontent. first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; classes.
remove("c"); span.textcontent = classes; the output looks like this: to
remove multiple classes at once, you can supply multiple tokens. ...
...n = document.queryselector("span"); let classes = span.classlist; classes.
remove("c"); span.textcontent = classes; the output looks like this: to
remove multiple classes at once, you can supply multiple tokens. the order you supply the tokens doesn't have to match the order they appear in the list: let span2 = document.getelementsbytagname("span")[0] let classes2 = span.classlist; classes2.
remove("c", "b"); span2.textcontent = classes; specifications specification status comment domthe definition of '
remove()' in that specification. living standard initial definition ...
RTCPeerConnection.removeTrack() - Web APIs
the rtcpeerconnection.
removetrack() method tells the local end of the connection to stop sending media from the specified track, without actually removing the corresponding rtcrtpsender from the list of senders as reported by rtcpeerconnection.getsenders(). if the track is already stopped, or is not in the connection's senders list, this method has no effect. if the connection has already been negotiated (signalingstate is set to "stable"), it is marked as needing to be negotiated again; the remote peer won't experience the change until this negotiation occurs. a negotiationneeded event is sent to the rtcpeerconnection to let the local end know this negotiation must occur. ...
...s not in the connection's senders list, this method has no effect. if the connection has already been negotiated (signalingstate is set to "stable"), it is marked as needing to be negotiated again; the remote peer won't experience the change until this negotiation occurs. a negotiationneeded event is sent to the rtcpeerconnection to let the local end know this negotiation must occur. syntax pc.
removetrack(sender); parameters mediatrack a rtcrtpsender specifying the sender to
remove from the connection. return value undefined. exceptions invalidstateerror the connection is not open. example this example adds a video track to a connection and sets up a listener on a close button which
removes the track when the user clicks the button. var pc, sender; navigator.getusermedia({vi...
...track to a connection and sets up a listener on a close button which
removes the track when the user clicks the button. var pc, sender; navigator.getusermedia({video: true}, function(stream) { pc = new rtcpeerconnection(); var track = stream.getvideotracks()[0]; sender = pc.addtrack(track, stream); }); document.getelementbyid("closebutton").addeventlistener("click", function(event) { pc.
removetrack(sender); pc.close(); }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.
removetrack()' in that specification. candidate recommendation initial specification. ...
Selection.removeAllRanges() - Web APIs
working draft current browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... working draft current browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... current browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
Storage.removeItem() - Web APIs
the
removeitem() method of the storage interface, when passed a key name, will
remove that key from the given storage object if it exists. the storage interface of the web storage api provides access to a particular domain's session or local storage. if there is no item associated with the given key, this method will do nothing. syntax storage.
removeitem(keyname); parameters keyname a domstring containing the name of the key you want to
remove. return value undefined. example the following function creates three data items inside local storage, then
removes the image data item. ...
...ters keyname a domstring containing the name of the key you want to
remove. return value undefined. example the following function creates three data items inside local storage, then
removes the image data item. function populatestorage() { localstorage.setitem('bgcolor', 'red'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'mycat.png'); localstorage.
removeitem('image'); } we can do the same for the session storage. function populatestorage() { sessionstorage.setitem('bgcolor', 'red'); sessionstorage.setitem('font', 'helvetica'); sessionstorage.setitem('image', 'mycat.png'); sessionstorage.
removeitem('image'); } note: to see this used within a real world example, see our web storage demo. specifications specification stat...
...pulatestorage() { sessionstorage.setitem('bgcolor', 'red'); sessionstorage.setitem('font', 'helvetica'); sessionstorage.setitem('image', 'mycat.png'); sessionstorage.
removeitem('image'); } note: to see this used within a real world example, see our web storage demo. specifications specification status comment html living standardthe definition of 'storage.
removeitem' in that specification. living standard ...
TextTrackList.onremovetrack - Web APIs
the texttracklist on
removetrack event handler is called when the
removetrack event occurs, indicating that a text track has been
removed from the media element, and therefore also from the texttracklist. the event is passed into the event handler in the form of a trackevent object, whose track property identifies the track that was
removed from the media element's texttracklist. note: you can also add a handler for the
removetrack event using addeventlistener(). syntax texttracklist.on
removetrack = eventhandler; value set on
removetrack to a function that accepts as input a trackevent object which indicates in its track property which text track has been
removed from the media element. example this simple example just fetches the current number of text tracks in the first media element...
...
removetrack event using addeventlistener(). syntax texttracklist.on
removetrack = eventhandler; value set on
removetrack to a function that accepts as input a trackevent object which indicates in its track property which text track has been
removed from the media element. example this simple example just fetches the current number of text tracks in the first media element whenever a track is
removed from the media element. document.queryselectorall("video, audio")[0].texttracks.on
removetrack = function(event) { mytrackcount = document.queryselectorall("video, audio")[0].texttracks.length; }; the current number of text tracks remaining in the media element is obtained from texttracklist property length. specifications specification status comment html livin...
...torall("video, audio")[0].texttracks.on
removetrack = function(event) { mytrackcount = document.queryselectorall("video, audio")[0].texttracks.length; }; the current number of text tracks remaining in the media element is obtained from texttracklist property length. specifications specification status comment html living standardthe definition of 'texttracklist: on
removetrack' in that specification. living standard ...
VideoTrackList.onremovetrack - Web APIs
the videotracklist on
removetrack event handler is called when the
removetrack event occurs, indicating that a video track has been
removed from the media element, and therefore also from the videotracklist. the event is passed into the event handler in the form of a trackevent object, whose track property identifies the track that was
removed from the media element's videotracklist. note: you can also add a handler for the
removetrack event using addeventlistener(). syntax videotracklist.on
removetrack = eventhandler; value set on
removetrack to a function that accepts as input a trackevent object which indicates in its track property which video track has been
removed from the media element. example this simple example just fetches the current number of video tracks in the media elemen...
...he
removetrack event using addeventlistener(). syntax videotracklist.on
removetrack = eventhandler; value set on
removetrack to a function that accepts as input a trackevent object which indicates in its track property which video track has been
removed from the media element. example this simple example just fetches the current number of video tracks in the media element whenever a track is
removed from the media element. document.queryselector("my-video").videotracks.on
removetrack = function(event) { mytrackcount = document.queryselector("my-video").videotracks.length; }; the current number of video tracks remaining in the media element is obtained from videotracklist property length. specifications specification status comment html living standardthe de...
...ment.queryselector("my-video").videotracks.on
removetrack = function(event) { mytrackcount = document.queryselector("my-video").videotracks.length; }; the current number of video tracks remaining in the media element is obtained from videotracklist property length. specifications specification status comment html living standardthe definition of 'videotracklist: on
removetrack' in that specification. living standard ...
mssitemodejumplistitemremoved - Web APIs
non-standard this feature is non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. the mssitemodejumplistitem
removed event occurs when mssitemodeshowjumplist is called and an item has been
removed from a jump list by the user. ...
...this event is not triggered if mssitemodeclearjumplist has been called. ...
...is proprietary method is specific to internet explorer and microsoft edge. syntax event property object.oncandidatewindowhide = handler; addeventlistener method object.addeventlistener("mssitemodejumplistitem
removed", handler, usecapture) general info synchronous no bubbles no cancelable no note this event is raised once for every item that has been
removed since the last time mssitemodeshowjumplist was called. this event is not triggered if mssitemodeclearjumplist has been called. parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event. see also microsoft api extensions ...
removeSession - Archive of obsolete content
the argument should be an object which implements the nsiautocompletesession interface. ...
...the argument should be an object which implements the nsiautocompletesession interface. ...
smartcard-remove
the smartcard-
remove event is fired when the removal of a smart card has been detected. specification mozilla specific interface event bubbles no cancelable no target document default action none properties property type description targetread only eventtarget the event target (the topmost target in the dom tree). typeread only domstring the type of event. bubblesread only boolean whether the event normally bubbles or not. cancelableread only boolean whether the event is cancellable or not. ...
... description targetread only eventtarget the event target (the topmost target in the dom tree). typeread only domstring the type of event. bubblesread only boolean whether the event normally bubbles or not. cancelableread only boolean whether the event is cancellable or not. example document.addeventlistener("smartcard-
remove", smartcardchangehandler ); related events smartcard-insert ...
CSSStyleDeclaration.removeProperty() - Web APIs
the cssstyledeclaration.
removeproperty() method interface
removes a property from a css style declaration object. syntax var oldvalue = style.
removeproperty(property); parameters property is a domstring representing the property name to be
removed. note that multi-word property names are hyphenated and not camel-cased. return value oldvalue is a domstring equal to the value of the css property before it was
removed. exceptions domexception no_modification_allowed_err: if the property or declaration block is read only. ...
... property is a domstring representing the property name to be
removed. note that multi-word property names are hyphenated and not camel-cased. return value oldvalue is a domstring equal to the value of the css property before it was
removed. exceptions domexception no_modification_allowed_err: if the property or declaration block is read only. example the following javascript code
removes the background-color css property from a selector rule: var declaration = document.stylesheets[0].rules[0].style; var oldvalue = declaration.
removeproperty('background-color'); specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.
removeproperty()' in that specification. working draft document o...
CSSStyleSheet.removeRule() - Web APIs
the obsolete cssstylesheet method
removerule()
removes a rule from the stylesheet object. it is functionally identical to the standard, preferred method deleterule(). note: this is a legacy method which has been replaced by the standard method deleterule(). you should use that instead. syntax cssstylesheet.
removerule(index) parameters index the index into the stylesheet's cssrulelist indicating the rule to be
removed. return value undefined example this example
removes the first rule from the stylesheet mystyles. ...
...method deleterule(). note: this is a legacy method which has been replaced by the standard method deleterule(). you should use that instead. syntax cssstylesheet.
removerule(index) parameters index the index into the stylesheet's cssrulelist indicating the rule to be
removed. return value undefined example this example
removes the first rule from the stylesheet mystyles. mystyles.
removerule(0); you can rewrite this to use the standard deleterule() method very easily: mystyles.deleterule(0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.
removerule()' in that specification. working draft ...
RTCPeerConnection: removestream event - Web APIs
the obsolete
removestream event was sent to an rtcpeerconnection to inform it that a mediastream had been
removed from the connection. you can use the rtcpeerconnection interface's on
removestream property to set a handler for this event. this is the counterpart to the addstream event, which is also obsolete. bubbles no cancelable no interface mediastreamevent event handler property rtcpeerconnection.on
removestream important: this event has been
removed from the webrtc specification in favor of the existing
removetrack event on the remote mediastream and the corresponding mediastream.on
removetrack event handler property of the remote mediastream. the rtcpeerconnection api is now track-based, so having zero tracks in the remote stream is...
...connection.on
removestream important: this event has been
removed from the webrtc specification in favor of the existing
removetrack event on the remote mediastream and the corresponding mediastream.on
removetrack event handler property of the remote mediastream. the rtcpeerconnection api is now track-based, so having zero tracks in the remote stream is equivalent to the remote stream being
removed, which caused a
removestream event. ...
SourceBuffer.remove() - Web APIs
end a double representing the end of the time range, in seconds. return value undefined. exceptions exception explanation invalidaccesserror the mediasource.duration property is equal to nan, the start parameter is negative or greater than mediasource.duration, or the end parameter is less than or equal to start or equal to nan. ...
...ue undefined. exceptions exception explanation invalidaccesserror the mediasource.duration property is equal to nan, the start parameter is negative or greater than mediasource.duration, or the end parameter is less than or equal to start or equal to nan. invalidstateerror the sourcebuffer.updating property is equal to true, or this sourcebuffer has been
removed from the mediasource. example tbd. specifications specification status comment media source extensionsthe definition of '
remove()' in that specification. recommendation initial definition. ...
SourceBuffer.removeAsync() - Web APIs
the
removeasync() method of the sourcebuffer interface starts the process of asynchronously removing from the sourcebuffer media segments found within a specific time range. a promise is returned, which is fulfilled when the buffers in the specified time range have been
removed. this method can only be called when updating is false. if that's not the case, call abort() instead. syntax
removepromise = sourcebuffer.
removeasync(start, end); parameters start a double representing the start of the time range, in seconds. end a double representing the end of the time range, in seconds. return value a promise whose fulfillment handler is executed once the buffers in the specified time range have been
removed from the sourcebuffer. example this example establishes an asynchron...
...g the end of the time range, in seconds. return value a promise whose fulfillment handler is executed once the buffers in the specified time range have been
removed from the sourcebuffer. example this example establishes an asynchronous function, emptysourcebuffer(), which simply clears the contents of the specified sourcebuffer. async function emptysourcebuffer(msbuffer) { await msbuffer.
removeasync(0, infinity).catch(function(e) { handleexception(e); } } specifications not currently part of the mse specification. specification status comment media source extensions recommendation initial definition. ...
XRInputSourcesChangeEvent.removed - Web APIs
the read-only xrinputsourceschangeevent property
removed is an array of zero or more xrinputsource objects representing the input sources which have been
removed from the xrsession. syntax
removedinputs = xrinputsourceschangeevent.
removed; value an array of zero or more xrinputsource objects, each representing one input device
removed from the xr system. examples the example below creates a handler for the inputsourceschange event that processes the lists of added and
removed from the webxr system. it looks for new and
removed devices whose targetraymode is tracked-pointer. ...
... creates a handler for the inputsourceschange event that processes the lists of added and
removed from the webxr system. it looks for new and
removed devices whose targetraymode is tracked-pointer. xrsession.oninputsourcescchange = event => { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { addedpointerdevice(input); } } for (let input of event.
removed) { if (input.targetraymode == "tracked-pointer") {
removedpointerdevice(input); } } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.
removed' in that specification. working draft initial definition. ...
AudioTrackList: removetrack event - Web APIs
the
removetrack event is fired when a track is
removed from an audiotracklist. bubbles no cancelable no interface trackevent event handler property on
removetrack examples using addeventlistener(): const videoelement = document.queryselector('video'); videoelement.audiotracks.addeventlistener('
removetrack', (event) => { console.log(`audio track: ${event.track.label}
removed`); }); using the on
removetrack event handler property: const videoelement = document.queryselector('video'); videoelement.audiotracks.on
removetrack = (event) => { console.log(`audio track: ${event.track.label}
removed`); }; specifications specification status html living standardthe definition of '
removetrack' in that specification. li...
CanvasRenderingContext2D.removeHitRegion() - Web APIs
the canvasrenderingcontext2d method
removehitregion()
removes a given hit region from the canvas. syntax void ctx.
removehitregion(id); parameters id a domstring representing the id of the region that is to be
removed. examples using the
removehitregion method this example demonstrates the
removehitregion() method. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // set a hit region ctx.addhitregion({id: 'eyes'}); //
remove it from the canvas ctx.
removehitregion('eyes'); specifications canvas hit regions have been
removed from the whatwg living standard, although discussions about future standardization are ongoing. see https://github.com/whatwg/html/issues/3407 for more informatio...
remove() - Web APIs
the mediakeysession.
remove() method returns a promise after removing any session data associated with the current object. return value a promise that resolves to a boolean indicating whether the load succeeded or failed. specifications specification status comment encrypted media extensionsthe definition of '
remove()' in that specification. recommendation initial definition ...
MediaSource.removeSourceBuffer() - Web APIs
the
removesourcebuffer() method of the mediasource interface
removes the given sourcebuffer from the sourcebuffers list associated with this mediasource object. syntax mediasource.
removesourcebuffer(sourcebuffer); parameters sourcebuffer the sourcebuffer object to be
removed. return value undefined exceptions exception explanation notfounderror the supplied sourcebuffer doesn't exist in mediasource.sourcebuffers. examples for (i = 0; i < 10; i++) { var sourcebuffer = mediasource.addsourcebuffer(mimecodec); } mediasource.
removesourcebuffer(mediasource.sourcebuffers[0]); specifications specification status comment media source extensionsthe definition of '
removesourcebuffer()' in that specification. recomme...
MediaStream: removetrack event - Web APIs
the
removetrack event is fired when a new mediastreamtrack object has been
removed from a mediastream. bubbles no cancelable no interface mediastreamtrackevent event handler property on
removetrack examples using addeventlistener(): let stream = new mediastream(); stream.addeventlistener('
removetrack', (event) => { console.log(`${event.track.kind} track
removed`); }); using the on
removetrack event handler property: let stream = new mediastream(); stream.on
removetrack = (event) => { console.log(`${event.track.kind} track
removed`); }; specifications specification status media capture and streamsthe definition of '
removetrack' in that specification. candidate recommendation ...
VideoTrackList: removetrack event - Web APIs
the
removetrack event is fired when a track is
removed from a videotracklist. bubbles no cancelable no interface trackevent event handler property on
removetrack examples using addeventlistener(): const videoelement = document.queryselector('video'); videoelement.videotracks.addeventlistener('
removetrack', (event) => { console.log(`video track: ${event.track.label}
removed`); }); using the on
removetrack event handler property: const videoelement = document.queryselector('video'); videoelement.videotracks.on
removetrack = (event) => { console.log(`video track: ${event.track.label}
removed`); }; specifications specification status html living standardthe definition of '
removetrack' in that specification. liv...
Index - Web APIs
entifying the language used in the audio track. 192 audiotrack.sourcebuffer api, audio, audiotrack, html dom, mse, media, media source extensions, property, read-only, reference, sourcebuffer, track the read-only audiotrack property sourcebuffer returns the sourcebuffer that created the track, or null if the track was not created by a sourcebuffer or the sourcebuffer has been
removed from the mediasource.sourcebuffers attribute of its parent media source. 193 audiotracklist api, audio, audiotracklist, html dom, interface, media, reference, track list, tracks, list the audiotracklist interface is used to represent a list of the audio tracks contained within a given html media element, with each track represented by a separate audiotrack object in the list...
...st.onchange api, adding audio tracks, adding tracks, audio, audiotracklist, event handler, html dom, media, property, reference, addtrack, onchange, track the audiotracklist property onchange is an event handler which is called when the change event occurs, indicating that one or more of the audiotracks in the audiotracklist have been enabled or disabled. 198 audiotracklist.on
removetrack api, audio, audiotracklist, event handler, html dom, media, property, reference, removing audio tracks, removing tracks, on
removetrack,
remove,
removetrack, track the audiotracklist on
removetrack event handler is called when the
removetrack event occurs, indicating that an audio track has been
removed from the media element, and therefore also from the audiotracklist. 199 ...
...ement, and therefore also from the audiotracklist. 199 audiotracklist: addtrack event event the addtrack event is fired when a track is added to an audiotracklist. 200 audiotracklist: change event event the change event is fired when an audio track is enabled or disabled, for example by changing the track's enabled property. 201 audiotracklist:
removetrack event event the
removetrack event is fired when a track is
removed from an audiotracklist. 202 audioworklet api, audio, audioworklet, experimental, interface, reference, web audio api, worklet the audioworklet interface of the web audio api is used to supply custom audio processing scripts. user-supplied code is run in the audioworkletglobalscope global executi...
...And 105 more matches
Index - Archive of obsolete content
n, sublime text editor or any other. syntax highliting support for .htaccess files less. 3 2015 mdn fellowship program 2015, archive, fellowship no summary! 4 api api, archive archived documentation about obsolete web standards apis. 5 navigator api, navigator features that used to hang off the navigator interface, but have since been
removed. 6 navigator.moznotification api, deprecated, mobile, non-standard, property, reference provides support for creating notification objects, which are used to display desktop notification alerts to the user. currently, these are only supported on firefox mobile and firefox os. see displaying notifications for an example. 7 window: deviceproximity event sensors,...
...ntext of web pages whose url matches a given pattern. 50 page-worker add-on sdk create a permanent, invisible page and access its dom. 51 panel add-on sdk, add-ons, extensions creates transient dialogs to implement part of an add-on's user interface. 52 passwords add-on sdk interact with firefox's password manager to add, retrieve and
remove stored credentials. 53 private-browsing add-on sdk check whether a given object is private, so an add-on can respect private browsing 54 querystring add-on sdk utility functions for working with query strings. 55 request needsupdate, sdk, add-on make simple network requests. 56 selection add-on sdk get and set tex...
... compelling and preserve the interface conventions we've come to expect from web pages. 356 archived mozilla and build documentation these articles are archived, obsolete documents about mozilla, gecko, and the process of building mozilla projects. 357 activex control for hosting netscape plug-ins in ie add-ons, needsclassification, plugins microsoft has
removed support for netscape plug-ins from ie 5.5 sp 2 and beyond. if you are a plug-in author, you may find this project saves you a lot of work! 358 archived spidermonkey docs archive this section contains old spidermonkey documentation. 359 file object file, javascript, non-standard, spidermonkey non-standard server-side object 360 open ...
...And 31 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
ative way. finally, we will learn a bit more about components. so far, we've seen how components can share data using props, and communicate with their parents using events and two-way data binding. now we will see how components can also expose methods and variables. the following new components will be developed throughout the course of this article: moreactions: displays the check all and
remove completed buttons, and emits the corresponding events required to handle their functionality. newtodo: displays the <input> field and add button for adding a new todo. todosstatus: displays the "x out of y items completed" status heading. code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to...
...ed-concepts or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/05-advanced-concepts remember to run npm install && npm run dev to start your app in development mode. ...
...ll tackle the check all and
remove completed buttons. let's create a component that will be in charge of displaying the buttons and emitting the corresponding events. create a new file — components/moreactions.svelte. when the first button is clicked, we'll emit a checkall event to signal that all the todos should be checked/unchecked. when the second button is clicked, we'll emit a
removecompleted event to signal that all of the completed todos should be
removed. ...
...And 27 more matches
CustomizableUI.jsm
ar, or as a sliding 'subview' of the menu panel when such a widget is in the menu panel. custom which are widgets that are custom-created by some js supplied by the consumer for more details, see api-provided widgets. 'special' widgets: these are the representations of xul <toolbarseparator>, <toolbarspring> and <toolbarspacer> elements. customizableui provides apis to add, move and
remove all these different widgets, and mostly abstracts the dom away from you. the lifetime of your widget should be identical to the lifetime of the add-on - it's process-global, so if you call createwidget on bootstrap's "startup" and destroywidget on bootstrap's "shutdown", that's enough. listeners customizableui provides a way to listen for various bits of customization happening. this can be us...
...t is added to an area. awidgetid is the widget that was added, aarea the area it was added to, and aposition the position in which it was added. onwidgetmoved(awidgetid, aarea, aoldposition, anewposition) fired when a widget is moved within its area. awidgetid is the widget that was moved, aarea the area it was moved in, aoldposition its old position, and anewposition its new position. onwidget
removed(awidgetid, aarea) fired when a widget is
removed from its area. awidgetid is the widget that was
removed, aarea the area it was
removed from. onwidgetbeforedomchange(anode, anextnode, acontainer, aisremoval) fired before a widget's dom node is acted upon by customizableui (to add, move or
remove it). anode is the dom node changed, anextnode the dom node (if any) before which a widget will be ...
...een created, and has been added to either its default area or the area in which it was placed previously. if the widget has no default area and/or it has never been placed anywhere, aarea may be null. only fired for api-based widgets. onwidgetdestroyed(awidgetid) fired when widgets are destroyed. awidgetid is the widget that is being destroyed. only fired for api-based widgets. onwidgetinstance
removed(awidgetid, adocument) fired when a window is unloaded and a widget's instance is destroyed because of this. awidgetid is the widget whose instance is being destroyed, adocument the document in which this is happening. only fired for api-based widgets. onwidgetdrag(awidgetid, aarea) fired both when and after customize mode drag handling system tries to determine the width and height of widget ...
...And 22 more matches
nsINavBookmarksService
index(in long long aitemid); prtime getitemlastmodified(in long long aitemid); autf8string getitemtitle(in long long aitemid); unsigned short getitemtype(in long long aitemid); astring getkeywordforbookmark(in long long aitemid); obsolete since gecko 40.0 astring getkeywordforuri(in nsiuri auri); obsolete since gecko 40.0 nsitransaction get
removefoldertransaction(in long long aitemid); nsiuri geturiforkeyword(in astring keyword); obsolete since gecko 40.0 void importbookmarkshtml(in nsiuri url); obsolete since gecko 1.9 void importbookmarkshtmltofolder(in nsiuri url, in print64 folder); obsolete since gecko 1.9 print32 indexoffolder(in print64 parent, in print64 folder); obsolete since gecko 1.9 ...
...r, in 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
removechildat(in long long afolder, in long aindex); obsolete since gecko 2.0 void
removefolder(in long long afolder); obsolete since gecko 2.0 void
removefolderchildren(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); ...
...own or is not required to be specified, such as when appending an item to a folder. type_bookmark 1 this is an index for type "bookmark". type_folder 2 this is an index for type "folder". type_separator 3 this is an index for type "separator". type_dynamic_container 4 this is an index for type "dynamic container". dynamic containers were
removed in gecko 11, but the type index remains to prevent reuse. methods addobserver() this method adds a bookmark observer. if ownsweak is false, the bookmark service will keep an owning reference to the observer. if ownsweak is true, then aobserver must implement nsisupportsweakreference, and the bookmark service will keep a weak reference to the observer. void addobserver( in nsinavbookm...
...And 22 more matches
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
known svggraphicselement instead of svglocatable and svgtransformable implementation status unknown svggeometryelement with svggeometryelement.ispointinfill() and svggeometryelement.ispointinstroke() methods partially implemented (bug 1239100). the methods ispointinfill() and ispointinstroke() are not implemented yet (bug 1325319). ...
...vggeometryelement.ispointinstroke() methods partially implemented (bug 1239100). the methods ispointinfill() and ispointinstroke() are not implemented yet (bug 1325319). ...
...ods partially implemented (bug 1239100). the methods ispointinfill() and ispointinstroke() are not implemented yet (bug 1325319). ...
...And 18 more matches
nsIContentPrefService2
void getcachedbysubdomainandname(in astring domain, in astring name, in nsiloadcontext context, out unsigned long len, [retval,array,size_is(len)] out nsicontentpref prefs); nsicontentpref getcachedglobal(in astring name, in nsiloadcontext context); void getglobal(in astring name, in nsiloadcontext context, in nsicontentprefcallback2 callback); void
removealldomains(in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void
removeallglobals(in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void
removebydomain(in astring domain, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void
removebydomainandname(in astring domain, in ast...
...
removeallglobals(in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void
removebydomain(in astring domain, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void
removebydomainandname(in astring domain, in astring name, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void
removebyname(in astring name, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void
removebysubdomain(in astring domain, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void
removebysubdomainandname(in astring domain, in astring name, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); ...
...ring name, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void
removebysubdomain(in astring domain, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void
removebysubdomainandname(in astring domain, in astring name, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void
removeglobal(in astring name, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void
removeobserverforname(in astring name, in nsicontentprefobserver observer); void set(in astring domain, in astring name, in nsivariant value, in nsiloadcontext context, [optional] in nsicontentprefcallback2 callback); void setglobal(in astring nam...
...And 17 more matches
tabbrowser - Archive of obsolete content
autocompletepopup type: id the id of a popup element used to hold autocomplete results for the element. ...
... autocompletepopup type: id the id of a popup element used to hold autocomplete results for the element. autoscroll ty...
... autocompletepopup type: id the id of a popup element used to hold autocomplete results for the element. autoscroll type: boolean set t...
...And 16 more matches
Index
p in the previous chapter) and uses xpcom tools that make coding a lot easier and more efficient. it also introduces a basic string type that is used with many of the apis in both xpcom and gecko. 113 detailed xpcom hashtable guide guide, xpcom a hashtable is a data construct that stores a set of items. each item has a key that identifies the item. items are found, added, and
removed from the hashtable by using the key. hashtables may seem like arrays, but there are important differences: 114 how to build an xpcom component in javascript add-ons, extensions, javascript, tutorial, xpcom if you are looking for add-on sdk solution for xpcom javascript components then check out platform/xpcom module first. 115 inheriting from implementation classe...
... in gecko 2.0 gecko 2.0, xpcom several changes that affect xpcom component compatibility are taking place in gecko 2. this article details those changes, and provides suggestions for how to update your code. 122 xpcom hashtable guide a hashtable is a data construct that stores a set of items. each item has a key that identifies the item. items are found, added, and
removed from the hashtable by using the key. hashtables may seem like arrays, but there are important differences: 123 mozilla::services namespace developing mozilla, xpcom the services c++ namespace offers an easy and efficient alternative for obtaining a service as compared to the indirect xpcom approach: getservice(), callgetservice(), etc methods are expensive and should be avoi...
...hree folder classes - nslocalmailfolder, nsimapmailfolder, and nsnewsfolder. they all inherit from nsmsgdbfolder, which implements a lot of the core functionality. rss feeds are implemented by nslocalmailfolder. ...
...And 16 more matches
nsINavBookmarkObserver
toolkit/components/places/nsinavbookmarksservice.idlscriptable this interface is an observer for bookmark changes. ...
...atebatch(); void onfolderadded(in print64 folder, in print64 parent, in print32 index); obsolete since gecko 1.9 void onfolderchanged(in print64 folder, in acstring property); obsolete since gecko 1.9 void onfoldermoved(in print64 folder, in print64 oldparent, in print32 oldindex, in print64 newparent, in print32 newindex); obsolete since gecko 1.9 void onfolder
removed(in print64 folder, in print64 parent, in print32 index); obsolete since gecko 1.9 void onitemadded(in long long aitemid, in long long aparentid, in long aindex, in unsigned short aitemtype, in nsiuri auri, in autf8string atitle, in prtime adateadded, in acstring aguid, in acstring aparentguid); void onitemchanged(in long long aitemid, in acstring aproperty, in boolean aisannota...
...anewvalue, in prtime alastmodified, in unsigned short aitemtype, in long long aparentid, in acstring aguid, in acstring aparentguid); void onitemmoved(in long long aitemid, in long long aoldparentid, in long aoldindex, in long long anewparentid, in long anewindex, in unsigned short aitemtype, in acstring aguid, in acstring aoldparentguid, in acstring anewparentguid); void onitem
removed(in long long aitemid, in long long aparentid, in long aindex, in unsigned short aitemtype, in nsiuri auri, in acstring aguid, in acstring aparentguid); void onitemreplaced(in print64 folder, in nsiuri item, in nsiuri newitem); obsolete since gecko 1.9 void onitemvisited(in long long aitemid, in long long avisitid, in prtime atime, in unsigned long atransitiontype, in nsiuri aur...
...And 16 more matches
imgIContainer
solete since gecko 2.0 imagecontainer getimagecontainer(); native code only! nsiframe getrootlayoutframe(); violates the xpcom interface guidelines pruint16 gettype(); violates the xpcom interface guidelines void init(in print32 awidth, in print32 aheight, in imgicontainerobserver aobserver); obsolete since gecko 2.0 void lockimage(); void
removeframe(in gfxiimageframe item); obsolete since gecko 1.9.2 void requestdecode(); void requestdiscard(); void requestrefresh([const] in timestamp atime); violates the xpcom interface guidelines void resetanimation(); void restoredatadone(); native code only! obsolete since gecko 2.0 void setdiscardable(in string amimetype); native code only! ...
... 0 all color components of the frame, including alpha, const long kblendover = 1; // the frame should be composited onto the output buffer. obsolete since gecko 2.0 methods native code only!addrestoredata obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. void addrestoredata( [array, size_is(acount), const] in char data, in unsigned long acount ); parameters data missing description acount missing description exceptions thrown missing exception missing description native code only!appendframe obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is...
...har data, in unsigned long acount ); parameters data missing description acount missing description exceptions thrown missing exception missing description native code only!appendframe obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. adds to the end of the list of frames. void appendframe( in print32 ax, in print32 ay, in print32 awidth, in print32 aheight, in gfximageformat aformat, [array, size_is(imagelength)] out pruint8 imagedata, out unsigned long imagelength ); parameters ax missing description ay missing description awidth missing description...
...And 14 more matches
nsIAnnotationService
out unsigned long count, [retval, array, size_is(count)] out nsivariant result); void getitemannotationnames(in long long aitemid, [optional] out unsigned long count, [retval, array, size_is(count)] out nsivariant result); boolean pagehasannotation(in nsiuri auri, in autf8string aname); boolean itemhasannotation(in long long aitemid, in autf8string aname); void
removepageannotation(in nsiuri auri, in autf8string aname); void
removeitemannotation(in long long aitemid, in autf8string aname); void
removepageannotations(in nsiuri auri); void
removeitemannotations(in long long aitemid); void copypageannotations(in nsiuri asourceuri, in nsiuri adesturi, in boolean aoverwritedest); void copyitemannotations(in long long aso...
...void
removepageannotations(in nsiuri auri); void
removeitemannotations(in long long aitemid); void copypageannotations(in nsiuri asourceuri, in nsiuri adesturi, in boolean aoverwritedest); void copyitemannotations(in long long asourceitemid, in long long adestitemid, in boolean aoverwritedest); void addobserver(in nsiannotationobserver aobserver); void
removeobserver(in nsiannotationobserver aobserver); nsiuri getannotationuri(in nsiuri auri, in autf8string aname); constants constant value description expire_session 0 for temporary data that can be discarded when the user exits.
removed at application exit. expire_weeks 2 for general page settings, things the user is interested in seeing if...
...ri getannotationuri(in nsiuri auri, in autf8string aname); constants constant value description expire_session 0 for temporary data that can be discarded when the user exits.
removed at application exit. expire_weeks 2 for general page settings, things the user is interested in seeing if they come back to this page some time in the near future.
removed at 30 days. expire_months 3 something that the user will be interested in seeing in their history like favicons. if they haven't visited a page in a couple of months, they probably aren't interested in many other annotations, the positions of things, or other stuff you create, so put that in the weeks policy.
removed at 180 days. expire_never 4 for data that should ...
...And 14 more matches
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
lor: black; -webkit-appearance: -apple-pay-button; } <div>lorem</div> safari ios and macos only. available on the web starting in ios 10.1 and macos 10.12.1 obsolete values the following values were at some point implemented for a prefixed property, but are no longer supported. ...
...em</div> safari ios and macos only. available on the web starting in ios 10.1 and macos 10.12.1 obsolete values the following values were at some point implemented for a prefixed property, but are no longer supported. ...
...b starting in ios 10.1 and macos 10.12.1 obsolete values the following values were at some point implemented for a prefixed property, but are no longer supported. ...
...And 14 more matches
Componentizing our Svelte app - Learn web development
input and button that allow you to enter a new todo item. filterbutton.svelte: the all, active, and completed buttons that allow you to apply filters to the displayed todo items. todosstatus.svelte: the "x out of y items completed" heading. todo.svelte: an individual todo item. each visible todo item will be displayed in a separate copy of this component. moreactions.svelte: the check all and
remove completed buttons at the bottom of the ui that allow you to perform mass actions on the todo items. in this article we will concentrate on creating the filterbutton and todo components; we'll get to the others in future articles. let's get started. note: in the process of creating our first couple of components, we will also learn different techniques to communicate between components, and...
...your filters working correctly. creating our todo component now we will create a todo component to encapsulate each individual todo — including the checkbox and some editing logic so you can change an existing todo. our todo component will receive a single todo object as a prop. let's declare the todo prop and move the code from the todos component. just for now, we'll replace the call to
removetodo with an alert. we'll add that functionality back in later on. create a new component file — components/todo.svelte. put the following contents inside this file: <script> export let todo </script> <div class="stack-small"> <div class="c-cb"> <input type="checkbox" id="todo-{todo.id}" on:click={() => todo.completed = !todo.completed} checked={todo.completed...
...nd, optionally, an object with additional information that you want to pass to every listener. this additional data will be available on the detail property of the event object. note: custom events in svelte share the same api as regular dom events. moreover, you can bubble up an event to your parent component by specifying on:event without any handler. we'll edit our todo component to emit a
remove event, passing the todo being
removed as additional information. first of all, add the following lines to the top of the todo component's <script> section: import { createeventdispatcher } from 'svelte' const dispatch = createeventdispatcher() now update the delete button in the markup section of the same file to look like so: <button type="button" class="btn btn__danger" on:cli...
...And 13 more matches
Array.prototype.splice() - JavaScript
y element as item[n*] provided. if negative, it will begin that many elements from the end of the array. (in this case, the origin -1, meaning -n is the index of the nth last element, and is therefore equivalent to the index of array.length - n.) if array.length + start is less than 0, it will begin from index 0. deletecount optional an integer indicating the number of elements in the array to
remove from start. if deletecount is omitted, or if its value is equal to or larger than array.length - start (that is, if it is equal to or greater than the number of elements left in the array, starting at start), then all the elements from start to the end of the array will be deleted. note: in ie8, it won't delete all when deletecount is omitted. if deletecount is 0 or negative, no elemen...
...tart. if deletecount is omitted, or if its value is equal to or larger than array.length - start (that is, if it is equal to or greater than the number of elements left in the array, starting at start), then all the elements from start to the end of the array will be deleted. note: in ie8, it won't delete all when deletecount is omitted. ...
...ments from start to the end of the array will be deleted. note: in ie8, it won't delete all when deletecount is omitted. if deletecount is 0 or negative, no elements are
removed. in this case, you should specify at least one new element (see below). item1, item2, ... optional the elements to add to the array, beginning from start. if you do not specify any elements, splice() will only
remove elements from the array. return value an array containing the deleted elements. if only one element is
removed, an array of one element is returned. if no elements are
removed, an empty array is returned. ...
...And 12 more matches
Index
e. the resulting jsid, on success, is either an interned string or a well-known symbol; either way it is immune to gc so there is no need to visit *idp during gc marking.. 64 js::protokeytoid jsapi reference, reference, référence(2), spidermonkey js::protokeytoid converts a specified js prototype key key, to a js id. js::protokeytoid stores a jsid to *idp. 65 js::
remove*root jsapi reference, obsolete, reference, référence(2), spidermonkey js::
remove*root
removes the variable that rp points to from the garbage collector's root set. 66 js::rooted jsapi reference, reference, référence(2), spidermonkey here, ptr represents the private member of js::rooted<t>, typed with t. 67 js::setlargeallocationfailurecallback jsa...
...al constants that represent the javascript boolean values, true and false. they are equivalent to boolean_to_jsval(true) and boolean_to_jsval(false), respectively. 178 jsval_unlock jsapi reference, obsolete, spidermonkey jsval_unlock is a deprecated feature that is supported only for backward compatibility with existing applications. to unlock a value, use local roots with js_
removeroot. 179 jsval_void jsapi reference, obsolete, spidermonkey jsval_void is a jsval constant that represents the javascript value undefined. 180 jsval_zero jsapi reference, obsolete, spidermonkey jsval_zero is equivalent to int_to_jsval(0). 181 jsversion jsapi reference, spidermonkey the jsversion enumerated type includes the following ...
...eated on a given context is kept alive until another thing of the same type is created, using a newborn root in the context. these newborn roots help native code protect newly-created gc-things from gc invocations activated before those things can be rooted using local or global roots. 201 js_clearnonglobalobject jsapi reference, obsolete, spidermonkey js_clearnonglobalobject
removes all of obj's own properties, except the special __proto__ and __parent__ properties, in a single operation. properties belonging to objects on obj's prototype chain are not affected. 202 js_clearpendingexception jsapi reference, spidermonkey js_clearpendingexception cancels the currently pending exception in cx, if any. (there is a pending exception if the most recently thro...
...And 11 more matches
nsIDownloadManager
tdownload(in unsigned long aid); void onclose(); obsolete since gecko 1.9.1 void open(in nsidomwindow aparent, in nsidownload adownload); obsolete since gecko 1.9.1 void openprogressdialogfor(in nsidownload adownload, in nsidomwindow aparent, in boolean acanceldownloadonclose); obsolete since gecko 1.9.1 void pausedownload(in unsigned long aid); void
removedownload(in unsigned long aid); void
removedownloadsbytimeframe(in long long abegintime, in long long aendtime); void
removelistener(in nsidownloadprogresslistener alistener); void resumedownload(in unsigned long aid); void retrydownload(in unsigned long aid); void savestate(); obsolete since gecko 1.8 void startbatchupdate(); obsolete since...
...tartbatchupdate(); obsolete since gecko 1.9.1 attributes attribute type description activedownloadcount long the number of files currently being downloaded. read only. activedownloads nsisimpleenumerator an enumeration of active nsidownloads. read only. cancleanup boolean whether or not there are downloads that can be cleaned up (
removed) that is downloads that have completed, have failed or have been canceled. read only. datasource nsirdfdatasource read only. obsolete since gecko 1.8 dbconnection mozistorageconnection the database connection to the downloads database. read only. defaultdownloadsdirectory nsilocalfile returns the platform default downloads directory. read only. ...
...e the location of a temporary file (a file in which the received data will be stored but is not equal to the target file). the file will be moved to the location indicated by atarget when the download is complete. this may be null. acancelable an object that can be used to abort the download. must not be null. aisprivate indicates whether this download should be considered private (ie. to be
removed at the end of the private browsing session, cached in non-permanent storage, etc.) return value the newly created download item with the passed-in properties. addlistener() adds a listener to the download manager. void addlistener( in nsidownloadprogresslistener alistener ); parameters alistener the nsidownloadprogresslistener object to receive status information from the download ...
...And 11 more matches
Signaling and video calling - Web APIs
il in this guide, but take a look at the css on github to see how we handled it. take note of the two <video> elements, one for your self-view, one for the connection, and the <button> element. the <video> element with the id "received_video" will present video received from the connected user. we specify the autoplay attribute, ensuring once the video starts arriving, it immediately plays. this
removes any need to explicitly handle playback in our code. the "local_video" <video> element presents a preview of the user's camera; specifiying the muted attribute, as we don't need to hear local audio in this preview panel. finally, the "hangup-button" <button>, to disconnect from a call, is defined and configured to start disabled (setting this as our default for when no call is connected) and app...
...stmsg(). here we set up the handler for each connected user in the user list displayed to the left of the chat panel. this function receives a message object whose users property is an array of strings specifying the user names of every connected user. ...
...{ mypeerconnection = new rtcpeerconnection({ iceservers: [ // information about ice servers - use your own! ...
...And 11 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
'hsl' ...
...d]); dropdowns[topic] = this; }; dropdown.prototype.toggle = function toggle(state) { if (typeof(state) === 'boolean') this.state = state === false ? ...
...ion(e) { var value = parsefloat(e.target.value); if (isnan(value) === true) setvalue(obj.topic, obj.value); else setvalue(obj.topic, value); }); return input; }; var slidercomponent = function slidercomponent(obj, sign) { var slider = document.createelement('div'); var startx = null; var start_value = 0; slider.addeventlistener("click", function(e) { document.
removeeventlistener("mousemove", slidermotion); setvalue(obj.topic, obj.value + obj.step * sign); }); slider.addeventlistener("mousedown", function(e) { startx = e.clientx; start_value = obj.value; document.body.style.cursor = "e-resize"; document.addeventlistener("mouseup", slideend); document.addeventlistener("mousemove", slidermotion); }); var slideend = function slideend...
...And 11 more matches
Event reference
s chargingchange chargingtimechange dischargingtimechange levelchange call events alerting busy callschanged cfstatechange connecting dialing disconnected disconnecting error held, holding incoming resuming statechange voicechange sensor events compassneedscalibration devicemotion deviceorientation orientationchange smartcard events icccardlockerror iccinfochange smartcard-insert smartcard-
remove stkcommand stksessionend cardstatechange sms and ussd events delivered received sent ussdreceived frame events mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserlocationchange mozbrowserloadend mozbrowserloadstart mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange dom mutation events domattributenamechanged domatt...
...each event is listed along with...
...each event is listed along with the interface ...
...And 11 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
as text and comment nodes, it will return their string value. for attribute nodes, the attribute value is returned. for all other nodes, null is returned. ownerdocument returns the document object containing the current node. parentnode returns the parent node of the current node. previoussibling returns the node immediately preceding the current one.
removeattribute( aname )
removes the specified attribute from the current node. setattribute( aname, avalue ) sets the value of the specified attribute with the specified value. internet explorer has a nonstandard quirk, where many of these apis will skip white space text nodes that are generated, for example, by new line characters. mozilla will not skip these, so sometimes you ne...
... createelement( atagname ) creates and returns a new and parentless dom node of the type specified by atagname. createtextnode( atextvalue ) creates and returns a new and parentless dom textnode with the data value specified by atextvalue. insertbefore( anewnode, achildnode ) inserts anewnode before achildnode, which must be a child of the current node.
removechild( achildnode )
removes achildnode and returns a reference to it. replacechild( anewnode, achildnode ) replaces achildnode with anewnode and returns a reference to the
removed node. document fragments for performance reasons, you can create documents in memory, rather than working on the existing document's dom. dom level 1 core introduced document fragments, which are l...
...d with the text/css mimetype. mozilla will respect this and only load css files with that mimetype if the web page is in strict standards mode. internet explorer will always load the css file, no matter with which mimetype it is served. web pages are considered in strict standards mode when they start with a strict doctype. to solve this problem, you can make the server send the right mimetype or
remove the doctype. i'll discuss more about doctypes in the next section. css and units many web applications do not use units with their css, especially when you use javascript to set the css. mozilla tolerates this, as long as the page is not rendered in strict mode. since internet explorer does not support true xhtml, it does not care if no units are specified. if the page is in strict standards mo...
...And 10 more matches
notificationbox - Archive of obsolete content
they are different) of global object gbrowser: notifybox = gbrowser.getnotificationbox() examples <notificationbox flex="1"> <browser src="http://www.mozilla.org"/> </notificationbox> there is a more complex code available in the code snippets area. ...
...lobal object gbrowser: notifybox = gbrowser.getnotificationbox() examples <notificationbox flex="1"> <browser src="http://www.mozilla.org"/> </notificationbox> there is a more complex code available in the code snippets area. ...
...ifybox = gbrowser.getnotificationbox() examples <notificationbox flex="1"> <browser src="http://www.mozilla.org"/> </notificationbox> there is a more complex code available in the code snippets area. ...
...And 10 more matches
SpiderMonkey 1.8.5
. it is supported only on x86, x86_64 and arm architectures. on other platforms, the jit is simply disabled; javascript code runs in an interpreter, as in previous versions. it's the same language, just not as fast. migrating to spidermonkey 1.8 the following features in earlier versions of spidermonkey have been dropped. support for extended class methods (in particular, jsequalityop) has been
removed. multithreaded js programs that race against the same objects are now explicitly not supported. multithreaded programs are allowed, but each thread must operate on objects in a separate compartment, isolated from the other threads. the old build system (using makefile.ref) is no longer supported. spidermonkey 1.8.5 includes a new configure-based build system, introduced shortly after active de...
... applications will need significant changes, but most of those changes will be detected by the c/c++ compiler, so they are easy to detect and updating the code is a fairly straightforward job. here is a list of the most significant changes. previous versions of spidermonkey supported two types of native functions: jsnative and jsfastnative. all support for the slow native function type has been
removed, and the fast signature has been renamed to jsnative. embeddings that defined jsnatives in previous versions must update all those functions to the new signature. getters and setters of type jspropertyop took an id parameter of type jsval. the type of the parameter has been changed to jsid. many getters and setters simply ignore the id anyway; if the value is needed, use js_idtovalue. the type...
... has been changed to jsid. many getters and setters simply ignore the id anyway; if the value is needed, use js_idtovalue. the type of setters has changed from jspropertyop to jsstrictpropertyop (to accomodate es5 strict mode). to migrate, simply add a jsbool strict parameter to each setter function. it is safe for the setter to ignore the value of the argument. the rooting apis (js_addroot, js_
removeroot, etc.) have been replaced with a family of type-safe functions (js_addstringroot, js_
removestringroot, etc.) that are easier to use correctly. js_newdouble, js_newdoublevalue, and js_newnumbervalue are gone. instead use double_to_jsval, int_to_jsval, and uint_to_jsval, which are faster and can't fail. js_getstringbytes and js_getstringchars are gone. there is no longer an infallible way to ...
...And 10 more matches
Using XPCOM Components
components like the ones in this section are obtained and used by the mozilla browser. cookie manager cookie management is one of the many sets of functionality that is made available to the browser in the form of an xpcom component and that can be reused by developers who want similar functionality in their applications. whenever a user accesses the cookie manager dialog to view, organize, or
remove cookies that have been stored on the system, they are using the cookiemanager component behind the scenes. the cookie manager dialog shows user interface[cookie-manager-ui] that is presented to the user in mozilla for working with the cookiemanager component. the cookie manager dialog this dialog is written in xul and javascript, and uses a part of xpcom called xpconnect to seamlessly connect...
... (see connecting to components from the interface below). xul is just one way to expose the functionality of the cookiemanager component-but it's a particularly useful one in the mozilla world. the functionality of the cookiemanager component is available through the nsicookiemanager interface, which is comprised of the public methods in the table below. the nsicookiemanager interface
removeall
remove all cookies from the cookie list. enumerator enumerate through the cookie list.
remove remove a particular cookie from the list. in xpcom the interface is guaranteed to stay the same even if the underlying implementation changes. the interfaces are public, in other words, and the implementations are private[private-xpcom-interfaces]. when a user selects...
...rator enumerate through the cookie list.
remove remove a particular cookie from the list. in xpcom the interface is guaranteed to stay the same even if the underlying implementation changes. the interfaces are public, in other words, and the implementations are private[private-xpcom-interfaces]. when a user selects one of the cookies displayed in the list and then clicks the
remove button, the
remove method in the nsicookiemanager interface is called. the function is carried out by the cookiemanager component, and the selected cookie is deleted from disk and
removed from the displayed list. ...
...And 10 more matches
EventTarget.addEventListener() - Web APIs
specifies characteristics about the event listener. the available options are: capture a boolean indicating that events of this type will be dispatched to the registered listener before being dispatched to any eventtarget beneath it in the dom tree. once a boolean indicating that the listener should be invoked at most once after being added. if true, the listener would be automatically
removed when invoked. passive a boolean that, if true, indicates that the function specified by listener will never call preventdefault(). if a passive listener does call preventdefault(), the user agent will do nothing other than generate a console warning. see improving scrolling performance with passive listeners to learn more. mozsystemgroup a boolean indicating that the listener should be...
...ons you're interested in. for example, if you want to check for the passive option: let passivesupported = false; try { const options = { get passive() { // this function will be called when the browser // attempts to access the passive property. passivesupported = true; return false; } }; window.addeventlistener("test", null, options); window.
removeeventlistener("test", null, options); } catch(err) { passivesupported = false; } this creates an options object with a getter function for the passive property; the getter sets a flag, passivesupported, to true if it gets called. that means that if the browser checks the value of the passive property on the options object, passivesupported will be set to true; otherwise, it will remain false. ...
...orted, to true if it gets called. that means that if the browser checks the value of the passive property on the options object, passivesupported will be set to true; otherwise, it will remain false. we then call addeventlistener() to set up a fake event handler, specifying those options, so that the options will be checked if the browser recognizes an object as the third parameter. then, we call
removeeventlistener() to clean up after ourselves. (note that handleevent() is ignored on event listeners that aren't called.) you can check whether any option is supported this way. just add a getter for that option using code similar to what is shown above. then, when you want to create an actual event listener that uses the options in question, you can do something like this: someelement.addeventl...
...And 10 more matches
Color picker tool - CSS: Cascading Style Sheets
'hsl' ...
...ion(e) { var value = parsefloat(e.target.value); if (isnan(value) === true) setvalue(obj.topic, obj.value); else setvalue(obj.topic, value); }); return input; }; var slidercomponent = function slidercomponent(obj, sign) { var slider = document.createelement('div'); var startx = null; var start_value = 0; slider.addeventlistener("click", function(e) { document.
removeeventlistener("mousemove", slidermotion); setvalue(obj.topic, obj.value + obj.step * sign); }); slider.addeventlistener("mousedown", function(e) { startx = e.clientx; start_value = obj.value; document.body.style.cursor = "e-resize"; document.addeventlistener("mouseup", slideend); document.addeventlistener("mousemove", slidermotion); }); var slideend = function slideend...
...semove", slidermotion); setvalue(obj.topic, obj.value + obj.step * sign); }); slider.addeventlistener("mousedown", function(e) { startx = e.clientx; start_value = obj.value; document.body.style.cursor = "e-resize"; document.addeventlistener("mouseup", slideend); document.addeventlistener("mousemove", slidermotion); }); var slideend = function slideend(e) { document.
removeeventlistener("mousemove", slidermotion); document.body.style.cursor = "auto"; slider.style.cursor = "pointer"; }; var slidermotion = function slidermotion(e) { slider.style.cursor = "e-resize"; var delta = (e.clientx - startx) / obj.sensivity | 0; var value = delta * obj.step + start_value; setvalue(obj.topic, value); }; return slider; }; var inputslider = function(...
...And 10 more matches
Creating Event Targets - Archive of obsolete content
modules as event targets we can adapt this code into a separate module that exposes the sdk's standard event interface. to do this we'll use the event/core module. create a new file in "lib" called "bookmarks.js", and add the following code: var { emit, on, once, of...
...it duplicates the previous code, but with a few changes: import emit(), on(), once(), and off() from event/core replace listener functions with calls to emit(), passing the appropriate event type export its own event api. this consist...
...it duplicates the previous code, but with a few changes: import emit(), on(), once(), and off() from event/core replace listener functions with calls to emit(), passing the appropriate event type export its own event api. this consists of three functions: ...
...And 9 more matches
jspage - Archive of obsolete content
rsion");})||"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.appendchild(a);document.head.
removechild(a);}return b;}native.uid=1; var $uid=(browser.engine.trident)?function(a){return(a.uid||(a.uid=[native.uid++]))[0];}:function(a){return a.uid||(a.uid=native.uid++);};var window=new native({name:"window",legacy:(browser.engine.trident)?null:window.window,initialize:function(a){$uid(a); if(!a.element){a.element=$empty;if(browser.engine.webkit){a.document.createelement("iframe");}a.element.prot...
...ceof function){b=class.instantiate(b);}this.implement(b); },this);}};var chain=new class({$chain:[],chain:function(){this.$chain.extend(array.flatten(arguments));return this;},callchain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false; },clearchain:function(){this.$chain.empty();return this;}});var events=new class({$events:{},addevent:function(c,b,a){c=events.
removeon(c);if(b!=$empty){this.$events[c]=this.$events[c]||[]; this.$events[c].include(b);if(a){b.internal=true;}}return this;},addevents:function(a){for(var b in a){this.addevent(b,a[b]);}return this;},fireevent:function(c,b,a){c=events.
removeon(c); if(!this.$events||!this.$events[c]){return this;}this.$events[c].each(function(d){d.create({bind:this,delay:a,"arguments":b})();},this);return this;},remov...
...ts[c]=this.$events[c]||[]; this.$events[c].include(b);if(a){b.internal=true;}}return this;},addevents:function(a){for(var b in a){this.addevent(b,a[b]);}return this;},fireevent:function(c,b,a){c=events.
removeon(c); if(!this.$events||!this.$events[c]){return this;}this.$events[c].each(function(d){d.create({bind:this,delay:a,"arguments":b})();},this);return this;},
removeevent:function(b,a){b=events.
removeon(b); if(!this.$events[b]){return this;}if(!a.internal){this.$events[b].erase(a);}return this;},
removeevents:function(c){var d;if($type(c)=="object"){for(d in c){this.
removeevent(d,c[d]); }return this;}if(c){c=events.
removeon(c);}for(d in this.$events){if(c&&c!=d){continue;}var b=this.$events[d];for(var a=b.length;a--;a){this.
removeevent(d,b[a]); }}return this;}});events.
removeon=function(a){retu...
...And 9 more matches
Theme changes in Firefox 2 - Archive of obsolete content
do! browser changes requiring theme updates there are a number of changed and deleted files in the browser that may require you to make changes to your theme. the table lists both the changed xul file and the theme's corresponding css file that you might need to update. filename css file details browser/base/searchdialog.xul browser/base/content/searchdialog.css
removed from firefox 2. feeds/addfeedreader.xul feeds/addfeedreader.css new file that presents ui for adding a new feed reader. feeds/subscribe.xhtml feeds/subscribe.css new file that presents the ui for subscribing to an rss feed. preferences/downloads.xul -
removed from firefox 2. preferences/general.xul -
removed from firefox 2. sa...
... changes to the default theme the table below lists all the changes made in the default theme for firefox 2; you can use this information as a starting point for figuring out the changes you need to make. file description of change browser/bookmarks/addbookmark.css updated to include microsummary-related css changes. ...
...n the safe browsing warning window is displayed. browser/safebrowsing/warning24x24.png new file; this is the warning icon that's displayed inside the safe browsing warning window. browser/search-bar-background-mid.png new file; the background for the middle part of the search bar. the ends of the bar are now skinned separately. browser/search-bar-background.png
removed file. browser/search-bar.png
removed file. browser/search-go-rtl.png new file; the go button displayed when it's at the left end of the search bar. browser/search-go.png new file; the go button displayed when it's located at the right end of the search bar. browser/search-provider-bkgnd-rtl.png new file; the background drawn behind the search provi...
...And 9 more matches
Element.classList - Web APIs
tring via element.classname. syntax const elementclasses = elementnodereference.classlist; returns a domtokenlist representing the contents of the element's class attribute. if the class attribute is not set or empty, it returns an empty domtokenlist, i.e. a domtokenlist with the length property equal to 0. ...
...e is not set or empty, it returns an empty domtokenlist, i.e. a domtokenlist with the length property equal to 0. the domtokenlist itself is read-only, although you can modify it using the add() and
remove() methods. ...
...empty domtokenlist, i.e. a domtokenlist with the length property equal to 0. the domtokenlist itself is read-only, although you can modify it using the add() and
remove() methods. ...
...And 9 more matches
RTCPeerConnection - Web APIs
be carried out as the offerer, because some session changes cannot be negotiated as the answerer.onpeeridentity the rtcpeerconnection.onpeeridentity event handler is a property containing the code to execute whent the peeridentity event, of type event, is received by this rtcpeerconnection. ...
...e some session changes cannot be negotiated as the answerer.onpeeridentity the rtcpeerconnection.onpeeridentity event handler is a property containing the code to execute whent the peeridentity event, of type event, is received by this rtcpeerconnection. ...
...tcpeerconnection.onpeeridentity event handler is a property containing the code to execute whent the peeridentity event, of type event, is received by this rtcpeerconnection. such an event is sent when an identity assertion, received from a peer, has been successfully validated.on
removestream the rtcpeerconnection.on
removestream event handler is a property containing the code to execute when the
removestream event, of type mediastreamevent, is received by this rtcpeerconnection. ...
...And 9 more matches
Tabbed browser - Archive of obsolete content
yz"); // focus tab tabbrowser.selectedtab = newtab; // focus *this* browser window in case another one is currently focused tabbrowser.ownerdocument.defaultview.focus(); } } the function can be called like so: openandreuseonetabperattribute("myextension-myattribute", "http://developer.mozilla.org/"). closing a tab this example closes the currently selected tab. gbrowser.
removecurrenttab(); there is also a more generic
removetab method, which accepts a xul tab element as its single parameter. changing active tab this moves one tab forward (to the right). gbrowser.tabcontainer.advanceselectedtab(1, true); this moves one tab to the left. gbrowser.tabcontainer.advanceselectedtab(-1, true); detecting page load see also code snippets:on page load function example...
...rowser window has // been initialised. we add a callback to the tabbed browser // when the browser's window gets loaded. window.addeventlistener("load", function () { // add a callback to be run every time a document loads. // note that this includes frames/iframes within the document gbrowser.addeventlistener("load", examplepageload, true); }, false); ... ...
...wser's window gets loaded. window.addeventlistener("load", function () { // add a callback to be run every time a document loads. // note that this includes frames/iframes within the document gbrowser.addeventlistener("load", examplepageload, true); }, false); ... // when no longer needed gbrowser.
removeeventlistener("load", examplepageload, true); ... ...
...And 8 more matches
Common causes of memory leaks in extensions - Extensions
this page explains coding patterns that cause extension to cause memory leaks. causes of zombie compartments zombie compartments are a particular kind of memory leak. all zombie compartments in extensions are caused by a failure to release resources appropriately in certain circumstances, such as when a window is closed, a page unloads, or an extension is disabled or
removed. while bug 695480 should prevent most of these compartment leaks, add-ons still need to be aware of the practices that caused these leaks, as the fix causes many add-ons which would have otherwise caused a leak to instead throw errors when attempting to access nodes from documents which no longer exist. storing references to window objects and dom nodes the most common problem is extensions holding onto referenc...
...ction modifydocument2(document) { // the "body" dom node holding a reference to leakref will prevent // that function object from being garbage collected and hence // will leak the whole bootstrap compartment. document.body.someproperty = leakref; } see also kris maglione's guide to cleaning up bootstrapped extensions. failing to clean up event listeners extensions can be disabled and
removed by user actions, but it also happens when an add-on is updated. if a bootstrapped (restartless) extension fails to clean up event listeners when disabled or
removed, the listeners will still reference the enclosing scope — usually the bootstrap.js sandbox — and therefore keep that scope (and its enclosing compartment) alive until the window is unloaded. if the window in question is browser.x...
..., the leaked compartment might survive for quite some time. function leakref() {} function main(window) { // this is a potential leak, as the window (e.g. browser.xul) will hold on to // the leakref function and the enclosing compartment via the listener. ...
...And 8 more matches
AddonManager
lcallback? callback, in string mimetype) promise? getallinstalls(in installlistcallback? callback) promise? getinstallsbytypes(in string types[], in installlistcallback? callback) void installaddonsfromwebpage(in string mimetype, in nsidomwindow source, in nsiuri uri, in addoninstall installs[]) void addinstalllistener(in installlistener listener) void
removeinstalllistener(in installlistener listener) promise? getalladdons(in addonlistcallback? callback) promise? getaddonbyid(in string id, in addoncallback? callback) promise? getaddonbysyncguid(in string id, in addoncallback? callback) promise? getaddonsbyids(in string ids[], in addonlistcallback? callback) promise? getaddonsbytypes(in string types[], in ...
... autoupda...
... autoupdatedefault boolean whether add-ons should auto-update by default (overrideable per add-on). corresponds to the e...
...And 8 more matches
OS.File for the main thread
in string destpath, [optional] in object options); promise<bool> exists(in string path); promise<string> getcurrentdirectory(); promise<void> makedir(in string path, [optional] in object options); promise<void> move(in string sourcepath, in string destpath); promise<uint8array> read(in string path, [optional] in object options); promise<void>
remove(in string path, [optional] in object options); promise<void>
removeemptydir(in string path, [optional] in object options); promise<void>
removedir(in string path, [optional] in object options); promise<void> setcurrentdirectory(in string path); promise<void> setdates(in string path, in date|number accessdate, in date|number modificationdate); promise<v...
... are given, the file will be opened for appending on unix/linux. however, the file is not opened for appending on windows. see bug 924858. starting with gecko 27, you may use the append flag instead. for an example using append see here. truncate | trunc if true, the file will be opened for writing. if the file does not exist, it will be created. if the file exists, its contents will be
removed. cannot be used with create. create if true, file will be opened for writing. the file must not exist. if the file already exists, throw an error. cannot be used with truncate or existing. existing if true, the file must already exist. if the file does not exist, throw an error. cannot be used with create. append if true, the file will be opened for appending, meaning the equivalent ...
..., files are created with a default mode of 0600 (file is private to the user, the user can read and write). you can build this mode from values os.constants.libc.s_i*. winshare (ignored under non-windows platforms) if specified, a sharing policy, as per windows function createfile. if unspecified, files are opened with a default sharing policy (file is not protected against being read/written/
removed by another process or another use in the same process). you can build this policy from constants os.constants.win.file_share_*. winsecurity (ignored under non-windows platforms) if specified, a security policy, as per windows function createfile. if unspecified, no security attributes. winaccess (ignored under non-windows platforms) if specified, access mode, as per windows function crea...
...And 8 more matches
source-editor.jsm
the source-editor.jsm javascript code module implements an editor specifically tailored for editing source code; its primary purpose is to provide support for web developer tools to display and edit web site code. the editor provided is eclipse orion. to use it, you first need to import the code module into your javascript scope: components.utils.import("resource:///modules/source-editor.jsm"); warning: much of the functionality of the source editor is implemented by a secondary code module (by default, source-editor-orion.jsm). you must not directly import that code module; it is essentially an implementation detail. its functionality is all exposed through source-editor.jsm. ...
...struction void destroy(); void init(element aelement, object aconfig, function acallback); search operations number find(string astring, [optional] object options); number findnext(boolean awrap); number findprevious(boolean awrap); event management void addeventlistener(string aeventtype, function acallback); void
removeeventlistener(string aeventtype, function acallback); undo stack operations boolean canredo(); boolean canundo(); void endcompoundchange(); boolean redo(); void resetundo(); void startcompoundchange(); boolean undo(); display management operations void focus(); number gettopindex(); boolean h...
...you can then use this value to detect when the contents of the text are different from your most recent save. in addition, when this value changes, the "dirtychang...
...And 8 more matches
Places Developer Guide
the item. this is mainly for use by extensions that sync bookmark data between different profiles. moveitem (afolderid, anewparentid, aindex) - move an item from one folder to another. for bookmarks: changebookmarkuri(aitemid, auri) - change a bookmark's uri. setkeywordforbookmark(aitemid, akeyword) - set the keyword for a bookmark. deleting bookmark items with the bookmarks service:
removeitem(aitemid) - works for all types
removefolder(aitemid) - works for folders and livemarks
removefolderchildren(aitemid) - works for folders and livemarks observing bookmark events the nsinavbookmarkobserver interface is used for observing bookmarks activity such as item additions, changes and deletions. // create a bookmark observer var observer = { onbeginupdatebatch: function() { //...
... bookmark observer var observer = { onbeginupdatebatch: function() { // this method is notified when a batch of changes are about to occur. // observers can use this to suspend updates to the user-interface, for example // while a batch change is occurring. }, onendupdatebatch: function() { this._inbatch = false; }, onitemadded: function(id, folder, index) { }, onitem
removed: function(id, folder, index) { }, onitemchanged: function(id, property, isannotationproperty, value) { // isannotationproperty is a boolean value that is true of the changed property is an annotation. // you can access a bookmark item's annotations with the <code>nsiannotationservice</code>. }, onitemvisited: function(id, visitid, time) { // the visit id can be used with the ...
... (iid.equals(ci.nsinavbookmarkobserver) || iid.equals(ci.nsisupports)) { return this; } throw cr.ns_error_no_interface; }, }; // register the observer with the bookmarks service var bmsvc = cc["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(ci.nsinavbookmarksservice); bmsvc.addobserver(observer, false); // un-register the observer when done. bmsvc.
removeobserver(observer); html import/export the nsiplacesimportexportservice service is used for import and export of bookmarks in the netscape bookmarks html format. note that this service is only currently available for firefox, not other toolkit-based applications. importing: importhtmlfromfile (nsilocalfile afile, boolean aisinitialimport) - this imports all the bookmarks in the specified file...
...And 8 more matches
nsIBrowserHistory
browserhistory); method overview void addpagewithdetails(in nsiuri auri, in wstring atitle, in long long alastvisited); obsolete since gecko 15.0 void markpageasfollowedlink(in nsiuri auri); obsolete since gecko 22.0 void markpageastyped(in nsiuri auri); obsolete since gecko 22.0 void registeropenpage(in nsiuri auri); obsolete since gecko 9.0 void
removeallpages(); void
removepage(in nsiuri auri); void
removepages([array, size_is(alength)] in nsiuri auris, in unsigned long alength, in boolean adobatchnotify); void
removepagesbytimeframe(in long long abegintime, in long long aendtime); void
removepagesfromhost(in autf8string ahost, in boolean aentiredomain); void
removevisitsbytimeframe(in long long a...
... attribute type description count obsolete since gecko 15.0 pruint32 indicates if there are entries in global history. for performance reasons this does not return the real number of entries. read only. lastpagevisited obsolete since gecko 10.0 autf8string the last page that was visited in a top-level window. read only. note: the count attribute was
removed in gecko 15.0 because it was only used to determine if there were any entries at all anyway, so the nsinavhistoryservice.hashistoryentries attribute is better for this. methods addpagewithdetails() obsolete since gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) note: this method was
removed in gecko 15.0. you should use moziasynchistory.updateplaces() i...
.... registeropenpage() obsolete since gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) mark a page as being currently open. note: this method was an alias for moziplacesautocomplete.registeropenpage(), which still exists and can be used instead. void registeropenpage( in nsiuri auri ); parameters auri the page that is to be marked as currently open.
removeallpages() this method
removes all the pages from the global history. void
removeallpages(); parameters none. remarks visits are
removed synchronously, but pages are expired asynchronously, off the main thread. note: removals are handled in a batch. single removals are not subject to individual notification; instead, nsinavhistoryobserver.onclearhistory() is called on the history observer.
...And 8 more matches
nsIFaviconService
ko 22.0 astring getfavicondataasdataurl(in nsiuri afaviconuri); obsolete since gecko 22.0 nsiuri getfaviconforpage(in nsiuri apageuri); obsolete since gecko 22.0 nsiuri getfaviconimageforpage(in nsiuri apageuri); obsolete since gecko 22.0 nsiuri getfaviconlinkforicon(in nsiuri afaviconuri); boolean isfailedfavicon(in nsiuri afaviconuri); void
removefailedfavicon(in nsiuri afaviconuri); void setandloadfaviconforpage(in nsiuri apageuri, in nsiuri afaviconuri, in boolean aforcereload, in unsigned long afaviconloadtype, [optional] in nsifavicondatacallback acallback); obsolete since gecko 22.0 void setfavicondata(in nsiuri afaviconuri, [const,array,size_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string ami...
...s() expires all known favicons, removing them from the database. note: this is an asynchronous operation; when it completes, a "places-favicons-expired" notification is dispatched through the observer's service. void expireallfavicons(); parameters none. getfavicondata() obsolete since gecko 22.0 (firefox 22.0 / thunderbird 22.0 / seamonkey 2.19) note: this method was
removed in gecko 22.0. you should use the new async api moziasyncfavicons.getfavicondataforpage() instead. this method retrieves the given favicon data. throws an exception if we don't have data. if there is no data but we have an entry for this favicon, adatalen will be "0" and adata will be null. void getfavicondata( in nsiuri afaviconuri, out autf8string amimetype, out unsigned long adatalen, ...
... output parameter where the binary favicon data will be placed. this will be null if we have this uri but have no data associated with it. exceptions thrown ns_error_not_available thrown when we have never heard of this favicon url. getfavicondataasdataurl() obsolete since gecko 22.0 (firefox 22.0 / thunderbird 22.0 / seamonkey 2.19) note: this method was
removed in gecko 22.0. you should use the new async api moziasyncfavicons.getfavicondataforpage() instead. this method retrieves the given favicon data, returning it as a data url throws an exception if we don't have data. if there is no data but we have an entry for this favicon, returns null. astring getfavicondataasdataurl( in nsiuri afaviconuri ); parameters afaviconuri uri of the favic...
...And 8 more matches
nsIPermissionManager
rbird 16 / seamonkey 2.13) inherits from: nsisupports method overview void add(in nsiuri uri, in string type, in pruint32 permission, [optional] in pruint32 expiretype, [optional] in print64 expiretime); void addfromprincipal(in nsiprincipal principal, in string type, in pruint32 permission, [optional] in pruint32 expiretype, [optional] in print64 expiretime); void
remove(in autf8string host, in string type); void
removefromprincipal(in nsiprincipal principal, in string type); void
removepermission(in nsipermission perm); void
removeallsince(in int64_t since); void
removeall(); pruint32 testexactpermission(in nsiuri uri, in string type); pruint32 testexactpermissionfromprincipal(in ...
... consumers should choose this string to be unique, with respect to other consumers. permission an integer specifying the permission. see nsipermissionmanager.permission_type_constants. expiretype expiration type of the permission. see nsipermissionmanager.permission_expiration_constants. expiretime time (in milliseconds since jan 1 1970 0:00:00) representing expiration of this permission. ...
... should choose this string to be unique, with respect to other consumers. permission an integer specifying the permission. see nsipermissionmanager.permission_type_constants. expiretype expiration type of the permission. see nsipermissionmanager.permission_expiration_constants. expiretime time (in milliseconds since jan 1 1970 0:00:00) representing expiration of this permission. ...
...And 8 more matches
nsIXULTemplateBuilder
e content within the rule's <action> body is inserted as a sibling of the <template>, assuming the template builder creates real dom content. only one rule will match a result. for a tree builder, for example, the content within the action body is used to create the tree rows instead. a matching result must have its rulematched() method called. when a result no longer matches, the result's hasbeen
removed() method must be called. optionally, the rule may have a <bindings> section which may be used to define additional variables to be used within an action body. each of these declared bindings must be supplied to the query processor via its addbinding() method. the bindings are evaluated after a rule has matched. templates may generate content recursively, using the previous iteration's results as...
...he result objects from each iteration to be used directly as the reference points for the next iteration. when using multiple queries, each may generate results with the same id. more than one of these results may match one of the rules in their respective queries, however only the result for the earliest matching query in the template becomes the active match and generates output. the addresult,
removeresult, replaceresult and resultbindingchanged methods may be called by the query processor to indicate that the set of valid results has changed, such that a different query may match. if a different match would become active, the content for the existing match is
removed and the content for the new match is generated. a query processor is not required to provide any support for updating results ...
...after they have been generated. see the template guide for more information about templates. /xul/templates/public/nsixultemplatebuilder.idlscriptable please add a summary to this article. ...
...And 8 more matches
Migrating from webkitAudioContext - Web APIs
the web audio api went through many iterations before reaching its current state. it was first implemented in webkit, and some of its older parts were not immediately
removed as they were replaced in the specification, leading to many sites using non-compatible code. in this article, we cover the differences in web audio api since it was first implemented in webkit and how to update your code to use the modern web audio api. the web audio standard was first implemented in webkit, and the implementation was built in parallel with the work on the specification of the api. as the specification evolved and changes were made to the spec, some of the old implementation pieces were not
removed from the webkit (and blink) implementations due to backwards compatibility reasons. new engines impl...
... the latter version of createbuffer() was potentially expensive, because it had to decode the audio ...
... audiobuffer. the latter version of createbuffer() was potentially expensive, because it had to decode the audio buffer synchronously, and with the buffer being arbitrarily large, it could take a lot of time for this method to complete its work, and no other part of your web page's code could execute in the mean time. because of these problems, this version of the createbuffer() method has been
removed, and you should use the asynchronous decodeaudiodata() method instead. the example below shows old code which downloads an audio file over the network, and then decoded it using createbuffer(): var xhr = new xmlhttprequest(); xhr.open("get", "/path/to/audio.ogg", true); xhr.responsetype = "arraybuffer"; xhr.send(); xhr.onload = function() { var decodedbuffer = context.createbuffer(xhr.respon...
...And 8 more matches
passwords - Archive of obsolete content
credentials in this api, credentials are represented by objects. ...
...onsists of a username and a password. using this module you can: search for credentials which have been stored in the password manager. you can then use the credentials to access their related service (for example, by logging into a web site). store credentials in the password manager. you can store different sorts of credentials, as outlined in the "credentials" section below.
remove stored credentials from the password manager. credentials in this api, credentials are represented by objects. you create credential objects to pass into the api, and the api also returns credential objects to you. the sections below explain both the properties you should define on credential objects and the properties you can expect on credential objects returned by the api. all credentia...
...word input in a form. omitted for add-on credentials and http authentication credentials. oncomplete function the callback function that is called once the function completes successfully. onerror function the callback function that is called if the function failed. the callback is passed an error argument: this is an nsiexception object. ...
...And 7 more matches
Space Manager Detailed Design - Archive of obsolete content
adeltawidth, nscoord adeltaheight, affectededge aedge = rightedge); /** * offset the region associated with aframe by the specified amount. * * returns ns_ok if successful, ns_error_invalid_arg if there is no region * tagged with aframe */ nsresult offsetregion(nsiframe* aframe, nscoord dx, nscoord dy); /** *
remove the region associated with afrane. * * returns ns_ok if successful and ns_error_invalid_arg if there is no region * tagged with aframe */ nsresult
removeregion(nsiframe* aframe); /** * clears the list of regions representing the unavailable space. */ void clearregions(); /** * methods for dealing with the propagation of float damage during * reflow. */ prboo...
...coord abottom, nsvoidarray*); ~bandrect(); // list operations bandrect* next() const {return (bandrect*)pr_next_link(this);} bandrect* prev() const {return (bandrect*)pr_prev_link(this);} void insertbefore(bandrect* abandrect) {pr_insert_before(abandrect, this);} void insertafter(bandrect* abandrect) {pr_insert_after(abandrect, this);} void
remove() {pr_
remove_link(this);} // split the band rect into two vertically, with this band rect becoming // the top part, and a new band rect being allocated and returned for the // bottom part // // does not insert the new band rect into the linked list bandrect* splitvertically(nscoord abottom); // split the band rect into two horizontally, with this band rect becoming ...
... rect into two horizontally, with this band rect becoming // the left part, and a new band rect being allocated and returned for the // right part // // does not insert the new band rect into the linked list bandrect* splithorizontally(nscoord aright); // accessor functions prbool isoccupiedby(const nsiframe*) const; void addframe(const nsiframe*); void
removeframe(const nsiframe*); prbool hassameframelist(const bandrect* abandrect) const; print32 length() const; }; // circular linked list of band rects struct bandlist : bandrect { bandlist(); // accessors prbool isempty() const {return pr_clist_is_empty((prcliststr*)this);} bandrect* head() const {return (bandrect*)pr_list_head(this);} bandrect* tail() const {re...
...And 7 more matches
Working with Svelte stores - Learn web development
a matter of importing it and executing $store = 'new value'. let's use it in our todos component. ...
...ting $store = 'new value'. let's use it in our todos component. ...
...], ...todo } } add the following reactive block beneath the block that starts with let filter = 'all': $: { if (filter === 'all') $alert = 'browsing all todos' else if (filter === 'active') $alert = 'browsing active todos' else if (filter === 'completed') $alert = 'browsing completed todos' } and finally for now, update the const checkalltodos and const
removecompletedtodos blocks as follows: const checkalltodos = (completed) => { todos = todos.map(t => ({...t, completed})) $alert = `${completed ? 'checked' : 'unchecked'} ${todos.length} todos` } const
removecompletedtodos = () => { $alert = `
removed ${todos.filter(t => t.completed).length} todos` todos = todos.filter(t => !t.completed) } so basically, we've imported the store and upda...
...And 7 more matches
How to implement a custom autocomplete search component
* @return {string} the uri to the image to display */ getimageat : function (index) { return ''; }, /** * get the final value that should be completed when the user confirms * the match at the given index. ...
...tion (index) { return ''; }, /** * get the final value that should be completed when the user confirms * the match at the given index. * @return {string} the final value of the result at the given index */ getfinalcompletevalueat: function(index) { return this.getvalueat(index); }, /** *
removes the value at the given index from the autocomplete results. ...
...t the final value that should be completed when the user confirms * the match at the given index. * @return {string} the final value of the result at the given index */ getfinalcompletevalueat: function(index) { return this.getvalueat(index); }, /** *
removes the value at the given index from the autocomplete results. * if
removefromdb is set to true, the value should be
removed from * persistent storage as well. ...
...And 7 more matches
NSS 3.46 release notes
s/nss_3_46_rtm/src/ other releases are available in nss releases. new in nss 3.46 this release contains no significant new functionality, but concentrates on providing improved performance, stability, and security. of particular note are significant improvements to aes-gcm performance on arm. ...
...leases are available in nss releases. new in nss 3.46 this release contains no significant new functionality, but concentrates on providing improved performance, stability, and security. of particular note are significant improvements to aes-gcm performance on arm. ...
...ty, and security. of particular note are significant improvements to aes-gcm performance on arm. ...
...And 7 more matches
nsIWindowMediator
in wstring awindowtype); pruint32 getzlevel(in nsixulwindow awindow); native code only! nsisimpleenumerator getzorderdomwindowenumerator(in wstring awindowtype, in boolean afronttoback); nsisimpleenumerator getzorderxulwindowenumerator(in wstring awindowtype, in boolean afronttoback); void registerwindow(in nsixulwindow awindow); native code only! void
removelistener(in nsiwindowmediatorlistener alistener); void setzlevel(in nsixulwindow awindow, in pruint32 azlevel); native code only! void setzposition(in nsixulwindow inwindow, in unsigned long inposition, in nsixulwindow inbelow); native code only! void unregisterwindow(in nsixulwindow awindow); native code only! void updatewindowtimestamp(in nsixulwindow awindow)...
...ng tabs will fire the alert. ...
...s} = components; var windowlistener = { onopenwindow: function (awindow) { // wait for the window to finish loading let domwindow = awindow.queryinterface(ci.nsiinterfacerequestor).getinterface(ci.nsidomwindowinternal || ci.nsidomwindow); domwindow.addeventlistener("load", function () { domwindow.
removeeventlistener("load", arguments.callee, false); //this
removes this load function from the window //window has now loaded now do stuff to it //as example this will add a function to listen to tab select and will fire alert in that window if (domwindow.gbrowser && domwindow.gbrowser.tabcontainer) { domwindow.gbrowser.tabcontainer.addeventlistener('tabselect', function () { domwindow.aler...
...And 7 more matches
context-menu - Archive of obsolete content
is automatically handled for you. items are bound to contexts in much the same way that event listeners are bound to events. when the user invokes the context menu, all of the items bound to the current context are automatically added to the menu. if no items are bound, none are added. likewise, any items that were previously in the menu but are not bound to the current context are automatically
removed from the menu. you never need to manually
remove your items from the menu unless you want them to never appear again. for example, if your add-on needs to add a context menu item whenever the user visits a certain page, don't create the item when that page loads, and don't
remove it when the page unloads. rather, create your item only once and supply a context that matches the target url. cont...
...ion) predicatefunction is called when the menu is invoked, and the context occurs when the function returns a true value. the function is passed an object with properties describing the menu invocaton context. array an array of any of the other types. this context occurs when all contexts in the array occur. menu items also have a context property that can be used to add and
remove declarative contexts after construction. for example: var context = require("sdk/context-menu").selectorcontext("img"); mymenuitem.context.add(context); mymenuitem.context.
remove(context); when a menu item is bound to more than one context, it appears in the menu when all of those contexts occur. in content scripts the declarative contexts are handy but not very powerful. for instance, you mi...
...ement that the menu was invoked on, or null if it doesn't have one. linkurl the href url of the element that the menu was invoked on, or null if it doesn't have one. value the current contents of a input text box or area if the menu was invoked in one, null otherwise. item a labeled menu item that can perform an action when clicked. methods destroy() permanently
removes the item from its parent menu and frees its resources. the item must not be used afterward. if you need to
remove the item from its parent menu but use it afterward, call
removeitem() on the parent menu instead. properties label the menu item's label. you can set this after creating the item to update its label later. image the item's icon, a string url. the url can be remote, a reference t...
...And 6 more matches
Archived JavaScript Reference - Archive of obsolete content
obsolete javascript features and unmaintained docs arguments.callerthe obsolete arguments.caller property used to provide the function that invoked the currently executing function. this property has been
removed and no longer works.array comprehensionsthe array comprehension syntax was a javascript expression which allowed you to quickly assemble a new array based on an existing one. however, it has been
removed from the standard and the firefox implementation. do not use it!array.observe()the array.observe() method was used for asynchronously observing changes to arrays, similar to object.observe() for objects. it provided a stream of changes in order of occurrence. it's equivalent to object.observe() invoked with the accept type list ["add", "update", "delete", "splice"]. however, this ap...
...andard and the firefox implementation. do not use it!array.observe()the array.observe() method was used for asynchronously observing changes to arrays, similar to object.observe() for objects. it provided a stream of changes in order of occurrence. it's equivalent to object.observe() invoked with the accept type list ["add", "update", "delete", "splice"]. however, this api has been deprecated and
removed from browsers. you can use the more general proxy object instead.array.unobserve()the array.unobserve() method was used to
remove observers set by array.observe(), but has been deprecated and
removed from browsers. you can use the more general proxy object instead.arraybuffer.transfer()the static arraybuffer.transfer() method returns a new arraybuffer whose contents have been taken from the oldb...
... function syntax for writing simple functions.for each...inthe for each...in statement iterates a specified variable over all values of object's properties. for each distinct property, a specified statement is executed.function.aritynot part of any standard.function.prototype.isgenerator()the non-standard isgenerator() method used to determine whether or not a function is a generator. it has been
removed from firefox starting with version 58.generator comprehensionsthe generator comprehension syntax was a javascript expression which allowed you to quickly assemble a new generator function based on an existing iterable object. however, it has been
removed from the standard and the firefox implementation. do not use it!handler.enumerate()the handler.enumerate() method used to be a trap for for...i...
...And 6 more matches
Video and Audio APIs - Learn web development
radius: 10px; position: absolute; bottom: 20px; left: 50%; margin-left: -200px; background-color: black; box-shadow: 3px 3px 5px black; transition: 1s all; display: flex; } .player:hover .controls, player:focus .controls { opacity: 1; } we start off with the visibility of the custom controls set to hidden. in our javascript later on, we will set the controls to visible, and
remove the controls attribute from the <video> element. this is so that, if the javascript doesn't load for some reason, users can still use the video with the native controls. we give the controls an opacity of 0.5 by default, so that they are less distracting when you are trying to watch the video. only when you are hovering/focusing over the player do the controls appear at full opacity. we lay out...
...constants to hold references to all the objects we want to manipulate. we have three groups: the <video> element, and the controls bar. the play/pause, stop, rewind, and fast forward buttons. the outer timer wrapper <div>, the digital timer readout <span>, and the inner <div> that gets wider as the time elapses. next, insert the following at the bottom of your code: media.
removeattribute('controls'); controls.style.visibility = 'visible'; these two lines
remove the default browser controls from the video, and make the custom controls visible. playing and pausing the video let's implement probably the most important control — the play/pause button. first of all, add the following to the bottom of your code, so that the playpausemedia() function is invoked ...
...eventlistener() lines below the previous ones: rwd.addeventlistener('click', mediabackward); fwd.addeventlistener('click', mediaforward); now on to the event handler functions — add the following code below your previous functions to define mediabackward() and mediaforward(): let intervalfwd; let intervalrwd; function mediabackward() { clearinterval(intervalfwd); fwd.classlist.
remove('active'); if(rwd.classlist.contains('active')) { rwd.classlist.
remove('active'); clearinterval(intervalrwd); media.play(); } else { rwd.classlist.add('active'); media.pause(); intervalrwd = setinterval(windbackward, 200); } } function mediaforward() { clearinterval(intervalrwd); rwd.classlist.
remove('active'); if(fwd.classlist.contains('active')) { fwd.
...And 6 more matches
NSS_3.12_release_notes.html
_destroy bug 421870: strsclnt crashed in pkix tests. ...
...hes after having called cert_pkixverifycert bug 408434: crash with pkix based verify bug 411614: explicit policy does not seem to work. ...
...y extensions not supported bug 129303: nss needs to expose interfaces to deal with multiple token sources of certs. bug 217538: softoken databases cannot be shared between multiple processes bug 294531: design new interfaces for certificate path building and verification for libpkix bug 326482: nss ecc performance problems (intel) bug 391296: need an update helper for shared databases bug 395090:
remove duplication of pkcs7 code from pkix_pl_httpcertstore.c bug 401026: need to provide a way to modify and create new pkcs #11 objects. bug 403680: cert_pkixverifycert fails if crls are missing, implement cert_pi_revocationflags bug 427706: nss_3_12_rc1 crashes in passwordmgr tests bug 426245: assertion failure went undetected by tinderbox bug 158242: pk11_putcrl is very memory inefficient bug 287563...
...And 6 more matches
JSAPI reference
since jsapi 32 high-level type-conversion routines for packing and unpacking function arguments. js_convertarguments obsolete since jsapi 38 js_convertargumentsva obsolete since jsapi 38 js_pusharguments obsolete since javascript 1.8.5 js_pushargumentsva obsolete since javascript 1.8.5 js_poparguments obsolete since javascript 1.8.5 js_addargumentformatter obsolete since jsapi 18 js_
removeargumentformatter obsolete since jsapi 18 the following functions convert js values to various types. they can be safely applied to jsvals of any type. they may return new objects. for example, js_valuetoobject(cx, s) where s is a string creates a new string wrapper object. these functions may call javascript methods. for example, js_valuetostring(cx, obj) may call obj.tostring(). js::toboole...
...egc js_getgcparameter js_setgcparameter js_getgcparameterforthread added in spidermonkey 17 js_setgcparameterforthread added in spidermonkey 17 js_setgcparametersbasedonavailablememory added in spidermonkey 31 enum jsgcparamkey js_setgccallback enum jsgcstatus js_addfinalizecallback added in spidermonkey 38 enum jsfinalizestatus added in spidermonkey 17 js_
removefinalizecallback added in spidermonkey 38 js_setgczeal added in spidermonkey 1.8 js_schedulegc added in spidermonkey 17 js_dumpheap added in spidermonkey 1.8 js_setgccallbackrt obsolete since jsapi 13 js_setfinalizecallback added in spidermonkey 17 obsolete since jsapi 32 js_markgcthing obsolete since jsapi 5 js_isabouttobefinalized obsolete since jsapi 35 js_clearnewbornroots obsolete ...
...since jsapi 38 js::addnamedvalueroot added in spidermonkey 31 obsolete since jsapi 38 js::addnamedvaluerootrt added in spidermonkey 31 obsolete since jsapi 38 js::addnamedscriptroot added in spidermonkey 31 obsolete since jsapi 38 js::addnamedstringroot added in spidermonkey 31 obsolete since jsapi 38 js::addnamedobjectroot added in spidermonkey 31 obsolete since jsapi 38 js::
remove*root added in spidermonkey 31 obsolete since jsapi 38 js::
removevalueroot added in spidermonkey 31 obsolete since jsapi 38 js::
removestringroot added in spidermonkey 31 obsolete since jsapi 38 js::
removeobjectroot added in spidermonkey 31 obsolete since jsapi 38 js::
removescriptroot added in spidermonkey 31 obsolete since jsapi 38 js::
removevaluerootrt added in spidermonkey 31 o...
...And 6 more matches
SpiderMonkey 1.8.7
, file bugs at bugzilla.mozilla.org under product: core, component: javascript engine. —22 march 2011 platform support spidermonkey 1.8.7 is supported on all the platforms where firefox 10 runs. spidermonkey 1.8.7 includes type inference, which boosts the speed of the jägermonkey jit by about 30% over version 1.8.5. type inference largely obviates tracemonkey, so the tracemonkey jit has been
removed. the jit is supported only on x86, x86_64 and arm architectures. on other platforms, the jit is simply disabled; javascript code runs in an interpreter, as in previous versions. it's the same language, just not as fast. migrating to spidermonkey 1.8.7 this covers migrating from version 1.8.5. see the 1.8.5 release notes for information on migrating from earlier versions. the following features i...
... 1.8.5. this is not a bug, and, any embedding which depends upon deterministic finalization is fatally flawed. typed rooting api the rooting api has been changed from an error-prone void ** interface to an interface which accepts pointers to specific types. js_addroot has been replaced by js_addobjectroot, js_addvalueroot and js_addstringroot; similar changes were made for js_addnamedroot and js_
removeroot. since jsdoubles are now stored in the jsval, instead of on the heap, we no longer need to define roots for them. compartments spidermonkey 1.8.5 introduces the concept of compartments. a compartment is a global object, a context, and a set of related objects with no outside references (crosscompartment wrappers excepted). the new garbage collector can perform per-container garbage collectio...
...l_is_int was true. while this was never specified behaviour, it is no longer true; numeric values which are integers are frequently encoded as jsdouble inside the jsval. embedders must be careful when converting numbers from jsvals into c. note also that spidermonkey can now fit a full 32-bit integer (jsint) inside a jsval without promoting to a jsdouble. jsextendedclass jsextendedclass has been
removed from the api entirely. jsid previous spidermonkey versions could freely interchange jsid and jsval. they are no longer compatible; using js_valuetoid and js_idtovalue to convert between the two is mandatory. jsnative, jsfastnative previous versions of jsapi supported two types of native functions -- jsnative and jsfastnative. the so-called "slow natives" are no longer supported; as such jsfast...
...And 6 more matches
Starting WebLock
reate a component. since the component hasn't been created yet, there are no instantiated nsiobserver objects that can be passed into the nsiobserverservice, nor can the component code do anything until it is loaded. registering for notifications the nsiobserverservice interface has methods for registering and unregistering an nsiobserver object. these two methods are used to dynamically add or
remove an observer to a notification topic. but weblock needs to be instantiated and added to the observer service automatically, which also implies some sort of persistent data (after all, we want to have the component start up every time the application does). this is where a new service that manages sets of related data comes in handy. this service, the nsicategoryservice, is what xpcom and gecko em...
... manager, service manager, category manager, and the component registrar to register itself properly with xpcom. the next step is to expose additional functionality to gecko applications and other clients to query and control the weblock component. for example, the user interface needs to be able to enable and disable the web locking functionality, see what sites are in the whitelist, and add or
remove sites from that list. weblock needs to provide an api, and it needs to hook into gecko in order to implement the actual locking functionality. the weblock user interface the weblock component in this tutorial uses xul to define the additional browser ui in a cross-platform way, and xul uses javascript to access and control xpcom components, but gecko's pluggable ui allows any user interface to...
...general, the weblock service interface needs to include the following functionality: lock - enable web locking so that any browser in the gecko application is restricted to the white list of website domains. unlock - disable web locking. this should allow any browser in the gecko application to browse any website regardless of the white list. addsite - add the current url to the white list.
removesite -
remove the current url from the white list. enumeratesites - allows the enumeration of all sites in the white list. enumeratesites might be used in the user interface to provide something like an editable listbox of all sites in the white list. even this simple outline presents some ambiguity, however. it's certainly not enough to spell out the interface for the weblock component in this...
...And 6 more matches
nsIHTMLEditor
undselection(in nsidomelement aanchorelement); boolean isanonymouselement(in nsidomelement aelement); void makeorchangelist(in astring alisttype, in boolean entirelist, in astring abullettype); boolean nodeisblock(in nsidomnode node); void pastenoformatting(in long aselectiontype); void rebuilddocumentfromsource(in astring asourcestring); void
removealldefaultproperties(); void
removeallinlineproperties(); void
removedefaultproperty(in nsiatom aproperty, in astring aattribute, in astring avalue); void
removeinlineproperty(in nsiatom aproperty, in astring aattribute); void
removeinsertionlistener(in nsicontentfilter infilter); void
removelist(in astring alisttype); void replaceheadcontentsw...
...added to the created anonymous element. return value a dom element. createelementwithdefaults() return a new element with default attribute values. this does not rely on the selection, and is not sensitive to context. used primarily to supply new element for various insert element dialogs (image, link, table, and horizontalrule are the only returned elements as of 9/12/18); namedanchor was
removed in firefox 63. nsidomelement createelementwithdefaults( in astring atagname ); parameters atagname the html tagname. special input value for links: use "href" to get a link node (an "a" tag with the "href" attribute set) return value the new element created. decreasefontsize() decrease font size for text in selection by 1 html unit all existing text is scanned for existing <font si...
...html styles and formatting. void pastenoformatting( in long aselectiontype ); parameters aselectiontype rebuilddocumentfromsource() rebuild the entire document from source html needed to be able to edit head and other outside-of-body content. void rebuilddocumentfromsource( in astring asourcestring ); parameters asourcestring html source string of the entire new document. ...
...And 6 more matches
Border-image generator - CSS: Cascading Style Sheets
ion(e) { var value = parsefloat(e.target.value); if (isnan(value) === true) setvalue(obj.topic, obj.value); else setvalue(obj.topic, value); }); return input; }; var slidercomponent = function slidercomponent(obj, sign) { var slider = document.createelement('div'); var startx = null; var start_value = 0; slider.addeventlistener("click", function(e) { document.
removeeventlistener("mousemove", slidermotion); setvalue(obj.topic, obj.value + obj.step * sign); }); slider.addeventlistener("mousedown", function(e) { startx = e.clientx; start_value = obj.value; document.body.style.cursor = "e-resize"; document.addeventlistener("mouseup", slideend); document.addeventlistener("mousemove", slidermotion); }); var slideend = function slideend...
...semove", slidermotion); setvalue(obj.topic, obj.value + obj.step * sign); }); slider.addeventlistener("mousedown", function(e) { startx = e.clientx; start_value = obj.value; document.body.style.cursor = "e-resize"; document.addeventlistener("mouseup", slideend); document.addeventlistener("mousemove", slidermotion); }); var slideend = function slideend(e) { document.
removeeventlistener("mousemove", slidermotion); document.body.style.cursor = "auto"; slider.style.cursor = "pointer"; }; var slidermotion = function slidermotion(e) { slider.style.cursor = "e-resize"; var delta = (e.clientx - startx) / obj.sensivity | 0; var value = delta * obj.step + start_value; setvalue(obj.topic, value); }; return slider; }; var inputslider = function(...
...d]); dropdowns[topic] = this; }; dropdown.prototype.toggle = function toggle(state) { if (typeof(state) === 'boolean') this.state = state === false ? ...
...And 6 more matches
RDF Modifications - Archive of obsolete content
« previousnext » one of the most useful aspects of using templates with rdf datasources is that when the rdf datasource changes, for instance a new triple is added, or a triple is
removed, the template updates accordingly, adding or removing result output as needed. no extra code needs to be written to do this; it happens automatically. this involves a third type of observer involved in a template builder, an nsirdfobserver, used to listen for modifications to the rdf datasource. naturally, this only applies to rdf queries. when the datasource is modified, the datasource will notify any observers of the change. the template builder uses these notifcations to update the template as necessary based on the new or
removed information. you don't need to implement this observer yours...
... rdf datasources. however, as it is possible to use and/or implement other query types with templates, these additional types may support automatic updating. there are two main situations when the notifications are made. the first is when the modification functions on the datasource are called. there are four such functions: 'assert', to add a new triple (or arrow) to the rdf graph, 'unassert' to
remove a triple, 'change' to adjust the target of a triple, and 'move' to adjust the source of a 'triple'. for mozilla's datasources, the latter two just unassert the old triple and add a new one, creating the effect of changing the value. however, only one notification is made. for instance, an assert call looks like the following: var source = rdf.getresource("http://www.xulplanet.com/ndeakin/images/...
...tions, but it is worth discussing separately. when the rdf parser loads rdf/xml, it starts with a new empty datasource, and as the parser parses the input data, it calls the datasource's assert function to add each found triple. in effect, this isn't any different than adding the same set of triples yourself using the assert method. when reloading a datasource, you might think that the rdf parser
removes all the existing data, loads the new data, and adds it to the datasource. or, you might think that it creates a fresh datasource with the new data. actually, the parser does something smarter. when reloading a datasource, it keeps the existing rdf triples intact, and only modifies the datasource based on what has changed. when parsing, any triples that already exist are not added again. if a tri...
...And 5 more matches
Template Logging - Archive of obsolete content
g error, or simply that there shouldn't be any data anyway. fortunately, some debugging and logging support is provided with templates that may help. logging template results there are two main ways in which template errors may be detected. the first debugging method involves logging all new results that apply to the template due to the data changing as well as logging results that are changed or
removed. in addition, each result generated when the template is first created and initialized is logged. this logging of result changes is not done by default; it must be enabled with a flag. <vbox datasources="..." flags="logging"/> the flags attribute on the root element of the template should include the logging flag. if other flags are used as well, separate them with spaces. enabling logging will...
... <vbox datasources="..." flags="logging"/> the flags attribute on the root element of the template should include the logging flag. if other flags are used as well, separate them with spaces. enabling logging will output details to the error console for each result. the error console can be found on the firefox tools menu. this logging of results can be very useful for debugging, but remember to
remove this flag when you have finished and the template works correctly, as the logging can take up extra time that is not necessary when the template is working. each result is logged in a form much like the following: in template with id root using ref http://www.some-fictitious-zoo.com/birds new active result for query 2 matching rule 1: http://www.some-fictitious-zoo.com/birds/emperorpenguin in th...
...ddition, this result matches the first <rule> of query 2. this information may be used to determine if results are not matching the correct rules. if you, for example, were expecting rule 2 to match, examine the rules and ensure that the logic is correct. the final piece of information is the phrase 'new active result'. this indicates first, that this is a new result, as opposed to a result being
removed, and second, that this result is 'active'. being active means that the result is not being overridden by an earlier query. as this example implies multiple queries are being used, we can determine that the first query did not provide a result with the given id, and that the result from the second query is used instead. this allows us to narrow down what query and rule is being used to generate t...
...And 5 more matches
HTTP Cache
the cache api is completely thread-safe and non-blocking. there is no ipc support. it's only accessible on the default chrome process. when there is no profile the new http cache works, but everything is stored only in memory not obeying any particular limits. it is strongly encoraged to not use the old cache api any more - nsicacheservice et al. it will soon be completely obsoleted and
removed (bug 913828). nsicachestorageservice the http cache entry-point. accessible as a service only, fully thread-safe, scriptable. //github.com/realityripple/uxp/blob/master/netwerk/cache2/nsicachestorageservice.idl "@mozilla.org/netwerk/cache-storage-service;1" provides methods accessing “storage” objects – see nsicachestorage below – giving further access to cache...
... mandatory argument to *storage methods of nsicachestorageservice. //github.com/realityripple/uxp/blob/master/netwerk/base/public/nsiloadcontextinfo.idl it is a he...
... mandatory argument to *storage methods of nsicachestorageservice. //github.com/realityripple/uxp/blob/master/netwerk/base/public/nsiloadcontextinfo.idl it is a helper interface wrappin...
...And 5 more matches
Midas
selection for the given command. supported commands command value description backcolor a color code. this command will set the background color of the document. bold if there is no selection, the insertion point will set bold for subsequently typed characters. if there is a selection and all of the characters are already bold, the bold will be
removed. otherwise, all selected characters will become bold. contentreadonly this command will make the editor readonly(true)or editable(false). anticipated usage is for temporarily disabling input while something else is occurring elsewhere in the web page. copy if there is a selection, this command will copy the selection to the clipboard. if there isn't a selectio...
...cally accel-c) with or without the signed js or any code on the page to handle it. createlink a uri. this command will not do anything if no selection is made. if there is a selection, a link will be inserted around the selection with the url parameter as the href of the link. cut if there is a selection, this command will copy the selection to the clipboard and
remove the selection from the edit control. if there isn't a selection, nothing will happen. note: this command won't work without setting a pref or using signed js. see: more about security preferences note: the shortcut key will automatically trigger this command (typically accel-x) with or without the signed js or any code on the page to handle it. decreasefontsize this c...
...block, that block becomes the first li and ul. if the caret is inside a numbered item, the numbered item becomes a bulleted item. insertparagraph inserts a new paragraph. italic if there is no selection, the insertion point will set italic for subsequently typed characters. if there is a selection and all of the characters are already italic, the italic will be
removed. otherwise, all selected characters will become italic. justifycenter center-aligns the current block. justifyfull fully-justifies the current block. justifyleft left-aligns the current block. justifyright right aligns the current block. outdent outdent the block where the caret is located. if the block is not in...
...And 5 more matches
SpiderMonkey 38
tion. the js::handle<js::value> and js::mutablehandle<js::value> classes have been specialized to implement the same interface as js::value, for simplicity and to ease migration pain. changes to introduce handles to the jsapi are not individually documented, because of the breadth of the changes involved. the following features in earlier versions of spidermonkey have been dropped. xxx list
removed features here spidermonkey 38 is not binary-compatible with previous releases, nor is it source-code compatible. many jsapi types, functions, and callback signatures have changed, though most functions that have changed still have the same names and implement essentially unchanged functionality. applications will need significant changes, but most of those changes will be detected by the c/c++...
... deleted apis js::addnamedobjectroot (bug 1107639) js::addnamedscriptroot (bug 1107...
...opertydefinitionbehavior (bug 825199) symbol_to_jsid (bug 645416) obsolete apis ... ...
...And 5 more matches
XPCOM array guide
nsiarray or nsimutablearray as appropriate. when the array can or should be modified, then use nsimutablearray: // array is read-only because it uses nsiarray void printsize(nsiarray* elements) { pruint32 count; elements->getlength(&count); printf("there are %d elements.\n", count); } // using nsimutablearray, so callee may modify void tweakarray(nsimutablearray* elements) { elements->
removeelementat(0); elements->appendelement(newelement, pr_false); } while it is usually possible to call queryinterface on an nsiarray to get access to the nsimutablearray interface, this is against convention and it should be avoided. // no need for the double-pointer, and this violates xpcom rules // which expect acess to a new object void tweakarray(nsimutablearray** elements) { // ugh, extra...
...ppendelement(newelement, pr_false); } while it is usually possible to call queryinterface on an nsiarray to get access to the nsimutablearray interface, this is against convention and it should be avoided. // no need for the double-pointer, and this violates xpcom rules // which expect acess to a new object void tweakarray(nsimutablearray** elements) { // ugh, extra indirection! *elements->
removeelementat(0); *elements->appendelement(newelement, pr_false); } in-place enumeration when accessing all members of an nsiarray, in-place enumeration is preferred over indexed access. however, i seem to have forgotten to implement that. good thing the interface is under review. sorry! enumerators creating an enumerator from an nsiarray is easy. the method enumerate() returns a nsisimpleenume...
...ut of scope, all its members are released. void processvisibleitems() { // temporary stack-based nscomarray nscomarray<nsifoo> fooitems; getcompletelist(fooitems); // now filter out non visible objects // doing this backwards pruint32 i = fooitems.count(); while (i > 0) { --i; prbool isvisible; fooitems[i]->getisvisible(&isvisible); if (!isvisible) { fooitems.
removeobjectat(i); } } // now deal with the processed list processlist(fooitems); // fooitems will release all its members // when it goes out of scope } access to elements nscomarray<t> is a concrete c++ class, and so the [] operator is used to access its members. when using the [] operator, the reference count is unchanged. this allows direct processing of array elements without wor...
...And 5 more matches
Observer Notifications
y for a while. the notification is not repeated during a continuous inactivity period. windows these topics indicate points of interest during the lifetime of a window. topic subject description dom-window-destroyed nsidomwindow called just before a dom window is destroyed. inner-window-destroyed nsidomwindow called when an inner window is
removed from the backward/forward cache. see working with bfcache for information about the bfcache, and inner and outer windows for details about how the window hierarchy works. extensions that cache information about windows may wish to observe this so they can release information when the window is destroyed. the window id can be obtained from subject.queryinterface(components.interfaces.nsisupports...
...after a top level xul window is registered with the window mediator service. xul-window-visible nsiappwindow called just after a xul window is made visible. browsing-context-discarded browsingcontext called while a browsingcontext is being discarded. by this point, the browsingcontext will have been detached from its browsingcontextgroup and parent windowcontext, and
removed from any browsingcontext tree it was a part of. this is sent before browsingcontext::closed() is updated. window-global-created windowglobalparent called just after a windowglobalparent is initialized. a windowglobal actor has a lifetime matching that of an nsglobalwindowinner. window-global-destroyed windowglobalparent called just before a windowglobalparent is des...
...ter a windowglobalparent is initialized. a windowglobal actor has a lifetime matching that of an nsglobalwindowinner. window-global-destroyed windowglobalparent called just before a windowglobalparent is destroyed. by this point, the wgp being destroyed will have cleaned up most of its state, including its browsingcontext children and jswindowactors. additionally, it will have been
removed from any windowcontext tree it was part of. io notifications these topics can be used to watch the io service for useful information. topic description offline-requested called to query whether the application can go offline. the attempt to go offline can be canceled. note: if your code chooses to cancel the attempt to go offline, it must notify the user. ...
...And 5 more matches
mozIPersonalDictionary
read only. methods addcorrection() adds a misspelling to the list of corrections. note that this method is not currently implemented. v...
...read only. methods addcorrection() adds a misspelling to the list of corrections. note that this method is not currently implemented. void addcorrection( in wstring word, in wstring correction, in wstring lang ...
...ize_is(count)] out wstring words, out pruint32 count ); parameters word the word to get the list of corrections for. words the list of corrections. count the number of corrections in the list. ignoreword() adds a word to the ignore all list. void ignoreword( in wstring word ); parameters word the word to add to the ignore list. load() loads the dictionary. void load(); parameters none.
removecorrection()
removes a misspelling from the list of corrections. this
removes a single misspelling and correction pair from the list. void
removecorrection( in wstring word, in wstring correction, in wstring lang ); parameters word the incorrect spelling of the word to
remove from the list of corrections. correction the correct spelling of the word. lang the language of the word. notes on...
...And 5 more matches
nsIMsgFolder
); void setstringproperty(in string propertyname, in acstring propertyvalue); boolean isancestorof(in nsimsgfolder folder); boolean containschildnamed(in astring name); nsimsgfolder getchildnamed(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 notifyintpropertychanged(in nsiatom property, in long oldvalue, in long newvalue); void notifyboolpropertychanged(in nsiatom property, in boolean oldvalue, in boolean newvalue); void notifypropertyflagchanged(in nsimsgd...
...propertychanged(in nsiatom property, in boolean oldvalue, in boolean newvalue); void notifypropertyflagchanged(in nsimsgdbhdr item, in nsiatom property, in unsigned long oldvalue, in unsigned long newvalue); void notifyunicharpropertychanged(in nsiatom property, in astring oldvalue, in astring newvalue); void notifyitemadded(in nsisupports item); void notifyitem
removed(in nsisupports item); void notifyfolderevent(in nsiatom event); void listdescendents(in nsisupportsarray descendents); void shutdown(in boolean shutdownchildren); void setinvfeditsearchscope(in boolean asearchthisfolder, in boolean asetonsubfolders); void copydatatooutputstreamforappend(in nsiinputstream aistream, in long alength, in nsioutputstream o...
... setjunkscoreformessages(in nsisupportsarray amessages, in acstring ajunkscore); void applyretentionsettings(); boolean fetchmsgpreviewtext([array, size_is (anumkeys)] in nsmsgkey akeystofetch, in unsigned long anumkeys, in boolean alocalonly, in nsiurllistener aurllistener); void addkeywordstomessages(in nsisupportsarray amessages, in acstring akeywords); void
removekeywordsfrommessages(in nsisupportsarray amessages, in acstring akeywords); autf8string getmsgtextfromstream(in nsimsgdbhdr amsghdr, in nsiinputstream astream, in long abytestoread, in long amaxoutputlen, in boolean acompressquotes); attributes attribute type description supportsoffline boolean readonly offlinestoreoutputstream nsioutputst...
...And 5 more matches
nsINavHistoryResultObserver
windex); void nodekeywordchanged(in nsinavhistoryresultnode anode, in autf8string anewkeyword); void nodelastmodifiedchanged(in nsinavhistoryresultnode anode, in prtime anewvalue); void nodemoved(in nsinavhistoryresultnode anode, in nsinavhistorycontainerresultnode aoldparent, in unsigned long aoldindex, in nsinavhistorycontainerresultnode anewparent, in unsigned long anewindex); void node
removed(in nsinavhistorycontainerresultnode aparent, in nsinavhistoryresultnode aitem, in unsigned long aoldindex); void nodereplaced(in nsinavhistorycontainerresultnode aparentnode, in nsinavhistoryresultnode aoldnode, in nsinavhistoryresultnode anewnode, in unsigned long aindex); void nodetagschanged(in nsinavhistoryresultnode anode); void nodetitlechanged(in nsinavhistoryresultnode anode, in au...
...ting a view for each update). void batching( in boolean atogglemode ); parameters atogglemode specify true to start batch mode or false to finish the batch. containerclosed() obsolete since gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8) called when a container node's state changes from opened to closed. note: this method was deprecated in gecko 2.0 and
removed in gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8). implement the containerstatechanged() method instead. void containerclosed( in nsinavhistorycontainerresultnode acontainernode ); parameters acontainernode the container node which was closed. containeropened() obsolete since gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8) called when ...
...ethod instead. void containerclosed( in nsinavhistorycontainerresultnode acontainernode ); parameters acontainernode the container node which was closed. containeropened() obsolete since gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8) called when a container node's state changes from closed to opened. note: this method was deprecated in gecko 2.0 and
removed in gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8). implement the containerstatechanged() method instead. void containeropened( in nsinavhistorycontainerresultnode acontainernode ); parameters acontainernode the container node which was opened. containerstatechanged() called when a container node's state changes. void containerstatechanged( in nsinavhistorycontainerresultn...
...And 5 more matches
Node - Web APIs
uri, if present, and null if not. when multiple prefixes are possible, the result is implementation-dependent. node.lookupnamespaceuri() accepts a prefix and returns the namespace uri associated with it on the given node if found (and null if not). supplying null for the prefix will return the default namespace. node.normalize() clean up all the text nodes under this element (merge adjacent,
remove empty). node.
removechild()
removes a child node from the current element, which must be a child of the current node. node.replacechild() replaces one child node of the current one with the second one given in parameter. obsolete methods node.getuserdata() allows a user to get some domuserdata from the node. node.hasattributes() returns a boolean indicating if the element has any a...
...ta() allows a user to get some domuserdata from the node. node.hasattributes() returns a boolean indicating if the element has any attributes, or not. node.issupported() returns a boolean flag containing the result of a test whether the dom implementation implements a specific feature and this feature is supported by the specific node. ...
... from the node. node.hasattributes() returns a boolean indicating if the element has any attributes, or not. node.issupported() returns a boolean flag containing the result of a test whether the dom implementation implements a specific feature and this feature is supported by the specific node. node.setuserdata() allows a user to attach, or
remove, domuserdata to the node. ...
...And 5 more matches
TrackEvent - Web APIs
it's important not to confuse trackevent with the rtctrackevent interface, which is used for tracks which are part of an rtcpeerconnection. ...
...y the dom track object the event is in reference to. if not null, this is always an object of one of the media track types: audiotrack, videotrack, or texttrack). methods trackevent has no methods of its own; however, it is based on event, so it provides the methods available on event objects. ...
...event, so it provides the methods available on event objects. example this example sets up a function, handletrackevent(), which is callled for any addtrack or
removetrack event on the first <video> element found in the document. ...
...And 5 more matches
Box-shadow generator - CSS: Cascading Style Sheets
= value; slider.pointer.style.left = pos - offset / 2 + "px"; slider.node.setattribute('data-value', value); notify.call(slider); } var setmousetracking = function setmousetracking(elem, callback) { elem.addeventlistener("mousedown", function(e) { callback(e); document.addeventlistener("mousemove", callback); }); document.addeventlistener("mouseup", function(e) { document.
removeeventlistener("mousemove", callback); }); } var subscribe = function subscribe(topic, callback) { if (subscribers[topic] === undefined) subscribers[topic] = []; subscribers[topic].push(callback); } var unsubscribe = function unsubscribe(topic, callback) { subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); } var notify = function notify() { if (subscr...
...selector("#colorpicker " + selector); var value = node.value; color.sethexa(value); color.updatehsv(); updateui(); } var setmousetracking = function setmousetracking(elem, callback) { elem.addeventlistener("mousedown", function(e) { callback(e); document.addeventlistener("mousemove", callback); }); document.addeventlistener("mouseup", function(e) { document.
removeeventlistener("mousemove", callback); }); } /* * observer */ var setcolor = function setcolor(obj) { if(obj instanceof color !== true) { console.log("typeof instance not color"); return; } color.copy(obj); updateui(); } var subscribe = function subscribe(topic, callback) { if (subscribers[topic] === undefined) subscribers[topic] = []; subscribers...
... document.addeventlistener('mouseup', dragend, false); } var dragstart = function dragstart(e) { if (e.button !== 0) return; active = true; lastx = e.clientx; lasty = e.clienty; document.addeventlistener('mousemove', mousedrag, false); } var dragend = function dragend(e) { if (e.button !== 0) return; if (active === true) { active = false; document.
removeeventlistener('mousemove', mousedrag, false); } } var mousedrag = function mousedrag(e) { notify(e.clientx - lastx, e.clienty - lasty); lastx = e.clientx; lasty = e.clienty; } var subscribe = function subscribe(callback) { subscribers.push(callback); } var unsubscribe = function unsubscribe(callback) { var index = subscribers.indexof(callback); subscribers.splic...
...And 5 more matches
Enhanced Extension Installation - Archive of obsolete content
nts, defaults and chrome manifests. uninstallation, disabling, enabling these functions work on the same principle as installation - the user requests an action through the ui while the application is running and metadata is written (tobeuninstalled, tobedisabled, tobeenabled) and a .autoreg file created in the profile so that on the subsequent startup the extension system's startup routine can
remove files (in the uninstall case) and write a new extensions.ini file listing the directories for the currently "active" items. ("active" items are items that are enabled.) a whole new world install locations we have several targets for where items can be installed. these include: the application profile directory <profile>/extensions/ the application install directory <application>/extensions...
... is written from the current state of the cache. the pending operations list is used by the install operation finalization routine (|_finishoperations|) to get a list of items that are to be operated on. since all metadata is now stored in the profile directory, there is no longer any need for special extension system handling of the -register command line flag, so support for that has been
removed. datasource structure since there is now only a single rdf/xml datasource for storage of all installed items, the staggered datasource structure used by firefox 1.0 and the use of an internal composite datasource is no longer required. the extension system retains an object implementing nsirdfdatasource (so that it can supply special properties in addition to the set stored simply in the xml d...
... when an item is being installed from a xpi file from the web or from a drop in) the extension system checks to see if there is an existing version installed, and if so a special routine is called which sets a tobeupgraded flag on the configured item instead of the usual tobeinstalled flag. on the subsequent startup, this function causes metadata about the old version of the item to be completely
removed from the extensions datasource and the new data from the install manifest of the upgrade copied in, to avoid duplicate assertions. after the upgrade finalization routine executes, it unsets the tobeuninstalled flag and sets the tobeinstalled flag to trigger the item's files to be replaced from the staged xpi. when an item's files are extracted, a special extraction routine known as a safeinstal...
...And 4 more matches
Search Extension Tutorial (Draft) - Archive of obsolete content
adverse user experience. due to the large volume of user complaints regarding hidden settings being changed against their will, and not being restored after the add-ons responsible are disabled, mozilla will take any steps necessary to mitigate the impact of offending add-ons. in particular, changing the location bar search keyword url in a way which is not automatically reset when the add-on is
removed will result in a reset prompt for users. other settings violations designed to restrict user choice will result in stronger action, such as blacklisting of the add-ons in question. the most technically sound method of achieving this, and the only acceptable way of changing preferences such that they are automatically restored on add-on uninstall, is to make such changes in the default preference...
...t it if (selectsearch && !engine.hidden) { services.search.moveengine(engine, 0); services.search.currentengine = engine; } } function shutdown(data, reason) { // clean up the search engine on uninstall or disabled. if (reason == addon_uninstall || reason == addon_disable) { let engine = services.search.getenginebyname(engine_details.name); // only
remove the engine if it appears to be the same one we // added. if (engine && engine.getsubmission("_searchterms_").uri.spec == engine_details.url) services.search.
removeengine(engine); } } function install() {} function uninstall() {} the complex method requires two files, an xml search description file and a javascript file to register the engine. in non-restartless e...
...l file. const engine_details = { name: "example engine", url: "https://www.example.com/search?q=_searchterms_&source=search-box" }; // get the engine url based on our url. const engine_url = "chrome://example-engine/content/search.xml"; // keep track of whether this is the first run. var firstrun = false; // decide whether to select the search engine. var selectsearch = false; function
removeobserver() { try { services.obs.
removeobserver(searchobserver, engine_added); } // if we've already
removed this observer, ignore the error. catch (e) {} } // observer called after our engine has been successfully added function searchobserver(engine, topic, data) { if (data != "engine-added") return; engine.queryinterface(ci.nsisearchengine); if (engi...
...And 4 more matches
Editor Embedding Guide - Archive of obsolete content
) docommand no parameters note this is logical style. typically it is displayed with monospace font. cmd_var toggles variable style on selection. getcommandstate "state_all"(boolean), "state_begin"(boolean), "state_end"(boolean), "state_mixed"(boolean), "state_enabled" (boolean) docommand no parameters note this is logical style. typically it is displayed with monospace font. ...
... no parameters note this is logical style. typically it is displayed with monospace font. cmd_var toggles variable style on selection. getcommandstate "state_all"(boolean), "state_begin"(boolean), "state_end"(boolean), "state_mixed"(boolean), "state_enabled" (boolean) docommand no parameters note this is logical style. typically it is displayed with monospace font. ...
...his is logical style. typically it is displayed with monospace font. cmd_
removelinks
removes the existing link from the selection (if any). getcommandstate "state_enabled"(boolean), ??? docommand no parameters cmd_ol makes ordered list from selection or inserts new list if there is no selection. getcommandstate "state_enabled"(boolean) docommand no parameters note see also cmd_
removelist cmd_ul makes unordered list from selection or inserts new list if there is no selection. getcommandstate "state_enabled"(boolean) docommand no parameters note see also cmd_
removelist cmd_dt inserts list item (dt element). getcommandstate "state_enabled"(boolean) docommand no parameters note see also cmd_
removelist cmd_dd inserts list item (dd element). getcommandst...
...And 4 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
this should be one of the characters that appears in the label attribute for the element. alwaysopenpopup obsolete since gecko 1.9.1 type: boolean note: applies to: thunderbird and seamonkeyif tr...
...this can be used to create a customized autocomplete res...
...this can be used to create a customized autocomplete results list. the argu...
...And 4 more matches
browser - Archive of obsolete content
autocompletepopup type: id the id...
...the progress listener should impleme...
...the progress listener should implement the nsiwebprogre...
...And 4 more matches
listbox - Archive of obsolete content
ation, itemcount, listboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoffset,
removeitemat,
removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <listbox id="thelist"> <listitem label="ruby"/> <listitem label="emerald"/> <listitem label="sapphire" selected="true"/> <listitem label="diamond"/> </listbox> <listbox id="thelist" rows="10" width="400"> <listhead> <listheader label="1ct gem" wid...
... appenditem( label, value ) retur...
... appenditem( label, value ) return type: element ...
...And 4 more matches
menu - Archive of obsolete content
he xul tutorial. ...
...you may optionally set a value. the function returns t...
...you may optionally set a value. the function returns the newly created el...
...And 4 more matches
notification - Archive of obsolete content
by the dir and orient attributes. label type: string the label that will appear on the element. if this is left out, no text appears. for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. persistence type: integer the persistence may be set to a non-zero value so that the notificationbox's
removetransientnotifications method does not
remove them. this may be used to close a set of notifications as a group without affecting other notifications. priority type: integer numeric value that specifies the order in which the notifications appear. should be one of the constants described in the notificationbox's appendnotification method. type type: one of the values below indica...
... related elements notificationbox ...
... related elements notificationbox ...
...And 4 more matches
radiogroup - Archive of obsolete content
border or caption for the group. the radiogroup defaults to vertical orientation. more information is available in the xul tutorial. attributes disabled, focused, preference, tabindex, value properties accessibletype, disabled, focuseditem, itemcount, selectedindex, selecteditem, tabindex, value methods appenditem, checkadjacentelement, getindexofitem, getitematindex, insertitemat,
removeitemat examples <radiogroup> <radio id="orange" label="red"/> <radio id="violet" label="green" selected="true"/> <radio id="yellow" label="blue"/> </radiogroup> attributes disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out text. if the element is disabl...
...you may optionally set a value. the function returns ...
...you may optionally set a value. the function returns the newly created e...
...And 4 more matches
richlistbox - Archive of obsolete content
ion, itemcount, scrollboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoffset,
removeitemat,
removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <richlistbox> <richlistitem> <description>a xul description!</description> </richlistitem> <richlistitem> <button label="a xul button"/> </richlistitem> </richlistbox> the richlistbox element contains multiple richlistitem elements, which can contai...
... appenditem( label, value ) ret...
... appenditem( label, value ) return type: element ...
...And 4 more matches
tabs - Archive of obsolete content
dindex. more information is available in the xul tutorial. attributes closebutton, disableclose, disabled, onclosetab, onnewtab, onselect, setfocus, selectedindex, tabbox, tabindex, tooltiptextnew, value, properties accessibletype, disabled, itemcount, selectedindex, selecteditem, tabindex, value, methods advanceselectedtab, appenditem, getindexofitem, getitematindex, insertitemat,
removeitemat examples (example needed) attributes closebutton obsolete since gecko 1.9.2 type: boolean if this attribute is set to true, the tabs row will have a "new tab" button and "close" button on the ends. this feature is used by the tabbrowser to provide the facilities for adding and closing tabs. you can set an image to the "new tab" and "close" buttons by applying t...
...if the argument dir is set to -1, the currentl...
...if the argument dir is set to -1, the currently selected tab chan...
...And 4 more matches
HTML text fundamentals - Learn web development
t recipes that i have read over the years. hummus is a delicious thick paste used heavily in greek and middle eastern dishes. it is very tasty with salad, grilled meats and pitta breads. ...
...is a delicious thick paste used heavily in greek and middle eastern dishes. it is very tasty with salad, grilled meats and pitta breads. ...
...and middle eastern dishes. ...
...And 4 more matches
TypeScript support in Svelte - Learn web development
any typescript features even without declaring variable types. availability of new and future javascript features: typescript transpiles many recent es6 features to plain old-school javascript, allowing you to use them even on user-agents that don't support them natively yet. typescript also has some disadvantages: not true static typing: types are only checked at compile time, and they are
removed from the generated code. steep learning curve: even though typescript is a superset of javascript and not a completely new language, there is a considerable learning curve, especially if you have no experience at all with static languages like java or c#. more code: you have to write and maintain more code. no replacement for automatic tests: even though types might help you catch several bug...
...f the todos.svelte component, so that it knows to use the type checking we have specified. we will get the following error: by now you should get an idea about the kind of assistance we can get from typescript when building svelte projects. now we will undo these changes in order to start porting our application to typescript, so we won't be bothered with all the validate warnings.
remove the flawed todo and the lang='ts' attribute from the todos.svelte file. also
remove the import of todotype and the lang='ts' from todo.svelte. we'll take care of them propertly, later on. porting our to-do list app to typescript now we are ready to start porting our to-list application to take advantage of all the features that typescript offers to us. let's start by running the validate sc...
...otype } from '../types/todo.type' export let todos: todotype[] = [] let todosstatus: todosstatus // reference to todosstatus instance $: newtodoid = todos.length > 0 ? ...
...And 4 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
ntname directive for listening to dom events. let's add a handler to the on:click event of the checkbox input to toggle the completed value. ...
...heckbox input to toggle the completed value. update the <input type="checkbox"> element inside src/components/todos.svelte as follows: <input type="checkbox" id="todo-{todo.id}" on:click={() => todo.completed = !todo.completed} checked={todo.completed} /> next we'll add a function to
remove a todo from our todos array. ...
.... update the <input type="checkbox"> element inside src/components/todos.svelte as follows: <input type="checkbox" id="todo-{todo.id}" on:click={() => todo.completed = !todo.completed} checked={todo.completed} /> next we'll add a function to
remove a todo from our todos array. at the bottom of the todos.svelte <script> section, add the
removetodo() function like so: function
removetodo(todo) { todos = todos.filter(t => t.id !== todo.id) } we'll call it via the delete button. ...
...And 4 more matches
DownloadList
a downloadlist object represents a collection of download objects that can be viewed and managed by the user interface, and persisted across sessions. a reference to a downloadlist object can be obtained using the downloads.getlist() function. ...
...ed and managed by the user interface, and persisted across sessions. a reference to a downloadlist object can be obtained using the downloads.getlist() function. method overview promise<array<download>> getall(); promise add(download adownload); promise
remove(download adownload); promise addview(object aview); promise
removeview(object aview); void
removefinished([optional] function afilterfn); methods getall() retrieves a snapshot of the downloads that are currently in the list. the returned array does not change when downloads are added or
removed, though the download objects it contains are still updated in real time. promise<array<download>> getall(); parameters none. promise resolves to...
...nge event is registered by the list, thus it cannot be used to monitor the download. to receive change notifications for downloads that are added to the list, use the addview() method to register for ondownloadchanged notifications. promise add( download adownload ); parameters adownload the download object to add. promise resolves to undefined when the download has been added.
remove()
removes a download from the list. if the download was already
removed, this method has no effect. promise
remove( download adownload ); parameters adownload the download object to
remove. promise resolves to undefined when the download has been
removed. addview() adds a view that will be notified of changes to downloads. the newly added view will receive ondownloadadded notif...
...And 4 more matches
Using the Places annotation service
names(aitem, count, result); retrieves a list of all the annotations on a given uri or id. c++ callers will want to use getpageannotationnamestarray which returns a com array, making memory management much easier and reducing the chance of leaks. pagehasannotation(auri, aname); itemhasannotation(aitemid, aname); returns true if the page/item has an annotation with the given name.
removepageannotation(auri, aname);
removeitemannotation(aitemid, aname);
removes a given annotation from a page/item.
removepageannotations(auri);
removeitemannotations(aitemid);
removes all the annotations from a given page/item. copypageannotations(asourceuri, adesturi, aoverwritedest); copyitemannotations(asourceitemid, adestitemid, aoverwritedest); copies all the annotations f...
...ifetime of annotations annotation expiration can be explicitly stated when the annotation is created. if no expiration is specified, the annotation is expired when the number of visits to the url is set to zero. valid values for expiration are: expire_with_history : default. annotations live as long as the uri is in history (eg: has >0 visits). expire_never : never expire. must be explictly
removed. expire_session :
removed at application exit. expire_days :
removed at 7 days. expire_weeks :
removed at 30 days. expire_months :
removed at 180 days. annotationservice.setpageannotation(uri, "my_extension/some_annotation", "this is the annotation value", 0, annotationservice.expire_never); annotation observers observers can also be added to the service to watch for changes to annota...
...n :
removed at application exit. expire_days :
removed at 7 days. expire_weeks :
removed at 30 days. expire_months :
removed at 180 days. annotationservice.setpageannotation(uri, "my_extension/some_annotation", "this is the annotation value", 0, annotationservice.expire_never); annotation observers observers can also be added to the service to watch for changes to annotations. to add or
remove an observer use the methods: addobserver(aobserver);
removeobserver(aobserver); where aobserver is an object implementing the nsiannotationobserver interface. ...
...And 4 more matches
nsIControllers
void appendcontroller( in nsicontroller controller ); parameters controller a controller to be added to the...
...void appendcontroller( in nsicontroller controller ); parameters controller a controller to be added to the list of controllers. exceptions thrown ns_error_out_of_memor...
...n by its order, rather than position, of insertion. nsicontroller getcontrollerbyid( in unsigned long controllerid ); parameters controllerid the id (insertion order) of a controller. return value the controller element that was inserted with that id. exceptions thrown ns_error_failure the id is greater than the number of controllers that have been inserted, or the controller has since been
removed. getcontrollercount() returns the current number of controllers. unsigned long getcontrollercount(); parameters none. return value the number of controllers currently in the list of controllers. getcontrollerforcommand() searches for a controller that supports the given command. nsicontroller getcontrollerforcommand( in string command ); parameters command the name of a command, e.g. cmd_c...
...And 4 more matches
nsIMessageListenerManager
1. ...
...gename, in nsimessagelistener listener, [optional] in boolean listenwhenclosed) void
removemessagelistener(in astring messagename, in nsimessagelistener listener); void addweakmessagelistener(in astring messagename, in nsimessagelistener listener); void
removeweakmessagelistener(in astring messagename, in nsimessagelistener listener); methods addmessagelistener() register listener to receive messagename. all listener callbacks for a particular message are invoked when that message is received. the message manager holds a strong reference to listener. if the same listener registers twice for the same message,...
...elistener listener, [optional] in boolean listenwhenclosed); parameters messagename a string indicating the name of the message to listen for. listener an nsimessagelistener to invoke when a message is received. see nsimessagelistener for details of the message syntax. ...
...And 4 more matches
Component; nsIPrefBranch
n 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 lockpref(in string aprefname); boolean prefhasuservalue(in string aprefname); boolean prefislocked(in string aprefname); void
removeobserver(in string adomain, in nsiobserver aobserver); void resetbranch(in string astartingat); void setboolpref(in string aprefname, in long avalue); void setcharpref(in string aprefname, in string avalue); requires gecko 58 void setstringpref(in string aprefname, in utf8string avalue); void setcomplexvalue(in string aprefname, in nsiidref atype, in n...
... does nothing if the prefbranch it is called on is a default branch. void clearuserpref( in string aprefname ); parameters aprefname the preference to be cleared. remarks note: prior to gecko 6.0, this method would throw an exception if there was no user value set for the specified preference. now, this method never throws. instead, it simply does nothing. deletebranch() called to
remove all of the preferences referenced by this branch. note: this method can be called on either a default or user branch but, in effect, always operates on both. void deletebranch( in string astartingat ); parameters astartingat the point on the branch at which to start the deleting preferences. pass in "" to
remove all preferences referenced by this branch. getboolpref() called to get t...
...sented using a standard boolean, integer or string value. void getcomplexvalue( in string aprefname, in nsiidref atype, [iid_is(atype), retval] out nsqiresult avalue ); parameters aprefname the complex preference to get the value of. atype the xpcom interface that this complex preference represents. interfaces currently supported are: nsilocalfile nsisupportsstring (unichar) (
removed as of gecko 58 in favor of getstringpref) nsipreflocalizedstring (localized unichar) nsifilespec (deprecated - to be
removed eventually) avalue the xpcom object into which to the complex preference value should be retrieved. getintpref() called to get the state of an individual integer preference. long getintpref( in string aprefname, [optional] in long adefaultvalue ); param...
...And 4 more matches
nsIXPConnect
void reparentscopeawarewrappers(in jscontextptr ajscontext, in jsobjectptr aoldscope, in jsobjectptr anewscope); obsolete since gecko 1.9.1 nsixpconnectjsobjectholder reparentwrappednativeiffound(in jscontextptr ajscontext, in jsobjectptr ascope, in jsobjectptr anewparent, in nsisupports acomobj); void restorewrappednativ...
...); parameters ajscontext missing description aobject missing description return value missing description exceptions thrown missing exception missing description native code only!getcowforobject obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. wrap a jsval in a chrome object wrapper. jsval getcowforobject( in jscontextptr ajscontext, in jsobjectptr aparent, in jsobjectptr awrappedobj ); parameters ajscontext a context to use to create objects. aparent the parent to create the wrapper with. awrappedobj the object to wrap. return value missing description exceptions thrown mis...
...ng description ascope missing description aclassinfo missing description return value missing description exceptions thrown missing exception missing description native code only!getwrapperforobject obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. returns an xpcnativewrapper, xpcsafejsobjectwrapper, or xpccrossoriginwrapper for the given object based on the principal, scope, and filename flags that are passed in. note: in c++, the out jsval parameter must already be a strong gc root. jsval getwrapperforobject( in jscontextptr ajscontext, in jsobjectptr aobject, in jsobjectptr ascope, in nsipr...
...And 4 more matches
FileSystemEntrySync - Web APIs
es and folders stored the origin of your app. method overview metadata getmetadata () raises (fileexception); filesystementrysync moveto (in directoryentrysync parent, optional domstring newname) raises (fileexception); filesystementrysync copyto(in directoryentrysync parent, optional domstring newname) raises (fileexception); domstring tourl(); void
remove() raises (fileexception); directoryentrysync getparent(); attributes attribute type description filesystem readonly filesystemsync the file system where the entry resides. fullpath readonly domstring the full absolute path from the root to the entry. an absolute path is a relative path from the root directory, prepended w...
...olcat.png. the file system url does not expire. because the method describes a location on disk, the url is valid for as long as that location exists. you can delete the file and recreate it, and it's all good. you can supply the mimetype to simulate the optional mime type header associated with http downloads. domstring tourl (); parameter none. ...
...hat location exists. you can delete the file and recreate it, and it's all good. you can supply the mimetype to simulate the optional mime type header associated with http downloads. domstring tourl (); parameter none. returns domstring exceptions none
remove() deletes a file or directory. you cannot delete an empty directory or the root directory of a file system. if you want to
remove an empty directory, use
removerecursively() instead. ...
...And 4 more matches
IDBObjectStoreSync - Web APIs
it may however be reintroduced in the future if there is enough demand from web developers. the idbobjectstoresync interface of the indexeddb api provides synchronous access to an object store of a database. ...
... keypath readonly domstring the key path of this object store. if this attribute is set ...
... keypath readonly domstring the key path of this object store. if this attribute is set to null, then the application must provide a key for each modific...
...And 4 more matches
delete operator - JavaScript
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax delete expression where expression should evaluate to a property reference, e.g.: delete object.property delete object['property'] parameters object the name of an object, or an expression evaluating to an object. property the property to delete. ...
... throws typeerror in strict mode if the property is an own non-configurable property. description unlike what common belief suggests (perhaps due to other programming languages like delete in c++), the delete operator has nothing to do with directly freeing memory. memory management is done indirectly via breaking references. see the memory management page for more details. the delete operator
removes a given property from an object. on successful deletion, it will return true, else false will be returned. however, it is important to consider the following scenarios: if the property which you are trying to delete does not exist, delete will not have any effect and will return true. if a property with the same name exists on the object's prototype chain, then, after deletion, the object w...
...s scope. as such, delete cannot delete any functions in the global scope (whether this is part from a function definition or a function expression). functions which are part of an object (apart from the global scope) can be deleted with delete. any property declared with let or const cannot be deleted from the scope within which they were defined. non-configurable properties cannot be
removed. this includes properties of built-in objects like math, array, object and properties that are created as non-configurable with methods like object.defineproperty(). the following snippet gives a simple example: var employee = { age: 28, name: 'abc', designation: 'developer' } console.log(delete employee.name); // returns true console.log(delete employee.age); // returns true // ...
...And 4 more matches
Communicating using "port" - Archive of obsolete content
) {" + " window.alert(message);" + "})"; tabs.on("ready", function(tab) { worker = tab.attach({ contentscript: alertcontentscript }); worker.port.emit("alert", "message from the add-on"); }); tabs.open("http://www.mozilla.org"); in total, the port object defines four functions: emit(): emit a message. on(): listen to a message.
removelistener(): stop listening to a message. once(): listen to only the first occurrence of a message. accessing port accessing port in the content script note that the global self object is completely different from the self module, which provides an api for an add-on to access its data files and id. in the content script the port object is available as a property of the global self object. thu...
...this takes the same two parameters as port.on(): the name of the message, and the name of the listener function. this example uses the action button api, which is only available from firefox 29 onwards. for example, here's an add-on that creates a page-worker and a b...
...lemymessage(mymessagepayload) { // handle the message }); in the main add-on code (in this case a panel instance), to listen for "mymessage" sent from a a content script: panel.port.on("mymessage", function handlemymessage(mymessagepayload) { // handle the message }); port.
removelistener() you can use port.on() to listen for messages. to stop listening for a particular message, use port.
removelistener(). this takes the same two parameters as port.on(): the name of the message, and the name of the listener function. this example uses the action button api, which is only available from firefox 29 onwards. for example, here's an add-on that creates a page-worker and a button. the page-worker loads http://en.wikipedia.org/wiki/chalk alongside a content script "listener.js". the button ...
...And 3 more matches
Working with Events - Archive of obsolete content
then we open two tabs. var tabs = require("sdk/tabs"); function l...
... then we open two tabs. var tabs = require("sdk/tabs"); function listener1() { cons...
...on() method: var button = require("sdk/ui/button/action").actionbutton({ id: "visit-mozilla", label: "visit mozilla", icon: "./icon-16.png" }); button.on("click", function() { require("sdk/tabs").open("https://developer.mozilla.org/"); }); removing event listeners event listeners can be
removed by calling
removelistener(type, listener), supplying the type of event and the listener to
remove. the listener must have been previously been added using one of the methods described above. ...
...And 3 more matches
widget - Archive of obsolete content
the widget api is deprecated from firefox 29 onwards. please see the ui module for replacements. in particular, for a simple button, try the action button or toggle button apis, and for a more complex widget try the toolbar or sidebar apis. create a simple user interface for an add-on in firefox's add-on bar. usage "widgets" are small pieces of content that live in the firefox 4 add-on bar. they can be simple icons or complex web pages. you can attach panels to them that open when they're clicked, or you can define a custom click handler to perform some other action, like opening a web page in a tab. there are a few advantages to using widgets over an ad hoc user interface. ...
... = function() { addon.port.emit("stop"); } } next, add a script tag to reference "button-script.js", and call its init() function on load: <html> <head> <script src="button-script.js"></script> </head> <body onload="init()"> <img src="play.png" id="play-button"> <img src="pause.png" id="pause-button"> <img src="stop.png" id="stop-button"> </body> </html> finally,
remove the line attaching the content script from "main.js": const widgets = require("sdk/widget"); const data = require("sdk/self").data; var player = widgets.widget({ id: "player", width: 72, label: "player", contenturl: data.url("buttons.html") }); player.port.emit("init"); player.port.on("play", function() { console.log("playing"); }); player.port.on("pause", function() { console.lo...
...has been loaded, at the time the window.onload event fires this property is optional and defaults to "end". contentscriptoptions object read-only value exposed to content scripts under self.options property. any kind of jsonable value (object, array, string, etc.) can be used here. optional. widget represents a widget object. methods destroy()
removes the widget from the add-on bar. postmessage(data) sends a message to the widget's content scripts. parameters data : value the message to send. the message can be any json-serializable value. on(type, listener) registers an event listener with the widget. parameters type : string the type of event to listen for. listener : function the listener function that handles the event. remov...
...And 3 more matches
content/mod - Archive of obsolete content
.attachto; var style = require("sdk/stylesheet/style").style; var style = style({ source: "div { border: 4px solid gray }" }); // assuming window points to the content page we want to modify attachto(style, window); parameters modification : object the modification we want to apply to the target. window : nsidomwindow the window to be modified. ...
...iv { border: 4px solid gray }" }); // assuming window points to the content page we want to modify attachto(style, window); parameters modification : object the modification we want to apply to the target. window : nsidomwindow the window to be modified. detachfrom(modification, window) function
removes attached modification from a given window. if window is not specified, modification is
removed from all the windows it's being attached to. ...
...y attachto(style, window); parameters modification : object the modification we want to apply to the target. window : nsidomwindow the window to be modified. detachfrom(modification, window) function
removes attached modification from a given window. if window is not specified, modification is
removed from all the windows it's being attached to. for example, the following code applies and
removes a style to a content window, adding a border to all divs in page: var { attachto, detachfrom } = require("sdk/content/mod"); var style = require("sdk/stylesheet/style").style; var style = style({ source: "div { border: 4px solid gray }" }); // assuming window points to the content page we want to modify attachto(style, window); // ... detachfrom(style, window); parameters modification : o...
...And 3 more matches
places/bookmarks - Archive of obsolete content
create, modify, and retrieve bookmarks. usage this module exports: three constructors: bookmark, group, and separator, corresponding to the types of objects, referred to as bookmark items, in the bookmarks database in firefox two additional functions, save() to create, update, and
remove bookmark items, and search() to retrieve the bookmark items that match a particular set of criteria. save() and search() are both asynchronous functions: they synchronously return a placesemitter object, which then asynchronously emits events as the operation progresses and completes. each retrieved bookmark item represents only a snapshot of state at a specific time. the module does not automatically sync up a bookmark instance with ongoing changes to that item in the database from the same add-on, ...
...eted. adding items: if passing in freshly instantiated bookmark items or a duck-typed object, the item is created on the platform. updating items: for an item referenced from a previous save() or from the result of a search() query, changing the properties and calling save() will update the item on the server. deleting items: to delete a bookmark item, pass in a bookmark item with a property
remove set to true. the function returns a placesemitter that emits a data event for each item as it is saved, and an end event when all items have been saved. let { bookmark, group } = require("sdk/places/bookmarks"); let mygroup = group({ title: "my group" }); let mybookmark = bookmark({ title: "moz", url: "http://mozilla.com", group: mygroup }); save(mybookmark).on("data", function (item, ...
...te from the platform. invoked with two arguments, mine and platform, where mine is the item that is being saved, and platform is the current state of the item on the item. the object returned from this function is what is saved on the platform. by default, all changes on an outdated bookmark item overwrite the platform's bookmark item. returns placesemitter : returns a placesemitter. ...
...And 3 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
.jsm, you'll do so via privileged javascript code like this: components.utils.import("resource://gre/modules/services.jsm"); from here on out, it is assumed you've imported services.jsm somewhere at the top of whatever file you're in and will be using it in all code examples. the examples will also assume that you know how to properly add instructions to your add-on's chrome.manifest to add and
remove resource, chrome, locale, & etc. mappings, so that you can access your files with custom paths such as: resource://myaddon/filename.ext chrome://myaddon/content/filename.ext step 2: no more resource:// uris for files internal to your bundle unfortunately, resource mappings in your chrome.manifest were not usable in restartless add-ons until mozilla finally fixed this bug in firefox 38, which l...
...ust the static file contents, not any loaded script/data). step 2a: load your jsm from chrome:// now with that preface out of the way, this part is easy: drop support for firefox 3.x if you haven't already, move your jsm files to wherever you've got your chrome mapping to for your xul overlay and/or windows, import your files from that new chrome mapped path instead of the old resource one, and
remove your "resource" line from your chrome.manifest file. it's probably a good idea to do this even if you aren't going fully restartless / extractionless due to the previously mentioned exposure to content of resource mappings. also, drop support for firefox 4 through 9 while you're at it. prior to firefox 10, the chrome.manifest file you rely on wasn't loaded automatically for restartless add-ons. ...
...elements you need to create for your add-on to add your interface, where it needs to go into a xul window, and how to do it. docs: document.getelementbyid(), document.createelement(), element reference, node reference (dom elements are also nodes). you'll need to write two functions. one to take a xul window object and then create and add your elements, and then another to find your elements and
remove them from the window object. the former will need to be run on add-on startup and the later on add-on shutdown. until you get your bootstrap.js running you should use a basic overlay onto the xul window with an event listener for "load" to catch overlay load and then run your manual ui construction function. step 6a. details on adding elements dynamically to chrome xul window there is a way tha...
...And 3 more matches
findbar - Archive of obsolete content
open( mode ) return type: no return value opens the findb...
... open( mode ) return type: no return value opens the findbar using the specif...
... open( mode ) return type: no return value opens the findbar using the specified mode, which should ...
...And 3 more matches
Index - Archive of obsolete content
no summary! 305 query.type xul attributes, xul reference no summary! 306 querytype xul attributes, xul reference no summary! 307 readonly xul attributes, xul reference no summary! 308 ref xul attributes, xul reference no summary! 309 rel xul attributes, xul reference no summary! 311
removeelement xul attributes, xul reference no summary! 312 reserved dom, deprecated, events no summary! 313 resizeafter xul attributes, xul reference no summary! 314 resizebefore xul attributes, xul reference no summary! 315 resizer.dir xul attributes, xul reference no summary! 316 resizer.element ...
... 549 preferenceforelement xul methods, xul reference no summary! 550 reload xul methods, xul reference no summary! 551 reloadalltabs xul methods, xul reference no summary! 552 reloadtab xul methods, xul reference no summary! 553 reloadwithflags xul methods, xul reference no summary! 554
removeallitems xul methods, xul reference no summary! 555
removeallnotifications xul methods, xul reference no summary! 556
removealltabsbut xul methods, xul reference no summary! 557
removecurrentnotification xul methods, xul reference no summary! 558
removecurrenttab xul methods, xul reference no summary! ...
... xul methods, xul reference no summary! 555
removeallnotifications xul methods, xul reference no summary! 556
removealltabsbut xul methods, xul reference no summary! 557
removecurrentnotification xul methods, xul reference no summary! 558
removecurrenttab xul methods, xul reference no summary! 559
removeitemat xul methods, xul reference no summary! 560
removeitemfromselection xul methods, xul reference no summary! 561
removenotification xul methods, xul reference no summary! 562
removeprogresslistener xul methods, xul reference no summary! ...
...And 3 more matches
PopupEvents - Archive of obsolete content
without first opening the parent menu. ...
...nction is called. within this function, a popupshown event listener is attached to the 'file' menu using the addeventlistener method. this will cause the filemenuopened function to be called when the popupshown event is fired on the 'file' menu. the filemenuopened function first checks that the target of the event is the right popup and returns early if not. ...
...the popuphiding event is fired regardless of how the popup was hidden, whether because the user selected an item from a menu, or if the user clicked outside the popup, or if the user pressed escape to cancel the menu. ...
...And 3 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
<!-- calendar --> <rdf:li> <rdf:seq about="chrome://calendar/content/calendar.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> </rdf:seq> </rdf:rdf> optionally customize the file by changing the displayname, description and author attributes. change the text between double-quote characters on those three lines. optionally
remove the sections for toolbars where you do not want your button. save the file. explanation: this file contains details of your extension, and specifies how it modifies seamonkey. 6. create a plain text file named button.xul. copy the following content, making sure that you scroll to get all of it. paste it into the new file: <?xml version="1.0" encoding="utf-8"?> <?xml-stylesh...
...10"/> </toolbar> <!-- button details --> <toolbarbutton id="custom-button-1" label="custom" tooltiptext="my custom toolbar button" oncommand="custombutton[1]()" class="toolbarbutton-1 custombutton" /> </overlay> optionally customize the file by changing the label, accesskey and tooltiptext attributes. change the text between double-quote characters on those lines. optionally
remove the sections for toolbars that you do not need. save the file. explanation: this xul file adds the button to the toolbars. it also links to the stylesheet and javascript code that the button uses. the last section specifies details of the button. 7. create a plain text file named button.css. copy the following content, making sure that you scroll to get all of it. paste it into th...
...(if you leave both sections in the file, then your button's appearance will match the classic theme.) save the file. explanation: this css stylesheet specifies how the button is diaplayed. it links to the button image, specifying the dimensions of the six parts of the image. 8. create a pl...
...And 3 more matches
Manipulating Lists - Archive of obsolete content
n label="add" oncommand="additem();"/> the appenditem() takes two arguments, the label, in this case 'thursday', and a value 'thu'. the two arguments correspond to the label attribute and the value attribute on the listitem element. the value is used only as an extra optional value associated with an item which you might wish to use in a script. similarly, there is also an insertitemat() and a
removeitemat() function which inserts a new item and
removes an existing item respectively. the syntax is as follows: list.insertitemat(3, "thursday", "thu"); list.
removeitemat(3); the insertitemat() function takes an additional argument, the position to insert the new item. the new item is inserted at this index, so, in the example, the new item will be added at position 3 while the item previously ...
... these three methods are also available for several other xul elements and work in the same manner. in fact, these methods are part of the nsidomxulselectcontrolelement interface so any xul elements which implement this interface have these methods. ...
... these three methods are also available for several other xul elements and work in the same manner. in fact, these methods are part of the nsidomxulselectcontrolelement interface so any xul elements which implement this interface have these methods. this includes the menulist, radiogroup and tabs elements. ...
...And 3 more matches
columns - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... ...
... ...
...And 3 more matches
grid - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... ...
... ...
...And 3 more matches
menuitem - Archive of obsolete content
persist its value via the persist attribute, mozilla will fail to persist its value when the menuitem is unchecked because of bug 15232. a workaround is to set the autocheck attribute to false, then programmatically set the checked attribute when the user selects the item, and set it to false instead of removing the attribute (i.e. do menuitem.setattribute("checked", "false") instead of menuitem.
removeattribute("checked")) when the user unchecks the menuitem, as a value of false will both correctly hide the checkmark and persist its hidden state. command type: id set to the id of a command element that is being observed by the element. closemenu type: one of the values below indicates if the menu closes when the menuitem is activated. auto this, the default value if th...
...specify the image using the image attribute. menuitem-non-iconic normally, menuitems have a margin to t...
...specify the image using the image attribute. menuitem-non-iconic normally, menuitems have a margin to the left for an imag...
...And 3 more matches
row - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... ...
... ...
...And 3 more matches
rows - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... ...
... ...
...And 3 more matches
separator - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
...these classes should be used instead of changing the style of the element directly since they will fit more naturally with th...
...these classes should be used instead of changing the style of the element directly since they will fit more naturally with the user's selected t...
...And 3 more matches
<statusbarpanel> - Archive of obsolete content
refer to the add-on bar. an individual element of a statusbar. this is a special type of button which is drawn differently. unlike normal buttons, a statusbarpanel can only have a label or an image but not both. this element is often used with a short label or icon to indicate status, for instance whether the user is online or whether there are new messages. ...
...these classes should be used instead of changing the style of the element directly since they will fit more naturally with th...
...these classes should be used instead of changing the style of the element directly since they will fit more naturally with the user's selected t...
...And 3 more matches
tab - Archive of obsolete content
oncommand type: script code this event handler is called when the command is activated. this occurs when a user selects a menu item or presses a keyboard shortcut attached to the command. pending type: boolean this attribute is set to true if the tab is currently in the process of being restored by the session store service. once the tab is restored, this attribute is
removed. you can determine if a tab is being restored by checking to see if hasattribute("pending") is true. if the user has turned on the "don't load tabs until selected" preference, the pending attribute is set on tabs until they get loaded. pinned type: boolean this attribute is set to true if the tab has been pinned (that is, if it's an app tab). the tabbrowser element's pintab and unpintab me...
... also, "unhiding" a tab leads to unpredictable ordering of the tabs. see bug 307088 and bug ...
... also, "unhiding" a tab leads to unpredictable ordering of the tabs. see bug 307088 and bug 261826. use collaps...
...And 3 more matches
tabpanel - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... ...
... ...
...And 3 more matches
tabpanels - Archive of obsolete content
selectedindex type: integer returns the index of the currently selected item. you may select an item by assigning its in...
... ...
... ...
...And 3 more matches
textbox - Archive of obsolete content
below how the text box handles pastes with newlines in them. possible values: pasteintact paste newlines unchanged pastetofirst paste text up to the first newline, dropping the rest of the text replacewithcommas pastes the text with the newlines replaced with commas replacewithspaces pastes the text with newlines replaced with spaces strip pastes the text with the newlines
removed stripsurroundingwhitespace pastes the text with newlines and adjacent whitespace
removed onblur type: script code this event is sent when a textbox loses keyboard focus. note: the behavior of this event has evolved over time. prior to gecko 1.9 (firefox 3), the script code would execute in the context of the anonymous html <input> element inside the textbox binding. from gecko 1.9 t...
...these classes should be used instead of changing the style of the element directly since they will fit more naturally with th...
...these classes should be used instead of changing the style of the element directly since they will fit more naturally with the user's selected t...
...And 3 more matches
toolbox - Archive of obsolete content
customtoolbarcount firefox only type: integer the number of custom toolbars currently within the toolbox. exte...
...you can supply a comma-separated list of toolbar item ids a...
...you can supply a comma-separated list of toolbar item ids as the second argume...
...And 3 more matches
tree - Archive of obsolete content
which the user may use to show and hide columns. when set to true, the column picker will be hidden. the default value is false. onselect type: script code this event is sent to a tree when a row is selected, or whenever the selection changes. the user can select multiple rows by holding down shift or control and clicking on a row. the onselect event will be sent for each item added to or
removed from the selection. rows type: integer the number of rows to display in the element. if the element contains more than this number of rows, a scrollbar will appear which the user can use to scroll to the other rows. to get the actual number of rows in the element, use the getrowcount method. seltype type: one of the values below used to indicate whether multipl...
...the tree ...
...the tree view's nsitreeview.
...And 3 more matches
treecols - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, control...
... interfaces nsiaccessibleprovider ...
... interfaces nsiaccessibleprovider ...
...And 3 more matches
treerow - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... ...
... ...
...And 3 more matches
treeseparator - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... ...
... ...
...And 3 more matches
RDF in Mozilla FAQ - Archive of obsolete content
he url! for this reason, there is an observer interface that allows you to spy on a datasource's progress. the following code illustrates its usage: // this is the object that will observe the rdf/xml load's progress var observer = { onbeginload: function(asink) {}, oninterrupt: function(asink) {}, onresume: function(asink) {}, onendload: function(asink) { asink.
removexmlsinkobserver(this); alert("done!"); }, onerror: function(asink, astatus, aerrormsg) { alert("error! " + aerrormsg); } }; // get the rdf service var rdf = components .classes["@mozilla.org/rdf/rdf-service;1"] .getservice(components.interfaces.nsirdfservice); // get the datasource. var ds = rdf.getdatasource("http://www.mozilla.org/some-rdf-file.rdf"); // now see if it's lo...
...loaded, but it's loading now!"); // rdf/xml datasources are all nsirdfxmlsinks var sink = ds.queryinterface(components.interfaces.nsirdfxmlsink); // attach the observer to the datasource-as-sink sink.addxmlsinkobserver(observer); // now observer's methods will be called-back as // the load progresses. } note that the observer will remain attached to the rdf/xml datasource unless
removexmlsinkobserver is called. how do i access the information in a datasource? the nsirdfdatasource interface is the means by which you access and manipulate the assertions in a datasource. boolean hasassertion(asource, aproperty, atarget, atruthvalue). this tests the datasource to see if it has the specified tuple. nsirdfnode gettarget(asource, aproperty, atruthvalue). nsisimpleenumerator g...
...getsource(aproperty, atarget, atruthvalue). nsisimpleenumerator getsources(aproperty, atarget, atruthvalue). nsisimpleenumerator arclabelsin(atarget). nsisimpleenumerator arclabelsout(asource). you can also use the rdf container interfaces to access information contained in rdf containers. how do i change information in the datasource? to use 'assert' to add one assertion and 'unassert' to
remove one. refer to mozilla rdf back end architecture ds.assert(homepage, fv_quality, value, true); ds.unassert(homepage, fv_quality, value, true); how do i save back changes to an rdf/xml datasource? an rdf/xml datasource can be queryinterface()'d to nsirdfremotedatasource. this interface has a flush() method, which will attempt to write the contents of the datasource back to the url from which th...
...And 3 more matches
Advanced form styling - Learn web development
input { -webkit-appearance: none; appearance: none; } note: it is a good idea to always include both declarations — prefixed and unprefixed — when using a prefixed property. prefixed usually means "work in progress", so in the future browser vendors may come to a consensus to drop the prefix. the above code is good for future-proofing against such an eventuality.
... progress", so in the future browser vendors may come to a consensus to drop the prefix. the above code is good for future-proofing against such an eventuality. the following live example shows you what they look like in your system — default on the left, and with the above css applied on the right (find it here also if you want to test it on other systems). in most cases, the effect is to
remove the stylized border, which makes css styling a bit easier, but isn't really essential. in a couple of cases — search and radio buttons/checkboxes, it becomes way more useful. we'll look at those now. taming search boxes <input type="search"> is basically just a text input, so why is appearance: none; useful here? the answer is that in chromium-based browsers on macos, search boxes have some s...
... field also fixes this problem, as it disables or "breaks" the aqua appearance too. the following styled search doesn't have appearance: none; applied, but it doesn't suffer from the same problem in macos chrome as the previous example. note: you may have noticed that in the search field, the "x" delete icon disappears when the input loses focus in edge and chrome, but stays put in safari. to
remove via css, you can use input[type="search"]::-webkit-search-cancel-button { display: none; }. however, this seems to get rid of the icon with focus too, with no apparent way to get it back. styling checkboxes and radio buttons styling a checkbox or a radio button is tricky by default. the sizes of check boxes and radio buttons are not meant to be changed with their default designs, and browsers ...
...And 3 more matches
Client-side storage - Learn web development
m('name','chris'); the storage.getitem() method takes one parameter — the name of a data item you want to retrieve — and returns the item's value. now type these lines into your javascript console: let myname = localstorage.getitem('name'); myname upon typing in the second line, you should see that the myname variable now contains the value of the name data item. the storage.
removeitem() method takes one parameter — the name of a data item you want to
remove — and
removes that item out of web storage. type the following lines into your javascript console: localstorage.
removeitem('name'); let myname = localstorage.getitem('name'); myname the third line should now return null — the name item no longer exists in the web storage. the data persists! one key feat...
...nameinput.value); // run namedisplaycheck() to sort out displaying the // personalized greetings and updating the form display namedisplaycheck(); }); at this point we also need an event handler to run a function when the "forget" button is clicked — this is only displayed after the "say hello" button has been clicked (the two form states toggle back and forth). ...
...) to sort out displaying the // personalized greetings and updating the form display namedisplaycheck(); }); at this point we also need an event handler to run a function when the "forget" button is clicked — this is only displayed after the "say hello" button has been clicked (the two form states toggle back and forth). ...
...And 3 more matches
Arrays - Learn web development
prerequisites: basic computer literacy, a basic understanding of html and css, an understanding of what javascript is. ...
...,bella,slugger adding and removing array items we've not yet covered adding and removing array items — let us look at this now. we'll use the myarray array we ended up with in the last section. if you've not already followed that section, create the array first in your console: let myarray = ['manchester', 'london', 'liverpool', 'birmingham', 'leeds', 'carlisle']; first of all, to add or
remove an item at the end of an array we can use push() and pop() respectively. let's use push() first — note that you need to include one or more items that you want to add to the end of your array. try this: myarray.push('cardiff'); myarray; myarray.push('bradford', 'brighton'); myarray; the new length of the array is returned when the method call completes. if you wanted to store the new ...
...ay.push('bradford', 'brighton'); myarray; the new length of the array is returned when the method call completes. if you wanted to store the new array length in a variable, you could do something like this: let newlength = myarray.push('bristol'); myarray; newlength; removing the last item from the array is as simple as running pop() on it. try this: myarray.pop(); the item that was
removed is returned when the method call completes. to save that item in a new variable, you could do this: let
removeditem = myarray.pop(); myarray;
removeditem; unshift() and shift() work in exactly the same way as push() and pop(), respectively, except that they work on the beginning of the array, not the end. first unshift() — try the following commands: myarray.unshift('edinburgh'); m...
...And 3 more matches
Performance
oat blood rains from the sky sendasyncmessage('my-addon:paragraph-count', {num: content.document.queryselectorall('p').length}) } addmessagelistener("my-addon:request-from-parent", onlyonceinabluemoon) better: // addon.js function ontoolbarbutton(event) { let tabmm = gbrowser.mcurrentbrowser.frameloader.messagemanager; let button = event.target; let callback = (message) => { tabmm.
removemessagelistener("my-addon:paragraph-count", callback) decoratebutton(button, message.data.num) } tabmm.addmessagelistener("my-addon:paragraph-count", callback); tabmm.loadframescript("data:,sendasyncmessage('my-addon:paragraph-count', {num: content.document.queryselectorall('p').length})", false) } function decoratebutton(button, count) { // do stuff with result } this executes the ...
...it off and on will load to unload/reload events. not handling those properly can lead to duplicate or conflicting code execution, especially when messages are sent. it can also lead to conflicts between the old and new code. under some circumstances it may even cause exceptions when attempting to register something twice under the same id. ...
...lead to duplicate or conflicting code execution, especially when messages are sent. it can also lead to conflicts between the old and new code. under some circumstances it may even cause exceptions when attempting to register something twice under the same id. ...
...And 3 more matches
Download
tions. this object is transient, though it can be included in a downloadlist so that it can be managed by the user interface and persisted across sessions. a new download object can be created using the downloads.createdownload() function. method overview promise start(); promise launch(); promise showcontainingdirectory(); promise cancel(); promise
removepartialdata(); promise whensucceeded(); promise finalize([optional] boolean a
removepartialdata); properties attribute type description canceled read only boolean indicates that the download has been canceled. this property can become true, then it can be reset to false when a canceled download is restarted. this property becomes tr...
...e retained, to use when restarting a failed or canceled download. the default is false. whether partial data can actually be retained depends on the saver and the download source, and may not be known before the download is started. to have any effect, this property must be set before starting the download. resetting this property to false after the download has already started will not
remove any partial data. note: if this property is set to true, care should be taken that partial data is
removed before the reference to the download is discarded. this can be done using the
removepartialdata() or the finalize() methods. methods start() starts the download for the first time, or restarts a download that failed or has been canceled. calling this method when the downlo...
...no effect, and the method returns a resolved promise. this behavior is designed for the case where the call to cancel happens asynchronously, and is consistent with the case where the cancellation request could not be processed in time. promise cancel(); parameters none. promise resolves to undefined when the cancellation process has finished. promise can be rejected with never rejected.
removepartialdata()
removes any partial data kept as part of a canceled or failed download. if the download is not canceled or failed, this method has no effect, and it returns a resolved promise. if the cancel() method was called but the cancellation process has not finished yet, this method waits for the cancellation to finish, then
removes the partial data. after this method has been called, if th...
...And 3 more matches
Python binding for NSS
cated elements of the python-nss api are marked with python deprecation warnings as well as being documented in the nss module documentation. as of python 2.7 deprecation warnings are no longer reported by default. it is suggested python developers using python-nss periodically run their code with deprecation warnings enabled. depercated elements will persist for a least two releases before being
removed from the api entirely. project history red hat utilizes both nss and python in many of it's projects, however it was not previously possible to call nss directly from python. to solve this problem red hat generously funded the initial development of python-nss as well as it's continued maintenance. red hat following it's open source philosophy has contributed the source to the mozilla securit...
...se date 2016-09-01 scm tag pynss_release_1_0_0 source download https://ftp.mozilla.org/pub/mozilla.org/security/python-nss/releases/pynss_release_1_0_0/src/ change log official 1.0.0 release, only minor tweaks from the 1.0.0beta1 release. allow custom include root in setup.py as command line arg. add tls chacha20 poly1305 constants.
remove checks for whether a socket is open for reading. it's not possible for the binding to know in all cases, especially if the socket is created from an xternal socket passed in. the following module functions were added: nss.get_all_tokens the following constants were added: ssl.tls_ecdhe_rsa_with_chacha20_poly1305_sha256 ssl.tls_ecdhe_ecdsa_...
...ssl_version_from_major_minor ssl.get_default_ssl_version_range ssl.get_supported_ssl_version_range ssl.set_default_ssl_version_range ssl.ssl_library_version_from_name ssl.ssl_library_version_name ssl.get_cipher_suite_info ssl.ssl_cipher_suite_name ssl.ssl_cipher_suite_from_name the following deprecated module functions were
removed: ssl.nssinit ssl.nss_ini ssl.nss_shutdown the following classes were added: sslciphersuiteinfo sslchannelinfo the following class methods were added: certificate.trust_flags certificate.set_trust_attributes sslsocket.set_ssl_version_range sslsocket.get_ssl_version_range ...
...And 3 more matches
JSClass.flags
hat the mark hook implements the new jstraceop signature instead of the old jsmarkop signature. this is recommended for all new code that needs custom marking. spidermonkey reserves a few other flags for its internal use. they are jsclass_is_anonymous, jsclass_is_global, jsclass_is_proxy, and jsclass_has_cached_proto. jsapi applications should not use these flags. ...
...ature instead of the old jsmarkop signature. this is recommended for all new code that needs custom marking. spidermonkey reserves a few other flags for its internal use. they are jsclass_is_anonymous, jsclass_is_global, jsclass_is_proxy, and jsclass_has_cached_proto. jsapi applications should not use these flags. ...
...e. this is recommended for all new code that needs custom marking. spidermonkey reserves a few other flags for its internal use. they are jsclass_is_anonymous, jsclass_is_global, jsclass_is_proxy, and jsclass_has_cached_proto. jsapi applications should not use these flags. ...
...And 3 more matches
JS_AddFinalizeCallback
cb jsfinalizecallback pointer to the new callback function to use. data void * passed to data parameter for jsfinalizecallback. ...
... cb jsfinalizecallback pointer to the new callback function to use. data void * passed to data parameter for jsfinalizecallback. ...
... name description jsfinalize_group_start called when preparing to sweep a group of compartments, before anything has been swept. the collector will not yield to the mutator before calling the callback with jsfinalize_group_end status. jsfinalize_group_end called when preparing to sweep a group of compartments. weak references to unmarked things have been
removed and things that are not swept incrementally have been finalized at this point. the collector may yield to the mutator after this point. jsfinalize_collection_end called at the end of collection when everything has been swept. description js_addfinalizecallback add a callback function which the garbage collector calls at several points during garbage collection. rt is the runt...
...And 3 more matches
nsIContentPrefService
iew void addobserver(in astring aname, in nsicontentprefobserver aobserver); nsivariant getpref(in nsivariant agroup, in astring aname, [optional] in nsicontentprefcallback acallback); nsipropertybag2 getprefs(in nsivariant agroup); nsipropertybag2 getprefsbyname(in astring aname); boolean haspref(in nsivariant agroup, in astring aname); void
removegroupedprefs(); void
removeobserver(in astring aname, in nsicontentprefobserver aobserver); void
removepref(in nsivariant agroup, in astring aname); void
removeprefsbyname(in astring aname); void setpref(in nsivariant agroup, in astring aname, in nsivariant avalue); attributes attribute type description dbconnection mozistorage...
...specified uri. specify null to check for the preference in the global preference space; those preferences apply to all sites. aname the name of the preference whose existence is to be determined. return value true if the preference exists; otherwise false. exceptions thrown ns_error_illegal_value if agroup is not a string, nsiuri, or null. ...
...y null to check for the preference in the global preference space; those preferences apply to all sites. aname the name of the preference whose existence is to be determined. return value true if the preference exists; otherwise false. exceptions thrown ns_error_illegal_value if agroup is not a string, nsiuri, or null. or if aname is null or an empty string
removegroupedprefs()
remove all grouped prefs. useful for removing references to the sites the user has visited when the user clears their private data. void
removegroupedprefs();
removeobserver()
removes an observer that's presently monitoring a preference for changes. void
removeobserver( in astring aname, in nsicontentprefobserver aobserver ); parameters aname the name of the preference to stop observing. ...
...And 3 more matches
nsIDOMWindowUtils
t aleftsize, in boolean aignorerootscrollframe, in boolean aflushlayout); void processupdates(); obsolete since gecko 13.0 void purgepccounts(); unsigned long redraw([optional] in unsigned long acount); void renderdocument(in nsconstrect arect, in pruint32 aflags, in nscolor abackgroundcolor, in gfxcontext athebescontext); native code only! ...
...this state is not the same as ime-mode: disabled. ime_status_enabled 1 users can use all functions of ime. this state is same as ime-mode: normal. ime_status_password 2 users cannot use most ime functions. on gtk2, users can use "simple ime" which only supports...
...s set, the selection is set from aoffset + alength to aoffset. select_character 0 select_cluster 1 select_word 2 select_line 3 select_beginline 4 select_endline 5 select_paragraph 6 select_wordnospace 7 agent_sheet 0 a possible type of a style sheet loaded/
removed with loadsheet()/
removesheet(). see css2 specification for details. user_sheet 1 a possible type of a style sheet loaded/
removed with loadsheet()/
removesheet(). see css2 specification for details. author_sheet 2 a possible type of a style sheet loaded/
removed with loadsheet()/
removesheet(). see css2 specification for details. methods activatenativemenuite...
...And 3 more matches
nsIHttpServer
ihttpserverstoppedcallback callback); /** * associates the local file represented by the string file with all requests * which match request. * * @param path * the path which is to be mapped to the given file; must begin with "/" and * be a valid uri path (i.e., no query string, hash reference, etc.) * @param file * the file to serve for the given path, or null to
remove any mapping that * might exist; this file must exist for the lifetime of the server */ void registerfile(in string path, in nsifile file); /** * registers a custom path handler. * * @param path * the path on the server (beginning with a "/") which is to be handled by * handler; this path must not include a query string or hash component; it * also should usual...
... * * @param prefix ...
...x handler. * * @param prefix * the path on the server (beginning and ending with "/") which is to be * handled by handler; this path must not include a query string or hash * component. all requests that start with this prefix will be directed to * the given handler. ...
...And 3 more matches
nsILoginManagerStorage
read only. methods addlo...
...read only. methods addlogin() called by the login ...
...propertybag, only the properties specified in the nsipropertybag are changed in oldlogin and its corresponding nsiloginmetainfo. void modifylogin( in nsilogininfo oldlogin, in nsisupports newlogindata ); parameters oldlogin the login to be modified. newlogindata the login information to replace the oldlogin with. this may be specified as either an nsilogininfo or an nsipropertybag2 object. ...
...And 3 more matches
nsIMsgDatabase
rtdate, in prtime enddate, in nsmsgkeyarrayptr markedids); native code only! void deletemessages(in nsmsgkeyarrayptr nsmsgkeys, in nsidbchangelistener instigator); native code only! ...
... void listallofflinedeletes(in nsmsgkeyarrayptr offlinedeletes); native code only! void listallofflinemsgs(in nsmsgkeyarrayptr offlinemsgs); native code only! void setattributesonpendinghdr(in nsimsgdbhdr pendinghdr, in strin...
...s opened), but the summary file is missing. forcefolderdbclosed() void forcefolderdbclosed(in nsimsgfolder afolder); parameters afolder close() void close(in boolean aforcecommit); parameters aforcecommit commit() void commit(in nsmsgdbcommit committype); parameters committype forceclosed() force closed is evil, and we should see if we can do without it. in 4.x, it was mainly used to
remove corrupted databases. void forceclosed(); clearcachedhdrs() void clearcachedhdrs(); resethdrcachesize() void resethdrcachesize(in unsigned long size); getmsghdrforkey() nsimsgdbhdr getmsghdrforkey(in nsmsgkey key); parameters key getmsghdrformessageid() nsimsgdbhdr getmsghdrformessageid(in string messageid); parameters messageid containskey() returns whether or not this database cont...
...And 3 more matches
nsINavHistoryResultViewer
toolkit/components/places/public/nsinavhistoryservice.idlscriptable lets nsinavhistoryresult instances notify places views of changes in the results.
removed in gecko 2.0 and replaced with the nsinavhistoryresultobserver interface, which is similar but allows multiple clients to observe the result at once. 1.0 66 introduced gecko 1.9 obsolete gecko 2.0 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. note: most methods in this interface were renamed in gecko 1.9.2, an...
...eywordchanged(in nsinavhistoryresultnode anode, in autf8string anewkeyword); void nodemoved(in nsinavhistoryresultnode anode, in nsinavhistorycontainerresultnode aoldparent, in unsigned long aoldindex, in nsinavhistorycontainerresultnode anewparent, in unsigned long anewindex); void nodetitlechanged(in nsinavhistoryresultnode anode, in autf8string anewtitle); void node
removed(in nsinavhistorycontainerresultnode aparent, in nsinavhistoryresultnode anode, in unsigned long aoldindex); void nodetagschanged(in nsinavhistoryresultnode anode); void nodeurichanged(in nsinavhistoryresultnode anode, in autf8string anewuri); void nodereplaced(in nsinavhistorycontainerresultnode parent, in nsinavhistoryresultnode olditem, in nsinavhistoryresultnode n...
... parameters anode the moved item. aoldparent the item's old parent. aoldindex the item's index in the old parent. anewparent the item's new parent. anewindex the item's index in the new parent. remarks at the moment, this method is called only when an item is moved within the same container. when an item is moved between containers, a new node is created for the item, and the item
removed/itemadded methods are used. nodetitlechanged() called right after the title of a node has changed. void nodetitlechanged( in nsinavhistoryresultnode anode, in autf8string anewtitle ); parameters anode the node whose title has changed. anewtitle the new title of the node. nodeurichanged() called right after the uri of a node has changed. void nodeurichanged( in nsinavhistoryr...
...And 3 more matches
Debugger - Firefox Developer Tools
ing a target javascript program. allowwasmbinarysource a boolean value indicating whether webassembly sources will be available in binary form. the webassembly text generation will be disabled. collectcoverageinfo a boolean value indicating whether code coverage should be enabled inside each debuggee of this debugger instance. changing this flag value will recompile all jit code to add or
remove code coverage instrumentation. changing this flag when any frame of the debuggee is currently active on the stack will produce an exception. setting this to true enables code coverage instrumentation, which can be accessed via the debugger.script getoffsetscoverage function. in some cases, the code coverage might expose information which pre-date the modification of this flag. code coverage rep...
...r, thus imposing capability-based restrictions on a debugger’s reach. however, the addallglobalsasdebuggees method allows the api user to monitor all global object creation that occurs anywhere within the javascript system (the “jsruntime”, in spidermonkey terms), thereby escaping the capability-based limits. for this reason, addallglobalsasdebuggees is only available to privileged code. ...
...y-based restrictions on a debugger’s reach. however, the addallglobalsasdebuggees method allows the api user to monitor all global object creation that occurs anywhere within the javascript system (the “jsruntime”, in spidermonkey terms), thereby escaping the capability-based limits. for this reason, addallglobalsasdebuggees is only available to privileged code. ...
...And 3 more matches
Deprecated tools - Firefox Developer Tools
over the course of devtools development, we have added several experimental panels to try out new ideas. not all of these have had wide adoption, and due to the cost of maintenance, seldom used panels are eventually
removed. we have created this list of deprecated or
removed panels. this page documents the deprecated panels and the bugs that track their removal. although these panels have been
removed, you still have access to the old code, and there are alternative webextensions that you can try to get similar functionality. when we deprecate a panel, we begin by getting feedback from the community to determine the impact of removing that panel. once we have decided to
remove the panel, we will provide a warning message, and finally, we will
remove the panel from the codebase. you may see a...
... description scratchpad provided an environment for experimenting with javascript code. you can write, run, and examine the result of code that interacts with the web page. ...
... expandable stacktrace, making it easier to debug the code you're currently writing. starting firefox 72, you can import a javascript file content in the console input with ctrl + o (cmd + o on macos), as well as saving the console input content to a file using ctrl + s (cmd + s on macos). webide and connect page webide was deprecated as of firefox 69 disabled as of firefox 70 (bug 1539451).
removed as of firefox 71 (bug 1539462). description webide allowed you to connect the firefox developer tools to remote browsers, such as firefox for android. it was also intended to support application development for firefox os. alternatives remote debugging is available in about:debugging as of firefox 68. features not ported to about:debugging are: wifi debugging for firefox for android, appli...
...And 3 more matches
AudioBuffer() - Web APIs
are required to support at least 32 channels. samplerate: the sample rate in hz for the buffer. the default is the sample rate of the context used in constructing this object. user agents are required to support sample rates from 8,000 hz to 96,000 hz (but are allowed to go farther outside this range). deprecated parameters context a reference to an audiocontext. this parameter was
removed from the spec. return value a new audiobuffer object instance. exceptions notsupportederror one or more of the options are negative or otherwise has an invalid value (such as numberofchannels being higher than supported, or a samplerate outside the nominal range). rangeerror there isn't enough memory available to allocate the buffer. specifications specification status ...
...esktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetaudiobuffer() constructorchrome full support 55notes full support 55notes notes the context parameter was supported up until version 57, but has now been
removed.edge full support ≤79firefox full support 53ie no support noopera full support 42notes full support 42notes notes the context parameter was supported up until version 44,...
... full support ≤79firefox full support 53ie no support noopera full support 42notes full support 42notes notes the context parameter was supported up until version 44, but has now been
removed.safari ? webview android full support 55notes full support 55notes notes the context parameter was supported up until version 57, but has now been
removed.chrome android full support 55notes full support ...
...And 3 more matches
CanvasRenderingContext2D - Web APIs
). canvasrenderingcontext2d.restore() restores the drawing style state to the last element on the 'state stack' saved by save(). canvasrenderingcontext2d.canvas a read-only back-reference to the htmlcanvaselement. might be null if it is not associated with a <canvas> element. hit regions canvasrenderingcontext2d.addhitregion() adds a hit region to the canvas. ...
...ntext2d.restore() restores the drawing style state to the last element on the 'state stack' saved by save(). canvasrenderingcontext2d.canvas a read-only back-reference to the htmlcanvaselement. might be null if it is not associated with a <canvas> element. hit regions canvasrenderingcontext2d.addhitregion() adds a hit region to the canvas. canvasrenderingcontext2d.
removehitregion()
removes the hit region with the specified id from the canvas. canvasrenderingcontext2d.clearhitregions()
removes all hit regions from the canvas. filters canvasrenderingcontext2d.filter applies a css or svg filter to the canvas, e.g., to change its brightness or bluriness. non-standard apis blink and webkit most of these apis are deprecated and were
removed shortly after chrome 36. ...
... canvasrenderingcontext2d.drawimagefromrect() this is redundant with an equivalent overload of drawimage. canvasrenderingcontext2d.setalpha() use canvasrenderingcontext2d.globalalpha instead. ...
...And 3 more matches
Element.setAttribute() - Web APIs
syntax element.setattribute(name, value); parameters name a domstring specifying the name of the attribute whose value is to be set. ...
... syntax element.setattribute(name, value); parameters name a domstring specifying the name of the attribute whose value is to be set. ...
...tring ("") in value (some people use the attribute's name; this works but is non-standard). see the example below for a practical demonstration. since the specified value gets converted into a string, specifying null doesn't necessarily do what you expect. instead of removing the attribute or setting its value to be null, it instead sets the attribute's value to the string "null". if you wish to
remove an attribute, call
removeattribute(). return value undefined. exceptions invalidcharactererror the specified attribute name contains one or more characters which are not valid in attribute names. example in the following example, setattribute() is used to set attributes on a <button>. html <button>hello world</button> javascript var b = document.queryselector("button"); b.setattrib...
...And 3 more matches
Element - Web APIs
pseudo-element selector. element.queryselector() returns the first node which matches the specified selector string relative to the element. element.queryselectorall() returns a nodelist of nodes which match the specified selector string relative to the element. element.releasepointercapture() releases (stops) pointer capture that was previously set for a specific pointer event. childnode.
remove()
removes the element from the children list of its parent. element.
removeattribute()
removes the named attribute from the current node. element.
removeattributens()
removes the attribute with the specified name and namespace, from the current node. eventtarget.
removeeventlistener()
removes an event listener from the element. element.requestfullscreen() asynchronously asks the browser...
...adding it if it is not present, on the specified element. obsolete methods element.getattributenode() retrieves the node representation of the named attribute from the current node and returns it as an attr. element.getattributenodens() retrieves the node representation of the attribute with the specified name and namespace, from the current node and returns it as an attr. element.
removeattributenode()
removes the node representation of the named attribute from the current node. element.setattributenode() sets the node representation of the named attribute from the current node. element.setattributenodens() sets the node representation of the attribute with the specified name and namespace, from the current node. events listen to these events using addeventlistener(...
...up fired after the webkitmouseforcedown event as soon as the pressure has been reduced sufficiently to end the "force click". touch events touchcancel fired when one or more touch points have been disrupted in an implementation-specific manner (for example, too many touch points are created). also available via the ontouchcancel property. touchend fired when one or more touch points are
removed from the touch surface. also available via the ontouchend property touchmove fired when one or more touch points are moved along the touch surface. also available via the ontouchmove property touchstart fired when one or more touch points are placed on the touch surface. also available via the ontouchstart property specifications specification status comment ...
...And 3 more matches
HTMLTableElement - Web APIs
nt.caption is a htmltablecaptionelement representing the first <caption> that is a child of the element, or null if none is found. when set, if the object doesn't represent a <caption>, a domexception with the hierarchyrequesterror name is thrown. if a correct object is given, it is inserted in the tree as the first child of this element and the first <caption> that is a child of this element is
removed from the tree, if any. htmltableelement.thead is a htmltablesectionelement representing the first <thead> that is a child of the element, or null if none is found. when set, if the object doesn't represent a <thead>, a domexception with the hierarchyrequesterror name is thrown. if a correct object is given, it is inserted in the tree immediately before the first element that is neither a <capt...
...e element, or null if none is found. when set, if the object doesn't represent a <thead>, a domexception with the hierarchyrequesterror name is thrown. if a correct object is given, it is inserted in the tree immediately before the first element that is neither a <caption>, nor a <colgroup>, or as the last child if there is no such element, and the first <thead> that is a child of this element is
removed from the tree, if any. htmltableelement.tfoot is a htmltablesectionelement representing the first <tfoot> that is a child of the element, or null if none is found. when set, if the object doesn't represent a <tfoot>, a domexception with the hierarchyrequesterror name is thrown. if a correct object is given, it is inserted in the tree immediately before the first element that is neither a <capt...
...or null if none is found. when set, if the object doesn't represent a <tfoot>, a domexception with the hierarchyrequesterror name is thrown. if a correct object is given, it is inserted in the tree immediately before the first element that is neither a <caption>, a <colgroup>, nor a <thead>, or as the last child if there is no such element, and the first <tfoot> that is a child of this element is
removed from the tree, if any. htmltableelement.rowsread only returns a live htmlcollection containing all the rows of the element, that is all <tr> that are a child of the element, or a child of one of its <thead>, <tbody> and <tfoot> children. the rows members of a <thead> appear first, in tree order, and those members of a <tbody> last, also in tree order. the htmlcollection is live and is automat...
...And 3 more matches
SVGLengthList - Web APIs
leng...
... domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. initialize(in svglength newitem) svglength clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter. if the inserted item is already in a list, it is
removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. the return value is the item inserted into the list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. getitem(in unsigned long index) ...
...ceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. insertitembefore(in svglength newitem, in unsigned long index) svglength inserts a new item into the list at the specified position. the first item is number 0. if newitem is already in a list, it is
removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. if the item is already in this list, note that the index of the item to insert before is before the removal of the item. if the index is equal to 0, then the new item is inserted at the front of the list. if the index is greater than or equal to numberofitems, then the new item is ap...
...And 3 more matches
SVGNumberList - Web APIs
dexable and can be accessed like arrays. interface overview also implement none methods void clear() svgnumber initialize(in svgnumber newitem) svgnumber getitem(in unsigned long index) svgnumber insertitembefore(in svgnumber newitem, in unsigned long index) svgnumber replaceitem(in svgnumber newitem, in unsigned long index) svgnumber
removeitem(in unsigned long index) svgnumber appenditem(in svgnumber newitem) properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list. ...
... a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. initialize(in svgnumber newitem) svgnumber clears all existing current items from the list and re-initializes the list to hold the single item specified by newitem. if the inserted item is already in a list, it is
removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. the return value is the item inserted into the list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. getitem(in unsigned long index)...
... a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. insertitembefore(in svgnumber newitem, in unsigned long index) svgnumber inserts a new item into the list at the specified position. the first item is number 0. if newitem is already in a list, it is
removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. if the item is already in this list, note that the index of the item to insert before is before the removal of the item. if the index is equal to 0, then the new item is inserted at the front of the list. if the index is greater than or equal to numberofitems, then the new item ...
...And 3 more matches
SVGPathSegList - Web APIs
none methods void clear() svgpathseg initialize(in svgpathseg newitem) svgpathseg getitem(in unsigned long index) svgpathseg insertitembefore(in svgpathseg newitem, in unsigned long index) svgpathseg replaceitem(in svgpathseg newitem, in unsigned long index) svgpathseg
removeitem(in unsigned long index) svgpathseg appenditem(in svgpathseg newitem) properties readonly unsigned long numberofitems normative document svg 1.1 (2nd edition) properties ...
...h code no_modification_allowed_err is raised when the list cannot be modified. initialize(in svgpathseg newitem) svgpathseg clears all existing current items from the list and re-initializes the list to hold the single item specified by newitem. if the inserted item is already in a list, it is
removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. the return value is the item inserted into the list. exceptions: a domexception with code no_modification_allowed_err is raised when the list cannot be modified. getitem(in unsigned long index) ...
...ith code no_modification_allowed_err is raised when the list cannot be modified. insertitembefore(in svgpathseg newitem, in unsigned long index) svgpathseg inserts a new item into the list at the specified position. the first item is number 0. if newitem is already in a list, it is
removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. if the item is already in this list, note that the index of the item to insert before is before the removal of the item. if the index is equal to 0, then the new item is inserted at the front of the list. if the index is greater than or equal to numberofitems, then the ne...
...And 3 more matches
SVGPointList - Web APIs
also implement none methods void clear() svgpoint initialize(in svgpoint newitem) svgpoint getitem(in unsigned long index) svgpoint insertitembefore(in svgpoint newitem, in unsigned long index) svgpoint replaceitem(in svgpoint newitem, in unsigned long index) svgpoint
removeitem(in unsigned long index) svgpoint appenditem(in svgpoint newitem) properties readonly unsigned long numberofitems normative document svg 1.1 (2nd edition) properties name type ...
...d_err is raised when the list corresponds to a read only attribute or when the object itself is read only. initialize(in svgpoint newitem) svgpoint clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter. if the inserted item is already in a list, it is
removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. the return value is the item inserted into the list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. ...
..._modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. insertitembefore(in svgpoint newitem, in unsigned long index) svgpoint inserts a new item into the list at the specified position. the first item is number 0. if newitem is already in a list, it is
removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. if the item is already in this list, note that the index of the item to insert before is before the removal of the item. if the index is equal to 0, then the new item is inserted at the front of the list. if the index is greater than or equal to numberofitems, then the new item is ap...
...And 3 more matches
SVGStringList - Web APIs
will result in an exception being thrown. interface overview also implement none methods void clear() domstring initialize(in domstring newitem) domstring getitem(in unsigned long index) domstring insertitembefore(in domstring newitem, in unsigned long index) domstring replaceitem(in domstring newitem, in unsigned long index) domstring
removeitem(in unsigned long index) domstring appenditem(in domstring newitem) properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list. ...
...omexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. initialize(in domstring newitem) domstring clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter. if the inserted item is already in a list, it is
removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. the return value is the item inserted into the list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. getitem(in unsigned long index)...
...ions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. insertitembefore(in domstring newitem, in unsigned long index) domstring inserts a new item into the list at the specified position. the first item is number 0. if newitem is already in a list, it is
removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. if the item is already in this list, note that the index of the item to insert before is before the removal of the item. if the index is equal to 0, then the new item is inserted at the front of the list. if the index is greater than or equal to numberofitems, then the new item is ap...
...And 3 more matches
SVGTransformList - Web APIs
ssed like arrays interface overview also implement none methods void clear() svgtransform initialize(in svgtransform newitem) svgtransform getitem(in unsigned long index) svgtransform insertitembefore(in svgtransform newitem, in unsigned long index) svgtransform replaceitem(in svgtransform newitem, in unsigned long index) svgtransform
removeitem(in unsigned long index) svgtransform appenditem(in svgtransform newitem) svgtransform createsvgtransformfrommatrix(in svgmatrix) svgtransform consolidate() properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type ...
...ption with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. initialize(in svgtransform newitem) svgtransform clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter. if the inserted item is already in a list, it is
removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. the return value is the item inserted into the list. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. getitem(in unsigned long index)...
... a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. insertitembefore(in svgtransform newitem, in unsigned long index) svgtransform inserts a new item into the list at the specified position. the first item is number 0. if newitem is already in a list, it is
removed from its previous list before it is inserted into this list. the inserted item is the item itself and not a copy. if the item is already in this list, note that the index of the item to insert before is before the removal of the item. if the index is equal to 0, then the new item is inserted at the front of the list. if the index is greater than or equal to numberofitems, then the new item is ap...
...And 3 more matches
WAI ARIA Live Regions/API Support - Developer guides
rkup, and for pages where the author did not add any additional markup. please read the aria spec or the live region report to learn about aria live region markup. as always, we're open to questions and suggestions for changes in community forums. ...
... author did not add any additional markup. please read the aria spec or the live region report to learn about aria live region markup. as always, we're open to questions and suggestions for changes in community forums. ...
...about aria live region markup. as always, we're open to questions and suggestions for changes in community forums. ...
...And 3 more matches
Array.prototype.shift() - JavaScript
if the length property is 0, undefined is returned. shift is intentionally generic; this method can be called or applied to objects resembling arrays. ...
...if the length property is 0, undefined is returned. shift is intentionally generic; this method can be called or applied to objects resembling arrays. ...
...hod changes the length of the array. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax arr.shift() return value the
removed element from the array; undefined if the array is empty. description the shift method
removes the element at the zeroeth index and shifts the values at consecutive indexes down, then returns the
removed value. if the length property is 0, undefined is returned. shift is intentionally generic; this method can be called or applied to objects resembling arrays. objects which do not contain a length property reflecting the last in a series of consecutive, zero-based numerical properties may...
...And 3 more matches
fill - SVG: Scalable Vector Graphics
sed. for <altglyph>, fill is a presentation attribute that defines the color of the glyph. value <paint> default value black animatable yes note: as a presentation attribute fill can be used as a css property. animate for <animate>, fill defines the final state of the animation. ...
...f the glyph. value <paint> default value black animatable yes note: as a presentation attribute fill can be used as a css property. animate for <animate>, fill defines the final state of the animation. ...
... animation frame) |
remove (keep the state of the first animation frame) default value
remove animatable no animatecolor warning: as of svg animation 2 <animatecolor> is deprecated and shouldn't be used. use <animate> instead. for <animatecolor>, fill defines the final state of the animation. value freeze (keep the state of the last animation frame) |
remove (keep the state of the first animation frame) default value
remove animatable no animatemotion for <animatemotion>, fill defines the final state of the animation. ...
...And 3 more matches
Bootstrapped extensions - Archive of obsolete content
or a practical step by step guide to migrating. the startup and shutdown process a key feature of bootstrapped extensions is that they must be able to start up and shut down on demand by the application. when the extension's startup() function is called, it must manually inject its user interface and other behavior into the application. similarly, when its shutdown() function is called, it must
remove anything that it has added to the application, as well as all references to any of its objects. there are several scenarios in which the startup() function may be called; for example: when the extension is first installed, assuming that it's both compatible with the application and is enabled. when the extension becomes enabled using the add-ons manager window. when the application is start...
...register xul overlays from a bootstrapped add-on. see the chrome.manifest documentation for details. in firefox 10 and later the chrome.manifest file located in the root of the add-on's xpi (i.e. a sibling of the install.rdf) is loaded automatically. in firefox 8 and 9 you had to load/unload the manifest manually using nsicomponentmanager.addbootstrappedmanifestlocation() and nsicomponentmanager.
removebootstrappedmanifestlocation(). this feature was unavailable in firefox versions before 8. adding user interface manually if you decide to go ahead and try to develop a bootstrapped extension that modifies the application's user interface, here are a few suggestions to get you started. you need to look up the relevant application ui elements by their id by calling document.getelementbyid(), the...
...apped extension that modifies the application's user interface, here are a few suggestions to get you started. you need to look up the relevant application ui elements by their id by calling document.getelementbyid(), then manipulate them to inject your ui. for example, you can get access to the menu bar in firefox with document.getelementbyid("main-menubar"). be sure that at shutdown time, you
remove any user interface you've added. creating a bootstrapped extension to mark an extension as bootstrappable, you need to add the following element to its install manifest: <em:bootstrap>true</em:bootstrap> then you need to add a bootstrap.js file that contains the required functions; this should be alongside the install.rdf file in the extension's package. backward compatibility because older...
...And 2 more matches
Tabbox - Archive of obsolete content
obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. ...
... obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. ...
...1 / fennec 1.0) this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. ...
...And 2 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
ult/pref as in /usr/lib/thunderbird-5/default/pref ) for the record/history purpose ... the old netscape 4.x the file is encoded (byte-shift/rotary is 7), and the presence of the file (netscape.cfg) in the mozilla_home directory suffices for it to be read and executed. for mozilla 1.x.x, firefox, thunderbird or netscape 7 it is still a javascript file, the byte-shift is 13 by default, but can be
removed using the pref("general.config.obscure_value", 0); preference in any appropriate .js file dedicated to autoconfig (here autoconf.js). the name of the file can be anything you want because it is named by a general.config preference that should be added at the end of file mozilla_home/default/pref/autoconf.js or mozilla_home/greprefs/autoconf.js: pref("general.config.filename", "mozilla.cfg");. ...
...77" data: no] autoconfig (pref) and ldap support in packages add ldap support in firefox 1.5 a least from firefox 1.5, autoconfig is compiled by default (cf. browser, moz_extensions_default="pref...") but not ldap (moz_ldap_xpcom=1). you need to recompile the package to get it, cf. bug 295329. add autoconfig and ldap support in firefox 1.0.x add pref extension (--enable-extensions=pref) and
remove --disable-ldap from mozconfig file. one can check how firefox has been compiled by opening about:buildconfig (don't know the equivalent for thunderbird! how as it been compiled?) about:buildconfig build platform target i686-pc-linux-gnu build tools compiler version compiler flags gcc gcc version 3.4.3 20050227 (red hat 3.4.3-22.fc3) -wall -w -wno-unused -wpointer-arith -wcast-align -wno-long-l...
...k merge tools in [root@b008-02 ~]# vim /etc/mercurial/hgrc.d/mergetools.rc get the source comm-central [root@b008-02 moz]# time hg clone http://hg.mozilla.org/comm-central/ commsrc requesting all changes adding changesets adding manifests adding file changes added 2975 changesets with 16793 changes to 7117 files (+3 heads) updating working directory 5644 files updated, 0 files merged, 0 files
removed, 0 files unresolved real 0m40.771s user 0m9.284s sys 0m1.304s [root@b008-02 commsrc]# python client.py checkout executing command: ['hg', 'pull', '-r', './.', '-r', 'tip'] pulling from http://hg.mozilla.org/comm-central/ searching for changes no changes found executing command: ['hg', 'update', '-r', 'default', '-r', './.'] 0 files updated, 0 files merged, 0 files
removed, 0 files ...
...And 2 more matches
JavaScript Client API - Archive of obsolete content
o invent your own mapping from data objects to guids as long as it's consistent. in this case, it is highly recommended to use the utils.makeguid() helper to generate new guids: let newguid = utils.makeguid(); your store object must implement the following methods: itemexists(id) createrecord(id, collection) changeitemid(oldid, newid) getallids() wipe() create(record) update(record)
remove(record) you may also find it useful to override other methods of the base implementation, for example applyincomingbatch if the underlying storage for your data supports batch operations. createrecord the createrecord( id, collection ) method gets called by the engine to request a new record for an item with a given guid. it's your store's responsibility to instantiate a record object, a...
... bookmarks from the current firefox profile. how to do this for your particular data type is up to you to figure out. the next three methods are called by the sync algorithm when it determines that the state of the local application needs to be changed to keep it up-to-date with the user's remote activities. the sync algorithm will call your store object with a record to be created, updated, or
removed, and it is your store object's responsibility to apply this change to the local application using whatever methods are neccessary. create(record) not to be confused with createrecord(), this method (which should probably be renamed for clarity soon) tells your store to create a new item in the local application, based on the data in record. (so for example, bookmarkstore.create() adds a n...
... a new item in the local application, based on the data in record. (so for example, bookmarkstore.create() adds a new bookmark to the firefox profile). update(record) the argument is a record which has been remotely modified; your store should locate the matching local item (presumably using the guid, which is available in record.id) and update it to the new values provided in record.
remove(record) the argument is a record which has been remotely deleted; your store should locate the matching local item and delete it. (don't rely on the record that is passed in to this method having any of its attributes set correctly except for .id. the .id should be al you need, anyway.) applyincomingbatch : todo example store skeleton // maintains the store of all your foo-type items ...
...And 2 more matches
JavaScript crypto - Archive of obsolete content
though some browsers may still support it, it is in the process of being dropped. ...
...d insertion and removal events. to enable your document to receive these events, you must first tell the crypto system you are interested by setting window.crypto.enablesmartcardevents to true. you can then register event handlers for these events with the document.addeventlistener() method. two smart card related events are generated: smartcard-insert when smartcards are inserted, and smartcard-
remove when smartcards are
removed. web sites which use ssl clientauth login could use the following code to refresh the page on token insertions and removals: <!doctype html> <p>... <script> function onsmartcardchange() { window.location.reload(); } function register() { window.crypto.enablesmartcardevents = true; document.addeventlistener("smartcard-insert", onsmartcardchange, false); docume...
...web sites which use ssl clientauth login could use the following code to refresh the page on token insertions and removals: <!doctype html> <p>... ...
...And 2 more matches
Binding Attachment and Detachment - Archive of obsolete content
ch the style rule. if at any time a resolution of style on the element determines that a different binding should be attached, the old binding (and all bindings that it explicitly extends in its inheritance chain) will be detached. no bindings will be attached to elements that match the style rule, but are inside an element that has style display:none set. see bug 307098. whenever an element is
removed from a document, any bindings attached via css loaded by the document will be detached. attachment using element.style property none of the xbl inheritance properties of element.style.mozbinding described here are implemented (if ever). bindings can be attached to elements through the scripting by assigning the element.style.mozbinding property. respectively bindings can be detached by sett...
...erty none of the xbl inheritance properties of element.style.mozbinding described here are implemented (if ever). bindings can be attached to elements through the scripting by assigning the element.style.mozbinding property. respectively bindings can be detached by setting element.style.mozbinding to empty string. note: some older papers mentioned dom methods document.addbinding and document.
removebinding; these were subsequently discarded as redundant and not implemented. var checkbox = document.getelementbyid("mycheckbox"); checkbox.style.mozbinding = "url(http://www.mozilla.org/xbl/htmlbindings.xml#checkbox)"; this attachment is not necessarily synchronous. scripts that invoke this method should not assume that the binding is installed immediately after this method returns. see bindi...
...d should not assume that the binding is installed immediately after this method returns. see binding documents for more information. when a binding is attached using the dom, it inherits from the current most derived binding that may already be attached to the element. any bindings attached to an element will remain on the element until the element is destroyed or the corresponding style rule is
removed. if a binding is attached and it already specifies an inherited binding using the extends attribute, then the base binding at the end of the inheritance chain is the one that will inherit from the most derived binding that is already attached. for example, given a binding d1, with an explicit inheritance chain of d1 -> d2 -> d3 if this element is attached to an element using element.style.mo...
...And 2 more matches
MenuModification - Archive of obsolete content
adding items to a menu the appenditem method may be used to append a new item to the end of the popup associated with a menu. this method will create a new menuitem element and insert it into the popup. this method may only be used with the menu element. <script> function addtomenu() { var menu = document.getelementbyid("edit-menu"); menu.appenditem("insert", "insert"); } </script> <menu id="edit-menu"/> <button label="add" oncommand="addtomenu()"/> in this example, the addtomenu function is called when the button is pressed. this function appends a new item to the menu's popup with the label insert. ...
...fect is that a submenu with two items is added dynamically to the menu. the appendchild method is available for all elements, and is used to add new nodes within another node. the appenditem method is specific to menus, as well as some other specific elements, and is simpler to use to append new menuitem elements to a menu. if we were to use the example above, we would also want to make sure to
remove the items again in a popuphiding event listener. otherwise, a new submenu would be added every time the menu is opened, which is clearly not desirable. another possibility is to ensure that the menu is only added once. the following shows how the addsubmenu function above might be rewritten to handle this case. <script> function addsubmenu() { var popup = document.getelementbyid("file-popup");...
...bel = "new"; newmenu.appenditem("document", "doc"); newmenu.appenditem("image", "image"); } </script> the haschildnodes method may be used to check if a node has any children. the first time the function is called, the haschildnodes method will return false, however the second time, the method will return true as the items have already been added to the menu. ...
...And 2 more matches
Browser API
audio playing in the browser <iframe>. htmliframeelement.getmuted() indicates whether the browser <iframe> is currently muted. event-related methods in order to manage the browser <iframe>'s content, many new events were added (see below). the following methods are used to deal with those events: the <iframe> gains support for the methods of the eventtarget interface addeventlistener(),
removeeventlistener(), and dispatchevent(). htmliframeelement.sendmouseevent() sends a mouseevent to the <iframe>'s content. utility methods last, there are some utility methods, useful for apps that host a browser <iframe>. htmliframeelement.getstructureddata() retrieves any structured microdata (and hcard and hcalendar microformat data) contained in the html loaded in the browser <iframe> and...
...iframeelement.sendmouseevent() sends a mouseevent to the <iframe>'s content. utility methods last, there are some utility methods, useful for apps that host a browser <iframe>. htmliframeelement.getstructureddata() retrieves any structured microdata (and hcard and hcalendar microformat data) contained in the html loaded in the browser <iframe> and returns it as json. ...
...y methods last, there are some utility methods, useful for apps that host a browser <iframe>. htmliframeelement.getstructureddata() retrieves any structured microdata (and hcard and hcalendar microformat data) contained in the html loaded in the browser <iframe> and returns it as json. browser api methods
removed in firefox 65 in firefox 65, several of the mozilla browser api methods were
removed in an effort to cut down on domrequest usage in the browser, and
remove the parts of the browser api that are no longer needed (it is used only by the firefox devtools at this point). see bug 1503070 for more details. the methods
removed in firefox 65 are: htmliframeelement.addnextpaintlistener() defines a handler to listen for the next mozafterpaint event in the browser <iframe>. htmlifra...
...And 2 more matches
AddonInstall
instances can be created using the getinstallforfile() or getinstallforurl() methods on the addonmanager. once you have an instance the install() method is used to start automatic download and installation. this can be canceled at any time with the cancel() method. method overview void install() void cancel() void addlistener(in installlistener listener) void
removelistener(in installlistener listener) properties attribute type description name string the name of the add-on being installed. version string the version of the add-on being installed. iconurl string the icon of the add-on being installed. releasenotesuri nsiuri the uri of release notes for this install. t...
... or the process is canceled by a call to the cancel() method. void install( ) cancel() cancels the install process, it cannot be restarted after this. ...
... canceled by a call to the cancel() method. void install( ) cancel() cancels the install process, it cannot be restarted after this. ...
...And 2 more matches
PopupNotifications.jsm
imported the module, you can then use the popupnotifications object it exports; this object provides methods for creating and displaying popup notification panels. note: this code module is imported by firefox chrome windows, so you don't have to do it yourself in most extensions. method overview void locationchange(); notification getnotification(id, browser); void
remove(notification); notification show(browser, id, message, anchorid, mainaction, secondaryactions, options); properties attribute type description ispanelopen boolean returns true if the notification panel is currently visible, false if it is not. methods locationchange() the consumer can call this method to let the popup notification module kno...
...th the browser/id pair. notification getnotification( string id xulelement browser ); parameters id the notification id to search for. browser the xul <xul:browser> element whose notifications should be searched. if null, the currently selected <xul:browser>'s notifications will be searched. return value the corresponding notification object, or null if no such notification exists.
remove()
removes the specified notification. void
remove( notification notification ); parameters notification the notification object representing the notification to
remove. show() adds a new popup notification, displaying it to the user. notification show( browser, id, message, anchorid, mainaction, secondaryactions, options ); parameters browser the xul <xul:browser...
...e activated by clicking on their anchor. this lets you create a notification that will appear when the user clicks the anchor. eventcallback a javascript function to be invoked when the notification changes state. the callback's first parameter is a string identifying the state change that occurred. see notification events below. nevershow notifications with this parameter set to true will be
removed when they would have otherwise been dismissed (i.e. any time the popup is closed due to user interaction).
removeondismissal notifications with this parameter set to true will be
removed when they would have otherwise been dismissed (that is, any time the popup is closed due to user interaction). popupiconurl a string specifying the url of the image to be displayed in the popup. this is nor...
...And 2 more matches
Mozilla Quirks Mode Behavior
hat exist between mozilla's standards mode and quirks mode behavior. miscellaneous & style all of the style rules in layout/style/res/quirk.css apply only in quirks mode: orphaned li has an inside bullet (bug 1049). add padding if the very first node in an li is another ul or ol (bug 98636). obsolete since gecko 50 list bullets do not inherit the font size of the list (bug 97351).
removed in firefox 50 (bug 648331). don't inherit font properties into tables except for font-family. make table borders gray rather than using the foreground color. collapse top margin of body and td and bottom margin of td. collapse the bottom or top margins of empty elements (bug 97361). support <pre wrap>, <pre cols>, <pre width>. orphaned dd has generated content :before instead o...
...ves a content-type header other than text/css. the css parser accepts colors not beginning with #, except in shorthands. the css parser interprets unitless numbers as px (except for line-height and any other properties where they have distinct meaning, and except in shorthands). in quirks mode, the css parser allows {} around the contents of style attributes (bug 99554). this behavior is being
removed in firefox 27, for interoperability. (bug 915053) an empty string for the background attribute sets the background url to empty only in quirks mode. the topmargin, bottommargin, leftmargin, and rightmargin attributes on body are supported only in quirks mode (bug 9258). obsolete since gecko 35 (firefox 35.0 / thunderbird 35.0 / seamonkey 2.32) (bug 95530) this quirk is now html5 conform and ...
... when written in june 2001, but no longer appears accurate. should look into tablequirkcolorrule, re-describe, and figure out when it changed.] obsolete since gecko 37 the empty-cells property defaulted to hide in quirks mode but show (according to css2.1) in standards mode (see bug 33244) (though the correct fix would be to specify it on the html table element in quirk.css). this quirk has been
removed in firefox 37 and empty-cells also defaults to show in quirks mode (bug 1020400). in quirks mode floated tables never move to the next "line" if they don't fit next to other floats, they just keep widening the page (see bug 43086). to correspond, their width is computed as though only the remaining available space is the containing block width (bug 99461). in quirks mode colspan="0" and rowsp...
...And 2 more matches
Hacking Tips
since spidermonkey 48, we have a gdb unwinder. this unwinder is able to read the frames created by the jit, and to display the frames which are after these jit frames. $ gdb --args out/dist/bin/js ./foo.js […] spidermonkey unwinder is disabled by default, to enable it type: enable unwinder .* spidermonkey (gdb) b js::mat...
...if you want to know at which lir the code is failing at, the js::ion::codegenerator::generatebody function can be intrumented to dump the lir id before each instruction. for (; iter != current->end(); iter++) { ionspew(ionspew_codegen, "instruction %s", iter->opname()); […] m...
...ler (browser / xpcshell) see the section dedicated to profiling with the gecko profiler. this method of profiling has the advantage of mixing the javascript stack with the c++ stack, which is useful to analyze library function issues. one tip is to start looking at a script with an inverted js stack to locate the most expensive js function, then to focus on the frame of this js function, and to
remove the inverted stack and look at c++ part of this function to determine from where the cost is coming from. using the jit inspector (browser) install the jit inspector addon in your browser. this addon provides estimated cost of ionmonkey , the baseline compiler, and the interpreter. in addition it provides a clean way to analyze if instructions are inferred as being monomorphic or polymorphic in...
...And 2 more matches
jsint
try to avoid using it. aliases for c/c++ integer types. syntax typedef ... jsint; typedef ... jsuint; typedef ... jsword; typedef ... jsuword; typedef ... intn; typedef ... uintn; // following types are still provides in js/public/legacyinttypes.h, // but should not use them. typedef ... int8; typedef ... uint8; typedef ... int16; typedef ... uint16; typedef ... int32; typedef ... uint32; typedef ... int64; typedef ... uint64; description jsint and jsuint are 32-bit integer types. ...
...h, // but should not use them. typedef ... int8; typedef ... uint8; typedef ... int16; typedef ... uint16; typedef ... int32; typedef ... uint32; typedef ... int64; typedef ... ...
... ... int8; typedef ... uint8; typedef ... int16; typedef ... uint16; typedef ... int32; typedef ... uint32; typedef ... int64; typedef ... ...
...And 2 more matches
Accessing the Windows Registry Using XPCOM
"software\\microsoft\\windows\\currentversion\\run", wrk.access_read); for (var i=0; i<wrk.valuecount; i++) { var name = wrk.getvaluename(i); var value = readregistryvalue(wrk, name); // do something interesting here... } wrk.close(); for simplicity, this example assumes the existence of the readregistryvalue() function defined above. removing registry keys and values to
remove child keys and values from the registry, you can use the
removechild() and
removevalue() methods.
removechild()
removes a child key and all of its values, but will fail if the key has any child keys of its own. in that case you must manually enumerate the children and
remove them individually. this example shows how to recursively delete a registry key and all of its children. use with caution! ...
...ys and values from the registry, you can use the
removechild() and
removevalue() methods.
removechild()
removes a child key and all of its values, but will fail if the key has any child keys of its own. in that case you must manually enumerate the children and
remove them individually. this example shows how to recursively delete a registry key and all of its children. ...
...erate the children and
remove them individually. this example shows how to recursively delete a registry key and all of its children. ...
...And 2 more matches
Components.utils.Sandbox
ean: if true, then createobjectin(), evalinwindow(), and exportfunction() are available in the sandbox. default: false. wantglobalproperties an array of strings. each string is the name of an object that you want to make available as a global to code running in the sandbox. ...
... and exportfunction() are available in the sandbox. default: false. wantglobalproperties an array of strings. each string is the name of an object that you want to make available as a global to code running in the sandbox. the exception is "-promise": the promise constructor is available by default for sandboxes, and you use this option to
remove it from the sandbox. note that "-promise" is
removed in firefox 37. ...
...rties an array of strings. each string is the name of an object that you want to make available as a global to code running in the sandbox. the exception is "-promise": the promise constructor is available by default for sandboxes, and you use this option to
remove it from the sandbox. note that "-promise" is
removed in firefox 37. ...
...And 2 more matches
nsICommandLine
form, these are preceded by a single dash. some flags may take parameters; for example: "-url <param>" or "-install-xpi <param>". method overview long findflag(in astring aflag, in boolean acasesensitive); astring getargument(in long aindex); boolean handleflag(in astring aflag, in boolean acasesensitive); astring handleflagwithparam(in astring aflag, in boolean acasesensitive); void
removearguments(in long astart, in long aend); nsifile resolvefile(in astring aargument); nsiuri resolveuri(in astring aargument); attributes attribute type description length long number of arguments in the command line. the application name is not part of the command line. read only. preventdefault boolean there may be a command-line handler which performs a default action if there was n...
...argument is a flag, the returned value is "-flag [<flagvalue>]". exceptions thrown ns_error_invalid_arg the specified index is out of bounds. handleflag() finds the specified flag, removing it from the array of flags. reports whether or not the specified flag was found. this is useful for boolean flags; that is, flags that don't accept a parameter. you can determine if the flag was provided and
remove it from the list of flags waiting to be processed in one operation. boolean handleflag( in astring aflag, in boolean acasesensitive ); parameters aflag the flag name to find and
remove. acasesensitive whether to do case-sensitive comparisons. return value true if the flag was found, otherwise false. handleflagwithparam() finds a flag in the list of flags waiting to be processed and returns...
...e-sensitive comparisons. return value true if the flag was found, otherwise false. handleflagwithparam() finds a flag in the list of flags waiting to be processed and returns its value, after removing both the flag and its value from the list of flags waiting to be handled. this is useful for processing flags that accept a value. this is, essentially, a helper method that combines findflag() and
removearguments() into one operation. astring handleflagwithparam( in astring aflag, in boolean acasesensitive ); parameters aflag the flag name to find and
remove. acasesensitive whether to do case-sensitive flag search. return value the value of the specified flag, an empty string if the flag's value is the empty string, or null if the specified parameter wasn't found. exceptions thrown ns_err...
...And 2 more matches
nsIComponentManager
a "bootstrapped" chrome manifest supports some of the instructions allowed in a regular chrome manifest, see the chrome registration documentation for details. this method was introduced in gecko 8 to let...
...ied directory or xpi file. a "bootstrapped" chrome manifest supports some of the instructions allowed in a regular chrome manifest, see the chrome registration documentation for details. this method was introduced in gecko 8 to let bootstrapped add-ons provide content at chrome:// uris. until gecko 10 you had to call this method manually from within the add-on's startup() method (with a matching
removebootstrappedmanifestlocation() call in the add-on's shutdown() method). if you're targeting gecko 10 or higher there should be no need to call this method, since the bootstrapped add-on's chrome.manifest is loaded automatically now. void addbootstrappedmanifestlocation( in interface nsilocalfile alocation ); parameters alocation the directory or xpi from which to load the chrome.manifest...
...tclassobjectbycontractid( in string acontractid, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result ); parameters acontractid the contractid of the factory that is being requested. aiid the interface type to be returned. result the resulting interface pointer. exceptions thrown ns_error_factory_not_registered indicates that the specified class is not registered. ...
...And 2 more matches
nsIEditorIMESupport
y); native code only! obsolete since gecko 2.0 attributes attribute type description composing boolean whether this editor has active ime transaction. read only. methods native code only!begincomposition obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. handles the start of inline input composition. void begincomposition( in nstexteventreplyptr areply ); parameters areply endcomposition() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) handles the end of inline input composition. void endcomposition(); parameters none. forcecompositionend() force the com...
...ameters none. native code only!getpreferredimestate get preferred ime status of current widget. void getpreferredimestate( out unsigned long astate ); parameters astate native code only!getquerycaretrect obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0)this feature is obsolete. ...
...it could be
removed at any time. try to avoid using it. get the query caret rect. void getquerycaretrect( in nsquerycaretrecteventreplyptr areply ); parameters areply native code only!getreconversionstring obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. get the reconversion string. void getreconversionstring( in nsreconversioneventreplyptr areply ); parameters areply notifyimeonblur() obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid ...
...And 2 more matches
nsIIdleService
ions exist for windows, mac os x, and linux (via xscreensaver). implemented by: @mozilla.org/widget/idleservice;1. to create an instance, use: var idleservice = components.classes["@mozilla.org/widget/idleservice;1"] .getservice(components.interfaces.nsiidleservice); method overview void addidleobserver(in nsiobserver observer, in unsigned long time); void
removeidleobserver(in nsiobserver observer, in unsigned long time); attributes attribute type description idletime unsigned long the amount of time in milliseconds that has passed since the last user activity. can be 0 if there is no valid idle time to report (this can happen if the user never interacted with the browser at all, and if we are unable to poll for idle...
...otification sent out if the user remains idle for an extended period: 'idle-daily'. the data parameter for the notification contains the current user idle time. void addidleobserver( in nsiobserver observer, in unsigned long time ); parameters observer the nsiobserver to be notified. time the amount of time in seconds the user should be idle before the observer should be notified.
removeidleobserver()
remove an observer registered with addidleobserver(). note: removing an observer will
remove it once, for the idle time you specify. if you have added an observer multiple times, you will need to
remove it just as many times. void
removeidleobserver( in nsiobserver observer, in unsigned long time ); parameters observer the nsiobserver to be
removed. time the amount of...
...l see a number around 1000 alerted. ...
...And 2 more matches
nsILoadGroup
netwerk/base/public/nsiloadgroup.idlscriptable a load group maintains a collection of nsirequest objects. inherits from: nsirequest last changed in gecko 1.7 method overview void addrequest(in nsirequest arequest, in nsisupports acontext); void
removerequest(in nsirequest arequest, in nsisupports acontext, in nsresult astatus); attributes attribute type description activecount unsigned long returns the count of "active" requests (that is requests without the load_background bit set). read only. defaultloadrequest nsirequest accesses the default load request for the group. each time a number of requests are added to a group, the defaultloadrequest may...
...ed to a group, the defaultloadrequest may be set to indicate that all of the requests are related to a base request. the load group inherits its load flags from the default load request. if the default load request is null, then the group's load flags are not changed. groupobserver nsirequestobserver the group observer is notified when requests are added to and
removed from this load group. the groupobserver is weak referenced. notificationcallbacks nsiinterfacerequestor notification callbacks for the load group. requests nsisimpleenumerator returns the requests contained directly in this group. enumerator element type: nsirequest. read only. methods addrequest() adds a new request to the group. ...
...ill be called. if the request is the default load request or if the default load request is null, then the load group will inherit its load flags from the request. void addrequest( in nsirequest arequest, in nsisupports acontext ); parameters arequest the request to be added to the load group. acontext the context to be passed to the onstartrequest notification. ...
...And 2 more matches
nsILoginManager
note: default values for the nsiloginmetainfo pro...
... note: default values for the nsiloginmetainfo properties are created if the specif...
...bag contains an item named "timesusedincrement", the login's timesused property will be incremented by the item's value. void modifylogin( in nsilogininfo oldlogin, in nsisupports newlogindata ); parameters oldlogin the login to be modified. newlogindata the login information to replace the oldlogin with. this may be specified as either an nsilogininfo or an nsipropertybag2 object. ...
...And 2 more matches
nsIMsgHeaderParser
es); void parseheaderswitharray(in wstring aline, [array, size_is(count)] out wstring aemailaddresses, [array, size_is(count)] out wstring anames, [array, size_is(count)] out wstring afullnames, [retval] out unsigned long count); void reformatheaderaddresses(in string line, out string reformattedaddress); wstring reformatunquotedaddresses(in wstring line); void
removeduplicateaddresses(in string addrs, in string other_addrs, in prbool
removealiasestome, out string newaddress); string unquotephraseoraddr(in string line, in boolean preserveintegrity); wstring unquotephraseoraddrwstring(in wstring line, in boolean preserveintegrity); methods extractheaderaddressmailboxes() given a string which contains a list of header addresses, return...
...ceptions thrown missing exception missing description reformatunquotedaddresses() given a string, will make it safe to use by adding missing quote and escaping needed quote wstring reformatunquotedaddresses( in wstring line ); parameters line the header line to parse. return value safe addresses (?) exceptions thrown missing exception missing description native code only!
removeduplicateaddresses returns a copy of addrs which may have had some addresses
removed. addresses are
removed if they are already in either addrs or other_addrs. (if other_addrs contain addresses which are not in addrs, they are not added. that argument is for passing in addresses that were already mentioned in other header fields.) addresses are considered to be the same if they contain the sa...
...ddresses are
removed if they are already in either addrs or other_addrs. (if other_addrs contain addresses which are not in addrs, they are not added. that argument is for passing in addresses that were already mentioned in other header fields.) addresses are considered to be the same if they contain the same mailbox part (case-insensitive.) real names and other comments are not compared.
removealiasestome allows the address parser to use the preference which contains regular expressions which also mean 'me' for the purpose of stripping the user's email address(es) out of addrs string
removeduplicateaddresses( in string addrs, in string other_addrs, in prbool
removealiasestome ); parameters addrs the addresses to
remove duplicates from. other_addrs other addresses that the...
...And 2 more matches
nsINavHistoryObserver
essionid, in long long areferringid, in unsigned long atransitiontype, in acstring aguid, out unsigned long aadded); constants constant value description attribute_favicon 3 the page's favicon changed. methods onbeforedeleteuri() obsolete since gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) note: this method was
removed in gecko 21.0 as part of bug 826409. the specified page and all its visits are about to be deleted. note: the page does not necessarily have to have ever existed for this function to be called. delete notifications aren't quite 100% accurate. batch delete operations take place in two steps; the notifications come first, followed by a bulk delete. if an error occurs in between these two steps ...
...e 100% accurate. batch delete operations take place in two steps; the notifications come first, followed by a bulk delete. if an error occurs in between these two steps (for example, an out of memory error), then you may get a notification even though the page doesn't wind up getting deleted. note: the page does not necessarily have to have ever existed for this function to be called. notes the
removepagesbyhost() and
removepagesbytimeframe() functions call beginupdatebatch() and endupdatebatch() rather than onclearhistory() or ondeleteuri(). void ondeleteuri( in nsiuri auri, in acstring aguid ); parameters auri the uri of the page that was deleted. aguid the unique id associated with the page. ondeletevisits() called when some visits of an history entry are expired. ...
...deleteuri( in nsiuri auri, in acstring aguid ); parameters auri the uri of the page that was deleted. aguid the unique id associated with the page. ondeletevisits() called when some visits of an history entry are expired. note: when all visits for a page are expired and also the full page entry is expired, you will only get an ondeleteuri notification. if a page entry is
removed, then you can be sure that we don't have anymore visits for it. void ondeletevisits( in nsiuri auri, in prtime avisittime, in acstring aguid ); parameters auri the uri of the page whose visits have been expired. avisittime the largest visit time in microseconds that has been expired. we guarantee that we do not have any visit older than this date. aguid the uniqu...
...And 2 more matches
pyxpidl
pyxpidl has been in use for a while, but replaced xpidl in the gecko sdk starting in gecko 9.0. using pyxpidl pyxpidl is in the sdk in the sdkdir/sdk/bin/ directory. ...
...h> <filename.idl> generating typelibs generating typelib files is done using the typelib.py utility: sdkdir/sdk/bin/typelib.py --cachedir=<path> -o <outputfilename.xpt> <filename.idl> comparing pyxpidl to xpidl this table provides a mapping of old xpidl options to pyxpidl. ...
... -o <outputfilename.xpt> <filename.idl> comparing pyxpidl to xpidl this table provides a mapping of old xpidl options to pyxpidl. ...
...And 2 more matches
AudioTrackList - Web APIs
length read only the number of tracks in the list. event handlers onaddtrack an event handler to be called when the addtrack event is fired, indicating that a new audio track has been added to the media element. onchange an event handler to be called when the change event occurs. this occurs when one or more tracks have been enabled or disabled by their enabled flag being changed. on
removetrack an event handler to call when the
removetrack event is sent, indicating that an audio track has been
removed from the media element. methods this interface also inherits methods from its parent interface, eventtarget. gettrackbyid() returns the audiotrack found within the audiotracklist whose id matches the specified string. if no match is found, null is returned. events addtrac...
...venttarget. gettrackbyid() returns the audiotrack found within the audiotracklist whose id matches the specified string. if no match is found, null is returned. events addtrack fired when a new audio track has been added to the media element. also available via the onaddtrack property. change fired when a track has been enabled or disabled. also available via the onchange property. ...
...ck found within the audiotracklist whose id matches the specified string. if no match is found, null is returned. events addtrack fired when a new audio track has been added to the media element. also available via the onaddtrack property. change fired when a track has been enabled or disabled. also available via the onchange property.
removetrack fired when a new audio track has been
removed from the media element. ...
...And 2 more matches
CSSStyleSheet - Web APIs
on for the various ways a cssstylesheet object can be obtained. properties inherits properties from its parent, stylesheet. cssrules read only returns a live cssrulelist which maintains an up-to-date list of the cssrule objects that comprise the stylesheet. this is normally used to access individual rules like this: stylesheet.cssrules[i] // where i = 0..cssrules.length-1 to add or
remove items in cssrules, use the cssstylesheet's insertrule() and deleterule() methods. ownerrule read only if this stylesheet is imported into the document using an @import rule, the ownerrule property returns the corresponding cssimportrule; otherwise, this property's value is null. methods inherits methods from its parent, stylesheet. deleterule() deletes the rule at the specified index ...
...methods from its parent, stylesheet. deleterule() deletes the rule at the specified index into the stylesheet's rule list. insertrule() inserts a new rule at the specified position in the stylesheet, given the textual representation of the rule. ...
...kely to be
removed anytime soon. rules read only the rules property is functionally identical to the standard cssrules property; it returns a live cssrulelist which maintains an up-to-date list of all of the rules in the style sheet. legacy methods these methods are legacy methods first introduced by microsoft; they should not be used if they can be avoided, but are not in danger of being
removed anytime soon. addrule() adds a new rule to the stylesheet given the selector to which the style applies and the style block to apply to the matching elements. this differs from insertrule(), which simply takes the textual representation of the entire rule as a single string. ...
...And 2 more matches
Element.getElementsByClassName() - Web APIs
at the element on which the function was called. as new elements that match names are added to the subtree, they immediately appear in the collection. similarly, if an existing element that doesn't match names has its set of classes adjusted so that it matches, it immediately appears in the collection. the opposite is also true; as elements no longer match the set of names, they are immediately
removed from the collection. in quirks mode, the class names are compared in a case-insensitive fashion. otherwise, they're case sensitive. examples matching a single class to look for elements that include among their classes a single specified class, we just provide that class name when calling getelementsbyclassname(): element.getelementsbyclassname('test'); this example finds all elements th...
...ents whose class lists include both the red and test classes: element.getelementsbyclassname('red test'); examining the results you can use either the item() method on the returned htmlcollection or standard array syntax to examine individual elements in the collection. ...
...you can use either the item() method on the returned htmlcollection or standard array syntax to examine individual elements in the collection. however the following code will not work as one might expect because "matches" will change as soon as any "colorbox" class is
removed. ...
...And 2 more matches
FileSystemEntry - Web APIs
se filesystem: scheme for the root directory of the origin of the app. for example, if your app is in http://www.html5rocks.com, open filesystem:http://www.html5rocks.com/temporary/ in a tab. chrome shows a read-only list of all the files and folders stored the origin of your app. example to see an example of how tourl() works, see the method description. ...
... filesystem read only a filesystem object representing the file system in which the entry is located. ...
... filesystem read only a filesystem object representing the file system in which the entry is located. ...
...And 2 more matches
In depth: Microtasks and the JavaScript runtime environment - Web APIs
eturn greeting; } outputelem.innerhtml += localgreeting(user) + "<br>\r"; } greetuser("mike"); greetuser("teresa"); greetuser("veronica"); this short program contains three execution contexts, some of which are created and destroyed several times over the course of the program's execution. as each context is created, it is placed on the execution context stack. when it exits, the context is
removed from the context stack. upon starting the program, the global context is created. when greetuser("mike") is reached, a context is created for the greetuser() function; this execution context is pushed onto the execution context stack. when greetuser() calls localgreeting(), another context is created to run that function. when this function returns, the context for localgreet...
...e context stack. upon starting the program, the global context is created. when greetuser("mike") is reached, a context is created for the greetuser() function; this execution context is pushed onto the execution context stack. when greetuser() calls localgreeting(), another context is created to run that function. when this function returns, the context for localgreeting() is
removed from the execution stack and destroyed. program execution resumes with the next context found on the stack, which is greetuser(); this function resumes execution where it left off. the greetuser() function returns and its context is
removed from the stack and destroyed. when greetuser("teresa") is reached, a context is created for it and pushed onto the stack. when gre...
... when greetuser("veronica") is reached, a context is created for it and pushed onto the stack. ...
...And 2 more matches
Drag Operations - Web APIs
th the text/uri-list and text/plain contain the same data in this example. this will often be true, but doesn't need to be the case. if you attempt to add data twice with the same format, the new data will replace the old data, but in the same position within the list of types as the old data. you can clear the data using the cleardata() method, which takes one argument: the type of the data to
remove. event.datatransfer.cleardata("text/uri-list"); the type argument to the cleardata() method is optional. if the type is not specified, the data associated with all types is
removed. if the drag contains no drag data items, or all of the items have been subsequently cleared, then no drag will occur. setting the drag feedback image when a drag occurs, a translucent image is generated from the ...
...opy"; in this example, copy is the effect that is performed. you can use the value none to indicate that no drop is allowed at this location, although it is preferred not to cancel the event in this case. within the drop and dragend events, you can check the dropeffect property to determine which effect was ultimately chosen. if the chosen effect were "move", then the original data should be
removed from the source of the drag within the dragend event. specifying drop targets a listener for the dragenter and dragover events are used to indicate valid drop targets, that is, places where dragged items may be dropped. most areas of a web page or application are not valid places to drop data. thus, the default handling of these events is not to allow a drop. if you want to allow a drop, you ...
...gover event will fire at the element the mouse is pointing at. naturally, you may need to move the insertion marker around a dragover event as well. you can use the event's clientx and clienty properties as with other mouse events to determine the location of the mouse pointer. finally, the dragleave event will fire at an element when the drag leaves the element. this is the time when you should
remove any insertion markers or highlighting. you do not need to cancel this event. any highlighting or other visual effects specified using the :-moz-drag-over pseudoclass will be
removed automatically. the dragleave event will always fire, even if the drag is cancelled, so you can always ensure that any insertion point cleanup can be done during this event. performing a drop when the user releases t...
...And 2 more matches
Notification.close() - Web APIs
the user already read the notification on the webpage in the case of a messaging app or the following song is already playing in a music app). ...
...the user already read the notification on the webpage in the case of a messaging app or the following song is already playing in a music app). ...
...the user already read the notification on the webpage in the case of a messaging app or the following song is already playing in a music app). ...
...And 2 more matches
TextTrackList - Web APIs
r example. properties this interface also inherits properties from its parent interface, eventtarget. length read only the number of tracks in the list. event handlers onaddtrack an event handler to be called when the addtrack event is fired, indicating that a new text track has been added to the media element. onchange an event handler to be called when the change event occurs. on
removetrack an event handler to call when the
removetrack event is sent, indicating that a text track has been
removed from the media element. methods this interface also inherits methods from its parent interface, eventtarget. gettrackbyid() returns the texttrack found within the texttracklist whose id matches the specified string. if no match is found, null is returned. events addtrack f...
...rget. gettrackbyid() returns the texttrack found within the texttracklist whose id matches the specified string. if no match is found, null is returned. events addtrack fired when a new text track has been added to the media element. also available via the onaddtrack property. change fired when a text track has been made active or inactive. also available via the onchange property. ...
...nd within the texttracklist whose id matches the specified string. if no match is found, null is returned. events addtrack fired when a new text track has been added to the media element. also available via the onaddtrack property. change fired when a text track has been made active or inactive. also available via the onchange property.
removetrack fired when a new text track has been
removed from the media element. ...
...And 2 more matches
Touch events - Web APIs
pads. the touch events interfaces are relatively low-level apis that can be used to support application-specific multi-touch interactions such as a two-finger gesture. a multi-touch interaction starts when a finger (or stylus) first touches the contact surface. other fingers may subsequently touch the surface and optionally move across the touch surface. the interaction ends when the fingers are
removed from the surface. during this interaction, an application receives touch events during the start, move, and end phases. touch events are similar to mouse events except they support simultaneous touches and at different locations on the touch surface. the touchevent interface encapsulates all of the touchpoints that are currently active. the touch interface, which represents a single touchpoint,...
...ther. after drawing the line, we call array.splice() to replace the previous information about the touchpoint with the current information in the ongoingtouches array. handling the end of a touch when the user lifts a finger off the surface, a touchend event is sent. we handle this by calling the handleend() function below. its job is to draw the last line segment for each touch that ended and
remove the touchpoint from the ongoing touch list. function handleend(evt) { evt.preventdefault(); log("touchend"); var el = document.getelementbyid("canvas"); var ctx = el.getcontext("2d"); var touches = evt.changedtouches; for (var i = 0; i < touches.length; i++) { var color = colorfortouch(touches[i]); var idx = ongoingtouchindexbyid(touches[i].identifier); if (idx >= 0) { ...
...the result is that we stop tracking t...
...And 2 more matches
VideoTrackList - Web APIs
track, if any, or −1 otherwise. event handlers onaddtrack an event handler to be called when the addtrack event is fired, indicating that a new video track has been added to the media element. onchange an event handler to be called when the change event occurs — that is, when the value of the selected property for a track has changed, due to the track being made active or inactive. on
removetrack an event handler to call when the
removetrack event is sent, indicating that a video track has been
removed from the media element. methods this interface also inherits methods from its parent interface, eventtarget. gettrackbyid() returns the videotrack found within the videotracklist whose id matches the specified string. if no match is found, null is returned. events addtrack...
.... gettrackbyid() returns the videotrack found within the videotracklist whose id matches the specified string. if no match is found, null is returned. events addtrack fired when a new video track has been added to the media element. also available via the onaddtrack property. change fired when a video track has been made active or inactive. also available via the onchange property. ...
...ithin the videotracklist whose id matches the specified string. if no match is found, null is returned. events addtrack fired when a new video track has been added to the media element. also available via the onaddtrack property. change fired when a video track has been made active or inactive. also available via the onchange property.
removetrack fired when a new video track has been
removed from the media element. ...
...And 2 more matches
Alerts - Accessibility
...
...llows for them continue modifying the form without losing focus (caused by the “onblur” handler in javascript's default ‘alert’ function). ...
... (caused by the “onblur” handler in javascript's default ‘alert’ function). ...
...And 2 more matches
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
the item will not be taken out of normal flow in the way that floats are. if you have used the vertical-align property, as used with inline-block or table layout for alignment, this will no longer affect the item and you can use the alignment properties of flexbox instead. in this next live example the child elements have been floated, and then their container has had display: flex added. if you
remove display: flex, you should see that the .box element collapses as we have no clearing applied. this demonstrates that the float is happening. re-apply display: flex and the collapsing does not happen. this is because the items no longer have a float applied, as they have been transformed into flex items. flexbox and grid layout css grid layout and flexbox generally act in the same way with reg...
...ements still generate boxes as normal. for the purposes of box generation and layout, the element must be treated as if it had been replaced with its children and pseudo-elements in the document tree.” this value of display controls box generation, and whether the element should generate a box that we can style and see on the page, or whether instead the box it would normally create should be
removed and the child elements essentially moved up to participate in whatever layout method the parent would have been part of. this is much easier to see with an example. in the following live example i have a flex container with three child elements. one of these flex items has two elements nested inside it, which would not ordinarily participate in flex layout. flex layout only applies to the direc...
...lex layout. flex layout only applies to the direct children of a flex container. by adding display: contents to the wrapper around the nested elements, you can see that that item has disappeared from the layout, allowing the two sub-children to be laid out as if they were direct children of the flex container. you can try removing the display: contents line to see it return. note that this only
removes the box from the layout; the sub-children don’t become direct children in any other way. you can see that as i have used a direct child selector to add the background and borders to the flex items, this has not been applied to our nested children. they have been laid out as flex items, but as they are not direct children they do not get the other styling. warning: current implementations in ...
...And 2 more matches
Deprecated and obsolete features - JavaScript
regexp properties the following properties are deprecated. ...
... regexp properties the following properties are deprecated. ...
... by one, two, or three octal digits) are deprecated in string and regular expression literals. the escape and unescape functions are deprecated. use encodeuri, encodeuricomponent, decodeuri or decodeuricomponent to encode and decode escape sequences for special characters. string methods html wrapper methods like string.prototype.fontsize and string.prototype.big. ...
...And 2 more matches
Array.prototype.pop() - JavaScript
pop is intentionally generic; this method can be called or applied to objects resembling arrays. ...
... pop is intentionally generic; this method can be called or applied to objects resembling arrays. ...
...hod changes the length of the array. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax arrname.pop() return value the
removed element from the array; undefined if the array is empty. description the pop method
removes the last element from an array and returns that value to the caller. pop is intentionally generic; this method can be called or applied to objects resembling arrays. objects which do not contain a length property reflecting the last in a series of consecutive, zero-based numerical properties may not behave in any meaningful manner. if you call pop() on an empty array, it returns undefined. ar...
...And 2 more matches
Array - JavaScript
nana'] console.log(fruits.length) // 2 access an array item using the index position let first = fruits[0] // apple let last = fruits[fruits.length - 1] // banana loop over an array fruits.foreach(function(item, index, array) { console.log(item, index) }) // apple 0 // banana 1 add an item to the end of an array let newlength = fruits.push('orange') // ["apple", "banana", "orange"]
remove an item from the end of an array let last = fruits.pop() //
remove orange (from the end) // ["apple", "banana"]
remove an item from the beginning of an array let first = fruits.shift() //
remove apple from the front // ["banana"] add an item to the beginning of an array let newlength = fruits.unshift('strawberry') // add to the front // ["strawberry", "banana"] find the index of an item ...
...
remove an item from the beginning of an array let first = fruits.shift() //
remove apple from the front // ["banana"] add an item to the beginning of an array let newlength = fruits.unshift('strawberry') // add to the front // ["strawberry", "banana"] find the index of an item in the array fruits.push('mango') // ["strawberry", "banana", "mango"] let pos = fruits.indexof('banana') // 1
remove an item by index position let
removeditem = fruits.splice(pos, 1) // this is how to
remove an item // ["strawberry", "mango"]
remove items from an index position let vegetables = ['cabbage', 'turnip', 'radish', 'carrot'] console.log(vegetables) // ["cabbage", "turnip", "radish", "carrot"] let pos = 1 let n = 2 let
removeditems = vegetables.splice(pos, n) // this is how to
remove items, n de...
...
removeditem = fruits.splice(pos, 1) // this is how to
remove an item // ["strawberry", "mango"]
remove items from an index position let vegetables = ['cabbage', 'turnip', 'radish', 'carrot'] console.log(vegetables) // ["cabbage", "turnip", "radish", "carrot"] let pos = 1 let n = 2 let
removeditems = vegetables.splice(pos, n) // this is how to
remove items, n defines the number of items to be
removed, // starting at the index position specified by pos and progressing toward the end of array. console.log(vegetables) // ["cabbage", "carrot"] (the original array is changed) console.log(
removeditems) // ["turnip", "radish"] copy an array let shallowcopy = fruits.slice() // this is how to make a copy // ["strawberry", "mango"] accessing array elements javascript arrays are zero-indexed. t...
...And 2 more matches
SDK API Lifecycle - Archive of obsolete content
apis need to be able to introduce new apis that aren't yet fully proven, and to retire old apis when they're no longer optimal or supported by the underlying platform. the api lifecycle aims to balance these competing demands. ...
... unstable the api is in the process of settling, but has not yet had sufficient real-world testing to be considered stable. backwards-compatibility will be maintained if reasonable. ...
...form users that the module is deprecated. attempts to use a deprecated module at runtime will log an error to the error console. the amo validator will throw errors when deprecated modules are used, and these add-ons will therefore fail amo review. ...
...formation about what to use instead of the deprecated module and when the module will be completely
removed. removal the target removal date is 18 weeks after deprecation. in preparation for this date the sdk team will decide whether to go ahead with removal: this will depend on how many developers have successfully migrated from the deprecated module, and on how urgently the module needs to be
removed. if it's ok to
remove the module, it will be
removed. the sdk team will
remove the corresponding documentation, and communicate the removal in the usual ways: the release notes, the add-ons blog, and the jetpack google group. if it's not ok to
remove it, the team will continue to support migration and aim to
remove the module in the next release. ...
event/core - Archive of obsolete content
nt of a specific type may be emitted on any event target object using the emit function. this will call all registered listeners for the given type on the given event target in the same order they were registered. emit(target, 'message', 'event'); // info: 'hello event' emit(target, 'data', { type: 'data' }, 'second arg'); // info: [object object] 'second arg' registered event listeners may be
removed using off function: off(target, 'message'); emit(target, 'message', 'bye'); // info: 'hello bye' sometimes listener only cares about first event of specific type. to avoid hassles of removing such listeners there is a convenient once function: once(target, 'load', function() { console.log('ready'); }); emit(target, 'load') // info: 'ready' emit(target, 'load') there are also convenient w...
... off function: off(target, 'message'); emit(target, 'message', 'bye'); // info: 'hello bye' sometimes listener only cares about first event of specific type. ...
...o: 'hello bye' sometimes listener only cares about first event of specific type. to avoid hassles of removing such listeners there is a convenient once function: once(target, 'load', function() { console.log('ready'); }); emit(target, 'load') // info: 'ready' emit(target, 'load') there are also convenient ways to
remove registered listeners. all listeners of the specific type can be easily
removed (only two argument must be passed): off(target, 'message'); also, removing all registered listeners is possible (only one argument must be passed): off(target); globals functions on(target, type, listener) registers an event listener that is called every time events of the specified type is emitted on the given event target. parameters target : object event target object. type : str...
... event listener. if no 'error' listener is registered exception will be logged into an error console. parameters target : object event target object. type : string the type of event. message : object|number|string|boolean first argument that will be passed to listeners. arguments : object|number|string|boolean more arguments that will be passed to listeners. off(target, type, listener)
removes an event listener for the given event type on the given event target. if no listener is passed
removes all listeners of the given type. if type is not passed
removes all the listeners of the given event target. parameters target : object event target object. type : string the type of event. listener : function the listener function that processes the event. count() returns a number of e...
remote/child - Archive of obsolete content
access to web content loaded into this child process port mechanisms to communicate with the main process interacting with web content to interact with web content, the sdk/remote/child module provides a frames property that's a list of all content frames loaded into this child process. each frame then has a content property that's the top-level dom window for the frame, and addeventlistener/
removeeventlistener functions that enable you to listen to dom events dispatched by the frame. communicating with the parent process to communicate with the parent process, the process, frames, and frame objects in sdk/remote/child have a port object that you can use to receive messages from, and send messages to, code in the parent. see the documentation for sdk/remote/parent for more details. glob...
...as frames are created and destroyed. methods forevery calls the callback for every existing frame and any new frames created in the future. this is a shortcut for enumerating existing frames and then listening for attach events. getframeforwindow finds the frame for a top level dom window. addeventlistener adds an event listener for dom events dispatched to any existing and future frames.
removeeventlistener
removes an event listener that was previously registered. properties port an event emitter that sends and receives events from every frame in this process. events attach triggered when a new content frame is opened (for example, the user opened a new tab). the event listener gets a frame object as an argument. at this point you can't access frame's content yet, but you can a...
...e event listener gets a frame object as an argument. at this point you can't access frame's content yet, but you can add event listeners: const { frames } = require("sdk/remote/child"); frames.on("attach", function(frame) { console.log("new frame"); frame.addeventlistener("domcontentloaded", function(e) { console.log(e.target.location.href); }); }); detach triggered when a frame is
removed (for example, the user closed a tab). frame a frame represents a content frame in this process and provides a way to communicate frame specific events to the main process. methods addeventlistener(event, listener, iscapturing) adds an event listener for dom events dispatched by this content frame. this can include load and unload events from any content that is loaded in the frame. listener...
...user closed a tab). frame a frame represents a content frame in this process and provides a way to communicate frame specific events to the main process. methods addeventlistener(event, listener, iscapturing) adds an event listener for dom events dispatched by this content frame. this can include load and unload events from any content that is loaded in the frame. listeners are automatically
removed when this frame is destroyed.
removeeventlistener(event, listener, iscapturing)
removes an event listener that was previously registered. properties port an event emitter that can be used to send and receive frame specific events to and from code in the main process. content the top level dom window currently displaying in this frame. istab a boolean property indicating whether this fra...
ui/frame - Archive of obsolete content
r window.postmessage(). you can use this to communicate only with the specific frame instance that generated the event, and not to any frame instance attached to other browser windows. once(event, listener) assign a listener to the first occurrence only of an event emitted by the frame. frame supports the following events: attach, detach, load, ready, and message. the listener is automatically
removed after the first time the event is emitted. var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); frame.once("message", pong) function pong(e) { if (e.data == "ping") { // message only the sender, and not any frames attached to other browser windows e.source.postmessage("pong", "*"); } } parameters event : string the name of the event to lis...
...vents: attach, detach, load, ready, and message. listener : function the listener function. this is passed an event object which always contains a source property, which has a postmessage() function modeled after window.postmessage(). you can use this to communicate only with the specific frame instance that generated the event, and not to any frame instance attached to other browser windows. ...
...y, and message. listener : function the listener function. this is passed an event object which always contains a source property, which has a postmessage() function modeled after window.postmessage(). you can use this to communicate only with the specific frame instance that generated the event, and not to any frame instance attached to other browser windows.
removelistener(event, listener)
removes an event listener. for example, this code is equivalent to once(): var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); frame.on("message", pong) function pong(e) { if (e.data == "ping") { e.source.postmessage("pong", "*"); } frame.
removelistener("message", pong) } parameters event : string the event the listener is listening for. frame supp...
..."); var frame = new frame({ url: "./frame.html" }); frame.on("message", pong) function pong(e) { if (e.data == "ping") { e.source.postmessage("pong", "*"); } frame.
removelistener("message", pong) } parameters event : string the event the listener is listening for. frame supports the following events: attach, detach, load, ready, and message. listener : function the listener to
remove. off(event, listener) this function is an alias for
removelistener(). parameters event : string the event the listener is listening for. frame supports the following events: attach, detach, load, ready, and message. listener : function the listener to
remove. destroy() destroy the frame. after calling this function, the frame will no longer appear in the ui, and accessing any of its prop...
ui/toolbar - Archive of obsolete content
listen to. toolbar supports the following events: attach, detach, show, and hide. listener : function the listener function. this may be passed arguments, depending on the particular event. once(event, listener) assign a listener to the first occurrence only of an event emitted by the toolbar. toolbar supports the following events: attach, detach, show, and hide. the listener is automatically
removed after the first time the event is emitted. var { toolbar } = require("sdk/ui/toolbar"); var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); var toolbar = toolbar({ title: "my toolbar", items: [frame] }); toolbar.once("show", showing); toolbar.once("hide", hiding); function showing(e) { console.log("showing: " + e.title); } function hiding(e) { ...
...oolbar.once("hide", hiding); function showing(e) { console.log("showing: " + e.title); } function hiding(e) { console.log("hiding: " + e.title); } parameters event : string the name of the event to listen to. toolbar supports the following events: attach, detach, show, and hide. listener : function the listener function. this may be passed arguments, depending on the particular event.
removelistener(event, listener)
removes an event listener. for example, this code is equivalent to once(): var { toolbar } = require("sdk/ui/toolbar"); var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); var toolbar = toolbar({ title: "my toolbar", items: [frame] }); toolbar.on("show", showing); toolbar.on("hide", hiding); function showing(e) { console.
...event listener. for example, this code is equivalent to once(): var { toolbar } = require("sdk/ui/toolbar"); var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); var toolbar = toolbar({ title: "my toolbar", items: [frame] }); toolbar.on("show", showing); toolbar.on("hide", hiding); function showing(e) { console.log("showing: " + e.title); toolbar.
removelistener("show", showing); } function hiding(e) { console.log("hiding: " + e.title); toolbar.
removelistener("hide", hiding); } parameters event : string the event the listener is listening for. toolbar supports the following events: attach, detach, show, and hide. listener : function the listener to
remove. off(event, listener) this function is an alias for
removelistener(). parameter...
... destroy() destroys the toolbar. after calling this function, the toolbar will no longer be visible and its menu item will no longer appear in the firefox "toolbars" menu. calling this function also causes the detach event to be emitted. ...
util/array - Archive of obsolete content
alse. let { add } = require('sdk/util/array'); let a = ['alice', 'bob', 'carol']; add(a, 'dave'); // true add(a, 'dave'); // false add(a, 'alice'); // false console.log(a); // ['alice', 'bob', 'carol', 'dave'] parameters array : array the array to add the element to. element : * the element to add returns boolean : a boolean indicating whether or not the element was added to the array. ...
...dd(a, 'dave'); // true add(a, 'dave'); // false add(a, 'alice'); // false console.log(a); // ['alice', 'bob', 'carol', 'dave'] parameters array : array the array to add the element to. element : * the element to add returns boolean : a boolean indicating whether or not the element was added to the array.
remove(array, element) if the given array contains the given element, this function
removes the element from the array and returns true. otherwise, this function does not alter the array and returns false. let {
remove } = require('sdk/util/array'); let a = ['alice', 'bob', 'carol'];
remove(a, 'dave'); // false
remove(a, 'bob'); // true
remove(a, 'bob'); // false console.log(a); // ['alice', 'carol'] parameters array : array the array to
remove the element from. element : * th...
... unique(array) produces a duplicate-free version of the given array. ...
... unique(array) produces a duplicate-free version of the given array. ...
util/list - Archive of obsolete content
experimental building blocks for composing lists. globals constructors list(element1, element2, ...) constructor can takes any number of elements and creates an instance of list populated with the specified elements. parameters element1 : object|string|number element2 : object|string|number ... : object|string|number functions addlistitem(list, item) function adds a item to a list.
removelistitem(list, item) function
removes an item from a list list an ordered collection (also known as a sequence) disallowing duplicate elements. list is composed out of iterable, therefore it provides custom enumeration behavior that is similar to array (enumerates only on the elements of the list). list is a base trait and is meant to be part of a composition, since all of its api is private e...
...ior that is similar to array (enumerates only on the elements of the list). list is a base trait and is meant to be part of a composition, since all of its api is private except for the length property. ...
...ar to array (enumerates only on the elements of the list). list is a base trait and is meant to be part of a composition, since all of its api is private except for the length property. ...
...it and is meant to be part of a composition, since all of its api is private except for the length property. examples: var { list } = require("sdk/util/list"); var mylist = list.compose({ add: function add(item1, item2, /*item3...*/) { array.slice(arguments).foreach(this._add.bind(this)); },
remove: function
remove(item1, item2, /*item3...*/) { array.slice(arguments).foreach(this._
remove.bind(this)); } }); mylist('foo', 'bar', 'baz').length == 3; // true new mylist('new', 'keyword').length == 2; // true mylist.apply(null, [1, 2, 3]).length == 3; // true let list = mylist(); list.length == 0; // true list.add(1, 2, 3) == 3; // true properties length number of elements in this list. ...
cfx to jpm - Archive of obsolete content
her rename your "main.js" to "index.js" and move it from "lib" to the top level or add a main field to package.json with the value "lib/main.js". loading modules the jpm tool uses the same logic as node.js to determine how to resolve the argument to require(). in most respects this is the same as the old cfx logic. however there are a few differences, because old compatibility shims have been
removed. requiring local modules suppose your add-on is structured into separate modules: my-addon lib main.js utils.js when you want to use the "utils" module in "main.js", you should use a path relative to "main.js", and prefix the path with "./" to indicate that it's a relative path: var utils = require("./utils"); however, with cfx you are also allowed to ...
...tutorial on using third-party modules with jpm. mobile development jpm does not support the "--force-mobile" option, instead you will need to define engines in package.json and add "fennec" there. ...
...e "--force-mobile" option, instead you will need to define engines in package.json and add "fennec" there. there is a known bug in simple options handling which may require the workaround described in https://bug635044.bugzilla.mozilla.org/show_bug.cgi?id=1243467 commands and command options permanently
removed commands jpm has dropped support for all the "internal" cfx commands. permanently
removed options jpm has dropped support for: --extra-packages --use-config --package-path --pkgdir --no-strip-xpi --harness-option --manifest-overload --output-file --templatedir --keydir --profiledir --overload-modules --static-args --app --no-run --addons --e10s --logfile --dependencies --force-mobile --test-runner-pkg instead of --profiledir and --overload-modules, use --profile and --overload. i...
...profiledir --overload-modules --static-args --app --no-run --addons --e10s --logfile --dependencies --force-mobile --test-runner-pkg instead of --profiledir and --overload-modules, use --profile and --overload. instead of using --force-mobile, explicitly add fennec to engines section of your package.json. package.json fields many package.json fields are implicit commands to cfx. in jpm, we've
removed support for some of these fields, and are still working on supporting some others. permanently
removed fields data fullname - use title instead lib packages tests icon64 package.json escaping where with cfx you might have had to escape with 2 upto 3 backslashes ( \ ), jpm only needs one now. ...
JavaScript Daemons Management - Archive of obsolete content
alse, bend = odmn.isatend(), binvert = odmn.reversals > 0; if (bend && !binvert || bbreak) { odmn.pause(); return false; } if (bend && binvert) { odmn.backw = !odmn.backw; odmn.reversals--; } return true; }; /* system not required daemon global object methods */ /** * daemon global object optional methods (shortcuts). you could safely
remove all or some of them, * depending on your needs. if you want to
remove them and are using the daemon.safe subsystem you * should also
remove the daemon.safe global object methods that require them. **/ daemon.construct = function (aargs) { var odmn = new this.blank(); this.apply(odmn, aargs); return odmn; }; daemon.buildaround = function (octx, nrate, nlen) { if (!oct...
....length; }; daemon.prototype.synchronize = function () { if (this.paused) { return; } clearinterval(this.session); this.session = setinterval(daemon.forcecall, this.rate, this); }; daemon.prototype.pause = function () { clearinterval(this.session); this.paused = true; }; /* system not required daemon instances methods */ /** * basic user interface. you could
remove this method, but your daemon will be virtually unusable. * all other optional instances methods depend on this one or on the previous ones. **/ daemon.prototype.start = function (breverse) { var bbackw = boolean(breverse); if (this.backw === bbackw && (this.isatend() || !this.paused)) { return false; } this.backw = bbackw; this.paused = false; if (this.onstart) { this.o...
...t = odmn.reversals > 0; if (bend && !binvert || bbreak) { odmn.paused = true; return false; } if (bend && binvert) { odmn.backw = !odmn.backw; odmn.reversals--; } odmn.synchronize(); return true; }; /* system not required daemon.safe global object methods */ /** * daemon.safe global object optional methods (shortcuts). you could safely
remove all or some of * them, depending on your needs. **/ /* warning: this method requires the global daemon.construct() method */ daemon.safe.construct = daemon.construct; /* warning: this method requires the global daemon.buildaround() method */ daemon.safe.buildaround = daemon.buildaround; /* warning: this method requires the global daemon.incorporate() method */ daemon.safe...
...ces methods */ /* [inherited from daemon.prototype] */ /**************************************** * the safe-daemon is now ready! * *****************************************/ daemon-methods.js what follows is a module which collects a wide and scalable list of additional methods for instances of daemon (and daemon.safe). this module requires daemon.js to work. you can safely
remove all or some of these methods, depending on your needs (modularity). when a method requires the presence of another method (it is relatively rare), there is a comment which explains why. if there are not comments to that method it depends only on the base system. /*\ |*| |*| ******************************* |*| * daemon-methods.js * |*| ******************************* |...
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
try to avoid using it. draft this page is not complete. « previousnext » this document was authored by taiga (gomita) gomibuchi and was originally published in japanese for the firefox developers conference summer 2007. gomita-san won "most useful upgraded extension" award in mozilla's 2006 "extend firefox" competition for scrapbook, and was runner-up in the "extend firefox 2" contest for firegestures. the chapters so far have each focused on technologies in isolation—xul, javascript, css, and xpcom. ...
...erface to delete all files within the directory you got earlier. refer to the section “traversing folders” in chapter 4. listing 21: content for clear method clear: function(event) { event.preventbubble(); var fileenum = this._dir.directoryentries; while (fileenum.hasmoreelements()) { var file = fileenum.getnext().queryinterface(components.interfaces.nsifile); file.
remove(false); // debug dump("sessionstore> clear: " + file.leafname + "\n"); } }, _readfile method reads the nslfile object passed as a parameter, and returns its contents as a text string. when the file is read in, its contents are converted from utf-8 to unicode. listing 22: content for _readfile method _readfile: function(afile) { try { var stream = components.cl...
...es menuitem elements based on the names of all the files in the session-storage directory, and inserts them into the menu. ...
...s directory you will need to delete the files compreg.dat and xpti.dat inside the profile folder and relaunch firefox. default preferences file inside the defaults\preferences directory you will need to relaunch firefox. chrome.manifest you will need to relaunch firefox. install.rdf you will need to temporarily uninstall the extension and then reinstall it. in practice, what you’ll do is
remove the pointer file, relaunch firefox, return the pointer file, and relaunch firefox again. on a linux system, use the touch command on the directory pointed at by the pointer file to change its “last changed” date, and avoid the relaunching. the session store api the session store api4 is one of the new developer-oriented features in firefox 2. using the various methods in the nslsessionstore...
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
functions for opening files and character-code conversion, among other things. a different mechanism is needed to perform these functions. internet explorer handles this using activex; in firefox, we use the cross-platform component object model, or xpcom. due to deprecation of enableprivilege this functionality can not be used in web pages. enableprivilege is disabled in firefox 15 and will be
removed in firefox 17. about xpcom xpcom is a framework for developing platform-independent components. components developed in line with that framework are referred to as xpcom components, and sometimes the components are simply referred to as xpcoms. firefox itself includes a great number of xpcom components, and they can be used in extensions as well. sometimes an extension will be packaged with a...
...ng. listing 6: creating an xpcom object representing a file var file = components.classes['@mozilla.org/file/local;1'] .createinstance(components.interfaces.nsilocalfile); file.initwithpath('c:\\temp\\temp.txt'); creating and deleting files listing 7 shows how to delete a file if it exists, and create a new file with the same name. ...
...ows how to delete a file if it exists, and create a new file with the same name. passing true as a parameter for the nsilocalfile.
remove() method will recursively delete folders and files. let's see what happens when we pass true to delete all the contents of a folder. listing 7: check that file exists, delete it, and create it file.initwithpath('c:\\temp\\temp.txt'); if (file.exists()) file.
remove(false); file.create(file.normal_file_type, 0666); the first parameter of the nsilocalfile.create() method gives the type of file to create. this is defined using constant properties—to create a normal file, use normal_file_type, to create a folder use directory_type. the second parameter gives the access privileges to that file using unix-style octal values. note: windows ignores the privile...
...ile. here, we're outputting a text file consisting of the ascii characters "xul." when we initialized nsifileinputstream, we set the second and third parameters to initialize it in write-only mode. here again, once the process is complete, you should close all streams. ...
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
number can be hard-coded in the first run function, or you can use the add-on manager to dynamically get it. this can get tricky with the firefox 4 addonmanager, so it's probably best to keep it simple. uninstall scripts there are two common cases for needing these: cleaning up local data and presenting an uninstall feedback form. regarding local data, it is debatable if it is good practice to
remove it or not. if an add-on is uninstalled and later installed again, it might be desirable for preferences and other settings to be kept. another argument in favor of keeping that data is that firefox doesn't delete its profile folders after it is uninstalled, so it would be consistent to keep it. on the other hand, local data that is no longer needed takes unnecessary disk space and can contain pri...
...elete its profile folders after it is uninstalled, so it would be consistent to keep it. on the other hand, local data that is no longer needed takes unnecessary disk space and can contain private information that users forget is there. it's up to the developer's discretion. uninstalling an add-on happens in 2 stages: first the add-on is flagged to be uninstalled, and then the add-on is actually
removed. in the case of bootstrapped extensions, both steps happen at the same time. in the case of "traditional" extensions, like those explained in the tutorial, both steps happen at different times. in this case the user is told that firefox needs to restart in order for the extension to be completely
removed. then the user has the option to restart right away, wait to restart whenever is convenient,...
... so, in order to detect the first stage, you'll need to add an event listener using the addaddonlistener method. ...
...user can revert this decision. so, you should listen to other events, like canceling the operation, to make sure that you know what is going on. set a boolean flag that indicates if your add-on is set to be uninstalled or not, and reset it when necessary. the second stage is knowing when the application is actually going to be closed. then you'll have reasonable certainty that the add-on will be
removed and you can perform any cleanup operations safely. for this, you need to add an observer for the quit-application topic. this is when you'll know the application will close. then you can check the flag you set up on the first stage and perform any necessary deletions. you shouldn't perform very time-consuming operations here, at least not without telling users what is going on. ...
Intercepting Page Loads - Archive of obsolete content
browser window. it is full of useful functions, so you should always keep it in mind when you want to handle tabs and web content windows. attaching the load event handler to gbrowser allows us to listen to these events for all tabs, without having to worry how many tabs are open. gbrowser exists in every browser window. we store the handler function in a private variable because later we want to
remove it when we do not need it anymore. gbrowser.
removeeventlistener("load", this._loadhandler, true); finally, the actual code for the handler, which is very simple: _onpageload : function(event) { // this is the content document of the loaded page. let doc = event.originaltarget; if (doc instanceof htmldocument) { // is this an inner frame? if (doc.defaultview.frameelement) { ...
...ation. webprogresslisteners when used in the chrome, this is a more sophisticated way of intercepting and modifying the various stages in page loads. but of course, there's always a price to pay: web progress listeners in the chrome are attached to specific instances of the browser element. what does this mean? it means you have to keep track of tabs being opened and closed, in order to add and
remove your listener. here's a code sample that keeps track of your progress listeners for all tabs: init : function() { gbrowser.browsers.foreach(function (browser) { this._toggleprogresslistener(browser.webprogress, true); }, this); gbrowser.tabcontainer.addeventlistener("tabopen", this, false); gbrowser.tabcontainer.addeventlistener("tabclose", this, false); }, uninit : function() { ...
...ction (browser) { this._toggleprogresslistener(browser.webprogress, true); }, this); gbrowser.tabcontainer.addeventlistener("tabopen", this, false); gbrowser.tabcontainer.addeventlistener("tabclose", this, false); }, uninit : function() { gbrowser.browsers.foreach(function (browser) { this ._toggleprogresslistener(browser.webprogress, false); }, this); gbrowser.tabcontainer.
removeeventlistener("tabopen", this, false); gbrowser.tabcontainer.
removeeventlistener("tabclose", this, false); }, handleevent : function(aevent) { let tab = aevent.target; let webprogress = gbrowser.getbrowserfortab(tab).webprogress; this._toggleprogresslistener(webprogress, ("tabopen" == aevent.type)); }, _toggleprogresslistener : function(awebprogress, aisadd) { if (aisadd) { awebpr...
...we register and unregister the progress listeners for the first tab manually, and then add tab open and close event listeners so we can keep track of the rest of the listeners for all the tabs. we're being careful about removing all listeners, as not doing it has the potential of causing memory leaks. there are a couple of thin...
Observer Notifications - Archive of obsolete content
otification. this example code shows you what an implementation of the nsiobserver interface looks like: let testobserver = { observe : function(asubject, atopic, adata) { if (atopic == "xulschoolhello-test-topic") { window.alert("data received: " + adata); } } } in order for this observer to work, you need to use the observer service that provides methods for you to add,
remove, notify and enumerate observers. adding an observer to the observer service is simple, invoking the addobserver method with three parameters. the first parameter is an observer object, the second parameter is a notification topic, and the third parameter is a boolean which indicates whether the observer service should hold a weak reference to the observer. you should normally set the third param...
...ly set the third parameter to false. let observerservice = components.classes["@mozilla.org/observer-service;1"]. getservice(components.interfaces.nsiobserverservice); observerservice.addobserver(testobserver, "xulschoolhello-test-topic", false); you should come up with a notification topic that is unique so you know it will not conflict with firefox or other extensions topics. to
remove an observer for a specific topic, you use the
removeobserver method. the method takes the observer object and notification topic as parameters. observerservice.
removeobserver(testobserver, "xulschoolhello-test-topic"); after you have registered some observers to listen to a notification topic, you can then use the notifyobservers method to send a notification to all of them. the method take...
...l is used to notify all registered observers about the notification topic "xulschoolhello-test-topic". the input parameter is an instance of nsisupportsstring with some text and the last input parameter is a string "hello". in a chrome browser overlay file, we register an observer to listen to the notification topic "xulschoolhello-test-topic" when the window loads. keep in mind that you have to
remove observers that are not longer needed. not doing so will result in memory leaks. therefore, the registered observer is unregistered when the browser window is unloaded. /** * controls the browser overlay for the hello world extension. */ xulschoolchrome.browseroverlay = { /* observer service. */ _observerservice : null, /** * initializes this object. */ init : function() { ...
...ice : null, /** * initializes this object. */ init : function() { this._observerservice = components.classes["@mozilla.org/observer-service;1"]. getservice(components.interfaces.nsiobserverservice); this._observerservice.addobserver(this, "xulschoolhello-test-topic", false); }, /** * unitializes this object. */ uninit : function() { this._observerservice.
removeobserver( this, "xulschoolhello-test-topic"); }, /** * observes the registered notification topics. * @param asubject the nsisupports object associated with the notification. * @param atopic the notification topic. * @param adata the additional string associated with the notification. */ observe : function(asubject, atopic, adata) { if (atopic == "xulschoolhello-tes...
Updating addons broken by private browsing changes - Archive of obsolete content
yncfavicons/nsifaviconservice: setandfetchfaviconforpage/setandloadfaviconforpage now take a required privacy status argument, either nsifaviconservice.favicon_load_private or nsifaviconservice.favicon_load_non_private. nsiwebbrowserpersist: saveuri gained a new argument; see the nsiwebbrowserpersist docs for more information. nsicontentprefservice: getpref, setpref, haspref, hascachedpref,
removepref,
removegroupedprefs,
removeprefsbyname, getprefs, and getprefsbyname all take a required nsiloadcontext argument to indicate the privacy status of the pref in question. use privatebrowsingutils.getprivacycontextfromwindow(win) to obtain it from the relevant window. nsidownloadmanager/nsidownload: integer download ids (and specifically the id property of nsidownload) are deprecated, and ...
...cy status of the pref in question. use privatebrowsingutils.getprivacycontextfromwindow(win) to obtain it from the relevant window. nsidownloadmanager/nsidownload: integer download ids (and specifically the id property of nsidownload) are deprecated, and don't allow access to private downloads. all downloads now use guids, and contain a new guid property. nsidownload now has retry, cancel,
remove, pause, and resume methods which should be used instead of deprecated similarly-named nsidownloadmanager methods. nsidownload's getdownload method is deprecated; use the asynchronous getdownloadbyguid method instead. nsidownloadmanager now has activeprivatedownloads, activeprivatedownloadcount, and privatedbconnection members to complement the existing public ones. nsidownloadmanager's addlist...
...the asynchronous getdownloadbyguid method instead. nsidownloadmanager now has activeprivatedownloads, activeprivatedownloadcount, and privatedbconnection members to complement the existing public ones. nsidownloadmanager's addlistener method is deprecated. addprivacyawarelistener should be used instead, or no notifications will be received for private downloads. ...
...otifications will be received for private downloads. there is a new download-manager-
remove-download-guid notification, which passes an nsisupportscstring subject for the guid or null. nsihttpauthmanager: setauthidentity and getauthidentity now take an optional boolean parameter to indicate whether the identity is classified as private. nsistricttransportsecurityservice: processstsheader,
removestsstate, isstshost, and isstsuri now take a flags parameter that understands nsisocketprovider.no_permanent_storage or nothing. nsiprivatebrowsingservice: this service is deprecated, and as of firefox 20 it is now an empty interface. if your code depends on this interface, it will break. the global private browsing service is actively being
removed, and may not even exist as of firefox 21. ns...
JXON - Archive of obsolete content
s.keylength > 0; }; */ var myobject = new jxontree(doc); // we got our javascript object! try: alert(json.stringify(myobject)); note: if you want to freeze the whole object tree (because of the "static" nature of an xml document), uncomment the string: /* object.freeze(this); */. the object.freeze() method prevents new properties from being added to it, prevents existing properties from being
removed and prevents existing properties, or their enumerability, configurability, or writability, from being changed. in essence the object tree is made effectively immutable. with this algorithm our example becomes: { "catalog": { "product": { "catalog_item": [{ "item_number": { "keyvalue": "qwz5671" }, "price": { "keyvalue": 39.95 }, "si...
...ject.freeze(this); */ } var myobject = new jxontree(doc); // we got our javascript object! try: alert(json.stringify(myobject)); note: if you want to freeze the whole object tree (because of the "static" nature of an xml document), uncomment the string: /* object.freeze(this); */. the object.freeze() method prevents new properties from being added to it, prevents existing properties from being
removed and prevents existing properties, or their enumerability, configurability, or writability, from being changed. in essence the object tree is made effectively immutable. with this algorithm our example becomes: { "catalog": { "product": { "catalog_item": [{ "item_number": { "keyvalue": "qwz5671" }, "price": { "keyvalue": 39.95 }, ...
... var myobject = getjxontree(doc); // we got our javascript object! try: alert(json.stringify(myobject)); note: if you want to freeze the whole object tree (because of the "static" nature of an xml document), uncomment the string: /* if (nlength > 0) { object.freeze(vresult); } */. the object.freeze() method prevents new properties from being added to it, prevents existing properties from being
removed and prevents existing properties, or their enumerability, configurability, or writability, from being changed. in essence the object tree is made effectively immutable. with this algorithm, our example becomes: { "catalog": { "product": { "@description": "cardigan sweater", "catalog_item": [{ "@gender": "men's", "item_number": "qwz5671", "price": 39.95...
...h["@image"]); // "black_cardigan.jpg" alert(myobject.catalog.product.catalog_item[1].size.color_swatch); // "black" ! note: if you want to freeze the whole object tree (because of the "static" nature of an xml document), uncomment the string: /* else { object.freeze(vresult); } */. the object.freeze() method prevents new properties from being added to it, prevents existing properties from being
removed and prevents existing properties, or their enumerability, configurability, or writability, from being changed. in essence the object tree is made effectively immutable. this is a possible technique if you know the structure of the xml document. reverse algorithms it is possible to reverse the algorithms proposed here in order to build a new xml document starting from a javascript objects tree...
Menu - Archive of obsolete content
the menu is currently visible and false otherwise. read-only. items array an array of menuitems in the menu. read-only. methods add(items) clear() contexton(node) hide() insertbefore(newitems, target) item(target) popupon(node)
remove(target) replace(target, newitems) reset() set(items) show(anchornode) add(items) adds items to the menu. the position at which the items are added is at jetpack's discretion. this method and set() are the recommended methods of adding items to a menu. parameters items a single menuitem or an array of menu...
... replace(target, newitems) reset() set(items) show(anchornode) add(items) adds items to the menu. the position at which the items are added is at jetpack's discretion. this method and set() are the recommended methods of adding items to a menu. parameters items a single menuitem or an array of menuitems. clear()
removes all items from the menu, even items not added by the feature. contexton(node) binds the menu to a given node as its context menu. parameters node the menu is attached to this node, which may be either a raw dom node or a dom node wrapped by jquery. hide() hides the menu if it is showing. insertbefore(newitems, target) inserts new items before an existing item. parameters ...
...changes immediately. parameters target indicates the existing item. see targets. return value a menuitem object, or null if no such target exists. popupon(node) binds the menu to a given node. the menu will be shown when the node is left-clicked. parameters node the menu is attached to this node, which may be either a raw dom node or a dom node wrapped by jquery.
remove(target)
removes an item from the menu. parameters target indicates the existing item to
remove. see targets. if no such target exists, the call silently fails. replace(target, newitems) replaces an item with new items. parameters target indicates the existing item to replace. see targets. if no such target exists, the call silently fails. newitems a...
...menuset objects. a contextmenuset represents a set of context menus. jetpack.menu.context.page is the set of context menus that appear on the page: the image menu, link menu, and so on. contextmenuset defines many of the same methods that jetpack.menu does. features can use these methods to modify all the menus in a set at once. they are: add(items) clear() insertbefore(newitems, target)
remove(target) replace(target, newitems) reset() set(items) the following jetpack.menu properties can also be defined on a contextmenuset: beforehide beforeshow note that a jetpack.menu object is passed to beforehide and beforeshow, since they are called during a context menu's invocation. they may then modify the menu. individual menus are drawn from the set using on(): on(selector) return...
Gecko Compatibility Handbook - Archive of obsolete content
if you're new to standards, you may find using web standards in your web pages a helpful introduction. ...
... if you're new to standards, you may find using web standards in your web pages a helpful introduction. ...
...tivity of class id's correctly and will display this example correctly. however internet explorer treats all css id's as case-insensitive and will not display this example correctly. <style type="text/css"> #id1 { text-decoration: line-through; } #id1 { text-decoration: underline; } </style> <div id="id1"> should be line-through </div> <div id="id1"> should be underline </div> -(example
removed)- note that the w3c's html validator will flag html id attributes as duplicates if they only differ due to case. there appears to be some inconsistency between the actual html 4.01 recommendation and the sgml declaration for html on whether id attributes are case sensitive or not. this is unfortunate since the html validator is one of the primary vehicles web developers have for learning about ...
...nsitive in quirks mode only. if you are invoking standards mode, you should still code your css to be consistent with respect to case. css class names should be case-sensitive <style type="text/css"> .class1 { font-size: 1em; } .class1 { font-size: 2em; } </style> <div> <div class="class1"> should be font-size: 1em; </div> <div class="class1"> should be font-size: 2em; </div> -(example
removed)- gecko implements the case sensitivity of class names correctly and will display this example correctly while internet explorer treats all css classnames's as case-insensitive and will not display this example correctly. due to the common nature of this error by web authors, netscape 6.2 began treating css class attributes as case-insensitive in quirks mode only. if you are invoking standards...
WAI-ARIA basics - Learn web development
e (important time/context sensitive information), and represents a better, more accessible way of delivering an alert to a user (modal dialogs like alert() calls have a number of accessibility problems; see popup windows by webaim). an aria-relevant value of all instructs the screenreader to read out the contents of the error list when any changes are made to it — i.e. when errors are added or
removed. this is useful because the user will want to know what errors are left, not just what has been added or
removed from the list. we could go further with our aria usage, and provide some more validation help. how about indicating whether fields are required in the first place, and what range the age should be? at this point, take a copy of our form-validation.html and validation.js files, an...
....disabled = false; instruitem.label.style.color = '#000'; instruitem.input.setattribute('aria-disabled', 'false'); hiddenalert.textcontent = 'instruments played field now enabled; use it to tell us what you play.'; } else { instruitem.input.disabled = true; instruitem.label.style.color = '#999'; instruitem.input.setattribute('aria-disabled', 'true'); instruitem.input.
removeattribute('aria-label'); hiddenalert.textcontent = 'instruments played field now disabled.'; } } describing non-semantic buttons as buttons a few times in this course already, we've mentioned the native accessibilty of (and the accessibility issues behind using other elements to fake) buttons, links, or form elements (see ui controls in the html accessibility article, and enhancing keyboar...
...="tab" aria-selected="false" aria-setsize="3" aria-posinset="3" tabindex="0">tab 3</li> </ul> <div class="panels"> <article class="active-panel" role="tabpanel" aria-hidden="false"> ... </article> <article role="tabpanel" aria-hidden="true"> ... </article> <article role="tabpanel" aria-hidden="true"> ... ...
...ria-selected — defines which tab is currently selected. as different tabs are selected by the user, the value of this attribute on the different tabs is updated via javascript. aria-hidden — hides an element from being read out by a screenreader. as different tabs are selected by the user, the value of this attribute on the different tabs is updated via javascript. tabindex="0" — as we've
removed the links, we need to give the list items this attribute to provide it with keyboard focus. aria-setsize — this property allows you to specify to screenreaders that an element is part of a series, and how many items the series has. aria-posinset — this property allows you to specify what position in a series an element is in. along with aria-setsize, it provides a screenreader with enough ...
Ember app structure and componentization - Learn web development
t, then added and configured our css styles. at this point we add some html, planning out the structure and semantics of our todomvc app. the landing page html of our application is defined in app/templates/application.hbs. this already exists, and its contents currently look like so: {{!-- the following component displays ember's default welcome message. --}} <welcomepage /> {{!-- feel free to
remove this! --}} {{outlet}} <welcomepage /> is a component provided by an ember addon that renders the default welcome page we saw in the previous article, when we first navigated to our server at localhost:4200. however, we don't want this. instead, we want it to contain the todomvc app structure. to start with, delete the contents of application.hbs and replace them with the following: <section...
...el for="mark-all-complete">mark all as complete</label> <ul class="todo-list"> <li> <div class="view"> <input aria-label="toggle the completion of this todo" class="toggle" type="checkbox" > <label>buy movie tickets</label> <button type="button" class="destroy" title="
remove this todo" ></button> </div> <input autofocus class="edit" value="todo text"> </li> <li> <div class="view"> <input aria-label="toggle the completion of this todo" class="toggle" type="checkbox" > <label>go to movie</label> <button type="button" class=...
...on> </div> <input autofocus class="edit" value="todo text"> </li> <li> <div class="view"> <input aria-label="toggle the completion of this todo" class="toggle" type="checkbox" > <label>go to movie</label> <button type="button" class="destroy" title="
remove this todo" ></button> </div> <input autofocus class="edit" value="todo text"> </li> </ul> </section> <footer class="footer"> <span class="todo-count"> <strong>0</strong> todos left </span> <ul class="filters"> <li> <a href="#">all</a> <a href="#">active</a> <a href="#">completed</a> </li> </ul> ...
...tents of the todo.hbs file below will replace <todo /> in the rendered page as our application loads. ...
Starting our Svelte Todo list app - Learn web development
m install && npm run dev to start your app in development mode. repl to code along with us using the repl, start at https://svelte.dev/repl/b7b831ea3a354d3789cefbc31e2ca495?version=3.23.2 todo list app features this is how our todo list app wil look like once it's ready: using this ui our user will be able to: browse their tasks. mark tasks as completed/pending without deleting them.
remove tasks. add new tasks. filter tasks by status: all tasks, active tasks, or completed tasks. edit tasks. mark all tasks as active/completed.
remove all completed tasks. building our first component let's create a todos.svelte component — this will contain our list of todos. create a new folder — src/components. note: you can put your components anywhere inside the src folder...
...n development mode, svelte will issue a warning in the browser console when specifying a prop that doesn't exist in the component; in this case we have a name prop being specified when we instantiate the app component inside src/main.js, which isn't used inside app. the console should currently give you a message along the lines of "<app> was created with unknown prop 'name'". ...
...but let's have a look at the markup and see how it relates to our desired features: a label and a text box for entering new tasks. three buttons to filter by task status. a label showing the total number of tasks and the...
...al number of tasks and the completed tasks. an unordered list, which holds a list item for each task. when the task is being edited, the list item has an input and two button to cancel or save modifications. if the task is not being edited, there's a checkbox to set the completed status, and two buttons to edit or delete the task. finally there are two buttons to check/uncheck all task and to
remove completed tasks. in subsequent articles we'll get all these features working, and more besides. accessibility features of the todo list you may notice some unusual attributes here. for example: <button class="btn toggle-btn" aria-pressed="true"> <span class="visually-hidden">show</span> <span>all</span> <span class="visually-hidden">tasks</span> </button> here, aria-pressed tells assi...
Eclipse CDT
nd that any changes you make may be ignored if they conflict with existing bindings, or if they are overridden by a binding for a more specific context. for example, changing the find next command to cmd-g/ctrl-g is not sufficient. for that to work you also either need to find the existing bindings for that key combination (using the bindings column to sort by key combination helps with this) and
remove them, or else you need to make your binding very specific by setting the "when" field to "c/c++ editor" instead of the more general "editing text". opening files you can quickly open a file by name using cmd-shift-r/ctrl-shift-r. although eclipse doesn't do fuzzy matching when you type a file name, it does allow you to use wildcards. to quickly switch between a source file and its header file,...
...orking) instead of using just-print-mozilla-build.py. if you want to invoke "make -f client.mk" from your source directory instead of invoking 'make' from your object directory, then in the "c/c++ build" section of the project properties, set "build command" to "make -f client.mk" and set "build directory" to just "${projdirpath}" (this is the top of the source tree). select the behavior tab and
remove the "all" from the "build (incremental build)" field. select "c/c++ build > build variables", and add a variable "mozconfig", and set it to the path of your .mozconfig file relative to the top source directory. set any other environment variables you want to set for the build, then close the project properties window. now when you hit the build button (the little hammer icon), you should see the...
...the workspace preferences, select "c/c++ > debug > gdb", and set "gdb debugger" to the full path of your new gdb executable. gdb unexpectedly detaching if gdb starts ignoring your breakpoints, or unexpectedly terminates or detaches from the firefox process, this may be caused by out of date breakpoints (breakpoints that you set during a previous debug session, after which you've since rebuilt).
remove any such breakpoints and restart your debug session. known issues there are various known limitations and bugs when it comes to using eclipse with mozilla. eclipse is open source, of course so if anyone feels like doing a bit of java hacking to fix these issues that'd be great. headers are only parsed once for performance reasons, eclipse only processes header files that have include guards o...
...from the context menu in the project explorer tab. old everything that follows is old content that should maybe just be deleted now? gdb timeouts i don't think this old comment from 2007/2008 is an issue anymore. out of the box, you may/will get gdb connection timeouts. this is because eclipse is trying to push every subfolder in gdb's environment. the easiest way to resolve this issue is to
remove any source entry from the debug configuration (run->open debug dialog...) in the source tab. doing so will, unfortunately,
remove the binding between the binaries and the source code. to keep this feature working, you need to add a "path mapping" by clicking "add..." in the source tab. once a "path mapping" is created, select "edit..." and add an entry with these values compilation path: / loc...
Multiple Firefox profiles
ofile for testing websites, apps, or other projects on different firefox channels. for example, you might want to have some extensions installed for web development, but not for general-purpose web browsing. while using the nightly channel, you may encounter some add-ons that have become temporarily incompatible with new api changes, until the add-on developer has a chance to update them. you can
remove such add-ons from your profile for nightly use while keeping them for use with other profiles. for qa, testing, and bug triaging contributors, you may want to have multiple development versions of firefox installed, each with its own profile. creating new profiles for testing can keep you from losing your preferences, bookmarks, and history. it takes little time to set up a new profile, and once...
...nd enter the name of the profile. use a profile name that is descriptive, such as your personal name. this name is not exposed to the internet. you can also choose where to store the profile on your computer. to select storage location, click choose folder.... if you choose your folder location for the profile, select a new or empty folder. if you choose a folder that isn't empty, and you later
remove the profile and choose the \"delete files\" option, everything inside that folder will be deleted. to create the new profile, click finish. creating a profile through the firefox browser you can create a new firefox profile directly from the browser. type about:profiles into the browser url search bar on the page, click create a new profile button read the introduction, and click next e...
...ead the introduction, and click next enter a profile name for your new profile. use a profile name that is descriptive, such as your personal name. this name is not exposed to the internet. optionally, to change where the profile will be stored on your computer, click choose folder... to create the new profile, click finish. deleting a profile in the profile manager, select the profile to
remove, and click delete profile.... confirm that you wish to delete the profile: don't delete files
removes the profile from the profile manager yet retains the profile data files on your computer in the storage folder so that your information is not lost. "don't delete files" is the preferred option, because it saves the old profile's folder, allowing you to recover the files to a new profile. ...
... warning: if you use the "delete files" option, the profile folder, and files will be deleted. this action cannot be undone. cancel interrupts the profile deletion. ...
TypeListener
typelisteners can be registered with addtypelistener() and will then receive notification as addontype are registered and unregistered. method overview void ontypeadded(in addontype type) void ontype
removed(in addontype type) methods ontypeadded() called when an add-on type has been added. ...
...ered and unregistered. method overview void ontypeadded(in addontype type) void ontype
removed(in addontype type) methods ontypeadded() called when an add-on type has been added. void ontypeadded( in addontype type ) parameters type the addontype that is being added needsrestart true if an application restart is necessary for the change to take effect ontype
removed() called when an add-on type has been
removed. ...
...n addontype type) void ontype
removed(in addontype type) methods ontypeadded() called when an add-on type has been added. void ontypeadded( in addontype type ) parameters type the addontype that is being added needsrestart true if an application restart is necessary for the change to take effect ontype
removed() called when an add-on type has been
removed. ...
...ontypeadded() called when an add-on type has been added. ...
AsyncShutdown.jsm
for instance, at the end of phase profilebeforechange, no service is permitted to write to the profile directory (with the exception of telemetry). consequently, if any service has requested i/o to the profile directory before or during phase profilebeforechange, the system must be informed that these requests need to be completed before the end of phase profilebeforechange. ...
... resolved, and all the additional debug information returned by calls to info(). instances of phase note that you cannot create an instance of phase yourself. see attributes for the instances of phase. if you need a new phase added to asyncshutdown, please file a bug. methods overview void addblocker(string name, function|promise condition, optional function info) boolean
removeblocker(function|promise condition) methods addblocker () register a blocker for the completion of a phase. void addblocker( in string name, in function|promise|* condition, optional in function info ) arguments name the human-readable name of the blocker. used for debugging/error reporting. please make sure that the name respects the following model: "some service: some act...
...ated during the phase and the phase is guaranteed to not terminate until the resulting promise is either resolved or rejected. if condition is not a function but another value v, it behaves as if it were a function returning v. info optionally, a function returning information about the current state of the blocker as an object. used for providing more details when logging errors or crashing.
removeblocker ()
remove the blocker for a condition. if several blockers have been registered for the same condition,
remove all these blockers. if no blocker has been registered for this condition, this is a noop. boolean
removeblocker( in function|promise|* condition ) arguments condition a condition blocking the completion of the phase. this must be the same condition as was passed to addbl...
...note that a result of false may mean either that the blocker has never been installed or that the phase has completed and the blocker has already been resolved. ...
Downloads.jsm
"example-download.html")); console.log("example-download.html has been downloaded."); }).then(null, components.utils.reporterror); observing downloads this example logs a message every time a change occurs in one of the global download lists. to demonstrate the logging, a new download is started while a message box is being shown. the download is stopped and
removed from the list when the message box is closed, regardless of whether it has been completed or not. components.utils.import("resource://gre/modules/downloads.jsm"); components.utils.import("resource://gre/modules/osfile.jsm") components.utils.import("resource://gre/modules/task.jsm"); task.spawn(function () { let list = yield downloads.getlist(downloads.all); let view = { ondownloadadd...
...close the message to stop.");...
...close the message to stop."); } finally { yield list.
...d", download) }; yield list.addview(view); try { let download = yield downloads.createdownload({ source: "http://www.mozilla.org/", target: os.path.join(os.constants.path.tmpdir, "example-download.html"), }); list.add(download); try { download.start(); alert("now monitoring all downloads. close the message to stop."); } finally { yield list.
remove(download); yield download.finalize(true); } } finally { yield list.
removeview(view); } }).then(null, components.utils.reporterror); conversion from nsidownloadmanager starting in firefox for desktop version 26, the nsidownloadmanager and nsidownload interfaces are not available anymore. the new module works differently from the old component. in general, you should be aware...
Localizing with Koala
cd c:\mozilla\l10n\application\firefox c:\mozilla\l10n\application\firefox> rmdir 3.6 c:\mozilla\l10n\application\firefox> hg clone http://hg.mozilla.org/releases/mozilla-1.9.2 3.6 requesting all changes adding changesets adding manifests adding file changes added 33099 changesets with 158636 changes to 50664 files (+9 heads) updating working directory 40357 files updated, 0 files merged, 0 files
removed, 0 files unresolved configure the locale locale id: x-testing (put your locale's code) version: 3.6 location: choose the folder where you want to keep the localized files or leave empty for now check "mercurial" if you wish to use mercurial to keep the revision history of your files (very recommended) existing localizations: url: if you're editing an existing localization or you already ha...
...ely translated. here's a quick summary of what the output of the comparison means: files: "unmodified" - the file is completely translated. "added" - the file need to be added to the locale's file structure (it is present in en-us, but not in the locale files). "modified" - the file needs to be modified (it is present in both en-us and the locale files, but the locale's version is outdated). "
removed" - the file needs to be deleted from locale's file structure (it is no longer present in en-us). before you delete it entirely, check if the same file hasn't been added elsewhere in the en-us file structure! it may happen that a pair of files from which one is "added" and the other one is "
removed" is actually the same file which has been moved from one directory to a different one. strings: ...
...the file, however, is still used and shouldn't be deleted. to see the results of the comparison for locale's all files (including searchbar.dtd), switch to "locale files" view in the "koala file view" sidebar. ...
...very new file in the repository that you want to track in mercurial, you will need to "hg commit" these new files so as to create a new revision in the repository's history. this process need to be repeated for every new file that you add. also, removing files works in a similar manner: not only do you have to delete the file, but also you need to tell mercurial to stop tracking the file with "hg
remove". see "hg help add", "hg help
remove" and "hg help add
remove" for more details. let's now add and commit these two files from koala. in the "locale files" view in the sidebar, right click on search.properties and choose "add file to repository". this will execute "hg add" on this file in the background. koala will show you a message if the "hg add" was successful. instead of adding single file...
Index
entries within the range. * add certificate entries(s) to crl: addcert range date range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. only one cert will be added if there is no delimiter. date: revocation date of a cert. date should be represented in generalizedtime format (yyyymmddhhmmssz). *
remove certificate entry(s) from crl rmcert range where: range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. only one cert will be added if there is no delimiter. * change range of certificate entry(s) in crl range new-range where: new-range: two integer values separated by dash: range of ce...
...son for the certificate revocation. reasoncode non-critical code where: reasoncode: identifies the name of an extension non-critical: should be set to 0 since this is non-critical extension code: the following codes are available: unspecified (0), keycompromise (1), cacompromise (2), affiliationchanged (3), superseded (4), cessationofoperation (5), certificatehold (6),
removefromcrl (8), privilegewithdrawn (9), aacompromise (10) * add invalidity date extension: the invalidity date is a non-critical crl entry extension that provides the date on which it is known or suspected that the private key was compromised or that the certificate otherwise became invalid. invaliditydate non-critical date where: crlnumber: identifies the name of an extensi...
...the key to delete with the -n argument. specify the database from which to delete the key with the -d argument. use the -k argument to specify explicitly whether to delete a dsa, rsa, or ecc key. if you don't use the -k argument, the option looks for an rsa key matching the specified nickname. when you delete keys, be sure to also
remove any certificates associated with those keys from the certificate database, by using -d. some smart cards (for example, the litronic card) do not let you
remove a public key you have generated. in such a case, only the private key is deleted from the key pair. you can display the public key with the command certutil -k -h tokenname. -g ...
...#11 modules are external modules which add to firefox support for smartcard readers, biometric security devices, and external certificate stores. this article covers the two methods for installing pkcs #11 modules into firefox. 337 pkcs11 implement note: this document was originally for the netscape security library that came with netscape communicator 4.0. this note will be
removed once the document is updated for the current version of nss. 338 python binding for nss python-nss is a python binding for nss (network security services) and nspr (netscape portable runtime). nss provides cryptography services supporting ssl, tls, pki, pkix, x509, pkcs*, etc. nss is an alternative to openssl and used extensively by major software projects. nss is fips-140 ...
NSS 3.35 release notes
hat debug builds will use a lower count, for better performance in test environments. as a reminder, debug builds should not be used for production purposes. nss 3.30 had introduced a regression, preventing nss from reading some aes encrypted data, produced by older versions of nss. nss 3.35 fixes this regression and restores the ability to read affected data. ...
...tionsetdefault and ssl_optiongetdefault have been modified, to take a printn argument rather than prbool. this makes it clearer, that options can have values other than 0 or 1. note this does not affect abi compatibility, because prbool is a typedef for printn. experimental apis and functionality the functionality and the apis listed in this section are experimental. any of these apis may be
removed from future nss versions. applications must not rely on these apis to be present. if an application is linked at runtime to a later version of nss, which no longer provides any of these apis, the application must handle the scenario gracefully. in order to ease transitions, experimental functions return secfailure and set the ssl_error_unsupported_experimental_api code if the selected api is no...
...pplication is linked at runtime to a later version of nss, which no longer provides any of these apis, the application must handle the scenario gracefully. in order to ease transitions, experimental functions return secfailure and set the ssl_error_unsupported_experimental_api code if the selected api is not available. experimental functions will always return this result if they are disabled or
removed from a later nss release. if these experimental functions are made permanent in a later nss release, no change to code is necessary. (only apis exported in *.def files are stable apis.) new experimental functionality provided below are descriptions of experimental functionality, which might not be available in future releases of nss. users of tls are now able to provide implementations of ...
...raffic keys (tls 1.3 only). experimental: ssl_getextensionsupport - query nss support for a tls extension. experimental: ssl_installextensionhooks - install custom handlers for a tls extension. experimental: ssl_setupantireplay - configure a tls server for 0-rtt anti-replay (tls 1.3 server only). experimental: ssl_sendsessionticket - send a session ticket (tls 1.3 server only).
removed experimental apis note that experimental apis might get
removed from nss without announcing removals in the release notes. this section might be incomplete. the experimental api ssl_usealtserverhellotype has been disabled. bugs fixed in nss 3.35 this bugzilla query returns all the bugs fixed in nss 3.35: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&...
sslerr.html
_no_server_key_for_alg -12206 "server has no key for the attempted key exchange algorithm." an ssl client has requested an ssl cipher suite that uses a key exchange algorithm for which the local server has no appropriate public key. this indicates a configuration error on the local server. ssl_error_token_insertion_removal -12205 "pkcs #11 token was inserted or
removed while operation was in progress." a cryptographic operation required to complete the handshake failed because the token that was performing it was
removed while the handshake was underway. another token may also have been inserted into the same slot. ssl_error_token_slot_not_found -12204 "no pkcs#11 token could be found to do a required operation." a cryp...
...n revoked. sec_error_krl_invalid -8130 new krl has an invalid format. sec_error_need_random -8129 security library: need random data. sec_error_no_module -8128 security library: no security module can perform the requested operation. sec_error_no_token -8127 the security card or token does not exist, needs to be initialized, or has been
removed. sec_error_read_only -8126 security library: read-only database. sec_error_no_slot_selected -8125 no slot or token was selected. sec_error_cert_nickname_collision -8124 a certificate with the same nickname already exists. sec_error_key_nickname_collision -8123 a key with the same nickname already exists. sec_error_safe_not_crea...
...cted. sec_error_cert_nickname_collision -8124 a certificate with the same nickname already exists. sec_error_key_nickname_collision -8123 a key with the same nickname already exists. sec_error_safe_not_created -8122 error while creating safe object. sec_error_baggage_not_created -8121 error while creating baggage object. xp_java_
remove_principal_error -8120 couldn't
remove the principal. xp_java_delete_privilege_error -8119 couldn't delete the privilege xp_java_cert_not_exists_error -8118 this principal doesn't have a certificate. sec_error_bad_export_algorithm -8117 required algorithm is not allowed. sec_error_exporting_certificates -8116 error attempting to exp...
...specified template was invalid." sec_error_crl_not_found -8055 "no matching crl was found." sec_error_reused_issuer_and_serial -8054 "you are attempting to import a cert with the same issuer/serial as an existing cert, but that is not the same cert." sec_e...
NSS_3.12.3_release_notes.html
bugs fixed the following bugs have been fixed in nss 3.12.3. bug 159483: cert name matching: rfc 2818 vs. backwards compatibility (wildcards) bug 334678: prng_fips1861.c redefines the macro bsize on hp-ux bug 335016: mpp_pprime (miller-rabin probabilistic primality test) may choose 0 or 1 as the random integer bug 347037: make shlibs...
...h) nss_getalgorithmpolicy (see secoid.h) nss_setalgorithmpolicy (see secoid.h) for the 2 functions above see also (in secoidt.h): nss_use_alg_in_cert_signature nss_use_alg_in_cms_signature nss_use_alg_reserved support for the watcom c compiler is
removed the file watcomfx.h is
removed. bugs fixed the following bugs have been fixed in nss 3.12.3. bug 159483: cert name matching: rfc 2818 vs. backwards compatibility (wildcards) bug 334678: prng_fips1861.c redefines the macro bsize on hp-ux bug 335016: mpp_pprime (miller-rabin probabilistic primality test) may choose 0 or 1 as the random integer bug 347037: make shlibsign depend on the softoken only bug 3715...
... bug 483113: add environment variable to disable/enable hash algorithms in cert/crl signatures bug 483168: nss callback api for looking up a default ocsp responder url bug 483963: assertion failure in ocsp tests. bug 484425: need accessor function to...
...484425: need accessor function to retrieve symkey handle bug 484466: sec_error_invalid_args with nss_enable_pkix_verify=1 bug 485127: bltest crashes when attempting rc5_cbc or rc5_ecb bug 485140: wrong command line flags used to build intel-aes.s with solaris gas for x86_64 bug 485370: crash bug 485713: files added by red hat recently have missing texts in license headers. bug 485729:
remove lib/freebl/mapfile.solaris bug 485837: vc90.pdb files are output in source directory instead of objdir bug 486060: sec_asn1d_parse_leaf uses argument uninitialized by caller pbe_pk11algidtoparam documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation. new and revised documents available since the release of nss 3.11 include the following: bu...
JSAPI User Guide
g js_reporterror does not cause a c++ exception to be thrown. it only creates a new javascript error object and stores it in the context as the current pending exception. the application must also return false. once the c++ function returns false, the javascript engine starts unwinding the javascript stack, looking for a catch or finally block to execute. but spidermonkey's stack unwinding never
removes application's c++ functions from the stack. instead, spidermonkey simply returns false or nullptr to the application, which can then handle the error as it chooses—or just return false to let it propagate further up the stack. several more examples of throwing and catching exceptions can be found in the jsapi phrasebook. error reports todo your custom errorreporter todo when errors are rep...
...es and methods */ my_static_props, my_static_methods); running scripts /* these should indicate source location for diagnostics. */ char *filename; unsigned int lineno; /* * the return value comes back here -- if it could be a gc thing, you must * add it to the gc's "root set" with js_add*root(cx, &thing) where thing * is a jsstring *, jsobject *, or jsdouble *, and
remove the root before * rval goes out of scope, or when rval is no longer needed. */ jsval rval; jsbool ok; /* * some example source in a c string. larger, non-null-terminated buffers * can be used, if you pass the buffer length to js_evaluatescript. */ char *source = "x * f(y)"; ok = js_evaluatescript(cx, globalobj, source, strlen(source), filename, lineno, &rval); if (...
...kes no arguments. */ ok = js_callfunctionname(cx, globalobj, "foo", 0, 0, &rval); jsval argv[2]; /* call a function in obj's scope named "method", passing two arguments. */ argv[0] = . . .; argv[1] = . . .; ok = js_callfunctionname(cx, obj, "method", 2, argv, &rval); jscontext you should never create more than one jscontext per jsruntime. support for multiple jscontexts per jsruntime will be
removed in the future. if your application creates multiple runtimes, the application may need to know which runtime a context is associated with. in this case, use js_getruntime. use js_setcontextprivate and js_getcontextprivate to associate application-specific data with a context. initializing built-in and global js objects for a complete list of built-in objects provided by spidermonkey, see js_...
...*/ return false; } security many applications use spidermonkey to run untrusted code. in designing this kind of application, it's important to think through the security concerns ahead of time. your application will need to do several things. deploy...
JS_AddExternalStringFinalizer
try to avoid using it. register a custom string memory manager. syntax int js_addexternalstringfinalizer(jsstringfinalizeop finalizer); name type description finalizer jsstringfinalizeop pointer to a callback function, described below. the js engine will automatically call this function each time a string created by js_newexternalstring is garbage-collected. ...
...ands how to free or release the memory pointed at by js_getstringchars(str). ...
...ed at by js_getstringchars(str). returns a nonnegative type index if there is room for finalizer in the global gc finalizers table, else returns -1. ...
...negative type index if there is room for finalizer in the global gc finalizers table, else returns -1. ...
JS_DeleteElement2
renamed to js_deleteelement in jsapi 39 syntax bool js_deleteelement2(jscontext *cx, js::handleobject obj, uint32_t index, bool *succeeded); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. ...
...ild, the caller must be in a request on this jscontext. obj js::handleobject object from which to delete an element. index uint32_t index number of the element to delete. succeeded bool * out parameter. on success, *succeeded receives false if the property was not deleted because it is permanent and true otherwise. description js_deleteelement2
removes a specified element or numeric property, index, from an object, obj. if an object references an element belonging to a prototype, the element reference is
removed from the object, but the prototype's element is not deleted. if deletion is successful, js_deleteelement2 stores true to *succeeded and returns true. otherwise it returns false and the value of *succeeded is undefined. notes per th...
...operty, index, from an object, obj. if an object references an element belonging to a prototype, the element reference is
removed from the object, but the prototype's element is not deleted. if deletion is successful, js_deleteelement2 stores true to *succeeded and returns true. otherwise it returns false and the value of *succeeded is undefined. notes per the ecma standard, js_deleteelement2
removes read-only properties from objects as long as they are not also permanent. for javascript 1.2 and earlier, if deletion fails because the property is permanent, js_deleteelement2 reports the error and returns false. for javascript 1.3, the attempt is silently ignored. ...
..., js_deleteelement2
removes read-only properties from objects as long as they are not also permanent. for javascript 1.2 and earlier, if deletion fails because the property is permanent, js_deleteelement2 reports the error and returns false. for javascript 1.3, the attempt is silently ignored. in both these cases, *succeeded will receive the stored value of the property that was not deleted. to
remove all properties from an object, call js_clearscope. see also mxr id search for js_deleteelement2 bug 1113369 -- added result parameter ...
JS_DeleteProperty
removes a specified property from an object. syntax bool js_deleteproperty(jscontext *cx, js::handleobject obj, const char *name); bool js_deletepropertybyid(jscontext *cx, js::handleobject obj, jsid id); // added in spidermonkey 1.8.1 // added in spidermonkey 45 bool js_deleteproperty(jscontext *cx, js::handleobject obj, const char *name, js::objectopresult &result); bool js_deletepropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::objectopresult &result); bool js_deleteucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::objectopresult &result); name type description cx jscontext * pointer to a js context from which to derive runtime inf...
...delete a property. name or id const char * or jsid or const char16_t * name of the property to delete. namelen size_t (only in js_deleteucproperty) the length of name in characters; or -1 to indicate that name is null-terminated. result js::objectopresult & (out parameter) receives the result of the operation. description js_deleteproperty
removes a specified property, name, from an object, obj. js_deletepropertybyid is the same but takes a jsid for the property name. these functions are identical to js_deleteproperty2 and js_deletepropertybyid2 except that they do not have an out parameter. first, a property lookup is performed. then one of the following cases applies: if obj has no property with the given name or id, or if obj inher...
... error. if obj has the specified property but it is permanent, nothing happens. no property is deleted, but this is not an error. otherwise obj has a non-permanent own property with the given name or id. in this case, obj's jsclass.delproperty hook is called. if the hook returns false, the error is propagated. otherwise, if obj is not configurable, an error is raised. ...
...herwise, the property is
removed. these functions return true on success, regardless of whether a property was actually deleted, and false on error or exception. (in javascript 1.2 and earlier, attempting to delete a permanent property caused an error. there is no longer any way to get this behavior.) internally, property deletion is implemented by the jsobjectops.deleteproperty callback. to
remove all properties from an object, call js_clearscope. see also mxr id search for js_deleteproperty mxr id search for js_deletepropertybyid js_deleteproperty2 js_deletepropertybyid2 bug 461163 bug 1113369 -- added result parameter and js_deleteucproperty ...
JS_DeleteProperty2
renamed to js_deleteproperty from jsapi 39. ...
... renamed to js_deleteproperty from jsapi 39. ...
...r16_t or js::handleid name of the property to delete. namelen size_t (only in js_deleteucproperty2) the length of name in characters; or -1 to indicate that name is null-terminated. succeeded bool * out parameter. on success, *succeeded receives false if the property was not deleted because it is permanent and true otherwise. description js_deleteproperty2
removes a specified property, name, from an object, obj, and stores true or false in *succeeded. it behaves like the javascript expression delete obj[name]. js_deleteucproperty2 is the unicode version of the function. js_deletepropertybyid2 is the same but takes a js::handleid for the property name. first, a property lookup is performed. then one of the following cases applies: if obj has no propert...
...rty is deleted, but this is not an error. otherwise obj has a non-permanent own property with the given name or id. in this case, *succeeded is set to true and obj's jsclass.delproperty hook is called (which may change *succeeded). if the hook returns false, the error is propagated. otherwise, if obj is not configurable, an error is raised. otherwise, *succeeded receives true and the property is
removed. these functions return true on success, regardless of whether a property was actually deleted. on error or exception, the return value is false, and the value left in *succeeded is unspecified. jsobjectops.deleteproperty implements this behavior. (in javascript 1.2 and earlier, attempting to delete a permanent property caused an error. there is no longer any way to get this behavior.) to r...
JS_LockGCThing
try to avoid using it. protect a specified js item from garbage collection. syntax jsbool js_lockgcthing(jscontext *cx, void *thing); // obsolete since jsapi 21 jsbool js_unlockgcthing(jscontext *cx, void *thing); // obsolete since jsapi 21 jsbool js_lockgcthingrt(jsruntime *rt, void *thing); jsbool js_unlockgcthingrt(jsruntime *rt, void *thing); name type description cx jscontext * a context. requires request. ...
..., the caller must be in a request on this jscontext. rt jsruntime * a runtime. thing void * pointer to the item to protect. description js_lockgcthing is a deprecated function that protects a specified item, thing, associated with an executable script context, cx, from garbage collection. ...
...executable script context, cx, from garbage collection. thing is a pointer to a jsdouble, jsstring, or jsobject. js_unlockgcthing
removes a lock from a specified item, thing, allowing it to be garbage collected when the javascript engine determines it is unreachable. ...
...ollection. thing is a pointer to a jsdouble, jsstring, or jsobject. js_unlockgcthing
removes a lock from a specified item, thing, allowing it to be garbage collected when the javascript engine determines it is unreachable. js_lockgcthing and js_unlockgcthing are available only for backward compatibility with existing applications. ...
SpiderMonkey 1.8.8
platforms the jit is simply disabled; javascript code runs in an interpreter, as in previous versions. it's the same language, just not as fast. migrating to spidermonkey 1.8.8 the following features in earlier versions of spidermonkey have been dropped. the jsresolve_classname and jsresolve_with resolve flags (passed to jsclass.resolve when jsclass.flags contains jsclass_new_resolve) have been
removed. spidermonkey 1.8.8 is not binary-compatible with previous releases, nor is it source-code compatible. many jsapi types, functions, and callback signatures have changed, though most of them still have the same names and do the same things. applications will need significant changes, but most of those changes will be detected by the c/c++ compiler, so they are easy to detect and updating the cod...
... them still have the same names and do the same things. applications will need significant changes, but most of those changes will be detected by the c/c++ compiler, so they are easy to detect and updating the code is a fairly straightforward job. here is a list of the most significant changes. a significant number of typedefs of built-in types, or of types which are now standardized, have been
removed. these and other changes are explained in detail below. new javascript language features javascript 1.8.8 includes significant updates to language features, yo. typedef changes many types have been
removed from the jsapi and replaced with simpler alternatives. including jsapi.h provides all these types, but more-specific headers also provide these types if you wish to use them in other code. ...
...t-term fix) js_newcompartmentandglobalobject (use js_newglobalobject instead.) jspd_argument jsval_is_object() (use !jsval_is_primitive(v) to detect objects and jsval_is_null(v) to detect null). js_isscriptframe jsclass_new_resolve_gets_start flag js_newnumbervalue api changes break out and discuss all api changes here... jsclass prototype has changed a number of optional members have been
removed from the jsclass prototype. jsclass callback changes many of the jsclass callbacks such as jsresolveop, jsenumerateop and jspropertyop, have a type change on their arguments to jshandleobject, jshandleid, jshandlemutableobject etc. atleast for the c api this wraps an extra pointer around these objects, so you would cast the argument to jsobject**, in the callback function. removal of jscontext* ...
...ct etc. atleast for the c api this wraps an extra pointer around these objects, so you would cast the argument to jsobject**, in the callback function. removal of jscontext* parameters to many methods the js_getclass method now takes only a jsobject*, where previously it also required a jscontext* in threadsafe builds. (the js_get_class macro abstracting away this difference has accordingly been
removed.) javascript shell changes detail added/
removed methods here... known issues detail any known issues here... future direction include-followup-on-experimental-library-versioning-scheme-here spidermonkey embedders should also be aware that mozilla has no plans to keep the jsapi, nor the jsdbgapi stable for embedders. we have chosen to concentrate on performance and correctness as primary concer...
SpiderMonkey 17
er platforms the jit is simply disabled; javascript code runs in an interpreter, as in previous versions. it's the same language, just not as fast. migrating to spidermonkey 17 the following features in earlier versions of spidermonkey have been dropped. the jsresolve_classname and jsresolve_with resolve flags (passed to jsclass.resolve when jsclass.flags contains jsclass_new_resolve) have been
removed. spidermonkey 17 is not binary-compatible with previous releases, nor is it source-code compatible. many jsapi types, functions, and callback signatures have changed, though most of them still have the same names and do the same things. applications will need significant changes, but most of those changes will be detected by the c/c++ compiler, so they are easy to detect and updating the code i...
... them still have the same names and do the same things. applications will need significant changes, but most of those changes will be detected by the c/c++ compiler, so they are easy to detect and updating the code is a fairly straightforward job. here is a list of the most significant changes. a significant number of typedefs of built-in types, or of types which are now standardized, have been
removed. these and other changes are explained in detail below. new javascript language features javascript 17 includes significant updates to language features, yo. typedef changes many types have been
removed from the jsapi and replaced with simpler alternatives. including jsapi.h provides all these types, but more-specific headers also provide these types if you wish to use them in other code. ...
...ent jsval_is_object() (use !jsval_is_primitive(v) to detect objects and jsval_is_null(v) to detect null). js_isscriptframe jsclass_new_resolve_gets_start flag js_newnumbervalue js_finalizestub js_clearnewbornroots jsclass_mark_is_trace flag js_setscriptstackquota api changes break out and discuss all api changes here... jsclass prototype has changed a number of optional members have been
removed from the jsclass prototype. jsclass callback changes many of the jsclass callbacks such as jsresolveop, jsenumerateop and jspropertyop, have a type change on their arguments to jshandleobject, jshandleid, jshandlemutableobject etc. atleast for the c api this wraps an extra pointer around these objects, so you would cast the argument to jsobject**, in the callback function. removal of jscontext* ...
...ct etc. atleast for the c api this wraps an extra pointer around these objects, so you would cast the argument to jsobject**, in the callback function. removal of jscontext* parameters to many methods the js_getclass method now takes only a jsobject*, where previously it also required a jscontext* in threadsafe builds. (the js_get_class macro abstracting away this difference has accordingly been
removed.) garbage collection functions now take runtime argument most garbage collection functions now take a runtime argument instead of a context. the one exception to this is js_maybegc which still takes a context as argument. javascript shell changes detail added/
removed methods here... known issues detail any known issues here... future direction include-followup-on-experimental-library-versioning-...
SpiderMonkey 24
evious versions. it's the same language, just not as fast. migrating to spidermonkey 24 spidermonkey now provides a fully c++ interface, so embedders relying on embeddability in c projects will have to convert to c++, or implement their own adapter code. the following features in earlier versions of spidermonkey have been dropped. ...
...many jsapi types, functions, and callback signatures have changed, though most of them still have the same names and do the same things. ...
...c++ helpers here... obsolete apis ...list obsolete methods/structs/apis here... deleted apis js_get_class (use js_getclass instead) js_enumerateresolvedstandardclasses js_getglobalobject js_setcstringsareutf8 ...list other deleted apis... api changes break out and discuss all api changes here... jsoption_strict has been renamed to jsoption_extra_warnings. js_setversion has been
removed, js version is now set on the compartment instead of context. js_getprototype, takes context as first argument js_encodestringtobuffer takes add context as first argument, js_newruntime adds a js_[use|no]_helper_threads flag delete property in jsclass definitions now use js_deletepropertystub garbage collection functions now take runtime argument most garbage collection functions now ...
...rgument, js_newruntime adds a js_[use|no]_helper_threads flag delete property in jsclass definitions now use js_deletepropertystub garbage collection functions now take runtime argument most garbage collection functions now take a runtime argument instead of a context. the one exception to this is js_maybegc which still takes a context as argument. javascript shell changes detail added/
removed methods here... known issues detail any known issues here... future direction ...insert details on future plans... spidermonkey embedders should be aware that mozilla has no plans to keep the jsapi, nor the jsdbgapi stable for embedders. we have chosen to concentrate on performance and correctness as primary concerns instead. the team is considering the removal of tinyids js_threadsafe...
SpiderMonkey 45
known issues detail any known issues here... future direction jscontext and jsruntime are merging. (jscontext will be the only thing visible from within the api, there will be just one per runtime, a...
... known issues detail any known issues here... future direction jscontext and jsruntime are merging. (jscontext will be the only thing visible from within the api, there will be just one per runtime, and inheriting from jsruntime.) spidermonkey e...
... known issues detail any known issues here... future direction jscontext and jsruntime are merging. (jscontext will be the only thing visible from within the api, there will be just one per runtime, and inheriting from jsruntime.) spidermonkey embedders should be aware that mozilla has ...
... known issues detail any known issues here... future direction jscontext and jsruntime are merging. ...
XPCOM changes in Gecko 2.0
several changes that affect xpcom component compatibility are taking place in gecko 2. this article details those changes, and provides suggestions for how to update your code. no more frozen interfaces there are no longer any frozen interfaces; from now on, all interfaces are subject to change. documentation will be updated as time allows to
remove references to interfaces being "frozen" or "unfrozen." component registration the way xpcom components are registered changed in gecko 2. prior to gecko 2, during component registration, all binary and javascript component files were loaded and called, asking them to register themselves. if you used xpcomutils.jsm, some of this was hidden from you, but it was still there. starting in gecko 2, however, components are registered using manifest files, ...
...+ in the component must be changed: a binary component no longer exports a nsgetmodule() function. instead, it exports an nsmodule data symbol which points to a mozilla::module structure. for more information about the mozilla::module structure, see the module.h header file. for an up-to-date example of implementing a dynamic modules, see nssamplemodule.cpp. note that nsigenericfactory.h has been
removed. references to nsigenericfactory.h should be replaced with mozilla/moduleutils.h. it is possible for a binary component to be compatible with mozilla 1.9.2 and mozilla 2.0 by using the extra macro ns_impl_mozilla192_nsgetmodule. see nssamplemodule.cpp for more details. note: binary xpcom components must be recompiled for every new major release of firefox starting with firefox 4. your life would...
...this was necessary in order to ensure that any components that should no longer be available are disposed of properly, and to re-register everything, loading any new components that may be needed. in th...
... need to do this as well. this may be the case if, for example, you've written an extension that adds a delete button to a web mail service, and the service defines a window.delete() function that you need to call. if, on the other hand, all you're doing with content is accessing dom methods and properties, you've never needed to be using xpcnativewrappers=no in the first place, and should simply
remove it from your manifest. miscellaneous xpcnativewrapper changes using the delete operator on "expando" properties of an xpcnativewrapper no longer throws a security exception. xpcomutils.jsm changes the xpcomutils.jsm code module has been updated to let you specify the application ids of the applications you wish to register your component in. xpcom service getters a number of commonly used xpcom...
Detailed XPCOM hashtable guide
hashtables may seem like arrays, but there are important differences: array hashtable keys: integer: arrays are always keyed on integers, and must be contiguous. ...
... hash to find the location in the hashtable. good hashtable implementations will automatically resize the hashtable in memory if extra space is needed, or if too much space has been allocated. when should i use a hashtable? hashtables are useful for sets of data that need swift random access; with non-integral keys or non-contiguous integral keys; or where items will be frequently added or
removed. hashtables should not be used for sets that need to be sorted; very small datasets (less than 12-16 items); data that does not need random access. in these situations, an array, a linked-list, or various tree data structures are more efficient. mozilla's hashtable implementations mozilla has several hashtable implementations, which have been tested and, tuned, and hide the inner comp...
...shing (just like pldhash, above). it also declares functions that manipulate the key. in most cases, the functions of this entry class can be entirely inline. for examples of entry classes, see the declarations at xpcom/glue/nshashkeys.h. the template parameter is the entry class. you must use the init() function to initalize the table properly. at this point, use the functions putentry/getentry/
removeentry to alter the hashtable. the iterator class will do iteration, but beware that the iteration will occur in a seemingly-random order (no sorting). nsthashtables can be allocated on the stack, as class members, or on the heap. entry pointers can and do change when items are added to or
removed from the hashtable. do not keep long-lasting pointers to entries. because of this, nsthashtable i...
... nshashkeys.h and is the same for all three classes: nsdatahashtable<keyclass, datatype> - datatype is a simple type such as pruint32 or prbool. nsinterfacehashtable<keyclass, interface> - interface is an xpcom interface such as nsisupports or nsidomnode nsclasshashtable<keyclass, t> - t is any c++ class. the hashtable stores a pointer to the object, and deletes that object when the entry is
removed. the important files to read are xpcom/glue/nsbasehashtable.h and xpcom/glue/nshashkeys.h. these classes can be used on the stack, as a class member, or on the heap. initialize using the init() function; you can specify whether you need thread-safety at this time. use the put(), get(), and
remove() methods to alter the table. using nsthashtable as a hash-set a hash set only tracks the existe...
IAccessibleText
long width, [out] long height ); [propget] hresult ncharacters([out] long ncharacters ); [propget] hresult newtext([out] ia2textsegment newtext ); [propget] hresult nselections([out] long nselections ); [propget] hresult offsetatpoint([in] long x, [in] long y, [in] enum ia2coordinatetype coordtype, [out] long offset ); [propget] hresult oldtext([out] ia2textsegment oldtext ); hresult
removeselection([in] long selectionindex ); hresult scrollsubstringto([in] long startindex, [in] long endindex, [in] enum ia2scrolltype scrolltype ); hresult scrollsubstringtopoint([in] long startindex, [in] long endindex, [in] enum ia2coordinatetype coordinatetype, [in] long x, [in] long y ); [propget] hresult selection([in] long selectionindex, [out] long startoffset, [out] long endoffset ); h...
... point. y the position's y value for which to look up the index of the character that is rendered on to the display at that point. coordtype screen coordinates or window coordinates. offset index of the character under the given point or -1 if the point is invalid or there is no character under the point. return value e_invalidarg if bad [in] passed, [out] value is 0. s_ok. oldtext() returns any
removed text(). provided for use by the ia2_event_text_
removed/updated event handlers. this data is only guaranteed to be valid while the thread notifying the event continues. once the handler has returned, the validity of the data depends on how the server manages the life cycle of its objects. also, note that the server may have different life cycle management strategies for controls depending on whet...
... a control manages its children. lists, trees, and tables can have a large number of children and thus it's possible that the child objects for those controls would only be created as needed. servers should document their life cycle strategy as this will be of interest to assistive technology or script engines accessing data out of process or from other threads. ...
...s needed. servers should document their life cycle strategy as this will be of interest to assistive technology or script engines accessing data out of process or from other threads. servers only need to save the last
removed block of text() and a scope of the entire application is adequate. [propget] hresult oldtext( [out] ia2textsegment oldtext ); parameters oldtext the text() that was just
removed. return value s_false if there is nothing to return, [out] value is null. s_ok.
removeselection() unselects a range of text(). hresult
removeselection( [in] long selectionindex ); parameters selectionindex index of selection() to
remove (0 based). return value e_invalidarg if bad [in] passed. s_ok. scrollsubstringto() makes a specific part of string visible on screen. hresult scrollsubstri...
inIDOMUtils
rindex); nsidomfontfacelist getusedfontfaces(in nsidomrange arange); bool haspseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); boolean isignorablewhitespace(in nsidomcharacterdata adatanode); bool isinheritedproperty(in astring apropertyname); void parsestylesheet(in nsidomcssstylesheet asheet, in domstring ainput); void
removepseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); astring rgbtocolorname(in octet ar, in octet ag, in octet ab); bool selectormatcheselement(in nsidomelement aelement, in nsidomcssstylerule arule, in unsigned long aselectorindex, [optional] in domstring apseudo); void setcontentstate(in nsidomelement aelement, in unsigned long long astate); co...
...s inherited, otherwise false. parsestylesheet() parse css and update the style sheet in place. void parsestylesheet( in nsidomcssstylesheet asheet, in domstring ainput ); parameters asheet a domcssstylesheet. ainput a domstring. the new source string for the style sheet. return value void setcontentstate() sets the given element as the current owner of the specified state, and
removes that state from the previous owner. void setcontentstate( in nsidomelement aelement, in unsigned long long astate ); parameters aelement the element to set the content state of. astate the content state to set. this must be one (and only one) of the values listed in content state flags. selectormatcheselement() checks if a given selector from a style rule matches an element. boo...
...atch. may be omitted when checking the regular elements. addpseudoclasslock() makes the element take on style properties that would apply if the element had the given pseudo-classes. void addpseudoclasslock( in nsidomelement aelement, in domstring apseudoclass ); parameters aelement the element to set the pseudo-class lock on. apseudoclass the pseudo-class to set. e.g. ":hover".
removepseudoclasslock()
removes a pseudo-class lock from the element. void
removepseudoclasslock( in nsidomelement aelement, in domstring apseudoclass ); parameters aelement the element to
remove the pseudo-class lock from. apseudoclass the pseudo-class to
remove the lock of. e.g. ":hover". haspseudoclasslock() checks whether the element element has a particular pseudo-class lock applie...
...over". haspseudoclasslock() checks whether the element element has a particular pseudo-class lock applied. boolean haspseudoclasslock( in nsidomelement aelement, in domstring apseudoclass ); parameters aelement the element to test. apseudoclass the pseudo-class lock to test for existence, e.g. ":hover". return value true if lock exists, false otherwise clearpseudoclasslocks()
removes any pseudo-class locks from the element. void clearpseudoclasslocks( in nsidomelement aelement ); parameters aelement the element to
remove the pseudo-class locks from. ...
nsICookieManager
oving the cookies that are in the cookie list. netwerk/cookie/nsicookiemanager.idlscriptable please add a summary to this article. last changed in gecko 1.7 inherits from: nsisupports this interface is intended to be used as a service. ...
... last changed in gecko 1.7 inherits from: nsisupports this interface is intended to be used as a service. it is implemented by the @mozilla.org/cookiemanager;1 component, but should generally be accessed via services.cookies method overview void
remove(in autf8string ahost, in acstring aname, in autf8string apath, in boolean ablocked, in jsval aoriginattributes); void
removeall(); attributes attribute type description enumerator nsisimpleenumerator called to enumerate through each cookie in the cookie list. the objects enumerated over are of type nsicookie. read only. methods
remove() this method is called to
remove an individual cookie from the cookie list, specified by host, name, and path. if the cookie cannot be foun...
...see nsicookiemanager2.add() for a description of acceptable host strings. ...
...r which the cookie was set. see nsicookiemanager2.add() for a description of acceptable host strings. if the target cookie is a domain cookie, a leading dot must be present. aname the name specified in the cookie. apath the path for which the cookie was set. ablocked indicates if cookies from this host should be permanently blocked. aoriginattributes the originattributes of this cookie.
removeall() this method is called to
remove all cookies from the cookie list. void
removeall(); parameters none. see also nsicookie nsicookie2 nsicookiemanager2 nsicookiepermission ...
nsIDBFolderInfo
ring propertyname ); parameters propertyname missing description return value missing description exceptions thrown missing exception missing description native code only!getlocale obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. void getlocale( in nsstring result ); parameters result missing description exceptions thrown missing exception missing description native code only!getmailboxname obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)this feature is obsolete. although it may still work in some browsers, its use is discour...
...void using it. void getlocale( in nsstring result ); parameters result missing description exceptions thrown missing exception missing description native code only!getmailboxname obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. void getmailboxname( in nsstring boxname ); parameters boxname missing description exceptions thrown missing exception missing description getproperty() astring getproperty( in string propertyname ); parameters propertyname missing description return value missing description exceptions thrown missi...
...boolean force ); parameters highwater missing description force missing description exceptions thrown missing exception missing description native code only!setlocale obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. void setlocale( in nsstring locale ); parameters locale missing description exceptions thrown missing exception missing description native code only!setmailboxname obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)this feature is obsolete. although it may still work in some browsers, its use is discour...
...void using it. void setlocale( in nsstring locale ); parameters locale missing description exceptions thrown missing exception missing description native code only!setmailboxname obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. void setmailboxname( in nsstring newboxname ); parameters newboxname missing description exceptions thrown missing exception missing description setproperty() void setproperty( in string propertyname, in astring propertystr ); parameters propertyname missing description propertystr missing de...
nsIDOMXULElement
elist getelementsbyattribute(in domstring name, in domstring value); nsidomnodelist getelementsbyattributens(in domstring namespaceuri, in domstring name, in domstring value); attributes attribute type description align domstring gets/sets the value of the element's align attribute. allowevents boolean true if the element's allowevents attribute is the string "true", otherwise false.
removes the attribute if you set it to false. boxobject nsiboxobject read only. gets or creates a box object for the element; browser, editor, iframe, listbox, menu, menupopup, scrollbox, tooltip and tree elements receive specialized box objects allowing access to additional properties not normally available from script. builder nsixultemplatebuilder read only. retrives the element's template builde...
...lements receive specialized box objects allowing access to additional properties not normally available from script. builder nsixultemplatebuilder read only. retrives the element's template builder, if it has a template. classname domstring gets/sets the value of the element's class attribute. collapsed boolean true if the element's collapsed attribute is the string "true", otherwise false.
removes the attribute if you set it to false. contextmenu domstring gets/sets the value of the element's contextmenu attribute. controllers nsicontrollers read only. returns an nsicontrollers object that additional controllers may be appended to so as to provide focus-specific actions for commands. database nsirdfcompositedatasource read only. returns the template builder's database, if it is an r...
...s attribute. dir domstring gets/sets the value of the element's dir attribute. flex domstring gets/sets the value of the element's flex attribute. flexgroup domstring gets/sets the value of the element's flexgroup attribute. height domstring gets/sets the value of the element's height attribute. hidden boolean true if the element's hidden attribute is the string "true", otherwise false.
removes the attribute if you set it to false. id domstring gets/sets the value of the element's id attribute. left domstring gets/sets the value of the element's left attribute. maxheight domstring gets/sets the value of the element's maxheight attribute. maxwidth domstring gets/sets the value of the element's maxwidth attribute. menu domstring gets/sets the value of the element's menu attribu...
...sed to read or write individual css style properties for the element. tooltip domstring gets/sets the value of the element's tooltip attribute. tooltiptext domstring gets/sets the value of the element's tooltiptext attribute. top domstring gets/sets the value of the element's top attribute. width domstring gets/sets the value of the element's width attribute. methods blur() attempts to
remove focus from the element. void blur(); parameters none. click() unless the element is disabled, sends mouse events that simulate the effect of clicking the mouse on the element, then calls the docommand() method. void click(); parameters none. docommand() generates and dispatches a basic command event, as if the element was clicked with no keyboard modifiers. void docommand(); parameters none. f...
nsIDeviceMotion
ntroduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) note: this interface was named nsidevicemotion prior to gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3). method overview void addlistener(in nsidevicemotionlistener alistener); void addwindowlistener(in nsidomwindow awindow); native code only! void
removelistener(in nsidevicemotionlistener alistener); void
removewindowlistener(in nsidomwindow awindow); native code only! methods addlistener() when called, the accelerometer support implementation must begin to notify the specified nsidevicemotionlistener by calling its nsidevicemotionlistener.onaccelerationchange() method as appropriate to share updated acceleration data. void addlistener( in...
...whose nsidevicemotionlistener.onaccelerationchange() method should be called with updated acceleration data. native code only!addwindowlistener sets the nsiaccelerometer as the source for mozorientation events on the specified dom window. void addwindowlistener( in nsidomwindow awindow ); parameters awindow the dom window that the accelerometer should begin sending mozorientation events to. ...
...tive code only!addwindowlistener sets the nsiaccelerometer as the source for mozorientation events on the specified dom window. void addwindowlistener( in nsidomwindow awindow ); parameters awindow the dom window that the accelerometer should begin sending mozorientation events to.
removelistener() tells the accelerometer to stop sending updates to the specified nsidevicemotionlistener. ...
...); parameters awindow the dom window that the accelerometer should begin sending mozorientation events to.
removelistener() tells the accelerometer to stop sending updates to the specified nsidevicemotionlistener. void
removelistener( in nsidevicemotionlistener alistener ); parameters alistener the nsidevicemotionlistener object to which no further updates should be sent. native code only!
removewindowlistener
removes the nsiaccelerometer as the source for mozorientation events on the specified dom window. void
removewindowlistener( in nsidomwindow awindow ); parameters awindow the dom window that the accelerometer should stop sending mozorientation events to. see also mozorientation nsidomorientationevent nsidevicemotiondata nsidevicemotionlistener ...
nsIEditor
ast changed in gecko 18.0 (firefox 18.0 / thunderbird 18.0 / seamonkey 2.15) method overview [noscript] void init(in nsidomdocument doc, in nsicontent aroot, in nsiselectioncontroller aselcon, in unsigned long aflags); void setattributeorequivalent(in nsidomelement element, in astring sourceattrname, in astring sourceattrvalue, in boolean asuppresstransaction); void
removeattributeorequivalent(in nsidomelement element, in domstring sourceattrname, in boolean asuppresstransaction); void postcreate(); void predestroy(in boolean adestroyingframes); selected content removal void deleteselection(in short action, in short stripwrappers); document info and file methods void resetmodificationcount(); long getm...
...boolean candrag(in nsidomevent aevent); void dodrag(in nsidomevent aevent); void insertfromdrop(in nsidomevent aevent); node manipulation methods void setattribute(in nsidomelement aelement, in astring attributestr,in astring attvalue); boolean getattributevalue(in nsidomelement aelement, in astring attributestr, out astring resultvalue); void
removeattribute(in nsidomelement aelement, in astring aattribute); void cloneattribute(in astring aattribute, in nsidomnode asourcenode); void cloneattributes(in nsidomnode destnode, in nsidomnode sourcenode); nsidomnode createnode(in astring tag, in nsidomnode parent, in long position); void insertnode(in nsidomnode node, in nsidomnode parent, in long aposition); ...
...'text/xml', 2); // the body is not recognized, everything is printed void outputtostream(in nsioutputstream astream, in astring formattype, in acstring charsetoverride, in unsigned long flags); listener methods void addeditorobserver(in nsieditorobserver observer);obsolete since gecko 18 void seteditorobserver(in editactionlistener observer); void
removeeditorobserver(in nsieditorobserver observer obsolete since gecko 18); void addeditactionlistener(in nsieditactionlistener listener); void
removeeditactionlistener(in nsieditactionlistener listener); void adddocumentstatelistener(in nsidocumentstatelistener listener); void
removedocumentstatelistener(in nsidocumentstatelistener listener); debug methods ...
...nitializes the editor's services. [noscript] void init( in nsidomdocument doc, in nsipresshellptr shell, obsolete since gecko 5 in nsicontent aroot, in nsiselectioncontroller aselcon, in unsigned long aflags ); parameters doc the document to observe. shell obsolete since gecko 5.0 the nsipresshellptr representing the presentation shell displaying the document. this parameter was
removed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2). aroot the root of the editable section of this document; if it's null, the editor gets its root from document.body. aselcon the nsiselectioncontroller object used to get selection location information. this should be null for html editors. aflags a bit mask of flags controlling the editor's behavior. need to document what the po...
nsIFile
each element in the enumeration is an nsifile. read only. exceptions thrown ns_error_...
...mpty indicates that an attempt was made to move a directory to the location of an existing directory that is not empty. ns_error_file_access_denied indicates that an attempt was made to move file across volumes, or to move a directory to the location of an existing directory that is not writable. ns_error_file_destination_not_dir indicates that "newparentdir" exists and is not a directory.
remove() this method
removes the file or directory corresponding to the file path represented by this nsifile. this method will not resolve any symlinks. void
remove( in boolean recursive ); parameters recursive if this nsifile corresponds to a directory that is not empty, then this parameter must be true in order for the directory to be deleted. otherwise, this parameter is ignored. except...
...details depend on your file system and how its permissions work. ...
...le corresponds to a directory that is not empty, then this parameter must be true in order for the directory to be deleted. otherwise, this parameter is ignored. exceptions thrown ns_error_file_target_does_not_exist indicates that the current file path does not exist. it is not possible to
remove a file that does not exist. ns_error_file_dir_not_empty indicates that an attempt was made to
remove a directory that is not empty. ns_error_file_access_denied indicates that an attempt was made to
remove a file in a way that exceeded your permissions. details depend on your file system and how its permissions work. remarks all string-valued methods and attributes have two forms. the preferred form operates on utf-16 (unicode) encoded character strings. the alternate form operates on charac...
nsIFormHistory2
ts last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) note: this interface provides no means to access stored values. stored values are used by the formfillcontroller to generate autocomplete matches. method overview void addentry(in astring name, in astring value); boolean entryexists(in astring name, in astring value); boolean nameexists(in astring name); void
removeallentries(); void
removeentriesbytimeframe(in long long abegintime, in long long aendtime); void
removeentriesforname(in astring name); void
removeentry(in astring name, in astring value); attributes attribute type description dbconnection mozistorageconnection returns the underlying db connection the form history module is using. read only. hasentries boolean returns true if th...
...( in astring name, in astring value ); parameters name value entryexists() gets whether a name and value pair exists in the form history. boolean entryexists( in astring name, in astring value ); parameters name value return value nameexists() returns true if there is no entry that is paired with a name. boolean nameexists( in astring name ); parameters name return value
removeallentries()
removes all entries in the entire form history. void
removeallentries(); parameters none.
removeentriesbytimeframe()
removes entries that were created between the specified times. void
removeentriesbytimeframe( in long long abegintime, in long long aendtime ); parameters abegintime the beginning of the timeframe, in microseconds. aendtime the end of the timeframe, in microsecon...
...tries()
removes all entries in the entire form history. void
removeallentries(); parameters none.
removeentriesbytimeframe()
removes entries that were created between the specified times. void
removeentriesbytimeframe( in long long abegintime, in long long aendtime ); parameters abegintime the beginning of the timeframe, in microseconds. aendtime the end of the timeframe, in microseconds.
removeentriesforname()
removes all entries that are paired with a name. void
removeentriesforname( in astring name ); parameters name
removeentry()
removes a name and value pair from the form history. ...
...eframe( in long long abegintime, in long long aendtime ); parameters abegintime the beginning of the timeframe, in microseconds. aendtime the end of the timeframe, in microseconds.
removeentriesforname()
removes all entries that are paired with a name. ...
nsIFrameMessageManager
agemanager.idlscriptable provides methods for managing message listeners on local frames. this provides a way for local frames to receive messages from remote frames. ...
...herits from: nsisupports last changed in gecko 17.0 (firefox 17.0 / thunderbird 17.0 / seamonkey 2.14) this interface is obsolete and was
removed in firefox 17. you should use nsimessagelistenermanager or nsimessagesender instead. method overview void addmessagelistener(in astring amessage, in nsiframemessagelistener alistener, [optional] in boolean listenwhenclosed); void
removemessagelistener(in astring amessage, in nsiframemessagelistener alistener); void sendasyncmessage(in astring amessage, in astring json); methods addmessagelistener() adds a message listener to the local frame. this listener will receive messages sent from the remote frame. void addmessagelistener( in astring amessage, in nsiframemessagelistener alistener [optional in boole...
...elistener alistener [optional in boolean listenwhenclosed ); parameters amessage the name of the message for which to add a listener. alistener an object implementing nsiframemessagelistener whose receivemessage method will be called when the message is received. listenwhenclosed default is false. ...
...lse. set to oo if you want to receive messages during the short period after a frame has been
removed from the dom and before its frame script has finished unloading. this parameter only has an effect for frame message managers in the main process. an alternative method to listen for death of frame script is to use message-manager-disconnect observer: observer notifications :: message manager.
removemessagelistener()
removes a message listener previously added by calling addmessagelistener(). void
removemessagelistener( in astring amessage, in nsiframemessagelistener alistener ); parameters amessage the name of the message for which to
remove a listener. alistener an object implementing nsiframemessagelistener to stop receiving messages. sendasyncmessage() asynchronously send...
nsIFrameScriptLoader
idl file: mozilla-central/source/dom/base/nsimessagemanager.idl inherits from: nsisupports this interface is used to load frame scripts. methods void loadframescript(in astring aurl, in boolean aallowdelayedload, [optional] in boolean aruninglobalscope) void
removedelayedframescript(in astring aurl); jsval getdelayedframescripts(); loadframescript() load a script in the remote frame. frame scripts are loaded as soon as loadframescript() is called. if this function is called on a chromemessagebroadcaster (for example, a global frame message manager or a window message manager) then: loadframescript() will load the frame script independently into each applicable frame: every open frame ...
...nt-inserted notification. parameters name type description aurl string url for the script to load. aurl must be the absolute url. data: urls are also supported. for example data:,dump("foo\n"); aallowdelayedload boolean if true, this flag means that the frame script will be loaded into any new frames opened after the loadframescript() call, until
removedelayedframescript() is called for that script. aruninglobalscope boolean optional, defaults to false. by default, frame scripts each have their own scope, so they can declare global variables without causing conflicts with any other frame scripts. if present and set to true, this flag switches off that behavior, meaning that the script's scope is shared with any other fra...
...scope boolean optional, defaults to false. by default, frame scripts each have their own scope, so they can declare global variables without causing conflicts with any other frame scripts. if present and set to true, this flag switches off that behavior, meaning that the script's scope is shared with any other frame scripts in the same frame that have also set the flag.
removedelayedframescript()
removes aurl from the list of scripts which support delayed load. this cancels the effect of the aallowdelayedload flag, meaning that the loader will no longer load the script into new frames. if you used aallowdelayedload, you should call this as part of your cleanup (for example, when your add-on is disabled or uninstalled). parameters name type descriptio...
... scripts which support delayed load. this cancels the effect of the aallowdelayedload flag, meaning that the loader will no longer load the script into new frames. if you used aallowdelayedload, you should call this as part of your cleanup (for example, when your add-on is disabled or uninstalled). parameters name type description aurl string url for the script to
remove. getdelayedframescripts() returns all delayed scripts that will be loaded once a (remote) frame becomes available. the return value is a list of pairs [<url>, <wasloadedinglobalscope>]. returns list of the delayed scripts. each script is returned as a pair: [<url>, <wasloadedinglobalscope>]. ...
nsIJSON
ing str, in jscontext cx); native code only! deprecated since gecko 2.0 methods decode() obsolete since gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) decodes a json string, returning the javascript object it represents. note: this method is more flexible than it should be, and accepts some not-correctly-structured json. for that reason, it has been
removed in gecko 7.0. jsobject decode( in astring str ); parameters str the json string to decode. return value the original javascript object, reconstructed from the json string. decodetojsval() note: this method may only be used from native code, and provides a way to decode a json string to a jsval for use in your native code. don't forget to gcroot the result before using it. jsva...
... byte-order mark (bom) into the stream, otherwise specify false. value the javascript object to encode. legacydecode() decodes a json string. this method accepts slightly more than the exact json syntax; details of extra accepted syntax are deliberately not described. this method is intended for use only by code processing legacy data. when the original instance requiring this function is
removed, this method will be
removed. thus, this deprecated method should not be used. jsval legacydecode( in astring str ); parameters str the json string to decode. return value the original javascript object, reconstructed from the json string. legacydecodefromstream() decodes a json string, read from a stream. this method accepts slightly more than the exact json syntax; details o...
...n value the original javascript object, reconstructed from the json string. legacydecodefromstream() decodes a json string, read from a stream. this method accepts slightly more than the exact json syntax; details of extra accepted syntax are deliberately not described. this method is intended for use only by code processing legacy data. when the original instance requiring this function is
removed, this method will be
removed. thus, this deprecated method should not be used. jsval legacydecodefromstream( in nsiinputstream stream, in long contentlength ); parameters stream the nsiinputstream from which to read the json string to decode. contentlength the length of the string to decode. return value the original javascript object, reconstructed from the json string. le...
...ode. return value the original javascript object, reconstructed from the json string. legacydecodetojsval() decodes a json string to a jsval. this method accepts slightly more than the exact json syntax; details of extra accepted syntax are deliberately not described. this method is intended for use only by code processing legacy data. when the original instance requiring this function is
removed, this method will be
removed. thus, this deprecated method should not be used. note: this method may only be used from native code, and provides a way to decode a json string to a jsval for use in your native code. don't forget to gcroot the result before using it. jsval legacydecodetojsval( in astring str, in jscontext cx ); parameters str the json string to decode. cx the ja...
nsIJumpListBuilder
individual step. the default number of allowed items in a jump list is ten. users can change the number through system preferences. user may also pin items to jump lists, which take up additional slots. applications do not have control over the number of items allowed in jump lists; excess items added are dropped by the system. item insertion priority is defined as first to last added. users may
remove items from jump lists after they are committed. the system tracks
removed items between commits. a list of these items is returned by a call to initlistbuild(). nsijumplistbuilder does not filter entries added that have been
removed since the last commit. to prevent repeatedly adding entires users have
removed, applications are encouraged to track
removed items internally. each list is made up of...
...siwinjumplistitems representing items such as shortcuts, links, and separators. see nsijumplistitem for information on adding additional jump list types. method overview void abortlistbuild(); boolean addlisttobuild(in short acattype, in nsiarray items optional, in astring catname optional); boolean commitlistbuild(); boolean deleteactivelist(); boolean initlistbuild(in nsimutablearray
removeditems); attributes attribute type description available short indicates whether jump list taskbar features are supported by the current host. read only. islistcommitted boolean jumplist management. indicates if a commit has already occurred in this session. read only. exceptions thrown ns_error_not_available on all calls if taskbar functionality is not supported by the operating syste...
...array items, optional in astring catname optional ); parameters acattype the type of list to add. items optional an array of nsijumplistitem items to add to the list. catname optional for custom lists, the title of the list. return value true if the operation completed successfully. exceptions thrown ns_error_unexpected on internal errors. ns_error_illegal_value if an item is added that was
removed since the last commit. ns_error_invalid_arg if incorrect parameters are passed for a particular category or item type. commitlistbuild() commits the current jump list build to the taskbar. boolean commitlistbuild(); parameters none. return value true if the operation completed successfully. deleteactivelist() deletes any currently applied taskbar jump list for this application. common uses wou...
...ivelist() deletes any currently applied taskbar jump list for this application. common uses would be the enabling of a privacy mode and uninstallation. boolean deleteactivelist(); parameters none. return value true if the operation completed successfully. exceptions thrown ns_error_unexpected on internal errors. initlistbuild() initializes a jump list build and returns a list of items the user
removed since the last time a jump list was committed.
removed items can become state after initlistbuild is called, lists should be built in single-shot fashion. boolean initlistbuild( in nsimutablearray
removeditems ); parameters
removeditems a list of items that were
removed by the user since the last commit. return value true if the operation completed successfully. ...
nsIMsgIncomingServer
in astring aprompttitle, in nsimsgwindow amsgwindow, out boolean okayvalue); astring getunicharattribute(in string name); astring getunicharvalue(in string attr); boolean isnewhdrduplicate(in nsimsgdbhdr anewhdr); void onuserorhostnamechanged(in acstring oldname, in acstring newname); void performbiff(in nsimsgwindow amsgwindow); void performexpand(in nsimsgwindow amsgwindow); void
removefiles(); void setboolattribute(in string name, in boolean value); void setboolvalue(in string attr, in boolean value); void setcharattribute(in string name, in acstring value); void setcharvalue(in string attr, in acstring value); void setdefaultlocalpath(in nsilocalfile adefaultlocalpath); void setfilevalue(in string relpref, in string abspref, in nsilocalfile avalue); void setfilte...
... storepassword(); astring tostring(); void writetofoldercache(in nsimsgfoldercache foldercache); attributes attribute type description accountmanagerchrome astring read only. biffminutes long biffstate unsigned long canbedefaultserver boolean read only. cancompactfoldersonserver boolean read only. cancreatefoldersonserver boolean candelete boolean can this server be
removed from the account manager? for instance, local mail is not removable, but an imported folder is. canemptytrashonexit boolean read only. canfilemessagesonserver boolean canhavefilters boolean read only. cansearchmessages boolean read only. canundodeleteonserver boolean read only. constructedprettyname astring helper function to construct the pretty name in a server type specific way ...
...exceptions thrown missing exception missing description setboolattribute() void setboolattribute( in string name, in boolean value ); parameters name missing description value missing description exceptions thrown missing exception missing description...
...ription performbiff() void performbiff( in nsimsgwindow amsgwindow ); parameters amsgwindow missing description exceptions thrown missing exception missing description performexpand() void performexpand( in nsimsgwindow amsgwindow ); parameters amsgwindow missing description exceptions thrown missing exception missing description
removefiles() this is also very dangerous. this will
remove the files associated with this server on disk. void
removefiles(); parameters none. exceptions thrown missing exception missing description setboolattribute() void setboolattribute( in string name, in boolean value ); parameters name missing description value missing description exceptions thrown missing exception missing description setboolvalue() void setboolvalue( in string attr,...
nsIPrefBranch2
on preference changes, the following arguments will be passed to nsiobserver.observe(): asubject - the nsiprefbranch object (this). ...
... to observe. for example holding the "root" prefbranch and calling addobserver("foo.bar.", ...) will observe changes to foo.bar.baz and foo.bar.bzip. aobserver the object to be notified if the preference changes. aholdweak true holds a weak reference to aobserver. the object must implement the nsisupportsweakreference interface or this will fail. false holds a strong reference to aobserver. ...
...xample holding the "root" prefbranch and calling addobserver("foo.bar.", ...) will observe changes to foo.bar.baz and foo.bar.bzip. aobserver the object to be notified if the preference changes. aholdweak true holds a weak reference to aobserver. the object must implement the nsisupportsweakreference interface or this will fail. false holds a strong reference to aobserver.
removeobserver()
remove a preference change observer. note: you must call
removeobserver method on the same nsiprefbranch2 instance on which you called addobserver() method in order to
remove aobserver; otherwise, the observer will not be
removed. void
removeobserver( in string adomain, in nsiobserver aobserver ); parameters adomain the preference which is being observed for changes. aobserver an...
...t to be held as a weak reference when it is registered. this insures that shorter lived objects (say one tied to an open window) will not fall into the cyclical reference trap. the list of registered observers may be changed during the dispatch of nspref:changed notification. however, the observers are not guaranteed to be notified in any particular order, so you can't be sure whether the added/
removed observer will be called during the notification when it is added/
removed. it is possible to change preferences during the notification. it is not safe to change observers during this callback in releases before gecko 1.9. if you want a safe way to
remove a preference observer, please use an nsitimer. ...
nsISHistory
read only. index long the index of the current document in session history. read only. maxlength long used to get/set the maximum number of toplevel documents, ...
... index value whose entry is requested. modifyindex a boolean flag that indicates if the current index of session history should be modified to the parameter index. exceptions thrown ns_ok history entry for the index is obtained successfully. ns_error_failure error in obtaining history entry for the given index. purgehistory() called to purge older documents from history. documents can be
removed from session history for various reasons. for example to control memory usage of the browser, to prevent users from loading documents from history, to erase evidence of prior page loads and so on. void purgehistory( in long numentries ); parameters numentries the number of toplevel documents to be purged from history. during purge operation, the latest documents are maintained and ol...
...rious reasons. for example to control memory usage of the browser, to prevent users from loading documents from history, to erase evidence of prior page loads and so on. void purgehistory( in long numentries ); parameters numentries the number of toplevel documents to be purged from history. during purge operation, the latest documents are maintained and older numentries documents are
removed from history. exceptions thrown ns_error_failure numentries is invalid or out of bounds with the size of history. ns_success_loss_of_insignificant_data purge was vetoed. reloadcurrententry() void reloadcurrententry(); parameters none.
removeshistorylistener() called to
remove a listener for the session history component. listeners are notified when pages are loaded from histo...
...ds with the size of history. ns_success_loss_of_insignificant_data purge was vetoed. reloadcurrententry() void reloadcurrententry(); parameters none.
removeshistorylistener() called to
remove a listener for the session history component. listeners are notified when pages are loaded from history. note: a listener object must implement nsishistorylistener and nssupportsweakreference. void
removeshistorylistener( in nsishistorylistener alistener ); parameters alistener listener object to be
removed from session history. ...
nsIXSLTProcessor
cument-transformer;1?type=xslt. ...
...this will make the processor use the default-value for all parameters as specified in the stylesheet. void clearparameters(); parameters none. getparameter() gets a parameter if previously set by setparameter(). returns null otherwise. ...
...processor for transformations. void importstylesheet( in nsidomnode style ); parameters style the root-node of a xslt stylesheet. this can be either a document node or an element node. if a document node then the document can contain either a xslt stylesheet or a lre stylesheet. if the argument is an element node it must be the xsl:stylesheet (or xsl:transform) element of an xslt stylesheet. ...
...sformations. void importstylesheet( in nsidomnode style ); parameters style the root-node of a xslt stylesheet. this can be either a document node or an element node. if a document node then the document can contain either a xslt stylesheet or a lre stylesheet. if the argument is an element node it must be the xsl:stylesheet (or xsl:transform) element of an xslt stylesheet.
removeparameter()
removes a parameter, if set. this will make the processor use the default-value for the parameter as specified in the stylesheet. void
removeparameter( in domstring namespaceuri, in domstring localname ); parameters namespaceuri the namespaceuri of the xslt parameter. localname the local name of the xslt parameter. reset()
remove all parameters and stylesheets from this nsixsltprocessor. void res...
NS_CStringCutData
pass pr_uint32_max to specify the length from acutstart to the end of the string. return values the ns_cstringcutdata function returns ns_ok if successful. otherwise, it returns an error code. ...
...pass pr_uint32_max to specify the length from acutstart to the end of the string. return values the ns_cstringcutdata function returns ns_ok if successful. otherwise, it returns an error code. ...
...ection of the string's internal buffer. this is a low-level api. #include "nsstringapi.h" nsresult ns_cstringcutdata( nsacstring& astring, pruint32 acutstart, pruint32 acutlength ); parameters astring [in] a nsacstring instance to be modified. acutstart [in] the starting index of the section to
remove, measured in storage units. acutlength [in] the length of the section to
remove, measured in storage units. pass pr_uint32_max to specify the length from acutstart to the end of the string. return values the ns_cstringcutdata function returns ns_ok if successful. otherwise, it returns an error code. remarks this function is defined inline as a wrapper around ns_cstringsetdatarange . example code nscstringcontainer str; ns_cstringcontainerinit(str); ns_cstringsetdat...
...pass pr_uint32_max to specify the length from acutstart to the end of the string. return values the ns_cstringcutdata function returns ns_ok if successful. otherwise, it returns an error code. remarks this function is defined inline as a wrapper around ns_cstringsetdatarange . example code nscstringcontainer str; ns_cstringcontainerinit(str); ns_cstringsetdata(str, "hello world"); //
remove " world" portion of string ns_cstringcutdata(str, 5, pr_uint32_max); const char* data; ns_cstringgetdata(str, &data); printf("%s\n", data); // prints out "hello" ns_cstringcontainerfinish(str); history this function was frozen for mozilla 1.7. see bug 239123 for details. see also ns_cstringsetdatarange , nsacstring ...
NS_StringCutData
pass pr_uint32_max to specify the length from acutstart to the end of the string. return values the ns_stringcutdata function returns ns_ok if successful. otherwise, it returns an error code. ...
...pass pr_uint32_max to specify the length from acutstart to the end of the string. return values the ns_stringcutdata function returns ns_ok if successful. otherwise, it returns an error code. ...
...ion of the string's internal buffer. this is a low-level api. #include "nsstringapi.h" nsresult ns_stringcutdata( nsastring& astring, pruint32 acutstart, pruint32 acutlength ); parameters astring [in] a nsastring instance to be modified. acutstart [in] the starting index of the section to
remove, measured in storage units. acutlength [in] the length of the section to
remove, measured in storage units. pass pr_uint32_max to specify the length from acutstart to the end of the string. return values the ns_stringcutdata function returns ns_ok if successful. otherwise, it returns an error code. remarks this function is defined inline as a wrapper around ns_stringsetdatarange. note: gcc requires the -fshort-wchar option to compile this example since prunichar is an ...
... otherwise, it returns an error code. remarks this function is defined inline as a wrapper around ns_stringsetdatarange. note: gcc requires the -fshort-wchar option to compile this example since prunichar is an unsigned short. this example should compile by default under msvc. example code nsstringcontainer str; ns_stringcontainerinit(str); ns_stringsetdata(str, l"hello world"); //
remove " world" portion of string ns_stringcutdata(str, 5, pr_uint32_max); const prunichar* data; ns_stringgetdata(str, &data); // data now ponts to the string: l"hello" ns_stringcontainerfinish(str); history this function was frozen for mozilla 1.7. see bug 239123 for details. see also ns_stringsetdatarange, nsastring ...
Gloda examples
* called when new items are returned by the database query or freshly indexed */ onitemsadded: function _onitemsadded(aitems, acollection) { }, /* called when items that are already in our collection get re-indexed */ onitemsmodified: function _onitemsmodified(aitems, acollection) { }, /* called when items that are in our collection are purged from the system */ onitems
removed: function _onitems
removed(aitems, acollection) { }, /* called when our database query completes */ onquerycompleted: function _onquerycompleted(conversation_coll) { try { for (var conv in conversation_coll) { //do something with the conversation here alert(conv.subject); } } catch (e) {} } } glodamessage.con...
...* called when new items are returned by the database query or freshly indexed */ onitemsadded: function _onitemsadded(aitems, acollection) { }, /* called when items that are already in our collection get re-indexed */ onitemsmodified: function _onitemsmodified(aitems, acollection) { }, /* called when items that are in our collection are purged from the system */ onitems
removed: function _onitems
removed(aitems, acollection) { }, /* called when our database query completes */ onquerycompleted: function _onquerycompleted(acollection) { var items = acollection.items; for (msg of items) { alert(msg.subject); }; } }; collection = id_q.getcollection(mylistener); show all messages where the from, to and cc values include...
... an email address and turn it into an identity object id_q = gloda.newquery(gloda.noun_identity); id_q.kind("email"); id_q.value("test@example.com"); id_coll = id_q.getcollection({ onitemsadded: function _onitemsadded(aitems, acollection) { }, onitemsmodified: function _onitemsmodified(aitems, acollection) { }, onitems
removed: function _onitems
removed(aitems, acollection) { }, onquerycompleted: function _onquerycompleted(id_coll) { //woops no identity if (id_coll.items.length <= 0) return; id = id_coll.items[0]; //now we use the identity to find all messages that person was involved with ...
... }, /* called when items that are already in our collection get re-indexed */ onitemsmodified: function _onitemsmodified(aitems, acollection) { }, /* called when items that are in our collection are purged from the system */ onitems
removed: function _onitems
removed(aitems, acollection) { }, /* called when our database query completes */ onquerycompleted: function _onquerycompleted(msg_coll) { try { while(msg = msg_coll.items.pop()) { //do som...
Mail composition back end
as of yet. i will try to make comments for these exceptions. sending messages the primary responsibility of the back end is for the creation and sending of rfc822 messages. the interface that accomplishes this task is the nsimsgsend interface. the feedback mechanism is provided by a nsimsgsendlistener which is implemented by the caller. the caller has the ability to add or
remove listener interfaces to the nsimsgsend object and the interface can support multiple listeners. (for detailed information on the listener interfaces, see the listener interfaces section of this document) nsimsgsend the following describes the methods of the nsimsgsend interface. all of these methods are asynchronous operations. createandsendmessage the...
... nsmsgdelivermode mode, - mode is the delivery mode. this can be set for the various modes of delivery (i.e. send later, drafts, templates or send the message now) nsimsgsendlistener **alistenerarray) = 0; - an array of listeners for the send operation. this can be nsnull if you want to do the delivery operation "blind" the addlistener/
removelistener methods let the caller add and
remove listeners to the sending interface. ns_imethod addlistener(nsimsgsendlistener *alistener) = 0; ns_imethod
removelistener(nsimsgsendlistener *alistener) = 0; sending listener interfaces the nsimsgsendlistener interface will let a caller keep track of the progress and any status of a send operation. these are critical for ...
...ssages(nsimsgidentity *identity, - the user identity for the person doing the send operation. this will be needed to determine the appropriate folder for copy operations. nsimsgsendlaterlistener **listenerarray) = 0; - an array of listeners for the send operation. ...
...ntity, - the user identity for the person doing the send operation. this will be needed to determine the appropriate folder for copy operations. nsimsgsendlaterlistener **listenerarray) = 0; - an array of listeners for the send operation. this can be nsnull if you want to do the delivery operations "blind" the addlistener &
removelistener methods will add and
remove listeners from the nsimsgsendlater object. ns_imethod addlistener(nsimsgsendlaterlistener *alistener) = 0; ns_imethod
removelistener(nsimsgsendlaterlistener *alistener) = 0; sending unsent messages listener the nsimsgsendlaterlistener interface will notify the implementor of the progress and completion of the send later operations. createandsendmessage ...
Mail event system
ases. the folder pane needs to know that this changed so that it can update the message count so the user can see it. interfaces the key interfaces here are: nsifolder.idl is an interface for storing a hierarchy of objects with properties. this interface is not (should not be) mail-related. nsifolders each store individual lists of folder listeners which are maintained with addlistener() and
removelistener(). when a notification is fired on a folder, all of the folder's folder listeners and the mail session itself is notified. nsifolderlistener.idl is an interface that an object can implement if it is interested in listening to changes on single folder or on all folders. if the object just needs to be notified about one folder, it should call that folder's addlistener method. if the object...
...in its implementation of onintpropertychanged, it notifies rdf (via the nsirdfobserver system) that the message count has changed. rdf handles the notification by updating the message counts in the folder pane. ...
...tion of onintpropertychanged, it notifies rdf (via the nsirdfobserver system) that the message count has changed. rdf handles the notification by updating the message counts in the folder pane. ...
...+ " now has " + newvalue + " messages."); } else if (propertystring == "testproperty") { dump("recieved integer test property fired on folder " + folder.prettyname + " with values " + oldvalue + " and " + newvalue + "\n"); } // set up the folder listener to point to the above function var folderlistener = { onitemadded: function(parent, item, viewstring) {}, onitem
removed: function(parent, item, viewstring) {}, onitempropertychanged: function(parent, item, viewstring) {}, onitemintpropertychanged: myonintpropertychanged, onitemboolpropertychanged: function(item, property, oldvalue, newvalue) {}, onitemunicharpropertychanged: function(item, property, oldvalue, newvalue) {}, onitempropertyflagchanged: function(item, property, oldflag, newflag) {}, onite...
Break on DOM mutation - Firefox Developer Tools
mutation breakpoint in the page inspector. navigate to the dom node in which you are interested and use the context menu to set the breakpoint. there are three choices: subtree modification execution pauses if any of the elementʼs descendant nodes are modified. that means, the script execution is stopped whenever a child node or descendant node deeper in the dom structure is added to or
removed from the element the option is set on. examples for when this breakpoint is triggered are calling node.appendchild() and node.
removechild(), calling childnode.
remove() or setting element.innerhtml on one of the subnodes. attribute modification execution pauses when any of the elementsʼ attributes are modified. that means, the script execution is stopped whenever an attribute is added to o...
...from the element the option is set on. examples for when this breakpoint is triggered are calling node.appendchild() and node.
removechild(), calling childnode.
remove() or setting element.innerhtml on one of the subnodes. attribute modification execution pauses when any of the elementsʼ attributes are modified. that means, the script execution is stopped whenever an attribute is added to or
removed from the element the option is set on or the value of one of its attributes is changed. examples for when this breakpoint is triggered are calling element.setattribute(), element.
removeattribute(), and element.classlist.add(), or setting element.id. node removal execution pauses if the element the option is set on is
removed. examples for when this breakpoint is triggered are calling ele...
... once you set the breakpoint, go to the debugger. you can see the breakpoint listed in the right-most panel under dom mutation breakpoints. ...
... once you set the breakpoint, go to the debugger. you can see the breakpoint listed in the right-most panel under dom mutation breakpoints. ...
DevTools API - Firefox Developer Tools
with following snippet const { gdevtools } = require("resource:///modules/devtools/gdevtools.jsm"); methods registertool(tooldefinition) registers a new tool and adds a tab to each existing toolbox. parameters: tooldefinition {tooldefinition} - an object that contains information about the tool. see tooldefinition for details. unregistertool(tool) unregisters the given tool and
removes it from all toolboxes. parameters: tool {tooldefinition|string} - the tool definition object or the id of the tool to unregister. registertheme(themedefinition) registers a new theme. parameters: themedefinition {themedefinition} - an object that contains information about the theme. unregistertheme(theme) unregisters the given theme. parameters: theme {themedefinition|string...
...ing. this.target = target; // do synchronous initialization here. window.document.body.addeventlistener("click", this.handleclick); } mypanel.prototype = { open: function() { // any asynchronous operations should be done here. return this.dosomethingasynchronous() .then(() => this); }, destroy: function() { // synchronous destruction. this.window.document.body.
removeeventlistener("click", this.handleclick); // async destruction. return this.destroysomethingasynchronosly() .then(() => console.log("destroyed")); }, handleclick: function(event) { console.log("clicked", event.originaltarget); }, }; eventemitter eventemitter is an interface many developer tool classes and objects implement and use to notify others about changes in thei...
...e on objects that have been decorated with the eventemitter interface. emit(eventname, ...extraarguments) emits an event with the given name to this object. parameters: eventname {string} - the name of the event. extraarguments {...any} - extra arguments that are passed to the listeners. on(eventname, listener) adds a listener for the given event. off(eventname, listener)
removes the previously added listener from the event. once(eventname, listener) adds a listener for the event that is
removed after it has been emitted once. return value: a promise that is fulfilled with the first extra argument for the event when then event is emitted. if the event contains multiple payload arguments, the rest are discarded and can only be received by providing the listener ...
...nt when then event is emitted. if the event contains multiple payload arguments, the rest are discarded and can only be received by providing the listener function to this method. examples here's a few examples using the gdevtools object. let oninit = (eventname, toolbox, netmonitor) => console.log("netmonitor initialized!"); // attach a listener. gdevtools.on("netmonitor-init", oninit); //
remove a listener. gdevtools.off("netmonitor-init", oninit); // attach a one time listener. gdevtools.once("netmonitor-init", (eventname, toolbox, netmonitor) => { console.log("network monitor initialized once!", toolbox, netmonitor); }); // use the promise returned by the once method. gdevtools.once("netmonitor-init").then(toolbox => { // note that the second argument is not available here. con...
Web Console remoting - Firefox Developer Tools
: foo is not defined", "sourcename": "http://localhost/~mihai/mozilla/test.js", "linetext": "", "linenumber": 6, "columnnumber": 0, "category": "content javascript", "timestamp": 1347294508210, "error": false, "warning": false, "exception": true, "strict": false, "private": false, } } the packet is similar to nsiscripterror - for simplicity. we only
removed several unneeded properties and changed how flags work. the private flag tells if the error comes from a private window/tab (added in firefox 24). starting with firefox 24 the errormessage and linetext properties can be long string actor grips if the string is very long. console api messages the window.console api calls send internal messages throughout gecko which allow us to do whatever we...
... "actor": "conn0.consoleobj20" }, " 960 739 3.141592653589793 %a", "zuzu", { "type": "null" }, { "type": "undefined" } ] } } similar to how we send the page errors, here we send the actual console event received from the nsiobserverservice. we change the arguments array - we create objectactor instances for each object passed as an argument - and, lastly, we
remove some unneeded properties (like window ids). in the case of long strings we use the longstringactor. the web console can then inspect the arguments. the private flag tells if the console api call comes from a private window/tab (added in firefox 24). we have small variations for the object, depending on the console api call method - just like there are small differences in the console event obje...
...ctivity packet when a file load is observed the following fileactivity packet is sent to the client: { "from": "conn0.console9", "type": "fileactivity", "uri": "file:///home/mihai/public_html/mozilla/test2.css" } history protocol changes by firefox version: firefox 18: initial version. firefox 19: bug 787981 - added longstringactor usage in several places. firefox 20: bug 792062 -
removed locationchanged packet and updated the tabnavigated packet for tab actors. firefox 23: bug 783499 -
removed the webconsoleobjectactor. now the web console uses the javascript debugger api and the objectactor. firefox 23: added the bindobjectactor and frameactor options to the evaluatejs request packet. firefox 24: new private flags for the console actor notifications, bug 874061. also added t...
...ses the javascript debugger api and the objectactor. firefox 23: added the bindobjectactor and frameactor options to the evaluatejs request packet. firefox 24: new private flags for the console actor notifications, bug 874061. also added the lastprivatecontextexited notification for the global console actor. firefox 24: new isxhr flag for the networkevent notification, bug 859046. firefox 24:
removed the message property from the pageerror packet notification, bug 877773. the linetext and errormessage properties can be long string actors now. firefox 25: added the url option to the evaluatejs request packet. firefox 25: added the getpreferences and sendhttprequest request packets to the console actor, bug 886067 and bug 731311. conclusions as of this writing, this document is a dense su...
Animation - Web APIs
n.persist() has been invoked on it. animation.starttime gets or sets the scheduled time when an animation's playback should begin. animation.timeline gets or sets the timeline associated with this animation. event handlers animation.oncancel gets and sets the event handler for the cancel event. animation.onfinish gets and sets the event handler for the finish event. animation.on
remove allows you to set and run an event handler that fires when the animation is
removed (i.e., put into an active replace state). methods animation.cancel() clears all keyframeeffects caused by this animation and aborts its playback. animation.commitstyles() commits the end styling state of an animation to the element being animated, even after that animation has been
removed. it will cause ...
... animation.play() starts or resumes playing of an animation, or begins the animation again if it previously finished. animation.reverse() reverses playback direction, stopping at the start of the animation. if the animation is finished or unplayed, it will play from end to beginning. ...
...fter first synchronizing its playback position. automatically removing filling animations it is possible to trigger a large number of animations on the same element. if they are indefinite (i.e., forwards-filling), this can result in a huge animations list, which could create a memory leak. ...
... animations spec that automatically
removes overriding forward filling animations, unless the developer explicitly specifies to keep them. you can see this in action in our simple replace indefinite animations demo. the related javascript features are: animation.commitstyles() for commiting the end styling state of an animation to the element being animated, even after that animation has been
removed. animation.on
remove for setting and running an event handler that fires when the animation is
removed (i.e., put into an active replace state). animation.persist() for when you explicitly want an animations to be retained. animation.replacestate to return the replace state of the animation. this will be active if the animation has been
removed, or persisted if persist() has been invoked. ac...
Attr - Web APIs
domstring representing the namespace uri of the attribute, or null if there is no namespace. localname read only a domstring representing the local part of the qualified name of the attribute. prefix read only a domstring representing the namespace prefix of the attribute, or null if no prefix is specified. ownerelement read only the element holding the attribute. note: dom level 4
removed this property. the assumption was that since you get an attr object from an element, you should already know the associated element. as that doesn't hold true in cases like attr objects being returned by document.evaluate, the dom living standard reintroduced the property. gecko outputs a deprecation note starting from gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4). this note was ...
...d this property. the assumption was that since you get an attr object from an element, you should already know the associated element. as that doesn't hold true in cases like attr objects being returned by document.evaluate, the dom living standard reintroduced the property. gecko outputs a deprecation note starting from gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4). this note was
removed again in gecko 49.0 (firefox 49.0 / thunderbird 49.0 / seamonkey 2.46). specified read only this property always returns true. originally, it returned true if the attribute was explicitly specified in the source code or by a script, and false if its value came from the default one defined in the document's dtd. value the attribute's value. note: dom level 3 defined namespaceuri, loca...
...he value of attr.value instead. issupported() you shouldn't have been using this in the first place, so you probably don't care that this is going away. isequalnode() you shouldn't have been using this in the first place, so you probably don't care that this is going away. normalize() you shouldn't have been using this in the first place, so you probably don't care that this is going away.
removeattributenode() use element.
removeattribute() instead.
removechild() obsolete since gecko 14 modify the value of attr.value instead. replacechild() obsolete since gecko 14 modify the value of attr.value instead. setattributenode() use element.setattribute() instead. setattributenodens() use element.setattributens() instead. specifications specification status comment ...
...ute() instead. setattributenodens() use element.setattributens() instead. specifications specification status comment domthe definition of 'attr' in that specification. living standard added ownerelement property back dom4the definition of 'attr' in that specification. obsolete moved namespaceuri, prefix and localname from node to this api and
removed ownerelement, schematypeinfo and isid. document object model (dom) level 3 core specificationthe definition of 'attr' in that specification. obsolete initial definition ...
Content Index API - Web APIs
h allows developers to add urls and metadata of already cached pages, under the scope of the current service worker. the browser can then use these entries to display offline reading to a user. as a developer you can also display these entries within your application. indexed entries do not automatically expire. it's good practice to present an interface for clearing out entries, or periodically
remove older entries. the api supports indexing urls corresponding to html documents. a url for a cached media file, for example, can't be indexed directly. instead, you need to provide a url for a page that displays media, and which works offline. interfaces contentindex the contentindex interface provides functionality to register content available offline. contentindexevent the cont...
...g additions to the serviceworker have been specified in the content index api spec to provide an entry point for using content indexing. serviceworkerregistration.index read only returns a reference to the contentindex interface for indexing cached pages. serviceworkerglobalscope.oncontentdelete an event handler fired whenever a contentdelete event occurs. this happens when content is
removed by the user agent. examples all the following examples assume a service worker has been registered. for more information see the service worker api. feature detection and interface access here we get a reference to the serviceworkerregistration, then check for the index property, which gives us access to the content index interface. // reference registration const registration = await navi...
... async function unregistercontent(article) { // reference registration const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) return; // unregister content from index await registration.index.delete(article.id); } all the above methods are available within the scope of the service wor...
... index await registration.index.delete(article.id); } all the above methods are available within the scope of the service worker. they are accessible from the workerglobalscope.self property: // service worker script self.registration.index.add(item); self.registration.index.delete(item.id); const contentindexitems = self.registration.index.getall(); contentdelete event when an item is
removed from the user agent interface, a contentdelete event is received by the service worker. self.addeventlistener('contentdelete', (event) => { console.log(event.id); // logs content index id, which can then be used to determine what content to delete from your cache }); the contentdelete event is only fired when the deletion happens due to interaction with the browser's built-in user inter...
DOMTokenList.toggle() - Web APIs
return value a boolean indicating whether token is in the list after the call. examples in the following example we retrieve the list of classes set on a <span> element as a domtokenlist using element.classlist. ...
... return value a boolean indicating whether token is in the list after the call. examples in the following example we retrieve the list of classes set on a <span> element as a domtokenlist using element.classlist. ...
...if token doesn't exist it's added and the function returns true. syntax tokenlist.toggle(token [, force]); parameters token a domstring representing the token you want to toggle. force optional a boolean that, if included, turns the toggle into a one way-only operation. if set to false, then token will only be
removed, but not added. if set to true, then token will only be added, but not
removed. return value a boolean indicating whether token is in the list after the call. examples in the following example we retrieve the list of classes set on a <span> element as a domtokenlist using element.classlist. we then replace a token in the list, and write the list into the <span>'s node.textcontent. first, the html: <span class="a b">classlist is 'a b'</span> now the javascript: let...
... into the <span>'s node.textcontent. first, the html: <span class="a b">classlist is 'a b'</span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; span.addeventlistener('click', function() { let result = classes.toggle("c"); if (result) { span.textcontent = `'c' added; classlist is now "${classes}".`; } else { span.textcontent = `'c'
removed; classlist is now "${classes}".`; } }) the output looks like this: specifications specification status comment domthe definition of 'toggle()' in that specification. living standard initial definition ...
DataTransfer - Web APIs
cancelled read only this property applies only to the dragend event, and is true if the user canceled the drag operation by pressing escape. it will be false in all other cases, including if the drag failed for any other reason, for instance due to a drop over an invalid location. deprecated properties datatransfer.mozitemcount read only gives the number of items in the drag operation.
removed in firefox 71. methods standard methods datatransfer.cleardata()
remove the data associated with a given type. the type argument is optional. if the type is empty or not specified, the data associated with all types is
removed. if data for the specified type does not exist, or the data transfer contains no data, this method will have no effect. datatransfer.getdata() retrieves the data ...
...at. if data for the type already exists, the existing data is replaced in the same position. datatransfer.setdragimage() set the image to be used for dragging if a custom one is desired. gecko methods note: all of the methods in this section are gecko-specific. datatransfer.addelement() sets the drag source to the given element. deprecated methods datatransfer.mozcleardataat()
removes the data associated with the given format for an item at the specified index. the index is in the range from zero to the number of items minus one.
removed in firefox 71. datatransfer.mozgetdataat() retrieves the data associated with the given format for an item at the specified index, or null if it does not exist. the index should be in the range from zero to the number of items minus one. ...
...s the data associated with the given format for an item at the specified index. the index is in the range from zero to the number of items minus one.
removed in firefox 71. datatransfer.mozgetdataat() retrieves the data associated with the given format for an item at the specified index, or null if it does not exist. the index should be in the range from zero to the number of items minus one.
removed in firefox 71. datatransfer.mozsetdataat() a data transfer may store multiple items, each at a given zero-based index. mozsetdataat() may only be called with an index argument less than mozitemcount in which case an existing item is modified, or equal to mozitemcount in which case a new item is added, and the mozitemcount is incremented by one.
removed in firefox 71. datatransfer.moztypesat...
... examples every method and property listed in this document has its own reference page and each reference page either directly includes an example of the interface or has a link to an example. ...
DirectoryEntrySync - Web APIs
oot directory. var direntry = fs.root.getdirectory('superseekrit', {create: true}); method overview directoryreadersync createreader () raises (fileexception); fileentrysync getfile (in domstring path, in optional flags options) raises (fileexception); directoryentrysync getdirectory (in domstring path, in optional flags options) raises (fileexception); void
removerecursively () raises (fileexception); methods createreader() creates a new directoryreadersync to read entries from this directory. directoryreadersync createreader ( ) raises (fileexception); returns directoryreadersync represents a directory in a file system. parameter none exceptions this method can raise a fileexception with the following codes: exception des...
...the file already exists. you cannot create another one with the same path. quota_exceeded_error the operation would cause the application to exceed its storage quota. security_err the application does not have permission to access the element referred to by path. [ todo: explain why ] type_mismatch_err the path supplied exists, but it is not a directory. ...
... security_err the application does not have permission to access the element referred to by path. [ todo: explain why ] type_mismatch_err the path supplied exists, but it is not a directory.
removerecursively() deletes a directory and all of its contents. you cannot delete the root directory of a file system. if you delete a directory that contains a file that cannot be
removed or if an error occurs while the deletion is in progress, some of the contents might not be deleted. catch these cases with error callbacks and retry the deletion. ...
... invalid_state_err this directory is not longer valid for some reason other than being deleted. ...
MediaQueryList - Web APIs
list interface inherits methods from its parent interface, eventtarget. addlistener() adds to the mediaquerylist a callback which is invoked whenever the media query status—whether or not the document matches the media queries in the list—changes. this method exists primarily for backward compatibility; if possible, you should instead use addeventlistener() to watch for the change event. ...
...erits methods from its parent interface, eventtarget. addlistener() adds to the mediaquerylist a callback which is invoked whenever the media query status—whether or not the document matches the media queries in the list—changes. this method exists primarily for backward compatibility; if possible, you should instead use addeventlistener() to watch for the change event. ...
... events the following events are delivered to mediaquerylist objects: change sent to the mediaquerylist when the result of running the media query against the document changes. ...
... events the following events are delivered to mediaquerylist objects: change sent to the mediaquerylist when the result of running the media query against the document changes. ...
Using the Notifications API - Web APIs
text body. for example, in the to-do-list example we use the following snippet to create a notification when required (found inside the createnotification() function): var img = '/to-do-notifications/img/icon-128.png'; var text = 'hey! your task "' + title + '" is now overdue.'; var notification = new notification('to do list', { body: text, icon: img }); closing notifications used close() to
remove a notification that is no longer relevant to the user (e.g. the user already read the notification on the webpage, in the case of a messaging app, or the following song is already playing in a music app to notifies upon song changes). most modern browsers dismiss notifications automatically after a few moments (around four seconds) but this isn't something you should generally be concerned about ...
...already playing in a music app to notifies upon song changes). most modern browsers dismiss notifications automatically after a few moments (around four seconds) but this isn't something you should generally be concerned about as it's up to the user and user agent. the dismissal may also happen at the operating system level and users should remain in control of this. old versions of chrome didn't
remove notifications automatically so you can do so after a settimeout() only for those legacy versions in order to not
remove notifications from notification trays on other browsers. var n = new notification('my great song'); document.addeventlistener('visibilitychange', function() { if (document.visibilitystate === 'visible') { // the tab has become visible so clear the now-stale notification. ...
... note: when you receive a "close" event, there is no guarantee that it's the user who closed the notification. ...
... n = new notification('my great song'); document.addeventlistener('visibilitychange', function() { if (document.visibilitystate === 'visible') { // the tab has become visible so clear the now-stale notification. n.close(); } }); note: this api shouldn't be used just to have the notification
removed from the screen after a fixed delay (on modern browsers) since this method will also
remove the notification from any notification tray, preventing users from interacting with it after it was initially shown. note: when you receive a "close" event, there is no guarantee that it's the user who closed the notification. this is in line with the specification, which states: "when a notification is closed, either by the underlying notifications platform or by the user, the close steps for...
Pointer Lock API - Web APIs
the pointer lock api (formerly called mouse lock api) provides input methods based on the movement of the mouse over time (i.e., deltas), not just the absolute position of the mouse cursor in the viewport. it gives you access to raw mouse movement, locks the target of mouse events to a single element, eliminates limits on how far mouse movement can go in a single direction, and
removes the cursor from view. it is ideal for first person 3d games, for example. more than that, the api is useful for any applications that require significant mouse input to control movements, rotate objects, and change entries, for example allowing users to control the viewing angle simply by moving the mouse around without any button clicking. the buttons are then freed up for other actions. other examples include ...
...d re-enter the browser window. if that happens, movementx and movementy could be set to zero. simple example walkthrough we've written a simple pointer lock demo to show you how to use it to set up a simple control system (see source code). the demo looks like this: this demo uses javascript to draw a ball on top of an <canvas> element. when you click the canvas, pointer lock is then used to
remove the mouse pointer and allow you to move the ball directly using the mouse. let's see how this works. we set initial x and y positions on the canvas: var x = 50; var y = 50; the pointer lock methods are currently prefixed, so next we'll fork them for the different browser implementations. canvas.requestpointerlock = canvas.requestpointerlock || canvas.mozrequestpoin...
...ok pointer lock state change events for different browsers document.addeventlistener('pointerlockchange', lockchangealert, false); document.addeventlistener('mozpointerlockchange', lockchangealert, false); this function checks the pointlockelement property to see if it is our canvas. if so, it attached an event listener to handle the mouse movements with the updateposition() function. ...
...if so, it makes the ball wrap around to the opposite edge. ...
Multi-touch interaction - Web APIs
event and some will fire several pointermoves. // // this function sets the target element's border to "dashed" to visually // indicate the target received a move event. if (logevents) log("pointermove", ev); update_background(ev); ev.target.style.border = "dashed"; } pointer up the pointerup event is fired when a pointer is raised from the contact surface. ...
...te_background(ev); ev.target.style.border = "dashed"; } pointer up the pointerup event is fired when a pointer is raised from the contact surface. when this occurs, the event is
removed from the associated event cache. in this application, this handler is also used for pointercancel, pointerleave and pointerout events. function pointerup_handler(ev) { if (logevents) log(ev.type, ev); //
remove this touch point from the cache and reset the target's // background and border
remove_event(ev); update_background(ev); ev.target.style.border = "1px solid black"; } application ui the application uses <div> elements for the touch areas and provides buttons to enable logging and to clear the log. to prevent the browser's default touch behavior from overriding this application's point...
...vcache3. ...
...cache(ev) { // return the cache for this event's target element switch(ev.target.id) { case "target1": return evcache1; case "target2": return evcache2; case "target3": return evcache3; default: log("error with cache handling",ev); } } function push_event(ev) { // save this event in the target's cache var cache = get_cache(ev); cache.push(ev); } function
remove_event(ev) { //
remove this event from the target's cache var cache = get_cache(ev); for (var i = 0; i < cache.length; i++) { if (cache[i].pointerid == ev.pointerid) { cache.splice(i, 1); break; } } } update background color the background color of the touch areas will change as follows: no active touches is white; one active touch is yellow; two simultaneous touches is ping and three or more simu...
Pinch zoom gestures - Web APIs
if (curdiff < prevdiff) { // the distance between the two pointers has decreased log("pinch moving in -> zoom out",ev); ev.target.style.background = "lightblue"; } } // cache the distance for the next move event prevdiff = curdiff; } } pointer up the pointerup event is fired when a pointer is raised from the contact surface. ...
...r up the pointerup event is fired when a pointer is raised from the contact surface. when this occurs, the event is
removed from the event cache and the target element's background color and border are restored to their original values. in this application, this handler is also used for pointercancel, pointerleave and pointerout events. ...
...hen this occurs, the event is
removed from the event cache and the target element's background color and border are restored to their original values. in this application, this handler is also used for pointercancel, pointerleave and pointerout events. function pointerup_handler(ev) { log(ev.type, ev); //
remove this pointer from the cache and reset the target's // background and border
remove_event(ev); ev.target.style.background = "white"; ev.target.style.border = "1px solid black"; // if the number of pointers down is less than two then reset diff tracker if (evcache.length < 2) { prevdiff = -1; } } application ui the application uses a <div> element for the touch area and provides buttons to enable logging and to clear the log. to prevent the browser's default tou...
...ng --> <button id="log" onclick="enablelog(event);">start/stop event logging</button> <button id="clearlog" onclick="clearlog(event);">clear the log</button> <p></p> <output></output> </body> miscellaneous functions these functions support the application but aren't directly involved in the event flow. cache management this function helps manage the global event caches evcache. function
remove_event(ev) { //
remove this event from the target's cache for (var i = 0; i < evcache.length; i++) { if (evcache[i].pointerid == ev.pointerid) { evcache.splice(i, 1); break; } } } event logging these functions are used to send event activity to the application's window (to support debugging and learning about the event flow). // log events flag var logevents = false; // log...
Using Pointer Events - Web APIs
after drawing the line, we call array.splice() to replace the previous information about the touch point with the current information in the ongoingtouches array. handling the end of a touch when the user lifts a finger off the surface, a pointerup event is sent. we handle this event by calling the handleend() function below. its job is to draw the last line segment for the touch that ended and
remove the touch point from the ongoing touch list. function handleend(evt) { log("pointerup"); var el = document.getelementsbytagname("canvas")[0]; var ctx = el.getcontext("2d"); var color = colorfortouch(evt); var idx = ongoingtouchindexbyid(evt.pointerid); if (idx >= 0) { ctx.linewidth = 4; ctx.fillstyle = color; ctx.beginpath(); ctx.moveto(ongoingtouches[idx].pagex, ong...
...the result is that we stop tracking that touch point. ...
...the result is that we stop tracking that touch point. ...
...t we stop tracking that touch point. handling canceled touches if the user's finger wanders into browser ui, or the touch otherwise needs to be canceled, the pointercancel event is sent, and we call the handlecancel() function below. function handlecancel(evt) { log("pointercancel: id = " + evt.pointerid); var idx = ongoingtouchindexbyid(evt.pointerid); ongoingtouches.splice(idx, 1); //
remove it; we're done } since the idea is to immediately abort the touch, we simply
remove it from the ongoing touch list without drawing a final line segment. convenience functions this example uses two convenience functions that should be looked at briefly to help make the rest of the code more clear. selecting a color for each touch in order to make each touch's drawing look different, the colo...
Selection - Web APIs
ngle point. selection.collapsetoend() collapses the selection to the end of the last range in the selection. selection.collapsetostart() collapses the selection to the start of the first range in the selection. selection.containsnode() indicates if a certain node is part of the selection. selection.deletefromdocument() deletes the selection's content from the document. ...
...ion to the end of the last range in the selection. selection.collapsetostart() collapses the selection to the start of the first range in the selection. selection.containsnode() indicates if a certain node is part of the selection. selection.deletefromdocument() deletes the selection's content from the document. selection.empty()
removes all ranges from the selection. ...
...the selection. selection.collapsetostart() collapses the selection to the start of the first range in the selection. selection.containsnode() indicates if a certain node is part of the selection. selection.deletefromdocument() deletes the selection's content from the document. selection.empty()
removes all ranges from the selection. this is an alias for
removeallranges() — see selection.
removeallranges() for more details. selection.extend() moves the focus of the selection to a specified point. selection.getrangeat() returns a range object representing one of the ranges currently selected. selection.modify() changes the current selection. selection.
removerange()
removes a range from the selection. selection.
removeallranges()
removes all ranges from the selection. selection.
...t of a document. a range can contain entire nodes as well as portions of nodes (such as a portion of a text node). a user will normally only select a single range at a time, but it's possible for a user to select multiple ranges (e.g., by using the control key). a range can be retrieved from a selection as a range object. range objects can also be created via the dom and programmatically added or
removed from a selection. specifications specification status comment selection apithe definition of 'selection' in that specification. working draft the selection api specification is based on the html editing apis specification and focuses on the selection-related functionality. ...
Selection API - Web APIs
ent.getselection() method, storing the return value — a selection object — in a variable for futher use. once your selection is in a variable, you perform a variety of operations on it, for example copying the selection to a text string using selection.tostring(), adding a range (as represented by a standard range object) to the selection (or removing one) with selection.addrange()/selection.
removerange(), or changing the selection to be the entire contents of a dom node using selection.selectallchildren(). you can run code in response to the selection being changed, or a new selection being started, using the globaleventhandlers.onselectionchange and globaleventhandlers.onselectstart event handlers. selection api interfaces selection represents the range of text selected by the us...
... opera full support yessafari full support yeswebvi...
... yeschrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yes
removeallranges experimentalchrome full support yesedge full support 12firefox full support yesie full support yesopera full support yessafari full support ...
... opera full support 45safari no support nowebview android...
SubtleCrypto.verify() - Web APIs
e; let enc = new textencoder(); return enc.encode(message); } /* fetch the encoded message-to-sign and verify it against the stored signature. * if it checks out, set the "valid" class on the signature. * otherwise set the "invalid" class. */ async function verifymessage(publickey) { const signaturevalue = document.queryselector(".rsassa-pkcs1 .signature-value"); signaturevalue.classlist.
remove("valid", "invalid"); let encoded = getmessageencoding(); let result = await window.crypto.subtle.verify( "rsassa-pkcs1-v1_5", publickey, signature, encoded ); signaturevalue.classlist.add(result ? "valid" : "invalid"); } rsa-pss this code uses a public key to verify a signature. see the complete code on github. /* fetch the contents of the "message" textbox, and encod...
....value; let enc = new textencoder(); return enc.encode(message); } /* fetch the encoded message-to-sign and verify it against the stored signature. * if it checks out, set the "valid" class on the signature. * otherwise set the "invalid" class. */ async function verifymessage(publickey) { const signaturevalue = document.queryselector(".rsa-pss .signature-value"); signaturevalue.classlist.
remove("valid", "invalid"); let encoded = getmessageencoding(); let result = await window.crypto.subtle.verify( { name: "rsa-pss", saltlength: 32, }, publickey, signature, encoded ); signaturevalue.classlist.add(result ? "valid" : "invalid"); } ecdsa this code uses a public key to verify a signature. see the complete code on github. /* fetch the contents of t...
...ox.value; let enc = new textencoder(); return enc.encode(message); } /* fetch the encoded message-to-sign and verify it against the stored signature. * if it checks out, set the "valid" class on the signature. * otherwise set the "invalid" class. */ async function verifymessage(publickey) { const signaturevalue = document.queryselector(".ecdsa .signature-value"); signaturevalue.classlist.
remove("valid", "invalid"); let encoded = getmessageencoding(); let result = await window.crypto.subtle.verify( { name: "ecdsa", hash: {name: "sha-384"}, }, publickey, signature, encoded ); signaturevalue.classlist.add(result ? "valid" : "invalid"); } hmac this code uses a secret key to verify a signature. see the complete code on github. /* fetch the content...
...gebox.value; let enc = new textencoder(); return enc.encode(message); } /* fetch the encoded message-to-sign and verify it against the stored signature. * if it checks out, set the "valid" class on the signature. * otherwise set the "invalid" class. */ async function verifymessage(key) { const signaturevalue = document.queryselector(".hmac .signature-value"); signaturevalue.classlist.
remove("valid", "invalid"); let encoded = getmessageencoding(); let result = await window.crypto.subtle.verify( "hmac", key, signature, encoded ); signaturevalue.classlist.add(result ? "valid" : "invalid"); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.verify()' in that specification. recom...
Text.wholeText - Web APIs
one for the ...
...one for the first sentence, a...
...one for the first sentence, and one for the first word of the last. ...
...one for the first sentence, and one for the first word of the last. ...
Inputs and input sources - Web APIs
inputsources; due to the fact that the contents of the xrinputsource objects representing each input source in the list are read-only, changes to these inputs are made by the webxr system by deleting the source's record and adding a new one to replace it. an inputsourceschange event is sent to your xrsession whenever one or more of the input sources change, or when an input source is added to or
removed from the list. for example, if you need to keep up with which controller is held in each of the player's hands, you might do something like this: let inputsourcelist = null; let lefthandsource = null; let righthandsource = null; xrsession.addeventlistener("inputsourceschange", event => { inputsourcelist = event.session.inputsources; inputsourcelist.foreach(source => { switch(source) ...
...xecution, so you can use it to fetch the input source list as soon as it's available at startup time. the event is delivered as an xrinputsourcechangeevent, which includes three properties of interest: session the xrsession for which the input sources have changed. added an array of zero or more xrinputsource objects indicating the input sources that have been newly added to the xr system.
removed an array of zero or more xrinputsource objects indicating any input sources that have been
removed from the xr system. identifying the input's profile each input source has a profiles property, which contains a live list of the webxr input profiles which apply to the input source, in order of specificity from most-specific to least. in order to do anything meaningful involving scanning of p...
...an object is found along the targeting ray, picks it up. picking up an object involves first looking to see if the hand represented by dropping any object already being held in the hand represented by avatar.heldobject[hand]. if an object is already held in that hand, it's dropped by calling the dropobject() function. then pickupobject() is called, specifying the targeted object as the object to
remove from the scene and place into the specified hand. pickupobject() also records the original position of the object so it can be returned to that spot if the squeeze is canceled or aborted. dropping the object: the squeeze event handler the squeeze event is received when the user ends the squeeze action by releasing their grip. in this example, we interpret that as releasing the currently-held o...
...g the hand that's dropping an object and the target ray's transform. the target ray transform is passed into the presumed findtargetposition() function to get the coordinates at which to position the dropped object. with the position in hand, we can then drop the object by calling the putobject() function, which takes as its inputs the hand and the destination position. this function's job is to
remove the object from the specified hand and add it back to the scene, with its position set to place it atop the coordinates returned by findtargetposition(). canceling the squeeze in the squeezeend handler the squeezeend event is received after the squeeze is complete, even if it fails. we handle it by simply returning the currently-held object to where it was when it was picked up. xrsession.adde...
Using the Web Storage API - Web APIs
utomatically converted to strings). you can access these values like an object, or with the storage.getitem() and storage.setitem() methods. these three lines all set the (same) colorsetting entry: localstorage.colorsetting = '#a4509b'; localstorage['colorsetting'] = '#a4509b'; localstorage.setitem('colorsetting', '#a4509b'); note: it's recommended to use the web storage api (setitem, getitem,
removeitem, key, length) to prevent the pitfalls associated with using plain objects as key-value stores. the two mechanisms within web storage are as follows: sessionstorage maintains a separate storage area for each given origin that's available for the duration of the page session (as long as the browser is open, including page reloads and restores). localstorage does the same thing, but persis...
...a different storage object is used for the sessionstorage and localstorage for each origin — they function and are controlled separately. so, for example, initially calling localstorage on a document will return a storage object; calling sessionstorage on a document will return a different storage object. both of these can be manipulated in the same way, but separately. feature-detecting lo...
...used up all available storage space, but storage is actually available. our feature detection should take these scenarios into account. ...
...sociated with this event has a number of properties containing useful information — the key of the data that changed, the old value before the change, the new value after that change, the url of the document that changed the storage, and the storage object itself (which we've stringified so you can see its content). deleting data records web storage also provides a couple of simple methods to
remove data. we don't use these in our demo, but they are very simple to add to your project: storage.
removeitem() takes a single argument — the key of the data item you want to
remove — and
removes it from the storage object for that domain. storage.clear() takes no arguments, and simply empties the entire storage object for that domain. specifications specification status com...
Using Web Workers - Web APIs
in order to achieve that we first implement a sendquery method which queries if the worker actually has the corresponding methods to do what we want. /* this functions takes at least one a...
...script type="text/javascript"> /* queryableworker instances methods: * sendquery(queryable function name, argument to pass 1, argument to pass 2, etc. ...
...script"> /* queryableworker instances methods: * sendquery(queryable function name, argument to pass 1, argument to pass 2, etc. ...
... then we can pass in the arguments that the method needs. */ this.sendquery = function() { if (arguments.length < 1) { throw new typeerror('queryableworker.sendquery takes at least one argument'); ...
Privileged features - Web APIs
when its parent window closes. a dependent window is minimized on the windows task bar only when its parent window is minimized. on windows platforms, a dependent window does not show on the task bar. a dependent window also stays in front of the parent window. dependent windows are not implemented on macos x, this option will be ignored. the dependent feature is currently under revision to be
removed (bug 214867) in msie 6, the nearest equivalent to this feature is the showmodelessdialog() method. chrome if on, the page is loaded as window's only content, without any of the browser's interface elements. there will be no context menu defined by default and none of the standard keyboard shortcuts will work. the page is supposed to provide a user interface of its own, usually this feature is...
... is loaded as window's only content, without any of the browser's interface elements. there will be no context menu defined by default and none of the standard keyboard shortcuts will work. the page is supposed to provide a user interface of its own, usually this feature is used to open xul documents (standard dialogs like the javascript console are opened this way). dialog the dialog feature
removes all icons (restore, minimize, maximize) from the window's titlebar, leaving only the close button. mozilla 1.2+ and netscape 7.1 will render the other menu system commands (in ff 1.0 and in ns 7.0x, the command system menu is not identified with the firefox/ns 7.0x icon on the left end of the titlebar: that's probably a bug. you can access the command system menu with a right-click on the titleb...
...ersion. note: as of gecko 1.9, the internet explorer equivalent to this feature is the window.showmodaldialog() method. for compatibility reasons, it's now supported in firefox. note also that starting in gecko 2.0, you can use window.showmodaldialog() without universalbrowserwrite privileges. titlebar by default, all new secondary windows have a titlebar. if set to no or 0, this feature
removes the titlebar from the new secondary window. mozilla and firefox users can force new windows to always render the titlebar by setting dom.disable_window_open_feature.titlebar to true in about:config or in their user.js file. alwaysraised if on, the new window will always be displayed on top of other browser windows, regardless of whether it is active or not. alwayslowered if on, the new cr...
... in ns 6.x, the alwayslowered window has no minimize system command icon and no restore/maximize system command. alwaysontop if on, the new window will always be displayed on top of all other windows (browser windows and otherwise), regardless of whether it is active or not. this was added in firefox 66 (see bug 1519893). z-lock same as alwayslowered. close when set to no or 0, this feature
removes the system close command icon and system close menu item. it will only work for dialog windows (dialog feature set). close=no will override minimizable=yes. mozilla and firefox users can force new windows to always have a close button by setting dom.disable_window_open_feature.close to true in about:config or in their user.js file. ...
XRInputSourcesChangeEventInit.added - Web APIs
the xrinputsourceschangeeventinit property added specifies a list of input sources, each identified using an xrinputsource object, which the represented inputsourceschange event is to indicate are newly available for use. ...
... the xrinputsourceschangeeventinit property added specifies a list of input sources, each identified using an xrinputsource object, which the represented inputsourceschange event is to indicate are newly available for use. ...
... specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.added' in that specification. working draft initial definition. ...
... specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.added' in that specification. working draft initial definition. ...
ARIA: tab role - Accessibility
, ideally the active tab's associated tabpanel. → focuses and optionally activates the next tab in the tab list. if the current tab is the last tab in the tab list it activates the first tab. ← focuses and optionally activates the previous tab in the tab list. if the current tab is the first tab in the tab list it activates the last tab. delete when allowed
removes the currently selected tab from the tab list. required javascript features while there are ways to build tab-like functionality without javascript, there are no substitute combination of html and css only that will provide the same set of functionality that's required above for accessible tabs with content. example this example combines the role tab with tablist and elements with ta...
...riggering element's parent element, and its grandparent element. we then find all tabs with aria-selected=true inside the parent element and sets it to false, then sets the triggering element's aria-selected to true. after that, we find all tabpanel elements in the grandparent element, make them all hidden, and finally select the element whose id is equal to the triggering tab's aria-controls and
removes the hidden attribute, making it visible. window.addeventlistener("domcontentloaded", () => { const tabs = document.queryselectorall('[role="tab"]'); const tablist = document.queryselector('[role="tablist"]'); // add a click event handler to each tab tabs.foreach(tab => { tab.addeventlistener("click", changetabs); }); // enable arrow navigation between tabs in the tab list le...
...de === 37) { tabfocus--; // if we're at the start, move to the end if (tabfocus < 0) { tabfocus = tabs.length - 1; } } tabs[tabfocus].setattribute("tabindex", 0); tabs[tabfocus].focus(); } }); }); function changetabs(e) { const target = e.target; const parent = target.parentnode; const grandparent = parent.parentnode; //
remove all current selected tabs parent .queryselectorall('[aria-selected="true"]') .foreach(t => t.setattribute("aria-selected", false)); // set this tab as selected target.setattribute("aria-selected", true); // hide all tab panels grandparent .queryselectorall('[role="tabpanel"]') .foreach(p => p.setattribute("hidden", true)); // show the selected panel grandparent.pa...
...for controlling tab key functionality for elements with the role tab, it is recommended to set all non-active elements to tabindex=-1, and to set the active element to tabindex=0. specificat...
:scope - CSS: Cascading Style Sheets
no support 20 — 32disabled disabled from version 20 until version 32 (excl...
... no support 20 — 32disabled disabled from version 20 until version 32 (exclusive): this feature is behind the layout.css.scope-pseudo.enabled preference (needs to be set to true). ...
... full support 20disabled disabled from version 20: this fe...
... full support 20disabled disabled from version 20: this feature is behind the layout.css.scope-pseudo.enabled preference (needs to be set to true). ...
Mutation events - Developer guides
in firefox (as of version 11), and probably in other browsers as well. ... dottoro documents browser support for mutation events. ...
...of version 11), and probably in other browsers as well. ... dottoro documents browser support for mutation events. ...
...pport for mutation events. ...
...mattrmodified domattributenamechanged domcharacterdatamodified domelementnamechanged domnodeinserted domnodeinsertedintodocument domnode
removed domnode
removedfromdocument domsubtreemodified mutation observers alternatives examples domnode
removedfromdocument var isdescendant = function (desc, root) { return !!desc && (desc === root || isdescendant(desc.parentnode, root)); }; var on
remove = function (element, callback) { var observer = new mutationobserver(function (mutations) { _.foreach(mutations, function (mutation) { _.foreach(mutation.
removednodes, function (
removed) { if (isdescendant(element,
removed)) { callback(); // allow garbage collection observer.disconnect(); ...
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
ed in conjunction min and max to define the range of acceptable values. <input type="range" name="range" min="0" max="25"/> html5 reset a button that resets the contents of the form to default values. not recommended. <input type="reset" name="reset"/> search a single-line text field for entering search strings. line-breaks are automatically
removed from the input value. may include a delete icon in supporting browsers that can be used to clear the field. displays a search icon instead of enter key on some devices with dynamic keypads. <input type="search" name="search"/> html5 submit a button that submits the form. <input type="submit" name="submit"/> tel a control for entering a tele...
...e="search"/> html5 submit a button that submits the form. <input type="submit" name="submit"/> tel a control for entering a telephone number. displays a telephone keypad in some devices with dynamic keypads. <input type="tel" name="tel"/> html5 text the default value. a single-line text field. line-breaks are automatically
removed from the input value. <input type="text" name="text"/> time a control for entering a time value with no time zone. <input type="time" name="time"/> html5 url a field for entering a url. looks like a text input, but has validation parameters and relevant keyboard in supporting browsers and devices with dynamic keyboards. <input type=...
...pearance property enables the displaying of (almost) any element as a platform-native style based on the operating system's theme as well as the removal of any platform-native styling with the none value. you could make a <div> look like a radio button with div {appearance: radio;} or a radio look like a checkbox with [type="checkbox] {appearance: checkbox;}, but don't. setting appearance: none
removes platform native borders, but not functionality. caret-color a property specific to text entry-related elements is the css caret-color property, which lets you set the color used to draw the text input caret: html <label for="textinput">note the red caret:</label> <input id="textinput" class="custom" size="32"> css input.custom { caret-color: red; font: 16px "helvetica", "arial", "sans...
...to be cancelled, by invoking setcustomvalidity() with an empty string value. we therefore do this every time the input event is raised. if you don't do this, and a custom validity was previously set, the input will register as invalid, even if it current contains a valid value on submission. note: always validate input constraints both client side and server side. constraint validation doesn't
remove the need for validation on the server side. invalid values can still be sent by older browsers or by bad actors. note: firefox supported a proprietary error attribute — x-moz-errormessage — for many versions, which allowed you set custom error messages in a similar way. this has been
removed as of version 66 (see bug 1513890). localization the allowed inputs for certain <input> types de...
<video>: The Video Embed element - HTML: Hypertext Markup Language
opt-in (requiring a user to specifically enable it). however, this can be useful when creating media elements whose source will be set at a later time, under user control. see our autoplay guide for additional information about how to properly use autoplay. to disable video autoplay, autoplay="false" will not work; the video will autoplay if the attribute is there in the <video> tag at all. to
remove autoplay, the attribute needs to be
removed altogether. in some browsers (e.g. chrome 70.0) autoplay doesn't work if no muted attribute is present. autopictureinpicture a boolean attribute which if true indicates that the element should automatically toggle picture-in-picture mode when the user switches back and forth between this document and another document or application. buffered a...
...by the video being embedded. there are no special considerations for styling <video>; a common strategy is to give it a display value of block to make it easier to position, size, etc., and then provide styling and layout information as required. video player styling basics provides some useful styling techniques. detecting track addition and removal you can detect when tracks are added to and
removed from a <video> element using the addtrack and
removetrack events. however, these events aren't sent directly to the <video> element itself. instead, they're sent to the track list object within the <video> element's htmlmediaelement that corresponds to the type of track that was added to the element: htmlmediaelement.audiotracks an audiotracklist containing all of the media element's audio t...
...ed when new audio tracks are added to the element. htmlmediaelement.videotracks add an addtrack listener to this videotracklist object to be informed when video tracks are added to the element. htmlmediaelement.texttracks add an addtrack event listener to this texttracklist to be notified when new text tracks are added to the element. ...
...acks add an addtrack event listener to this texttracklist to be notified when new text tracks are added to the element. for example, to detect when audio tracks are added to or
removed from a <video> element, you can use code like this: var elem = document.queryselector("video"); elem.audiotracklist.onaddtrack = function(event) { trackeditor.addtrack(event.track); }; elem.audiotracklist.on
removetrack = function(event) { trackeditor.
removetrack(event.track); }; this code watches for audio tracks to be added to and
removed from the element, and calls a hypothetical function on a track editor to register and
remove the track from the editor's list of available tracks. you can also use addeventlistener() to listen for the addtrack and
removetrack events. examples simple video example ...
Indexed collections - JavaScript
stored in the array: let cats = [] cats[30] = ['dusty'] console.log(cats.length) // 31 you can also assign to the length property. writing a value that is shorter than the number of stored items truncates the array. writing 0 empties it entirely: let cats = ['dusty', 'misty', 'twiggy'] console.log(cats.length) // 3 cats.length = 2 console.log(cats) // logs "dusty, misty" - twiggy has been
removed cats.length = 0 console.log(cats) // logs []; the cats array is empty cats.length = 3 console.log(cats) // logs [ <3 empty items> ] iterating over arrays a common operation is to iterate over the values of an array, processing each one in some way. the simplest way to do this is as follows: let colors = ['red', 'green', 'blue'] for (let i = 0; i < colors.length; i++) { console.log(colo...
..., "a", "b", "c"] join(delimiter = ',') joins all elements of an array into a string. let myarray = new array('wind', 'rain', 'fire') let list = myarray.join(' - ') // list is "wind - rain - fire" push() adds one or more elements to the end of an array and returns the resulting length of the array. let myarray = new array('1', '2') myarray.push('3') // myarray is now ["1", "2", "3"] pop()
removes the last element from an array and returns that element. let myarray = new array('1', '2', '3') let last = myarray.pop() // myarray is now ["1", "2"], last = "3" shift()
removes the first element from an array and returns that element. let myarray = new array('1', '2', '3') let first = myarray.shift() // myarray is now ["2", "3"], first is "1" unshift() adds one or more elements to the fro...
... '2', '3') myarray.unshift('4', '5') // myarray becomes ["4", "5", "1", "2", "3"] slice(start_index, upto_index) extracts a section of an array and returns a new array. ...
... myarray becomes ["4", "5", "1", "2", "3"] slice(start_index, upto_index) extracts a section of an array and returns a new array. let myarray = new array('a', 'b', 'c', 'd', 'e') myarray = myarray.slice(1, 4) // starts at index 1 and extracts all elements // until index 3, returning [ "b", "c", "d"] splice(index, count_to_
remove, addelement1, addelement2, ...)
removes elements from an array and (optionally) replaces them. it returns the items which were
removed from the array. let myarray = new array('1', '2', '3', '4', '5') myarray.splice(1, 3, 'a', 'b', 'c', 'd') // myarray is now ["1", "a", "b", "c", "d", "5"] // this code started at index one (or where the "2" was), //
removed 3 elements there, and then inserted all consecutive // elements in its place. ...
Object.freeze() - JavaScript
in addition, freezing an object also prevents its prototype from being changed. freeze() returns the same object that was passed in. the source for this interactive example is stored in a github repository. ...
.... the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax object.freeze(obj) parameters obj the object to freeze. return value the object that was passed to the function. description nothing can be added to or
removed from the properties set of a frozen object. any attempt to do so will fail, either silently or by throwing a typeerror exception (most commonly, but not exclusively, when in strict mode). for data properties of a frozen object, values cannot be changed, the writable and configurable attributes are set to false. accessor properties (getters and setters) work the same (and still give the illusion...
...not be changed, the writable and configurable attributes are set to false. accessor properties (getters and setters) work the same (and still give the illusion that you are changing the value). note that values that are objects can still be modified, unless they are also frozen. as an object, an array can be frozen; after doing so, its elements cannot be altered and no elements can be added to or
removed from the array. freeze() returns the same object that was passed into the function. it does not create a frozen copy. in es5, if the argument to this method is not an object (a primitive), then it will cause a typeerror. in es2015, a non-object argument will be treated as if it were a frozen ordinary object, and be simply returned. > object.freeze(1) typeerror: 1 is not an object // es5 cod...
...tempting to freeze these properties. comparison to object.seal() objects sealed with object.seal() can have their existing properties changed. existing properties in objects frozen with object.freeze() are made immutable. examples freezing objects var obj = { prop: function() {}, foo: 'bar' }; // before freezing: new properties may be added, // and existing properties may be changed or
removed obj.foo = 'baz'; obj.lumpy = 'woof'; delete obj.prop; // freeze. var o = object.freeze(obj); // the return value is just the same object we passed in. o === obj; // true // the object has become frozen. object.isfrozen(obj); // === true // now any changes will fail obj.foo = 'quux'; // silently does nothing // silently doesn't add the property obj.quaxxor = 'the friendly duck'; // in strict...
Set - JavaScript
though nan !== nan). constructor set() creates a new set object. static properties get set[@@species] the constructor function that is used to create derived objects. instance properties set.prototype.size returns the number of values in the set object. instance methods set.prototype.add(value) appends value to the set object. returns the set object. set.prototype.clear()
removes all elements from the set object. set.prototype.delete(value)
removes the element associated to the value and returns the value that set.prototype.has(value) would have previously returned. set.prototype.has(value) will return false afterwards. set.prototype.has(value) returns a boolean asserting whether an element is present with the given value in the set object or not. iteration methods...
... b: 2} myset.add(o) myset.add({a: 1, b: 2}) // o is referencing a different object, so this is okay myset.has(1) // true myset.has(3) // false, since 3 has not been added to the set myset.has(5) // true myset.has(math.sqrt(25)) // true myset.has('some text'.tolowercase()) // true myset.has(o) // true myset.size // 5 myset.delete(5) //
removes 5 from the set myset.has(5) // false, 5 has been
removed myset.size // 4, since we just
removed one value console.log(myset) // logs set(4) [ 1, "some text", {…}, {…} ] in firefox // logs set(4) { 1, "some text", {…}, {…} } in chrome iterating sets // iterate over items in set // logs the items in the order: 1, "some text", {"a": 1, "b": 2}, {"a": 1, "b": 2} for (let i...
...erence(seta, setc) // => set [1, 2] relation with array objects let myarray = ['value1', 'value2', 'value3'] // use the regular set constructor to transform an array into a set let myset = new set(myarray) myset.has('value1') // returns true // use the spread operator to transform a set into an array. ...
...tion with array objects let myarray = ['value1', 'value2', 'value3'] // use the regular set constructor to transform an array into a set let myset = new set(myarray) myset.has('value1') // returns true // use the spread operator to transform a set into an array. ...
Namespaces crash course - SVG: Scalable Vector Graphics
for svg elements this is ...
...for svg elements this is 'http://www.w3.org/...
...for svg elements this is 'http://www.w3.org/2000/svg'. however, note ca...
...for svg elements this is 'http://www.w3.org/2000/svg'. however, note carefully: the namesp...
Using custom elements - Web Components
ust a simple example, but there is more you can do here. it is possible to define specific lifecycle callbacks inside the class, which run at specific points in the element's lifecycle. for example, connectedcallback is invoked each time the custom element is appended into a document-connected element, while attributechangedcallback is invoked when one of the custom element's attributes is added,
removed, or changed. you'll learn more about these in the using the lifecycle callbacks section below. there are two types of custom elements: autonomous custom elements are standalone — they don't inherit from standard html elements. you use these on a page by literally writing them out as an html element. for example <popup-info>, or document.createelement("popup-info"). customized built-in el...
... note: connectedcallback may be called once your element is no longer connected, use node.isconnected to make sure. disconnectedcallback: invoked each time the custom element is disconnected from the document's dom. adoptedcallback: invoked each time the custom element is moved to a new document. attributechangedcallback: invoked each time one of the custom element's attributes is added,
removed, or changed. which attributes to notice change for is specified in a static get observedattributes method let's look at an example of these in use. the code below is taken from the life-cycle-callbacks example (see it running live). this is a trivial example that simply generates a colored square of a fixed size on the page. the custom element looks like this: <custom-square l="100" c="red"><...
...as you can see from its properties, it is possible to act on attributes ...
...as you can see from its properties, it is possible to act on attributes individually, looking at their name, and old and new attribute values. in this case however, we are just running th...
port - Archive of obsolete content
}); in the main add-on code, to listen for "mymessage" sent from a a content script: // main.js worker.port.on("mymessage", function handlemymessage(mymessagepayload) { // handle the message }); once() often you'll want to receive a message just once, then stop listening. the port object offers a shortcut to do this: the once() method. this example rewrites the content script in the port.
removelistener() example so that it uses once(): // content-script.js function getfirstparagraph() { var paras = document.getelementsbytagname('p'); console.log(paras[0].textcontent); } self.port.once("get-first-para", getfirstparagraph);
removelistener() you can use port.on() to listen for messages. to stop listening for a particular message, use port.
removelistener(). this takes the same two ...
...k" }); require("sdk/ui/button/action").actionbutton({ id: "get-first-para", label: "get-first-para", icon: "./icon-16.png", onclick: function() { console.log("sending 'get-first-para'"); pageworker.port.emit("get-first-para"); } }); the content script listens for "get-first-para". when it receives this message, the script logs the first paragraph of the document and then calls
removelistener() to stop listening. // content-script.js function getfirstparagraph() { var paras = document.getelementsbytagname('p'); console.log(paras[0].textcontent); self.port.
removelistener("get-first-para", getfirstparagraph); } self.port.on("get-first-para", getfirstparagraph); the result is that the paragraph is only logged the first time the button is clicked. due to bug 816272 the ...
...to stop listening. // content-script.js function getfirstparagraph() { var paras = document.getelementsbytagname('p'); console.log(paras[0].textcontent); self.port.
removelistener("get-first-para", getfirstparagraph); } self.port.on("get-first-para", getfirstparagraph); the result is that the paragraph is only logged the first time the button is clicked. due to bug 816272 the page-mod's
removelistener() function does not prevent the listener from receiving messages that are already queued. this means that if "main.js" sends the message twice in successive lines, and the listener stops listening as soon as it receives the first message, then the listener will still receive the second message. json-serializable values the payload for a message can be any json-serializable value. when m...
page-mod - Archive of obsolete content
tabs"); pagemod.pagemod({ include: ["*"], onattach: function onattach(worker) { console.log(worker.tab.title); } }); destroying workers workers generate a detach event when their associated document is closed: that is, when the tab is closed or when the associated window's unload event occurs. ...
... belonging to a page-mod, you can use this event to
remove workers that are no longer valid. ...
...for example, here's an add-on that attaches a script to every page the user loads: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*", contentscriptfile: data.url("eaten.js") }); the content script replaces the page contents, but restores the original cont...
panel - Archive of obsolete content
nction (text) { console.log(text); textentrypanel.hide(); }); the content script "get-text.js" looks like this: // when the user hits return, send the "text-entered" // message to main.js. // the message payload is the contents of the edit box. var textarea = document.getelementbyid("edit-box"); textarea.addeventlistener('keyup', function onkeyup(event) { if (event.keycode == 13) { //
remove the newline. text = textarea.value.replace(/(\r\n|\n|\r)/gm,""); self.port.emit("text-entered", text); textarea.value = ''; } }, false); // listen for the "show" event being sent from the // main add-on code. it means that the panel's about // to be shown. // // set the focus to the text area so the user can // just start typing. self.port.on("show", function onshow() { textarea.f...
...xactly the same as the content script above, except that instead of self, we use addon to access the messaging apis: // when the user hits return, send the "text-entered" // message to main.js. // the message payload is the contents of the edit box. var textarea = document.getelementbyid("edit-box"); textarea.addeventlistener('keyup', function onkeyup(event) { if (event.keycode == 13) { //
remove the newline. text = textarea.value.replace(/(\r\n|\n|\r)/gm,""); addon.port.emit("text-entered", text); textarea.value = ''; } }, false); // listen for the "show" event being sent from the // main add-on code. it means that the panel's about // to be shown. // // set the focus to the text area so the user can // just start typing. addon.port.on("show", function onshow() { textarea...
... hide() stops displaying the panel. resize(width, height) resizes the panel. parameters width : number the new width of the panel in pixels. height : number the new height of the panel in pixels. on(type, listener) registers an event listener with the panel. parameters type : string the type of event to listen for. listener : function the listener function that handles the event.
removelistener(type, listener) unregisters an event listener from the panel. parameters type : string the type of event for which listener was registered. listener : function the listener function that was registered. properties port eventemitter object that allows you to: send events to the content script using the port.emit function receive events from the content script using the port.on...
selection - Archive of obsolete content
html selections in the current web page. usage registering for selection notifications to be notified when the user makes a selection, register a listener for the "select" event. each listener will be called after a selection is made. function mylistener() { console.log("a selection has been made."); } var selection = require("sdk/selection"); selection.on('select', mylistener); // you can
remove listeners too. selection.
removelistener('select', mylistener); iterating over discontiguous selections discontiguous selections can be accessed by iterating over the selection module itself. each iteration yields a selection object from which text, html, and iscontiguous properties can be accessed. private windows if your add-on has not opted into private browsing, then you won't see any sele...
...tion"); if (!selection.iscontiguous) { for (var subselection in selection) { console.log(subselection.html); } } surround html selections with delimiters: var selection = require("sdk/selection"); selection.on('select', function () { selection.html = "\\\" + selection.html + "///"; }); globals properties text gets or sets the current selection as plain text. setting the selection
removes all current selections, inserts the specified text at the location of the first selection, and selects the new text. getting the selection when there is no current selection returns null. setting the selection when there is no current selection throws an exception. getting the selection when iscontiguous is true returns the text of the first selection. html gets or sets the current selection a...
...rts the specified text at the location of the first selection, and selects the new text. getting the selection when there is no current selection returns null. setting the selection when there is no current selection throws an exception. getting the selection when iscontiguous is true returns the text of the first selection. html gets or sets the current selection as html. setting the selection
removes all current selections, inserts the specified text at the location of the first selection, and selects the new text. getting the selection when there is no current selection returns null. setting the selection when there is no current selection throws an exception. getting the selection when iscontiguous is true returns the text of the first selection. iscontiguous true if the current selectio...
event/target - Archive of obsolete content
about very first event of specific type. eventtarget interface defines convenience method for adding one shot event listeners via method once. such listeners are called only once next time event of the specified type is emitted: target.once('ready', function onready() { // do the thing once ready! }); removing listeners eventtarget interface defines api for unregistering event listeners, via
removelistener method: target.
removelistener('message', onmessage); emitting events eventtarget interface intentionally does not define an api for emitting events. in majority of cases party emitting events is different from party registering listeners. in order to emit events one needs to use event/core module instead: let { emit } = require('sdk/event/core'); target.on('hi', function(person) { co...
... info: caught an error: boom! if there is no listener registered for error event or if it also throws exception then such exceptions are logged into a console. chaining emitters can also have their methods chained: target.on('message', handlemessage) .on('data', parsedata) .on('error', handleerror); eventtarget eventtarget is an exemplar for creating an objects that can be used to add /
remove event listeners on them. events on these objects may be emitted via emit function exported by event/core module. methods initialize() method initializes this event source. it goes through properties of a given options and registers listeners for the ones that look like event listeners. on(type, listener) registers an event listener that is called every time events of specified type are emitt...
...unction that processes the event. returns eventtarget : returns the eventtarget instance once(type, listener) registers an event listener that is called only once: the next time an event of the specified type is emitted. parameters type : string the type of event. listener : function the listener function that processes the event. returns eventtarget : returns the eventtarget instance
removelistener(type, listener)
removes an event listener for the given event type. parameters type : string the type of event. listener : function the listener function that processes the event. returns eventtarget : returns the eventtarget instance off() an alias for
removelistener. ...
ui/button/action - Archive of obsolete content
ick option. you can also add, or change, the listener afterwards: var { actionbutton } = require("sdk/ui/button/action"); var button = actionbutton({ id: "my-button", label: "my button", icon: { "16": "./firefox-16.png", "32": "./firefox-32.png" }, onclick: firstclick }); function firstclick(state) { console.log("you clicked '" + state.label + "'"); button.
removelistener("click", firstclick); button.on("click", subsequentclicks); } function subsequentclicks(state) { console.log("you clicked '" + state.label + "' again"); } the listener is passed a state object that contains all the button's properties. you can generate click events programmatically with the button's click() method. disabling buttons you can disable a button by setting its disabl...
...{ console.log("button '" + state.label + "' was clicked"); } parameters event : string the event to listen for. action buttons only emit one type of event, "click". listener : function function that will be called on click. once() assign a listener to the first occurrence only of an event emitted by the button. the button only emits one type of event, click. the listener is automatically
removed after the first time the event is emitted. parameters event : string the event to listen for. action buttons only emit one type of event, "click". listener : function function that will be called on click.
removelistener()
removes an event listener. for example, this code is equivalent to once(): button.on("click", handleclick) function handleclick(state) { console.log("button '" + st...
...tted. parameters event : string the event to listen for. action buttons only emit one type of event, "click". listener : function function that will be called on click.
removelistener()
removes an event listener. for example, this code is equivalent to once(): button.on("click", handleclick) function handleclick(state) { console.log("button '" + state.label + "' was clicked"); button.
removelistener("click", handleclick); } parameters event : string the event to listener is listening for. action buttons only emit one type of event, "click". listener : function the listener to
remove. destroy() destroy the button. after calling this function, the button will no longer appear in the ui, and accessing any of its properties or methods will throw an error. properties id the but...
ui/button/toggle - Archive of obsolete content
d, or change, the listener afterwards: var { togglebutton } = require("sdk/ui/button/toggle"); var button = togglebutton({ id: "my-button", label: "my button", icon: { "16": "./firefox-16.png", "32": "./firefox-32.png" }, onclick: firstclick, onchange: firstchange }); function firstclick(state) { console.log("you clicked '" + state.label + "'"); button.
removelistener("click", firstclick); button.on("click", subsequentclicks); } function subsequentclicks(state) { console.log("you clicked '" + state.label + "' again"); } function firstchange(state) { console.log("you changed '" + state.label + "'"); button.
removelistener("change", firstchange); button.on("change", subsequentchanges); } function subsequentchanges(state) { console.log("you...
...lick) function handleclick(state) { console.log("button '" + state.label + "' was clicked"); } parameters event : string the event to listen for. toggle buttons emit two types of event, "click" and "change". listener : function function that will be called on the event. once() assign a listener to the first occurrence only of an event emitted by the button. the listener is automatically
removed after the first time the event is emitted. parameters event : string the event to listen for. toggle buttons emit two types of event, "click" and "change". listener : function function that will be called on the event.
removelistener()
removes an event listener. for example, this code is equivalent to once(): button.on("click", handleclick) function handleclick(state) { console.log("b...
...ters event : string the event to listen for. toggle buttons emit two types of event, "click" and "change". listener : function function that will be called on the event.
removelistener()
removes an event listener. for example, this code is equivalent to once(): button.on("click", handleclick) function handleclick(state) { console.log("button '" + state.label + "' was clicked"); button.
removelistener("click", handleclick); } parameters event : string the event to listener is listening for. toggle buttons emit two types of event, "click" and "change". listener : function the listener to
remove. destroy() destroy the button. after calling this function, the button will no longer appear in the ui, and accessing any of its properties or methods will throw an error. properties id...
Release notes - Archive of obsolete content
details github commits made between firefox 34 and firefox 35. this will not include any uplifts made after this release entered aurora. bugs fixed between firefox 34 and firefox 35. this will not include any uplifts made after this release entered aurora. firefox 34 highlights new api: dev/panel enables you to extend the firefox developer tools. jpm beta released. "./my-file" introduced everywhere as an alias for require("sdk/self").data.url("my-file") added the ability to attach stylesheets to individual tabs. details github commits made between firefox 33 and firefox 34. ...
.... this will not include any uplifts made after this release entered aurora. firefox 30 highlights added the ability to anchor panels to buttons. changes in the way content scripts share objects with page scripts. documentation and blog post. added child_process, an implementation of the node.js child_process api. content scripts in page-mod get detach events when the add-on is disabled or
removed. throttle() and debounce() functions added to lang/functional. gettabforid() function added to tabs/utils. details github commits made between firefox 29 and firefox 30. this will not include any uplifts made after this release entered aurora. bugs fixed between firefox 29 and firefox 30. this will not include any uplifts made after this release entered aurora. firefox 29 highlights a...
...red aurora. bugs fixed between firefox 29 and firefox 30. this will not include any uplifts made after this release entered aurora. firefox 29 highlights added new ui modules for australis: actionbutton, togglebutton, frame and toolbar. made the preferences branch for simple-prefs configurable. added predicatecontext to sdk/context-menu. deprecated widget in favor of the new ui modules.
removed tab-browser, app-strings and api-utils.publicconstructor details github commits made between firefox 28 and firefox 29. this will not include any uplifts made after this release entered aurora. bugs fixed between firefox 28 and firefox 29. this will not include any uplifts made after this release entered aurora. firefox 28 highlights added wildcard event type "*". added a ready event t...
Bookmarks - Archive of obsolete content
nd bookmarks for a given uri), you can use the nsinavbookmarksservice.getfolderidforitem() method. ...
...use the nsinavbookmarksservice.addobserver() and nsinavbookmarksservice.
removeobserver() methods. note that this example takes advantage of xpcomutils to generate the nsisupports.queryinterface() method. ...
...parent, aoldindex, anewparent, anewindex) {}, queryinterface: xpcomutils.generateqi([components.interfaces.nsinavbookmarkobserver]) }; // an extension var myextension = { // this function is called when my add-on is loaded onload: function() { bmsvc.addobserver(myext_bookmarklistener, false); }, // this function is called when my add-on is unloaded onunload: function() { bmsvc.
removeobserver(myext_bookmarklistener); }, dosomething: function() { alert("did something."); } }; see also nsinavbookmarksservice nsinavbookmarkobserver places using xpcom without chrome - bookmark observer ...
Forms related code snippets - Archive of obsolete content
appendchild(ohrow); ocapt.appendchild(odecryear); ocapt.appendchild(odecrmonth); ocapt.appendchild(oincryear); ocapt.appendchild(oincrmonth); ocapt.appendchild(this.display); this.container.appendchild(ocapt); this.container.appendchild(othead); this.current.setdate(1); this.writedays(); otarget.onclick = function () { if (otable.parentnode) { otable.parentnode.
removechild(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 () { ...
... 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.
removechild(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.appendchild(otr); } nday = niter - nendblanks + 1; otd = document.createelement("td"); if (niter + 1 > nendblanks && niter < nend) { otd.
...hiscal.current[bismonth ? ...
JavaScript Debugger Service - Archive of obsolete content
see the tracking bug bug 800200 for more details. ...
...see the tracking bug bug 800200 for more details. snippets acquiring the service we acquire the service by calling the xpcom object. ...
...pper.cpp")); jsd.appendfilter(createfilter("file://*")); note that appendfilter adds the filter to the end of the list. you can use insertfilter (jsdifilter filter, jsdifilter after) to insert the filter after a particular filter; you can pass null for jsdifilter after to insert at the head of the list. you can also use swapfilters (jsdifilter filter_a, jsdifilter filter_b) to swap filters, and
removefilter(jsdifilter filter) to
remove a filter. learning more a quick and dirty introduction by lei venkman javascript debugger source code firebug service source code jsd architecture (old) ...
Jetpack Processes - Archive of obsolete content
ses are created by components that implement the nsijetpackservice interface, and their parent chrome process communicates with them via the nsijetpack interface. note: the jetpack service, provided by nsijetpackservice, is not included by default in firefox 4. prior to firefox 12, it could be included in custom builds by using enable_jetpack_service at compile time. however, the service has been
removed entirely as of firefox 12. these processes are relatively lightweight, do not have access to xpcom, and can innately do little other than compute. messaging facilities that allow them to communicate with their parent chrome process are the only means by which they can be endowed with any real power. note: the above statement is not currently true, as js-ctypes is now provided to jetpack processe...
...does not exist, the lifetime of a handle needs to be controlled manually by code. by default, a handle is rooted in the javascript interpreter's garbage collector, meaning that even if a process throws it away, it will not be garbage collected unless the other process explicitly does something to indicate that it is no longer needed. ...
...handles have the following native methods and properties: invalidate() invalidates the handle. either process may invalidate a handle when it is no longer useful. createhandle() creates a child handle which becomes invalid when its parent does. ...
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
d, which take boolean values, setting disabled="false" in xul can have unintended consequences. this is because there may be cases where a script or css rule will be written in such a way that they treat the value as true unconditionally if any value has been set. so when changing the attribute’s value using a dom function for example, do not use setattribute('disabled', false) — instead, use
removeattribute('disabled'). tooltiptext use the tooltiptext attribute to display a brief explanatory tooltip above the element. the text entered as the value for this attribute is what gets displayed as the tooltip. persist the persist attribute is an easy way to record and store a xul element’s state after it has been changed by a user operation. enter the names of the other attributes whose val...
... <menuitem label="open project page" oncommand="loaduri(this.value)" value="http://mozilla.org/"/> listing 10: the oncommand event handler because the gecko engine implements dom level 2 event handlers, you can define dynamic event listeners such as the one in listing 11. var item = document.getelementbyid('menu-item-custom'); function handlecommandevent(aevent) { alert('ok'); item.
removeeventlistener('command', handlecommandevent, false); item.parentnode.
removechild(item); } item.addeventlistener('command', handlecommandevent, false); listing 11: additions and deletions using a dynamic event listener special menu items much like input elements in html, menuitem elements can operate like checkboxes and radio buttons by setting their type attributes. checkbox adding type="...
...der as the xul document. using the icon attribute instead of the image attribute allows you to display buttons with icons that are standard for the platform. possible values for the icon attribute are given in table 2. figure 8: a button with an image icon attribute value icon attribute value accept close cancel print help add open
remove save refresh find go-forward clear go-back yes properties no select-font apply select-color table 2: values for the icon attribute toolbar buttons the toolbarbutton element is the element used to define toolbar buttons. this is typically placed inside a toolbar element, which defines a toolbar, but it can be used in ...
Appendix F: Monitoring DOM changes - Archive of obsolete content
preamble + selector + '{' + properties + '}'; (doc.head || doc.documentelement).appendchild(style); // this will only work in chrome privileged code. content code // should make do without weak references. ...
...child(style); // this will only work in chrome privileged code. content code // should make do without weak references. ...
...bindings are attached to dom nodes via css and are given the opportunity to run code via their constructors when new matching dom nodes are created. while it is no longer possible for web sites to use xbl directly, chrome code can still attach xbl bindings to ...
Custom XUL Elements with XBL - Archive of obsolete content
content under the content tag you define the xul content that will be displayed for your element. <content> <xul:hbox> <xul:image class="xulshoolhello-person-image" xbl:inherits="src=image" /> <xul:vbox flex="1"> <xul:label xbl:inherits="value=name" /> <xul:description xbl:inherits="value=greeting" /> </xul:vbox> <xul:vbox> <xul:button label="&xulshoolhello.
remove.label;" accesskey="&xulshoolhello.
remove.accesskey;" oncommand="document.getbindingparent(this).
remove(event);" /> </xul:vbox> </xul:hbox> </content> our element is very simple, displaying an image, a couple of text lines and a button. here are a couple of important things to notice: the "xul:" namespace must be used for all xul tags you have in your content. the xbl:...
...rited" to the content nodes that have this special attribute. the value attribute of the xul:label element would be "pete". the oncommand attribute of the button has some code you've probably never seen before: document.getbindingparent(this). this code gets the dom object that corresponds to the xshelloperson tag, allowing you access to its methods and properties. in this case we're calling the
remove method, which we will discuss later on. if you need to create a container element, or any other element that has child nodes, you can use the xbl children tag in your content to indicate the place where the child nodes will be inserted. the includes attribute gives you a little more flexibility with children, but it's rarely needed. one important thing to take into account is that you shouldn'...
... it around, delete it or clone it. but there is one thing you need to know about moving or cloning your node: all internal state in the node will be lost. this means that all your properties and fields will be reset. if you want some value to be preserved after such dom operations, you must set it as an attribute and not an internal value. methods our "person" binding has a single method that
removes the item from the list: <method name="
remove"> <parameter name="aevent" /> <body><![cdata[ this.parentnode.
removechild(this); ]]></body> </method> as you can see, it's very easy to define a method and the parameters it takes. you can also have a return value using the return keyword, just like on regular js code. the method uses the parent node to
remove the person node. simple e...
Creating regular expressions for a microsummary generator - Archive of obsolete content
a sequence of characters) that matches patterns of characters in other strings. microsummary generators use them to identify the pages that the generators know how to summarize by matching patterns in those pages' urls. in this tutorial, we'll explain how to make regular expressions that match the urls for ebay auction item pages. by the end of the tutorial, you should know some basics about regular expressions and understand how to create expressions that match urls. for detailed documentation about regular expressions, see core_javascript_1.5_reference:global_objects:regexp. ...
...the expression must be found at the beginning of the string being matched. now that we've prepended a caret to our regular expression, it will only match urls that look like the example url right from the start. matching multiple urls but this expression still only matches the url for a single auction item page. it won't work with any other auction item. to make it match other items, we have to
remove the unique parts of it that match the specific item, leaving behind only those parts which are common to all items. to identify which parts are unique and which are common, let's look at the urls of several other auction item pages: http://cgi.ebay.com/ws/ebayisapi.dll?viewitem&item=130017517168 http://cgi.ebay.com/ws/ebayisapi.dll?viewitem&item=290019763032 http://cgi.ebay.com/ws/ebayisapi.
... look at the urls of several other auction item pages: http://cgi.ebay.com/ws/ebayisapi.dll?viewitem&item=130017517168 http://cgi.ebay.com/ws/ebayisapi.dll?viewitem&item=290019763032 http://cgi.ebay.com/ws/ebayisapi.dll?viewitem&item=170019463424 based on these examples, it looks like the unique part is the item number at the end of the urls, and everything else is common to all urls. so we
remove the item number, leaving us with the following regular expression: ^http://cgi\.ebay\.com/ws/ebayisapi\.dll\?viewitem&item= accommodating variations in query parameters we now have a regular expression that matches all four example urls. it'll probably match the urls for other auction item pages, too. but to make it more robust, we should accommodate the possibility of variation in the query...
Layout System Overview - Archive of obsolete content
n a paged presentation to a printer, or even an aural presentation to a speech-synthesizer. to date the only real use of this multiple presentation ability is seen in printing, where multiple presentations are managed, all connected to the same content model. (note: it is unclear if this is really a benefit - it may have been better to use a copy of the content model for each presentation, and to
remove the complexity of managing separate presentations - analysis is needed here). the idea of supporting a non-visual presentation is interesting. layout's support for aural presentations is undeveloped, though conceptually, it is possible and supported by the architecture. how layout does its job: frames and reflow so, layout is concerned with providing a presentation, in galley or paged mode. given...
...ow again the impacted frames. this is referred to as an incremental reflow. another responsibility of layout is to manage dynamic changes to the content model, changes that occur after the document has been loaded and (possibly) presented. these dynamic changes are caused by manipulations of the content model via the dom (generally through javascript). when a content element is modified, added or
removed, layout is notified. if content elements have been inserted, new frames are created and formatted (and impacts to other frames are managed by performing further incremental reflows). if content is
removed, the corresponding frames are destroyed (again, impacts to other elements are managed). if a content element is modified, layout must determine if the change influences the formatting of that o...
...pace-efficient to prevent frame creation for elements with no display.) the frame manager also maintains a list of forms and form controls, as content nodes. this is presumably related to the fact that layout is responsible for form submission, but this is a design flaw that is being corrected by moving form submission into the content world. these collections of forms and form controls should be
removed eventually. css frame constructor the frame constructor is responsible for resolving style values for content elements and creating the appropriate frames corresponding to that element. in addition to managing the creation of frames, the frame constructor is responsible for managing changes to the frames. frame construction is generally achieved by the use of stateless methods, but in some cases...
New Skin Notes - Archive of obsolete content
could be smaller. --dria is it just me or visited links are not marked as such? --nickolay 07:16, 29 aug 2005 (pdt) imho the visited color looks horrible. we're a documentation site. there's no real reason for user to give him info that he already visited xml main page. it's hardly possible that he'll be interested in it. in all other dev centres there is no "visited link color" and we should
remove imho. it looks odd when someone who uses devmo on regular basis sees some violet links just because he already worked with this site yesterday.also, the current color for visited links makes them less visible. --gandalf 00:45, 31 aug 2005 (pdt) i don't like the current color too, but i strongly disagree that we don't need to give visited links different color. this is not what user expects (well...
..., 31 aug 2005 (pdt) ok, so i'm asking just to change this color. --gandalf 04:55, 31 aug 2005 (pdt) fine, changed. --dria the default link color is to bright. it's less readable than the old one. i'd suggest to use the color from cavedish. -- gandalf that was my first thought, too. -- axelhecht ok, i'll tone the main link colour down a bit. --dria page title needs "development skin"
removed. -- dria the skin looks nice, but the links on the right are too small. if this is going to be the default skin used by editors, they are unacceptably small. --nickolay 01:59, 25 aug 2005 (pdt) i'm planning on doing up a special skin for editors in the future (with the edit tools and such closer to the top, etc). in the meantime, i'll bump the font size of those links up. --dria but if the e...
...anges i need to make, however, so i'll try to fix it up a bit while i'm digging around in there. --dria how about modifying style for the side-bar to have a :hover class added which modifies (to a slightly lighter shade) the background color of the link, this will help to make items "appear as links" to many users, possibly add a text-decoration: underline as well. --callek is it possible to
remove the blank space on category pages, like category:dom?by the way, it looks like this skin has the same problem as previous - the edit box, category list on category pages, and others are always below the end of the sidebar. the major problem it caused in cavendish skin - that they were out of the screen - is solved by making the sidebar smaller, which is not the right thing to do, imo (see my comm...
Anonymous Content - Archive of obsolete content
neath the bound element. the binding responsible for the generation is referred to as the primary generating binding. whenever the primary generating binding changes on a bound element, all anonymous nodes in the scope of the bound element are destroyed. attribute forwarding attributes on anonymous content elements can be tied to attributes on the bound element. whenever the attribute is set or
removed on the bound element, the corresponding attribute on the anonymous content is also set or
removed. on any anonymous content element in a template, an inherits attribute can be used to specify a comma-separated list of attributes that should be inherited. attributes with namespaces can be defined using a namespace prefix and the attribute name separate by a colon. for example, on the html file u...
...ric and will match on all content. the insertion point used for a given piece of content is the first encountered with a selector whose node set matches the element when doing a depth-first walk of the content template. note that children elements are never cloned when content is generated from a template. handling dom changes insertion points continuing to be used as elements are inserted or
removed from the dom. whenever an element is inserted or appended, all insertion points are checked following all the same rules that applied when first placing explicit children during anonymous content generation. if no insertion point is found for the newly-inserted child, then the binding is no longer a fit for the bound element, and all anonymous content will be destroyed. whenever an element is r...
...again, if all the children cannot be relocated, then the anonymous content is destroyed. ...
Dynamically modifying XUL-based user interface - Archive of obsolete content
ser>, or a <tabbrowser> element. you must be sure to always manipulate the correct document. (read more about this in working with windows in chrome code.) when your script is included using a <script> tag, the document property references the dom document that includes the script. examples: using dom methods this section demonstrates the use of appendchild(), createelement(), insertbefore(), and
removechild() dom methods. removing all children of an element this example
removes all children of an element with id=someelement from the current document, by calling
removechild() method to
remove the first child, until there are no children remaining. note, that haschildnodes() and firstchild are also part of the dom api. var element = document.getelementbyid("someelement"); while(element.haschild...
...it uses document.createelementns() method to create the items, and insertbefore() with appendchild() to insert the created xml elements within the document. ...
...emenuitem("first item"); var last = createmenuitem("last item"); popup.insertbefore(first, popup.firstchild); popup.appendchild(last); you can also use appendchild() and insertbefore() to move existing elements. for example you could move the item labeled "first item" to the end of popup by adding this statement as a last line to the snippet above: popup.appendchild(first); this statement would
remove the node from its current position in the document and re-insert it at the end of the popup. anonymous content (xbl) xbl is the language used in mozilla to define new widgets. widgets defined in xbl may choose to define some content which is inserted to the bound element, when the binding is attached. this content, called anonymous content, is not accessible through normal dom methods. you need t...
Moving, Copying and Deleting Files - Archive of obsolete content
documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. there are several methods of the nsifile object which may be used to move and copy files on disk. nsifile.copyto() is used to copy a file, while nsifile.moveto() is used to move files. nsifile.
remove() may be used to delete a file. copying a file nsifile.copyto() is used to copy files or directories, and should be called on the source file to copy. this method takes two arguments, the first is the destination directory in which to copy the file to, and the second argument is the new name of the file, if you wish to rename it in its new location. if you do not want to rename the file, and us...
...directory, the destination argument may be null. for instance, the following example renames a file within the same directory: file.moveto(null, "hello.txt"); if the destination file already exists, nsifile.moveto() replaces the existing file. for this reason, you may wish to check if the file exists using nsifile.exists() before moving the file. deleting a file to delete a file, use nsifile.
remove(). this method takes one boolean argument which indicates whether to delete recursively or not. if true and the file object refers to a directory, the directory will be
removed as well all files and subdirectories within it. if false, a directory will only be
removed if it is empty. if the directory is not empty, an error will occur. for files, the argument is simply ignored. var file = io.newfi...
...ean argument which indicates whether to delete recursively or not. if true and the file object refers to a directory, the directory will be
removed as well all files and subdirectories within it. if false, a directory will only be
removed if it is empty. if the directory is not empty, an error will occur. for files, the argument is simply ignored. var file = io.newfile("home", "photo.jpg"); file.
remove(false); this example
removes the file called 'photo.jpg'. ...
MenuItems - Archive of obsolete content
in. as this can be more complicated, it is also possible to use the autocheck attribute to disable this behavior. when the autocheck attribute is set to false, the checkbox state is not updated automatically, and you must write code to adjust the state yourself. <script> function changetoolbarstate(event) { if (event.target.getattribute("checked") == "true") hidetoolbar(); event.target.
removeattribute("checked"); } else { if (!showtoolbar()) return; event.target.setattribute("checked", "true"); } } </script> ... <menuitem label="show toolbar" accesskey="t" type="checkbox" autocheck="false" oncommand="changetoolbarstate();"/> this version of the changetoolbarstate function changes the checked attribute itself. the autocheck attribute has been set to fals...
... that the code has been reversed in the condition blocks to hide the toolbar when the menuitem is checked and show the toolbar when the menuitem is not checked because the checked state hasn't been modified. the example assumes that the showtoolbar() function might fail so if it returns false, the checked attribute is not modified. when clearing the checked state, the checked attribute should be
removed rather than just set to false. in the example, this is done by using the
removeattribute method. radio menu items a radio menu item os used when you wish to have a group of menuitems in which only one can be checked at a time. this works similarly to the checkbox type, except when selecting an item, all others in the same group are automatically unchecked. to create a menuitem that acts like ...
...ge of the accesskey attribute in xul. ...
disabled - Archive of obsolete content
« xul reference disabled type: boolean gets and sets the value of the disabled attribute. ...
... « xul reference disabled type: boolean gets and sets the value of the disabled attribute. ...
... « xul reference disabled type: boolean gets and sets the value of the disabled attribute. ...
Result Generation - Archive of obsolete content
o do this for a particular statement, the builder iterates over the possible results found so far and either accepts each result or rejects each result. for the first statement, only the seed will be available as a possible result. at each step, new possible results may be added, or more information pertaining to an existing result may be added to the network. naturally, a rejected result will be
removed. once all results have been examined, the builder moves on to the next statement in the query. once all statements have been analyzed, any results which still remain go on to become matches. the matches are the endpoints and will cause content to be generated. so, to summarize: start out with a one possible result as the seed iterate over the results determined so far and augment them with ...
...er moves on to the next statement in the query. once all statements have been analyzed, any results which still remain go on to become matches. the matches are the endpoints and will cause content to be generated. so, to summarize: start out with a one possible result as the seed iterate over the results determined so far and augment them with additional data add any new possible results
remove any rejected results repeat steps 2 to 4 for each query statement once done, all remaining results become matches each possible result is made up of a set of variable-value pairs. for instance, a result would look something like the following: (?name = fred, ?age = 5) this result has two variables, ?name with the value 'fred' and ?age with the value 5. variables begin with a question mark, ...
...age with the value 5. variables begin with a question mark, and values are rdf resources or literals. here we will use strings for the values so they are easier to read. if we had two results, they might look like this: (?name = fred, ?age = 5) (?name = mary, ?age = 12) this is how we'll represent the potential results in this and the following discussions. later, we might have a statement which
removes all male results. so, our results after this might look like the following: (?name = mary, ?age = 12, ?gender = female) this statment has
removed fred from the potential results and added the ?gender variable for mary. this is typical of how a query statement works, by adding additional variables to a result and filtering out those that don't match a particular value. if this were the last stat...
Template Builder Interface - Archive of obsolete content
so all xul elements will have this property, although, as mentioned earlier, is will be set to null for most elements. for non-xul elements, the template builder will be assigned to a builder property on the element using a custom javascript property instead. rebuilding and refreshing a template the main purpose of accessing the builder for an element is to call its 'rebuild' method. this method
removes any existing generated content and deletes all data in the rule network. then, the method recompiles the query and the rules and regenerates the content. essentially, the rebuild method instructs the builder to
remove any existing information and reconstruct it from the beginning. the only difference is that the datasource has already loaded so the data will be the same. however, this is often u...
...datasource. these may be listed in the datasources attribute separated by spaces. for example: <vbox datasources="template-guide-photos5.rdf template-guide-streets.rdf"> sometimes, you will want to calculate the datasource to be used and attach it to the template later. you can do this using the composite datasource's adddatasource method. you can add as many datasources as you wish, and you can
remove them using the
removedatasource method. a common pattern is to use the following: var rdf = components.classes["@mozilla.org/rdf/rdf-service;1"]. getservice(components.interfaces.nsirdfservice); var ds = rdf.getdatasource("http://www.xulplanet.com/ndeakin/tests/xul/template-guide-streets.rdf"); var tree = document.getelementbyid("thetree"); tree.database.adddatasource(ds); tree.buil...
...typical way to add a datasource to an element, in this case to the tree with the id 'thetree'. the datasource is retrieved using the rdf service's getdatasource method. after adding a datasource, the tree builder's rebuild method is invoked to rebuild the template with the new data. this doesn't happen automatically when you add the datasource, which is useful, since you will often want to add or
remove other datasources at the same time. the composite datasource can only be accessed from privileged code, regardless of what datasources it contains. fortunately in this situation, you can just set the datasources attribute (or the corresponding property) to the datasources that you want. for instance: var tree = document.getelementbyid("thetree"); tree.datasources = "template-guide-photos5.rdf tem...
Template and Tree Listeners - Archive of obsolete content
e two methods if you wish to be notified when the template is rebuilt using the builder's rebuild call. the template builder might also force a rebuild when the underlying data change notifications require it. the primary use of this listener is to store some state before the template is rebuilt and restore it afterwards. recall that when a template is rebuilt, all of the existing content will be
removed and generated fresh. the willrebuild method of any listeners will be called before the content is
removed, and didrebuild method will be called when the content has been regenerated. this listener will also work for tree builders, and will call the appropriate methods before and after the tree has been generated. to assign a builder listener to a builder, use the addlistener method. var somelist...
...source method. (as this example uses the rdf resources directly, it requires elevated privileges so you will need a chrome url to test it.) you might also guess that the builder's root property, which is used above, refers to the tree. in a content builder, it will return the element with the datasources attribute, which in the template builder is referred to as the root element. finally, you can
remove a listener using the builder's
removelistener method. listening for tree changes the second type of listener is used to handle particular actions related to trees. the tree builder implements the nsitreeview interface, so handles the gathering of data and passing it on to the tree. the tree widget informs the view when certain operations are performed that might affect the data. the tree view han...
...ate method which will be called when the user opens or closes a row. the tree builder will handle the adding or removing of rows, but will call the observer so that it can perform some task. the tree builder observer implements the nsixultreebuilderobserver interface and may be attached to a tree builder using the builder's addobserver method. you can add more than one observer if needed, and can
remove them again with the builder's
removeobserver method. the observer is always invoked before the appropriate operation is performed. for instance, the ontoggleopenstate method of any observers will be called before the tree item is opened. after the observers have finished, the tree builder opens the row and adds any child rows inside. note that you cannot cancel the operation from within the obser...
Focus and Selection - Archive of obsolete content
xt displayed element. you only need to set tab indices if you wish to use a different order. here is an example: example 1 : source view <button label="button 1" tabindex="2"/> <button label="button 2" tabindex="1"/> <button label="button 3" tabindex="3"/> the focus event the focus event is used to respond when the focus is given to an element. the blur event is used to respond when the focus is
removed from an element. you can respond to focus changes by adding an onfocus or onblur attribute on an element. they work just like their html counterparts. you might use these event handlers to highlight the element or display text on a status bar. the following example can be used to apply a function to handle a focus event. example 2 : source view <script> function displayfocus(){ var elem=docum...
...nction displayfocus(){ var elem=document.getelementbyid('sbar'); elem.setattribute('value','enter your phone number.'); } </script> <textbox id="tbox1"/> <textbox id="tbox2" onfocus="displayfocus();"/> <description id="sbar" value=""/> the focus event, when it occurs, will call the displayfocus function. this function will change the value of the text label. we could extend this example to
remove the text when the blur event occurs. typically, you will use focus and blur events to update parts of the interface as the user selects elements. for instance, you might update a total as the user enters values in other fields, or use focus events to validate certain values. don't display an alert during a focus or blur event as this will be distracting for the user and is poor user interface des...
.... once the label in the example is focused, it can respond to key presses. naturally, the label gives no indication that it is focused, since it isn't normally expected to ever be focused. changing the focus there are several ways to change the currently focused element. the simplest is to call the focus method of a the xul element that you wish to set the focus to. the blur method can be used to
remove the focus from an element. the following example demonstrates this: example 5 : source view <textbox id="addr"/> <button label="focus" oncommand="document.getelementbyid('addr').focus()"/> or, you can use the methods advancefocus and rewindfocus on the command dispatcher. these methods move the focus to the next element in sequence or the previous element respectively. this is what happens when...
Modifying a XUL Interface - Archive of obsolete content
hat a xul element will be created. for an html document, an html element will be created, so it will have the features and functions of an html element instead. the createelementns() function may be used to create elements in a different namespace. the appendchild() function is used to add an element as a child of another element. three related functions are the insertbefore(), replacechild() and
removechild functions. the syntax of these functions is as follows: parent.appendchild(child); parent.insertbefore(child, referencechild); parent.replacechild(newchild, oldchild); parent.
removechild(child); it should be fairly straightforward from the function names what these functions do. the insertbefore() function inserts a new child node before an existing one. this is used to insert into the m...
...ild); parent.replacechild(newchild, oldchild); parent.
removechild(child); it should be fairly straightforward from the function names what these functions do. the insertbefore() function inserts a new child node before an existing one. this is used to insert into the middle of a list of children of the parent element instead of at the end like appendchild() does. the replacechild() function
removes an existing child and adds a new one in its place at the same position in the list of its parent element. finally the
removechild() function
removes a child from the list of its parent element. note that for all these functions, the object referred to by the variable referencechild or the variables newchild and oldchild must already exist or an error occurs. likewise the object referred to by...
...one in its place at the same position in the list of its parent element. finally the
removechild() function
removes a child from the list of its parent element. note that for all these functions, the object referred to by the variable referencechild or the variables newchild and oldchild must already exist or an error occurs. likewise the object referred to by the variable child which is to be
removed must already exist or an error occurs. moving nodes to a different place it is often the case that you want to
remove an existing element and add it somewhere else. if so, you can just add the element without removing it first. since a node may only be in one place at a time, the insertion call will always
remove the node from its existing location first. this is a convenient way to move nodes a...
Tree View Details - Archive of obsolete content
, "gold", "lead"], liquids: ["mercury"], gases: ["helium", "nitrogen"] }, visibledata : [ ["solids", true, false], ["liquids", true, false], ["gases", true, false] ], }; the childdata structure holds an array of the children for each of the three parent nodes. the visibledata array begins with only three items visible, the three top level items. items will be added and
removed from this array when items are opened or closed. essentially, when a parent row is opened, the children will be taken from the childdata map and inserted into the visibledata array. for example, if the liquids row was opened, the corresponding array from childdata, which in this case contains only the single mercury child, will be inserted into the visibledata array after liquids but before gase...
...read-only attribute as defined in nsitreeview. the settree function will be called to set the tree's box object. the tree box object is a specialized type of box object specific to trees and will be examined in detail in the next section. it is used to aid in drawing the tree. in this example, we will only need one function of the box object, to be able to redraw the tree when items are added or
removed. the getcelltext, iscontainer and iscontaineropen functions just return the corresponding element from the visibledata array. finally, the remaining functions can just return false since we don't need those features. if we had a row that had no children we would want to implement the iscontainerempty function so that it returned true for those elements. getparentindex: function(idx) { if (th...
...< this.visibledata.length; t++) { if (this.getlevel(t) > thislevel) deletecount++; else break; } if (deletecount) { this.visibledata.splice(idx + 1, deletecount); this.treebox.rowcountchanged(idx + 1, -deletecount); } first, the item is set closed in the array. then, we scan along the rows until we come to one that is at the same level. all those that have a higher level will need to be
removed, but a row at the same level will be the next container which should not be
removed. finally, we use the splice function to
remove the rows from the visibledata array and call the rowcountchanged function to redraw the tree. when deleting rows, you will need to supply a negative count of the number of rows to delete. whether opening or closing a row, we need to tell the tree to repaint the twi...
XPCOM Interfaces - Archive of obsolete content
some of the properties and methods of the nsilocalfile interface. initwithpath this method is used to initialize the path and filename for the nsilocalfile. the first parameter should be the file path, such as '/usr/local/mozilla'. leafname the filename without the directory part. filesize the size of the file. isdirectory() returns true if the nsilocalfile represents a directory.
remove(recursive) deletes a file. if the recursive parameter is true, a directory and all of its files and subdirectories will also be deleted. copyto(directory,newname) copies a file to another directory, optionally renaming the file. the directory should be a nsilocalfile holding the directory to copy the file to. moveto(directory,newname) moves a file to another directory, or renames a file. ...
...py the file to. moveto(directory,newname) moves a file to another directory, or renames a file. the directory should be a nsilocalfile holding the directory to move the file to. in order to delete a file we first need to assign a file to the nsilocalfile. we can call the method initwithpath() to indicate which file we mean. just assign the path of the file to this property. ...
...try this example by adding this code to an event handler. you should change the filename to an existing file that you have that you would like to delete. in the functions table above, you will see two functions copyto() and moveto(). ...
XUL Questions and Answers - Archive of obsolete content
the correct type. using the "icon" attribute on a button from xulplanet.com reference: this attribute should be used to set the usage for common buttons. some platforms display these buttons with a small icon indicating their usage. this should be used in place of the image attribute. possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add,
remove, refresh, go-forward, go-back, properties, select-font, select-color, network. if you are using a button that matches one of these common usages, use the icon attribute to indicate this. how to use dynamic objects in toolbar there may be a few ways to implement this: by building your menupopup from an rdf datasource, which could be generated on the server. by getting data (e.g. json stri...
... tab browswer in xul how can i get uris on open tabs? using the following code sample, // get browsers object var browsers=document.getelementbyid('content').browsers; var numbrowsers=browsers.length; for (var i=0; numbrowsers>i; i++) { var thisuri=browsers[i].currenturi.spec; // do something with it. } the person can get the titles too using the .contenttitle tag. how to add and
remove values to/from, set up inside a <prefwindow> container to handle the preference? <prefwindow> can contain any control, just like a regular window. some of them can be tied to a preference so that the preference is automatically updated as the control is manipulated. others, like <listbox>, cannot be so tied, but one can always write a script that updates preferences explicitly, via nsiprefbranch...
...t document? use the following snippet of code to reference a js file within a js file: objscriptloader = components.classes["@mozilla.org/moz/jssubscript-loader;1"].getservice(components.interfaces.mozijssubscriptloader); objscriptloader.loadsubscript(strurl); see http://www.xulplanet.com/references/...iptloader.html for more information. too specific questions or unclear answers how do i
remove the file location header included in the default printing setting? see http://www.xulplanet.com/references/...ef_iframe.html, the first user note at the bottom. change this line var settings = printutils.getprintsettings(); to this var settings = printutils.getprintsettings().clone(); settings.docurl = " "; // suppress url on printout other options you can modify are documented here: http:/...
promptBox - Archive of obsolete content
tshowing attribute on the tabbrowser will tell you how many prompts a given tab has. note: this is largely an implementation detail; if you're developing an add-on, you shouldn't need to tinker with this. you should use the window.alert() method or the nsiprompt interface instead. see using tab-modal prompts for details. ...
... listprompts() returns a list of all the prompts on the tabbrowser. nodelist listprompts( nsidomelement aprompt ); parameters aprompt this parameter isn't used; i don't know why it's even there. ...
...idomelement aprompt); nodelist listprompts(nsidomelement aprompt); methods appendprompt() creates a new prompt, adding it to the tab. nsidomelement appendprompt( args, onclosecallback ); parameters args arguments for the prompt. onclosecallback the callback routine to be called when the prompt is closed. return value an nsidomelement object representing the new prompt.
removeprompt()
removes an existing prompt. void
removeprompt( nsidomelement aprompt ); parameters aprompt the prompt to dispose of. listprompts() returns a list of all the prompts on the tabbrowser. nodelist listprompts( nsidomelement aprompt ); parameters aprompt this parameter isn't used; i don't know why it's even there. return value a nodelist containing all of the prompt elements on the tabbrowser. ...
toolbaritem - Archive of obsolete content
em that appears on a toolbar. this element should wrap all customizable items (unless they're instances of toolbarbutton). if you don't need the thing you're placing in the toolbar to be customized then it doesn't need to be in a toolbaritem element. the element is used, for example, to hold the location bar's textbox in firefox. it is also used to group buttons together so they can be added and
removed all at once like firefox's unified-back-forward-button. examples <toolbaritem> <menulist label="bus"> <menupopup> <menuitem label="car"/> <menuitem label="taxi"/> <menuitem label="bus" selected="true"/> <menuitem label="train"/> </menupopup> </menulist> </toolbaritem> <toolbaritem id="sample-toolbutton-unified"> <toolbarbutt...
...lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox ...
Archived Mozilla and build documentation - Archive of obsolete content
if you are a plug-in author, you may find this project saves you a lot of work! ant script to assemble an extension this ant script helps to package an extension archived spidermonkey docs this section contains old spidermonkey documentation. ...
...ard from the mozilla security team for defining how security tools can interact with browsers in a more useful and usable way. plugin architecture this page contains some notes on how plugins work internally in gecko. it is mainly of interest to gecko developers. porting nspr to unix platforms last modified 16 july 1998 priority content update: i've
removed documents from this list that have been migrated into the wiki. the list of completed documents is available through the devedge page. prism prism is a simple xulrunner-based browser that hosts web applications without the normal web browser user interface. prism is based on a concept called site-specific browsers (ssb). an ssb is designed to work exclusively with a sin...
... it affects the portability of code, it was deemed prudent to include a short memo describing the issue. when working with mozilla, you tend to accumulate patches which need to be reviewed, super-reviewed, and/or approved before they can be committed to the trunk. when you have only a few uncommitted patches, you can get by using cvs diff, and just editing the output to
remove other patches before submitting. however, this approach quickly becomes unscalable, especially when you have different fixes in the same tree. using a distributed versioning system like svk takes out much of the hassle of managing your patches. venkman venkman is the code name for mozilla's javascript debugger. it aims to provide a powerful javascript d...
Mozilla release FAQ - Archive of obsolete content
build problems: cc1: invalid option 'foo' cc: no such file or directory 'foo' these are almost always caused by your platform-specific makefile being incorrect for your system, either because you're not using the compiler that you're expected to (i.e. gcc instead of the sun workshop compiler), or because you're not using a recognized version of your os. go dig through the makefiles in config and
remove the offending portions, and see if that fixes things. if not, post to netscape.public.mozilla.builds problems of this sort are currently most likely to happen in nspr, as it still uses the classic build system. it's doubtful that this will happen in the main tree. /usr/include/stdlib.h:196: previous declaration of `seed48' see section 3.7 nothing looks much like an error, except something return...
...rguments it's passing to ld, or whatever, and thus perhaps enlighten you as to the problem. on gcc, try gcc -v (rest of command line). how long will mozilla take to build? a long time, but this will depend quite a bit on your system. ram will probably be the bottleneck in most cases, at least until you are well over 128m ram. here are a few representative systems (please send your specs in to me)
removed because the tree has changed enough that we'll probably need new times for all the builds. please send stats to me in the following format: cpu/mhz, architecture, ram, disk type, os version, compiler version, build type, tree date -- build time example: 21164/533, alpha, 512m edo, ultra2 scsi, linux kernel 2.2.11, gcc 2.95, non-debug, 19 august 1999 cvs -- 25 minutes how do i run the binary on u...
...u probably have gcc 2.8.1, which currently won't work with mozilla. get 2.8.0 or 2.7.2+ (2.8.0 has some problems, 2.7.2 would be best, at least until the problems with 2.8.1 are ironed out) where can i get the sources to netscape 4.x or lower? these sources are not available. much of the old code cannot be released due to legal concerns, and at the time of mozilla's initial release, that code was
removed from the tree. the 'classic' branch of the current cvs tree is as close to the 4.x source as the public will ever see, although that branch has been abandoned in the move to the modern codebase. how do i tweak the interface (replace the logo, etc)? the xptoolkit docs might help in writing the needed xul. you can find replacement themes in preferences, under appearance->themes, using the 'get new...
Extentsions FAQ - Archive of obsolete content
nce with a firefox tab isn't quite the same as having a completely separate explorer window. however, it's functional and does allow for the explorer to be handling the display of the folder contents, and all of the right-click context menu support is present so it should meet my needs. what is the valid location and things needed to to release a mozilla extension on mozallia site? you must
remove updateurl from the install.rdf and use a known to amo minversion/maxversion. no confirmation that the answer given worked yet. is it possible to open the url in a new tab? var tab = gbrowser.addtab( url ); // and if you want it to load in the foreground: gbrowser.selectedtab = tab; is it possible to read the html-code of the current url/site? yes, this is possible. use the dom api (http:...
...ring(). however, i'm not sure how/if that works if the user hasn't defined a master password in options->security->use a master password. you can aes-128 or aes-256 symmetric encryption via aes.js (http://tinyurl.com/pp79t). no confirmation from the question asker on whether this answer was helpful in solving their problem. friday, october 06 - 13, 2006 (↑ top) any suggestions to
remove tool tip appears on the menu it when it should not? what you described was a bug (https://bugzilla.mozilla.org/show_bug.cgi?id=147670). it looks like it has been fixed for firefox version 2. what do i need to do to avoid deadlocks? do i need to marshalinvokations to a particular thread? if so, how? are there any fundamental rules related to threading in xpcom, and if so, where are these defi...
.../so...ents/nsbrowser... firefox will clean all those preferences which are still "default", that is not changed by the user or the application/extension. to provide those default preferences to your extension see: http://kb.mozillazine.org/dev_:_usin...lt_preferences btw: resetting prefences to default will clear them in case no default prefence is (still) available. those will be completely
removed upon next application launch. is it possible to create a sidebar on the top of the page? not unless you make it a separate window. there's a bug in bugzilla about stacking other widgets on top of browser/iframe, which hopefully will be fixed for gecko 1.9. could someone write an extension that zaps the google analytics cookie, the urchin cookie, switches gmail and google calender to https...
NPClass - Archive of obsolete content
t). syntax struct npclass { uint32_t structversion; npallocatefunctionptr allocate; npdeallocatefunctionptr deallocate; npinvalidatefunctionptr invalidate; nphasmethodfunctionptr hasmethod; npinvokefunctionptr invoke; npinvokedefaultfunctionptr invokedefault; nphaspropertyfunctionptr hasproperty; npgetpropertyfunctionptr getproperty; npsetpropertyfunctionptr setproperty; np
removepropertyfunctionptr
removeproperty; npenumerationfunctionptr enumerate; npconstructfunctionptr construct; }; warning: don't call these routines directly. you should instead use the appropriate api functions. fields structversion the version number of the structure. this is set to np_class_struct_version, which is 1 in mozilla 1.8.*, 2 since mozilla 1.9a1, and 3 since firefox 3.0b1. all...
...y exists, otherwise returns false. getproperty called by npn_getproperty() to get the value of the specified property on a given npobject. returns true if the value was successfully retrieved, otherwise returns false. setproperty called by npn_setproperty() to set the value of the specified property on a given npobject. returns true if the value was successfully set, otherwise returns false.
removeproperty called by npn_
removeproperty() to
remove a given property from a specified npobject. returns true if the property was successfully
removed, otherwise returns false. enumerate called by npn_enumerate. this field is available only if structversion is np_class_struct_version_enum (2) or greater. construct called by npn_construct. this field is available only if structversion is np_class...
... npvariant *result); typedef bool (*nphaspropertyfunctionptr)(npobject *npobj, npidentifier name); typedef bool (*npgetpropertyfunctionptr)(npobject *npobj, npidentifier name, npvariant *result); typedef bool (*npsetpropertyfunctionptr)(npobject *npobj, npidentifier name, const npvariant *value); typedef bool (*np
removepropertyfunctionptr)(npobject *npobj, npidentifier name); typedef bool (*npenumerationfunctionptr)(npobject *npobj, npidentifier **value, uint32_t *count); typedef bool (*npconstructfunctionptr)(npobject *npobj, const npvariant *args, ui...
Array.observe() - Archive of obsolete content
you can use the more general proxy object instead. ...
...ange objects are: name: the name of the property which was changed. object: the changed array after the change was made. type: a string indicating the type of change taking place. one of "add", "update", "delete", or "splice". oldvalue: only for "update" and "delete" types. the value before the change. index: only for the "splice" type. the index at which the change occurred.
removed: only for the "splice" type. an array of the
removed elements. addedcount: only for the "splice" type. the number of elements added. description the callback function is called each time a change is made to arr, with an array of all changes in the order in which they occurred. changes done via array methods, such as array.prototype.pop() will be reported as "splice" changes. in...
...plice" changes. index assignment changes which do not change the length of the array may be reported as "update" changes. examples logging different change types var arr = ['a', 'b', 'c']; array.observe(arr, function(changes) { console.log(changes); }); arr[1] = 'b'; // [{type: 'update', object: <arr>, name: '1', oldvalue: 'b'}] arr[3] = 'd'; // [{type: 'splice', object: <arr>, index: 3,
removed: [], addedcount: 1}] arr.splice(1, 2, 'beta', 'gamma', 'delta'); // [{type: 'splice', object: <arr>, index: 1,
removed: ['b', 'c'], addedcount: 3}] specifications strawman proposal specification. ...
Array.unobserve() - Archive of obsolete content
the array.unobserve() method was used to
remove observers set by array.observe(), but has been deprecated and
removed from browsers. you can use the more general proxy object instead. syntax array.unobserve(arr, callback) parameters arr the array to stop observing. callback the reference to the observer to stop calling each time changes are made on the array arr. description array.unobserve() should be called after array.observe() in order to
remove an observer from an array. the callback should be a reference to a function and not an anonymous function, because this reference will be used to unset the previous observer. it's useless to call array.unobserve() with an anonymous function as callback, it will not
remove any observer. examples unobserving an array var arr ...
...function, because this reference will be used to unset the previous observer. it's useless to call array.unobserve() with an anonymous function as callback, it will not
remove any observer. ...
...rve(arr, observer); arr.push(4); // [{type: "splice", object: <arr>, index: 3,
removed:[], addedcount: 1}] array.unobserve(arr, observer); arr.pop(); // the callback wasn't called using an anonymous function var persons = ['khalid', 'ahmed', 'mohammed']; array.observe(persons, function (changes) { console.log(changes); }); persons.shift(); // [{type: "splice", object: <arr>, index: 0,
removed: [ "khalid" ], addedcount: 0 }] array.unobserve(persons, function (changes) { console.log(changes); }); persons.push('abdullah'); // [{type: "splice", object: <arr>, index: 2,
removed: [], addedcount: 1 }] // the callback will always be called ...
Reference - Archive of obsolete content
wording should be changed with the javascript 1.x examples, as well as refer to the versions in the past tense. i also support the use of a deprecated pre box with these examples. since it's been 9 months since the last comment on this, i think i'll go ahead and change all of the examples. if anyone disagrees, you can always revert. sevenspade 13:19, 2 july 2006 (pdt) after some thought, i
removed the references to using language="javascript1.2", and all references are merely presented as information detailing past behavior. the "backwards compatibility" sections have been renamed to "behavior in older versions." however, i think this is only appropriate if we are going to document the evolution of everything, or at least note the most significant changes introduced in the various version...
...vascript1.2", and all references are merely presented as information detailing past behavior. the "backwards compatibility" sections have been renamed to "behavior in older versions." however, i think this is only appropriate if we are going to document the evolution of everything, or at least note the most significant changes introduced in the various versions. otherwise, i think we should just
remove the "behavior in other versions" sections, and rename the "javascript 1.2" section headings to something like "differences with javascript 1.2," as well as include a link to the yet-to-be-written javascript 1.2 page documenting the various oddities and deviations made in that version, something which i think we should do anyway. maybe something like main article: javascript 1.2--sevenspade 15:16,...
...is number 2. it's not in the ecma docs. if it's not in a standard, and that sun doc is corrent, then it should probably go in the window object methods. --jonnyq i've already added those methods in the methods listing, but i haven't defined them yet. --maian 02:39, 21 october 2005 (pdt) delete? i don't see any mention in the operators section for the delete operator. did this operator get
removed/deprecated, or is it missing from the documentation? brundlefly 13:15, 19 december 2005 (pst) neither: core javascript 1.5 reference:operators:special operators:delete operator --nickolay 14:48, 19 december 2005 (pst) reading offline? well, may be it's no so common in today's world... but is there a way to get content of jsref-1.5 or other documents as a tarball? there are still valid needs...
Introduction to CSS layout - Learn web development
an still help you achieve specific tasks. by understanding the nature of each layout task, you will soon find that when you look at a particular component of your design the type of layout best suited to it will often be clear. floats floating an element changes the behavior of that element and the block level elements that follow it in normal flow. the element is moved to the left or right and
removed from normal flow, and the surrounding content floats around the floated item. the float property has four possible values: left — floats the element to the left. right — floats the element to the right. none — specifies no floating at all. this is the default value. inherit — specifies that the value of the float property should be inherited from the element's parent element. in...
... going back to our original non-positioned example, we could add the following css rule to implement absolute positioning: .positioned { position: absolute; top: 30px; left: 30px; } here we give our middle paragraph a position value of absolute, and the same top and left properties as before. add...
...esn't exist. the top and left properties have a different effect on absolutely positioned elements than they do on relatively positioned elements. in this case the offsets have been calculated from the top and left of the page. it is possible to change the parent element that becomes this container and we will take a look at that in the lesson on positioning. fixed positioning fixed positioning
removes our element from document flow in the same way as absolute positioning. however, instead of the offsets being applied from the container, they are applied from the viewport. as the item remains fixed in relation to the viewport we can create effects such as a menu which remains fixed as the page scrolls beneath it. for this example our html is three paragraphs of text, in order that we can caus...
Styling links - Learn web development
<li> elements are normally block by default (see types of css boxes for a refresher), meaning that they will sit on their own lines. in this case, we are creating a horizontal list of links, so in the third rule we set the display property to inline, which causes the lis...
...hand edge), and we have 5 buttons to accommodate that should all be the same size. to do this, we set the width to 19.5%, and the margin-right to 0.625%. you'll notice that all this width adds up to 100.625%, which would make the last button overflow the <ul> and fall down to the next line. however, we take it back down to 100% using the next rule, which selects only the last <a> in the list, and
removes the margin from it. done! the last three declarations are pretty simple and are mainly just for cosmetic purposes. we center the text inside each link, set the line-height to 3 to give the buttons some height (which also has the advantage of centering the text vertically), and set the text color to black. note: you may have noticed that the list items in the html are all put on the sa...
...ge of centering the text vertically), and set the text color to black. note: you may have noticed that the list items in the html are all put on the same line as each other — this is done because spaces/line breaks in between inline block elements create spaces on the page, just like the spaces in between words, and such spaces would break our horizontal navigation menu layout. so we've
removed the spaces. you can find more information about this problem (and solutions) at fighting the space between inline block elements. test your skills! you've reached the end of this article, and already did some skill testing in our active learning sections, but can you remember the most important information going forward? you can find an assessment to verify that you've retained this informati...
Client-side form validation - Learn web development
nt.getelementsbytagname('form')[0]; const email = document.getelementbyid('mail'); const emailerror = document.queryselector('#mail + span.error'); email.addeventlistener('input', function (event) { // each time the user types something, we check if the // form fields are valid. if (email.validity.valid) { // in case there is an error message visible, if the field // is valid, we
remove the error message. emailerror.innerhtml = ''; // reset the content of the message emailerror.classname = 'error'; // reset the visual state of the message } else { // if there is still an error, show the correct error showerror(); } }); form.addeventlistener('submit', function (event) { // if the email field is valid, we let the form submit if(!email.validity.valid) { ...
... following error message. emailerror.textcontent = `email should be at least ${ email.minlength } characters; you entered ${ email.value.length }.`; } // set the styling appropriately emailerror.classname = 'error active'; } the comments explain things pretty well, but briefly: every time we change the value of the input, we check to see if it contains valid data. if it has then we
remove any error message being shown. if the data is not valid, we run showerror() to show the appropriate error. every time we try to submit the form, we again check to see if the data is valid. if so, we let the form submit. if not, we run showerror() to show the appropriate error, and stop the form submitting with preventdefault(). the showerror() function uses various properties of the input's val...
...azine: web form validation: best practices and tutorials six revision: best practices for hints and validation in web forms a list apart: inline validation in web forms an example that doesn't use the constraint validation api in order to illustrate this, the following is a simplified version of the previous example that works with legacy browsers. the html is almost the same; we just
removed the html validation features. <form> <p> <label for="mail"> <span>please enter an email address:</span> <input type="text" class="mail" id="mail" name="mail"> <span class="error" aria-live="polite"></span> </label> </p> <!-- some legacy browsers need to have the `type` attribute explicitly set to `submit` on the `button`element --> <button type="su...
HTML forms in legacy browsers - Learn web development
input { /* this rule turns off the default rendering for the input types that have a border, including buttons defined with an input element */ border: 1px solid #ccc; } input[type="button"] { /* this does not restore the default rendering */ border: none; } input[type="button"] { /* these don't...
... but not color or range. if you alter a property, that may impact the appearance of the widget in unexpected ways. for example, [value] { background-color: #ccc; } may have been used to target every <input> with a value attribute, but changing the background-color or border radius on a <meter> will lead to likely unexpected results that differ across browsers. you can declare appearance: none; to
remove the browser styles, but that generally defeats the purpose: as you lose all styling, removing the default look and feel your visitors are used to. to summarize, when it comes to styling form control widgets, the side effects of styling them with css can be unpredictable. so don't. as you can see from the complexity of the property compatibility table for form widgets article, it's very difficul...
... unobtrusive javascript one of the biggest problems is the availability of apis. for that reason, it's considered best practice to work with "unobtrusive" javascript. it's a development pattern that defines two requirements: a strict separation between structure and behaviors. if the code breaks, the content and the basic functionalities must remain acc...
Example 4 - Learn web development
ers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.
remove('active'); } function activeselect(select, selectlist) { if (select.classlist.contains('active')) return; selectlist.foreach(deactivateselect); select.classlist.add('active'); }; function toggleoptlist(select, show) { var optlist = select.queryselector('.optlist'); optlist.classlist.toggle('hidden'); } function highlightoption(select, option) { var optionlist = select.queryselect...
...st.contains('active')) return; selectlist.foreach(deactivateselect); select.classlist.add('active'); }; function toggleoptlist(select, show) { var optlist = select.queryselector('.optlist'); optlist.classlist.toggle('hidden'); } function highlightoption(select, option) { var optionlist = select.queryselectorall('.option'); optionlist.foreach(function (other) { other.classlist.
remove('highlight'); }); option.classlist.add('highlight'); }; function updatevalue(select, index) { var nativewidget = select.previouselementsibling; var value = select.queryselector('.value'); var optionlist = select.queryselectorall('.option'); nativewidget.selectedindex = index; value.innerhtml = optionlist[index].innerhtml; highlightoption(select, optionlist[index]); }; function...
...= index; value.innerhtml = optionlist[index].innerhtml; highlightoption(select, optionlist[index]); }; function getindex(select) { var nativewidget = select.previouselementsibling; return nativewidget.selectedindex; }; // ------------- // // event binding // // ------------- // window.addeventlistener("load", function () { var form = document.queryselector('form'); form.classlist.
remove("no-widget"); form.classlist.add("widget"); }); window.addeventlistener('load', function () { var selectlist = document.queryselectorall('.select'); selectlist.foreach(function (select) { var optionlist = select.queryselectorall('.option'); optionlist.foreach(function (option) { option.addeventlistener('mouseover', function () { highlightoption(select, option); ...
Example 5 - Learn web development
ers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.
remove('active'); } function activeselect(select, selectlist) { if (select.classlist.contains('active')) return; selectlist.foreach(deactivateselect); select.classlist.add('active'); }; function toggleoptlist(select, show) { var optlist = select.queryselector('.optlist'); optlist.classlist.toggle('hidden'); } function highlightoption(select, option) { var optionlist = select.queryselect...
...st.contains('active')) return; selectlist.foreach(deactivateselect); select.classlist.add('active'); }; function toggleoptlist(select, show) { var optlist = select.queryselector('.optlist'); optlist.classlist.toggle('hidden'); } function highlightoption(select, option) { var optionlist = select.queryselectorall('.option'); optionlist.foreach(function (other) { other.classlist.
remove('highlight'); }); option.classlist.add('highlight'); }; function updatevalue(select, index) { var nativewidget = select.previouselementsibling; var value = select.queryselector('.value'); var optionlist = select.queryselectorall('.option'); optionlist.foreach(function (other) { other.setattribute('aria-selected', 'false'); }); optionlist[index].setattribute('aria-selected'...
...= index; value.innerhtml = optionlist[index].innerhtml; highlightoption(select, optionlist[index]); }; function getindex(select) { var nativewidget = select.previouselementsibling; return nativewidget.selectedindex; }; // ------------- // // event binding // // ------------- // window.addeventlistener("load", function () { var form = document.queryselector('form'); form.classlist.
remove("no-widget"); form.classlist.add("widget"); }); window.addeventlistener('load', function () { var selectlist = document.queryselectorall('.select'); selectlist.foreach(function (select) { var optionlist = select.queryselectorall('.option'), selectedindex = getindex(select); select.tabindex = 0; select.previouselementsibling.tabindex = -1; updatevalue(select, sele...
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
t to calculate the number of hours, minutes, and seconds as separate values, and then show them together in a string after each loop iteration. from the second counter, you can work out each of these. how would you calculate them? have a think about it: the number of seconds in an hour is 3600. the number of minutes will be the amount of seconds left over when all of the hours have been
removed, divided by 60. the number of seconds will be the amount of seconds left over when all of the minutes have been
removed. you'll want to include a leading zero on your display values if the amount is less than 10, so it looks more like a traditional clock/watch. to pause the stopwatch, you'll want to clear the interval. to reset it, you'll want to set the counter back to 0, clear the in...
... next, display the results paragraph and set its text content to "players go!!" to signal to the players that they can now press their ...
...y value of different keys you are pressing. when e.key is "a", display a message to say that player 1 won, and when e.key is "l", display a message to say player 2 won. (note: this will only work with lowercase a and l — if an uppercase a or l is submitted (the key plus shift), it is counted as a different key!) if one of these keys was pressed, set isover to true. only if isover is true,
remove the keydown event listener using
removeeventlistener() so that once the winning press has happened, no more keyboard input is possible to mess up the final game result. you also use settimeout() to call reset() after 5 seconds — as explained earlier, this function resets the game back to its original state so that a new game can be started. that's it—you're all done! note: if you get...
Drawing graphics - Learn web development
e experiments on to. first make a local copy of our 0_canvas_start.html file, and open it in your text editor. add the following code into it, just below the opening <body> tag: <canvas class="mycanvas"> <p>add suitable fallback here.</p> </canvas> we have added a class to the <canvas> element so it will be easier to select if we have multiple canvases on the page, but we have
removed the width and height attributes for now (you could add them back in if you wanted, but we will set them using javascript in a below section). canvases with no explicit width and height default to 300 pixels wide by 150 pixels high. now add the following lines of javascript inside the <script> element: const canvas = document.queryselector('.mycanvas'); const width = canvas.width = windo...
...thing exactly halfway across the width of the canvas). if you save and load your example in a browser now, you'll see nothing, which is fine, but you'll also see scrollbars — this is a problem for us, which happens because the <body> element has a margin that, added to our full-window-size canvas, results in a document that's wider than the window. to get rid of the scrollbars, we need to
remove the margin and also set overflow to hidden. add the following into the <head> of your document: <style> body { margin: 0; overflow: hidden; } </style> the scrollbars should now be gone. note: you should generally set the size of the image using html attributes or dom properties, as explained above. you could use css, but the trouble then is that the sizing is done after the...
...e arc is specified as starting at -45 degrees and ending at 45 degrees, we draw the arc around the 270 degrees not inside this portion. if you were to change true to false and then re-run the code, only the 90 degree slice of the circle would be drawn. before calling fill(), we draw a line to the center of the circle. this means that we get the rather nice pac-man-style cutout rendered. if you
removed this line (try it!) then re-ran the code, you'd get just an edge of the circle chopped off between the start and end point of the arc. this illustrates another important point of the canvas — if you try to fill an incomplete path (i.e. one that is not closed), the browser fills in a straight line between the start and end point and then fills it in. that's it for now; your final example...
A first splash into JavaScript - Learn web development
let's imagine your boss h...
...n so that when it is clicked, a function called resetgame() is run. now we need to define this function too! add the following code, again to the bottom of your javascript: function resetgame() { guesscount = 1; const resetparas = document.queryselectorall('.resultparas p'); for (let i = 0 ; i < resetparas.length ; i++) { resetparas[i].textcontent = ''; } resetbutton.parentnode.
removechild(resetbutton); guessfield.disabled = false; guesssubmit.disabled = false; guessfield.value = ''; guessfield.focus(); lastresult.style.backgroundcolor = 'white'; randomnumber = math.floor(math.random() * 100) + 1; } this rather long block of code completely resets everything to how it was at the start of the game, so the player can have another go. it: puts the guesscount ba...
...om() * 100) + 1; } this rather long block of code completely resets everything to how it was at the start of the game, so the player can have another go. it: puts the guesscount back down to 1. empties all the text out of the information paragraphs. we select all paragraphs inside <div class="resultparas"></div>, then loop through each one, setting their textcontent to '' (an empty string).
removes the reset button from our code. enables the form elements, and empties and focuses the text field, ready for a new guess to be entered.
removes the background color from the lastresult paragraph. generates a new random number so that you are not just guessing the same number again! at this point you should have a fully working (simple) game — congratulations! all we have left to do now i...
Multimedia: video - Learn web development
while serving the smallest video file size based on each browsers file type support. why optimize your multimedia? for the average website, 25% of bandwidth comes from video. optimizing video has the potential for very large bandwidth savings that translate into better website performance. optimizing video delivery it's best to compress all video, optimize <source> order, set autoplay,
remove audio from muted video, optimize video preload, and consider streaming the video. the sections below describe each of these optimization techniques. compress all videos most video compression work compares adjacent frames within a video, with the intent of removing detail that is identical in both frames. compress the video and export to multiple video formats, including webm, mpeg-4/h.264, and...
...d several attributes to the video tag: autoplay, muted, and playsinline. <video autoplay="" loop="" muted="true" playsinline="" src="backgroundvideo.mp4"> while the loop and autoplay make sense for a looping and autoplaying video, the muted attribute is required for autoplay in mobile browsers. playsinline is required for mobile safari, allowing videos to play without forcing fullscreen mode.
remove audio from muted hero videos for hero-video or other video without audio, removing audio is smart. <video autoplay="" loop="" muted="true" playsinline="" id="hero-video"> <source src="banner_video.webm" type='video/webm; codecs="vp8, vorbis"'> <source src="web_banner.mp4" type="video/mp4"> </video> this hero-video code (above) is common to conference websites and corporate home p...
... websites and corporate home pages. it includes a video that is auto-playing, looping, and muted. there are no controls, so there is no way to hear audio. the audio is often empty, but still present, and still using bandwidth. there is no reason to serve audio with video that is always muted. removing audio can save 20% of the bandwidth. depending on your choice of software, you might be able to
remove audio during export and compression. if not, a free utility called ffmpeg can do it for you. this is the ffmpeg command string to
remove audio: ffmpeg -i original.mp4 -an -c:v copy audiofreeversion.mp4 video preload the preload attribute has three available options: auto|metadata|none. the default setting is metadata. these settings control how much of a video file downloads with page load. ...
Getting started with Vue - Learn web development
added when you initialized the app with your cli, and some other useful links to the vue community and ecosystem. making a couple of changes let's make our first change to the app — we’ll delete the vue logo. ...
...er useful links to the vue community and ecosystem. making a couple of changes let's make our first change to the app — we’ll delete the vue logo. open the app.vue file, and delete the <img> element from the template section: <img alt="vue logo" src="./assets/logo.png"> if your server is still running, you should see the logo
removed from the rendered site almost instantly. let’s also
remove the helloworld component from our template. ...
... your server is still running, you should see the logo
removed from the rendered site almost instantly. let’s also
remove the helloworld component from our template. first of all delete this line: <helloworld msg="welcome to your vue.js app"/> if you save your app.vue file now, the rendered app will throw an error because we’ve registered the component but are not using it. we also need to
remove the lines from inside the <script> element that import and register the component: delete these lines now: import helloworld from './components/helloworld.vue' components: { helloworld } your rendered app should no longer show an error, just a blank page, as we currently have no visible content inside <template>. let’s add a new <h1> inside <div id="app">. since we’re going to be creat...
Focus management with Vue refs - Learn web development
features of vue (like single file components or render functions), you'll need a terminal with node + npm installed. objective: to learn how to handle focus management using vue refs. the focus management problem while we do have working edit functionality, we aren't providing a great experience for non-mouse users. specifically, when a user activates the "edit" button, we
remove the "edit" button from the dom, but we don't move the user's focus anywhere, so in effect it just disappears. this can be disorienting for keyboard and non-visual users. to understand what's currently happening: reload your page, then press tab. you should see a focus outline on the input for adding new to-do items. press tab again. the focus should move to the "add" button. hit it again, a...
...r changes via the keyboard, focus should be returned to the "edit" button. success! vue lifecycle methods next, we need to move focus to the edit form’s <input> element when the "edit" button is clicked. however, because our edit form is in a different component to our "edit" button, we can't just set focus inside the "edit" button’s click event handler. instead, we can use the fact that we
remove and re-mount our todoitemeditform component whenever the "edit" button is clicked to handle this. so how does this work? well, vue components undergo a series of events, known as a lifecycle. this lifecycle spans from all the way before elements are created and added to the vdom (mounted), until they are
removed from the vdom (destroyed). vue lets you run methods at various stages of this lifec...
...component is rendered to the actual dom. mounted() — runs after your component is mounted to the dom. can access refs here. beforeupdate() — runs whenever data in your component changes, but before the changes are rendered to the dom. updated() — runs whenever data in your component has changed and after the changes are rendered to the dom. beforedestroy() — runs before a component is
removed from the dom. destroyed() — runs after a component has been
removed from the dom activated() — only used in components wrapped in a special keep-alive tag. runs after the component is activated. deactivated() — only used in components wrapped in a special keep-alive tag. runs after the component is deactivated. note: the vue docs provide a nice diagram for visualizing when these ho...
Accessibility/LiveRegionDevGuide
module is the priority queue. it is responsible for queuing messages derived from live region events, where priority is determined by chronological order and the live politeness properties. in addition to the standard priority queue methods, additional methods will need to be implemented that purge the queue based on one of the priority criterion. the "purge by timestamp" method will be used to
remove old messages that are no longer deemed relevant while "purge by politeness" is used to satisfy the aria live politeness specification. the later method will be explained in detail below. event types the table for web page mutation event types lists the two major event types associated with live regions, namely text-changed and object changed events. both will be discussed in detail below. o...
...ldren-changed events because the event is triggered on the parent of the object. the actual object that change can then be found in the event.any_data field. in iaccessible2, the event_object_* events are triggered on the actual object that changed. the object changed events can be further subdivided into object addition and removal events. in at-spi, this is accomplished by appending ":add" or ":
remove" to the event string. in iaccessible2, there are two separate event types, namely event_object_show and event_object_hide. text changed the text changed events are quite similar in at-spi and iaccessible2 with both having an insert and delete or removal events. the text changed event type in at-spi has a similar scheme as the object:children-changed events. in this case, the root event string ...
...are quite similar in at-spi and iaccessible2 with both having an insert and delete or removal events. the text changed event type in at-spi has a similar scheme as the object:children-changed events. in this case, the root event string is object:text-changed with ":delete" and ":insert" being appended to complete the event type. in iaccessible2, there are two distinct event types - ia2_event_text_
removed and ia2_event_text_inserted. the text associated with an at-spi text changed event is directly in the event object. the event.any_data field holds the entire text string while event.detail1 is the start index while event.detail2 is the text string length. in iaccessible2, iaccessibletext::get_oldtext and iaccessibletext::get_newtext are used to acquire the text and offsets. filtering events ...
Mozilla accessibility architecture
rride nsiaccessible::getaccchildcount(), ::getaccfirstchild() and ::getacclastchild(). in this way we avoid the normal nsaccessibletreewalker traversal methods and create whatever child accessibles we want. when there is no dom node for each accessible, as is the case for nshtmlcomboboxaccessible and nsxultreeitemaccessible, we also need to override the shutdown() method, so that the children get
removed from memory when the parent is shutdown. in that case we also override ::getaccnextsibling(), ::getaccprevioussibling() for the dom-less children; otherwise they do not know how to find each other. it is also useful to override these the child getters to return nothing, as we do in nsleafaccessible, nstextaccessible and other accessible implementations where we want to be sure to avoid children.
...ibility event focus, select standard html dom event event_focus dommenuitemactive, dommenubaractive mozilla dom event_focus domnodeinserted w3c dom mutation event event_create (atk) event_reorder (msaa) domsubtreemodified w3c dom mutation event event_reorder domnode
removed w3c dom mutation event event_destroy (atk) event_reorder (msaa) checkboxstatechange, radiostatechange mozilla dom event_state_change popupshowing mozilla dom event_menustart popuphiding mozilla dom event_menuend nsdocaccessible::scrollpositiondidchange(), then nsdocaccessible::scrollti...
...d two nsdocaccessible's exist for the same screen space - one for the old document about to be destroyed, and one for the loading document which hasn't been displayed yet. side note: we do not fire the event indicating the new document is ready, until the new document is displayed. from a mutation event callback in nsdocaccessible, indicating that a node or subtree of nodes is changing or being
removed. we iterate through all the dom nodes in the subtree, checking for nsiaccessnode entries in the cache for each dom node, shutting them down if they exist. this is better than just traversing the accessibles by using the member variables mfirstchild and mnextsibling, because that would miss nsaccessnode's that are not nsaccessible's. at program shutdown, when the nsaccessibilityservice observes...
Makefiles - Best practices and suggestions
prefer library rules whenever possible or create library rules that are missing. dependency builds - a second invocation of make within a sandbox should always be a nop. hardcoded values - avoid them like the plague. use variable assignments, autogen paths and dynamic file gathering. platform specific - avoid this logic whenever possible. code as little platform specific logic within a makefile as possible, a conditional and compiler flags at most should be needed. for ex use defines within sources to shift platform logic into your source code. ...
...ass of hardware. for classes of hardware (unix/windows) place your makefile in a subdirectory, unix/makefile.in always include dependencies when creating a target initial make call should always be the workhorse: build, generate, deploy, install, etc. all subsequent make calls must become a nop unless sources or dependencies change or have been
removed. incorrect dependencies will contribute to wasted cycles and can contribute to circular dependencies. directory dependencies do not use directories as a dependency for generated targets, ever. any activity within a directory will alter inodes forcing targets to always be stale. for ex, individual unit tests would invalidate all prior test activity w...
...condition. # transient directory for storing timestamps ts=.ts ##################################################### ## extra dep needed to synchronize parallel execution ##################################################### $(ts): $(ts)/.done $(ts)/.done: $(mkdir) -p $(dir $@) touch $@ # "clean" target garbage_dirs += $(ts) maintain clean targets - makefiles should be able to
remove all content that is generated so "make clean" will return the sandbox/directory back to a clean state. targets = foo bar tans timestampdir = .ts all: $(timestampdir) $(targets) %: %.c $(cc) -o $@ $< $(timestampdir): $(mkdir) $@ # "clean" target garbage += $(targets) garbage_dirs += $(timestampdir) wrapper check/unit tests with a enable_tests conditional so tests can be disabled o...
Obsolete Build Caveats and Tips
veats and tips being added to the mdn documentation for building older versions of the code base or dealing with older build tools. these tips, while helpful, are jarring and superfluous to the majority of new mozilla builders who are mainly interested in building the latest version of firefox. therefore, instead of deleting all these nuggets of information, it's best to collect them all here and
remove them from the majority happy path documentation. each piece of information should mention the page and the section it originally came from. you can copy in the original text and bold out what has been
removed. obsolete caveats and tips from simple_firefox_build install a version of visual studio that supports c++ development: vs 2012 for windows desktop pro or express (free), or vc++ 2010 pro ...
... is the current version available), your build will fail, often while building cairo with "ocidl.h" errors. in order to fix this issue, you need to use the latest version of mozillabuild. windows vista sdk obsolete since gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. this is the sdk that mozilla-1.9.1 (firefox 3.5) builds used to be built against. features that depend on this sdk include: windows vista parental controls file associations and application registration on vista and above ability to display the uac shield icon in the ui thunderbird windows search integration text services framework support there are ...
...k. use visual studio 2008 professional. gecko 1.9.2 through 11: if you would like to use this sdk, add ac_add_options --with-windows-version=600 to your .mozconfig. windows server 2003 r2 platform sdk obsolete since gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. this is your only option if you're on windows 2000. this also used to be necessary for building a default gecko 1.9.2 through 8 with visual c++ express editions (see atlbase.h for more). you can download the sdk from the microsoft download center. you need to install at least the "windows core sdk", "web workshop (ie) sdk", and the "data access services (...
Storage access policy: Block cookies from trackers
eatures that we don't yet plan to ship to release users; experimental features will not be included in this documentation, but may nevertheless impact the functionality of domains classified as trackers. we recommend sites test with firefox nightly, as this includes the newest version of our protections. as described above, note that nightly may include additional protections that end up getting
removed or changed before they reach our release users. we’ll keep this page updated with the newest information as we strengthen our protections. these protections are on by default in nightly. the cookie policy can be enabled in other versions of firefox through the content blocking settings (these steps will vary by version; the linked documentation includes a dropdown to select the appropriate fi...
...r access to storage. automatic storage access upon interaction in order to improve web compatibility, firefox currently includes some heuristics to grant storage access automatically to third parties that receive user interaction. these heuristics are intended to allow some third-party integrations that are common on the web to continue to function. they are intended to be temporary and will be
removed in a future version of firefox. they should not be relied upon for current and future web development. third-party storage access may be granted to resources that have been classified as tracking resources when a user gesture triggers a pop-up window that has opener access to the originating document. when that occurs, there are three possible ways a third-party origin can be granted access: ...
... search for the preference name "urlclassifier.trackingannotationtable.testentries". if the preference already exists, edit the preference value. if the preference does not exist, click "string" and then "+" to create a new preference. for the preference value enter comma separated origins that you’d like to have classified as trackers. e.g. "example.net,example.org". warning: be sure to
remove these entries after you have finished testing. faq this cookie policy has the potential to lead to site breakage, but has been designed to allow common third-party integrations to continue to work while preventing cross-site tracking. in this section we describe the functionality you can expect in different integration scenarios. will this storage access policy block ads from displaying on my...
IME handling guide
/or ecompositionchange event if necessary. one of the other important jobs of this is, when a focused editor handles a dispatched ecompositionchange event, this modifies the stored composition string and its clause information. the editor refers the stored information for creating or modifying a text node representing a composition string. and before dispatching ecomposition* events, this class
removes ascii control characters from dispatching composition event's data in the default settings. although, this can be disabled with "dom.compositionevent.allow_control_characters" pref. finally, this class guarantees that requesting to commit or cancel current composition to ime is perefored synchronously. see forcibly committing composition section for the detail. editor/libeditor mozilla::edito...
...nend event which will cause a dom compositionend event. limitation of handling composition currently, editorbase touches undo stack at receiving every widgetcompositionevent. therefore, editorbase requests to commit composition when the following cases occur: the editor loses focus the caret is moved by mouse or javascript value of the editor is changed by javascript node of the editor is
removed from dom tree somethings object is modified in an html editor, e.g., resizing an image composition string is moved to a different position which is specified by native ime (e.g., only a part of composition is committed) in the future, we should fix this limitation. if we make editorbase not touch undo stack until composition is committed, some of the cases must be fixed. notifications to im...
... a placeholder of some old chinese ime on windows. in this case, although, we should not commit the placeholder character because it's not a character which the user wanted to input but we commit it as is. the reason is, inputting an ideographic space causes a composition. therefore, we cannot distinguish if committing composition is unexpected. if the user uses such old chinese ime, "intl.ime.
remove_placeholder_character_at_commit" pref may be useful but we don't support them anymore in default settings (except if somebody will find a good way to fix this issue). the composition is committed synchronously but with empty string this case may occur on linux or with some ime on other platforms. if a web application implements autocomplete, committing with different strings especially an empty...
Webapps.jsm
nction notifyappsregistrystart() notifyappsregistryready: function notifyappsregistryready() sanitizeredirects: function sanitizeredirects(asource) _savewidgetsfullpath: function(amanifest, adestapp) appkind: function(aapp, amanifest) updatepermissionsforapp: function(aid, aispreinstalled) updateofflinecacheforapp: function(aid) installpreinstalledapp: function installpreinstalledapp(aid)
removeifhttpsduplicate: function(aid) installsystemapps: function() loadandupdateapps: function() updatedatastore: function(aid, aorigin, amanifesturl, amanifest) _registersystemmessagesforentrypoint: function(amanifest, aapp, aentrypoint) _registerinterappconnectionsforentrypoint: function(amanifest, aapp,) _registersystemmessages: function(amanifest, aapp) _registerinterappconnections: function...
...runupdate) _registeractivities: function(amanifest, aapp, arunupdate) _createactivitiestounregister: function(amanifest, aapp, aentrypoint) _unregisteractivitiesforapps: function(aappstounregister) _unregisteractivities: function(amanifest, aapp) _processmanifestforids: function(aids, arunupdate) observe: function(asubject, atopic, adata) addmessagelistener: function(amsgnames, aapp, amm)
removemessagelistener: function(amsgnames, amm) formatmessage: function(adata) receivemessage: function(amessage) getappinfo: function getappinfo(aappid) broadcastmessage: function broadcastmessage(amsgname, acontent) registerupdatehandler: function(ahandler) unregisterupdatehandler: function(ahandler) notifyupdatehandlers: function(aapp, amanifest, azippath) _getappdir: function(aid) _writefil...
...ptforuninstall: function(adata) confirmuninstall: function(adata) denyuninstall: function(adata, areason = "error_unknown_failure") getself: function(adata, amm) checkinstalled: function(adata, amm) getinstalled: function(adata, amm) getnotinstalled: function(adata, amm) geticon: function(adata, amm) getall: function(acallback) isreceipt: function(data) addreceipt: function(adata, amm)
removereceipt: function(adata, amm) replacereceipt: function(adata, amm) setenabled: function(adata) getmanifestfor: function(amanifesturl, aentrypoint) getappbymanifesturl: function(amanifesturl) getfullappbymanifesturl: function(amanifesturl, aentrypoint, alang) getmanifestcspbylocalid: function(alocalid) getdefaultcspbylocalid: function(alocalid) getapplocalidbystoreid: function(astoreid) ge...
Application Translation with Mercurial
e locale for which the texts are being translated (in this example: de - german). with the second line start the file paths of the files which require changes. the file paths follow the directory structure of the locale repository downloaded for translation. in this example, the file aboutdialog can be found in the folder browser/chrome/browser/. the text striked through are texts which have been
removed in the english version and can also be
removed from the locale being worked on. in this example we will translate the one new text with the id privatebrowsingpage.howtostart4 in the file aboutprivatebrowsing.dtd. tips for finding files with usually easily translateable texts: look for files in browser/chrome/browser/ look for a file with only a few changes suggestions files starting ...
...on the page in the sidebar and choose "properties" from the context menu which gets opened. rename it something meaningful, e.g. "firefox <version number> translation". after you saved the dialog, click with the left mouse button on the page in the sidebar to open the locally saved copy. opening english files and the target locale side-by-side the localization report shows the ids of added or
removed texts, but the english text itself is still unknown. we get this by comparing the english version of the file with the one of the locale we are translating in. to do so, launch winmerge. from its "file" menu, choose "save project". for the file path of the left directory, go to the downloaded mozilla-aurora source code and then into its browser/locales/ folder. in this example, the absolute...
...english versionmoved from below the string with the id privatebrowsingpage.howtostart3 to a position above it. cut and paste these strings in the localized file so their position corresponds to the on in the english file. press the f5 key or click the reload button in winmerge's toolbar to re-compare the files. now copy the empty lines below privatebrowsingpage.learnmore and the line <!-- to be
removed post-australis --> to the localized file. this text is a comment (which in .dtd files always can be found between <!-- and -->). there is no need to translate this text. now we copy the two missing lines from the english file and insert them in the localized file: <!-- localization note (privatebrowsingpage.howtostart4): please leave &newprivatewindow.label; intact in the translation --> <!
L20n Javascript API
etsync and ctx.getentitysync to get translations synchronously. alternatively, you can register callbacks to execute when the context is ready (or when globals change and translations need to be updated) with ctx.localize. ctx.localize(['hello', 'new'], function(l10n) { var node = document.queryselector('[data-l10n-id=hello]'); node.textcontent = l10n.entities.hello.value; node.classlist.
remove('hidden'); }); ctx.registerlocales(defaultlocale: string?, availablelocales: array<string>?) register the default locale of the context instance, as well as all other locales available to the context instance before the language negotiation. locales are referenced by their bcp 47 language codes. ctx.registerlocales('en-us', ['ar', 'es-ar', 'es-es', 'en-us', 'fr', 'pl']); defaultlocale is...
...les; the context instance will try to retrieve a fallback translation from the next locale in the fallback chain, compiler.error, when l20n is unable to evaluate an entity to a string; there are two types of errors in this category: compiler.valueerror, when l20n can still try to use the literal source string of the entity as fallback, and compiler.indexerror otherwise. ctx.
removeeventlistener(event: string, callback: function)
remove an event listener previously registered with addeventlistener. ctx.updatedata(ctxdata: object) update the context data which will be available to all entities in the context. the ctxdata is an object which extends the context data per key and per level of hierarchy. in other words, the following two calls: ctx.updatedata({ user: { name:...
... if the entity couldn't be evaluated and a fallback translation had to be used. ctx.localize(ids: array<string>, callback: function) registers a callback which fires when all entities listed in ids have been retrieved. ctx.localize(['hello', 'about'], function(l10n) { var node = document.queryselector('[data-l10n-id=hello]'); node.textcontent = l10n.entities.hello.value; node.classlist.
remove('hidden'); }); the callback becomes bound to the entities on the ids list. it will be called when the entities become available (asynchronously) or whenever the translation of any of the entities changes. localize should be the preferred way of localizing the ui. the callback function is passed an l10n object with the following properties: entities: an object whose keys are the identifier...
Linked Lists
this chapter describes the nspr api for managing linked lists. the api is a set of macros for initializing a circular (doubly linked) list, inserting and removing elements from the list. the macros are not thread safe. the caller must provide for mutually-exclusive access to the list, and for the nodes being added and
removed from the list. ...
...t provide for mutually-exclusive access to the list, and for the nodes being added and
removed from the list. linked list types linked list macros linked list types the prclist type represents a circular linked list. ...
...tually-exclusive access to the list, and for the nodes being added and
removed from the list. linked list types linked list macros linked list types the prclist type represents a circular linked list. ...
PR_PopIOLayer
removes a layer from the stack. syntax #include <prio.h> prfiledesc *pr_popiolayer( prfiledesc *stack, prdescidentity id); parameters the function has the following parameters: stack a pointer to a prfiledesc object representing the stack from which the specified layer is to be
removed. id identity of the layer to be
removed from the stack. returns the function returns one of the following values: if the layer is successfully
removed from the stack, a pointer to the
removed layer. if the layer is not found in the stack or cannot be popped (for example, the bottommost layer), the function returns null with the error code pr_invalid_argument_error. description pr_popiolayer pops the specified layer from the stack. ...
... even if the identity indicates the top layer of the stack, the reference returned is not the file descriptor for the stack and that file descriptor remains valid. ...
... even if the identity indicates the top layer of the stack, the reference returned is not the file descriptor for the stack and that file descriptor remains valid. ...
PR_RmDir
the directory must be empty. if the directory is not empty, pr_rmdir fails and pr_geterror returns the error code pr_directory_not_empty_error. ...
...the directory must be empty. if the directory is not empty, pr_rmdir fails and pr_geterror returns the error code pr_directory_not_empty_error. ...
...the directory must be empty. if the directory is not empty, pr_rmdir fails and pr_geterror returns the error code pr_directory_not_empty_error. ...
Encrypt Decrypt MAC Keys As Session Objects
c_trailer); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } rv = filetoitem(&filedata, file); nonbody = (char *)filedata.data; if (!nonbody) { pr_fprintf(pr_stderr, "unable to read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and
remove them */ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe this is a mac file */ if (body) trail = strstr(++body, trailer); if (trail != null) { *trail = '\0'; } else { pr...
...only and we have authenticated to it * open input file, read in header, get iv and cka_ids of two keys from it * find those keys in the db token * open output file * loop until eof(input): * read a buffer of ciphertext from input file, * save last block of ciphertext * decrypt ciphertext buffer using cbc and iv, * compute and check mac, then
remove mac from plaintext * replace iv with saved last block of ciphertext * write the plain text to output file * close files * report success */ secstatus rv; secitem ivitem; secitem enckeyitem; secitem mackeyitem; secitem cipheritem; secitem macitem; secitem ...
... pr_fprintf(pr_stderr, "mac has data has 0 length\n"); /*rv = secfailure; goto cleanup;*/ } rv = readfromheaderfile(headerfilename, pad, &paditem, pr_true); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not retrieve pad detail from header file\n"); goto cleanup; } if (rv == secsuccess) { /* decrypt and
remove mac */ rv = decryptandverifymac(outfilename, encryptedfilename, &cipheritem, &macitem, enckey, mackey, &ivitem, &paditem); if (rv != secsuccess) { pr_fprintf(pr_stderr, "failed while decrypting and removing mac\n"); } } cleanup: if (slot) { pk11_freeslot(slot); } if (enckey) { pk11_freesymkey(enckey); } i...
Encrypt and decrypt MAC using token
c_trailer); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } rv = filetoitem(&filedata, file); nonbody = (char *)filedata.data; if (!nonbody) { pr_fprintf(pr_stderr, "unable to read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and
remove them */ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe this is a mac file */ if (body) trail = strstr(++body, trailer); if (trail != null) { *trail = '\0'; } else { pr...
...only and we have authenticated to it * open input file, read in header, get iv and cka_ids of two keys from it * find those keys in the db token * open output file * loop until eof(input): * read a buffer of ciphertext from input file, * save last block of ciphertext * decrypt ciphertext buffer using cbc and iv, * compute and check mac, then
remove mac from plaintext * replace iv with saved last block of ciphertext * write the plain text to output file * close files * report success */ secstatus rv; secitem ivitem; secitem enckeyitem; secitem mackeyitem; secitem cipheritem; secitem macitem; secitem ...
... pr_fprintf(pr_stderr, "mac has data has 0 length\n"); /*rv = secfailure; goto cleanup;*/ } rv = readfromheaderfile(headerfilename, pad, &paditem, pr_true); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not retrieve pad detail from header file\n"); goto cleanup; } if (rv == secsuccess) { /* decrypt and
remove mac */ rv = decryptandverifymac(outfilename, encryptedfilename, &cipheritem, &macitem, enckey, mackey, &ivitem, &paditem); if (rv != secsuccess) { pr_fprintf(pr_stderr, "failed while decrypting and removing mac\n"); } } cleanup: if (slot) { pk11_freeslot(slot); } if (enckey) { pk11_freesymkey(enckey); } i...
NSS_3.12.1_release_notes.html
ting key that signed csr bug 129303: nss needs to expose interfaces to deal with multiple token sources of certs. ...
... bug 439123: assertion failure in libpkix at shutdown bug 440062: ...
...new and revised documents available since the release of nss 3.11 include the following: build instructions for nss 3.11.4 and above nss shared db compatibility nss ...
NSS 3.12.4 release notes
n, where only \ and ] require escaping. new functions in the nss shared library: pk11_isinternalkeyslot (see pk11pub.h) secmod_opennewslot (see pk11pub.h) new error codes (see secerr.h): sec_error_bad_info_access_method sec_error_crl_import_failed new oids (see secoidt.h) sec_oid_x509_any_policy the nssckbi pkcs #11 module's version changed to 1.75. obsolete code for win16 has been
removed. support for openvms has been
removed. bugs fixed the following bugs have been fixed in nss 3.12.4. bug 321755: implement crldistributionpoint extension in libpkix bug 391434: avoid multiple encoding/decoding of pkix_pl_oid to and from ascii string bug 405297: problems building nss/lib/ckfw/capi/ with mingw gcc bug 420991: libpkix returns wrong nss error code bug 427135: add super-h (sh3,4) ...
...bug 488396: dbm needs to be fips certifiable. bug 488550: crash in certutil or pp when printing cert with ...
...h in certutil or pp when printing cert with empty subject name bug 488992: fix lib/freebl/win_rand.c warnings bug 489010: stop exporting mktemp and dbopen (again) bug 489287: resolve a few remaining issues with nss's new revocation flags bug 489710: byteswap optimize for msvc++ bug 490154: cryptokey framework requires module to implement generatekey when they support keypairgeneration bug 491044:
remove support for vms (a.k.a., openvms) from nss bug 491174: cert_pkixverifycert reports wrong error code when ee cert is expired bug 491919: cert.h doesn't have valid functions prototypes bug 492131: a failure to import a cert from a p12 file leaves error code set to zero bug 492385: crash freeing named crl entry on shutdown bug 493135: bltest crashes if it can't open the input file bug 493364: can't ...
NSS API Guidelines
ept classname can be used in other object files. secport_add_pointer(classname, pointer) - add pointer as a valid pointer for classclassname. this is usually called by a create function. secport_verify_pointer(classname, pointer, secerror, returnvalue)- check if a given pointer really belongs to the requested class. if it doesn't set the error secerror and return the value returnvalue. secport_
remove_pointer(classname, pointer) -
remove a pointer from the valid list. usually called by a destroy function. finally, error logging should be added an documented when debug is turned on. interfaces for these are in nspr. thread safety code developed using the nss apis needs to make use of thread safety features. first to examine is object creation and deletion. object creation is usually not ...
...reated. exceptions to this include objects which are created on the fly, or as global objects. deletion, on the other hand, may be trickier. threads may be referencing the object at the same time a another thread tries to delete it. the semantics depend on the way the application uses the object, also how and when the application wants to destroy it. for some data structures, this problem can be
removed by protected reference counting. the object does not disappear until all users have released it. next we examine global data, including function local static structures. just initialized, and never to be changed global data, does not need to protection from mutexes. we should also determine if global data should be moved to a session context (see session context and global effects below). not...
...t, or even better if lists are relatively read only (they don't change very often) and using reader/writer locks. copy the linked list: instead of operating on the global list, you can copy the list. this also requires small lists. lock over single element with retry: for medium sized lists, you can secure the reference to each element, complete a test, then detect if the given element has been
removed from the list. in the case of removal, the search can either be either restarted, or terminated. this method is a more complicated than the other methods: requiring the calling of search code tolerant to often repeated element inspection. examples of the previous strategies can be found in security/nss/lib/pk11wrap/pk11slot.c. where possible use the nspr list primitives. from these you can ev...
Enc Dec MAC Output Public Key as CSR
eader = lab_header; trailer = lab_trailer; break; default: pr_close(file); return secfailure; } rv = filetoitem(&filedata, file); nonbody = (char *)filedata.data; if (!nonbody) { pr_fprintf(pr_stderr, "unable to read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and
remove them */ char *trail = null; if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe this is a mac file */ if (body) trail = strstr(++body, trailer); if (trail != null) { *trail = '\0'; ...
... * the db is open read only and we have authenticated to it * open input file, read in header, get iv and wrapped keys and * public key * unwrap the wrapped keys * loop until eof(input): * read a buffer of ciphertext from input file, * save last block of ciphertext * decrypt ciphertext buffer using cbc and iv, * compute and check mac, then
remove mac from plaintext * replace iv with saved last block of ciphertext * write the plain text to output file * close files * report success */ secstatus rv; secitem ivitem; secitem wrappedenckeyitem; secitem wrappedmackeyitem; secitem cipheritem; secitem macitem; secite...
...e output file. ...
Encrypt Decrypt_MAC_Using Token
*/ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe this is a mac file. */ if (body) trail = strstr(++body, trailer); if (trail != null) { *trail = '\0'; } else { ...
...and we have authenticated to it: * open input file, read in header, get iv and cka_ids of two keys from it. * find those keys in the db token. * open output file. * loop until eof(input): * read a buffer of ciphertext from input file. * save last block of ciphertext. * decrypt ciphertext buffer using cbc and iv. * compute and check mac, then
remove mac from plaintext. * replace iv with saved last block of ciphertext. * write the plain text to output file. * close files. * report success. */ secstatus rv; secitem ivitem; secitem enckeyitem; secitem mackeyitem; secitem cipheritem; secitem macitem; secitem ...
... pr_fprintf(pr_stderr, "mac has data has 0 length\n"); /*rv = secfailure; goto cleanup;*/ } rv = readfromheaderfile(headerfilename, pad, &paditem, pr_true); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not retrieve pad detail from header file\n"); goto cleanup; } if (rv == secsuccess) { /* decrypt and
remove mac */ rv = decryptandverifymac(outfilename, encryptedfilename, &cipheritem, &macitem, enckey, mackey, &ivitem, &paditem); if (rv != secsuccess) { pr_fprintf(pr_stderr, "failed while decrypting and removing mac\n"); } } cleanup: if (slot) { pk11_freeslot(slot); } if (enckey) { pk11_freesymkey(enckey); } i...
NSS Sample Code Sample_3_Basic Encryption and MACing
c_trailer); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } rv = filetoitem(&filedata, file); nonbody = (char *)filedata.data; if (!nonbody) { pr_fprintf(pr_stderr, "unable to read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and
remove them */ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe this is a mac file */ if (body) trail = strstr(++body, trailer); if (trail != null) { *trail = '\0'; } else { pr...
...d only and we have authenticated to it * open input file, read in header, get iv and cka_ids of two keys from it * find those keys in the db token * open output file * loop until eof(input): * read a buffer of ciphertext from input file * save last block of ciphertext * decrypt ciphertext buffer using cbc and iv * compute and check mac, then
remove mac from plaintext * replace iv with saved last block of ciphertext * write the plain text to output file * close files * report success */ secstatus rv; secitem ivitem; secitem enckeyitem; secitem mackeyitem; secitem cipheritem; secitem macitem; secitem ...
... pr_fprintf(pr_stderr, "mac has data has 0 length\n"); /*rv = secfailure; goto cleanup;*/ } rv = readfromheaderfile(headerfilename, pad, &paditem, pr_true); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not retrieve pad detail from header file\n"); goto cleanup; } if (rv == secsuccess) { /* decrypt and
remove mac */ rv = decryptandverifymac(outfilename, encryptedfilename, &cipheritem, &macitem, enckey, mackey, &ivitem, &paditem); if (rv != secsuccess) { pr_fprintf(pr_stderr, "failed while decrypting and removing mac\n"); } } cleanup: if (slot) { pk11_freeslot(slot); } if (enckey) { pk11_freesymkey(enckey); } i...
EncDecMAC using token object - sample 3
(trailer, iv_trailer); break; case mac: strcpy(header, mac_header); strcpy(trailer, mac_trailer); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } rv = filetoitem(&filedata, file); nonbody = (char *)filedata.data; if (!nonbody) { pr_fprintf(pr_stderr, "unable to read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and
remove them */ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe this is a mac file */ if (body) trail = strstr(++body, trailer); if (trail != null) { *trail = '\0'; } else { pr_fprintf(pr_stderr, "input has header but no trailer\n"); port_free(filedata.data); return secfailure; } } e...
...wdata *pwdata, prbool ascii) { /* * the db is open read only and we have authenticated to it * open input file, read in header, get iv and cka_ids of two keys from it * find those keys in the db token * open output file * loop until eof(input): * read a buffer of ciphertext from input file, * save last block of ciphertext * decrypt ciphertext buffer using cbc and iv, * compute and check mac, then
remove mac from plaintext * replace iv with saved last block of ciphertext * write the plain text to output file * close files * report success */ secstatus rv; secitem ivitem; secitem enckeyitem; secitem mackeyitem; secitem cipheritem; secitem macitem; secitem paditem; pk11symkey *enckey = null; pk11symkey *mackey = null; /* open intermediate file, read in header, get iv and cka_ids of two keys * from ...
..._stderr, "mac has null data\n"); rv = secfailure; goto cleanup; } if (macitem.len == 0) { pr_fprintf(pr_stderr, "mac has data has 0 length\n"); /*rv = secfailure; goto cleanup;*/ } rv = readfromheaderfile(headerfilename, pad, &paditem, pr_true); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not retrieve pad detail from header file\n"); goto cleanup; } if (rv == secsuccess) { /* decrypt and
remove mac */ rv = decryptandverifymac(outfilename, encryptedfilename, &cipheritem, &macitem, enckey, mackey, &ivitem, &paditem); if (rv != secsuccess) { pr_fprintf(pr_stderr, "failed while decrypting and removing mac\n"); } } cleanup: if (slot) { pk11_freeslot(slot); } if (enckey) { pk11_freesymkey(enckey); } if (mackey) { pk11_freesymkey(mackey); } return rv; } /* * encryptfile */ secstatus encryptfil...
sslfnc.html
plication attempts to set or set the policy or preference for one of the old fips cipher suite numbers, the library recognizes the old number and sets or gets the value for the new cipher suite number instead. in this release, the three ssl_fortezza_ cipher suites cannot be enabled unless there is a pkcs #11 module available with a fortezza-enabled token. the ssl_fortezza_ cipher suites will be
removed in nss 3.11. ssl_cipherprefgetdefault gets the current default preference setting for a specified ssl2 or ssl3 cipher suite. syntax #include "ssl.h" secstatus ssl_cipherprefsetdefault(print32 cipher, prbool *enabled); parameters this function has the parameters listed below. cipher the cipher suite whose default preference setting you want to ge...
...already turned on for a particular socket, the function returns with the error code set to sec_error_invalid_args. likewise, using ssl_enabledefault to turn on the global default for one of these when the global default for the other one is already turned for a particular socket generates the same error. however, there is no good reason for these to be mutually exclusive. this restirction will be
removed in future releases. if a socket that is already connected gets imported into ssl after it has been connected (that is, after pr_accept or pr_connect has returned), then no implicit ssl handshake configuration as a client or server will have been done by pr_connect or pr_accept on that socket. in this case, a call to ssl_resethandshake is required to explicitly configure the socket to handshake...
...e used to pass state information. can be null. see also ssl communication functions most communication functions are described in the nspr reference. for a complete list of communication functions used by ssl-enabled applications, see communication. ssl_invalidatesession ssl_datapending ssl_securitystatus ssl_getsessionid ssl_setsockpeerid ssl_invalidatesession
removes the current session on a particular ssl socket from the session cache. syntax #include "ssl.h" int ssl_invalidatesession(prfiledesc *fd); parameter this function has the following parameter: fd a pointer to the file descriptor for the ssl socket. returns the function returns one of these values: if successful, zero. if unsuccessfu...
Small Footprint
171,708 bytes of all uncompressed rhino classes with debug information included. with various changes js.jar size can be reduced to 204,689 bytes corresponding to 424,774 bytes of uncompressed classes. tools most embeddings won't need any of the classes in org.mozilla.javascript.tools or any of its sub-packages. optimizer it is possible to run rhino with interpreter mode only, allowing you to
remove code for classfile generation that include all the classes from <tt>org.mozilla.javascript.optimizer</tt> package. javaadapter implementing the javaadapter functionality requires the ability to generate classes on the fly. removing org.mozilla.javascript.javaadapter will disable this functionality, but rhino will otherwise run correctly. class generation library if you do not include optimize...
...mplementing the javaadapter functionality requires the ability to generate classes on the fly. removing org.mozilla.javascript.javaadapter will disable this functionality, but rhino will otherwise run correctly. class generation library if you do not include optimizer or javaadapter, nor do you use policysecuritycontroller then you do not need rhino library for class file generation and you can
remove all the classes from in org.mozilla.classfile package. regular expressions the package org.mozilla.javascript.regexp can be
removed. rhino will continue to run, although it will not be able to execute any regular expression matches. this change saves 47,984 bytes of class files. debug information debug information in rhino classes consumes about 25% of code size and if you can live without th...
... smalljs.jar ant build script in rhino supports smalljar target that will generate smalljs.jar that does not include tools, optimizer, javaadapter and class generation library, regular expressions, e4x implementataion and deprecated files. ...
JS::Add*Root
try to avoid using it. this article covers features introduced in spidermonkey 31 register a variable as a member of the garbage collector's root set, to protect anything the root points at from garbage collection. these functions are obsoleted, use js::persistentrooted instead. ...
...llected. vp/rp is the address of a c/c++ variable (or field, or array element) of type js::value, jsstring *, jsobject *, or jsscript *. this variable must already be initialized. (for example, it must not be an uninitialized local variable. that could cause sporadic crashes during garbage collection, which can be hard to debug.) the variable must remain in memory until the balancing call to js::
remove*root. note that this means that if the root is meant to live past the end of a function, the address of a local (stack-based) variable may not be used for vp/rp. if js::add*root succeeds, then as long as this variable points to a javascript value or pointer to gc-thing, that value/gc-thing is protected from garbage collection. if the variable points to an object, then any memory reachable from it...
...roperties is automatically protected from garbage collection, too. an entry for rp is added to the garbage collector's root set for the jsruntime associated with cx (or, in js::addnamedvaluerootrt, the runtime rt). the name parameter, if present and non-null, is stored in the jsruntime's root table entry along with rp. the name string's lifetime must last at least until the balancing call to js::
remove*root. typically name is a static string constant, identifying the source location of the call to js::addnamed*root for debugging purposes. needs the example for typical usage of the name parameter. all the js::add*root methods are idempotent: multiple calls for the same address will add only one root. correspondingly, only a single js::
remove*root is required to unroot the location. on success...
JS_Add*Root
try to avoid using it. register a variable as a member of the garbage collector's root set, to protect anything the root points at from garbage collection. these functions are obsoleted, use js::persistentrooted instead. ...
...turely collected. vp/spp/opp/rp is the address of a c/c++ variable (or field, or array element) of type jsstring *, jsobject *, or jsval. this variable must already be initialized. (for example, it must not be an uninitialized local variable. that could cause sporadic crashes during garbage collection, which can be hard to debug.) the variable must remain in memory until the balancing call to js_
removeroot. note that this means that if the root is meant to live past the end of a function, the address of a local (stack-based) variable may not be used for rp. if js_add*root succeeds, then as long as this variable points to a javascript value or pointer to gc-thing, that value/gc-thing is protected from garbage collection. if the variable points to an object, then any memory reachable from its pro...
...ariable, the location of the pointer itself, and not an object or string. an entry for rp is added to the garbage collector's root set for the jsruntime associated with cx (or, in js_addnamedrootrt, the runtime rt). the name parameter, if present and non-null, is stored in the jsruntime's root table entry along with rp. the name string's lifetime must last at least until the balancing call to js_
removeroot. typically name is a static string constant, identifying the source location of the call to js_addnamedroot for debugging purposes. js_dumpnamedroots can be used to access this information from a debugger. all the js_add*root methods are idempotent: multiple calls for the same address will add only one root. correspondingly, only a single js_
removeroot is required to unroot the location. o...
JS_DeleteElement
syntax bool js_deleteelement(jscontext *cx, js::handleobject obj, uint32_t index); // added in spidermonkey 45 bool js_deleteelement(jscontext *cx, js::handleobject obj, uint32_t index, js::objectopresult &result); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj js::handleobject object from which to delete an element. index uint32_t index number of the element to delete. result js::objectopresult & (out parameter) receives the result of the operation. ...
... runtime information. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj js::handleobject object from which to delete an element. index uint32_t index number of the element to delete. result js::objectopresult & (out parameter) receives the result of the operation. description js_deleteelement
removes a specified element or numeric property, index, from an object, obj. if an object references an element belonging to a prototype, the element reference is
removed from the object, but the prototype's element is not deleted. if deletion is successful, js_deleteelement returns true. otherwise it returns false. for javascript 1.2 and earlier, if failure occurs because you attempt to delete a perma...
...e's element is not deleted. if deletion is successful, js_deleteelement returns true. otherwise it returns false. for javascript 1.2 and earlier, if failure occurs because you attempt to delete a permanent or read-only element, js_deleteelement reports the error before returning false. for javascript 1.3 and later, the attempt is silently ignored. to truncate an array, use js_setarraylength. to
remove all elements and properties from an object, call js_clearscope. see also mxr id search for js_deleteelement bug 1113369 -- added result parameter ...
JS_GetStringChars
try to avoid using it. retrieve a pointer to the 16-bit values that make up a given string. syntax jschar * js_getstringchars(jsstring *str); // obsolete since jsapi 1.8.5 const jschar * js_getstringcharsz(jscontext *cx, jsstring *str); // added in spidermonkey 1.8.2, obsolete since jsapi 33 name type description cx jscontext * (in js_getstringcharsz only) a context. str jsstring * the string to obtain characters from. ...
...ts that aren't properly paired. it may also contain zeroes. ...
...so contain zeroes. ...
JS_MapGCRoots
obsolete since jsapi 19this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. perform some action for each object in a jsruntime's gc root set. syntax uint32 js_mapgcroots(jsruntime *rt, jsgcrootmapfun map, void *data); callback syntax #define js_map_gcroot_next 0 /* continue mapping entries */ #define js_map_gcroot_stop 1 /* stop mapping entries */ #define js_map_gcroot_
remove 2 /*
remove and free the current entry */ typedef int (*jsgcrootmapfun)(void *rp, const char *name, void *data); description call js_mapgcroots to map the gc's roots table using map(rp, name, data). the root is pointed at by rp; if the root is unnamed, name is null; data is sup...
...to stop enumeration, return js_map_gcroot_stop. to continue mapping, return js_map_gcroot_next. these constants are flags; you can or them together. this function acquires and releases rt's gc lock around the mapping of the roots table, so the map function should run to completion in as few cycles as possible. ...
...to stop enumeration, return js_map_gcroot_stop. ...
SpiderMonkey 31
tion. the js::handle<js::value> and js::mutablehandle<js::value> classes have been specialized to implement the same interface as js::value, for simplicity and to ease migration pain. changes to introduce handles to the jsapi are not individually documented, because of the breadth of the changes involved. the following features in earlier versions of spidermonkey have been dropped. xxx list
removed features here spidermonkey 31 is not binary-compatible with previous releases, nor is it source-code compatible. many jsapi types, functions, and callback signatures have changed, though most functions that have changed still have the same names and implement essentially unchanged functionality. applications will need significant changes, but most of those changes will be detected by the c/c++...
...ard job. here is a list of the most significant changes: many of the garbage collector changes require type signature changes to jsapi methods: specifically introducing js::rooted, js::handle, and js::mutablehandle types. these types, with the appropriate parametrizations, can roughly be substituted for plain types of gc things (values, string/object pointers, etc.). the jsbool type has been
removed, along with the corresponding js_true and js_false constants. they have been replaced by bool, true, and false respectively. many jsclass and js::class instances are now explicitly const, and several apis have been updated to use const jsclass * and const js::class * pointers. all references to shortid/tinyid have been
removed. that includes the apis js_definepropertywithtinyid and js_defineu...
... all the other existing spidermonkey apis as usual. once all jsapi operation has completed, the corresponding js_shutdown method uninitializes spidermonkey, cleaning up memory and allocations performed by js_init. it is not required to call js_shutdown at present, but it is strongly recommended: calling it may be required in a future spidermonkey release. javascript shell changes detail added/
removed methods here... on posix platforms, building a threadsafe shell no longer requires nspr. embedders still need to build with nspr, as the new wrappers require using spidermonkey internal functions which are not exposed to the public api. known issues detail any known issues here... future direction ...insert details on future plans... spidermonkey embedders should be aware that mozilla h...
Shell global objects
ble only if js_gc_zeal is defined gczeal(level, [n]) specifies how zealous the garbage collector should be. some of these modes can be set simultaneously, by passing multiple level options, e.g. "2;4" will activate both modes 2 and 4. modes can be specified by name or number. ...
... is given, schedule a gc after num allocations. if obj is given, schedule a gc of obj's zone. returns the number of allocations before the next trigger. selectforgc(obj1, obj2, ...) schedule the given objects to be marked in the next gc slice. verifyprebarriers() start or end a run of the pre-write barrier verifier. verifypostbarriers() does nothing (the post-write barrier verifier has been
remove). gcstate() report the global gc state. deterministicgc(true|false) if true, only allow determinstic gcs to run. functions available only if js_trace_logging is defined starttracelogger() start logging the mainthread. note: tracelogging starts automatically. disable it by setting environment variable tloptions=disablemainthread stoptracelogger() stop logging the mainthread. function...
...ter count js_malloc memory allocations, fail every following allocation (return nullptr). the optional thread type limits the effect to the specified type of helper thread. oomatallocation(count [,threadtype]) after count js_malloc memory allocations, fail the next allocation (return nullptr). the optional thread type limits the effect to the specified type of helper thread. resetoomfailure()
remove the allocation failure scheduled by either oomafterallocations() or oomatallocation() and return whether any allocation had been caused to fail. oomtest(function, [expectexceptiononfailure = true]) test that the passed function behaves correctly under oom conditions by repeatedly executing it and simulating allocation failure at successive allocations until the function completes without seeing...
Animated PNG graphics
action with other chunks in section 3.2. changed 'fram' chunk offsets and delay into signed integers. from 0.2 changed 'fram' chunk to 'afra' to avoid conflict with mng 'fram' chunk. changed format: instead of sequences of ihdr..idat..iend, frames other than frame 0 are stored in 'afra' chunks. added start_frame to 'anim' to indicate which frame the animation should start on. ...
...idth,height) must lie completely within the parent png canvas fixed dispose_op description (after, not before) changed dispose_op to render_op; added disposal description; added blend flag changed delay_time to a delay numerator and denominator, for specifying delays that don't into integer numbers of milliseconds. added note to clarify that palette animation is not supported.
removed start_frame from actl; require fctl for frame 0; added skip_frame fctl flag. from 0.4 reintroduced num_frames into actl moved sequence_number from adat into fctl changed contents of adat to fctl+idats+fend added clarifications on what's allowed and what isn't renamed actl to actl, fctl to fctl, adat to fdat and fend to fend to comply with the png spec chunk naming requiremen...
...nd what isn't renamed actl to actl, fctl to fctl, adat to fdat and fend to fend to comply with the png spec chunk naming requirements from 0.5 added the ihdr and plte crcs to the actl chunk the actl fctl and adat are now copy safe, renamed them to actl, fctl and adat from 0.6 the fdat chunk is no longer a container for other chunks, but rather a replacement for an idat chunk
removed the fend chunk added a sequence number field to fdat reintroduced the width and height fields in fctl from 0.7
removed hidden flag, instead only the first frame can be hidden and it is signaled with a missing fctl idat, fctl and fdat are no longer required to have no other chunks in between them from 0.8
removed crcs for ihdr and plte from actl the actl fctl and adat ar...
Manipulating bookmarks using Places
nd bookmarks for a given uri), you can use the nsinavbookmarksservice.getfolderidforitem() method. ...
...use the nsinavbookmarksservice.addobserver() and nsinavbookmarksservice.
removeobserver() methods. note that this example takes advantage of xpcomutils to generate the nsisupports.queryinterface() method. ...
...parent, aoldindex, anewparent, anewindex) {}, queryinterface: xpcomutils.generateqi([components.interfaces.nsinavbookmarkobserver]) }; // an extension var myextension = { // this function is called when my add-on is loaded onload: function() { bmsvc.addobserver(myext_bookmarklistener, false); }, // this function is called when my add-on is unloaded onunload: function() { bmsvc.
removeobserver(myext_bookmarklistener); }, dosomething: function() { alert("did something."); } }; see also nsinavbookmarksservice nsinavbookmarkobserver places using xpcom without chrome - bookmark observer ...
Using the Places history service
y nsiglobalhistory2.setpagetitle: called by gecko when the <title> element is encountered. nsiglobalhistory3.setgeckoflags: called by gecko to store rendering information about a page. currently, this is used to store whether there was a scrollbar, which allows more efficient layout if the page is revisited. however, this is not yet supported by the navhistory implementation. nsibrowserhistory.
removepage:
removes a given uri and all of its visits from the history database. this is called by the ui when the user deletes a history entry. nsibrowserhistory.
removepagesfromhost: called from the ui when the user deletes a group associated with a host or domain. this function allows you to delete pages from a specific host, or pages from all hosts in a given domain. nsibrowserhistory.hidepage: hid...
...: called by the ui (implemented, but not yet called, see bug 409301) when the user selects a bookmark. this will cause the transition type of the next visit of the url to be marked as "bookmark." nsinavhistoryservice.setpageusertitle: sets the user-defined title for the page, which will override the actual page title when displayed in the ui. this is used for bookmark titles.this function may be
removed if the bookmark service is changed. nsinavhistoryservice.setpagedetails: used to set all of the global bits associated with a url. it is designed for synchronizing or backup services. basic querying of the history system nsiglobalhistory2.isvisited: called by gecko when rendering links. when isvisited returns true, the link gets the "visited" style. otherwise, the link is colored as unvisited...
...ri. you should not count on this format, always use this function instead of hard-coding your own query strings. nsinavhistoryservice.querystringtoqueries: converts a serialized query ("place:" uri) back to the actual query objects and options. miscellaneous nsinavhistoryservice.addobserver: adds a history observer, which will be notified of changes to the history system. nsinavhistoryservice.
removeobserver:
removes a previously added observer. nsinavhistoryservice.beginupdatebatch: call when you will be making many small changes to the history system. observers generally stop updating ui when they are inside a batch, potentially making the operations faster. if you are just doing a few changes, it is probably better to not use a batch since incremental updates are not done. be sure to call...
XPCOM hashtable guide
iled xpcom hashtable guide. everything you need to know is probably on this page. also note that mfbt/hashtable.h now exists. it is a lot faster than the xpcom hashtables due to more inlining and templating, and the api is arguably better. what is a hashtable? a hashtable is a data construct that stores a set of items. each item has a key that identifies the item. items are found, added, and
removed from the hashtable by using the key. hashtables may seem like arrays, but there are important differences: array hashtable keys: integer: arrays are always keyed on integers, and must be contiguous. any type: almost any datatype can be used as key, including strings, integers, xpcom interface pointers, iids, and almost anything else. keys can be disjunct (i.e. yo...
... hash to find the location in the hashtable. good hashtable implementations will automatically resize the hashtable in memory if extra space is needed, or if too much space has been allocated. when should i use a hashtable? hashtables are useful for sets of data that need swift random access; with non-integral keys or non-contiguous integral keys; or where items will be frequently added or
removed. hashtables should not be used for sets that need to be sorted; very small datasets (less than 12-16 items); data that does not need random access. in these situations, an array, a linked-list, or various tree data structures are more efficient. which hashtable should i use? the appropriate hashtable class to use depends solely on the data type. the template specialization to use dep...
...ps nsisupports pointers to reference counted cacheentrys - nsrefptrhashtable<nsisupportshashkey, cacheentry> a hashtable that maps jscontext pointers to a contextinfo struct - nsclasshashtable<nsptrhashkey<jscontext>, contextinfo> a hashset of strings - nsthashtable<nsstringhashkey> hashtable api the hashtable classes all expose the same basic api. there are three key methods, get, put, and
remove, which retrieve entries from the hashtable, write entries into the hashtable, and
remove entries from the hashtable respectively. the hashtables that hold references to pointers (nsrefptrhashtable and nsinterfacehashtable) also have getweak methods that return non-addrefed pointers. all of these hashtable classes can be iterated over via the iterator class and cleared via the clear method. ...
Components.utils
f various useful xpconnect features. its interface is defined at js/xpconnect/idl/xpccomponents.idl. the object currently has the following members: editors! please keep this list in sync with the components object page methods method description cloneinto() create a structured clone of an object in a different javascript context. createarrayin()
removed in gecko 31 returns an array created in specified compartment. createobjectin() creates a new object, created in the scope of the specified object's compartment. dispatch() dispatches a runnable to the current/main thread. if the parameter is passed, the runnable will be dispatch in the compartment of the parameter, which affects which error reporter gets...
...ecified object's compartment. dispatch() dispatches a runnable to the current/main thread. if the parameter is passed, the runnable will be dispatch in the compartment of the parameter, which affects which error reporter gets called. evalinsandbox() runs javascript code in a sandbox, usually used to run code with restricted privileges. evalinwindow()
removed in gecko 34. evaluate javascript code in a less-privileged javascript context. exportfunction() export a javascript function from a more-privileged to a less-privileged scope, allowing it to be called in the less-privileged scope. forcegc() forces a garbage collection cycle. forcecc() forces a cycle collection cycle. forceshrinkinggc...
...ck so you can be notified once the garbage collection cycle has been performed. setgczeal() sets the level of garbage collection level for full garbage collection. see js_setgczeal for details; this method calls through to that with the specified value as the zeal value. unwaivexrays() undoes waivexrays(): reapplies the xray filtering protection. waivexrays()
removes the filtering provided by an xray. properties property type description sandbox nsixpccomponents_utils_sandbox creates sandbox objects for use with evalinsandbox(). ion boolean read only. strict boolean strict mode is enabled. this reflects the value of the javascript environment's option by the same name. read only. ...
mozIStorageConnection
); mozistoragependingstatement executeasync([array, size_is(anumstatements)] in mozistoragebasestatement astatements, in unsigned long anumstatements, [optional] in mozistoragestatementcallback acallback ); void executesimplesql(in autf8string asqlstatement); boolean indexexists(in autf8string aindexname); void preload(); obsolete since gecko 1.9 void
removefunction(in autf8string afunctionname); mozistorageprogresshandler
removeprogresshandler(); void rollbacktransaction(); void setgrowthincrement(in print32 aincrement, in autf8string adatabasename); mozistorageprogresshandler setprogresshandler(in print32 agranularity, in mozistorageprogresshandler ahandler); boolean tableexists(in autf8string atable...
...saction open on the connection, or have a transaction open on another connection that shares the same pager cache. this cached data will go away when the transaction is closed. this preload operation can dramatically speed up read operations because the data is loaded as one large block. normally, pages are read in on demand, which can cause many disk seeks. void preload(); parameters none. ...
.... this preload operation can dramatically speed up read operations because the data is loaded as one large block. normally, pages are read in on demand, which can cause many disk seeks. void preload(); parameters none.
removefunction() deletes a custom sql function that was created with either mozistorageconnection.createfunction() or mozistorageconnection.createaggregatefunction(). void
removefunction( in autf8string afunctionname ); parameters afunctionname the name of the function to
remove.
removeprogresshandler()
removes the progress handler that was registered with mozistorageconnection.registerprogresshandler(). mozistorageprogresshandler
removeprogresshandler(); parameters none. return value returns the previous registered handler. rollbacktransaction() thi...
nsIAccessibleSelectable
cessibility module and in-process accessibility clients for dealing with getting and changing the selection of accessible nodes. ...
...if the specified object is already selected, then it does nothing. ...
...g index ); parameters index the zero-based accessible child index. return value true if the child is selected, false if not. refselection() returns a reference to the accessible object representing the specified selected child of the object. nsiaccessible refselection( in long index ); parameters index zero-based selected accessible child index. return value the selected accessible child.
removechildfromselection()
removes the specified child of the object from the object's selection. if the specified object was not selected, then it does nothing. void
removechildfromselection( in long index ); parameters index zero-based accessible child index. exceptions thrown ns_error_failure if the specified object is not selectable. selectallselection() select all children. boolean selectall...
nsIAccessibleText
ng gettextatoffset(in long offset, in nsaccessibletextboundary boundarytype, out long startoffset, out long endoffset); nsipersistentproperties gettextattributes(in boolean includedefattrs, in long offset, out long rangestartoffset, out long rangeendoffset); astring gettextbeforeoffset(in long offset, in nsaccessibletextboundary boundarytype, out long startoffset, out long endoffset); void
removeselection(in long selectionnum); void scrollsubstringto(in long startindex, in long endindex, in unsigned long scrolltype); void scrollsubstringtopoint(in long startindex, in long endindex, in unsigned long coordinatetype, in long x, in long y); void setselectionbounds(in long selectionnum, in long startoffset, in long endoffset); attributes attribute type description caretoffset l...
...start 1 boundary_word_end 2 boundary_sentence_start 3 do not use in new code. boundary_sentence_end 4 do not use in new code. boundary_line_start 5 boundary_line_end 6 boundary_attribute_range 7 coordinate type constants obsolete since gecko 1.9 (firefox 3)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. constant value description coord_type_screen 0 coord_type_window 1 methods addselection() void addselection( in long startoffset, in long endoffset ); parameters startoffset endoffset getattributerange() obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) get the accessible and start/end o...
... return multibyte-encoded strings, since some locales can't be encoded using 16-bit chars. so this method might return utf-16 strings, or it could return "string" values which are utf-8. astring gettextbeforeoffset( in long offset, in nsaccessibletextboundary boundarytype, out long startoffset, out long endoffset ); parameters offset boundarytype startoffset endoffset return value
removeselection() void
removeselection( in long selectionnum ); parameters selectionnum scrollsubstringto() makes a specific part of string visible on screen. void scrollsubstringto( in long startindex, in long endindex, in unsigned long scrolltype ); parameters startindex 0-based character offset. endindex 0-based character offset - the offset of the character just past the last character...
nsIAnnotationObserver
toolkit/components/places/public/nsiannotationservice.idlscriptable please add a summary to this article. 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void onitemannotation
removed(in long long aitemid, in autf8string aname); void onitemannotationset(in long long aitemid, in autf8string aname); void onpageannotation
removed(in nsiuri auri, in autf8string aname); void onpageannotationset(in nsiuri apage, in autf8string aname); methods onitemannotation
removed() this method is called when an annotation is deleted for an item. if aname is empty, then all annotations for the given item have been deleted. this is not called when annotations are expired (normally happens when the applicatio...
...aname the annotation name. onitemannotationset() this method is called when an annotation value is set for an item. ...
... deleted. aname the annotation name. onitemannotationset() this method is called when an annotation value is set for an item. it could be a new annotation, or it could be a new value for an existing annotation. void onitemannotationset( in long long aitemid, in autf8string aname ); parameters aitemid the item on which the annotation is to be set. aname the annotation name. onpageannotation
removed() called when an annotation is deleted for a uri. if aname is empty, then all annotations for the given uri have been deleted. this is not called when annotations are expired (normally happens when the application exits). void onpageannotation
removed( in nsiuri auri, in autf8string aname ); parameters auri the uri whose annotation is to be deleted. aname the annotation name. onpageannotat...
nsIApplicationCache
3 / seamonkey 2.1) each application cache has a unique client id for use with nsicacheservice.opensession() method, to access the cache's entries. each entry in the cache can be marked with a set of types, specified in the constants section. all application caches with the same group id belong to a cache group. each group has one "active" cache that will service future loads. inactive caches are
removed from the cache when no longer referenced. method overview void activate(); void addnamespaces(in nsiarray namespaces); void discard(); void gatherentries(in pruint32 typebits, out unsigned long count, [array, size_is(count)] out string keys); nsiapplicationcachenamespace getmatchingnamespace(in acstring key); unsigned long gettypes(in acstring key); void initashandle(in acstring g...
...rom this cache. other caches from this cache group will be deactivated. void activate(); parameters none. addnamespaces() add a set of namespace entries to the application cache. void addnamespaces( in nsiarray namespaces ); parameters namespaces an nsiarray of nsiapplicationcachenamespace objects describing the namespaces to add to the cache. discard() discards this application cache. this
removes all resources it has cached. if this is the active application cache for the group, the group is
removed. void discard(); parameters none. gatherentries() returns a list of entries in the cache whose type matches one or more of the specified types. void gatherentries( in pruint32 typebits, out unsigned long count, [array, size_is(count)] out string keys ); parameters typebits a bit fiel...
... groupid, in acstring clientid ); parameters groupid missing description clientid missing description markentry() adds item types to a given entry. void markentry( in acstring key, in unsigned long typebits ); parameters key the key for the cache entry to which to add types. typebits a bit field indicating the types to add to the entry. see constants for a list of types. unmarkentry()
removes types from a given entry. if the resulting entry has no types left, the entry is
removed. void unmarkentry( in acstring key, in unsigned long typebits ); parameters key the key for the cache entry from which to
remove types. typebits a bit field indicating the types to
remove from the entry. see constants for a list of types. see also offline resources in firefox nsiapplicationcachenames...
nsIDOMElement
ring namespaceuri, in domstring localname); domstring getattributens(in domstring namespaceuri, in domstring localname); nsidomnodelist getelementsbytagname(in domstring name); nsidomnodelist getelementsbytagnamens(in domstring namespaceuri, in domstring localname); boolean hasattribute(in domstring name); boolean hasattributens(in domstring namespaceuri, in domstring localname); void
removeattribute(in domstring name) nsidomattr
removeattributenode(in nsidomattr oldattr) void
removeattributens(in domstring namespaceuri, in domstring localname) void setattribute(in domstring name, in domstring value) nsidomattr setattributenode(in nsidomattr newattr) nsidomattr setattributenodens(in nsidomattr newattr) void setattributens(in domstring namespaceuri, in domstring qualifiedn...
...tring name ); parameters name attribute name return value a boolean, true if the given attribute is set. hasattributens() check if the element for a given namespace have this attribute set. boolean hasattributens( in domstring namespaceuri, in domstring localname ); parameters namespaceuri namespace uri localname attribute name return value a boolean, true if the given attribute is set.
removeattribute()
remove an attribute. void
removeattribute( in domstring name ); parameters name attribute name
removeattributenode()
remove an attribute, giving the attribute node. nsidomattr
removeattributenode( in nsidomattr oldattr ); parameters oldattr attribute node to
remove return value a nsidomattr corresponding to the
removed attribute node.
removeattributens()
remove an attribute. ...
...void setattribute( in domstring name, in domstring value ); parameters name attribute name value attribute new value setattributenode() set an attribute, giving the attribute node. ...
nsIDOMNode
ree. inherits from: nsisupports last changed in gecko 0.9.6 method overview nsidomnode appendchild(in nsidomnode newchild) nsidomnode clonenode(in boolean deep); boolean hasattributes(); boolean haschildnodes(); nsidomnode insertbefore(in nsidomnode newchild, in nsidomnode refchild) boolean issupported(in domstring feature, in domstring version); void normalize(); nsidomnode
removechild(in nsidomnode oldchild) nsidomnode replacechild(in nsidomnode newchild, in nsidomnode oldchild) attributes attribute type description attributes nsidomnamednodemap read only. childnodes nsidomnodelist read only. firstchild nsidomnode read only. lastchild nsidomnode read only. localname domstring read only. namespaceuri domstring read only. nextsibling nsidomnode read on...
...alue haschildnodes() boolean haschildnodes(); parameters none. ...
...lean haschildnodes(); parameters none. ...
nsIDOMStorage
erested party in the same browsing context. 1.0 66 introduced gecko 1.8.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) a dom window's session storage object can be retrieved from the window's sessionstorage attribute. a storage object stores an arbitrary set of key-value pairs, which may be retrieved, modified and
removed as needed. a key may only exist once within a storage object, and only one value may be associated with a particular key. keys are stored in a particular order with the condition that this order not change by merely changing the value associated with a key, but the order may change when a key is added or
removed. method overview void clear(); domstring getitem(in domstring key); domstrin...
... within a storage object, and only one value may be associated with a particular key. keys are stored in a particular order with the condition that this order not change by merely changing the value associated with a key, but the order may change when a key is added or
removed. method overview void clear(); domstring getitem(in domstring key); domstring key(in unsigned long index); void
removeitem(in domstring key); void setitem(in domstring key, in domstring data); attributes attribute type description length unsigned long the number of keys stored in the session store. read only. methods clear() clear the content of this storage bound to a domain or an origin. void clear(); parameters none. getitem() returns from session storage the data corresponding to the specified k...
...the specified key, or null if no data exists for the given key. key() returns the key for the item stored at the specified index in the data store. domstring key( in unsigned long index ); parameters index the index for which the corresponding key should be returned. return value a string containing the requested key. exceptions thrown index_size_err there is no key at the specified index.
removeitem() given a key,
removes the corresponding entry from the session store. void
removeitem( in domstring key ); parameters key the key for which data should be
removed from storage. setitem() sets the value corresponding to a given key. if the key does not already exist, a new key is added, associated with the specified value. if the key already exists, the existing value is replaced with th...
nsIEditorSpellCheck
st([array, size_is(count)] out wstring dictionarylist, out pruint32 count); wstring getnextmisspelledword(); void getpersonaldictionary(); wstring getpersonaldictionaryword(); wstring getsuggestedword(); void ignorewordalloccurrences(in wstring word); void initspellchecker(in nsieditor editor, in boolean enableselectionchecking); void
removewordfromdictionary(in wstring word); void replaceword(in wstring misspelledword, in wstring replaceword, in boolean alloccurrences); void savedefaultdictionary(); obsolete since gecko 9.0 void setcurrentdictionary(in astring dictionary); void setfilter(in nsitextservicesfilter filter); void uninitspellchecker(); void updatecurrentdictionary();...
... editor the nsieditor on which to enable spell checking. enableselectionchecking if true, the spell checker is initialized only for checking the current selection; otherwise, it's initialized for checking the entire document. this affects the behavior of getnextmisspelledword()). for spell checking clients with no modal ui (such as inline spell checkers), this flag is not relevant.
removewordfromdictionary()
removes a word from the current personal dictionary. void
removewordfromdictionary( in wstring word ); parameters word the word to
remove from the current personal dictionary. replaceword() call this function to modally replace one (or all) occurrences of a word with another word. void replaceword( in wstring misspelledword, in wstring replaceword, in boolea...
... with which to replace the misspelledword. alloccurrences if true, all occurrences of misspelledword are replaced with replaceword. if false, only the first occurrence is replaced. savedefaultdictionary() obsolete since gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. saves the currently selected dictionary as the default. the function uninitspellchecker() will also do this, but that function may not be called in some situations. this function allows the caller to force the default immediately. note: this method was
removed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6). since spelling dictionaries can now b...
nsIFocusManager
obsolete since gecko 2.0 void firedelayedevents(in nsidocument adocument); native code only! void focusplugin(in nsicontent aplugin); native code only! nsidomelement getfocusedelementforwindow(in nsidomwindow awindow, in prbool adeep, out nsidomwindow afocusedwindow); pruint32 getlastfocusme...
...links as the caret moves over them in caret browsing mode. methods clearfocus() clears the focused element within awindow. if the current focusedwindow is a descendant of awindow, sets the current focusedwindow to awindow. void clearfocus( in nsidomwindow awindow ); parameters awindow exceptions thrown ns_error_invalid_arg if awindow is null. ...
...he current focusedwindow to awindow. void clearfocus( in nsidomwindow awindow ); parameters awindow exceptions thrown ns_error_invalid_arg if awindow is null. native code only!content
removed obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. called when content has been
removed. void content
removed( in nsidocument adocument, in nsicontent aelement ); parameters adocument aelement native code only!firedelayedevents fire any events that have been delayed due to synchronized actions. void firedelayedevents( in nsidocument adocument ); parameters adocument nat...
nsIInstallLocation
this is different from restricted because it's not whether or not the location *might* be restricted, it's whether or not it actually *is* restricted right now. rea...
...turn value a file object at the requested location. the file does not necessarily have to exist. getitemlocation() gets the directory that contains an item. nsifile getitemlocation( in astring id ); parameters id the guid of the item. return value the location of the item. getstagefile() returns the most recently staged package (for example the last xpi or jar in a directory) for an item and
removes items that do not qualify. nsifile getstagefile( in astring id ); parameters id the id of the staged package. return value an nsifile if the package exists otherwise null. itemismanagedindependently() determines whether or not an item's resources are managed by the extension system or by some other user or process. for example, items linked to by text links are managed by the user, and item...
...r user or process. for example, items linked to by text links are managed by the user, and items linked to from registry install locations are usually managed by other applications or installers. boolean itemismanagedindependently( in astring id ); parameters id the guid of the item. return value true if the item's resources are managed independently of the extension system, false otherwise.
removefile()
removes a file from the stage. this cleans up the stage if there is nothing else left after the
remove operation. void
removefile( in nsifile file ); parameters file the file to
remove. stagefile() stages the specified file by copying it to some location from where it can be retrieved later to complete installation. nsifile stagefile( in nsifile file, in astring id ); parameters ...
nsIMicrosummaryService
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface provides methods for managing installed microsummaries, and the bookmarks they apply to. ...
...callable by content via nsisidebar.addmicrosummarygenerator(). void addgenerator( in nsiuri generatoruri ); parameters generatoruri the uri of the resource p...
.... if its value is null, then it's an async refresh, and the caller should register itself as an nsimicrosummaryobserver via nsimicrosummary.addobserver() to find out when the refresh completes. nsimicrosummary refreshmicrosummary( in long long bookmarkid ); parameters bookmarkid the bookmark whose microsummary is being refreshed. return value returns the microsummary being refreshed.
removemicrosummary()
remove the current microsummary for the given bookmark. void
removemicrosummary( in long long bookmarkid ); parameters bookmarkid the bookmark for which to
remove the current microsummary. setmicrosummary() set the current microsummary for the given bookmark. void setmicrosummary( in long long bookmarkid, in nsimicrosummary microsummary ); parameters bookmarki...
nsIMsgCustomColumnHandler
astring getsortstringf...
... astring getsortstringforrow(in nsimsgdbhdr ahdr); pa...
... astring getsortstringforrow(in nsimsgdbhdr ahdr); parameters ahdr the message's nsimsgdbhd...
nsIMsgDBView
constants are defined in nsmsgviewtype. viewflags nsmsgviewflagstypevalue constants are defined in nsmsgviewflagstype. sorttype nsmsgview...
...ed when the message pane is collapsed. suppresscommandupdating boolean suppress command updating. used during folder loading. db nsimsgdatabase readonly: the current database of messages. supportsthreading boolean readonly: does the current database support threading? searchsession nsimsgsearchsession the current search session.
removerowonmoveordelete boolean readonly: usinglines boolean readonly: use lines for size. if false kb are used. methods open() opens a folder in the database. void open(in nsimsgfolder folder, in nsmsgviewsorttypevalue sorttype, in nsmsgviewsortordervalue sortorder, in nsmsgviewflagstypevalue viewflags, out long count); param...
...selection. if false then replace current selection. addcolumnhandler() attaches a nsimsgcustomcolumnhandler to a specific column (can be a new column or a built in).+ void addcolumnhandler(in astring acolumn, in nsimsgcustomcolumnhandler ahandler); parameters acolumn the name of the column to add the handler for. ahandler the nsimsgcustomcolumnhandler to add.
removecolumnhandler()
removes a nsimsgcustomcolumnhandler leaving the column to be handled by the system void
removecolumnhandler(in astring acolumn); parameters acolumn the name of the column to
remove the handler from. getcolumnhandler() returns the nsimsgcustomcolumnhandler attached to a specific column, if any. nsimsgcustomcolumnhandler getcolumnhandler(in astring acolumn); parameter...
nsINavHistoryService
, size_is(aresultcount)] out nsinavhistoryquery aqueries, out unsigned long aresultcount, out nsinavhistoryqueryoptions options); autf8string queriestoquerystring([array, size_is(aquerycount)] in nsinavhistoryquery aqueries, in unsigned long aquerycount, in nsinavhistoryqueryoptions options); void addobserver(in nsinavhistoryobserver observer, in boolean ownsweak); void
removeobserver(in nsinavhistoryobserver observer); void runinbatchmode(in nsinavhistorybatchcallback acallback, in nsisupports aclosure); void importhistory(in nsifile file); astring getcharsetforuri(in nsiuri auri); astring setcharsetforuri(in nsiuri auri, in astring acharset); attributes attribute type description hashistoryentries ...
...ld go in the history (that is for annotations). boolean canadduri( in nsiuri auri ); parameters auri the uri that needs to be added to the history system. return value returns true if this uri would be added to the history, otherwise returns false. addvisit() obsolete since gecko 22.0 (firefox 22.0 / thunderbird 22.0 / seamonkey 2.19) note: this method was
removed in gecko 22.0. you should use the new async api moziasynchistory.updateplaces() instead. see this code for how a function to add visits and handle errors using the new api could look like. this method adds a visit for a specific page. this will probably not be commonly used other than for backup/restore type operations. if the uri does not have an entry in the history database already, one wil...
...history service will keep an owning reference to the observer. if ownsweak is true, then aobserver must implement nsisupportsweakreference, and the history service will keep a weak reference to the observer. void addobserver( in nsinavhistoryobserver observer, in boolean ownsweak ); parameters observer the history observer to be added. ownsweak the owning reference state (boolean).
removeobserver() this method
removes a history observer. void
removeobserver( in nsinavhistoryobserver observer ); parameters observer the history observer to be
removed. runinbatchmode() this method runs the passed callback in batch mode. use this when a lot of things are about to change. calls can be nested, observers will only be notified when all batches begin/end. void runinbatchmode(...
nsIObserver
nsisupports last changed in gecko 0.9.6 method overview void observe(in nsisupports asubject, in string atopic, in wstring adata); methods observe() this method will be called when there is a notification for the topic that the observer has been registered for. if you expect multiple topics/subjects, the implementor is responsible for filtering. you should not modify, add,
remove, or enumerate notifications in the implementation of this method. void observe( in nsisupports asubject, in string atopic, in wstring adata ); parameters asubject in general reflects the object whose change or action is being observed. atopic indicates the specific change or action. adata an optional parameter or other auxiliary data further describing the change or action. rem...
...is of the parameters for a given callback. in general, atopic is the primary criterion for such dispatch; nsiobserver implementations should take care that they can handle being called with unknown values for atopic. the most common implementation of nsiobserverservice is the xpcom observer service. with this implementation, it's safe (and common practice) for an implementation of nsiobserver to
remove itself as an observer during the observe callback, or to add or
remove other observers. be careful, though, because other uses of nsiobserver may not support these operations correctly within observe. example the following code is an implementation of nsiobserver that is registered to receive notifications for the "mytopicid" topic. see observer notifications for a list of built-in topics possi...
... observer = new myobserver(); destruction - this should be fired once you're done observing (for example a window's unload event). failure to do so may result in memory leaks. observer.unregister(); "get everything" - note that "*" is an acceptabl...
nsIObserverService
inherits from: nsisupports last changed in gecko 0.9.6 the xpcom nsobserverservice implements this interface to provide global notifications for a variety of subsystems. ...
...see nsiobserver for a javascript example. void addobserver( in nsiobserver anobserver, in string atopic, in boolean ownsweak ); parameters anobserver the nsiobserver object which will receive notifications. atopic the n...
...is usually corresponds to the source of the notification, but could be defined differently depending on the notification topic and may even be null. atopic the notification topic. this string-valued key uniquely identifies the notification. this parameter must not be null. somedata a notification specific string value. the meaning of this parameter is dependent on the topic. it may be null.
removeobserver() this method is called to unregister an observer for a particular topic. void
removeobserver( in nsiobserver anobserver, in string atopic ); parameters anobserver the nsiobserver instance to
remove. atopic the notification topic or subject. this string-valued key uniquely identifies the notification. this parameter must not be null. example this notifies all nsiobservers...
nsIParserUtils
tizer is designed to protect against xss when sanitized content is inserted into a different-origin context without an iframe-equivalent sandboxing mechanism. by default, the sanitizer doesn't try to avoid leaking information that the content was viewed to third parties. ...
...t
removed. to avoid ambient information leakage upon loading the sanitized content, use the sanitizerinternalembedsonly flag. in that case, <a> links (and similar) to other content are preserved, so an explicit user action (following a link) after the content has been loaded can still leak information. by default, non-dangerous non-css presentational html elements and attributes or forms are not
removed. to
remove these, use sanitizerdropnoncsspresentation and/or sanitizerdropforms. by default, comments and css is
removed. to preserve comments, use sanitizerallowcomments. to preserve <style> elements and style attributes on other elements, use sanitizerallowstyle. -moz-binding is
removed from <style> elements and style attributes if present. in this case, properties that gecko doesn't recogniz...
...ve these, use sanitizerdropnoncsspresentation and/or sanitizerdropforms. by default, comments and css is
removed. to preserve comments, use sanitizerallowcomments. to preserve <style> elements and style attributes on other elements, use sanitizerallowstyle. -moz-binding is
removed from <style> elements and style attributes if present. in this case, properties that gecko doesn't recognize can get
removed as a side effect. note: if -moz-binding is not present, <style> elements and style attributes, and if sanitizerallowstyle is specified, the sanitized content may still be xss dangerous if loaded into a non-gecko web engine! astring sanitize( in astring src, in unsigned long flags ); parameters src the html source to parse (c++ callers are allowed but not required to use the same stri...
nsIPasswordManager
nsipasswordmanager for examples. implemented by: @mozilla.org/passwordmanager;1. to create an instance, use: var passwordmanager = components.classes["@mozilla.org/passwordmanager;1"] .getservice(components.interfaces.nsipasswordmanager); method overview void adduser(in autf8string ahost, in astring auser, in astring apassword); void
removeuser(in autf8string ahost, in astring auser); void addreject(in autf8string ahost); void
removereject(in autf8string ahost); attributes attribute type description enumerator nsisimpleenumerator readonly: an enumeration of the stored usernames and passwords as nsipassword objects. enumera...
...objects. only the host portion of these objects is relevant. methods adduser() stores a password. astring adduser(in autf8string ahost, in astring auser, in astring apassword); parameters ahost the hostname of the password to store. auser the username of the password to store. apassword the password to store.
removeuser()
removes a stored password. void
removeuser(in autf8string ahost, in astring auser); parameters ahost the hostname of the password to
remove. auser the username of the password to
remove. addreject() blocks a hostname from having its passwords saved. void addreject(in autf8string ahost); parameters ahost the name of the hostna...
...in autf8string ahost, in astring auser); parameters ahost the hostname of the password to
remove. auser the username of the password to
remove. addreject() blocks a hostname from having its passwords saved. void addreject(in autf8string ahost); parameters ahost the name of the hostname for which passwords should no longer be saved.
removereject() unblocks a hostname from having its passwords saved. void
removereject(in autf8string ahost); parameters ahost the name of the hostname for which passwords can be saved again. ...
nsIPlacesImportExportService
arameters none. exporthtmltofile() saves the current bookmarks hierarchy to a bookmarks.html file. void exporthtmltofile( in nsilocalfile afile ); parameters afile an nsilocalfile indicating where to save the new bookmarks.html file. importhtmlfromfile() obsolete since gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) note: this method has been
removed; use the bookmarkhtmlutils.jsm javascript code module instead. loads the given bookmarks.html file and replaces it with the current bookmarks hierarchy (if aisinitialimport is true) or appends it (if aisinitialimport is false). three nsiobserverservice notifications are fired as a result of the import. "bookmarks-restore-begin" is fired just before the import is started. "bookmarks-restore-suc...
...e observer subject will be null. void importhtmlfromfile( in nsilocalfile afile, in boolean aisinitialimport ); parameters afile the html file to import into places. aisinitialimport whether this is an initial import or not. importhtmlfromfiletofolder() obsolete since gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) note: this method has been
removed; use the bookmarkhtmlutils.jsm javascript code module instead.loads the given bookmarks.html file and puts it in the given folder. three nsiobserverservice notifications are fired as a result of the import. "bookmarks-restore-begin" is fired just before the import is started. "bookmarks-restore-success" is fired right after the bookmarks are successfully imported. "bookmarks-restore-failed" is ...
...rt ); parameters afile the file to import. afolder the id of the bookmarks folder into which to import the bookmarks. aisinitialimport whether or not this is an initial import. importhtmlfromuri() obsolete since gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. note: this method has been
removed; use the bookmarkhtmlutils.jsm javascript code module instead. same thing as importhtmlfromfile(), but takes a uri instead. void importhtmlfromuri( in nsiuri auri, in boolean aisinitialimport ); parameters auri the uri from which to import bookmarks. aisinitialimport whether or not this is an initial import. ...
nsIPluginHost
te temp file with content len header in, it will use by http post. nsifile createtempfiletopost( in string apostdataurl ); parameters apostdataurl return value native code only!createtmpfiletopost obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. to create temp file with content len header in, it will use by http post. void createtmpfiletopost( in string apostdataurl, out string atmpfilename ); parameters apostdataurl atmpfilename native code only!deletepluginnativewindow deletes plugin native window object created by newpluginnativewindow(). void deletepluginnativewindow( in ...
... obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void getplugincount( out unsigned long aplugincount ); parameters aplugincount native code only!getpluginfactory obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. nsiplugin getpluginfactory( in string amimetype ); parameters amimetype return value native code only!getpluginname get the plugin name for the plugin instance. void getpluginname( in nsiplugininstance ainstance, [shared] out string apluginname ); parameters ainstance the plugin instance object. apluginname returns a pointer to ...
...or new plugin libraries. void reloadplugins( in boolean reloadpages ); parameters reloadpages indicates whether currently visible pages should also be reloaded. native code only!setisscriptableinstance obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. to notify the plugin manager that the plugin created a script object. void setisscriptableinstance( in nsiplugininstance ainstance, in boolean ascriptable ); parameters ainstance ascriptable native code only!setupplugininstance void setupplugininstance( in string amimetype, in nsiuri aurl, in nsiplugininstanceowner aowner ); parame...
nsIPrivateBrowsingService
netwerk/base/public/nsiprivatebrowsingservice.idlscriptable provides access to information about the state of the private browsing service. 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface is deprecated since firefox 20, and will probably be completely
removed in firefox 21. the nsiprivatebrowsingservice interface provides access to information about the state of the private browsing feature offered in firefox 3.5 and later. when firefox is in private browsing mode, firefox shouldn't save any potentially private information. the browser itself stops caching, and also doesn't record history information. in addition, temporary, databases are created to be use...
...he npnvprivatemodebool variable. implemented by: @mozilla.org/privatebrowsing;1. to get access to the service from javascript, use: var pbs = components.classes["@mozilla.org/privatebrowsing;1"] .getservice(components.interfaces.nsiprivatebrowsingservice); c++ callers should use the contract id @mozilla.org/privatebrowsing-wrapper;1 instead. method overview void
removedatafromdomain(in autf8string adomain); attributes attribute type description autostarted boolean indicates whether or not private browsing was started automatically at application launch time. this is only ever true if privatebrowsingenabled is also true. read only. lastchangedbycommandline boolean indic...
...interface. read only. privatebrowsingenabled boolean indicates whether or not private browsing mode is currently enabled. you may also turn private browsing mode on and off by setting the value of this attribute. changing this value while handling one of the notifications generated by the private browsing service throws an ns_error_failure exception. methods
removedatafromdomain()
removes all data stored for the specified domain, including its subdomains. void
removedatafromdomain( in autf8string adomain ); parameters adomain the domain for which data should be
removed. ...
nsIProcess
his is only valid after the process has exited. read only. isrunning boolean true if the process is running, otherwise false. only accurate if the process was run with blocking disabled. read only. location nsifile the location of the executable file on disk. read only. gecko 1.9.1 note this attribute is no longer implemented as of gecko 1.9.1, and is
removed entirely in gecko 1.9.2. pid unsigned long the process id of the process. this value is only available after the process has started; in addition, some platforms may not offer this value at all. read only. processname string the name of the process. read only. gecko 1.9.1 note this attribute is no longer implemented as of gecko 1.9.1, and is remo...
... methods init() initializes the nsiprocess with the specified executable file. once initialized, you can start the process executing by calling run(). ...
...xecutable ); parameters executable the nsifile executable file to be represented by the nsiprocess object. initwithpid() obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) initializes the nsiprocess to represent an existing process, given that process's id. gecko 1.9.1 note this method is no longer implemented as of gecko 1.9.1, and is
removed entirely in gecko 1.9.2. void initwithpid( in unsigned long pid ); parameters pid the process id to begin to represent. kill() immediately terminates the process represented by the nsiprocess object. this only works if the process was run without blocking enabled. gecko 1.9.1 note prior to gecko 1.9.1 (firefox 3.5), this method did not work on windows or mac os x. now it does.
nsIProcessScriptLoader
nsimessagemanager.idl inherits from: nsisupports this interface is used by parent process message managers to load scripts into a child process. the scripts run only once per process. the global object for process scripts is a contentprocessmessagemanager. methods void loadprocessscript(in astring aurl, in boolean aallowdelayedload) void
removedelayedprocessscript(in astring aurl); jsval getdelayedprocessscripts(); loadprocessscript() load a script in the child process. process scripts are loaded as soon as loadprocessscript() is called. if this function is called on a chromemessagebroadcaster, : it will load the process script into all child processes. if aallowdelayedload is true, then the script will also be loa...
...he absolute url. data: urls are also supported. for example data:,dump("foo\n"); aallowdelayedload boolean if this flag is false, the process script will only be loaded into child processes that are already running at the time of the call. if this flag is true, the process script will be loaded into any new child processes created after the loadprocessscript() call, until
removedelayedprocessscript() is called for that script. if you are calling loadprocessscript() on a chromemessagesender, you should always pass true here.
removedelayedprocessscript()
removes aurl from the list of scripts which support delayed load. this cancels the effect of the aallowdelayedload flag, meaning that the loader will no longer load the script into new child processes. if...
...which support delayed load. this cancels the effect of the aallowdelayedload flag, meaning that the loader will no longer load the script into new child processes. if you used aallowdelayedload, you should call this as part of your cleanup (for example, when your add-on is disabled or uninstalled). parameters name type description aurl string url for the script to
remove. getdelayedprocessscripts() returns all delayed scripts that will be loaded once a child process becomes available. the return value is a list of pairs [<url>, false]. returns list of the delayed scripts. each script is returned as a pair: [<url>, false]. ...
nsISHistoryListener
docshell/shistory/public/nsishistorylistener.idlscriptable an interface you can implement to receive notifications about activities that occur in session history, and optionally cancel them. inherits from: nsisupports last changed in gecko 1.7 a session history listener is notified when pages are added to,
removed from, and loaded from session history. the listener can prevent any action (except adding a new session history entry) from happening by returning false from the corresponding callback method. a session history listener can be registered on a particular nsishistory instance via the nsishistory.addshistorylistener() method. method overview boolean onhistorygoback(in nsiuri abackuri); boolean onhistorygoforward(in nsiuri aforwarduri); boolean onhistorygotoindex(in ...
...t is added to session history. new documents are added to session history by the docshell when new pages are loaded in a frame or content area; for example by calling nsiwebnavigation.loaduri(). note: you can't cancel this operation. void onhistorynewentry( in nsiuri anewuri ); parameters anewuri the uri of the document to be added to session history. onhistorypurge() called when entries are
removed from session history. entries can be
removed from session history for various reasons; for example to control the browser's memory usage, to prevent users from loading documents from history, to erase evidence of prior page loads, etc. to purge documents from session history call nsishistory.purgehistory(). boolean onhistorypurge( in long anumentries ); parameters anumentries the number of e...
... return value true to allow the purge operation to proceed or false to cancel it. onhistoryreload() called when the current document is reloaded, for example due to an nsiwebnavigation.reload() call. boolean onhistoryreload( in nsiuri areloaduri, in unsigned long areloadflags ); parameters areloaduri the uri of the document to be reloaded. ...
nsISelection
read only. anchoroffset long t...
...read only. anchoroffset long the offset within the (text) node ...
... to the end of the selection and applies the movement direction/granularity to the collapsed() selection. "extend()" leaves the start of the selection unchanged, and applies movement direction/granularity to the end of the selection. direction can be one of { "forward", "backward", "left", "right" } granularity can be one of { "character", "word", "line", "lineboundary" }
removeallranges()
removes all nsidomranges from the current selection. void
removeallranges(); parameters none
removerange()
removes a range from the current selection. void
removerange( in nsidomrange range ); parameters range selectallchildren() adds all children of the specified node to the selection. void selectallchildren( in nsidomnode parentnode ); parameters parentnode the ...
nsISelectionPrivate
node, in print32 endoffset, in boolean allowadjacent, in rangearray results); native code only! void getrangesforintervalcomarray(in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, in rangearray results); native code only! obsolete since gecko 12.0 long gettableselectiontype(in nsidomrange range); void
removeselectionlistener(in nsiselectionlistener listenerto
remove); void scrollintoview(in short aregion, in boolean aissynchronous, in short avpercent, in short ahpercent); void setancestorlimiter(in nsicontent acontent); native code only! void setpresshell(in nsipresshell apresshell); native code only! void settextrangestyle(in nsidomrange range, in consttextranges...
...ing it. resultcount returns the number of ranges that overlap (or touch) the input range. results returns the ranges that overlap (or touch) the input range. native code only!getrangesforintervalcomarray obsolete since gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. this method became obsolete in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9). use getrangesforintervalarray() instead. void getrangesforintervalcomarray( in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, in rangearray results ); parameters beginnode begin...
...lowed to touch the input range rather than merely overlapping it. results returns the ranges that overlap (or touch) the input range. gettableselectiontype() test if supplied range points to a single table element. long gettableselectiontype( in nsidomrange range ); parameters range return value one of tableselection_* constants. "none" means a table element is not selected.
removeselectionlistener() void
removeselectionlistener( in nsiselectionlistener listenerto
remove ); parameters listenerto
remove scrollintoview() scrolls a region of the selection, so that it is visible in the scrolled view. void scrollintoview( in short aregion, in boolean aissynchronous, in short avpercent, in short ahpercent ); parameters aregion the region inside the sele...
nsITreeView
layout/xul/base/src/tree/public/nsitreeview.idlscriptable this interface is used by the tree widget to get information about what and how to display a tree widget. inherits from: nsisupports last changed in gecko 22 (firefox 22 / thunderbird 22 / seamonkey 2.19) implementing a nsitreeview in lieu of dom methods for tree creation can improve performance dramatically, and
removes the need to make changes to the tree manually when changes to the database occur. further information about creating treeviews is given in the xul tutorial. method overview boolean candrop(in long index, in long orientation, in nsidomdatatransfer datatransfer); boolean candropbeforeafter(in long index, in boolean before); obsolete since gecko 1.8 boolean candropon(in long ind...
...ided with a properties array. (this is one way of detecting the version at run-time). simply return a string of space-separated property names. for example: getrowproperties: function(index) { return "dummy"; } obsolete since gecko 22 (firefox 22 / thunderbird 22 / seamonkey 2.19)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. to add properties for a particular row, you must use the nsiatomservice to create an nsiatom string, which can then be appended to the array to alter the style (see also styling a tree) getrowproperties: function(index, properties) { var atomservice = components.classes["@mozilla.org/atom-service;1"].getservice(components.interfaces.nsiatomservice); var a...
...in astring value ); parameters row the row of the cell. col the column of the cell. value the value to change the cell to. settree() called when setting or clearing the view on the tree to link the view to or disconnect the front end box object. void settree( in nsitreeboxobject tree ); parameters tree the nsitreeboxobject to attach this view to, or null if the view is being
removed from the tree. toggleopenstate() called on the view when an item is opened or closed, e.g., by clicking the twisty, keyboard access, et cetera. note: as of this writing (gecko 2.0), custom nsitreeview implementations must be prepared to handle a call to toggleopenstate for any row index which returns true for a call to iscontainer, regardless of whether the container is empty. void toggleop...
nsIWebBrowser
so be used at runtime to obtain the content dom window and from that the rest of the dom. inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) warning: this interface was frozen for a very long time, but was unfrozen for gecko 2.0. method overview void addwebbrowserlistener(in nsiweakreference alistener, in nsiidref aiid); void
removewebbrowserlistener(in nsiweakreference alistener, in nsiidref aiid); attributes attribute type description containerwindow nsiwebbrowserchrome the chrome object associated with the browser instance. the embedder must create one chrome object for each browser object that is instantiated. the embedder must associate the two by setting this property to point t...
...nterface. the chrome object must also implement nsiembeddingsitewindow. the chrome may optionally implement nsiinterfacerequestor, nsiwebbrowserchromefocus, nsicontextmenulistener and nsitooltiplistener to receive additional notifications from the browser object. the chrome object may optionally implement nsiwebprogresslistener instead of explicitly calling addwebbrowserlistener() and
removewebbrowserlistener() to register a progress listener object. if the implementation does this, it must also implement nsiweakreference. note: the implementation should not refcount the supplied chrome object; it should assume that a non nsnull value is always valid. the embedder must explicitly set this value back to nsnull if the chrome object is destroyed before the browser object. note: nsii...
...ner( in nsiweakreference alistener, in nsiidref aiid ); parameters alistener the listener to be added. aiid the iid of the interface that will be called on the listener as appropriate. return value ns_ok listener was successfully added. ns_error_invalid_arg one of the arguments was invalid or the object did not implement the interface specified by the iid.
removewebbrowserlistener()
removes a previously registered listener. void
removewebbrowserlistener( in nsiweakreference alistener, in nsiidref aiid ); parameters alistener the listener to be
removed. aiid the iid of the interface on the listener that will no longer be called. return value ns_ok listener was successfully added. ns_error_invalid_arg one of the argum...
nsIWebProgress
nsiwebprogress instances may be arranged in a parent-child configuration, corresponding to the parent-child configuration of their respective dom windows. however, in some cases a nsiwebprogress instance may not have an associated dom window. the parent-child relationship of nsiwebprogress instances is not made explicit by this interface, but the relationship may exist in some implementations. ...
...ed itself, and it may also receive notifications from any nsiwebprogress instances that are children of that nsiwebprogress instance. uriloader/base/nsiwebprogress.idlscriptable please add a summary to this article. last changed in gecko 1.8.0 inherits from: nsisupports method overview void addprogresslistener(in nsiwebprogresslistener alistener, in unsigned long anotifymask); void
removeprogresslistener(in nsiwebprogresslistener alistener); attributes attribute type description domwindow nsidomwindow the dom window associated with this nsiwebprogress instance. read only. exceptions thrown ns_error_failure indicates that there is no associated dom window. isloadingdocument prbool indicates whether or not a document is currently being loaded in the context of this nsiw...
...mask ); parameters alistener the listener interface to be called when a progress event occurs. this object must also implement nsisupportsweakreference. anotifymask the types of notifications to receive. exceptions thrown ns_error_invalid_arg indicates that alistener was either null or that it does not support weak references. ns_error_failure indicates that alistener was already registered.
removeprogresslistener()
removes a previously registered listener of progress events. void
removeprogresslistener( in nsiwebprogresslistener alistener ); parameters alistener the listener interface previously registered with a call to addprogresslistener(). exceptions thrown ns_error_failure indicates that alistener was not registered. ...
nsIWindowsRegKey
void open(in unsigned long rootkey, in astring relpath, in unsigned long mode); nsiwindowsregkey openchild(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
removechild(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 astr...
...s name the name of the value to query. this parameter can be the empty string to request the key's default value. return value the string contents of the named value as a unicode string. note: unlike writestringvalue(), readstringvalue() will work with reg_multi_sz and reg_expand_sz types. note: in gecko 2.0, readstringvalue() calls expandenvironmentstrings() on a reg_expand_sz type. ...
...f the value to query. this parameter can be the empty string to request the key's default value. return value the string contents of the named value as a unicode string. note: unlike writestringvalue(), readstringvalue() will work with reg_multi_sz and reg_expand_sz types. note: in gecko 2.0, readstringvalue() calls expandenvironmentstrings() on a reg_expand_sz type.
removechild() this method
removes a child key and all of its values. this method will fail if the key has any children of its own. void
removechild( in astring relpath ); parameters relpath the relative path from this key to the key to be
removed.
removevalue() this method
removes the value with the given name. void
removevalue( in astring name ); parameters name the name of the value to be
removed. sta...
Performance
a sql statement in isolation, an implicit transaction is created around that statement. when transactions are committed, sqlite does journaling which requires syncing data to disk. this operation is extremely slow. therefore, if you are doing many transactions in a row, you will get significant performance improvements by surrounding them in a transaction. the asynchronous writes discussed below
removes most of the immediate penalty of a commit, so you will not notice the problem as much. however, there is still overhead, and using a transaction will still be faster. one major problem is that the queue of file operations will get very long if there are many transactions. some operations require walking this queue to see what operations have been pending, and they will be slower. if the user shu...
.../php2004/slides-all.html for more information on how this works). these disk syncs are very slow and limit the speed of a commit to the rotational speed of the mechanical disk. vacuuming and zero-fill sqlite has a vacuum command to compress unused space from the database. sqlite works like a memory manager or a file system. when data is deleted, the associated bytes are marked as free but are not
removed from the file. this means that the file will not shrink, and some data may still be visible in the file. the way to work around this is to run the vacuum command to
remove this space. vacuuming is very slow. the vacuum command is essentially the same as the command line sqlite3 olddb .dump | sqlite3 newdb; mv newdb olddb. on some networked drives, vacuuming a 10mb database has been timed at over...
...uum command is essentially the same as the command line sqlite3 olddb .dump | sqlite3 newdb; mv newdb olddb. on some networked drives, vacuuming a 10mb database has been timed at over one minute. therefore, you should avoid vacuuming whenever possible. some items in databases are privacy sensitive, such as deleted history items. users have the expectation that deleting items in their history will
remove the traces of that from the database. as a result, mozilla enables the sqlite_secure_delete preprocessor flag in db/sqlite3/src/makefile.in. this flag causes deleted items to be filled with 0s on disk. this eliminates the need to vacuum except to reclaim disk space, and makes many operations much faster. zero-filling can have significant performance overhead in some situations. for example, the h...
Creating a gloda message query
the max number of messages which are returned is governed by a preference: "mailnews.database.global.se...
... the max number of messages which are returned is governed by a preference: "mailnews.database.global.search.msg.limit" although you can de...
...s provided by fundattr.js: from: a single glodaidentity corresponding to the author of the message. to: a list of glodaidentity instances corresponding to the email addresses found on the to line of the message. cc: ditto, but cc. involves: a list of all glodaidentity instances associated with this message. effectively, this is the contents of from/to/cc in a single list and with duplicates
removed. attachmenttypes: a list of the attachment mime types found on this message. attributes provided by explattr.js: tags: a list of the nsimsgtags applied to this message. starred: a boolean indicating whether this message is starred/flagged or not. read: a boolean indicating whether this message is read or not. want a glodamessage when you already have an nsimsgdbhdr? gloda.getmessageco...
Debugger.Object - Firefox Developer Tools
.defineproperty, except that the target object is implicit, and in a different compartment from the function and descriptor.) defineproperties(properties) add the properties given byproperties to the referent. (this function behaves like object.defineproperties, except that the target object is implicit, and in a different compartment from theproperties argument.) deleteproperty(name)
remove the referent's property namedname. return true if the property was successfully
removed, or if the referent has no such property. return false if the property is non-configurable. seal() prevent properties from being added to or deleted from the referent. return this debugger.object instance. (this function behaves like the standard object.seal function, except that the object to be sealed ...
...ss-compartment, intra-thread calls: the call takes place in the same thread that changed the property, and inhandler's method's compartment (typically the same as the debugger's compartment). the new watchpoint belongs to the debugger instance to which this debugger.object instance belongs; disabling the debugger instance disables this watchpoint. clearobjectwatchpoint()(future plan)
remove any object watchpoint set on the referent. setpropertywatchpoint(name,handler)(future plan) set a watchpoint on the referent's property namedname, reporting events by callinghandler's methods. any previous watchpoint handler on this property for this debugger.object instance is replaced. ifhandler is null, the property is no longer watched.handler is as described for debugger.object.prototy...
... property namedname, reporting events by callinghandler's methods. any previous watchpoint handler on this property for this debugger.object instance is replaced. ifhandler is null, the property is no longer watched.handler is as described for debugger.object.prototype.setobjectwatchpoint, except that it does not receive extensionsprevented events. clearpropertywatchpoint(name)(future plan)
remove any watchpoint set on the referent's property namedname. unwrap() if the referent is a wrapper that this debugger.object's compartment is permitted to unwrap, return a debugger.object instance referring to the wrapped object. if we are not permitted to unwrap the referent, return null. if the referent is not a wrapper, return this debugger.object instance unchanged. unsafedereference() ...
Animation.oncancel - Web APIs
the oncancel property of the web animations api's animation interface is the event handler for the cancel event. the cancel event can be triggered manually with animation.cancel() when the animation enters the "idle" play state from another state, such as when the animation is
removed from an element before it finishes playing creating a new animation that is initially idle does not trigger a cancel event on the new animation. ...
... working draft editor's draft. ...
...on that is initially idle does not trigger a cancel event on the new animation. syntax var cancelhandler = animation.oncancel; animation.oncancel = cancelhandler; value a function to be executed when the animation is cancelled, or null if there is no cancel event handler. examples if this animation is canceled,
remove its element. animation.oncancel = function() { animation.effect.target.
remove(); }; specifications specification status comment web animationsthe definition of 'animation.oncancel' in that specification. working draft editor's draft. ...
Animation.persist() - Web APIs
the persist() method of the web animations api's animation interface explicitly persists an animation, when it would otherwise be
removed due to the browser's automatically removing filling animations behavior. syntax animation.persist(); parameters none. return value none. ...
...ne. examples in our simple replace indefinite animations demo, you can see the following code: const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); //anim.persist() anim.on
remove = function() { console.log('animation
removed'); } console.log(anim.replacestate); }); here we have a <div> element, and an event listener that fires the event handler code whenever the mouse moves. the event handler sets up an animation that animates the <div> element to the position of the mouse pointer. this could result in a huge animations list, which could create a memory leak. fo...
...moved'); } console.log(anim.replacestate); }); here we have a <div> element, and an event listener that fires the event handler code whenever the mouse moves. the event handler sets up an animation that animates the <div> element to the position of the mouse pointer. this could result in a huge animations list, which could create a memory leak. for this reason, modern browsers automatically
remove overriding forward filling animations. you can see the replacestate of the animation being logged at the end of the handler. this will be active for each animation by default, or persisted if the persist() call is uncommented. specifications specification status comment web animationsthe definition of 'persist()' in that specification. working draft ...
Animation.replaceState - Web APIs
the read-only animation.replacestate property of the web animations api returns the replace state of the animation. this will be active if the animation has been
removed, or persisted if animation.persist() has been invoked on it. syntax let myreplacestate = animation.replacestate; value a string that represents the replace state of the anmation. the value can be one of: active: the initial value of the animation's replace state; when the animation has been
removed by the browser's automatically removing filling animations behavior. persisted: the animation has been explicitly persisted by invoking animation.persist() on it.
removed: the animation has been explicitly
removed. examples in our simple replace indefinite animations demo, you can see the following code: const divelem...
...oved. examples in our simple replace indefinite animations demo, you can see the following code: const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); //anim.persist() anim.on
remove = function() { console.log('animation
removed'); } console.log(anim.replacestate); }); here we have a <div> element, and an event listener that fires the event handler code whenever the mouse moves. the event handler sets up an animation that animates the <div> element to the position of the mouse pointer. this could result in a huge animations list, which could create a memory leak. fo...
...moved'); } console.log(anim.replacestate); }); here we have a <div> element, and an event listener that fires the event handler code whenever the mouse moves. the event handler sets up an animation that animates the <div> element to the position of the mouse pointer. this could result in a huge animations list, which could create a memory leak. for this reason, modern browsers automatically
remove overriding forward filling animations. you can see the replacestate of the animation being logged at the end of the handler. this will be active for each animation by default, or persisted if the persist() call is uncommented. specifications specification status comment web animationsthe definition of 'animation.replacestate' in that specification. working draft ...
Dragging and Dropping Multiple Items - Web APIs
re gecko specific interfaces. these interfaces will only work with gecko based browsers. mozilla supports the ability to drag multiple items using some additional non-standard methods. these are methods that mirror the types property as well as the getdata(), setdata() and cleardata() methods, however, they take an additional argument that specifies the index of the item to retrieve, modify or
remove. the drag processing described in this document use the datatransfer interface. this processing does not use the datatransferitem interface nor the datatransferitemlist interface. setting and getting with indices the mozsetdataat() method allows you to add multiple items during a dragstart event. this function similarly to setdata() var dt = event.datatransfer; dt.mozsetdataat("text/plain", "...
... order starting with 0 as you cannot add items at positions farther than the last item, however you can replace existing items by using indices you have already added. using 0 as the index is equivalent to calling setdata(). you can clear an item using the mozcleardataat() method. event.datatransfer.mozcleardataat("text/plain", 1); caution: removing the last format for a particular index will
remove that item entirely, shifting the remaining items down, so the later items will have different indices. for example: var dt = event.datatransfer; dt.mozsetdataat("text/uri-list", "url1", 0); dt.mozsetdataat("text/plain", "url1", 0); dt.mozsetdataat("text/uri-list", "url2", 1); dt.mozsetdataat("text/plain", "url2", 1); dt.mozsetdataat("text/uri-list", "url3", 2); dt.mozsetdataat("text/plain"...
... // [item1] data=url1, index=0 // [item2] data=url3, index=1 fortunately, you don't normally need to clear items often; it's more common to just add the items only when you know they are needed. common cases where dragging multiple items is used is when dragging multiple files or book...
IDBCursorSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually
removed from the spec because its need was questionable. it may however be reintroduced in the future if there is enough demand from web developers. the idbcursorsync interface of the indexeddb api represents a cursor for iterating over multiple records in a database. you can have only one instance of idbcursorsync representing a cursor, but you can have an unlimited number of cursors at the same time. operations are performed on the underlying index or object store. ...
...tiple records in a database. you can have only one instance of idbcursorsync representing a cursor, but you can have an unlimited number of cursors at the same time. operations are performed on the underlying index or object store. it enables an application to synchronously process all the records in the cursor's range. method overview bool continue (in optional any key); void
remove () raises (idbdatabaseexception); attributes attribute type description count readonly unsigned long long the total number of objects that share the current key. direction readonly unsigned short the direction of traversal of the cursor. see constants for possible values. key readonly any the key for the record at the cursor'...
...ods continue() advances the cursor to the next position along its direction, to the item whose key matches the optional key parameter. if no key is specified, advance to the immediate next position. returns false if the cursor has reached the end of its range; otherwise returns true. bool continue ( in optional any key ); parameters key the key to which to move the cursor's position.
remove() deletes the record at the cursor's position, without changing the cursor's position void delete ( ) raises (databaseexception); exceptions this method can raise an idbdatabaseexception with the following code: not_allowed_err if the underlying index or object store does not support updating the record because it is open in the read_only or snapshot_read mode. ...
IDBDatabaseSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually
removed from the spec because its need was questionable. it may however be reintroduced in the future if there is enough demand from web developers. the databasesync interface in the indexeddb api represents a synchronous connection to a database. ...
...nc interface in the indexeddb api represents a synchronous connection to a database. ...
...me the name of the object store to open. mode the mode that is used to access the object store. returns idbobjectstoresync an object to access the opened object store. exceptions this method can raise an idbdatabaseexception with the following code: not_found_err if an object store with the given name (based on case-sensitive comparison) already exists in the connected database.
removeobjectstore() destroys an object store with the given name, as well as all indexes that reference that object store. void
removeobjectstore ( in domstring storename ) raises (idbdatabaseexception); parameters storename the name of an existing object store to
remove. returns void exceptions this method can raise an idbdatabaseexception with the following code: not_found_err if...
IDBIndexSync - Web APIs
it may however be reintroduced in the future if there is enough demand from web developers. the idbindexsync interface of the indexeddb api provides synchronous access to an index in a database. ...
...if this attribute is null, this index is not auto-populated. name readonly domstring the name of this index. storename readonly domstring this index's referenced object store. uniqu...
...() stores the given value in this index and returns the key for the stored record. if a record already exists with the given key, the record is overwritten. any put ( in any value, in optional any key) raises (idbdatabaseexception); parameters value the value to be stored in the record. key the key to be used to identify the record. returns any the key for the stored record.
remove()
removes from this index any records that correspond to the given key. void
remove ( in any key ) raises (idbdatabaseexception); parameters key key of the records to be
removed. exceptions this method can raise a databaseexception with the following code: not_found_err if a record does not exist in this index with the given key. ...
Basic concepts - Web APIs
make to the database happen within transactions. like most web storage solutions, indexeddb follows a same-origin policy. so while you can access stored data within a domain, you cannot access data across different domains. indexeddb is an asynchronous api that can be used in most contexts, including web workers. it used to include a synchronous version also, for use in web workers, but this was
removed from the spec due to lack of interest by the web community. indexeddb used to have a competing spec, websql database, but the w3c deprecated it on november 18, 2010. while both indexeddb and websql are solutions for storage, they do not offer the same functionalities. websql database is a relational database access system, whereas indexeddb is an indexed table system. big concepts if you have...
...eration succeeded or failed. this sounds a little complicated at first, but there are sanity measures baked in. it's not that different from the way that xmlhttprequest works. indexeddb uses a lot of requests. requests are objects that receive the success or failure dom events that were mentioned previously. they have onsuccess and onerror properties, and you can call addeventlistener() and
removeeventlistener() on them. they also have readystate, result, and errorcode properties that tell you the status of the request. the result property is particularly magical, as it can be many different things, depending on how the request was generated (for example, an idbcursor instance, or the key for a value that you just inserted into the database). indexeddb uses dom events to notify you w...
...s by opening it with a greater version than the current one. this will start a versionchange transaction and fire an upgradeneeded event. the only place where the schema of the database can be updated is inside the handler of that event. note: this definition describes the most recent specification, which is only implemented in up-to-date browsers. old browsers implemented the now deprecated and
removed idbdatabase.setversion() method. database connection an operation created by opening a database. a given database can have multiple connections at the same time. transaction an atomic set of data-access and data-modification operations on a particular database. it is how you interact with the data in a database. in fact, any reading or changing of data in the database must happen in a tran...
Using IndexedDB - Web APIs
his tutorial walks you through using the asynchronous api of indexeddb. if you are not familiar with indexeddb, you should first read basic concepts about indexeddb. for the reference documentation on the indexeddb api, see the indexeddb article and its subpages. this article documents the types of objects used by indexeddb, as well as the methods of the asynchronous api (the synchronous api was
removed from spec). basic pattern the basic pattern that indexeddb encourages is the following: open a database. create an object store in the database. start a transaction and make a request to do some database operation, like adding or retrieving data. wait for the operation to complete by listening to the right kind of dom event. do something with the results (which can be found o...
...newly created objectstore. var customerobjectstore = db.transaction("customers", "readwrite").objectstore("customers"); customerdata.foreach(function(customer) { customerobjectstore.add(customer); }); }; }; as indicated previously, onupgradeneeded is the only place where you can alter the structure of the database. in it, you can create and delete object stores and build and
remove indices. object stores are created with a single call to createobjectstore(). the method takes a name of the store, and a parameter object. even though the parameter object is optional, it is very important, because it lets you define important optional properties and refine the type of object store you want to create. in our case, we've asked for an object store named "customers" and defined a ...
...it (typically, this is the site domain or subdomain), so it cannot be accessed by any other origin. third party window content (e.g. <iframe> content) cannot access indexeddb if the browser is set to never accept third party cookies (see bug 1147821.) warning about browser shutdown when the browser shuts down (because the user chose the quit or exit option), the disk containing the database is
removed unexpectedly, or permissions are lost to the database store, the following things happen: each transaction on every affected database (or all open databases, in the case of browser shutdown) is aborted with an aborterror. the effect is the same as if idbtransaction.abort() is called on each transaction. once all of the transactions have completed, the database connection is closed. finally,...
IndexedDB API - Web APIs
follows a same-origin policy. so while you can access stored data within a domain, you cannot access data across different domains. synchronous and asynchronous operations performed using indexeddb are done asynchronously, so as not to block applications. indexeddb originally included both synchronous and asynchronous apis. the synchronous api was intended for use only with web workers but was
removed from the spec because it was unclear whether it was needed. however, the synchronous api may be reintroduced if there is enough demand from web developers. storage limits and eviction criteria there are a number of web technologies that store data of one kind or another on the client side (i.e. on your local disk). indexeddb is most commonly talked about. the process by which the browser works...
... specification. custom event interfaces this specification fires events with the following custom interface: idbversionchangeevent the idbversionchangeevent interface indicates that the version of the database has changed, as the result of an idbopendbrequest.onupgradeneeded event handler function. ...
... idbdatabaseexception represents exception conditions that can be encountered while performing database operations. idbtransactionsync sync version of idbtransaction. idbobjectstoresync sync version of idbobjectstore. idbindexsync sync version of idbindex. idbfactorysync sync version of idbfactory. ...
MediaStream - Web APIs
ains a specified list of tracks (specified as an array of mediastreamtrack objects). properties this interface inherits properties from its parent, eventtarget. mediastream.active read only a boolean value that returns true if the mediastream is active, or false otherwise. mediastream.ended read only a boolean value set to true if the end of the stream has been reached. this has been
removed from the specification; you should instead check the value of mediastreamtrack.readystate to see if its value is ended for the track or tracks you want to ensure have finished playing. mediastream.id read only a domstring containing 36 characters denoting a universally unique identifier (uuid) for the object. event handlers mediastream.onaddtrack an eventhandler containing the action...
...s value is ended for the track or tracks you want to ensure have finished playing. mediastream.id read only a domstring containing 36 characters denoting a universally unique identifier (uuid) for the object. event handlers mediastream.onaddtrack an eventhandler containing the action to perform when an addtrack event is fired when a new mediastreamtrack object is added. mediastream.on
removetrack an eventhandler containing the action to perform when a
removetrack event is fired when a mediastreamtrack object is
removed from it. methods this interface inherits methods from its parent, eventtarget. mediastream.addtrack() stores a copy of the mediastreamtrack given as argument. if the track has already been added to the mediastream object, nothing happens. mediastream.clone(...
...he order is not defined, and may not only vary from one browser to another, but also from one call to another. mediastream.getvideotracks() returns a list of the mediastreamtrack objects stored in the mediastream object that have their kind attribute set to "video". the order is not defined, and may not only vary from one browser to another, but also from one call to another. mediastream.
removetrack()
removes the mediastreamtrack given as argument. if the track is not part of the mediastream object, nothing happens. events addtrack fired when a new mediastreamtrack object is added. also available via the onaddtrack property.
removetrack fired when a mediastreamtrack object has been
removed. also available via the on
removetrack property. active fired when the mediastream ...
NamedNodeMap - Web APIs
mplementations. properties this interface doesn't inherit any property. namednodemap.length read only returns the amount of objects in the map. methods this interface doesn't inherit any method. namednodemap.getnameditem() returns a attr, corresponding to the given name. namednodemap.setnameditem() replaces, or adds, the attr identified in the map by the given name. namednodemap.
removenameditem()
removes the attr identified by the given map. namednodemap.item() returns the attr at the given index, or null if the index is higher or equal to the number of nodes. namednodemap.getnameditemns() returns a attr identified by a namespace and related local name. namednodemap.setnameditemns() replaces, or adds, the attr identified in the map by the given namespace and related loca...
...he attr identified by the given map. namednodemap.item() returns the attr at the given index, or null if the index is higher or equal to the number of nodes. namednodemap.getnameditemns() returns a attr identified by a namespace and related local name. namednodemap.setnameditemns() replaces, or adds, the attr identified in the map by the given namespace and related local name. namednodemap.
removenameditemns()
removes the attr identified by the given namespace and related local name. specifications specification status comment domthe definition of 'namednodemap' in that specification. living standard deals with attr instead of node document object model (dom) level 3 core specificationthe definition of 'namednodemap' in that specification. obso...
... instead of node document object model (dom) level 3 core specificationthe definition of 'namednodemap' in that specification. obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'namednodemap' in that specification. obsolete added getnameditemns(), setnameditemns() and
removenameditemns() document object model (dom) level 1 specificationthe definition of 'namednodemap' in that specification. obsolete initial definition ...
Node.childNodes - Web APIs
to get data from node objects, use their properties. (for example, to get the name of ...
...to get data from node objects, use their properties. (for example, to get the name of the first childnode: elementnodereference.childnodes[1]...
...to get data from node objects, use their properties. ...
performance.clearMarks() - Web APIs
return value void example the following example shows both uses of the clearmarks() method. // create a small helper to show how many performancemark entries there are. ...
... return value void example the following example shows both uses of the clearmarks() method. // create a small helper to show how many performancemark entries there are. ...
... return value void example the following example shows both uses of the clearmarks() method. // create a small helper to show how many performancemark entries there are. ...
performance.clearMeasures() - Web APIs
return value void example the following example shows both uses of the clearmeasures() method. // create a small helper to show how many performancemeasure entries there are. ...
... return value void example the following example shows both uses of the clearmeasures() method. // create a small helper to show how many performancemeasure entries there are. ...
... return value void example the following example shows both uses of the clearmeasures() method. // create a small helper to show how many performancemeasure entries there are. ...
SourceBuffer - Web APIs
buffer.trackdefaults specifies the default values to use if kind, label, and/or language information is not available in the initialization segment of the media to be appended to the sourcebuffer. sourcebuffer.updating read only a boolean indicating whether the sourcebuffer is currently being updated — i.e. whether an sourcebuffer.appendbuffer(), sourcebuffer.appendstream(), or sourcebuffer.
remove() operation is currently in progress. sourcebuffer.videotracks read only a list of the video tracks currently contained inside the sourcebuffer. event handlers sourcebuffer.onabort fired whenever sourcebuffer.appendbuffer() or sourcebuffer.appendstream() is ended by a call to sourcebuffer.abort(). sourcebuffer.updating changes from true to false. sourcebuffer.onerror fired whenever an ...
...dbuffer() or sourcebuffer.appendstream() is ended by a call to sourcebuffer.abort(). sourcebuffer.updating changes from true to false. sourcebuffer.onerror fired whenever an error occurs during sourcebuffer.appendbuffer() or sourcebuffer.appendstream(). sourcebuffer.updating changes from true to false. sourcebuffer.onupdate fired whenever sourcebuffer.appendbuffer() method or the sourcebuffer.
remove() completes. sourcebuffer.updating changes from true to false. this event is fired before onupdateend. sourcebuffer.onupdateend fired whenever sourcebuffer.appendbuffer() method or the sourcebuffer.
remove() has ended. this event is fired after onupdate. sourcebuffer.onupdatestart fired whenever the value of sourcebuffer.updating transitions from false to true. methods inherits methods from...
...he process of asynchronously appending the specified buffer to the sourcebuffer. returns a promise which is fulfilled once the buffer has been appended. sourcebuffer.appendstream() appends media segment data from a readablestream object to the sourcebuffer. sourcebuffer.changetype() changes the mime type that future calls to appendbuffer() will expect the new data to conform to. sourcebuffer.
remove()
removes media segments within a specific time range from the sourcebuffer. sourcebuffer.
removeasync() starts the process of asynchronously removing media segments in the specified range from the sourcebuffer. returns a promise which is fulfilled once all matching segments have been
removed. examples the following simple example loads a video chunk by chunk as fast as possible, playing i...
Using Touch Events - Web APIs
h surface), thus enhancing user experiences. the touch events interfaces support application specific single and multi-touch interactions such as a two-finger gesture. a multi-touch interaction starts when a finger (or stylus) first touches the contact surface. other fingers may subsequently touch the surface and optionally move across the touch surface. the interaction ends when the fingers are
removed from the surface. during this interaction, an application receives touch events during the start, move, and end phases. the application may apply its own semantics to the touch inputs. interfaces touch events consist of three interfaces (touch, touchevent and touchlist) and the following event types: touchstart - fired when a touch point is placed on the touch surface. touchmove - fired wh...
...e start, move, and end phases. the application may apply its own semantics to the touch inputs. interfaces touch events consist of three interfaces (touch, touchevent and touchlist) and the following event types: touchstart - fired when a touch point is placed on the touch surface. touchmove - fired when a touch point is moved along the touch surface. touchend - fired when a touch point is
removed from the touch surface. touchcancel - fired when a touch point has been disrupted in an implementation-specific manner (for example, too many touch points are created). the touch interface represents a single contact point on a touch-sensitive device. the contact point is typically referred to as a touch point or just a touch. a touch is usually generated by a finger or stylus on a touchscree...
... target dom element. changedtouches - a list of the touch points whose items depends on the associated event type: for the touchstart event, it is a list of the touch points that became active with the current event. for the touchmove event, it is a list of the touch points that have changed since the last event. for the touchend event, it is a list of the touch points that have been
removed from the surface (that is, the set of touch points corresponding to fingers no longer touching the surface). together, these interfaces define a relatively low-level set of features, yet they support many kinds of touch-based interaction, including the familiar multi-touch gestures such as multi-finger swipe, rotation, pinch and zoom. from interfaces to gestures an application may consi...
Using the User Timing API - Web APIs
re named by the application and can be set at any location in an application. measure events are also named by the application but they are placed between two marks thus they are effectively a midpoint between two marks. this document shows how to create mark and measure performance entry types and how to use user timing methods (which are extensions of the performance interface) to retrieve and
remove entries from the browser's performance timeline. a live version of the examples is available on github, as is the source code. pull requests, enhancement requests and bug reports are welcome. performance marks a performance mark is a named performance entry that is created by the application at some location in an application. the mark is a timestamp in the browser's performance timeline. cre...
...i++) { if (i == 0) log("= getentriesbyname('mark-1', 'mark')", 0); log("... " + entries[i].name, 0); } entries = performance.getentriesbyname("mark-2","mark"); for (var i=0; i < entries.length; i++) { if (i == 0) log("= getentriesbyname('mark-2', 'mark')", 0); log("... " + entries[i].name, 0); } } removing performance marks the performance.clearmarks() method is used to
remove one or more marks from the browser's performance timeline. if a specific mark name is given to this method, only the mark(s) with that name will be
removed. however, if no argument is given, then all performance entries of type "mark" will be
removed from the performance timeline. the following example demostrates both uses of this method. function clear_marks(obj) { if (performance.clearmarks...
...og("= getentriesbyname('measure-1', 'measure')", 1); log("... " + entries[i].name, 1); } entries = performance.getentriesbyname("measure-2","measure"); for (var i=0; i < entries.length; i++) { if (i == 0) log("= getentriesbyname('measure-2', 'measure')", 1); log("... " + entries[i].name, 1); } } removing performance measures the performance.clearmeasures() method is used to
remove measures from the browser's performance timeline. if the method is called with a specific measure name, all measures with that name will be
removed from the timeline. if the method is called with no arguments, all performance entries with a type of "measure" will be
removed from the timeline. the following examples shows both uses of this method. function clear_measures(obj) { if (performance.
Scissor animation - Web APIs
r : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } ;(function(){ "use strict" window.addeventlistener("load", setupanimation, false); // variables to hold the webgl context, and the color and // position of animated squares. var gl, color = getrandomcolor(), position; function setupanimation (evt) { window.
removeeventlistener(evt.type, setupanimation, false); if (!(gl = getrenderingcontext())) return; gl.enable(gl.scissor_test); gl.clearcolor(color[0], color[1], color[2], 1.0); // unlike the browser window, vertical position in webgl is // measured from bottom to top. in here we set the initial // position of the square to be at the top left corner of the // drawing buffer. position =...
...rcolor(color[0], color[1], color[2], 1.0); // unlike the browser window, vertical position in webgl is // measured from bottom to top. in here we set the initial // position of the square to be at the top left corner of the // drawing buffer. ...
...var size = [60, 60], velocity = 3.0; function drawanimation () { gl.scissor(position[0], position[1], siz...
Using XMLHttpRequest - Web APIs
t. this could prove difficult to manipulate and analyze. there are four primary ways of analyzing this xml document: using xpath to address (or point to) parts of it. manually parsing and serializing xml to strings or objects. using xmlserializer to serialize dom trees to strings or to files. regexp can be used if you always know the content of the xml document beforehand. you might want to
remove line breaks, if you use regexp to scan with regard to line breaks. however, this method is a "last resort" since if the xml code changes slightly, the method will likely fail. note: xmlhttprequest can now interpret html for you using the responsexml property. read the article about html in xmlhttprequest to learn how to do this. processing a responsetext property containing an html document ...
.... there are three primary ways to analyze and parse this raw html string: use the xmlhttprequest.responsexml property as covered in the article html in xmlhttprequest. inject the content into the body of a document fragment via fragment.body.innerhtml and traverse the dom of the fragment. regexp can be used if you always know the content of the html responsetext beforehand. you might want to
remove line breaks, if you use regexp to scan with regard to linebreaks. however, this method is a "last resort" since if the html code changes slightly, the method will likely fail. handling binary data although xmlhttprequest is most commonly used to send and receive textual data, it can be used to send and receive binary content. there are several well tested methods for coercing the response of a...
...ry() method in conjunction with the readasbinarystring() method of the filereader api. as such, the above script makes sense only when you are dealing with small files. if you do not intend to upload binary content, consider instead using the formdata api. note: the non-standard sendasbinary method is considered deprecated as of gecko 31 (firefox 31 / thunderbird 31 / seamonkey 2.28) and will be
removed soon. the standard send(blob data) method can be used instead. using formdata objects the formdata constructor lets you compile a set of key/value pairs to send using xmlhttprequest. its primary use is in sending form data, but can also be used independently from a form in order to transmit user keyed data. the transmitted data is in the same format the form's submit() method uses to send data...
XRInputSourcesChangeEvent.added - Web APIs
nput sources, each identified using an xrinputsource object, which have been newly made available for use. syntax let addedinputs = xrinputsourceschangeevent.added; value an array of zero or more xrinputsource objects, each representing one input device added to the xr system. ...
... object, which have been newly made available for use. syntax let addedinputs = xrinputsourceschangeevent.added; value an array of zero or more xrinputsource objects, each representing one input device added to the xr system. examples the example below creates a handler for the inputsourceschange event that processes the lists of added and
removed from the webxr system. it looks for new and
removed devices whose targetraymode is tracked-pointer. ...
... creates a handler for the inputsourceschange event that processes the lists of added and
removed from the webxr system. it looks for new and
removed devices whose targetraymode is tracked-pointer. xrsession.oninputsourcescchange = event => { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { addedpointerdevice(input); } } for (let input of event.
removed) { if (input.targetraymode == "tracked-pointer") {
removedpointerdevice(input); } } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.added' in that specification. working draft initial definition. ...
Using the aria-hidden attribute - Accessibility
this technique demonstrates how to use the aria-hidden attribute. the aria-hidden attribute can either expose or hide non-interactive content from the accessibility api. description adding aria-hidden="true" to an element
removes that element and all of its children from the accessibility tree. this can improve the experience for assistive technology users by hiding: purely decorative content, such as icons or images duplicated content, such as repeated text offscreen or collapsed content, such as menus according to the fourth rule of aria, aria-hidden="true" should not be used on a focusable element. 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. using aria-hidden="false" will n...
...ue", role="presentation", and role="none" on the surface, the aria-hidden="true", role="presentation", and role="none" attributes seem similar because they: hide content from assistive technology cannot be used on a focusable element cannot be used on the parent of an interactive element despite these similarities, the intent behind each attribute is different. aria-hidden="true" will
remove the entire element from the accessibility api. role="presentation" and role="none" will
remove the semantic meaning of an element while still exposing it to assistive technology. values false (default) the element is exposed to the accessibility api. true the element is not exposed to the accessibility api. undefined (default) the user agent determines if the element is exposed to...
... specifications see also using the presentation role role="none" ...
ARIA Test Cases - Accessibility
operly tracked upon activation. - - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - checkbox simple checkbox testcases: set aria-checked="false" for unchecked both
remove or set attribute for unchecked case -- also includes an invalid and required checkbox hierarchical (newly added test not in test results yet) dojo nightly build expected at behavior: screen reader should speak the accessible name followed by both the type being checkbox and the state (checked, unchecked). when pressing space, new state should be announced automatically. markup used: r...
...ewly added test not in test results yet) dojo nightly build expected at behavior: screen reader should speak the accessible name followed by both the type being checkbox and the state (checked, unchecked). when pressing space, new state should be announced automatically. ...
...when toggling, new state should be announced (not checked, partially checked, checked). markup used: role="checkbox" aria-checked="true" | "false" | "mixed" notes: results: at firefox ie opera safari jaws 9 - - n/a n/a j...
ARIA: gridcell role - Accessibility
-619-5098</div> … </div> the first rule of aria is if a native html element or attribute has the semantics and behavior you require, use it instead of re-purposing an element and adding aria. instead use the native html td element in conjunction with the and contenteditable attribute: <td>potato</td> <td>cabbage</td> <td>onion</td> description gridcells with dynamically added, hidden, or
removed rows and columns any element with a role="gridcell" applied to it should use aria to describe its order in the table-style grouping, provided the table, grid, or treegrid has the ability to have rows and/or columns dynamically added, hidden, or
removed. use aria-colindex to describe a gridcell's order in the list of columns, and aria-rowindex to describe a gridcell's order in the list of rows.
...
removed. use aria-colindex to describe a gridcell's order in the list of columns, and aria-rowindex to describe a gridcell's order in the list of rows. use aria-colcount and aria-rowcount on the parent element with role="grid" applied to it to set the total number of columns or rows. this sample code demonstrates a table-style grouping of information where the third and fourth columns have been
removed. ...
... use aria-colcount and aria-rowcount on the parent element with role="grid" applied to it to set the total number of columns or rows. this sample code demonstrates a table-style grouping of information where the third and fourth columns have been
removed. ...
Cognitive accessibility - Accessibility
fundamentally change the meaning of the content and/or functionality, and information and functionality cannot be achieved in another way that would conform. this includes animated gifs, if the gif animates for more than 5 seconds. additional timing criteria to consider are: people who have cognitive or language limitations may need more time to read and to understand. for improved usability
remove any time limit. timed content should also be avoided, with exceptions for non-interactive synchronized media and real-time events. people with attention deficit disorders should be able to focus on content without distractions. the user should be able to postpone or suppress interruptions, except situations involving altering a person to an emergency. this provides access to people with cognitiv...
... order should match the visual order, which in turn should match the tabbing order. if the tab order jumps around, especially in a way that does not match the visual order when navigating with a keyboard, users can become disoriented. focused elements should be visibly focused when a user navigates using a keyboard, the ui should make it obvious which element currently has focus. don't alter or
remove the browser's default :focus styling, unless you're making focus even more obvious. link text conveys meaning the link's text should clearly and concisely communicate what the user should expect to be navigated to next if they choose to activate it. poorly phrased link text may confuse users as to its purpose or destination. some forms of assistive technology allow users to navigate by ...
...g focus even more obvious. link text conveys meaning the link's text should clearly and concisely communicate what the user should expect to be navigated to next if they choose to activate it. poorly phrased link text may confuse users as to its purpose or destination. some forms of assistive technology allow users to navigate by lists of all the links present on the page. links will be
removed from the context of their surrounding non-link content, making the need for understandable link text even more important. an example of a poor experience is a page full of links whose text reads, "click here." without indicating where "here" will take you, the link's purpose is unclear. for screen readers, it is vital that linked text describes the purpose of each link. if you have added conten...
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
the older versions of flexbox, which are pretty easy to identify due to the change in the way that a flex container is created. if you find something referring to display: box or display: flexbox this is outdated information. status in browsers browser support for flexbox is excellent, and the majority of browsers do not need a prefix at this point. safari was the last of the major browsers to
remove prefixes, with the release of safari 9 in 2015. the two browsers you should still keep in mind for cross-browser compatibility are: internet explorer 10, which implemented the display: flexbox version of the specification with the -ms- prefix. uc browser, which still supports the 2009 display: box version only with the -webkit- prefix. note also that internet explorer 11 supports the modern...
... is becoming less and less of a requirement today as support is widespread. .wrapper { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; } autoprefixer online is a useful way to see which prefixes are recommended, depending on how many versions you wish to go back with browser support. you can also check can i use for information about when prefixes were
removed in browsers to make your decision. useful fallback techniques given that flexbox usage is initiated with value of the display property, when needing to support very old browsers which do not support flexbox at all, fallbacks can be created by overwriting one layout method with another. the specification defines what happens if you use other layout methods on an element which then becomes a fle...
...on the container. the items are now flex items, which means they stretch to equal height. any float behaviour does not apply. you can test the fallback behaviour by removing display: flex from the wrapper. display: inline-block once an inline-block item becomes a flex item, it is blockified and so behavior of display: inline-block like preserving white space between items no longer applies.
remove display: flex to see the fallback behavior. you'll see white space added between the items, which is what happens when using display: inine-block as it prefers white space like other inline items. display: table- the css table display properties are potentially very useful as a fallback, due to the fact that they allow design patterns such as full height columns and vertical centering and wo...
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
ms along the main axis — flex-grow, flex-shrink, and flex-basis. fully understanding how these properties work with growing and shrinking items is the real key to mastering flexbox. a first look our three properties control the following aspects of a flex item's flexibility: flex-grow: how much of the positive free space does this item get? flex-shrink: how much negative free space can be
removed from this item? flex-basis: what is the size of the item before growing and shrinking happens? the properties are usually expressed as the shorthand flex property. the following code would set the flex-grow property to 2, flex-shrink to 1 and flex-basis to auto. .item { flex: 2 1 auto; } if you have read the article basic concepts of flexbox, then you will have already had an introduction...
...between the items if i wanted them to fill the container. we have negative free space when the natural size of the items adds up to larger than the available space in the flex container. if i have a 500 pixel-wide container like the one above, but the three flex items are each 200 pixels wide, the total space i need will be 600 pixels, so i have 100 pixels of negative free space. this could be
removed from the items in order to make them fit the container. it is this distribution of positive free space and removal of negative free space that we need to understand in order to understand the flex properties. in the following examples i am working with flex-direction set to row, therefore the size of items will always come from their width. we will be calculating the positive and negative fr...
...his min-content flooring happen in the below example, where the flex-basis is resolving to the size of the content. if you change the width on the flex container — increasing it to 700px for example — and then reduce the flex item width, you can see that the first two items will wrap, however they will never become smaller than that min-content size. as the box gets smaller space is then just
removed from the third item. in practice the shrinking behaviour does tend to give you reasonable results. you don’t usually want your content to disappear completely or for boxes to get smaller than their minimum content, so the above rules make sense in terms of sensible behaviour for content that needs to be shrunk in order to fit into a container. giving items different flex-shrink factors in...
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
should happen if a flex item is collapsed by setting visibility: collapse on an item. see the mdn documentation for the visibility property. the specification describes the behaviour as follows: “specifying visibility:collapse on a flex item causes it to become a collapsed flex item, producing an effect similar to visibility:collapse on a table-row or table-column: the collapsed flex item is
removed from rendering entirely, but leaves behind a "strut" that keeps the flex line’s cross-size stable. thus, if a flex container has only one flex line, dynamically collapsing or uncollapsing items may change the flex container’s main size, but is guaranteed to have no effect on its cross size and won’t cause the rest of the page’s layout to "wobble". flex line wrapping is re-done after coll...
...nt to target flex items using javascript to show and hide content for example. the example in the specification demonstrates one such pattern. in the following live example i have a non-wrapped flex container. the third item has more content than the others yet is set to visibility: collapse and therefore the flex container is retaining a strut of the height required to display this item. if you
remove visibility: collapse from the css or change the value to visible, you will see the item disappear and the space redistribute between non-collapsed items; the height of the flex container should not change. note: use firefox for the below two examples as chrome and safari treat collapse as hidden. when dealing with multiple-line flex containers however you need to understand that the wrappin...
...long enough. that top row then only becomes as tall as a single line of text. if this causes a problem for your layout it may require a rethinking of the structure, for example putting each row into a separate flex container in order that they can’t shift rows. the difference between visibility: hidden and display: none when you set an item to display: none in order to hide it, the item is
removed from the formatting structure of the page. what this means in practice is that counters ignore it, and things like transitions do not run. using visibility: hidden keeps the box in the formatting structure which is useful in that it still behaves as if it were part of the layout even though the user can’t see it. ...
In Flow and Out of Flow - CSS: Cascading Style Sheets
apping content around the float. the box of our paragraph is still displaying according to the rules of normal flow. this is why, to make space around a floated item, you must add a margin to the item, in order to push the line boxes away from it. you cannot apply anything to the following in-flow content to achieve that. absolute positioning giving an item position: absolute or position: fixed
removes it from flow, and any space that it would have taken up is
removed. in the next example i have three paragraph elements, the second element has position absolute, with offset values of top: 30px and right: 30px. it has been
removed from document flow. using position: fixed also
removes the item from flow, however the offsets are based on the viewport rather than the containing block. when ta...
...your page no longer know that element exists so will not respond to it. relative positioning and flow if you give an item relative positioning with position: relative it remains in flow, however you are then able to use the offset values to push it around. the space that it would have been placed in normal flow is reserved however, as you can see in the example below. ...
... summary in this guide we have covered the ways to take an element out of flow in order to achieve some very specific types of positioning. ...
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
ce the layout using grid. i can turn my <ul> into a grid container with three column tracks. however, the width i have assigned to the list items themselves still applies, and it now makes those items a third of the width of the track: if i reset the width to auto, then this will stop the float behavior happening for older browsers. i need to be able to define the width for older browsers, and
remove the width for grid supporting browsers. thanks to css feature queries i can do this, right in my css. feature queries will look very familiar if you have ever used a media query to create a responsive layout. rather than checking a viewport width, or some feature of the browser or device, we check for support of a css property and value pair using an @supports rule. inside the feature query, we ...
...queries i can do this, right in my css. feature queries will look very familiar if you have ever used a media query to create a responsive layout. rather than checking a viewport width, or some feature of the browser or device, we check for support of a css property and value pair using an @supports rule. inside the feature query, we can then write any css we need to apply our modern layout, and
remove anything required for the older layout. @supports (display: grid) { .wrapper { /* do anything for grid supporting browsers here. */ } } feature queries have excellent browser support, and all of the browsers that support the updated grid specification support feature queries too. you can use them to deal with the issue we have with our enhanced: floated layout. i use an @suppo...
...e. */ } } feature queries have excellent browser support, and all of the browsers that support the updated grid specification support feature queries too. you can use them to deal with the issue we have with our enhanced: floated layout. i use an @supports rule to check for support of display: grid. i then do my grid code on the <ul>, set my width and min-height on the <li> to auto. i also
remove the margins and negative margins, and replace the spacing with the grid-gap property. this means i don’t get a final margin on the last row of boxes. the layout now works, even if there is more content in one of the cards, than the others: * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; max-width: 600px; ma...
display - CSS: Cascading Style Sheets
selves. they are replaced by their pseudo-box and their child boxes. please note that the css display level 3 spec defines how the contents value should affect "unusual elements" — elements that aren’t rendered purely by css box concepts such as replaced elements. see appendix b: effects of display: contents on unusual elements for more details. due to a bug in browsers this will currently
remove the element from the accessibility tree — screen readers will not look at what's inside. see the accessibility concerns section below for more details. none turns off the display of an element so that it has no effect on layout (the document is rendered as though the element did not exist). all descendant elements also have their display turned off. to have an element take up the space that ...
... display: contents current impl...
...nt realizing common layouts using grids accessibility concerns display: none using a display value of none on an element will
remove it from the accessibility tree. this will cause the element and all its descendant elements to no longer be announced by screen reading technology. if you want to visually hide the element, a more accessible alternative is to use a combination of properties to
remove it visually from the screen but keep it parseable by assistive technology such as screen readers. display: contents current implementations in most browsers will
remove from the accessibility tree any element with a display value of contents (but descendants will remain). this will cause the element itself to no longer be announced by screen reading technology. this is incorrect behavior accord...
revert - CSS: Cascading Style Sheets
s current value to the value the property would have had if no changes had been made by the current style origin to the current element. thus, it resets the property to its inherited value if it inherits from its parent or to the default value established by the user agent's stylesheet (or by user styles, if any exist). it can be applied to any css property, including the css shorthand all. this
removes from the cascade all of the styles that have been overridden until the style being rolled back to is reached. if used by a site's own styles (the author origin), revert rolls back the property's cascaded value to the user's custom style, if one exists; otherwise, it rolls the style back to the user agent's default style. if used in a user's custom stylesheet, or if the style was applied by t...
...tyle. if used within the user agent's default styles, this keyword is functionally equivalent to unset. the revert keyword works exactly the same as unset in many cases. the only difference is for properties that have values set by the browser or by custom stylesheets created by users (set on the browser side). revert will not affect rules applied to children of an element you reset (but will
remove effects of a parent rule on a child). so if you have a color: green for all sections and all: revert on a specific section the color of the section will be black. but if you have a rule to make all paragraphs red then all paragraphs will still be red in all sections. revert is just a value. it is still possible to override revert value using specificity. the revert keyword is different from ...
... iterate on above example instead of reverting font-weight and color separately you could just revert all of them. h3 { font-weight: normal; color: blue; border-bottom: 1px solid grey; } <h3>this will have custom styles</h3> <p>just some text</p> <h3 style="all: revert">this should be reverted to browser/user defaults</h3> <p>just some text</p> revert on a parent reverting effectively
removes the value for the element you select with some rule and only for that element. to illustrate this we will set a green color on a section and red color on a paragraph. section { color: darkgreen } p { color: red } section.with-revert { color: revert } <section> <h3>this will be dark green</h3> <p>text in paragraph will be red.</p> this will also be dark green. </section> <section class="...
visibility - CSS: Cascading Style Sheets
lity css property shows or hides an element without changing the layout of a document. the property can also hide rows or columns in a <table>. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. to both hide an element and
remove it from the document layout, set the display property to none instead of using visibility. syntax /* keyword values */ visibility: visible; visibility: hidden; visibility: collapse; /* global values */ visibility: inherit; visibility: initial; visibility: unset; the visibility property is specified as one of the keyword values listed below. values visible the element box is visible. hi...
... hidden the element box is invisible (not drawn), but still affects layout as normal. descendants of the element will be visible if they have visibility set to visible. the element cannot receive focus (such as when navigating through tab indexes). collapse for <table> rows, columns, column groups, and row groups, the row(s) or column(s) are hidden and the space they would have occupied is
removed (as if display: none were applied to the column/row of the table). however, the size of other rows and columns is still calculated as though the cells in the collapsed row(s) or column(s) are present. this value allows for the fast removal of a row or column from a table without forcing the recalculation of widths and heights for the entire table. collapsed flex items are hidden, and the space ...
...applied to the column/row of the table). however, the size of other rows and columns is still calculated as though the cells in the collapsed row(s) or column(s) are present. this value allows for the fast removal of a row or column from a table without forcing the recalculation of widths and heights for the entire table. collapsed flex items are hidden, and the space they would have occupied is
removed. for xul elements, the computed size of the element is always zero, regardless of other styles that would normally affect the size, although margins still take effect. for other elements, collapse is treated the same as hidden. accessibility concerns using a visibility value of hidden on an element will
remove it from the accessibility tree. this will cause the element and all its descendan...
white-space - CSS: Cascading Style Sheets
uding between white space characters. such preserved spaces take up space and do not hang, and thus affect the box’s intrinsic sizes (min-content size and max-content size). ...
... take up space and do not hang, and thus affect the box’s intrinsic sizes (min-content size and max-content size). ...
...ous white-space values: new lines spaces and tabs text wrapping end-of-line spaces normal collapse collapse wrap
remove nowrap collapse collapse no wrap
remove pre preserve preserve no wrap preserve pre-wrap preserve preserve wrap hang pre-line preserve collapse wrap
remove break-spaces preserve preserve wrap wrap formal definition initial valuenormalapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | pre | nowrap | pre-wrap | pre-line | break-spaces examples basic example code { white-space: pre; } line breaks inside <pre> elements pre { word-wrap: break-word; /* ie 5...
Video player styling basics - Developer guides
width:75.390625%; } buttons the first major styling task to tackle is to make the video control's buttons actually look like and act like real buttons. each button has some basic styling: .controls button { border:none; cursor:pointer; background:transparent; background-size:contain; background-repeat:no-repeat; } by default, all <button> elements have a border, so this is
removed. since background images will be used to display appropriate icons, the background colour of the button is set to be transparent, non-repeated, and the element should fully contain the image. simple :hover and :focus states are then set for each button that simply alters the opacity of the button: .controls button:hover, .controls button:focus { opacity:0.5; } to obtain appropriate button ...
... buttons are treated in a similar way. progress bar the <progress> element has the following basic style set up: .controls progress { display:block; width:100%; height:81%; margin-top:0.125rem; border:none; color:#0095dd; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } like the <button> elements, <progress> also has a default border, which is
removed here. it is also given a slight rounded corner for aesthetic reasons. the color property is also defined here as internet explorer uses this defined colour for styling the progress bar's background colour as it increases. as mentioned in the previous article, there is a fallback provided for browsers that do not support the <progress> element; this also needs to be styled appropriately: .con...
...mplemention hasn't changed. responsive styling now that the player has its basic look and feel taken care of, some other styling changes — involving media queries — need to be made in order to make it responsive. the player currently works fairly well until displayed on a "medium" screen (e.g. 1024px/64em) or smaller. ...
Audio and Video Delivery - Developer guides
ontrols are not displayed, create custom controls using html and css, then use javascript to link your controls to the audio/video api. if you need something extra, it's possible to add features that are not currently present in default players, such as playback rate, quality stream switches or even audio spectrums. you can also choose how to make your player responsive — for example you might
remove the progress bar under certain conditions. you may detect click, touch and/or keyboard events to trigger actions such as play, pause and scrubbing. it's often important to remember keyboard controls for user convenience and accessibility. a quick example — first set up your audio and custom controls in html: <audio id="my-audio" src="http://jplayer.org/audio/mp3/miaow-01-tempered-song.mp3"...
...m audio player. other tips for audio/video stopping the download of media while stopping the playback of media is as easy as calling the element's pause() method, the browser keeps downloading the media until the media element is disposed of through garbage collection. here's a trick that stops the download at once: var mediaelement = document.queryselector("#mymediaelementid"); mediaelement.
removeattribute("src"); mediaelement.load(); by removing the media element's src attribute and invoking the load() method, you release the resources associated with the video, which stops the network download. you must call load() after removing the attribute, because just removing the src attribute does not invoke the load algorithm. if the <video> element also has <source> element descendants, those...
...; mediaelement.load(); by removing the media element's src attribute and invoking the load() method, you release the resources associated with the video, which stops the network download. you must call load() after removing the attribute, because just removing the src attribute does not invoke the load algorithm. if the <video> element also has <source> element descendants, those should also be
removed before calling load(). note that just setting the src attribute to an empty string will actually cause the browser to treat it as though you're setting a video source to a relative path. this causes the browser to attempt another download to something that is unlikely to be a valid video. seeking through media media elements provide support for moving the current playback position to specific...
Writing forward-compatible websites - Developer guides
ble in event handlers. don't assume that browsers with support for a given dom feature must also have some other, especially nonstandard, dom feature. or, conversely, that they don't have support for some other feature (e.g., don't assume that a browser that supports onload on script elements will never support onreadystatechange on them). as browsers converge behavior, they both add features and
remove them. they also fix bugs. all three of these have happened in the past and will happen again. so don't sniff for one feature or object and then assume that, because it exists or doesn't exist, some other feature or object must also exist or not exist. don't ua-sniff this is really a particularly common instance of assuming that one feature (the presence of a particular substring in the user a...
...recent version of a browser you have tested, as in the case of the ua sniffing advice above. avoid depending on cutting-edge nonstandard features even if the feature is prefixed, using it could be dangerous: as the specification evolves the browser's prefixed implementation can likewise change to track the specification. and once the feature is standardized, the prefixed version is likely to be
removed. prefixed, non-standard features are provided by browser developers for you to experiment with and offer feedback on, and aren't meant to be deployed. if you choose to use them, be prepared to need to frequently update your site to keep up with changes. when using cutting-edge features (even standard ones) that are not universally implemented, make sure to test fallback paths make sure to tes...
...ing to that attribute. here's an example that works in browsers without html5 support but breaks in a browser supporting html5: <form action="http://www.example.com"> <input type="submit" value="submit the form" </form> due to the missing > on the input tag. don't leave experiments that didn't work in your code if you try using a css property to do something you want, but it has no effect,
remove it. it might start doing something you don't expect in the future ...
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
be marked up and styled in whatever way you want, and then javascript can be used along with the htmlmediaelement api to wire up their functionality. video player styling basics provides some useful styling techniques — it is written in the context of <video>, but much of it is equally applicable to <audio>. detecting addition and removal of tracks you can detect when tracks are added to and
removed from an <audio> element using the addtrack and
removetrack events. however, these events aren't sent directly to the <audio> element itself. instead, they're sent to the track list object within the <audio> element's htmlmediaelement that corresponds to the type of track that was added to the element: htmlmediaelement.audiotracks an audiotracklist containing all of the media element's audio ...
...o the element. htmlmediaelement.texttracks add an addtrack event listener to this texttracklist to be notified when new text tracks are added to the element. note: even though it's an <audio> element, it still has video and text track lists, and can in fact be used to present video, although the use interface implications can be odd. ...
...deo and text track lists, and can in fact be used to present video, although the use interface implications can be odd. for example, to detect when audio tracks are added to or
removed from an <audio> element, you can use code like this: var elem = document.queryselector("audio"); elem.audiotracklist.onaddtrack = function(event) { trackeditor.addtrack(event.track); }; elem.audiotracklist.on
removetrack = function(event) { trackeditor.
removetrack(event.track); }; this code watches for audio tracks to be added to and
removed from the element, and calls a hypothetical function on a track editor to register and
remove the track from the editor's list of available tracks. you can also use addeventlistener() to listen for the addtrack and
removetrack events. examples basic usage the foll...
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
vel browsing context (the one named _top). allow-top-navigation-by-user-activation: lets the resource navigate the top-level browsing context, but only if initiated by a user gesture. notes about sandboxing: when the embedded document has the same origin as the embedding page, it is strongly discouraged to use both allow-scripts and allow-same-origin, as that lets the embedded document
remove the sandbox attribute — making it no more secure than not using the sandbox attribute at all. sandboxing is useless if the attacker can display content outside a sandboxed iframe — such as if the viewer opens the frame in a new tab. such content should be also served from a separate origin to limit potential damage. the sandbox attribute is unsupported in internet explorer 9 and earlier. ...
... frame in a new tab. such content should be also served from a separate origin to limit potential damage. the sandbox attribute is unsupported in internet explorer 9 and earlier. src the url of the page to embed. use a value of about:blank to embed an empty page that conforms to the same-origin policy. also note that programatically removing an <iframe>'s src attribute (e.g. via element.
removeattribute()) causes about:blank to be loaded in the frame in firefox (from version 65), chromium-based browsers, and safari/ios. srcdoc inline html to embed, overriding the src attribute. if a browser does not support the srcdoc attribute, it will fall back to the url in the src attribute. width the width of the frame in css pixels. default is 300. deprecated attributes these attributes are...
...nd safari/ios. srcdoc inline html to embed, overriding the src attribute. if a browser does not support the srcdoc attribute, it will fall back to the url in the src attribute. width the width of the frame in css pixels. default is 300. deprecated attributes these attributes are deprecated and may no longer be supported by all user agents. you should not use them in new content, and try to
remove them from existing content. align the alignment of this element with respect to the surrounding context. frameborder the value 1 (the default) draws a border around this frame. the value 0
removes the border around this frame, but you should instead use the css property border to control <iframe> borders. longdesc a url of a long description of the frame's content. due to widespread...
<input type="datetime-local"> - HTML: Hypertext Markup Language
input type="datetime-local"> doesn't support form control sizing attributes such as size. you'll have to resort to css for customizing the sizes of these elements. setting timezones one thing the datetime-local input type doesn't provide is a way to set the time zone and/or locale of the date/time control. this was available in the datetime input type, but this type is now obsolete, having been
removed from the spec. the main reasons why this was
removed are a lack of implementation in browsers, and concerns over the user interface/experience. it is easier to just have a control (or controls) for setting the date/time and then deal with the locale in a separate control. for example, if you are creating a system where the user is likely to already be logged in, with their locale already set, y...
...; width: 300px; } input:invalid+span:after { content: '✖'; padding-left: 5px; } input:valid+span:after { content: '✓'; padding-left: 5px; } important: html form validation is not a substitute for scripts that ensure that the entered data is in the proper format. it's far too easy for someone to make adjustments to the html that allow them to bypass the validation, or to
remove it entirely. it's also possible for someone to simply bypass your html entirely and submit the data directly to your server. if your server-side code fails to validate the data it receives, disaster could strike when improperly-formatted data is submitted (or data which is too large, is of the wrong type, and so forth). handling browser support as mentioned above, the major problem with using ...
... if(month === 'january' || month === 'march' || month === 'may' || month === 'july' || month === 'august' || month === 'october' || month === 'december') { daynum = 31; } else if(month === 'april' || month === 'june' || month === 'september' || month === 'november')...
<input type="email"> - HTML: Hypertext Markup Language
ze, and type idl attributes list and value methods select() value the <input> element's value attribute contains a domstring which is automatically validated as conforming to e-mail syntax. more specifically, there are three possible value formats that will pass validation: an empty string ("") indicating that the user did not enter a value or that the value was
removed. a single properly-formed e-mail address. this doesn't necessarily mean the e-mail address exists, but it is at least formatted correctly. in simple terms, this means username@domain or username@domain.tld. there's more to it than that, of course; see validation for a regular expression that matches the e-mail address validation algorithm. if and only if the multiple attribute is specified, th...
... least formatted correctly. in simple terms, this means username@domain or username@domain.tld. there's more to it than that, of course; see validation for a regular expression that matches the e-mail address validation algorithm. if and only if the multiple attribute is specified, the value can be a list of properly-formed comma-separated e-mail addresses. any trailing and leading whitespace is
removed from each address in the list. see validation for details on how e-mail addresses are validated to ensure that they're formatted properly. additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, email inputs support the following attributes: attribute description list the id of the <datalist> element that...
...uirements to be a valid e-mail address. but there's also the option to add additional filtering to ensure that your own specialized needs are met, if you have any. important: html form validation is not a substitute for scripts that ensure that the entered data is in the proper format. it's far too easy for someone to make adjustments to the html that allow them to bypass the validation, or to
remove it completely. it's also possible for someone to simply bypass your html entirely and submit the data directly to your server. if your server-side code fails to validate the data it receives, disaster could strike when improperly-formatted data (or data which is too large, is of the wrong type, and so forth) is entered into your database. basic validation browsers that support the email input ...
<input type="number"> - HTML: Hypertext Markup Language
sers don't display generated content very effectively on some types of form inputs. (read, for example, the section on <input type="date"> validation.) important: html form validation is not a substitute for server-side scripts that ensure that the entered data is in the proper format! it's far too easy for someone to make adjustments to the html that allow them to bypass the validation, or to
remove it entirely. it's also possible for someone to bypass your html and submit the data directly to your server. if your server-side code fails to validate the data it receives, disaster could strike when improperly-formatted data is submitted (or data which is too large, is of the wrong type, and so forth). pattern validation <input type="number"> elements do not support use of the pattern attri...
...n"]'); switchbtn.addeventlistener('click', function() { if(switchbtn.getattribute('class') === 'meters') { switchbtn.setattribute('class', 'feet'); switchbtn.value = 'enter height in meters'; metersinputgroup.style.display = 'none'; feetinputgroup.style.display = 'block'; feetinput.setattribute('required', ''); inchesinput.setattribute('required', ''); metersinput.
removeattribute('required'); metersinput.value = ''; } else { switchbtn.setattribute('class', 'meters'); switchbtn.value = 'enter height in feet and inches'; metersinputgroup.style.display = 'block'; feetinputgroup.style.display = 'none'; feetinput.
removeattribute('required'); inchesinput.
removeattribute('required'); metersinput.setattribute('required', ''); fee...
...tching mechanism. this is pretty simple, mostly involving changing over the button's class and <label>, and updating the display values of the two sets of inputs when the button is pressed. (note that we're not converting back and forth between meters and feet/inches here, which a real-life web application would probably do.) note: when the user clicks the button, the required attribute(s) are
removed from the input(s) we are hiding, and empty the value attribute(s). this is so the form can be submitted if both input sets aren't filled in. it also ensures that the form won't submit data that the user didn't mean to. if you didn't do this, you'd have to fill in both feet/inches and meters to submit the form! specifications specification status comment html livin...
Using the application cache - HTML: Hypertext Markup Language
as of firefox 44+, when appcache is used to provide offline support for a page, a warning message displays in the console advising developers to use service workers instead (bug 1204581). introduction html5 provides an application caching mechanism that lets web applications run offline. this application cache (appcache) interface lists resources that browsers should cache to be available offline. applications that are cached load and work correctly offline, even if users press the refresh button. ...
...: c:\users\<username>\appdata\local\mozilla\firefox\profiles\<salt>.<profile name>\offlinecache mac/linux: /users/<username>/library/caches/firefox/profiles/<salt>.<profile name>/offlinecache in firefox the current status of the offline cache can be inspected on the about:cache page (under the "offline cache device" heading). the offline cache can be cleared for each site separately using the "
remove..." button in tools -> options -> advanced -> network -> offline data. prior to firefox 11, neither tools -> clear recent history nor tools -> options -> advanced -> network -> offline data -> clear now cleared the offline cache. this has been fixed. on linux, you can find the setting at edit > preferences > advanced > network > offline web content and user data see also clearing the dom stora...
..., neither tools -> clear recent history nor tools -> options -> advanced -> network -> offline data -> clear now cleared the offline cache. this has been fixed. on linux, you can find the setting at edit > preferences > advanced > network > offline web content and user data see also clearing the dom storage data. application caches can also become obsolete. if an application's manifest file is
removed from the server, the browser
removes all application caches that use that manifest, and sends an "obsoleted" event to the applicationcache object. this sets the application cache's state to obsolete. the cache manifest file referencing a cache manifest file the manifest attribute in a web application can specify either the relative path of a cache manifest file or an absolute url. (absolute u...
Browser detection using the user agent - HTTP
e cases in which this is necessary. in these cases, you should first analyze your situation to be sure it's really necessary. can you prevent it by adding some non-semantic <div> or <span> elements? the difficulty of successfully using user agent detection is worth a few disruptions to the purity of your html. also, rethink your design: can you use progressive enhancement or fluid layouts to help
remove the need to do this? avoiding user agent detection if you want to avoid using user agent detection, you have options! feature detection feature detection is where you don't try to figure out which browser is rendering your page, but instead, you check to see if the specific feature you need is available. if it's not, you use a fallback. in those rare cases where behavior differs between br...
... it assumed that all user agent strings that include the substring "chrome" are chrome. ua strings are notoriously misleading. it assumed that the lookbehind feature would always be available if the browser was chrome. the agent might be an older version of chrome, from before support was added, or (because the feature was experimental at the time) it could be a later version of chrome that
removed it. most importantly, it assumed no other browsers would support the feature. support could have been added to other browsers at any time, but this code would have continued choosing the inferior path. problems like these can be avoided by testing for support of the feature itself instead: var islookbehindsupported = false; try { new regexp("(?<=)"); islookbehindsupported = true...
...]; function whenmediachanges(){mediaqueryupdated = true} var listentomediaquery = iswebkit ? function(mq, f) { if(/height|width/.test(mq.media)) mql.push([mq, f]); mq.addlistener(f), mq.addlistener(whenmediachanges); } : function(){}; var destroymediaquery = iswebkit ? ...
Clear-Site-Data - HTTP
d be cleared, the wildcard directive ("*") can be used. // single directive clear-site-data: "cache" // multiple directives (comma separated) clear-site-data: "cache", "cookies" // wild card clear-site-data: "*" directives all directives must comply with the quoted-string grammar. a directive that does not include the double quotes is invalid. "cache" indicates that the server wishes to
remove locally cached data (i.e. the browser cache, see http caching) for the origin of the response url. depending on the browser, this might also clear out things like pre-rendered pages, script caches, webgl shader caches, or address bar suggestions. "cookies" indicates that the server wishes to
remove all cookies for the origin of the response url. http authentication credentials are also cleared ...
...hader caches, or address bar suggestions. "cookies" indicates that the server wishes to
remove all cookies for the origin of the response url. http authentication credentials are also cleared out. this affects the entire registered domain, including subdomains. so https://example.com as well as https://stage.example.com, will have cookies cleared. "storage" indicates that the server wishes to
remove all dom storage for the origin of the response url. this includes storage mechanisms such as: localstorage (executes localstorage.clear), sessionstorage (executes sessionstorage.clear), indexeddb (for each database execute idbfactory.deletedatabase), service worker registrations (for each service worker registration, execute serviceworkerregistration.unregister), appcache, websql da...
...rver wishes to reload all browsing contexts for the origin of the response (location.reload). "*" (wildcard) indicates that the server wishes to clear all types of data for the origin of the response. if more data types are added in future versions of this header, they will also be covered by it. examples sign out of web site if a user signs out of your website or service, you might want to
remove locally stored data. you can achieve that by adding the clear-site-data header when sending the page confirming that logging out from the site has been accomplished successfully (https://example.com/logout, for example): clear-site-data: "cache", "cookies", "storage", "executioncontexts" clearing cookies if this header is delivered with the response at https://example.com/clear-cookies, all co...
Array.prototype.flatMap() - JavaScript
words from a list of sentences. let arr1 = ["it's sunny in", "", "california"]; arr1.map(x => x.split(" ")); // [["it's","sunny","in"],[""],["california"]] arr1.flatmap(x => x.split(" ")); // ["it's","sunny","in", "", "california"] notice, the output list length can be different from the input list length. ...
...) flatmap can be used as a way to add and
remove items (modify the number of items) during a map. in other words, it allows you to map many items to many items (by handling each input item separately), rather than always one-to-one. in this sense, it works like the opposite of filter. simply return a 1-element array to keep the item, a multiple-element array to add items, or a 0-element array to
remove the item. ...
...
remove items (modify the number of items) during a map. in other words, it allows you to map many items to many items (by handling each input item separately), rather than always one-to-one. in this sense, it works like the opposite of filter. simply return a 1-element array to keep the item, a multiple-element array to add items, or a 0-element array to
remove the item. ...
Map.prototype.delete() - JavaScript
mymap.has('bar'); // returns false. the "bar" element is no longer present. ...
...mymap.has('bar'); // returns false. the "bar" element is no longer present. ...
...the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax mymap.delete(key); parameters key the key of the element to
remove from the map object. return value true if an element in the map object existed and has been
removed, or false if the element does not exist. examples using delete() var mymap = new map(); mymap.set('bar', 'foo'); mymap.delete('bar'); // returns true. successfully
removed. mymap.has('bar'); // returns false. the "bar" element is no longer present. specifications specification ecmascript (ecma-262)the definition of 'map.prototype.delete' in that specification. ...
Set.prototype.delete() - JavaScript
myset.has('foo'); // returns false. the "foo" element is no longer present. ...
... myset.has('foo'); // returns false. the "foo" element is no longer present. ...
...cified element from a set object. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax myset.delete(value); parameters value the value to
remove from myset. return value returns true if value was successfully
removed from myset; otherwise false. examples using the delete() method const myset = new set(); myset.add('foo'); myset.delete('bar'); // returns false. no "bar" element found to be deleted. myset.delete('foo'); // returns true. successfully
removed. myset.has('foo'); // returns false. the "foo" element is no longer present. let's checkout below how to delete an object from a set. const set...
WeakMap.prototype.delete() - JavaScript
wm.has(window); // returns false. ...
... wm.has(window); // returns false. ...
...ct. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax wm.delete(key); parameters key the key of the element to
remove from the weakmap object. return value true if an element in the weakmap object has been
removed successfully. false if the key is not found in the weakmap or if the key is not an object. examples using the delete method var wm = new weakmap(); wm.set(window, 'foo'); wm.delete(window); // returns true. successfully
removed. wm.has(window); // returns false. the window object is no longer in the weakmap. specifications specification ecmascript (ecma-262)the defin...
WeakSet - JavaScript
ameter). the number of objects or their traversal order is immaterial, so a weakset is more suitable (and performant) than a set for tracking object references, especially if a very large number of objects is involved. constructor weakset() creates a new weakset object. instance methods weakset.prototype.add(value) appends value to the weakset object. ...
...while they are similar objects, they are not the same object. and so they are both added to the set. specifications specification ecmascript (ecma-262)the definition of 'weakset' in that specification. ...
...will return false afterwards. weakset.prototype.has(value) returns a boolean asserting whether value is present in the weakset object or not. examples using the weakset object const ws = new weakset(); const foo = {}; const bar = {}; ws.add(foo); ws.add(bar); ws.has(foo); // true ws.has(bar); // true ws.delete(foo); //
removes foo from the set ws.has(foo); // false, foo has been
removed ws.has(bar); // true, bar is retained note that foo !== bar. while they are similar objects, they are not the same object. and so they are both added to the set. specifications specification ecmascript (ecma-262)the definition of 'weakset' in that specification. ...
Subdomain takeovers - Web security
a subdomain takeover occurs when an attacker gains control over a subdomain of a target domain. typically, this happens when the subdomain has a canonical name (cname) in the domain name system (dns), but no host is providing content for it. this can happen because either a virtual host hasn’t been published yet or a virtual host has been
removed. an attacker can take over that subdomain by providing their own virtual host and then hosting their own content for it. if an attacker can do this, they can potentially read cookies set from the main domain, perform cross-site scripting, or circumvent content security policies, thereby enabling them to capture protected information (including logins) or send malicious content to unsuspecting users. a subdomain is like an electrical outlet. ...
...an do this, they can potentially read cookies set from the main domain, perform cross-site scripting, or circumvent content security policies, thereby enabling them to capture protected information (including logins) or send malicious content to unsuspecting users. a subdomain is like an electrical outlet. if you have your own appliance (host) plugged into it, everything is fine. however, if you
remove your appliance from the outlet (or haven’t plugged one in yet), someone can plug in a different one. you must cut power at the breaker or fuse box (dns) to prevent the outlet from being used by someone else. how do they happen? if the process of provisioning or deprovisioning (removing) a virtual host is not handled properly, there can be an opportunity for an attacker to take over a subdomai...
... a virtual host with the same hosting provider, using your subdomain name. in such a case, as soon as you set up dns in step 2, the attacker can host content on your subdomain. during deprovisioning you take down your virtual host, but an attacker sets up a new virtual host using the same name and hosting provider. you (or your company) decide that you no longer want to maintain a blog, so you
remove the virtual host from the hosting provider. however, if you don’t
remove the dns entry that points to the hosting provider, an attacker can now create their own virtual host with that provider, claim your subdomain, and host their own content under that subdomain. how can i prevent them? preventing subdomain takeovers is a matter of order of operations in lifecycle management for virtual host...
Interacting with page scripts - Archive of obsolete content
contentscript: "console.log(unsafewindow.foo);" }) tabs.open(pageurl); be careful using unsafewindow: you can't rely on any of its properties or functions being, or doing, what you expect. any of them, even setters and getters, could have been redefined by a page script. don't use it unless you trust the page, and even then be careful. also, unsafewindow isn't a supported api, so it could be
removed or changed in a future version of the sdk. expose objects to page scripts until firefox 30, you could use unsafewindow to perform the reverse procedure, and make objects defined in content scripts available to page scripts: // content-script.js unsafewindow.contentscriptobject = {"greeting" : "hello from add-on"}; // page-script.js var button = document.getelementbyid("show-content-scrip...
... the old behavior you can switch firefox back to the old behavior in which content scripts could expose objects and functions to page scripts using unsafewindow. to do this, add an option called “unsafe-content-script” under the “permissions” key in package.json, and set it to true. "permissions": { "unsafe-content-script": true } this is only a temporary migration aid, and will be
removed eventually. communicating with page scripts there are two different ways a content script can communicate with a page script: using the dom postmessage() api using custom dom events using the dom postmessage api note that before firefox 31 code in content scripts can't use window to access postmessage() and addeventlistener() and instead must use document.defaultview. see the section ...
XUL Migration Guide - Archive of obsolete content
amic manipulation of the dom directly access the tabbrowser object modifying the browser chrome this example uses the action button api, which is only available from firefox 29 onwards. the window/utils module gives you direct access to chrome windows, including the browser's chrome window. ...
...s to chrome windows, including the browser's chrome window. here's a really simple example add-on that modifies the browser chrome using window/utils: function
removeforwardbutton() { var window = require("sdk/window/utils").getmostrecentbrowserwindow(); var forward = window.document.getelementbyid('forward-button'); var parent = window.document.getelementbyid('urlbar-container'); parent.
removechild(forward); } require("sdk/ui/button/action").actionbutton({ id: "
remove-forward-button", label: "
remove forward button", icon: "./icon-16.png", onclick:
removeforwardbutton }); there are more useful examples of this technique in the jetpack wiki's collection of third party modules. accessing tabbrowser this example uses the action button api, which is only available from firefox...
page-worker - Archive of obsolete content
ripts instead: in the content script: change occurrences of self to addon. for example, self.port.emit("my-event") becomes addon.port.emit("my-event"). in the html page itself: add a <script> tag to load the script. so if your content script is saved under data as "my-script.js", you need a line like <script src="my-script.js"></script> in the page header. in the "main.js" file:
remove the contentscriptfile option in the page() constructor. globals constructors page(options) creates an uninitialized page worker instance. parameters options : object optional options: name type contenturl string the url of the content to load in the panel. allow object an object with keys to configure the permissions on t...
... load another page. postmessage(message) sends a message to the content scripts. parameters message : value the message to send. must be json-able. on(type, listener) registers an event listener with the page worker. see working with events for help with events. parameters type : string the type of event to listen for. listener : function the listener function that handles the event.
removelistener(type, listener) unregisters an event listener from the page worker. parameters type : string the type of event for which listener was registered. listener : function the listener function that was registered. properties port object that allows you to: send events to the content script using the port.emit function receive events from the content script using the port.on functi...
simple-storage - Archive of obsolete content
le you are over quota, all data stored since the last time you were under quota will not be persisted. you should not let that happen. to listen for quota notifications, register a listener for the "overquota" event. it will be called when your storage goes over quota. function myonoverquotalistener() { console.log("uh oh."); } ss.on("overquota", myonoverquotalistener); listeners can also be
removed: ss.
removelistener("overquota", myonoverquotalistener); to find out how much of your quota you're using, check the module's quotausage property. it indicates the percentage of quota your storage occupies. if you're within your quota, it's a number from 0 to 1 (so a value of 0.5 means that you're using 50% of your quota and 1.0 means you're using your entire quota). if your add-on is using more...
...s a number from 0 to 1 (so a value of 0.5 means that you're using 50% of your quota and 1.0 means you're using your entire quota). if your add-on is using more than its quota, this value is greater than 1.0. therefore, when you're notified that you're over quota, you should respond by removing data from the storage space until your quotausage is less than or equal to 1. which particular data you
remove is up to you. for example: ss.storage.mylist = [ /* some long array */ ]; ss.on("overquota", function () { while (ss.quotausage > 1) ss.storage.mylist.pop(); }); private browsing if your storage is related to your users' web history, personal information, or other sensitive data, your add-on should respect private browsing. to read about how to opt into private browsing mode and how to ...
frame/hidden-frame - Archive of obsolete content
<iframe> elements) that are not displayed to the user. this is useful in the construction of apis that load web content not intended to be directly seen or accessed by users, like page-worker. it is also useful in the construction of apis that load web content for intermittent display, such as panel. usage the module exports a constructor function, hiddenframe, and two other functions, add and
remove. hiddenframe constructs a new hidden frame. add registers a hidden frame, preparing it to load content.
remove unregisters a frame, unloading any content that was loaded in it. the following code creates a hidden frame, loads a web page into it, and then logs its title: var hiddenframes = require("sdk/frame/hidden-frame"); let hiddenframe = hiddenframes.add(hiddenframes.hiddenframe({ onready...
...ns to call when the frame is ready to load content. you must specify an onready callback and refrain from using the hidden frame until the callback gets called, because hidden frames are not always ready to load content the moment they are added. functions add(hiddenframe) register a hidden frame, preparing it to load content. parameters hiddenframe : hiddenframe the frame to add
remove(hiddenframe) unregister a hidden frame, unloading any content that was loaded in it. parameters hiddenframe : hiddenframe the frame to
remove hiddenframe hiddenframe objects represent hidden frames. properties element the host application frame in which the page is loaded. events ready this event is emitted when the dom for a hidden frame content is ready. it is equivalent to the domc...
test/utils - Archive of obsolete content
ee a particular state before running a test, and to clean up after your test. let { before, after } = require('sdk/test/utils'); let { search } = require('sdk/places/bookmarks'); exports.testcountbookmarks = function (assert, done) { search().on('end', function (results) { assert.equal(results, 0, 'should be no bookmarks'); done(); }); }; before(exports, function (name, assert) {
removeallbookmarks(); }); require('sdk/test').run(exports); both before and after may be asynchronous. to make them asynchronous, pass a third argument done, which is a function to call when you have finished: let { before, after } = require('sdk/test/utils'); let { search } = require('sdk/places/bookmarks'); exports.testcountbookmarks = function (assert, done) { search().on('end', function (resul...
...may be asynchronous if beforefn accepts a third argument, which is a callback. parameters exports : object a test file's exports object beforefn : function the function to be called before each test. it has two arg...
ui/sidebar - Archive of obsolete content
active window. this parameter is new in firefox 33. on(type, listener) registers an event listener with the sidebar. parameters type : string the type of event to listen for. listener : function the listener function that handles the event. once(type, listener) registers an event listener with the sidebar. the difference between on and once is that on will continue listening until it is
removed, whereas once is
removed automatically upon the first event it catches. parameters type : string the type of event to listen for. listener : function the listener function that handles the event.
removelistener(type, listener) unregisters/
removes an event listener from the sidebar. parameters type : string the type of event for which listener was registered. listener : function the l...
... the worker passed into the corresponding attach event. after detach, this worker can no longer be used to communicate with the scripts in that sidebar instance, because it has been unloaded. if you listen to attach, and in the listener take a reference to the worker object that's passed into it, so you can send it messages later on, then you should probably listen to detach, and in its handler,
remove your reference to the worker. here's an add-on that adds each worker to an array in the attach handler, and makes sure that its references are cleaned up by listening to detach and removing workers as they are detached: var workerarray = []; function attachworker(worker) { workerarray.push(worker); } function detachworker(worker) { var index = workerarray.indexof(worker); if(index != -1...
Creating annotations - Archive of obsolete content
the widget api is deprecated from firefox 29 onwards. please see the ui module for replacements. in particular, for a simple button, try the action button or toggle button apis, and for a more complex widget try the toolbar or sidebar apis. we'll use two objects to create annotations: a page-mod to find page elements that the user can annotate, and a panel for the user to enter the annotation text itself. selector page-mod selector content scripts the content script for the selector page-mod uses jquery to examine and manipulate the dom. ...
... uses workers, see the page-mod documentation. in the attach handler we do three things: send the content script a message with the current activation status add the worker to an array called selectors so we can send it messages later on assign a message handler for messages from this worker. if the message is show we will just log the content for the time being. if the message is detach we
remove the worker from the selectors array. at the top of the file import the page-mod module and declare an array for the workers: var pagemod = require('sdk/page-mod'); var selectors = []; add detachworker(): function detachworker(worker, workerarray) { var index = workerarray.indexof(worker); if(index != -1) { workerarray.splice(index, 1); } } edit toggleactivation() to notify the wor...
Using XPCOM without chrome - Archive of obsolete content
sdk/platform/xpcom , it's possible to exclude chrome and xpcomutils in some cases. below is an example for the xpcom bookmark observer. examples bookmarks observer normally, a bookmark observer would require chrome components and xpcomutils as described in the following links: (observing changes to bookmarks and tags) , (creating event targets). ...
... (observing changes to bookmarks and tags) , (creating event targets). however, with the sdk module , we can
remove this need. below is an example, where we extend the xpcom module's unknown class with an nsinavbookmarkobserverinterface and one of its optional interface methods (onitemchanged). we can then create an object from it and add it as an observer to the bookmarks service. ...
HTML to DOM - Archive of obsolete content
remote webpage, it is often advantageous to turn that html string into dom for easier manipulation. however, there are potential dangers involved in injecting remote content in a privileged context in your extension, so it can be desirable to parse the html safely. the function below will safely parse simple html and return a dom object which can be manipulated like web page elements. this will
remove tags like <script>, <style>, <head>, <body>, <title>, and <iframe>. it will also
remove all javascript, including element attributes that contain javascript. function htmlparser(ahtmlstring){ 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.appendc...
...frame.webnavigation.allowsubframes = false; // listen for load frame.addeventlistener("load", function (event) { // the document of the html in the dom var doc = event.originaltarget; // skip blank page or frame if (doc.location.href == "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.
removechild(frame); // or set location "about:blank" // frame.contentdocument.location.href = "about:blank"; },10); }, true); } // load ...
Miscellaneous - Archive of obsolete content
it also collapses consecutive whitespaces into a single whitespace, and returns at most 150 characters, making it ideal to display text in context menus. it is defined at //github.com/realityripple/pale-moon/blob/master/palemoon/base/content/browser.js#l5113. note that it returns the empty string (""), not false, when nothing is selected. getbrowserselection() is ...
....nsiioservice); function certsservice() {} certsservice.prototype = { observe: function(asubject, atopic, adata) { switch(atopic) { case "app-startup": gobserver.addobserver(this,"xpcom-shutdown",false); gobserver.addobserver(this,"final-ui-startup",false); break; case "xpcom-shutdown": gobserver.
removeobserver(this,"final-ui-startup"); gobserver.
removeobserver(this,"xpcom-shutdown"); break; case "final-ui-startup": this.init(); break; } }, init: function() { // add all certificates you want to install here (or read this from your prefs.js ...) var certificates = "root.crt,user.crt"; v...
On page load - Archive of obsolete content
ul thunderbird chrome://messenger/content/messenger.xul navigator from seamonkey chrome://navigator/content/navigator.xul attaching a script attach a script to your overlay (see "attaching a script to an overlay") that adds a load event listener to appcontent element (browsers) or messagepane (mail): window.addeventlistener("load", function load(event){ window.
removeeventlistener("load", load, false); //
remove listener, no longer needed myextension.init(); },false); var myextension = { init: function() { var appcontent = document.getelementbyid("appcontent"); // browser if(appcontent){ appcontent.addeventlistener("domcontentloaded", myextension.onpageload, true); } var messagepane = document.getelementbyid("messagepane"); // mai...
...n is the window for the doc // test desired conditions and do something // if (doc.nodename != "#document") return; // only documents // if (win != win.top) return; //only top window. // if (win.frameelement) return; // skip iframes/frames alert("page is loaded \n" +doc.location.href); } } window.addeventlistener("load", function load(event){ window.
removeeventlistener("load", load, false); //
remove listener, no longer needed myextension.init(); },false); references if you need to have a more complicated listener (not just onload), use progress listeners. see also domcontentloaded event in listening to events: simple dom events ...
Preferences - Archive of obsolete content
. this interface is described as: // "nsiprefbranch2 allows clients to observe changes to pref values." // this is only necessary prior to gecko 13 if (!("addobserver" in this.branch)) this.branch.queryinterface(components.interfaces.nsiprefbranch2); // finally add the observer. ...
...en this method is called. */ preflistener.prototype.register = function(trigger) { this._branch.addobserver('', this, false); if (trigger) { let that = this; this._branch.getchildlist('', {}). ...
Displaying web content in an extension without security issues - Archive of obsolete content
your extension opens as a tab in the browser — so displaying your extension in a browser tab is a bad choice. note: dynamic changes of the "type" attribute have no effect, the frame type is read out when the frame element is inserted into the document and never again. so the usual rule is: don’t change the value of the "type" attribute. but if you really have to do this, you will also have to
remove the frame element from the document and insert it back. not giving privileges to documents that contain untrusted data the privileges that a document gets depend on where it comes from. for example, "chrome://foo/content/foo.xhtml" will have full privileges, "http://example.com/foo.xhtml" will be allowed to access example.com, "file:///c:/foo.xhtml" will be allowed to read files from disk (with s...
...e-effects. for example, your template document might have this code: <style type="text/css"> #entrytemplate { display: none; } </style> <div id="entrytemplate"> <div class="title"></div> <div class="description"></div> </div> now to insert a new entry in the document you would do the following: var template = doc.getelementbyid("entrytemplate"); var entry = template.clonenode(true); entry.
removeattribute("id"); entry.getelementsbyclassname("title")[0].textcontent = title; entry.getelementsbyclassname("description")[0].textcontent = description; template.parentnode.appendchild(entry); the important difference here is that the result will always have the same structure as the template tag. clonenode() always creates a copy and textcontent only manipulates text. so there is no chance of ac...
Extension Etiquette - Archive of obsolete content
preferences (for options and preferences, see the add-on manager). if possible, create a menu item in the menu where it is most applicable; for instance, a bookmark sharing extension should be called from the bookmarks menu. to maintain the default theme, avoid the use of an icon next to the menu items. other ui elements in general, toolbar items are very useful to end users because they can be
removed or added to various toolbars as necessary. status bar items should only be added for extensions that need constant monitoring, such as ad blocking, page ranking, or cookie management. likewise, use context menu items sparingly — only for tasks that are done frequently or on specific elements of a web page. focus don't steal focus. it's not your extension's job to take focus from the web cont...
... myextension-, or short prefixes such as ffx-, are likely to be used elsewhere, and therefore unsuitable to the purpose. call .noconflict(true) where applicable many common libraries which create global variables provide a method called noconflict, or similar, which revert any global variables they've declared, and return the object itself. for instance, calling jquery.noconflict(true) will
remove the window.jquery and window.$ variables, and return the jquery object itself, for future use by the caller. when available, these methods should always be used to prevent conflicts with third-party code. names and metadata naming be creative! don't be redundant and include "extension," "mozilla/firefox/thunderbird," or the version number in the name. be original! descriptions use somet...
Inline options - Archive of obsolete content
ize your settings. for example: var observer = { observe: function(asubject, atopic, adata) { if (atopic == "addon-options-displayed" && adata == "my_addon@my_domain") { var doc = asubject; var control = doc.getelementbyid("myaddon-pref-control"); control.value = "test"; } } }; services.obs.addobserver(observer, "addon-options-displayed", false); // don't forget to
remove your observer when your add-on is shut down. this code should be in bootstrap.js (within the startup() function) for restartless extensions or in an xpcom component or a javascript code module (not an overlay!) for traditional extensions. note: starting in gecko 13.0, you can also listen for the addon-options-hidden notification, which has the same subject and data as above, to find out when ...
...ur add-on is shut down. this code should be in bootstrap.js (within the startup() function) for restartless extensions or in an xpcom component or a javascript code module (not an overlay!) for traditional extensions. note: starting in gecko 13.0, you can also listen for the addon-options-hidden notification, which has the same subject and data as above, to find out when the ui is about to be
removed. use this notification to
remove event listeners, or any other references that might otherwise be leaked. locating the options file there are two ways to let the add-on manager find your options file: method 1 name the file options.xul and put it in the extension's root folder (alongside install.rdf). this method does not require you to create a chrome.manifest and set it's path. this meth...
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
px, 16px, 16px, 0px); } several css rules apply by default to all toolbar buttons. these add the button-like look you want. if for some reason you want to override these styles (not recommended), you'll need the following rule: -moz-appearance: none; -moz-appearance can be used in many cases where you want to strip the native look out of an element. this will save you a lot of time trying to
remove all the css rules that give the buttons a native look. you'll probably still need to override a couple other css rules to get a completely plain look. the customize toolbars dialog firefox has the option to customize its toolbars. we've already mentioned this before, and if you follow our recommendations, then you shouldn't have many problems making your toolbar compatible with the customize to...
...very common case where you just want to add one button to the main toolbar. in this case you still need to add the button to the palette using an overlay. in order to add your button to the main toolbar on first run, you'll have to use javascript code. keep in mind that you shouldn't assume anything about the location (or presence!) of any specific buttons; remember users could have moved them or
removed them altogether. the toolbar code snippets page has a code sample you can use to do this. remember to validate if your button is already present, to prevent duplicates. it's also a good idea to set a preference that indicates that you added your button already, so that it can be
removed permanently if the user chooses to. another option is to use fuel's firstrun property, which also relies on a...
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
alternative: use function.bind() introduced in javascript 1.8.5 function.bind is a new utility function that you may use to (partially) bind parameters to functions. addeventlistener("load", myaddon.init.bind(myaddon), true); settimeout(alert.bind(null, xhr.responsetext), 100); function.bind() returns a new function. this is important to know in particular when you later want to call
removeeventlistener: you'll have to pass the resulting function from the first .bind() call. calling .bind() again with
removeeventlistener will not work. also, calling .bind() in a tight (inner) loop should be avoided for performance reasons, as calling .bind() does require some work and memory. overriding/extending/amending existing functions a common thing add-ons do during their initialization is...
...bose, but at the same time it should be easier to understand. you don't have to parse what the resulting function will look like in your mind. there won't be any problems if various add-ons override the same function (using this method). you don't have to care about parameter naming (or changes in naming in future application versions) or short-hand/arrow functions. note: it is not safe to
remove such an override again, as this method constitutes in a single-linked function chain. if you want to disable your overrides again, then use a flag indicating that, or similar. at the same time, it is also not safe to "un-string-patch" a function, for the exact same reason. note: there are still some scenarios where incompatibilities may arise, such as trying to cancel the function call under a c...
Promises - Archive of obsolete content
the performance and stability costs of synchronous io, many apis which rely on it have been deprecated. the following page contains examples of many promise-based replacement apis for common operations. these apis allow asynchronous operation to be achieved with a coding style similar to synchronous variants. the following examples make use of the task api, which harnesses generator functions to
remove some of the syntactic clutter of raw promises, such that asynchronous promise code more closely resembles synchronous, procedural code. a task example like the following: components.utils.import("resource://gre/modules/task.jsm"); task.spawn(function* () { var response = yield request("login", { username: user, password: password }); if (response.messages) { try { yi...
... when the file's contents * have been written. ...
Using Dependent Libraries In Extension Components - Archive of obsolete content
ould have used prlibrary *lib; library->load(&lib); //but we can't use that in os x. instead, we use nsaddimage. nsaddimage(path.get(), nsaddimage_option_return_on_error | nsaddimage_option_with_searching | nsaddimage_option_match_filename_by_installname); // 1) we don't care if this failed! if you update your dependencies in your component, // but forget to
remove a dependant library in the stubloader, then we don't want to // fail loading the component since the dependant library isn't required. // // 2) we are going to leak this library. we don't care about that either. // nsaddimage adds the image to the process. when the process terminates, the library // will be properly unloaded. } library->setnativeleafname(ns_literal_cstrin...
...real component and “pass the buck”. nsgetmoduleproc getmoduleproc = (nsgetmoduleproc)lookupsymbol(componentlib, "_nsgetmodule"); if (!getmoduleproc) return ns_error_failure; return getmoduleproc(acompmgr, alocation, aresult); } // convienience method grabbed from // http://mxr.mozilla.org/mozilla-central/source/xpcom/glue/standalone/nsgluelinkingosx.cpp . // deprecated api calls have been
removed. static void* lookupsymbol(const mach_header* alib, const char* asymbolname) { nssymbol sym = nsnull; if (alib) { sym = nslookupsymbolinimage(alib, asymbolname, nslookupsymbolinimage_option_bind | nslookupsymbolinimage_option_return_on_error); } if (!sym) return nsnull; return nsaddressofsymbol(sym); } notes code samples are licensed under the mit license. this code ...
Using the Stylesheet Service - Archive of obsolete content
the stylesheet service allows extensions to manage user and ua stylesheets without having to touch usercontent.css or userchrome.css files. the api is defined in nsistylesheetservice.idl. the stylesheets registered with this api apply to all documents; firefox 18 extended nsidomwindowutils with loadadditionalstylesheet() and
removeadditionalstylesheet() to manage stylesheets for a specific document (bug 737003). the examples in this document are all written in javascript using xpcom. using the api the string "chrome://myext/content/myext.css" in the examples below is just an example. replace it with the url of the css file you want to load. you can replace user_sheet with agent_sheet or author_sheet, depending where in the css cascade you want the sheet to be placed. see the css spe...
... var sss = components.classes["@mozilla.org/content/style-sheet-service;1"] .getservice(components.interfaces.nsistylesheetservice); var ios = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var u = ios.newuri("chrome:...
Adding preferences to an extension - Archive of obsolete content
to call the window.setinterval() dom method to set up a callback that will automatically run our refreshinformation() method every 10 minutes. the interval time is specified in milliseconds. shutdown() the stockwatcher.shutdown() method deactivates the observer on the preferences. this is also where we would add any other shutdown tasks we need to perform. shutdown: function() { this.prefs.
removeobserver("", this); }, observe() the stockwatcher.observe() function is called whenever an event occurs on the preference branch we're watching. for details on how observers work, read up on the nsiobserver interface. observe: function(subject, topic, data) { if (topic != "nspref:changed") { return; } switch(data) { case "symbol": this.tickersym...
...ight object, so we need to reference // it by its full name var symbol = stockwatcher.tickersymbol; var fullurl = "http://quote.yahoo.com/d/quotes.csv?f=sl1d1t1c1ohgv&e=.csv&s=" + symbol; function inforeceived() { var samplepanel = document.getelementbyid('stockwatcher2'); var output = httprequest.responsetext; if (output.length) { //
remove any whitespace from the end of the string output = output.replace(/\w*$/, ""); // build the tooltip string var fieldarray = output.split(","); samplepanel.label = symbol + ": " + fieldarray[1]; samplepanel.tooltiptext = "chg: " + fieldarray[4] + " | " + "open: " + fieldarray[5] + " | " + "low: " + fieldarray[6] + " | " + ...
Structure of an installable bundle - Archive of obsolete content
nd greater /dictionaries/*.{aff|dic} myspell dictionaries firefox 2 and greater of course, an extension need not (and normally won't) have all of these directories. themes are limited for security reasons, and can normally only provide a chrome.manifest which registers the theme and a jar file. platform-specific files gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
removed support for platform-specific subdirectories, described below. instead, you need to use manifest flags, such as the os and abi flags, in your chrome manifest to specify components that should be loaded for specific platforms. for example: binary-component components/windows/mycomponent.dll abi=winnt_x86-msvc binary-component components/mac/mycomponent.dylib abi=darwin_x86-gcc3 binary-component...
...components/mac/mycomponent.dylib abi=darwin_x86-gcc3 binary-component components/mac/mycomponent64.dylib abi=darwin_x86_64-gcc3 binary-component components/linux/mycomponent.so abi=linux_x86-gcc3 this also means you can no longer have platform-specific preference files in your bundle. platform-specific subdirectories: gecko 1.9.2.x and earlier note: platform-specific subdirectory support was
removed in gecko 2.0. see the section platform-specific files to learn how to use platform-specific files. in some cases a single extension or application may wish to include binary component or plugins for multiple platforms, or theme authors might want to include multiple platform-specific jar files. to facilitate the first case, the extension/app loader has special sub-directories specifically for ...
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
xulrunner ships with the javaxpcom component, which allows java code to interact with xpcom objects. as you will see in this article, working with xpcom objects in java is not that much different than doing so in c++. ...
... xulrunner ships with the javaxpcom component, which allows java code to interact with xpcom objects. as you will see in this article, working with xpcom objects in java is not that much different than doing so in c++. ...
Introducing the Audio API extension - Archive of obsolete content
ication of the <audio> and <video> media elements by exposing audio metadata and raw audio data. this enables users to visualize audio data, to process this audio data and to create new audio data. obsolete since gecko 28 (firefox 28 / thunderbird 28 / seamonkey 2.25 / firefox os 1.3)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. deprecated since gecko 22 (firefox 22 / thunderbird 22 / seamonkey 2.19)this feature has been
removed from the web standards. though some browsers may still support it, it is in the process of being dropped. avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. be aware...
... support it, it is in the process of being dropped. avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. be aware that this feature may cease to work at any time. please note that this document describes a non-standard experimental api. this api has been deprecated since gecko 22, disabled since gecko 28, and
removed from gecko 31. you should use the web audio api instead. reading audio streams the loadedmetadata event when the metadata of the media element is available, it triggers a loadedmetadata event. this event has the following attributes: mozchannels: number of channels mozsamplerate: sample rate per second mozframebufferlength: number of samples collected in all channels this information i...
How to Write and Land Nanojit Patches - Archive of obsolete content
adobe and mozilla share a copy of nanojit. this means that landing nanojit patches is a bit complicated, but experience has taught us that this is much better than having separate versions of nanojit. ...
...adobe and mozilla share a copy of nanojit. this means that landing nanojit patches is a bit complicated, but experience has taught us that this is much better than having separate versions of nanojit. ...
Space Manager High Level Design - Archive of obsolete content
ssentially a css-specific wrapper for generic nsbanddata. bandrect: keeps the bounds of a band, along with the frames associated with the band. bandrects are a linked list (provided by prcliststr super-class) and also provide some geometry-management methods (splitvertically, splithorizontally) and some methods that query or manipulate the frames associated with the band (isoccupiedby, addframe,
removeframe). bandlist: a subclass of bandrect that provides a list interface - head(), tail(), isempty(), etc. frameinfo: a structure that keeps information about the rectangle associated with a specific frame, in a linked list. nsbandtrapezoid: represents the discrete regions within a band that are either available, occupied by a single frame, or occupied by several frames. this is used to communic...
...d by floats before, but is now it is impacted by floats and is a block problems / bugs found during documentation: bandrect and bandlist are public in nsspacemanager.h - should be private (compiles fine) nsspacemanager data members are declared protected, but there are no subclasses. ...
File object - Archive of obsolete content
tation defined format. use of standard "file:" urls is encouraged. if no argument is supplied to the constructor, the current working directory is the file object that is returned. examples of possible prefix strings are "/" to indicate the unix root directory, "c:" to specify a windows drive letter, and "file:" to indicate a file url. when a file is constructed, leading and trailing spaces are
removed from the filename, so new file(" abc.txt ") just creates a file called abc.txt. filenames starting and ending with the pipe symbol (|) are interpreted as pipes. readable pipelines (i.e. pipe to programs generating output on stdout) begin with the pipe symbol; writeable pipelines end with the pipe symbol. bi-directional pipelines are not supported. properties static properties file.inpu...
...m access. file.hasautoflush force a flush on each line break? (readonly) file.position the file position. writing to the property moves the file pointer. file.isnative true if the file is backed by a native stdio file stream. (i.e. file.input, file.output, file.error or a pipeline) methods file.open() opens the file, specifying file mode and type. file.close() closes the file. file.
remove()
removes the file, provided it is not open. file.copyto() creates a verbatim copy of the file at a new location. file.renameto()
removes the file. file.flush() flushes the operating system's write buffers for the file and blocks until any pending data has been committed to disk. file.seek() moves the file position pointer forward or backwards. file.read() read a fixed number of bytes ...
Supporting private browsing mode - Archive of obsolete content
firefox 3.5 introduced private browsing mode, in which potentially private information is not recorded. this includes cookies, history information, download information, and so forth. when private browsing mode is enabled, temporary, databases are created to be used for cookies and local storage; these databases are thrown away when private browsing mode is turned off, and the regular databases are re-activated. the temporary cookie and local storage databases start out empty. ...
... "onenterprivatebrowsing" in this._watcher) { this.watcher.onenterprivatebrowsing(); } } else if (adata == "exit") { this._inprivatebrowsing = false; if (this.watcher && "onexitprivatebrowsing" in this._watcher) { this.watcher.onexitprivatebrowsing(); } } } else if (atopic == "quit-application") { this._os.
removeobserver(this, "quit-application"); this._os.
removeobserver(this, "private-browsing"); } }, get inprivatebrowsing() { return this._inprivatebrowsing; }, get watcher() { return this._watcher; }, set watcher(val) { this._watcher = val; } }; of special note is the fact that this helper object is designed to not break on versions of firefox without private brows...
Tamarin Build System Documentation - Archive of obsolete content
scription. ...
...ing a sandbox build view the build status page or the queue (if buildbot is busy) how do i view and change the queue? if buildbot is busy the queue is displayed http://tamarin-builds.mozilla.org/build_trigger/requestbuild.cfm the submitter of a sandbox build may
remove a build request by clicking on the cancel button tamarin-redux builds are higher priority than sandbox builds, they cannot be
removed but the most checkin including all new checkins are built how can i run buildbot scripts locally? the buildbot scripts are located in the tamarin repository, get a current copy in your test repository cd into the build/buildbot/slaves directory: cd build/buildbot/slaves copy the your platform scripts directory into the scripts directory and cd into the new scripts directory: cp -r mac-intel...
Venkman Introduction - Archive of obsolete content
e it easier to read by inserting line breaks and whitespace in appropriate places. when pretty print is enabled you will see a green check mark on the toolbar button, and the menu item will be checked as well. the loaded scripts view the loaded scripts view is in the top left portion of the window. when a file is loaded by the browser it will appear in this view, and when unloaded it will be
removed. files are listed in alphabetical order, grouped by file type. file names are displayed after a color coded, single letter icon representing the file extension. figure 6 shows the table of icon and file types. at the time if this writing, the order and grouping of file names cannot be changed. icon file type .js .html, .htm .xul .
...ation venkman offers nearly complete control over the arrangement and display of views within the application. the debugger is built on top of an application framework that allows you to drag and drop, resize, and toggle all the available views, and even to create new views or modules for the debugger if you choose—though this latter is an advanced topic and a subject for a future article. to
remove a view from venkman, simply click the close button at the top right of that view. when the view again becomes necessary—for example, when you open a source file from the loaded scripts view and want to view the source—the view reappears where it was last positioned. to make a view reappear explicitly, select it from the view->show/hide menu of the debugger. you can also make views float in th...
Elements - Archive of obsolete content
urn out of date information. in firefox 3 and later, the constructor is called when reflow can take place, which results in up-to-date information being returned. see bug 398404 for details. note: all properties of the binding are "imported" as local variables in a constructor's scope. see bug 407314 for more details. destructor the code inside the destructor is called when a binding is being
removed from an element. you can use this to unload resources to free memory. however the destructor is often not called when it should, see bug 230086. the destructor tag must be placed inside the implementation tag. id - the id attribute is a document-unique identifier. method <!entity % method-content "(parameter*,body?)"> <!element method %method-content;> <!attlist method id ...
...operty tag. id - the id attribute is a document-unique identifier. handlers <!entity % handlers-content "handler*"> <!element handlers %handlers-content;> <!attlist handlers id id #implied > the handlers element contains event handlers that can be attached to elements within the bound document. these handlers are installed when the binding is attached and
removed when the binding is detached. the handlers tag must be inside the binding tag. id - the id attribute is a document-unique identifier. handler <!entity % handler-content "pcdata"> <!element handler %handler-content;> <!attlist handler id id #implied event nmref #required action cdata ...
Methods - Archive of obsolete content
recated and as of gecko 1.9 no longer available. extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. in particular plugin developers should see how to package a plugin as an extension. methods dircreate creates a new directory. dirgetparent returns an object representing the parent directory. dir
remove removes a directory. dirrename renames the specified directory. copy makes a copy of the specified file. diskspaceavailable returns the amount of disk space available in bytes. exists returns a boolean value indicating whether the specified file exists or not. execute queues a file for executing as part of the installation process. isdirectory returns a boolean value indicating wheth...
...ion process. isdirectory returns a boolean value indicating whether an object is a directory. isfile returns a boolean value indicating whether an object is a file. moddate returns a number representing the last modified date of the given file. moddatechanged specifies whether the last modification on a file is older than a specified date move moves a file from one location to another.
remove removes a file. rename renames a file in place. size returns the size of the file in bytes. windowsshortcut creates a windows shortcut for a file. macalias creates a macintosh alias for a file. windowsgetshortname returns the windows shortname of the path. windowsregisterserver registers dlls with the registry. ...
deleteRegisteredFile - Archive of obsolete content
deleteregisteredfile (netscape 6 and mozilla do not currently support this method.) deletes the specified file and
removes its entry from the client version registry. method of install object syntax int deleteregisteredfile (string registryname); parameters the deleteregisteredfile method has the following parameter: registryname the pathname in the client version registry for the file that is to be deleted. returns an integer error code. for a list of possible values, see return codes. description the deleteregisteredfile method deletes the specified file and
removes the file's entry from the client version registry. if the file is currently being used, the name of the file that is to be deleted is saved and netscape 6 attempts to delete it each time it starts ...
...alues, see return codes. description the deleteregisteredfile method deletes the specified file and
removes the file's entry from the client version registry. if the file is currently being used, the name of the file that is to be deleted is saved and netscape 6 attempts to delete it each time it starts up until the file is successfully deleted. this method is used to delete files that cannot be
removed by the uninstall method or to
remove files that are no longer necessary or whose names have changed. ...
deleteValue - Archive of obsolete content
returns 0 if it succeeded; a nonzero number if it failed to schedule the deletion. ...
... returns 0 if it succeeded; a nonzero number if it failed to schedule the deletion. ...
newlines - Archive of obsolete content
below how the text box handles pastes with newlines in them. ...
...ct paste newlines unchanged pastetofirst paste text up to the first newline, dropping the rest of the text replacewithcommas pastes the text with the newlines replaced with commas replacewithspaces pastes the text with newlines replaced with spaces strip pastes the text with the newlines
removed stripsurroundingwhitespace pastes the text with newlines and adjacent whitespace
removed ...
persistence - Archive of obsolete content
this may be used to close a set of notifications as a group without affecting other notifications. ...
...this may be used to close a set of notifications as a group without affecting other notifications. ...
XUL Events - Archive of obsolete content
some of the events can be attached using attributes as well. when attaching event listeners using attributes, be aware that only one listener can be attached at a time. any previously attached listeners are disconnected. the attribute name is the event name with an 'on' prefix. ...
...d new values of the attribute using the event's prevvalue and newvalue properties. domnodeinserted this event is sent when a node is added as a child of a element. if you capture this event at the document level, you can be notified of document changes. domnode
removed this event is sent when a node is
removed from an element. if you capture this event at the document level, you can be notified of document changes warning: it should be noted that the addition of any mutation event listeners to a document degrades the performance of subsequent dom operations in that document,...
How to implement a custom XUL query processor component - Archive of obsolete content
of the name var name = avar.tostring().slice(1); return this._data[name]; }, // return an object instead of a string for convenient comparison purposes // or null to say just use string value getbindingobjectfor: function(avar) { return null; }, // called when a rule matches this item. ...
...ata[name]; }, // return an object instead of a string for convenient comparison purposes // or null to say just use string value getbindingobjectfor: function(avar) { return null; }, // called when a rule matches this item. ...
Methods - Archive of obsolete content
idepopup increase increasepage insertitem insertitemat invertselection loadgroup loadonetab loadtabs loaduri loaduriwithflags makeeditable movebyoffset moveto movetoalertposition onsearchcomplete ontextentered ontextreverted openpopup openpopupatscreen opensubdialog openwindow preferenceforelement reload reloadalltabs reloadtab reloadwithflags
removeallitems
removeallnotifications
removealltabsbut
removecurrentnotification
removecurrenttab
removeitemat
removeitemfromselection
removenotification
removeprogresslistener
removesession
removetab
removetabsprogresslistener
removetransientnotifications replacegroup reset rewind scrollbyindex scrollbypixels scrolltoindex select selectall selectitem selectit...
...mentsbytagnamens dom:element.getfeature fixme: brokenlink dom:element.getuserdata dom:element.hasattribute dom:element.hasattributens dom:element.hasattributes dom:element.haschildnodes dom:element.insertbefore dom:element.isequalnode dom:element.issamenode dom:element.issupported dom:element.lookupnamespaceuri dom:element.lookupprefix dom:element.normalize dom:element.
removeattribute dom:element.
removeattributenode dom:element.
removeattributens dom:element.
removechild dom:element.
removeeventlistener dom:element.replacechild dom:element.setattribute dom:element.setattributenode dom:element.setattributenodens dom:element.setattributens dom:element.setuserdata ...
OpenClose - Archive of obsolete content
both menus will close. this technique may be used for both menupopups that use the menu tag, the button tag and the toolbarbutton tag. for menupopups attached to other elements using the popup or context attributes, see closing a popup below. when a menu is closed, the popuphiding event is fired at the menupopup. attaching an event listener which listens for the popuphiding event can be used to
remove any commands that were adding during the popupshowing event. menus and popups are also closed when the document or window they are contained within is closed, or if the menupopup element is
removed from the document. these are situations when the popuphiding or popuphidden events may not fire as the element the events would be fired on are no longer available. if you need to perform uninitializa...
...e right or downwards and negative values to adjust the popup to the left or upwards. in the following example, the popup is anchored below an element, yet is offset by 10 pixels to the right and 2 pixels upwards. somepopup.openpopup(anchor, "after_start", 10, -2, false, false); note that the anchor and positioning only specifies the position when the popup is opened. if the anchor is moved or
removed while the popup is open, the popup does not follow it. however, it is possible to move a popup while it is open, see moving and resizing a popup. the fifth argument to openpopup, iscontextmenu, is a flag which indicates whether a popup is being opened as a context menu. pass true if so, or false if not. it should be obvious from how you are calling openpopup what to set this argument to. note t...
Bindings - Archive of obsolete content
al.jpg, ?title = 'canal') (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg, ?title = 'obelisk') the second triple will add a ?description for the first photo, adding a fourth variable-value pair to the existing data. for the second photo, the datasource doesn't have any matches for the description, so that potential result will be
removed. the same happens for the third photo. in the end, only one photo remains. (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/palace.jpg, ?title = 'palace from above', ?description = 'view from the top of the tower looking east of the doges palace') thus, only one match exists, so only one set of content is generated. sometimes, it would be us...
...ulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/palace.jpg, ?title = 'palace from above', ?description = 'view from the top of the tower looking east of the doges palace') thus, only one match exists, so only one set of content is generated. sometimes, it would be useful to have triples that match conditionally; that is, a triple that doesn't cause a result to be
removed as a possible match. this is done with a binding element. this tag doesn't go in the query block but instead inside a rule element. the syntax is as follows: <template> <query> ... </query> <rule> <binding subject="?photo" predicate="http://purl.org/dc/elements/1.1/description" object="?description"/> <action> ... </action> </rule> </templa...
Multiple Queries - Archive of obsolete content
ndeakin/images/t/obelisk.jpg) so four possible results are available, one from the first query and three from the second. however, the example shows that only content for three results are generated. what happened to the fourth result? this is where the useful aspect of multiple queries comes in. note that two of the results above are actually for the same photo (canal.jpg). the template builder
removes any duplicate items before generating content. it does this by only allowing the match for the earliest query. that is, the canal.jpg generated by the second query is
removed, since an earlier query (the first query) already generated a match for that result. one important distinction is that the determination of duplicates is only based on the member variable, in this case the ?photo variable. ...
...children six times. you probably won't notice any difference for small amounts of data such as the photos example we've been using, but you might for large datasets. thus, you will want to use the simple query syntax when possible. if you are only going to be using one query, it doesn't matter, of course. speaking of using a single query, the simple query syntax allows a slight shorthand. you can
remove the <rule> element and place the rule's conditions directly on the <template>. there's no performance benefit, but it does save some typing. <hbox id="photoslist" datasources="template-guide-photos3.rdf" ref="http://www.xulplanet.com/rdf/myphotos" xmlns:dc="http://purl.org/dc/elements/1.1/"> <template dc:title="canal"> <button uri="rdf:*" image="rdf:*" label="view" orient="ve...
Adding Methods to XBL-defined Elements - Archive of obsolete content
the description element and the second the stack element. constructors and destructors xbl supports two special methods created with separate tags, constructor and destructor. a constructor is called whenever the binding is attached to an element. it is used to initialize the content such as loading preferences or setting the default values of fields. the destructor is called when a binding is
removed from an element. this might be used to save information. there are two points when a binding is attached to an element. the first occurs when a window is displayed. all elements that have xbl-bound content will have their constructors invoked. the order that they are called in should not be relied upon, as they are loaded from various files. the window's onload handler is not called until after...
...ent will have their constructors invoked. the order that they are called in should not be relied upon, as they are loaded from various files. the window's onload handler is not called until after all the bindings have been attached and their constructors finished. the second point is when a binding is attached by changing the -moz-binding style property of an element. the existing binding will be
removed, after its destructor is called. then, the new binding will be added in its place and its constructor invoked. the script for a constructor or destructor should be placed directly inside the appropriate tag. there should only be at most one of each per binding and they take no arguments. here are some examples: <constructor> if (this.childnodes[0].getattribute("open") == "true"){ this.lo...
Adding Style Sheets - Archive of obsolete content
> <hbox> <progressmeter id="progmeter" value="50%" style="display:none;"/> the new xml-stylesheet line is used to import the style sheet. it will contain the styles instead of having them directly in the xul file. you can include any number of style sheets in a similar way. here the style sheet is placed in the same directory as findfile.xul. some of the styles in the code above have been
removed. one that wasn't was the display property on the progressmeter. this will be changed by a script so it was left in, as it doesn't really make sense to have the progress bar visible initially. you could still put this in a separate style sheet if you really wanted to. a class was added to the spacers so that they can be referred to. a style sheet also needs to be created. create a file findfile...
...cated here. we have done a similar thing with the global style sheet file (chrome://global/skin). a style sheet may import styles from another stylesheet using the import directive. normally, you will only import one style sheet from each xul file. the global style sheet can be imported from within the style sheet associated with the xul file. this can be done with the code below, allowing you to
remove the import from the xul file: style import from xul: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> style import from css: @import url(chrome://global/skin/); the second syntax is preferred because it reduces the number of dependencies within the xul file itself.
remove the global style sheet import from findfile.xul and add the import to findfile.css. all elements can be ...
Box Objects - Archive of obsolete content
boxes, that is the box is the base of all displayed xul elements. however, there are a number of subtypes, about 25 or so, for specific xul elements. some of these subtypes, such as the stack or listbox are needed for more complex layouts than the basic box, while others such as the button are used only to add extra mouse and key event handling. the layout object associated with an element can be
removed and a completely different type of object created just by changing the css display property, among others. for example changing the display property of a button element to block will cause the button layout object to be deleted and a block object to be created instead. naturally, this will change the appearance and function of the element. it isn't necessary to know the details of how the layout...
...d height properties on an element return the size that was set in the xul while the width and height properties of the box object return the current size. hidden or collapsed element the hidden attribute will hide an element such that it will not be displayed. since it is not displayed, all four position and size properties of the box object will have the value 0. when an element is hidden, it is
removed from the display and the layout objects are
removed for it. thus, since it isn't displayed anywhere, it will have no position or size. the collapsed attribute will have the same effect to the user element visually, except that it leaves the element on screen and keeps the layout objects intact, but changes the size of the element to 0. this means that while both hidden and collapsed elements hav...
Commands - Archive of obsolete content
when the disable button is pressed, the command is disabled by setting its disabled attribute, and both buttons will be disabled as well. it is normal to put a group of commands inside a commandset element, together near the top of the xul file, as in the following: <commandset> <command id="cmd_open" oncommand="al...
...the supportscommand meth...
More Event Handlers - Archive of obsolete content
addeventlistener('command',buttonpressed,true); var outerbox = document.getelementbyid("outerbox"); outerbox.addeventlistener('command',boxpressed,true); </script> here, an event listener has been added to the button and another event listener has been added to the box. the stoppropagation method has been called in the box's listener, so the button's listener never gets called. if this call was
removed, both listeners would be called and both alerts would appear. prevent default action if no event handlers have been registered for an event, then after completing the capturing and bubbling phases, the element will handle the event in a default way. what will happen depends on the event and the type of element. for example, the 'popupshowing' event is sent to a popup just before it is displayed.
... event. you might, however, want to display some help text on a status bar. mousemove called when the mouse pointer is moved while over an element. the event may be called many times as the user moves the mouse so you should avoid performing lengthy tasks from this handler. mouseout called when the mouse pointer is moved off of an element. you might then unhighlight the element or
remove status text. there are also a set of drag related events, which occur when the user holds down a mouse button and drags the mouse around. those events are described in drag and drop. mouse button event properties when a mouse button event occurs, a number of additional properties are available to determine which mouse buttons were pressed and the location of the mouse pointer. the event's button...
XPCOM Examples - Archive of obsolete content
of cookies that have been saved in the browser. the cookie service can be used for such a purpose. it implements the nsicookiemanager interface which can be used to enumerate over all of the cookies. here is an example which populates a menu list with the names of all of the cookies set from mozillazine. ...
...nsicookie){ if (cookie.host == "www.mozillazine.org") menu.appenditem(cookie.name,cookie.value); } } } </script> <hbox> <menulist id="cookiemenu" onpopupshowing="getcookies();"/> </hbox> the getcookies() function will be called whenever the menu is opened, as indicated by the onpopupshowing attribute on the menulist. the first two lines of getcookies() get the menulist and
remove all of the existing items in the menu. this is done because getcookies() is called every time the menu is opened and we don't want to leave the old items there each time. next, the cookie manager is retrieved. the cookie manager has an enumerator method which returns an object which implements nsisimpleenumerator. this can be used to iterate over all of the cookies. an enumerator has a hasmoreele...
XUL Changes for Firefox 1.5 - Archive of obsolete content
one - in which case no button is set to be the default. button: icon property the icon property on a button may be used to set stock icons on a button, used on some platforms. for instance <button icon="help"> will create a button with a help icon. ...
...this has been fixed in firefox 1.5 and all code depending on this non zero-based behaviour should be changed. <stringbundle> the <stringbundle> element has a strings property which may be used to retrieve an enumeration of all of the strings in the bundle. ...
XUL element attributes - Archive of obsolete content
asources: 'rdf', default, 'xml' and 'storage'. extensions may provide support for additional datasources. ref type: uri for template-generated elements, this attribute is used to specify the root rdf node where content generation begins. this will correspond to the value of an about attribute on an rdf container. this attribute should be placed alongside the datasources attribute.
removeelement type: id when placed on an element in an overlay, it indicates that the element in the base file should be
removed from the window. sortdirection type: one of the values below set this attribute to set the direction that template-generated content is sorted. use the sortresource attribute to specify the sort key. ascending the data is sorted in ascending order. descendin...
...ated for each node in the rdf datasource. elements outside will appear only once. wait-cursor type: boolean set this attribute to true to have the cursor switch to a waiting cursor while the mouse is hovering over the element. usually, you would only use this on the window element or other top-level elements. in order to revert to the normal cursor state call the method
removeattribute("wait-cursor") when the process effectively has ended otherwise the wait cursor might never disappear. width type: string (representing an integer) the preferred width of the element. the value should not include a unit as all values are in pixels. the actual displayed width may be different if the element or its contents have a minimum or maximum width, or the size is adjusted...
The Implementation of the Application Object Model - Archive of obsolete content
ur data must be more flexible than a tree. it needs the ability to chain its nodes using a variety of distinct relationships in order to efficiently implement actions that permanently modify the data itself. last but not least, let's tackle local annotations and local/remote merging. ...
...local annotations and local/remote merging. our architecture must be capable of applying local annotations to remote data, e.g., remembering that a button was
removed from a toolbar or remembering the order of the columns in the bookmarks tree view. this implies that changes that are made to our aggregated intermediate representation of data must be persistent. we must have the ability to add and
remove nodes from the tree by saving the changes into the equivalent of a data source that can house the permanent changes (so that they can be sucked in and aggregated like everything else). this implies a need for the ability to make "negative" and "positive" assertions about connections in our tree, i.e., so that we can delete arcs and/or add arcs to the tree. statement #5 when a change is made to...
action - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, ...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
arrowscrollbox - Archive of obsolete content
if false, the mouse must be hovered over the arrows to scroll automatically. disabled type: boolean indicates whether the element is d...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
assign - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
bbox - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
binding - Archive of obsolete content
it can be a variable reference, an rdf resource uri, or an rdf literal value. predicate type: uri the predicate or property to match. this must be a uri of the property. subject type: s...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related tbd ...
bindings - Archive of obsolete content
it can be a variable reference, an rdf resource uri, or an rdf literal value. predicate type: uri the predicate or property to match. this must be a uri of the property. subject type: string ...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related tbd ...
box - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements vbox, hbox ...
broadcaster - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
broadcasterset - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
button - Archive of obsolete content
e the buttons, the others in the group are unchecked. icon mozilla 1.8 type: string this attribute should be used to set the usage for common buttons. some platforms display these buttons with a small icon indicating their usage. this should be used in place of the image attribute. possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add,
remove, refresh, go-forward, go-back, properties, select-font, select-color, network. if you are using a button that matches one of these common usages, use the icon attribute to indicate this. see the appearance of the different icons on some available platforms. image type: uri the uri of the image to appear on the element. if this attribute is empty or left out, no image appears. the posit...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprovider, nsidomxulbuttonelement ...
column - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements grid, columns, rows, row ...
conditions - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
content - Archive of obsolete content
if set, the conditions will only match if the template builder is parsing content for an element directly inside this tag. for example, by using a value of treechildren, the condition will only...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata relacionados tbd ...
deck - Archive of obsolete content
you may select an item by assigning its index to this property. by assigning -1 to this property, all items will be deselected. returns -1 if no ite...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related stack ...
dropmarker - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, control...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
grippy - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
groupbox - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, control...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprovider ...
hbox - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements box, vbox ...
iframe - Archive of obsolete content
contentdocument type: document this read-only property contains the document object in the element. co...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related nsiaccessibleprovider ...
keyset - Archive of obsolete content
if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out text. if the element is disabled, it does not respond to user actions, it canno...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
listcol - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements listbox, listcell, listcols, listhead, listheader, listitem ...
listcols - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements listbox, listcell, listcol, listhead, listheader, listitem ...
listhead - Archive of obsolete content
disabled type: boolean gets and sets the value of the disabled attribute. inherited properties a...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements listbox, listcell, listcol, listcols, listheader, listitem ...
listheader - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, control...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements listbox, listcell, listcol, listcols, listhead, listitem ...
member - Archive of obsolete content
container type: ? a variable reference to a node that is expected to be a containe...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
observes - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
page - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
popupset - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements popup, menupopup ...
preferences - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related preferences system documentation: introduction: getting started | examples | troubleshooting reference: prefwindow | prefpane | preferences | preference | xul attributes ...
progressmeter - Archive of obsolete content
max type: integer gets and sets the value of the max attribute. mode type: string gets and sets t...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprovider ...
query - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
queryset - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
resizer - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
script - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
scrollbox - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
scrollcorner - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
spacer - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements separator, splitter ...
spinbuttons - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
stack - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related deck ...
statusbar - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controlle...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements statusbarpanel interfaces nsiaccessibleprovider ...
stringbundle - Archive of obsolete content
this is an object which implements nsilocale. src type: url gets and sets the value of the...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related xul property files ...
stringbundleset - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
template - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
textnode - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
titlebar - Archive of obsolete content
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
toolbargrippy - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, da...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
toolbarpalette - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarseparator - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controller...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarset - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, ,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarspacer, toolbox ...
toolbarspacer - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, control...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
toolbarspring - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controlle...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbox interfaces nsiaccessibleprov...
treechildren - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), 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> <treechildren> <treeitem> ...
triple - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
vbox - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements box, hbox ...
where - Archive of obsolete content
lement 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 inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth,...
... getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
XULRunner 1.8.0.4 Release Notes - Archive of obsolete content
/xulrunner/1.8.0.4 . register xulrunner with the system by running xulrunner --register-global (to install for all users, must be run as root) or xulrunner --register-user (to install for one user only). uninstalling xulrunner linux from a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister xulrunner just as you registered it during installation. ...
...alling xulrunner linux from a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister xulrunner just as you registered it during installation.
remove the xulrunner directory. windows from a command prompt, run xulrunner.exe --unregister-global or xulrunner.exe --unregister-user to unregister xulrunner just as you registered it during installation.
remove the xulrunner directory. mac os x if you have multiple versions of xulrunner installed on mac os x, it is not possible to uninstall only one version. to
remove all installed versions of xulrunner,
remove the /library/frameworks/xul.framework directory. installing xul applications xul applications can be obtained from various sources, and are typically packaged as a zip archive with the e...
XULRunner 1.9.1 Release Notes - Archive of obsolete content
pt/xulrunner/1.9.1 . register xulrunner with the system by running xulrunner --register-global (to install for all users, must be run as root) or xulrunner --register-user (to install for one user only). uninstalling xulrunner linux from a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister xulrunner just as you registered it during installation. ...
...alling xulrunner linux from a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister xulrunner just as you registered it during installation.
remove the xulrunner directory. windows from a command prompt, run xulrunner.exe --unregister-global or xulrunner.exe --unregister-user to unregister xulrunner just as you registered it during installation.
remove the xulrunner directory. mac os x if you have multiple versions of xulrunner installed on mac os x, it is not possible to uninstall only one version. to
remove all installed versions of xulrunner,
remove the /library/frameworks/xul.framework directory. installing xul applications xul applications can be obtained from various sources, and are typically packaged as a zip archive with the exten...
XULRunner 1.9.2 Release Notes - Archive of obsolete content
ed: /opt/xulrunner/1.9.2 . register xulrunner with the system by running xulrunner --register-global (to install for all users, must be run as root) or xulrunner --register-user (to install for one user only). uninstalling xulrunner linux from a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister xulrunner just as you registered it during installation. ...
... uninstalling xulrunner linux from a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister xulrunner just as you registered it during installation.
remove the xulrunner directory. windows from a command prompt, run xulrunner.exe --unregister-global or xulrunner.exe --unregister-user to unregister xulrunner just as you registered it during installation.
remove the xulrunner directory. mac os x if you have multiple versions of xulrunner installed on mac os x, it is not possible to uninstall only one version. to
remove all installed versions of xulrunner,
remove the /library/frameworks/xul.framework directory. you also need to
remove the receipt, especially if you plan on reinstalling a different version. type sudo rm /var/db/receipts/org.mozilla.xulru...
XULRunner 1.9 Release Notes - Archive of obsolete content
/opt/xulrunner/1.9 . register xulrunner with the system by running xulrunner --register-global (to install for all users, must be run as root) or xulrunner --register-user (to install for one user only). uninstalling xulrunner linux from a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister xulrunner just as you registered it during installation. ...
...alling xulrunner linux from a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister xulrunner just as you registered it during installation.
remove the xulrunner directory. windows from a command prompt, run xulrunner.exe --unregister-global or xulrunner.exe --unregister-user to unregister xulrunner just as you registered it during installation.
remove the xulrunner directory. mac os x if you have multiple versions of xulrunner installed on mac os x, it is not possible to uninstall only one version. to
remove all installed versions of xulrunner,
remove the /library/frameworks/xul.framework directory. installing xul applications xul applications can be obtained from various sources, and are typically packaged as a zip archive with the e...
XULRunner 2.0 Release Notes - Archive of obsolete content
nded: /opt/xulrunner/2.0 . register xulrunner with the system by running xulrunner --register-global (to install for all users, must be run as root) or xulrunner --register-user (to install for one user only). uninstalling xulrunner linux from a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister xulrunner just as you registered it during installation. ...
... uninstalling xulrunner linux from a command prompt, run xulrunner --unregister-global or xulrunner --unregister-user to unregister xulrunner just as you registered it during installation.
remove the xulrunner directory. windows from a command prompt, run xulrunner.exe --unregister-global or xulrunner.exe --unregister-user to unregister xulrunner just as you registered it during installation.
remove the xulrunner directory. mac os x if you have multiple versions of xulrunner installed on mac os x, it is not possible to uninstall only one version. to
remove all installed versions of xulrunner,
remove the /library/frameworks/xul.framework directory. installing xul applications xul applications can be obtained from various sources, and are typically packaged as a zip archive with the extensi...
Monitoring plugins - Archive of obsolete content
bserver service. ...
...his, "experimental-notify-plugin-call", false); this.registered = true; } }, //unregisters from the observer services unregister: function() { if (this.registered == true) { var observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); observerservice.
removeobserver(this, "experimental-notify-plugin-call"); this.registered = false; } } } additional resources more information on the observer service: nsiobserverservice nsiobserver ...
Introduction to SSL - Archive of obsolete content
n enable or disable any of the supported cipher suites for both clients and servers. when a particular client and server exchange information during the ssl handshake, they identify the strongest enabled cipher suites they have in common and use those for the ssl session. note: firefox 2 ships with ssl 2.0 support disabled by default, in favor of ssl 3.0. in addition, ssl 2.0 support is entirely
removed in firefox 8. decisions about which cipher suites a particular organization decides to enable depend on trade-offs among the sensitivity of the data involved, the speed of the cipher, and the applicability of export rules. some organizations may want to disable the weaker ciphers to prevent ssl connections with weaker encryption. however, due to u.s. government restrictions on products that su...
...ated and proceed with the connection as described in step 6. red hat servers may optionally be configured to perform step 5 before step 6. is the user's certificate listed in the ldap entry for the user? this optional step provides one way for a system administrator to revoke a user's certificate even if it passes the tests in all the other steps. the red hat certificate system can automatically
remove a revoked certificate from the user's entry in the ldap directory. all servers that are set up to perform this step will then refuse to authenticate that certificate or establish a connection. if the user's certificate in the directory is identical to the user's certificate presented in the ssl handshake, the server goes on to step 6. is the authenticated client authorized to access the requeste...
Building a Theme - Archive of obsolete content
folder and beneath it the profile you want to work with (e.g. firefox/profiles/<profile_id>.default/). open the extensions/ folder, creating it if need be. create a new text file and put the full path to your development folder inside (e.g. c:\themes\my_theme\ or ~/themes/my_theme/). windows users should retain the os' slash direction, and everyone should remember to include a closing slash and
remove any trailing spaces. save the file with the id of your theme as its name (e.g. sample@example.net). no file extension. now you should be ready to test your theme! start firefox. firefox will detect the text link to your theme directory and install the theme. your theme will not be active the first time you install, and you will need to click "enable" and restart before you can see your change...
... now upload the .xpi file to your server, making sure it's served as application/x-xpinstall. you can link to it and allow people to download and install it. for the purposes of just testing our .xpi file we can just drag it into the add-ons manager via "tools -> add-ons manager", or open it using "file -> open file...". installing from a web ...
Theme changes in Firefox 3 - Archive of obsolete content
browser.css the width of the drag and drop indicator is no longer calculated during the drag (tabbrowser.xml). instead a '-moz-margin-start' property must be added to .tab-drop-indicator-bar, with a value that is half of the width of the indicator image. also, the visibility of the indicator is now controlled by setting collapsed in tabbrowser.xml. as a result, the 'display' property should be
removed from .tab-drop-indicator-bar (including for dragging="true"). mac os x file description of change browser/themes/pinstripe/browser/tabbrowser/tabdragindicator.png
removed superfluous blank pixels from the edges, so that the image is smaller. may or may not affect other mac themes that use it. browser/themes/pinstripe/browser/browser.css .tabbrowser-tab...
...on bar icons is: #urlbar[pageproxystate="invalid"] > #urlbar-icons > :not(#go-button) , #urlbar[pageproxystate="valid"] > #urlbar-icons > #go-button { visibility: collapse; } images to add add the following images: chrome://global/skin/icons/information-16.png used when presenting information notices. chrome://global/skin/icons/warning-16.png used when displaying warnings. images to
remove the following images were
removed: chrome://mozapps/skin/extensions/question.png no longer used. mac os x mac os x themes for firefox 3 should add these two rules to the end of chrome://global/skin/wizard.css: .wizard-buttons-btm { padding:xpx; } .wizard-label-box { display: none; } the numeric value ofx, the number of pixels of padding in .wizard-buttons-btm, should be the same a...
Using the W3C DOM - Archive of obsolete content
n element's text using the dom the text of an element is available as the textcontent or innertext property (some browsers support both). the textcontent property was introduced in the w3c dom 3 core, innertext has been an ie method since ie 4 and has been standardised in html5. both properties can be read or set. reading the property returns the text of an element with all the element content
removed. setting the property replaces all the element's content with a single text node with the assigned text. the following examples show how to modify the text of a span element that already exists in the html file. <body> <p>papa's got <span id="dynatext">a lot of nerve</span>!</p> <script type="text/javascript"> // get a reference to the span element var spanel = document.getelementbyid("dy...
...it then tests for support for textcontent, then innertext and uses which ever is supported. if neither is supported, it assumes support for basic dom 1 methods and uses those. it should be clear that translating scripts to mo...
Implementing controls using the Gamepad API - Game development
gamepad object there's lots of useful information contained in the gamepad object, with the states of buttons and axes being the most important: id: a string containing information about the controller. index: a unique indentifier for the connected device. connected: a boolean variable, true if the device is connected. mapping: the layout type ...
... string: enum gamepadmappingtype { "", "standard" }; this enum defines the set of known mappings for a gamepad. for now, there's only the standard layout available, but new ones may appear in the future. if the layout is unknown, it is set to an empty string. events there were more events available in the spec than just gamepadconnected and gamepaddisconnected available, but they were
removed from the specification as they were thought to not be very useful. the discussion is still ongoing as to whether they should be put back, and in what form. summary the gamepad api is very easy to develop with. now it's easier than ever to deliver a console-like experience to the browser without the need for any plugins. you can play the full version of the hungry fridge game directly in your b...
Collision detection - Game development
rick) { brick.kill(); } and that's it! reload your code and you should see the new collision detection working just as required. thanks to phaser there are two parameters passed to the function — the first one is the ball, which we explicitly defined in the collide method, and the second one is the single brick from the bricks group that the ball is colliding with. inside the function we
remove the brick in question from the screen simply by running the kill() method on it. you would expect to have to write a lot more calculations of your own to implement collision detection when using pure javascript. that's the beauty of using the framework — you can leave a lot of boring code to phaser, and focus on the most fun and interesting parts of making a game. compare your code you can c...
...implement collision detection when using pure javascript. that's the beauty of using the framework — you can leave a lot of boring code to phaser, and focus on the most fun and interesting parts of making a game. compare your code you can check the finished code for this lesson in the live demo below, and play with it to understand better how it works: next steps we can hit the bricks and
remove them, which is a nice addition to the gameplay already. it would be even better to count the destroyed bricks increment the score as a result. « previousnext » ...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
gh traffic. 46 cia glossary, security cia (confidentiality, integrity, availability) (also called the cia triad or aic triad) is a model that guides an organization's policies for information security. 47 cms cms, composing, content management system, glossary a cms (content management system) is software that allows users to publish, organize, change, or
remove various kinds of content, not only text but also embedded images, video, audio, and interactive code. 48 cors glossary, infrastructure, security cors (cross-origin resource sharing) is a system, consisting of transmitting http headers, that determines whether browsers block frontend javascript code from accessing responses for cross-origin requests. 49 cors-safelis...
...a. 389 smtp beginner, collaboration, glossary, infrastructure, sharing smtp (simple mail transfer protocol) is a protocol used to send a new email. like pop3 and nntp, it is a state machine-driven protocol. 390 soap glossary, infrastructure, soap, webmechanics soap (simple object access protocol) is a protocol for transmitting data in xml format. firefox
removed support for soap in 2008. 391 spa (single-page application) glossary, spa, single-page app an spa (single-page application) is a web app implemention that loads only a single web document, and then updates the body content of that single document via javascript apis such as xmlhttprequest and fetch when different content is to be shown. 392 sql codingscripting...
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
responsenodes = a; } else { // otherwise, the response must be a single well-formed document response responsenodes = [response.documentelement]; // put in array 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.
removechild(xinclude); } else if (responsetype === 'responsetext') { if (encn...
...arent.replacechild(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 xifallbackchildren = xifallback.childnodes; // prepend any node(s) then
remove xinclude for (j=0; j < xifallbackchildren.length ; j++) { xincludeparent.insertbefore(xifallbackchildren[j], xinclude); } xincludeparent.
removechild(xinclude); } } } return docu; } ...
Debugging CSS - Learn web development
ate something known as a reduced test case. being able to "reduce an issue" is a really useful skill. it will help you find problems in your own code and that of your colleagues, and will also enable you to report bugs and ask for help more effectively. a reduced test case is a code example that demonstrates the problem in the simplest possible way, with unrelated surrounding content and styling
removed. this will often mean taking the problematic code out of your layout to make a small example which only shows that code or feature. to create a reduced test case: if your markup is dynamically generated — for example via a cms — make a static version of the output that shows the problem. a code sharing site like codepen is useful for hosting reduced test cases, as then they are accessibl...
... can easily share them with colleagues. you could start by doing view source on the page and copying the html into codepen, then grab any relevant css and javascript and include it too. after that, you can check whether the issue is still evident. if removing the javascript does not make the issue go away, don't include the javascript. if removing the javascript does make the issue go away, then
remove as much javascript as you can, leaving in whatever causes the issue.
remove any html that does not contribute to the issue.
remove components or even main elements of the layout. again, try to get down to the smallest amount of code that still shows the issue.
remove any css that doesn't impact the issue. in the process of doing this, you may discover what is causing the problem, or at least ...
Overflowing content - Learn web development
nt won't cause problems. instead, perhaps you would like to add scrollbars when content overflows? using overflow: scroll, browsers with visible scrollbars will always display them—even if there is not enough content to overflow. this offers the advantage of keeping the layout consistent, instead of scrollbars appearing or disappearing, depending upon the amount of content in the container.
remove some content from the box below. notice how the scrollbars remain, even if there is no need for scrolling. in the example above, we only need to scroll on the y axis, however we get scrollbars in both axes. to just scroll on the y axis, you could use the overflow-y property, setting overflow-y: scroll. you can also scroll on the x axis using overflow-x, although this is not a recommended w...
...e second applies to overflow-y. otherwise, both overflow-x and overflow-y are set to the same value. for example, overflow: scroll hidden would set overflow-x to scroll and overflow-y to hidden. if you only want scrollbars to appear when there is more content than can fit in the box, use overflow: auto. this allows the browser to determine if it should display scrollbars. in the example below,
remove content until it fits into the box. you should see the scrollbars disappear. overflow establishes a block formatting context when you use a value of overflow such as scroll or auto, you create a block formatting context (bfc). the content of the box that you have changed the value of overflow for acquires a self-contained layout. content outside the container cannot poke into the container, a...
Test your skills: Selectors - Learn web development
the background green. try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor. selectors three in this example, try making the following changes without adding to the html. style links, making the link-state orange, visited links green, and
remove the underline on hover. make the first element inside the container font-size: 150% and the first line of that element red. stripe every other row in the table by selecting these rows and giving them a background color of #333 and foreground of white. try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point f...
...ese rows and giving them a background color of #333 and foreground of white. try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor. selectors four in this task try the following: make any paragraph that directly follows an h2 element red.
remove the bullets and add a 1px grey bottom border only to list items that are a direct child of the ul with a class of list. try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor. selectors five in this final task add css using attribute selectors...
Practical positioning examples - Learn web development
rring to have different tabs at different heights. styling our tabs now we want to style tabs to look like tabs — basically, these are a horizontal navigation menu, but instead of loading different web pages when they are clicked on like we've seen previously in the course, they cause different panels to be displayed on the same page. first, add the following rule at the bottom of your css to
remove the default padding-left and margin-top from the unordered list: .info-box ul { padding-left: 0; margin-top: 0; } note: we are using descendant selectors with .info-box at the start of the chain throughout this example — this is so that we can insert this feature into a page with other content already on it, without fear of interfering with the styles applied to other parts of the page. ...
...uld occur when each one is clicked on. when run, the function is passed a reference to the particular tab it is being run for, and an index number i that indentifies the tab's position in the tabs array. in the settabhandler() function, the tab has an onclick event handler set on it, so that when the tab is clicked, the following occurs: a for loop is used to cycle through all the tabs and
remove any classes that are present on them. a class of active is set on the tab that was clicked on — remember from earlier that this class has an associated rule in the css that sets the same color and background-color on the tab as the panels are styled with. a for loop is used to cycle through all the panels and
remove any classes that are present on them. a class of active-panel is set o...
Getting started with CSS - Learn web development
browsers display html content by default in pretty much the same way. however, you will often want something other than the choice the browser has made. this can be done by simply choosing the html element that you want to change, and using a css rule to change the way it looks. a good example is our <ul>, an unordered list. it has list bullets, and if i decide i don't want those bullets i can
remove them like so: li { list-style-type: none; } try adding this to your css now. the list-style-type property is a good property to look at on mdn to see which values are supported. take a look at the page for list-style-type and you will find an interactive example at the top of the page to try some different values in, then all allowable values are detailed further down the page. looking at t...
..., for example removing the underline, which is achieved by in the next rule: a:hover { text-decoration: none; } in the live example below, you can play with different values for the various states of a link. i have added the rules above to it, and now realise that the pink color is quite light and hard to read — why not change that to a better color? can you make the links bold? we have
removed the underline on our link on hover. you could
remove the underline from all states of a link. it is worth remembering however that in a real site, you want to ensure that visitors know that a link is a link. leaving the underline in place, can be an important clue for people to realize that some text inside a paragraph can be clicked on — this is the behavior they are used to. as with everythi...
Example 3 - Learn web development
ers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.
remove('active'); } function activeselect(select, selectlist) { if (select.classlist.contains('active')) return; selectlist.foreach(deactivateselect); select.classlist.add('active'); }; function toggleoptlist(select, show) { var optlist = select.queryselector('.optlist'); optlist.classlist.toggle('hidden'); } function highlightoption(select, option) { var optionlist = select.queryselect...
...st.contains('active')) return; selectlist.foreach(deactivateselect); select.classlist.add('active'); }; function toggleoptlist(select, show) { var optlist = select.queryselector('.optlist'); optlist.classlist.toggle('hidden'); } function highlightoption(select, option) { var optionlist = select.queryselectorall('.option'); optionlist.foreach(function (other) { other.classlist.
remove('highlight'); }); option.classlist.add('highlight'); }; // ------------- // // event binding // // ------------- // window.addeventlistener("load", function () { var form = document.queryselector('form'); form.classlist.
remove("no-widget"); form.classlist.add("widget"); }); window.addeventlistener('load', function () { var selectlist = document.queryselectorall('.select'); sel...
Styling web forms - Learn web development
t tricky to control placement of it. by default it is always positioned over the top border of its <fieldset> parent, near the top left corner. to position it somewhere else, for example inside the fieldset somewhere, or near the bottom left corner, you need to rely on positioning. ...
...ements: h1 { font : 1em "typewriter", monospace; align-self : end; } #message { grid-row: 1 / 5; } #from, #reply { display: flex; } labels and controls now we can start working on the form elements themselves. first, let's ensure that the <label>s are given the right font: label { font : .8em "typewriter", sans-serif; } the text fields require some common rules. ...
Test your skills: Advanced styling - Learn web development
ier task than with standard text inputs, even on modern browsers. we've already provided you with a basic reset to build upon. first of all, try giving the search box a consistent width, height, padding, and border color across browsers. you'll find that some browsers will not behave in terms of the form element's height. this is due to native os styling being used in some cases. ...
...even on modern browsers. we've already provided you with a basic reset to build upon. first of all, try giving the search box a consistent width, height, padding, and border color across browsers. you'll find that some browsers will not behave in terms of the form element's height. this is due to native os styling being used in some cases. how can you
remove this native styling? once you've
removed the native styling, you'll need to add back one of the features it was providing, to keep same look and feel we originally had. how do you do this? one thing that is inconsistent across browsers (particularly looking at safari here) is the position of the standard blue focus outline. how can you
remove this? there is a major problem with just getting rid of the blue focus outline. what is it? ...
Tips for authoring fast-loading HTML pages - Learn web development
eed to perform error-correction when parsing the html (this is aside from the philosophical issue of whether to allow format variation in user input and then programmatically "correct" or normalize it; or whether, instead, to enforce a strict, no-tolerance input format). moreover, valid markup allows for the free use of other tools which can pre-process your web pages. for example, html tidy can
remove whitespace and optional ending tags; however, it will refuse to run on a page with serious markup errors. chunk your content tables for layouts are a legacy method that should not be used anymore. layouts utilizing floats, positioning, flexbox, or grids should be used instead. tables are still considered valid markup but should be used for displaying tabular data. to help the browser render yo...
...n deeply nesting tables as in: <table> <table> <table> ... </table> </table> </table> use non-nested tables or divs as in <table>...</table> <table>...</table> <table>...</table> see also: css flexible box layout and css grid layout specifications. minify and compress svg assets svg produced by most drawing applications often contains unnecessary metadata which can be
removed. configure your servers, apply gzip compression for svg assets. minify and compress your images large images cause your page to take more time to load. consider compressing your images before adding them to your page, using compression features built into image-manipulation tools such as photoshop, or using a specialized tool such as compress jpeg or tiny png,. specify sizes for images and ta...
Images in HTML - Learn web development
roof that the image is, in fact, in the public domain. copyright violations are illegal and unethical. in addition, never point your src attribute at an image hosted on someone else's website that you don't have permission to link to. this is called "hotlinking". again, stealing someone's bandwidth is illegal. it also slows down your page, leaving you with no control over whether the image is
removed or replaced with something embarrassing. our above code would give us the following result: note: elements like <img> and <video> are sometimes referred to as replaced elements. this is because the element's content and size are defined by an external resource (like an image or video file), not by the contents of the element itself. note: you can find the finished example from this sect...
...information supporting the main text. a figure could be several images, a code snippet, audio, video, equations, a table, or something else. active learning: creating a figure in this active learning section, we'd like you to take the finished code from the previous active learning section, and turn it into a figure: wrap it in a <figure> element. copy the text out of the title attribute,
remove the title attribute, and put the text inside a <figcaption> element below the image. if you make a mistake, you can always reset it using the reset button. if you get really stuck, press the show solution button to see an answer: playable code 2 <h2>live output</h2> <div class="output" style="min-height: 50px;"> </div> <h2>editable code</h2> <p class="a11y-label">press esc to move focus aw...
From object to iframe — other embedding technologies - Learn web development
support iframes </a> </p> </iframe> this example includes the basic essentials needed to use an <iframe>: allowfullscreen if set, the <iframe> is able to be placed in fullscreen mode using the full screen api (somewhat beyond scope for this article.) frameborder if set to 1, this tells the browser to draw a border between this frame and other frames, which is the default behaviour. 0
removes the border. using this isn't really recommended any more, as the same effect can be better achieved using border: none; in your css. src this attribute, as with <video>/<img>, contains a path pointing to the url of the document to be embedded. width and height these attributes specify the width and height you want the iframe to be. fallback content in the same way as other similar elements...
...fter countless patches. in 2015, alex stamos, then-chief security officer at facebook, requested that adobe discontinue flash. note: due to its inherent issues and the lack of support for flash, adobe announced that they would stop supporting it at the end of 2020. as of january 2020, most browsers block flash content by default, and by december 31st of 2020, all browsers will have completly
removed all flash functionality. any existing flash content will be inaccessable after that date. so what should you do? if you need interactivity, html and javascript can readily get the job done for you with no need for java applets or outdated activex/bho technology. instead of relying on adobe flash, you should use html5 video for your media needs, svg for vector graphics, and canvas for complex i...
Index - Learn web development
ber" game, step by step. 77 arrays arrays, article, beginner, codingscripting, javascript, join, learn, pop, push, l10n:priority, shift, split, unshift in the final article of this module, we'll look at arrays — a neat way of storing a list of data items under a single variable name. here we look at why this is useful, then explore how to create an array, retrieve, add, and
remove items stored in an array, and more besides. 78 basic math in javascript — numbers and operators article, beginner, codingscripting, guide, javascript, learn, math, operators, augmented, increment, l10n:priority, maths, modulo in this article we have covered the fundamental information you need to know about numbers in javascript, for now. you'll see numbers used again and a...
...od user experience. part of good user experience is ensuring the content is quick to load and responsive to user interaction. this is known as web performance, and in this module you'll focus on the fundamentals of how to create performant websites. 338 css performance optimization css, performance, reference, tutorial css is render blockingto optimize the cssom construction,
remove unnecessary styles, minify, compress and cache it, and split css not required at page load into additional files to reduce css render blocking. 339 html performance features html, learning, web performance html is by default fast and accessible. it is our job, as developers, to ensure that we preserve these two properties when creating or editing html code. complications can ...
Manipulating documents - Learn web development
oves the paragraph down to the bottom of the section. you might have thought it would make a second copy of it, but this is not the case — linkpara is a reference to the one and only copy of that paragraph. if you wanted to make a copy and add that as well, you'd need to use node.clonenode() instead. removing a node is pretty simple as well, at least when you have a reference to the node to be
removed and its parent. in our current case, we just use node.
removechild(), like this: sect.
removechild(linkpara); when you want to
remove a node based only on a reference to itself, which is fairly common, you can use childnode.
remove(): linkpara.
remove(); this method is not supported in older browsers. they have no method to tell a node to
remove itself, so you'd have to do the following. linkpa...
...nt. in our current case, we just use node.
removechild(), like this: sect.
removechild(linkpara); when you want to
remove a node based only on a reference to itself, which is fairly common, you can use childnode.
remove(): linkpara.
remove(); this method is not supported in older browsers. they have no method to tell a node to
remove itself, so you'd have to do the following. linkpara.parentnode.
removechild(linkpara); have a go at adding the above lines to your code. manipulating styles it is possible to manipulate css styles via javascript in a variety of ways. to start with, you can get a list of all the stylesheets attached to a document using document.stylesheets, which returns an array-like object with cssstylesheet objects. you can then add/
remove styles as wished. however, we're not ...
Third-party APIs - Learn web development
ur url variable to fetch(), convert the response body to json using the json() function, then pass the resulting json to the displayresults() function so the data can be displayed in our ui. displaying the data ok, let's look at how we'll display the data. add the following function below your fetchresults() function. ...
...child(para1); article.appendchild(para2); article.appendchild(clearfix); section.appendchild(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. we keep checking to see if the <section> has a first child, and if it does, we
remove the first child. the loop ends when <section> no longer has any children. next, we set the articles variable to equal json.response.docs — this is the array holding all the objects that represent the articles returned by the search. this is done purely to make the following code a bit simpler. the first if() block checks to see if 10 articles are returned (the api returns up to 10 articles at...
Aprender y obtener ayuda - Learn web development
ic site typography work out a basic color scheme implement a high-level layout — header, horizontal navigation menu, main content area with main and side columns, and footer. implement a horizontal navigation menu etc. then you could break it down further, for example, "implement horizontal navigation menu" could be written out as: make a list of menu items sit horizontally in a line.
remove unneeded defaults, like list spacing and bullet points. style hover/focus/active states of menu items appropriately. make the menu items equally spaced along the line. give the menu items enough vertical spacing. make sure the text is centered inside each menu item etc. each of these problems doesn't seem nearly as difficult to solve as the one big problem you had initially. now you've jus...
... if you are a complete beginner to web development, you'll have to do some study and web searches and lookup solutions to such problems. if you are a professional web developer you'll probably remember the last time you solved a similar problem, and only have to look up a few bits of the synta...
Introduction to client-side frameworks - Learn web development
yet, but it will later once we decide to implement our delete feature. ...
... build for today's web. if you want to see code samples from this section in action, you can check out a working version of the app on codepen, which also allows users to add and delete new tasks. read more about the javascript used in this section: document.createelement() document.createtextnode() document.createdocumentfragment() eventtarget.addeventlistener() node.appendchild() node.
removechild() another way to build uis every javascript framework offers a way to write user interfaces more declaratively. that is, they allow you to write code that describes how your ui should look, and the framework makes it happen in the dom behind the scenes. the vanilla javascript approach to building out new dom elements in repetition was difficult to understand at a glance. by contrast, th...
Handling common accessibility problems - Learn web development
usable elements look when focused, using the :focus pseudo-class. it is a good idea to double up focus and hover styles, so your users get that visual clue that a control will do something when activated, whether they are using mouse or keyboard: a:hover, input:hover, button:hover, select:hover, a:focus, input:focus, button:focus, select:focus { font-weight: bold; } note: if you do decide to
remove the default focus styling using css, make sure you replace it with something else that fits in with your design better — it is a very valuable accessiblity tool, and should not be
removed. building in keyboard accessibility sometimes it is not possible to avoid losing keyboard accessibility. you might have inherited a site where the semantics are not very good (perhaps you've ended up with a...
...ent to get the look you want. for example, if you want bigger text, use font-size, not an <h1> element. make sure your source order makes sense without css; you can always use css to style the page any way you want afterward. you should make sure interactive elements like buttons and links have appropriate focus/hover/active states set, to give the user visual clues as to their function. if you
remove the defaults for stylistic reasons, make sure you include some replacement styles. there are a few other considerations you should take into account. color and color contrast when choosing a color scheme for your website, you should make sure that the text (foreground) color contrasts well with the background color. your design might look cool, but it is no good if people with visual impairme...
Handling common HTML and CSS problems - Learn web development
this used to be much more of a problem, but recently, with modern browsers tending to support css more consistently, layout issues tend to be more commonly associated with: lack of (or differences in) support for modern layout features. layouts not looking good in mobile browsers (i.e. responsive design problems). note: historically web developers used to use css files called resets, which
removed all the default browser styling applied to html, and then applied their own styles for everything over the top — this was done to make styling on a project more consistent, and reduce possible cross browser issues, especially for things like layout. however, it has more recently been seen as overkill. the best equivalent we have in modern times is normalize.css, a neat bit of css that builds s...
...bugs that would also need to be investigated if you were to try to support ie that far back). however, they are not really meant for layout purposes — using floats the way we do is really a hack — and they do have some serious limitations (e.g. see why flexbox?) more recently, dedicated layout mechanisms have appeared, like flexbox and css grids, which make common layout tasks far easier and
remove such shortcomings. these however are not as well-supported in browsers: css grids are very new; at the time of writing, they were only supported in the very newest versions of modern browsers. flexbox is well-supported in modern browsers, but provides problems in older browsers. ie 9 doesn't support it at all, and ie 10 and old versions of ios/desktop safari respectively support incompatible ...
Command line crash course - Learn web development
...
...is being moved, but from a practical perspective, this command is actually renaming the file. cp — similar in usage to mv, cp creates a copy of the file in the first location specified, in the second location specified. for example, cp mdn-example.txt mdn-example.txt.bak creates a copy of mdn-example.txt called mdn-example.txt.bak (you can of course call it something else if you wish). rm —
removes the specified file. for example, rm mdn-example.txt deletes a single file called mdn-example.txt. note that this delete is permanent and can’t be undone via the recycle bin that you might have on your desktop user interface. note: many terminal commands allow you to use asterisks as "wild card" characters, meaning "any sequence of characters". this allows you to run an operation against a p...
Package management basics - Learn web development
that you want to use instead of the current one, or a new version of your dependency is released that you want to update to? this is not too painful for a couple of dependencies, but in larger projects with many dependencies this kind of thing can become really challenging to keep track of. it makes more sense to use a package manager such as npm, as this will guarantee that the code is added and
removed cleanly, as well as a host of other advantages. what exactly is a package manager? we've met npm already, but stepping back from npm itself, a package manager is a system that will manage your project dependencies. the package manager will provide a method to install new dependencies (also referred to as "packages"), manage where packages are stored on your file system, and offer capabilities...
...ading them and putting them in the correct locations in your project. writing the code to include the package(s) in your application (this tends to be done using javascript modules, another subject that is worth reading up on and understanding). doing the same thing for all of the packages' sub-dependencies, of which there could be tens, or hundreds. removing all the files again if you want to
remove the packages. in addition, package managers handle duplicate dependencies (something that becomes important and common in front-end development). in the case of npm (and javascript- and node-based package managers) you have two options for where you install your dependencies. as we touched on in the previous article, dependencies can be installed globally or locally to your project. although t...
Accessibility API cross-reference
feed a landmark region that contains a collection of items and objects that, as a whole, combine to create a form. form <form> presumably msaa's graphic is aria's and html's img? graphic n/a n/a img <img> a cell in a grid or treegrid. ...
... single_line single_line tells accessibility aid "don't add event listener - this object doesn't generate any". for example, could be used with higher level containers. n/a transient transient the descendents of composite roles behave rather like this. for grayed-out (disabled) vs. available (enabled) items. html attribute also
removes element from tab sequence and 'grays it out'. aria attribute keeps it 'perceivable'. unavailable enabled n/a aria-disabled=true disabled (boolean attribute) especially used for sliders and scrollbars n/a vertical vertical aria-orientation=vertical accessible events msaa event (event_object_*, event_system_*) java...
Accessibility Features in Firefox
s to get there. caret browsing allows you to move through web content one letter a time. you can even select web content and copy it to the clipboard. -- all with the keyboard detailed advanced javascript control: mozilla gives you the ability to fine tune what javascript is allowed to do while you browse. for example, you can disable functions that websites use to move or resize windows, or to
remove your status bar, to disable right-click contextual menus, change the status bar text, etc. you can furthermore control javascript capabilities to
remove scrollbars, toolbars or system buttons like minimize, close and maximize by editing the about:config related properties or by editing accordingly the user.js file as explained in this "disable other javascript window features" document. moving b...
...tion source". this will show the html source for only the selected text, which is useful for understanding accessibility problems in some web sites. customize your experience! many users are finding the true greatness of firefox lies in support for third party extensions. extensions are small add-ons which can change your browser experience as you see fit. extensions can easily be installed or
removed with the extension manager in the tools menu. here are some examples of accessible extensions, although there are hundreds more to try (thank you to the gw micro knowledge base for some of this information): adblock plus
removes ads (and other objects, like banners) from web pages greasemonkey lets you add bits of javascript ("user scripts") to any web page to change its behavior. in much t...
Accessibility information for UI designers and developers
by keyboard (or other specialised input methods), rely on focus styles to see where they are on the page. only one element has focus at a given time, typically revealed by browsers with a dotted outline. css lets authors change what the focus indicator look like, so you can design it to match branding. here's an example of someone tabbing through a footer, the focus moves around: note: don't
remove the focus indicator, as without it, users that can't or don't use a mouse cannot see where they are. it would be like removing the mouse indicator. see also: understanding sc 2.4.7: focus visible be ready for resizing and custom styles on the web, users can use tools in their browser to make font sizes larger, or even provide custom css to meet their specific needs. ensure your design is flexi...
...as they are often too low in contrast. it is more helpful to describe what an input element is for in text just above or underneath the input. error recovery when you detect users provide unexpected input, explain what is wrong and, if possible, how to correct it. this is specifically important in these cases: the user input is about legal commitments or financial transactions it updates or
removes the user's data in a system when recording tests responses in those cases, ensure users can change submissions, automatically check for errors. or provide an opportunity to review the input before submitting it. use default controls controls that are built into browsers come with a lot of accessibility for free. for example, the select element displays an ideal mobile interface on mobile op...
Gecko info for Windows accessibility vendors
er to read the contents of the alert (it may be a container who's descendents should be read). event_selection is fired on children of single selection containers along with the event_focus as selection/focus move together in that case. event_selectionwithin is fired on multi selection containers when the current selection changes within. in addition, event_selectionadd and event_selection
remove are fired on the the child who's selection changed. how to track where the event happened, within your own offscreen model ordinary zero-indexed child ids are not practical for representing events. the problem is that the child id system that is used by msaa doesn't work well when you have a deep tree of objects in a window. it would be impractical to number all of the nodes in a docu...
...ow to track where the event happened, within your own offscreen model ordinary zero-indexed child ids are not practical for representing events. the problem is that the child id system that is used by msaa doesn't work well when you have a deep tree of objects in a window. it would be impractical to number all of the nodes in a document starting at 0, because whenever a node is inserted or
removed it would be computationally very expensive to renumber things. so, the firefox childid handed back from events is based on an algorithm that uses the pointer value of the related internal dom node. this computed child id for events is always a negative value, unique to the iaccessible firing the event these negative childid's from events can be used with accessibleobjectfromevent(), or on th...
Testopia
are upgrading, please reverse the existing version's patch before installing. a fresh install only requires that you untar the tarball in your bugzilla root directory and run checksetup. thanks go to lpsolit from the bugzilla team for his work in making this possible. testopia 2.4 this version supports bugzilla 3.6. important notice: if you are upgrading on a case sensitive filesystem you must
remove the existing testopia folder in the extensions directory. if you have made modifications to the testopia source code, you will need to merge them into the new testopia folder (capital t). if you are on windows or another case insensitive file system you should first rename the folder (testopia-old for example) and then unzip the tarball. you can then merge your changes before deleting the old ver...
...ing the old version. api users take note: positional parameters are now deprecated. all params should now be sent in a hash (struct, dict, hashmap or whatever your language of choice calls key, value pairs). though all attempts have been made to provide continuing support for positional parameters, please be aware that some api calls may fail until you make this change. also, future versions may
remove this support completely. as always please backup your installation before attempting to install or upgrade. testopia 2.3 this version supports bugzilla 3.4. the main new features are: support xml export and import of test plans and children support csv export of test cases and results. new reports: worst offender and case roll-up set priorities on indidual case-runs new clone options u...
Chrome registration
me packages can decide whether to use the xpcnativewrapper security mechanism to automatically protect their code against malicious content that they might access. see safely accessing content dom from chrome for details. this flag is enabled by default since firefox 1.5. disabling it manually was possible by specifying xpcnativewrappers=no until firefox 4. note: support for this flag has been
removed in gecko 2.0. you can no longer disable xpcnativewrappers. to update your add-on to work without this flag: if your add-on depends upon xbl bindings attached to content objects (that is, it needs to be able to call functions or get and set properties created by the xbl binding), you'll need to use the object's wrappedjsobject property to obtain a wrapped object. if you need to call functions...
...not support the plaintext manifest format yet, so contents.rdf manifests are required for extensions that wish to maintain backwards compatibility with firefox 1.0 or the suite. gecko 1.9.2 note the contents.rdf manifest format is no longer supported at all starting with gecko 1.9.2; add-ons already installed using this format will continue to work but can no longer be installed. be sure to
remove your add-on and reinstall it to ensure that it installs correctly after updating it to use a plaintext manifest. official references for toolkit api official references. do not add to this list without contacting benjamin smedberg. note that this page is included from the pages listed below. so: don't add breadcrumbs! structure of an installable bundle: describes the common structure of inst...
Command line options
--unregister-global unregisters xulrunner for all users. --unregister-user unregisters xulrunner for a single user. chrome -chrome chrome_url load the specified chrome. firefox -chrome chrome://inspector/content -register chrome_url register the specified chrome, but do not start application. add-ons gecko 1.9.2 note -install-global-extension and -install-global-theme have been
removed from gecko 1.9.2 and upwards. -install-global-extension /path/to/extension installs the extension into the application directory. the parameter is the path to the extension. you must have administrative privileges. -install-global-theme /path/to/theme same as above, but for themes. you must have administrative privileges. note: since firefox 2.0.0.7, use of the -install-global-extension a...
...stricted to only allow installing add-ons that are on local disks or mapped drives. installing from a network share directly will no longer succeed. -safe-mode launches the application with all extensions disabled, for that launch only (extensions are not loaded, but are not permanently disabled in the extension manager data source). remote control -remote remote_command this feature was
removed in firefox 36.0, restored in 36.0.1 and
removed again in 39.0. see bug 1080319. execute the specified remote_command in an already running application process. firefox -remote "openurl(www.mozilla.org, new-tab)" this option is only available on x-windows unix platforms. miscellaneous -attach-console write messages for the debugging console into the window which launched the application...
Creating a Firefox sidebar
d like to have a deeper integration with the browser to offer more complex features, a traditional overlay extension can be an option. the document might be obsolete, though.obsolete since gecko 57 the social api obsolete since gecko 57 (firefox 57 / thunderbird 57 / seamonkey 2.54)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. this content covers features introduced in firefox 17. the window.sidebar api obsolete since gecko 23 (firefox 23 / thunderbird 23 / seamonkey 2.20)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. as of firefox 23, the addpanel and addpersistentpa...
...oid using it. this content covers features introduced in firefox 17. the window.sidebar api obsolete since gecko 23 (firefox 23 / thunderbird 23 / seamonkey 2.20)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. as of firefox 23, the addpanel and addpersistentpanel functions have been
removed from the deprecated, netscape-derived window.sidebar object. that means the ability to add a traditional sidebar panel is no longer available from web content. the new social api or an extension can be used instead as described above. see also bootstrap addon demo which adds a sidebar with browser for html content: https://gist.github.com/noitidart/8728393 ...
Creating reftest-based unit tests
running ipc reftests reftests can also be run in a separate process, which can differ from same-process rendering in significant ways. currently, ipc reftests are only being run on linux. to run: moz_layers_force_shmem_surfaces=1 make -c $(objdir) reftest-ipc note: right now, automation currently only runs layout/reftests/reftest-sanity/reftest.list! if you try...
...es three extra steps. first you need to add class="reftest-wait" to the root element in the test to tell the reftest framework not to check the rendering as soon as the test finishes loading and moving on to the next test. next you need to add a listener for the 'mozreftestinvalidate' event, and only make the changes you want to test invalidation for after that event has fired. third, you need to
remove 'reftest-wait' from the root element's 'class' attribute to tell the reftest framework that the test is now ready to have its rendering tested. the reason for using the 'mozreftestinvalidate' event is because a document's initial painting is not typically finished when the 'load' event fires. it would be possible to try and wait for the initial rendering to be done using a settimeout, but that w...
Debugging on Mac OS X
try build and downloading the dmg generated by the "rpk" shippable build job. a debugger can be attached to firefox processes of these builds. try builds use the developer.entitlements.xml file from the source tree while production builds use production.entitlements.xml. on macos 10.15+, downloaded try builds will not launch by default because notarization is required. to workaround this problem,
remove the quarantine extended attribute from the downloaded nightly: $ xattr -r -d com.apple.quarantine /path/to/nightly.app local builds local builds of mozilla-central do not enable hardened runtime and hence do not have debugging restrictions. as a result, some functionality will be permitted on local builds, but blocked on production builds which have hardened runtime enabled. bug 1522409 was ...
...scriptive name than "copy of scheme" select "run" on the left-hand side of the settings window, then select the "info" tab. set the executable by clicking on the "executable" drop-down, and selecting the plugin-container.app that is inside the app bundle of the copy of firefox you want to debug. on the same tab, under "launch" select "wait for executable to be launched" on the "arguments" tab,
remove all arguments passed on launch. now you're ready to start debugging: from the "product" menu, ensure the scheme you created above is selected under "scheme" click the "run" button. the information area at the top of the window will show "waiting for plugin-container to launch" from a command line, run your build of firefox. when that launches a child process (for example, when you start to...
Simple Thunderbird build
moz_objdir it cannot be a sibling folder to your source directory. use an absolute path to be sure! to also build lightning when building thunderbird (deprecated) note: the lightning calendar add-on was integrated into thunderbird starting with version 74. the `--enable-calendar` option is now deprecated and no longer has any effect. if it is in your `mozconfig` file, you should go ahead and
remove it when building thunderbird 74 or later, since support for it will eventually be
removed completely. add the following line to your mozconfig file: ac_add_options --enable-calendar to add that line you can do this in the source/ directory: echo 'ac_add_options --enable-calendar' >> mozconfig building before you start, make sure that the version you checked out is not busted. for hg tip, ...
...pported. check for @topsrcdir@ or relative paths in your mozconfig. those have caused several problems historically and tend to be poorly tested when the build system changes. if on windows you get link errors like "lnk1102: out of memory" or "lnk1318: unexpected pdb error; ok (0)", try deleting the largest .pdb files before rushing out the door to buy more ram. clobbering (see below) will also
remove those files. try with a clean obj-dir. you can clean out previous build artefacts using ./mach clobber references general build documentation comm-central using the mozilla symbol server ...
Updating NSPR or NSS in mozilla-central
apply the patches. if merging is required, update the patch file. if a patch is no longer n...
...k line) to force a rebuild of nspr: mozilla/nsprpub/config/prdepend.h or nss: mozilla/security/nss/coreconf/coreconf.dep check directory mozilla/nsprpub/patches/ for patches that need to be applied to nspr, and directory mozilla/security/patches/ for patches that need to be applied to nss. apply the patches. if merging is required, update the patch file. if a patch is no longer needed,
remove the patch from the directory and update the readme file. check for new or
removed files $ hg add
remove -n review the output to make sure it looks correct update the minimum required system nss version in old-configure.in. this is for builds with --with-system-nss. for example, in the following, "3.16.1" would be replaced with the new nss version. moz_arg_with_bool(system-nss, [ --...
The Firefox codebase: CSS Guidelines
omplete-item[selected] > .autocomplete-item-title would be more efficient than .autocomplete-item[selected] .autocomplete-item-title overriding css before overriding any css rules, check whether overriding is really needed. sometimes, when copy-pasting older code, it happens that the code in question contains unnecessary overrides. this could be because the css that it was overriding got
removed in the meantime. in this case, simply dropping the override should work. it is also good practice to look at whether the rule you are overriding is still needed: maybe the ux spec for the component has changed and that rule can actually be updated or
removed. when this is the case, don't be afraid to
remove or update that rule. once the two things above have been checked, check if the other ru...
...ents regarding page colors. part of those adjustments include making all box-shadow invisible, so this is something to be aware of if you create a focus ring or a border using the box-shadow property: consider using a border or an outline if you want the border/focus ring to stay visible in high-contrast mode. an example of such bug is bug 1516767. another adjustment to be aware of is that gecko
removes all the background-image when high contrast mode is enabled. consider using an actual <img> tag (for html documents) or list-style-image (for xul documents) if rendering the image is important. if you are not using windows, one way to test against those adjustments on other platforms is: going to about:preferences clicking on the "colors..." button in the "fonts & colors" sub-section of the...
Interface Compatibility
wsers make it the only option. any changes, including new features, must have super-review. one exception to this rule is apis which are explicitly shipped with mozilla prefixes as a technology preview. this includes css properties that begin with the -moz- prefix (e.g. -moz-box-shadow), or javascript apis that begin with the moz prefix (e.g. canvasrenderingcontext.mozdrawtext). these apis may be
removed or replaced with standard interfaces in future releases of mozilla. jetpack the jetpack sdk and apis are not yet complete. the stable version 1.0 of the jetpack sdk is planned for later in 2010. documented apis which are shipped as part of the jetpack sdk are designed to work in future versions of firefox. achieving this compatibility may require rebuilding the extension with a new version of ...
...erfaces traditionally, mozilla has maintained a set of xpcom interfaces and functions with the @status frozen marking. using these interfaces, and using dynamic calls to queryinterface, it has been possible to write binary xpcom components which were compatible with multiple versions of firefox. beginning with mozilla 2 (firefox 4), this will no longer be supported: all @status markings have been
removed, and extensions that use binary components will need to recompile for each major version they wish to support. js-ctypes is the recommended way for extensions to call into os or third-party native code. you should strongly consider migrating existing code to use js-ctypes instead of binary components. if necessary, it is possible for an extension to support multiple versions by shipping multi...
Reviewer Checklist
results in "part 0" of a bug, which is "tidy things up to make the fix easier to write and review". if qa needs to verify the fix, you should provide steps to reproduce (str). quality if you can unit-test it, you should unit-test it. if it's js, try to design and build so that xpcshell can exercise most functionality. it's quicker. make sure the patch doesn't create any unused code (e.g.,
remove strings when removing a feature) all caught exceptions should be logged at the appropriate level, bearing in mind personally identifiable information, but also considering the expense of computing and recording log output. [fennec: checking for log levels is expensive unless you're using logger.] style follow the style guide for the language and module in question. follow local style for t...
...if your custom view does animations, it's better to clean up runnables in ondetachfromwindow().] ensure all file handles and other closeable resources are closed appropriately. [fennec: when writing tests that use paintedsurface, ensure the paintedsurface is closed when you're done with it.] performance impact check for main-thread io [fennec: android may warn about this with strictmode].
remove debug logging that is not needed in production. threading issues enormous: correct use of locking and volatility; livelock and deadlock; ownership. [fennec: all view methods should be touched only on ui thread.] [fennec: activity lifecycle awareness (works with "never keep activities"). also test with oom-fennec (https://hg.mozilla.org/users/blassey_mozilla.com/oom-fennec/)]. compatibili...
SVG Guidelines
tter (xmlns:sketch, xmlns:sopodi, …) other metadata in addition to non-standard editor metadata, standard compliant metadata also exists. typical examples of this are <title> and <desc> tags. although this kind of data is supported by the browser, it can only be displayed when the svg is opened in a new tab. plus, in most of the cases, the filename is quite descriptive so it's recommended to
remove that kind of metadata since it doesn't bring much value. you shouldn't include doctypes in your svgs either; they are a source of many issues, and the svg wg recommends not to include them. see svg authoring guidelines. avoid the use of cdata sections cdata sections are used to avoid parsing some text as html. most of time, cdata isn't needed, for example, the content in <style> tags doesn't n...
...-awareness. to this date, there doesn't seem to be a tool that handles all of the above. ...
Displaying Places information using views
t or a query, and you would execute the query and add your view as an observing client using addobserver(). (that's how the load method of the built-in tree view works.) when you let your view observe the result, the result will in turn set the result property on the given nsinavhistoryresultobserver. you should not set the result property explicitly. to disconnect a viewer from its result, call
removeobserver(view) on your result. be careful about reference cycles. the viewer and the result both hold owning references to each other. for these objects to be freed during javascript garbage collection, you must clear this cycle by calling result.
removeobserver(view). (for example, the built-in tree view does this automatically. when the tree is destroyed or a different nsitreeview is associated ...
...take a look at using the tree view above to get an idea of what's required. ...
Error codes returned by Mozilla APIs
le exists beforehand. ns_error_file_read_only (0x80520013) an attempt was made to create or write to a file or directory that is read only. this might happen if the file is not writable, the directory containing the file is not writable or the disk is write protected. use nsifile.iswritable() to check if the file can be written to. ns_error_file_dir_not_empty (0x80520014) when calling nsifile.
remove() on a directory and the 'recursive' argument to this method is false, this error will occur if the directory is not empty. ns_error_file_access_denied (0x80520015) an operation was not performed on a file because the file cannot be accessed, typically because the permissions set for the file do not allow the operation. stream errors ns_base_stream_closed (0x80470002) this error occurs wh...
...example, an http redirect occurred). this error code is used with load groups to notify the load group observer when a request in the load group is redirected to another request. ns_binding_retargeted (0x804b0004) the asynchronous request has been "retargeted" to a different "handler." this error code is used with load groups to notify the load group observer when a request in the load group is
removed from the load group and added to a different load group. ns_error_malformed_uri (0x804b000a) the uri is malformed. ns_error_already_connected (0x804b000b) the connection is already established. xxx currently unused - consider removing. ns_error_not_connected (0x804b000c) the connection does not exist. xxx currently unused - consider removing. ns_error_connection_refused (0x804b000d) n...
Experimental features in Firefox
terface for managing media playback, and to obtain media file metadata. see bug 1112032 for more details. release channel version added enabled by default? nightly 71 yes developer edition 71 no beta 71 no release 71 no preference name dom.media.mediasession.enabled asynchronous sourcebuffer add and
remove this adds the promise-based methods appendbufferasync() and
removeasync() for adding and removing media source buffers to the sourcebuffer interface. see bug 1280613 and bug 778617 for more information. release channel version added enabled by default? nightly 62 no developer edition 62 no beta 62 no release 62 no ...
... that the request was upgraded, instead of showing a warning. release channel version added enabled by default? nightly 60 no developer edition 60 no beta 60 no release 60 no preference name security.mixed_content.upgrade_display_content ftp support disabled for security reasons, mozilla intends to
remove support for ftp from firefox in 2020, effective in firefox 82. see bug 1622409 for implementation progress. the network.ftp.enabled preference must be enabled (set to true) to allow ftp to be used. release channel version added enabled by default? nightly 77 yes developer edition 77 no beta 77 no release 77 no ...
Communicating with frame scripts
ue: // frame script addeventlistener("click", function (event) { var results = sendsyncmessage("my-addon@me.org:my-e10s-extension-message", { details : "they clicked", tag : event.target.tagname }); content.console.log(results[0]); // "value from chrome" }, false); like arguments, return values from sendsyncmessage() must be json-serializable, so chrome can't return functions.
removemessagelistener() to stop listening for messages from content, use the message manager's
removemessagelistener() method: // chrome script messagemanager.
removemessagelistener("my-addon@me.org:my-e10s-extension-message", listener); chrome to content to send a message from chrome to content, you need to know what kind of message manager you're using. if it's a browser message manager, you can us...
...rverservice = cc["@mozilla.org/observer-service;1"] .getservice(ci.nsiobserverservice); observerservice.addobserver(this, "message-manager-disconnect", false); console.log("listening"); }, unregister: function() { var observerservice = cc["@mozilla.org/observer-service;1"] .getservice(ci.nsiobserverservice); observerservice.
removeobserver(this, "message-manager-disconnect"); } } var observer = new myobserver(); observer.register(); ...
Frame script loading and lifetime
sage manager, you should always pass true here. because a browser message manager only corresponds to a single browser tab, its loadframescript() function will only ever load the frame script into that one tab. passing allowdelayedload is a way to ensure that the script is loaded correctly, in case the tab is not ready when making the call. if you use allowdelayedload, you can cancel it by using
removedelayedframescript: var mm = window.messagemanager; mm.
removedelayedframescript("chrome://my-e10s-extension/content/frame-script.js"); this means we will stop loading the script into new tabs. note that this function will not
remove any scripts which have been loaded earlier. frame script lifetime frame scripts are loaded as soon as loadframescript() is called. if you've set allowdelayedload, ...
... disable any frame scripts already loaded. there is no mechanism to unload frame scripts which are already loaded. you need to send a message to your frame scripts, telling them to disable themselves; for example, by undoing any changes they've made or removing any event listeners. there is a bug in non-e10s where t...
Performance best practices for Firefox front-end engineers
ml or xul, it doesn’t matter), the browser does calculations to figure out which css styles will apply to each element. this happens the first time the page loads and the css is initially applied, but can happen again if javascript modifies the dom. javascript code might, for example, change dom node attributes (either directly or by adding or removing classes from elements), and can also add,
remove, or delete dom nodes. because styles are normally scoped to the entire document, the cost of doing these style calculations is proportional to the number of dom nodes in the document (and the number of styles being applied). it is expected that over time, script will update the dom, requiring us to recalculate styles. normally, the changes to the dom just result in the standard style calculation...
...that can be accelerated by the gpu. these gpu-accelerated animations occur off of the main thread, and have a much higher probability of running at 60 fps (see the section below called use the compositor for animations for further details). perhaps you’re touching some dom nodes in such a way that unexpected repaints are occurring in an area that don’t need it. best to investigate and try to
remove those as best you can. sometimes, our graphics layer invalidates regions in ways that might not be clear to you, and a section outside of the thing that just repainted will also repaint. sometimes this can be addressed by ensuring that the thing changing is on its own layer (though this comes at a memory cost). you can put something on its own layer by setting its z-index, or by setting the will-...
Security best practices for Firefox front-end engineers
dom through apis such as innerhtml when running system-privileged chrome code, we sanitize all html fragments that are created for chrome-privileged documents. this policy includes all dom apis that take a string and parse it into a dom tree. we use our built-in sanitizer with the following flags: sanitizerallowstyle sanitizerallowcomments sanitizerdropforms sanitizerlogremovals the sanitizer
removes all scripts (script tags, event handlers) and form elements (form, input, keygen, option, optgroup, select, button, datalist). the canonical truth for the list of whitelisted elements is the source code. the last flag ensures that developers will identify and avoid the problems early on in the development cycle and before shipping the code. linter rules against unsanitized dom interaction t...
... the linter makes an exception for code that uses string literals that are hard coded in the source code, assuming benevolent developers. developers are able to avoid tripping the rule by using escaping functions in combination with template strings, for example: bar.innerhtml = escapehtml`<a href='${url}'>about</a>`; in system-privileged chrome code, any kind of remaining scripts will still be
removed by our sanitizer. appendix list of disallowed dom apis innerhtml outerhtml insertadjacenthtml() createcontextualfragment() document.write() document.writeln() please take a look at the repository for an updated list ...
mozbrowsermetachange
non-standard this feature is non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. the mozbrowsermetachange event is fired when a <meta> element related to web applications is added,
removed or changed. see below for the applicable types. general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the browser iframe type read only domstring the type of event. bubbles read only ...
...t object with the following properties: name a domstring representing the <meta> name attribute value. this can be viewmode, theme-color, theme-group, or application-name. content a domstring representing the <meta> content attribute value, i.e. the content of the meta tag. type a domstring representing the type of meta change that this event object represents. this can be added, changed,
removed, or undefined. lang optional a domstring representing the <meta> name attribute value, if included. if not included, the value returned is undefined. example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowsermetachange", function(event) { console.log("a meta tag has been " + event.details.type + ". its name is " + event.details.name + ", and its conten...
CSS <display-xul> component
see this firefox site compatibility post for more details. ...
...see this firefox site compatibility post for more details. ...
MozBeforePaint
this computes the current position for the animating box and updates the box's position on screen, and, if the animation sequence is not yet c...
... you may take a look at this example live if you like. ...
Getting from Content to Layout
watch" the content tree. nscssframeconstructor gets notified from the document's presshell (which implements nsidocumentobserver and observes the document) about all nodes in the document. the frame constructor takes these notifications and does the following: dispatches "restyle events" which trigger the reprocessing of relevant css selectors and any restyling that needs to occur. adds and
removes frames to make the frame tree a proper representation of the new content tree. restyling the restyletracker maintains a list of restyles to process. elements that need to be restyled are marked with flags (e.g element_has_pending_restyle) and are stored in the mpendingrestyles hashtable. a list of restyle roots (places in the content tree where all descendants need to be restyled but nothin...
...ge. these items are then examined in relation to the location in the content tree that is being modified and either the relevant frames are created/destroyed or the logic moves up to the parent frame. to give a trivial example of when this might be necessary, consider: "<span>foo <div></div> bar</span>". separate frames are created for the pre and post-div parts of the <span>. if the <div> is
removed, the frame construction code merges those frames by examining the parent frame, destroying the two frames created for the <span>, and creating one unified frame for the text content. examples of this type of code are in wipecontainingblock. this code tries hard to avoid unnecessary frame tree modifications and is rather complicated as a result. ...
Introduction to Layout in Mozilla
notifications passes these to the style set object, who in turn passes to the frame constructor frame constructor creates ...
...ddleaf content sink creates and attaches content nodes using nsicontent interface content sink maintains stack of “live” elements more buffering and fixup occurs here insertchildat, appendchildto,
removechildat frame construction content sink uses nsidocument interface to notify of Δs in content model contentappended, contentinserted, content
removed presshell is registered as document observer receives contentappended, etc. notifications passes these to the style set object, who in turn passes to the frame constructor frame constructor creates frames constructframeinternal recursively walks content tree, resolves style and creates frames either created by tag (<select>) or by display type (<p>...
DeferredTask.jsm
the deferredtask.jsm javascript code module offers utility routines for a task that will run after a delay. multiple attempts to run the same task before the delay will be coalesced. to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/deferredtask.jsm"); use this, for instance, if you write data to a file and you expect that you may have to rewrite data very soon afterwards. ...
... "example service: shutting down", () => savedeferredtask.finalize() ); instead, if you are going to delete the saved data from disk anyways, you might as well prevent any pending write from starting, while still ensuring that any write that is currently in progress terminates, so that the file is not in use any more: savedeferredtask.disarm(); savedeferredtask.finalize().then(() => os.file.
remove(...)) .then(null, components.utils.reporterror); ...
Dict.jsm
the dict.jsm javascript code module offers routines for managing dictionaries of key/value pairs. to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/dict.jsm"); creating a dictionary you can create a new, empty dictionary by simply calling the dict() constructor: var newdict = new dict(); if you wish, you may also pass in an object literal of key/value pairs with which to initialize the dictionary: var someobj = {}; var newdict = new dict({key1: "foo", key2: someobj}); note that values may be any javascript object type. ...
...pied. dict copy(); parameters none. return value a new dictionary object containing the same top-level items as the original dictionary on which the copy() method was called. del() deletes a key/value pair from the dictionary, given a key. boolean del( string akey ); parameters akey the key for the item to delete from the dictionary. return value true if an entry was found and
removed; false if no match was found. get() returns the value corresponding to the specified key. object get( string akey, [optional] object adefault ); parameters akey the key whose value should be returned. adefault optional the value to return if the specified key isn't found. if you don't specify a default value, undefined is returned for keys that aren't found. return value the va...
DownloadSummary
provides an aggregated view on the contents of a downloadlist. a reference to a downloadsummary object can be obtained using the downloads.getsummary() function. method overview promise bindtolist(downloadlist alist); promise addview(object aview); promise
removeview(object aview); properties attribute type description allhavestopped read only boolean indicates whether all the downloads are currently stopped. progresstotalbytes read only number indicates the total number of bytes to be transferred before completing all the downloads that are currently in progress. for downloads that do not have a known final size, the number of byte...
...l receive an initial onsummarychanged notification. promise addview( object aview ); parameters aview the view object to add. the following methods may be defined: onsummarychanged: optional called after any property of the summary has changed. promise resolves to undefined when the view has been registered and the onsummarychanged notification has been sent.
removeview()
removes a view that was previously added using addview(). promise
removeview( object aview ); parameters aview the view object to
remove. promise resolves to undefined when the view has been
removed. at this point, the
removed view will not receive any more notifications. ...
WebRequest.jsm
it takes one mandatory argument and two optional arguments, as detailed below. name type description callback function the callback argument is a function to be called when the event is triggered. it's passed an object whose structure will vary depending on t...
...ific documentation for details. in particular, "blocking" may be passed to several event types, and will make the event dispatch synchronous, so the browser will wait for the event listener to return before continuing with the request. this then enables the event listener to modify or cancel the request. see modifying & canceling requests. some examples of using addlistener(). to
remove a listener for an event, call
removelistener on the event in question, passing it the listener to
remove. filtering the filter argument is the second argument to addlistener(). if you don't pass filter, then the listener is invoked for every web request the browser makes that triggers that particular event. filter is an object that may contain up to two properties: urls and types. na...
Refcount tracing and balancing
the leakers first you have to figure out which objects leaked. the script tools/rb/find_leakers.py does this. it grovels through the log file, and figures out which objects got allocated (it knows because they were just allocated because they got addref()-ed and their refcount became 1). it adds them to a list. when it finds an object that got freed (it knows because its refcount goes to 0), it
removes it from the list. anything left over is leaked. the scripts output looks like the following. 0x00253ab0 (1) 0x00253ae0 (2) 0x00253bd0 (4) the number in parentheses indicates the order in which it was allocated, if you care. pick one of these pointers for use with step 2. post-processing step 2: filtering the log once you've picked an object that leaked, you can use tools/rb/filter-log.pl ...
...s from smart pointers. if the leak comes from a smart pointer that is logged in the xpcom_mem_comptr_log, then find-comptr-leakers.pl will find the exact stack for you, and you don't have to look at trees. ignore balanced trees. the make-tree.pl script accepts an option --ignore-balanced, which tells it not to bother printing out the children of a node whose balance factor is zero. this can help
remove some of the clutter from an otherwise noisy tree. ignore matched releases from smart pointers. if you've checked (see above) that the leak wasn't from a smart pointer, you can ignore the references that came from smart pointers (where we can use the pointer identity of the smart pointer to match the addref and the release). this requires using an xpcom_mem_refcnt_log and an xpcom_mem_comptr_log ...
TraceMalloc
this documentation is only relevant to older versions of the codebase that still contain it. tracemalloc captures stack traces of all malloc, calloc , realloc, and free calls (this currently covers all operator new and delete calls in mozilla, too). to enable tracemalloc in your build, configure with --enable-trace-malloc. the built mozilla application will support the following additional command-line options: --trace-malloc filename the application will log allocation and deallocation events with stack traces in a binary format to the given file. ...
...leak.log # note 2: it appears that the shutdown log is not recorded if --trace-malloc is given the - argument. build/dist/minefield.app/contents/macos/firefox --trace-malloc /dev/null --shutdown-leaks=sdleak.log # convert raw log to text representation of call trees perl source/tools/trace-malloc/diffbloatdump.pl --depth=15 --use-address /dev/null sdleak.log > sdleak.tree.raw # frobulate trees to
remove extraneous junk perl source/tools/rb/fix-macosx-stack.pl sdleak.tree.raw > sdleak.tree you can also use the leakstats program to analyze a log for shutdown leaks. it will produce a report like the following. leaks: 382739 bytes, 3465 allocations maximum heap size: 7751799 bytes 62095212 bytes were allocated in 391091 allocations. detecting memory usage growth in a running process to do this, dump...
Midas editor module security preferences
please do not try to modify this page. to protect users' private information, unprivileged scripts cannot invoke the cut, copy, and paste commands in midas, which is mozilla's rich text editor component. ...
... ...
NSS_3.12.2_release_notes.html
nsertion of e-identity smartcard bug 447563: modutil -add prints no error explanation on failure bug 448431: pk11_createmergelog() declaration causes gcc warning when compiling with -wstrict-prototypes bug 449334: pk12util has duplicate options letters bug 449725: signver is still using static libraries. ...
... duplicate options letters bug 449725: signver is still using static libraries. bug 450427: add comodo ecc certification authority certificate to nss bug 450536:
remove obsolete xp_mac code bug 451024: certutil.exe crashes with segmentation fault inside pr_cleanup bug 451927: security/coreconf/winnt6.0.mk has invalid defines bug 452751: slot leak in pk11_findslotsbynames bug 452865:
remove obsolete linker flags needed when libnss3 was linked with libsoftokn3 bug 454961: fix the implementation and use of pr_fgets in signtool bug 455348: change hyphens to underscores in debug_$(shell whoami). bug 455424: nssilckt.h defines the enumeration constant 'lock' bug 456036: stubs for deprecated functions in lib/certdb/stanpcertdb.c should set the pr_not_implemented_error error. bug...
NSS 3.12.6 release notes
bug 542538: nss: add function for recording ocsp stapled replies bug 544191: use system zlib on mac os x bug 544584: segmentation fault when enumerating the nss database bug 544586: various nss-sys-init patches from fedora b...
...e nspr version check in lib/util/secport.c bug 541231: nssinit.c doesn't need to include ssl.h and sslproto.h. bug 542538: nss: add function for recording ocsp stapled replies bug 544191: use system zlib on mac os x bug 544584: segmentation fault when enumerating the nss database bug 544586: various nss-sys-init patches from fedora bug 545273:
remove unused function sec_init bug 546389: nsssysinit binary built inside source tree documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation. new and revised documents available since the release of nss 3.11 include the following: build instructions nss shared db ...
NSS 3.16.3 release notes
s an issue with a recently added utility function. new functions in cert.h cert_getgeneralnametypefromstring - an utlity function to lookup a value of type certgeneralnametype given a human readable string. this function was already added in nss 3.16.2, however, it wasn't declared in a public header file. ...
...b:98:43:dc:ab:8c:e8:6a:81:10:9f:e4:8e ou = valicert class 2 policy validation authority sha1 fingerprint: 31:7a:2a:d0:7f:2b:33:5e:f5:a1:c3:4e:4b:57:e8:b7:d8:f1:fc:a6 ou = valicert class 3 policy validation authority sha1 fingerprint: 69:bd:8c:f4:9c:d3:00:fb:59:2e:17:93:ca:55:6a:f3:ec:aa:35:fb additionally, the following ca certificate was
removed as requested by the ca ou = tdc internet root ca sha1 fingerprint: 21:fc:bd:8e:7f:6c:af:05:1b:d1:b3:43:ec:a8:e7:61:47:f2:0f:8a the following ca certificates were added cn = certification authority of wosign sha1 fingerprint: b9:42:94:bf:91:ea:8f:b6:4b:e6:10:97:c7:fb:00:13:59:b6:76:cb cn = ca 沃通根证书 sha1 fingerprint: 16...
NSS 3.16.4 release notes
alls: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_16_4_rtm/src/ new in nss 3.16.4 this release consists primarily of ca certificate changes as listed below, and includes a small number of bug fixes. notable changes in nss 3.16.4 the following 1024-bit root ca certificate was restored to allow more time to develop a better transition strategy for affected sites. it was
removed in nss 3.16.3, but discussion in the mozilla.dev.security.policy forum led to the decision to keep this root included longer in order to give website administrators more time to update their web servers. cn = gte cybertrust global root sha1 fingerprint: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74 in nss 3.16.3, the 1024-bit "entrust.net secure serve...
...rder to give website administrators more time to update their web servers. cn = gte cybertrust global root sha1 fingerprint: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74 in nss 3.16.3, the 1024-bit "entrust.net secure server certification authority" root ca certificate (sha1 fingerprint: 99:a6:9b:e6:1a:fe:88:6b:4d:2b:82:00:7c:b8:54:fc:31:7e:15:39) was
removed. in nss 3.16.4, a 2048-bit intermediate ca certificate has been included, without explicit trust. the intention is to mitigate the effects of the previous removal of the 1024-bit entrust.net root certificate, because many public internet sites still use the "usertrust legacy secure server ca" intermediate certificate that is signed by the 1024-bit entrust.net root certificate. the inclusion of t...
NSS 3.25 release notes
ource distributions are available on ftp.mozilla.org for secure https download at the following location. source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_25_rtm/src/ new in nss 3.25 new functionality implemented dhe key agreement for tls 1.3. added support for chacha with tls 1.3. added support for tls 1.2 ciphersuites that use sha384 as the prf.
removed the limitation that allowed nss to only support certificate_verify messages that used the same signature hash algorithm as the prf when using tls 1.2 client authentication. several functions have been added to the public api of the nss cryptoki framework. new functions in nssckfw.h nssckfwslot_getslotid nssckfwsession_getfwslot nssckfwinstance_destroysessionhandle nssckfwin...
... nssckfwinstance_destroysessionhandle nssckfwinstance_findsessionhandle notable changes in nss 3.25 an ssl socket can no longer be configured to allow both tls 1.3 and ssl v3. regression fix: nss no longer reports a failure if an application attempts to disable the ssl v2 protocol. the trusted ca certificate list has been updated to version 2.8. ...
NSS 3.28.1 release notes
tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_28_1_rtm/src/ new in nss 3.28.1 no new functionality is introduced in this release. this is a patch release to update the list of root ca certificates, and address a minor tls compatibility issue, that some applications experienced with nss 3.28. ...
... bugs fixed in nss 3.28.1 bug 1296697 - december 2016 batch of root ca changes bug 1322496 - internal error assert when the other side closes connection before reading eoed compatibility nss 3.28.1 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3...
NSS 3.37 release notes
/pub/mozilla.org/security/nss/releases/nss_3_37_rtm/src/ notable changes in nss 3.37 the tls 1.3 implementation was updated to draft 28. an issue where nss erroneously accepted hrr requests was resolved. this issue was found by oss fuzz. added hacl* poly1305 32-bit the code to support the npn protocol, which had already been disabled in a previous release, has been fully
removed. nss allows servers now to register alpn handling callbacks to select a protocol. nss supports opening sql databases in read-only mode. nss now requires the sqlite apis of version 3.5.0 or newer. starting with nss version 3.31, an alternative implementation for rng seeding on the linux/unix platform was available (bug 1346735), which performed seeding exclusively based on /dev/...
...elected in "make" builds by defining the environment variable nss_seed_only_dev_urandom. with nss 3.37, this alternative implementation for linux has been enhanced to use the glibc function getentropy(), instead of reading from /dev/urandom directly, if the build and runtime linux platform supports it. the ca certificates list was updated to version 2.24. ...
NSS 3.39 release notes
the tls 1.3 implementation uses the final version number from rfc 8446. previous versions of nss accepted an rsa pkcs#1 v1.5 signature where the digestinfo structure was missing the null parameter. starting with version 3.39, nss requires the encoding to contain the null parameter. the tstclnt and selfserv test utilities no longer accept the -z parameter, as support for tls compression was
removed in a previous nss version. the ca certificates list was updated to version 2.26. the following ca certificates were added: ou = globalsign root ca - r6 sha-256 fingerprint: 2cabeafe37d06ca22aba7391c0033d25982952c453647349763a3ab5ad6ccf69 cn = oiste wisekey global root gc ca sha-256 fingerprint: 8560f91c3624daba9570b5fea0dbe36ff11a8323be9486854fb3f34a557119...
...ist was updated to version 2.26. ...
NSS 3.45 release notes
with a given subject on a given slot bug 1546229 - add ipsec ike support to softoken bug 1554616 - add support for the elbrus lcc compiler (<=1.23) bug 1543874 - expose an external clock for ssl this adds new experimental functions: ssl_settimefunc, ssl_createantireplaycontext, ssl_setantireplaycontext, and ssl_releaseantireplaycontext. ...
...t. the experimental function ssl_initantireplay is
removed. bug 1546477 - various changes in response to the ongoing fips review note: the source package size has increased substantially due to the new fips test vectors. this will likely prompt follow-on work, but please accept our apologies in the meantime. ...
NSS 3.47 release notes
armv8 bug 1549225 - disable dsa signature schemes for tls 1.3 bug 1586947 - pk11_importandreturnprivatekey does not store nickname for ec keys bug 1586456 - unnecessary conditional in pki3hack, pk11load and stanpcertdb bug 1576307 - check mechanism param and param length before casting to mechanism-specific structs bug 1577953 - support longer (up to rfc maximum) hkdf outputs bug 1508776 -
remove refcounting from sftk_freesession (cve-2019-11756) bug 1494063 - support tls exporter in tstclnt and selfserv bug 1581024 - heap overflow in nss utility "derdump" bug 1582343 - soft token mac verification not constant time bug 1578238 - handle invald tag sizes for ckm_aes_gcm bug 1576295 - check all bounds when encrypting with seed_cbc bug 1580286 - nss rejects tls 1.2 records with large pa...
... thunderbird bug 1579036 - confusing error when trying to export non-existent cert with pk12util bug 1578626 - [cid 1453375] ub: decrement nullptr. bug 1578751 - ensure a consistent style for pk11_find_certs_unittest.cc bug 1570501 - add cmac to freebl and pkcs #11 libraries bug 657379 - nss uses the wrong oid for signaturealgorithm field of signerinfo in cms for dsa and ecdsa bug 1576664 -
remove -mms-bitfields from mingw nss build. bug 1577038 - add pk11_getcertsfromprivatekey to return all certificates with public keys matching a particular private key this bugzilla query returns all the bugs fixed in nss 3.47: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.47 compatibility nss 3.47 shared li...
NSS 3.48 release notes
g 1599545 - fix assertion and add test for early key update bug 1597799 - fix a crash in nssckfwobject_getattributesize bug 1591178 - add entrust root certification authority - g4 certificate to nss bug 1590001 - prevent negotiation of versions lower than 1.3 after helloretryrequest bug 1596450 - added a simplified and unified mac implementation for hmac and cmac behind pkcs#11 bug 1522203 -
remove an old pentium pro performance workaround bug 1592557 - fix prng known-answer-test scripts bug 1586176 - encryptupdate should use maxout not block size (cve-2019-11745) bug 1593141 - add `notbefore` or similar "beginning-of-validity-period" parameter to mozilla::pkix::trustdomain::checkrevocation bug 1591363 - fix a pbkdf2 memory leak in nsc_generatekey if key length > max_key_len (256) bug ...
...decrypt length in constant time bug 1562671 - increase nss mp kdf default iteration count, by default for modern key4 storage, optionally for legacy key3.db storage bug 1590972 - use -std=c99 rather than -std=gnu99 bug 1590676 - fix build if arm doesn't support neon bug 1575411 - enable tls extended master secret by default bug 1590970 - ssl_settimefunc has incomplete coverage bug 1590678 -
remove -wmaybe-uninitialized warning in tls13esni.c bug 1588244 - nss changes for delegated credential key strength checks bug 1459141 - add more cbc padding tests that missed nss 3.47 bug 1590339 - fix a memory leak in btoa.c bug 1589810 - fix uninitialized variable warnings from certdata.perl bug 1573118 - enable tls 1.3 by default in nss this bugzilla query returns all the bugs fixed in nss 3.
NSS 3.53 release notes
similar performance as the build.sh/ninja/gyp system. (bug 290526) seed is now moved into a new freebl directory freebl/deprecated (bug 1636389). seed will be disabled by default in a future release of nss. at that time, users will need to set the compile-time flag (bug 1622033) to disable that deprecation in order to use the algorithm. algorithms marked as deprecated will ultimately be
removed. several root certificates in the mozilla program now set the cka_nss_server_distrust_after attribute, which nss consumers can query to further refine trust decisions. (bug 1618404, bug 1621159) if a builtin certificate has a cka_nss_server_distrust_after timestamp before the sct or notbefore date of a certificate that builtin issued, then clients can elect not to trust it. this att...
...fix a null pointer in security/nss/lib/ssl/sslsock.c:4460 bug 1638289 - avoid multiple definitions of sha{256,384,512}_* symbols when linking libfreeblpriv3.so in firefox on ppc64le bug 1636389 - relocate deprecated seed algorithm bug 1637083 - lib/ckfw: no such file or directory. stop. ...
NSS 3.54 release notes
b518ae2ea1b99 bug 1641716 - microsoft ecc root certificate authority 2017 sha-256 fingerprint: 358df39d764af9e1b766e9c972df352ee15cfac227af6ad1d70e8e4a6edcba02 bug 1641716 - microsoft rsa root certificate authority 2017 sha-256 fingerprint: c741f70f4b2a8d88bf2e71c14122ef53ef10eba0cfa5e64cfa20f418853073e0 the following ca certificates were
removed: bug 1645199 - addtrust class 1 ca root sha-256 fingerprint: 8c7209279ac04e275e16d07fd3b775e80154b5968046e31f52dd25766324e9a7 bug 1645199 - addtrust external ca root sha-256 fingerprint: 687fa451382278fff0c8b11f8d43d576671c6eb2bceab413fb83d965d06d2ff2 bug 1641718 - luxtrust global root 2 sha-256 fingerprint: 54455f7129c20b14...
...tls 1.3 external psk support. bug 1642802 - add uint128 support for hacl* curve25519 on windows. bug 1645186 - add "certsign root ca g2" root certificate. bug 1645174 - add microsec's "e-szigno root ca 2017" root certificate. bug 1641716 - add microsoft's non-ev root certificates. bug 1621151 - disable email trust bit for "o=government root certification authority; c=tw" root. bug 1645199 -
remove addtrust root certificates. bug 1641718 -
remove "luxtrust global root 2" root certificate. bug 1639987 -
remove "staat der nederlanden root ca - g2" root certificate. bug 1618402 -
remove symantec root certificates and disable email trust bit. bug 1640516 - nss 3.54 should depend on nspr 4.26. bug 1642146 - fix undefined reference to `port_zalloc_stub' in seed.c. bug 1642153 - fix infinite...
NSS Developer Tutorial
c++11 features. the mozilla c++ language features guide, and the chromium c++ usage guide, list c++ features that are known to be widely available and compatible. you should limit features to those that appear in both guides. ask on nss-dev@ if you think this is restrictive, or if you wish to prohibit a specific feature. nss c abi backward compatibility functions exported functions cannot be
removed. the function prototype of an exported function, cannot be changed, with these exceptions: a foo * parameter can be changed to const foo *. this change is always safe. sometimes an int parameter can be changed to unsigned int, or an int * parameter can be changed to unsigned int *. whether such a change is safe needs to be reviewed on a case-by-case basis. types structs member...
...on, cannot be changed, with these exceptions: a foo * parameter can be changed to const foo *. this change is always safe. sometimes an int parameter can be changed to unsigned int, or an int * parameter can be changed to unsigned int *. whether such a change is safe needs to be reviewed on a case-by-case basis. types structs members of an exported struct, cannot be reordered or
removed. under certain circumstances, it is safe to add new members to an exported struct at the end. opaque structs give us complete freedom to change them, but require applications to call nss functions, to allocate and free them. enums the numeric values of public enumerators cannot be changed. to stress this fact, we often explicitly assign numeric values to enumerators, rather than relying on t...
PKCS11 FAQ
the temporary database with no special trust bits associated with them. nss is perfectly capable of using token certificates in place. which function does nss use to get login state information? nss calls c_getsessioninfo to get the login/logout state. nss never attempts to cache this information, because login state can change instantly without nss knowing about it (for example, when the user
removes the card). you must update all sessions correctly when the state changes. not doing so is a common source of problems. i have noticed that nss sometimes use a session handle value of 0. is this an invalid session handle? a session handle of 0 is indeed invalid. in the past, nss uses the invalid session handle to mark problems with acquiring or using a session. there have been cases where nss w...
... noticed that nss sometimes use a session handle value of 0. is this an invalid session handle? a session handle of 0 is indeed invalid. in the past, nss uses the invalid session handle to mark problems with acquiring or using a session. there have been cases where nss would then use this handle to try to do some operation. pkcs #11 modules should fail with ckr_invalid_session. we are working to
remove these cases as we find them. what are "generic crypto svcs" (the first item listed when you click the view/edit button for the nss internal pkcs #11 module under security devices under options/security in firefox)? generic crypto svcs are the services that nss uses to do its basic cryptography (rsa encryption with public keys, hashing, aes, des, rc4, rc2, and so on).other pkcs #11 modules can s...
PKCS11 Implement
this document supplements the information in pkcs #11: cryptographic token interface standard, version 2.0 with guidelines for implementors of cryptographic modules who want their products to work with mozilla client software: how nss calls pkcs #11 functions. function-specific information organized in the same categories as the pkcs #11 specification. functions for different kinds of tokens. ...
...r each part of a multipart encryption (bulk encryption). if it runs out of sessions, it uses the initial session for saves and restores. c_closesession the nss calls c_closesession to close sessions created for bulk encryption. c_closeallsessions the nss may call c_closeallsessions when it closes down a slot. c_getsessioninfo the nss calls c_getsessioninfo frequently. if a token has been
removed during a session, c_getsessioninfo should return either ckr_session_closed or ckr_session_handle_invalid. if a token has been
removed and then the same or another token is inserted, c_getsessioninfo should return ckr_session_handle_invalid. c_login the nss calls c_login on a token's initial session whenever ckf_login_required is true and the user state indicates that the user isn't logged in.
NSS tools : crlutil
ion to every cert entries within the range. * add certificate entries(s) to crl: addcert range date range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. only one cert will be added if there is no delimiter. date: revocation date of a cert. date should be represented in generalizedtime format (yyyymmddhhmmssz). *
remove certificate entry(s) from crl rmcert range where: range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. only one cert will be added if there is no delimiter. * change range of certificate entry(s) in crl range new-range where: new-range: two integer values separated by dash: range of certificates that will be ...
... identifies the reason for the certificate revocation. reasoncode non-critical code where: reasoncode: identifies the name of an extension non-critical: should be set to 0 since this is non-critical extension code: the following codes are available: unspecified (0), keycompromise (1), cacompromise (2), affiliationchanged (3), superseded (4), cessationofoperation (5), certificatehold (6),
removefromcrl (8), privilegewithdrawn (9), aacompromise (10) * add invalidity date extension: the invalidity date is a non-critical crl entry extension that provides the date on which it is known or suspected that the private key was compromised or that the certificate otherwise became invalid. invaliditydate non-critical date where: crlnumber: identifies the name of an extension non-critical: sh...
NSS Tools crlutil
d certificate entries(s) to crl: addcert range date where: range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. only one cert will be added if there is no delimiter. date: revocation date of a cert. date should be represented in generalizedtime format (yyyymmddhhmmssz).
remove certificate entry(s) from crl rmcert range where: range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. only one cert will be added if there is no delimiter. change range of certificate entry(s) in crl range new-range where: new-range: two inte...
... invaliditydate non-critical date where: c...
NSS tools : crlutil
entries within the range. * add certificate entries(s) to crl: addcert range date range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. only one cert will be added if there is no delimiter. date: revocation date of a cert. date should be represented in generalizedtime format (yyyymmddhhmmssz). *
remove certificate entry(s) from crl rmcert range where: range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. only one cert will be added if there is no delimiter. * change range of certificate entry(s) in crl range new-range where: new-range: two integer values separated by dash: range of ce...
...son for the certificate revocation. reasoncode non-critical code where: reasoncode: identifies the name of an extension non-critical: should be set to 0 since this is non-critical extension code: the following codes are available: unspecified (0), keycompromise (1), cacompromise (2), affiliationchanged (3), superseded (4), cessationofoperation (5), certificatehold (6),
removefromcrl (8), privilegewithdrawn (9), aacompromise (10) * add invalidity date extension: the invalidity date is a non-critical crl entry extension that provides the date on which it is known or suspected that the private key was compromised or that the certificate otherwise became invalid. invaliditydate non-critical date where: crlnumber: identifies the name of an extensi...
Bytecode Descriptions
the enumerable properties of val. implements: forin/ofheadevaluation step 6, enumerateobjectproperties. (the spec refers to an "iterator object" with a next method, but notes that it "is never directly accessible" to scripts. the object we use for this has no public methods.) if val is null or undefined, this pushes an empty iterator. the iter object pushed by this instruction must not be used or
removed from the stack except by jsop::moreiter and jsop::enditer, or by error handling. the script's jsscript::trynotes() must mark the body of the for-in loop, i.e. exactly those instructions that begin executing with iter on the stack, starting with the next instruction (always jsop::loophead). code must not jump into or out of this region: control can enter only by executing jsop::iter and can exit ...
...ays. in async functions: ... # valuetoawait getaliasedvar ".generator" # valuetoawait gen asyncawait # resultpromise getaliasedvar ".generator" # resultpromise gen await # resolved gen resumekind afteryield asyncawait arranges for this frame to be resumed later and pushes its result promise. await then suspends the frame and
removes it from the stack, returning the result promise to the caller. (if this async call hasn't awaited before, the caller may be user code. otherwise, the caller is self-hosted code using resumegenerator.) in async generators: ... # valuetoawait getaliasedvar ".generator" # valuetoawait gen await # resolved gen resumekind afteryield asyncawait is n...
Exact Stack Rooting
); storing a gcpointer on the cheap todo: tracing and heapptr storing a gcpointer on the cstack gcpointers stored on the cstack are special. unlike other gcpointers, they are not traced as part of the gc. instead, every pointer on the cstack should be considered part of the rootset. to that end, we have a special "rooting" mechanism for stack pointers that is very efficiently able to add and
remove gcpointers to the rootedset. the downside of this efficiency is that gcpointers must be added to and
removed from this rootedset tracking structure in lifo order. for this reason it is highly recommended that this rooting mechanism only be used on the cstack. js::rooted<t> typedef js::rooted<t> rootedt; -> rootedobject, rootedstring, rootedscript, etc. because of the lifo restriction, using t...
...etc.) gcheap - the graph of gcthings allocated by spidermonkey's allocator. the goal of spidermonkey's gc is to partition this heap into regions reachable from the rootset and not. root - a gcpointer held live because it is a member of the rootset. rootset - this is a set of gcpointers that are de-facto alive, regardless of the gcthing's reachability. gcpointers must be explicitly added to and
removed from the rootset. liveset - the set of all gcthings that are reachable from roots. deadset - the set of all gcthings that are not reachable from roots. cheap - the c/c++ program heap: e.g., memory allocated by malloc/calloc/realloc. cstack - the c/c++ program stack. rooted - a gcthing in the liveset is said to be "rooted" even if it is not a root as such, but is only reachable from roots. t...
JIT Optimization Outcomes
ype of the object is not known. this can happen if the operation sees many different types of objects, and so the type of the input to the operation cannot be resolved to a single type. unknownproperties optimization failed because the object containing the property was marked as having unknown properties. this can happen if too many properties are defined on the object, or if delete is used to
remove one of the object's properties. singleton one of the types present in the typeset was a singleton type, preventing the optimization from being enabled. notsingleton optimization failed because the object containing the property did not have a 'singleton' type. singleton types are assigned to objects that are "one of a kind", such as global objects, literal objects declared in the global scope...
...timization strategy fails for this condition. arrayrange could not accurately calculate the range attributes of an inline array creation. arrayseennegativeindex arrays at this element access location have seen negative indexes. typedobjectneutered the typed object being accessed at this location may have been neutered (a neutered typed object is one where the underlying byte buffer has been
removed or transferred to a worker). typedobjectarrayrange failed to do range check of element access on a typed object. accessnotdense accessnotsimdobject the observed type of the target of the property access doesn't guarantee that it is an simd object. accessnottypedobject the observed type of the target of the property access doesn't guarantee that it is a typedobject. accessnottypedarray a...
BOOLEAN_TO_JSVAL
obsolete since jsapi 42this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. cast a c integer to a boolean js::value without any type checking or error handling. please use js::booleanvalue/js::truevalue/js::falsevalue instead in spidermonkey 45 or later. syntax jsval boolean_to_jsval(bool b); name type description b bool c integer value to be converted to a boolean jsval. description boolean_to_jsval converts a bool argument, b, to a boolean jsval. if b is false, the result is jsval_false. ...
...x jsval boolean_to_jsval(bool b); name type description b bool c integer value to be converted to a boolean jsval. description boolean_to_jsval converts a bool argument, b, to a boolean jsval. if b is false, the result is jsval_false. if b is true, the result is jsval_true. see also mxr id search for boolean_to_jsval js::booleanvalue bug 1177892 --
removed ...
DOUBLE_TO_JSVAL
obsolete since jsapi 42this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. casts a pointer to a gc-allocated jsdouble to type jsval. please use js::doublevalue instead in spidermonkey 45 or later. syntax jsval double_to_jsval(double d); name type description d double c double to convert to a jsval. description double_to_jsval is the inverse of js::tonumber. to convert a c float, double to type js::value, use js_numbervalue instead. ...
...later. ...
INT_TO_JSVAL
try to avoid using it. converts a specified integer value to a js integer value. please use js::int32value instead in spidermonkey 45 or later. syntax jsval int_to_jsval(int32_t i); name type description i any integer type c integer to convert to a jsval. description int_to_jsval converts a c integer, i, to a jsval. before spidermonkey 1.8.5, not all integers can be stored in a jsval; use int_fits_in_jsval to test. ...
...k isn't needed any longer for 32-bit integers.") }} if i does not fit into a jsval (see int_fits_in_jsval), the behavior is undefined. to convert any number to a jsval, regardless of whether it fits in an int jsval, use js_newnumbervalue instead. to convert an integer jsval to a c integer, use js::toint32. see also mxr id search for int_to_jsval js::toint32 js::int32value bug 1177892 --
removed ...
JSClass
tub, js_propertystub, js_enumeratestub, js_resolvestub, js_convertstub, null, jsclass_no_optional_members }; to expose this class to scripts, and to attach methods and properties to it, use js_initclass. private data custom classes very often need to store private c/c++ data that should not be visible to scripts. to do this, use the jsclass_has_private (jsclass_construct_prototype wad
removed) flags. implement a jsnative constructor function that allocates this private data and stores it in the new object using js_setprivate. implement a jsclass.finalize callback that frees the private data. each native getter, setter, or method can access the private data using js_getinstanceprivate. when initializing the class, pass the jsnative constructor function to js_initclass. (this example...
...dermonkey 31 or older * js_set_rval(cx, vp, object_to_jsval(obj)); */ return true; } { js_initclass(cx, global, js::null(), &printer_class, printer_construct, 1, null, null, null, null); } see also mxr id search for jsclass jsclass.flags js_getclass js_initclass js_newobject js_newobjectforconstructor js_instanceof bug 638291 - added trace bug 702507 -
removed jsclass_construct_prototype bug 726944 -
removed xdrobject, reserved0 and reserved1 bug 886829 - made finalize optional bug 957688 -
removed checkaccess bug 1103368 - made most of members optional bug 1097267 -
removed jsclass_new_enumerate bug 1054756 -
removed convert bug 1261723 - class ops are moved to a sub-structure jsclassops ...
JSNewResolveOp
try to avoid using it. jsnewresolveop is the type of the jsclass.resolve callback when the jsclass_new_resolve bit is set in the jsclass.flags field. syntax typedef bool (* jsnewresolveop)(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandleobject objp); name type description cx jscontext * pointer to the js context in which the property access is taking place. ...
...efined mechanism.) jsresolve_declaring obsolete since jsapi 15 the property is being declared in a var, const, or function declaration. jsresolve_classname obsolete since javascript 1.8.8 class name used when constructing. jsresolve_with obsolete since javascript 1.8.8 the lookup is occurring for a name evaluated inside a with statement. see also jsclass bug 547140 -
removed flags bug 993026 - obsoleted ...
JSPrincipals
be increased by one. each time an object is dereferenced, refcount must be decremented by one. when refcount reaches zero, the principals are no longer in use and are destroyed. ...
... by one. when refcount reaches zero, the principals are no longer in use and are destroyed. use the jsprincipals_hold macro to increment refcount, and use jsprincipals_drop to decrement refcount. ...
JSVAL_NULL
obsolete since jsapi 42this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. the jsval that represents the javascript value null. syntax jsval_null description jsval_null is a jsval constant that represents the javascript value null. it is equivalent to object_to_jsval(null). ...
...discouraged since it could be
removed at any time. try to avoid using it. the jsval that represents the javascript value null. syntax jsval_null description jsval_null is a jsval constant that represents the javascript value null. it is equivalent to object_to_jsval(null). ...
JSVAL_ONE
obsolete since jsapi 42this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. the jsval that represents the javascript number 1. syntax jsval_one description jsval_one is equivalent to int_to_jsval(1). ...
...it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. the jsval that represents the javascript number 1. syntax jsval_one description jsval_one is equivalent to int_to_jsval(1). ...
JSVAL_TRUE
try to avoid using it. jsval constants that represent the javascript values true and false. syntax jsval_true jsval_false description jsval_true and jsval_false are jsval constants that represent the javascript boolean values, true and false. they are equivalent to boolean_to_jsval(true) and boolean_to_jsval(false), respectively. take care not to confuse the jsval constants jsval_true and jsval_false with the bool constants true and false. ...
...tively. ...
JSVAL_UNLOCK
jsval_unlock unlocks a previously locked js value, v, so it can be garbage collected. v is a js object, string, or double value. ...
...jsval_unlock unlocks a previously locked js value, v, so it can be garbage collected. v is a js object, string, or double value. jsval_unlock determines if v is an object, string, or double value, and if it is, it unlocks the value. ...
JSVAL_VOID
obsolete since jsapi 42this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. the jsval that represents the javascript value undefined. syntax jsval_void description jsval_void is a jsval constant that represents the javascript value undefined. ...
...ork in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. the jsval that represents the javascript value undefined. syntax jsval_void description jsval_void is a jsval constant that represents the javascript value undefined. ...
JSVAL_ZERO
obsolete since jsapi 42this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. the jsval that represents the javascript number 0. syntax jsval_zero description jsval_zero is equivalent to int_to_jsval(0). ...
... may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. the jsval that represents the javascript number 0. syntax jsval_zero description jsval_zero is equivalent to int_to_jsval(0). ...
JS_AddArgumentFormatter
obsolete since jsapi 18this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. add or
remove a format string handler for js_convertarguments, js_pusharguments, js_convertargumentsva, and js_pushargumentsva. syntax jsbool js_addargumentformatter(jscontext *cx, const char *format, jsargumentformatter formatter); void js_
removeargumentformatter(jscontext *cx, const char *format); name type description cx jscontext * the context in which to install the formatter. format const char * the format string prefix that should be handled by formatter, or whose handler should be
removed. formatter jsargumentformatter the...
...cx. on success, it returns js_true. otherwise it returns js_false. (at the moment, js_addargumentformatter fails only if there is no memory available to record the registration.) js_addargumentformatter does not copy format, it points at the string storage allocated by the caller, which is typically a string constant. if format is in dynamic storage, the caller must keep the string alive until js_
removeargumentformatter is called. js_
removeargumentformatter
removes any conversion functions associated with format. callback syntax jsbool (*jsargumentformatter)(jscontext *cx, const char *format, jsbool fromjs, jsval **vpp, va_list *app); name type description cx jscontext * the context in which the conversion is being performed. format ...
JS_AliasProperty
try to avoid using it. create an alias for a native property. syntax jsbool js_aliasproperty(jscontext *cx, jsobject *obj, const char *name, const char *alias); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj jsobject * object for which to create the alias. ...
...y for which to create an alias. alias const char * alias name to assign to the property. description js_aliasproperty assigns an alternate name for a property associated with a native object. obj is the object to which the property belongs. name is the property's current name in the object, and alias is the alternate name to assign to the property. notes this feature has been
removed. an alias does not replace a property's name; it supplements it, providing a second way to reference a property. if the alias is successfully created and associated with the property, js_aliasproperty returns js_true. creating an alias does not change the length of the property array. if the property name you specify does not exist, js_aliasproperty reports an error, and returns js_false. if the...
JS_ClearContextThread
try to avoid using it. transfer a jscontext from one thread to another. syntax jsword js_clearcontextthread(jscontext *cx); jsword js_setcontextthread(jscontext *cx); name type description cx jscontext * the context to transfer from one thread to another. there must not be any active or suspended requests using this context. ...
...ead other than the one where it was created looks like this: void mythread(jscontext *cx) { js_setcontextthread(cx); /* note: outside the request */ js_beginrequest(cx); ... js_endrequest(cx); js_clearcontextthread(cx); /* note: outside the request */ } js_setcontextthread ties cx to the current thread for exclusive use. no other thread may use cx until the current thread
removes this association by calling js_clearcontextthread. js_setcontextthread returns the thread id of the thread previously associated with this context. when the function is used properly, the return value is always zero, indicating that no thread was previously associated with the context. js_clearcontextthread relinquishes the calling thread's right to use cx. it returns the thread id of the last ...
JS_ClearNonGlobalObject
obsolete since jsapi 34this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. this article covers features introduced in spidermonkey 24
remove all properties associated with an object. syntax void js_clearnonglobalobject(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to clear the object. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj jsobject * object from which to delete all properties. ...
...an object. syntax void js_clearnonglobalobject(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to clear the object. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj jsobject * object from which to delete all properties. description js_clearnonglobalobject
removes all of obj's own properties, except the special __proto__ and __parent__ properties, in a single operation. properties belonging to objects on obj's prototype chain are not affected. to
remove a single property from an object, use js_deleteproperty. to
remove a single array object element, use js_deleteelement. see also js_deleteproperty js_deleteelement bug 1043281 ...
JS_ClearScope
obsolete since jsapi 18this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it.
remove all properties associated with an object. syntax void js_clearscope(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to clear the object. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj jsobject * object from which to delete all properties. ...
...ies associated with an object. syntax void js_clearscope(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to clear the object. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj jsobject * object from which to delete all properties. description js_clearscope
removes all of obj's own properties, except the special __proto__ and __parent__ properties, in a single operation. properties belonging to objects on obj's prototype chain are not affected. to
remove a single property from an object, use js_deleteproperty. to
remove a single array object element, use js_deleteelement. see also js_deleteproperty js_deleteelement js_clearnonglobalobject js_setal...
JS_EnterCrossCompartmentCall
use js_entercompartment instead. enter a different compartment on the given context, so that objects in that compartment can be accessed. ...
...use js_entercompartment instead. enter a different compartment on the given context, so that objects in that compartment can be accessed. ...
JS_EnterLocalRootScope
obsolete since javascript 1.8.5this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. enter a local root scope. syntax jsbool js_enterlocalrootscope(jscontext *cx); name type description cx jscontext * pointer to the context. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. description scoped local root management allows native functions, getter/setters, etc. to avoid calling js_addroot and js_
removeroot to manage global roots temporarily. js_addroot roots a variable, ensuring that whatever the variable points to at any given moment is protected from gc. by contrast, local root scopes protect newly-created obj...
...js_leavelocalrootscope(cx); return ok; } note: js_leavelocalrootscope or js_leavelocalrootscopewithresult must be called once for every prior successful call to js_enterlocalrootscope. if js_enterlocalrootscope fails, you must not make the matching js_leavelocalrootscope call. local root scopes do not cover objects that are the result of jsapi calls like js_getproperty or js_callfunction. to
remove a gc thing from a local root scope (perhaps to save memory), use js_forgetlocalroot. to determine if a jsval points to a gc thing, use jsval_is_gcthing. see also bug 519949 bug 803907 ...
JS_ExecuteScript
t, and js_executescript returns true. otherwise it returns false, and the value left in rval is unspecified. ...
...lse, and the value left in rval is unspecified. the jsapi user guide contains example code using compiled scripts. ...
JS_GET_CLASS
syntax #ifdef js_threadsafe #define js_get_class(cx,obj) js_getclass(cx, obj) #else #define js_get_class(cx,obj) js_getclass(obj) #endif parameter type description cx jscontext * any context associated with the runtime in which obj exists. ...
...ociated with the runtime in which obj exists. obj jsobject * object to get the class from. note: in spidermonkey versions prior to spidermonkey 1.8.8, js_getclass took both a jscontext* and a jsobject* as arguments in thread-safe builds, and in non-thread-safe builds it took only a jsobject*. the js_get_class(cx, obj) macro abstracted away this detail. newer versions have
removed the context argument, so that the same signature is used regardless whether or not the build is thread-safe. description js_get_class returns a pointer to the jsclass associated with a specified js object, obj. the application must treat the jsclass as read-only. to check the type of an object, use js_hasinstance instead. for a stricter, exact-match-only check, use js_instanceof or js_getinstanc...
JS_GetParent
try to avoid using it. get the parent object of a given object. syntax jsobject * js_getparent(jsobject *obj); name type description obj jsobject * object for which to retrieve the parent. description js_getparent retrieves the parent object of obj, or null if obj does not have a parent. warning: the result may be an internal-use-only object. such an object should not be passed to any other jsapi function that could expose it to script code. ...
...ly obj.__parent__ property. ...
JS_GetScopeChain
when you only used this function to retrieve the scope chain's global, then you can use the function js_getglobalforscopechain. syntax jsobject * js_getscopechain(jscontext *cx); name type description cx jscontext * the context to query. ...
...when you only used this function to retrieve the scope chain's global, then you can use the function js_getglobalforscopechain. syntax jsobject * js_getscopechain(jscontext *cx); name type description cx jscontext * the context to query. ...
Setting up an update server
lowing command, which should work in linux, macos, or windows in the mozillabuild environment: shasum --algorithm 512 <filename> on windows, you can get the exact file size in bytes for your mar by right clicking on it in the file explorer and selecting properties. you'll find the correct size in bytes at the end of the line that begins "size", not the one that begins "size on disk". be sure to
remove the commas when you paste this number into the xml file. on macos, you can get the exact size of your mar by running the command: stat -f%z <filename> or on linux, the same command would be: stat --format "%s" <filename> starting your update server now, start an update server to serve the update files on port 8000. an easy way to do this is with python. remember to navigate to the correct d...
...es to ensure that no previously found updates interfere with installing the desired update. you can use this command with firefox's browser console to determine the update directory: const {fileutils} = chromeutils.import("resource://gre/modules/fileutils.jsm"); fileutils.getdir("updrootd", [], false).path once you have determined the update directory, close firefox, browse to the directory and
remove the subdirectory called updates. next, you need to change the update url to point to the local xml file. this can be done most reliably with an enterprise policy. the policy file location depends on the operating system you are using. windows/linux: <install dir>/distribution/policies.json macos: <install dir>/contents/resources/distribution/policies.json create the distribution directory, if...
Gecko events
as changed. is supported: no event_action_change an object's action has changed. is supported: no event_accelerator_change an object's keyboard shortcut has changed. is supported: no event_selection the selection within a container object has changed. is supported: yes event_selection_add an item within a container object has been added to the selection. is supported: yes event_selection_
remove an item within a container object has been
removed from the selection. is supported: yes event_selection_within numerous selection changes have occurred within a container object. is supported: yes event_alert an alert has been generated. server applications send this event when a user needs to know that a user interface element has changed. is supported: yes event_foreground the foregroun...
...ed. also see event_object_attribute_changed is supported: no event_text_caret_moved the caret has moved to a new position. is supported: yes event_text_changed this event indicates general text changes, i.e. changes to text that is exposed through the iaccessibletext and iaccessibleeditabletext interfaces. is supported: no event_text_inserted text was inserted. is supported: yes event_text_
removed text was
removed. event_text_updated text was updated. event_text_selection_changed the text selection changed. event_visible_data_changed a visibile data event indicates the change of the visual appearance of an accessible object. this includes for example most of the attributes available via the iaccessiblecomponent interface. event_text_column_changed the caret moved from one column to t...
History Service Design
a, history service will eventually upgrade the database, moving and fixing its datas accordingly. in case the database has been created for the first time history service will create all tables, indexes and triggers, calling related inittables static methods of other dependant services. finally temporary tables, indexes and triggers are created, this happens at every run since those entities are
removed when closing the connection. temporary storage is used to avoid too frequent writes to the disk, since those are most likely to cause fsyncs (to ensure data integrity) on the target filesystem. the temporary data (actually visits and pages) are synced to disk either on a timer and on bookmark's inserts. performance to ensure performance a bunch of statements, commonly used when adding or readi...
... on page added (lazily) on idle on shutdown expiration of pages happens when a page is no more referenced, so there are no more visits, nor bookmarks associated with it. visits are expired based on user preferences, there is an hard limit on the minimum number of days that should be retained, visits in that range won't never expire. visits inside a slushy limit (> than the hard limit) will be
removed only if we are over a maximum number of pages we can retain, for performance issues. finally expiration can be forced by the user himself to clean up the full history or slices of it (last hour, last day, ...). see places expiration for more information. ...
How to build an XPCOM component in JavaScript
the object's contractid (unless 'service' is specified) value: "...", // optional, defaults to false. when set to true, and only if 'value' is not // specified, the concatenation of the string "service," and the object's contractid // is passed as avalue parameter of addcategoryentry. service: true }], // queryinterface implementation, e.g. ...
... xpti.dat from the components directory. delete compreg.dat and xpti.dat from your profile directory. restart application. using your component using wrappedjsobject if you only intend to access your component from javascript, i.e. ...
NS_ConvertASCIItoUTF16
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(prunichar, prunichar) - source swaps occurence of 1 string for another parameters prunichar aoldchar prunichar ane...
... or 0 if unable to satisfy the request due to low-memory conditions. parameters prunichar** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters prunichar achar print32 aoffset ...
NS_ConvertUTF16toUTF8
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(char, char) - source swaps occurence of 1 string for another parameters char aoldchar char anewchar void replac...
...characters or 0 if unable to satisfy the request due to low-memory conditions. parameters char** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters char achar print32 aoffset ...
NS_ConvertUTF8toUTF16
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(prunichar, prunichar) - source swaps occurence of 1 string for another parameters prunichar aoldchar prunichar ane...
... or 0 if unable to satisfy the request due to low-memory conditions. parameters prunichar** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters prunichar achar print32 aoffset ...
NS_LossyConvertUTF16toASCII
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(char, char) - source swaps occurence of 1 string for another parameters char aoldchar char anewchar void replac...
...characters or 0 if unable to satisfy the request due to low-memory conditions. parameters char** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters char achar print32 aoffset ...
Replace
« xpcom api reference summary the replace family of functions sets the value of a string's internal buffer. void replace( index_type acutstart, index_type acutlength, const self_type& astring ); parameters acutstart [in] the starting index of the section to
remove, measured in storage units. acutlength [in] the length of the section to
remove, measured in storage units. astring [in] a nsacstring to append to this string. void replace( index_type acutstart, size_type acutlength, const char_type* adata, size_type adatalength = pr_uint32_max ); parameters acutstart [in] the starting index of the section to
remove, measured in storage units. acutlength [in] the length of the section to
remove, measured in storage units. adata [in] a raw character array t...
... adata [in] a raw character array to append to this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. void replace( index_type acutstart, index_type acutlength, char_type achar ); parameters acutstart [in] the starting index of the section to
remove, measured in storage units. acutlength [in] the length of the section to
remove, measured in storage units. achar [in] a character to append to this string. remarks if insufficient memory is available to perform the assignment, then the string's internal buffer will point to a static empty (zero-length) buffer. ...
Replace
« xpcom api reference summary the replace family of functions sets the value of a string's internal buffer. void replace( index_type acutstart, index_type acutlength, const self_type& astring ); parameters acutstart [in] the starting index of the section to
remove, measured in storage units. acutlength [in] the length of the section to
remove, measured in storage units. astring [in] a nsastring to append to this string. void replace( index_type acutstart, size_type acutlength, const char_type* adata, size_type adatalength = pr_uint32_max ); parameters acutstart [in] the starting index of the section to
remove, measured in storage units. acutlength [in] the length of the section to
remove, measured in storage units. adata [in] a raw character array to...
.... adata [in] a raw character array to append to this string. adatalength [in] the length of adata, measured in storage units. if equal to pr_uint32_max, then adata is assumed to be null-terminated. otherwise, adata need not be null terminated. void replace( index_type acutstart, index_type acutlength, char_type achar ); parameter acutstart [in] the starting index of the section to
remove, measured in storage units. acutlength [in] the length of the section to
remove, measured in storage units. achar [in] a character to append to this string. remarks if insufficient memory is available to perform the assignment, then the string's internal buffer will point to a static empty (zero-length) buffer. ...
nsAdoptingCString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(char, char) - source swaps occurence of 1 string for another parameters char aoldchar char anewchar void replac...
...characters or 0 if unable to satisfy the request due to low-memory conditions. parameters char** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters char achar print32 aoffset ...
nsAdoptingString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(prunichar, prunichar) - source swaps occurence of 1 string for another parameters prunichar aoldchar prunichar ane...
... or 0 if unable to satisfy the request due to low-memory conditions. parameters prunichar** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters prunichar achar print32 aoffset ...
nsAutoString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(prunichar, prunichar) - source swaps occurence of 1 string for another parameters prunichar aoldchar prunichar ane...
... or 0 if unable to satisfy the request due to low-memory conditions. parameters prunichar** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters prunichar achar print32 aoffset ...
nsCAutoString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(char, char) - source swaps occurence of 1 string for another parameters char aoldchar char ...
...e to satisfy the request due to low-memory conditions. parameters char** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters char achar print32 aoffset ...
nsCString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(char, char) - source swaps occurence of 1 string for another parameters char aoldchar char anewchar void replac...
...characters or 0 if unable to satisfy the request due to low-memory conditions. parameters char** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters char achar print32 aoffset ...
nsDependentCString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(char, char) - source swaps occurence of 1 string for another parameters char aoldchar char anewchar void replac...
...characters or 0 if unable to satisfy the request due to low-memory conditions. parameters char** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters char achar print32 aoffset ...
nsDependentString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(prunichar, prunichar) - source swaps occurence of 1 string for another parameters prunichar aoldchar prunichar ane...
... or 0 if unable to satisfy the request due to low-memory conditions. parameters prunichar** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters prunichar achar print32 aoffset ...
nsFixedCString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(char, char) - source swaps occurence of 1 string for another parameters char aoldchar char anewchar void replac...
...characters or 0 if unable to satisfy the request due to low-memory conditions. parameters char** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters char achar print32 aoffset ...
nsFixedString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(prunichar, prunichar) - source swaps occurence of 1 string for another parameters prunichar aoldchar prunichar ane...
... or 0 if unable to satisfy the request due to low-memory conditions. parameters prunichar** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters prunichar achar print32 aoffset ...
nsPromiseFlatCString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(char, char) - source swaps occurence of 1 string for another parameters char aoldchar char anewchar void replac...
...characters or 0 if unable to satisfy the request due to low-memory conditions. parameters char** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters char achar print32 aoffset ...
nsPromiseFlatString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(prunichar, prunichar) - source swaps occurence of 1 string for another parameters prunichar aoldchar prunichar ane...
... or 0 if unable to satisfy the request due to low-memory conditions. parameters prunichar** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters prunichar achar print32 aoffset ...
nsString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(prunichar, prunichar) - source swaps occurence of 1 string for another parameters prunichar aoldchar prunichar ane...
... or 0 if unable to satisfy the request due to low-memory conditions. parameters prunichar** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters prunichar achar print32 aoffset ...
nsXPIDLCString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(char, char) - source swaps occurence of 1 string for another parameters char aoldchar char anewchar void replac...
...characters or 0 if unable to satisfy the request due to low-memory conditions. parameters char** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters char achar print32 aoffset ...
nsXPIDLString
@param aset -- characters to be cut from this parameters char* aset stripwhitespace void stripwhitespace() - source this method strips whitespace throughout the string. replacechar void replacechar(prunichar, prunichar) - source swaps occurence of 1 string for another parameters prunichar aoldchar prunichar ane...
... or 0 if unable to satisfy the request due to low-memory conditions. parameters prunichar** data pruint32 newlen setisvoid void setisvoid(prbool) - source string data is never null, but can be marked void. if true, the string will be truncated. @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar, print32) - source this method is used to
remove all occurrences of achar from this string. @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters prunichar achar print32 aoffset ...
imgICache
or channel, null may be passed, but this will cause any image cache requests to use the permanent storage cache (ie. any images from windows in private browsing mode will not be present in the cache returned from a call with a null parameter). method overview void clearcache(in boolean chrome); nsiproperties findentryproperties(in nsiuri uri); void
removeentry(in nsiuri uri); methods clearcache() evict images from the cache. void clearcache( in boolean chrome ); parameters chrome if true, evict only chrome images. if false, evict everything except chrome images. findentryproperties() find properties used to get properties such as 'type' and 'content-disposition' 'type' is a nsisupportscstring containing the images' mime...
...ortscstring containing the images' mime type such as 'image/png' 'content-disposition' will be a nsisupportscstring containing the header if you call this before any data has been loaded from a uri, it will succeed, but come back empty. nsiproperties findentryproperties( in nsiuri uri ); parameters uri the uri to look up. return value null if the url was not found in the cache.
removeentry() evict images from the cache. void
removeentry( in nsiuri uri ); parameters uri the uri to
remove. exceptions thrown ns_ok if a uri was
removed from the cache. ns_error_not_available if a uri was unable to be
removed from the cache. ...
mozISpellCheckingEngine
ne has contract id "@mozilla.org/spellchecker/engine;1". extensions can use this interface to check spelling or provide its own spell checker to editors. method overview void adddirectory(in nsifile dir); boolean check(in wstring word); void getdictionarylist([array, size_is(count)] out wstring dictionaries, out pruint32 count); void
removedirectory(in nsifile dir); void suggest(in wstring word,[array, size_is(count)] out wstring suggestions, out pruint32 count); attributes attribute type description copyright wstring a string indicating the copyright of the engine. not currently used. read only. dictionary wstring t...
...list() gets the list of dictionaries. void getdictionarylist( [array, size_is(count)] out wstring dictionaries, out pruint32 count ); parameters dictionaries a list of dictionaries supported by this spell checker. the dictionary attribute can be set to one of these. each dictionary name is typically but not always a locale code. count the length of dictionaries.
removedirectory()
removes all the dictionaries in the specified directory from the spell checker. void
removedirectory( nsifile dir ); parameters dir an nsifile object indicating the directory whose spell checkers are to be
removed from the spell checker. suggest() gets a list of suggestions for a misspelled word. when this changes, the spell checker sends a "spellcheck-dictionary-upd...
nsIAccessibleEvent
ult action has changed. event_action_change 0x0010 0x000d an object's action has changed. event_accelerator_change 0x0011 0x000e an object's keyboard shortcut has changed. event_selection 0x8006 0x0012 0x000f the selection within a container object has changed. event_selection_add 0x8007 0x0013 0x0010 an item within a container object has been added to the selection. event_selection_
remove 0x8008 0x0014 0x0011 an item within a container object has been
removed from the selection. event_selection_within 0x8009 0x0015 0x0012 numerous selection changes have occurred within a container object. event_alert 0x0002 0x0016 0x0013 an alert has been generated. server applications send this event when a user needs to know that a user interface element has changed. event_foreground 0x000...
...attributes changed. also see event_object_attribute_changed. event_text_caret_moved 0x0033 0x002f the caret has moved to a new position. event_text_changed 0x0034 0x0030 this event indicates general text changes. that is, changes to text that is exposed through the iaccessibletext and iaccessibleeditabletext interfaces. event_text_inserted 0x0035 0x0031 text was inserted. event_text_
removed 0x0036 0x0032 text was
removed. event_text_updated 0x0037 0x0033 text was updated. event_text_selection_changed 0x0038 0x0034 the text selection changed. event_visible_data_changed 0x0039 0x0035 a visible data event indicates the change of the visual appearance of an accessible object. this includes for example most of the attributes available via the iaccessiblecomponent interface...
nsIAccessibleTreeCache
try to avoid using it. a private interface to operate with tree accessible. accessible/public/nsiaccessibletreecache.idlnot scriptable please add a summary to this article. ...
...r atk only. return value the nsiaccessible corresponding to the specified tree cell. invalidatecache() invalidates the number of cached treeitem accessibles. void invalidatecache( in long arow, in long acount ); parameters arow row index the invalidation starts from. acount the number of treeitem accessibles to invalidate, the number sign specifies whether rows have been inserted (plus) or
removed (minus) treeviewchanged() invalidates children created for the previous tree view. void treeviewchanged(); parameters none. treeviewinvalidated() fires name change events for invalidated area of tree. void treeviewinvalidated( in long astartrow, in long aendrow, in long astartcol, in long aendcol ); parameters astartrow row index invalidation starts from. aendrow row index invalidati...
nsIAppShellService
l opendialog on the hidden window. void gethiddenwindowandjscontext( out nsidomwindow ahiddendomwindow, out jscontext ajscontext ); parameters ahiddendomwindow the hidden window queryinterface'd to type nsidomwindow. ajscontext the corresponding javascript context. hidesplashscreen() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
remove the splash screen (if visible). this need be called only once per application session. void hidesplashscreen(); parameters none. initialize() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) required initialization routine. void initialize( in nsicmdlineservice acmdlineservice, in nsisupports nativeappsupportorsplashscreen ); paramete...
...ll service needs to be informed of modal xul windows currently open. call this method as a window becomes modal or as it becomes nonmodal. void toplevelwindowismodal( in nsixulwindow awindow, in boolean amodal ); parameters awindow the window to register. amodal true if awindow is becoming modal or false if awindow is becoming nonmodal (or being closed). unregistertoplevelwindow()
remove a window from the application's window registry. note: this method will not automatically attempt to quit the application when the last window is unregistered. for that, see quit(). void unregistertoplevelwindow( in nsixulwindow awindow ); parameters awindow the window to register. see also nsiappshell ...
nsIApplicationUpdateService
provides utilities for selecting and downloading update patches. 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void adddownloadlistener(in nsirequestobserver listener); astring downloadupdate(in nsiupdate update, in boolean background); void pausedownload(); void
removedownloadlistener(in nsirequestobserver listener); nsiupdate selectupdate([array, size_is(updatecount)] in nsiupdate updates, in unsigned long updatecount); attributes attribute type description backgroundchecker nsiupdatechecker the update checker being used for background update checking. read only. canapplyupdates boolean true if the update service can download and install updates. i...
..."downloading" the update is being downloaded. "pending" the update is ready to be applied. "applying" the update is in the process of being applied. "succeeded" the update has been installed successfully. "download-failed" the update failed to be downloaded. "failed" installing the update failed. pausedownload() pauses the currently active update download. void pausedownload(); parameters none.
removedownloadlistener()
removes a listener that is receiving progress and state information about the update that is currently being downloaded. void
removedownloadlistener( in nsirequestobserver listener ); parameters listener the listener object to
remove. selectupdate() selects the best update to install from a provided list of available updates. nsiupdate selectupdate( [array, size_is(update...
nsIBoxObject
last changed in gecko 1.9 (firefox 3) to get an instance, use the boxobject property. where possible, element.getclientrects and element.getboundingclientrect should be used instead. method overview wstring getlookandfeelmetric(in wstring propertyname); obsolete since gecko 1.9 wstring getproperty(in wstring propertyname); nsisupports getpropertyassupports(in wstring propertyname); void
removeproperty(in wstring propertyname); void setproperty(in wstring propertyname, in wstring propertyvalue); void setpropertyassupports(in wstring propertyname, in nsisupports value); attributes attribute type description element nsidomelement read only. firstchild nsidomelement the first child of the box, in box-ordinal-group order. read only. height long the height of the box, in css ...
...metric() obsolete since gecko 1.9 (firefox 3) wstring getlookandfeelmetric( in wstring propertyname ); parameters propertyname return value getproperty() wstring getproperty( in wstring propertyname ); parameters propertyname return value getpropertyassupports() nsisupports getpropertyassupports( in wstring propertyname ); parameters propertyname return value
removeproperty() void
removeproperty( in wstring propertyname ); parameters propertyname setproperty() void setproperty( in wstring propertyname, in wstring propertyvalue ); parameters propertyname propertyvalue setpropertyassupports() void setpropertyassupports( in wstring propertyname, in nsisupports value ); parameters propertyname value ...
nsIBrowserSearchService
may be null if there are no visible search engines. defaultengine nsisearchengine the default search engine. returns the fi...
...ascript, this observer can be a regular function. moveengine() moves a visible search engine. void moveengine( in nsisearchengine engine, in long newindex ); parameters engine the engine to move. newindex the engine's new index in the set of visible engines. exceptions thrown ns_error_failure if newindex is out of bounds, or if engine is hidden.
removeengine()
removes the search engine. if the search engine is installed in a global location, this will just hide the engine. if the engine is in the user's profile directory, it will be
removed from disk. void
removeengine( in nsisearchengine engine ); parameters engine the engine to
remove. restoredefaultengines() un-hides all engines installed in the directory corresponding to ...
nsICacheService
blic/nsicacheservice.idlscriptable handles visiting and evicting entries operations along with the creating of cache sessions and creation of temporary client ids operations for offline caching. 66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface is no longer supported and planned to be
removed soon: use nsicachestorageservice instead. at the time of writing there is no documentation for nsicachestorageservice but comments are available in the source. note: starting in gecko 2.0, cache i/o is handled asynchronously. method overview nsicachesession createsession(in string clientid, in nscachestoragepolicy storagepolicy, in boolean streambased); acstring createtem...
...be consistent with the value of this field. for example, a non-stream-based cache entry can only have a storage policy of store_in_memory. return value returns a new cache session. createtemporaryclientid() obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. this method creates and returns a unique, temporary cache client id. this is used by the offline cache. the offline cache lets clients accumulate entries in a temporary client and merge them in as a group using nsiofflinecachesession.mergetemporaryclient(). acstring createtemporaryclientid( in nscachestoragepolicy storagepolicy ); parameters storagep...
nsICachingChannel
n specifies whether or not the data should be placed in the offline cache, in addition to normal memory/disk caching. this may fail if the offline cache is not present. the value of this attribute should be set before opening the channel. cachekey nsisupports uniquely identifies the data in the cache for this channel. holding a reference to this key does not prevent the cached data from being
removed. a cache key retrieved from a particular instance of nsicachingchannel could be set on another instance of nsicachingchannel provided the underlying implementations are compatible and provided the new channel instance was created with the same uri. the implementation of nsicachingchannel would be expected to use the cache entry identified by the cache token. depending on the value of nsirequest.
...ng on the value of nsirequest.loadflags(), the cache entry may be validated, overwritten, or simply read. the cache key may be null indicating that the uri of the channel is sufficient to locate the same cache entry. setting a null cache key is likewise valid. cachetoken nsisupports uniquely identifies the data in the cache. holding a reference to this token prevents the cached data from being
removed. a cache token retrieved from a particular instance of nsicachingchannel could be set on another instance of nsicachingchannel provided the underlying implementations are compatible. the implementation of nsicachingchannel would be expected to only read from the cache entry identified by the cache token and not try to validate it. the cache token can be queryinterface'd to a nsicacheentryinfo if...
nsIChromeFrameMessageManager
content/base/public/nsimessagemanager.idlscriptable handles loading of content in a remote chrome frame. 1.0 66 introduced gecko 2.0 inherits from: nsiframemessagemanager last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void loadframescript(in astring aurl, in boolean aallowdelayedload); void
removedelayedframescript(in astring aurl); methods loadframescript() loads a script into the remote frame. void loadframescript( in astring aurl, in boolean aallowdelayedload ); parameters aurl the url of the script to load into the frame; this must be an absolute url, but data: urls are supported. aallowdelayedload if true, the script will be loaded when the re...
... void loadframescript( in astring aurl, in boolean aallowdelayedload ); parameters aurl the url of the script to load into the frame; this must be an absolute url, but data: urls are supported. aallowdelayedload if true, the script will be loaded when the remote frame becomes available; otherwise, the script will only be loaded if the frame is already available.
removedelayedframescript()
removes a script from the list of scripts supporting delayed load. void
removedelayedframescript( in astring aurl ); parameters aurl the url of the script to
remove from the list of scripts supporting delayed load. see also content process event handling nsicontentframemessagemanager nsiframeloader nsiframemessagelistener ...
nsIClipboardDragDropHookList
use by embedders; it is an implementation detail. you should access these capabilities indirectly by sending commands using the nsiclipboarddragdrophooks interface. within gecko, this interface is used by calling get_interface on a docshell. method overview void addclipboarddragdrophooks(in nsiclipboarddragdrophooks ahooks); nsisimpleenumerator gethookenumerator(); void
removeclipboarddragdrophooks(in nsiclipboarddragdrophooks ahooks); methods addclipboarddragdrophooks() this method adds a hook to the list. void addclipboarddragdrophooks( in nsiclipboarddragdrophooks ahooks ); parameters ahooks implementation of hooks. gethookenumerator() this method retrieves an enumerator for all hooks which have been added. nsisimpleenumerator gethookenumerator();...
...drophooks() this method adds a hook to the list. void addclipboarddragdrophooks( in nsiclipboarddragdrophooks ahooks ); parameters ahooks implementation of hooks. gethookenumerator() this method retrieves an enumerator for all hooks which have been added. nsisimpleenumerator gethookenumerator(); parameters none. return value returns nsisimpleenumerator for nsiclipboarddragdrophooks.
removeclipboarddragdrophooks() this method
removes a hook from the list. note: if this implementation is not present in the list then removal will be ignored. void
removeclipboarddragdrophooks( in nsiclipboarddragdrophooks ahooks ); parameters ahooks implementation of hooks. see also nsiclipboarddragdrophooks nsiclipboard nsisimpleenumerator ...
nsICollection
o on. inherits from: nsiserializable last changed in gecko 1.7 method overview void appendelement(in nsisupports item); void clear(); pruint32 count(); nsienumerator enumerate(); nsisupports getelementat(in pruint32 index); void queryelementat(in pruint32 index, in nsiidref uuid, [iid_is(uuid),retval] out nsqiresult result); void
removeelement(in nsisupports item); void setelementat(in pruint32 index, in nsisupports item); methods appendelement() appends a new item to the collection. void appendelement( in nsisupports item ) parameters item nsisupports item to be appended to the list. clear()
removes all items from the collection. void clear(); parameters none. count() returns the number of items in ...
...em at the index position. queryelementat() performs a queryinterface on the item at the specified index into the collection. void queryelementat( in pruint32 index, in nsiidref uuid, [iid_is(uuid),retval] out nsqiresult result ); parameters index position of the item to be queried. uuid nsiidref of the item. result comparison result of the previous two parameters.
removeelement()
removes an item from the collection. void
removeelement( in nsisupports item ); parameters item nsisupports item to be
removed from the list. setelementat() replaces an item at a specified index in the collection with a new one. void setelementat( in pruint32 index, in nsisupports item ); parameters index index position where the new item will be set. item ...
nsIConsoleService
isterlistener(in nsiconsolelistener listener); void reset(); void unregisterlistener(in nsiconsolelistener listener); methods getmessagearray() to obtain an array of all logged messages. obsolete since gecko 19 (firefox 19 / thunderbird 19 / seamonkey 2.16)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. void getmessagearray( [array, size_is(count)] out nsiconsolemessage messages, out pruint32 count ); parameters messages an array of logged messages. count the number of messages in the array. if no messages are logged, this function will return a count of 0, but allocating a placeholder word for messages, showing as a 0-length array when called fr...
...for example, for privacy reasons): void reset(); parameters none. note: console listeners expect you to log an empty string message before calling reset, so they too can clear their message buffers. (this also works before gecko 19.) unregisterlistener() deregisters a listener. void unregisterlistener( in nsiconsolelistener listener ); parameters listener the nsiconsolelistener to
remove. examples retrieving the message array to retrieve the message array in gecko prior to version 19: function getconsolemessagearray() { var consoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice); var array = {}; consoleservice.getmessagearray(array, {}); return array.value; } to retri...
nsIContentPrefObserver
dom/interfaces/base/nsicontentprefservice.idlscriptable this interface allows code to easily watch for changes to the values of content preferences. 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void oncontentpref
removed(in astring agroup, in astring aname); void oncontentprefset(in astring agroup, in astring aname, in nsivariant avalue); methods oncontentpref
removed() called when a content preference is
removed. void oncontentpref
removed( in astring agroup, in astring aname ); parameters agroup the group to which the
removed preference belonged; this may be the uri of a web site. this value is null if the preference was global, applying to all web sites. anam...
... oncontentprefset() called when the value of a preference is set (either by changing its current value or by creating the preference). void oncontentprefset( in astring agroup, in astring aname, in nsivariant avalue ); parameters agroup the group to which the preference belongs; this may be the uri of a web site. ...
nsICookieService
d. achannel the channel used to load the document. this parameter may be null, but it is strongly recommended that a non-null value be provided to ensure that the cookie privacy preferences are honored. return value returns the resulting cookie string. getcookiestringfromhttp() get the complete cookie string associated with the uri. note: this function is redundant and will most likely be
removed in a future revision of this interface. getcookiestring() will query the documenturi property off of nsihttpchannelinternal if supported, so getcookiestring() can be used in place of this method. string getcookiestringfromhttp( in nsiuri auri, in nsiuri afirsturi, in nsichannel achannel ); parameters auri the uri of the document for which cookies are being queried. afirsturi ...
... notifications. acookie the cookie string to set. achannel the channel used to load the document. this parameter may be null, but it is strongly recommended that a non-null value be provided to ensure that the cookie privacy preferences are honored. setcookiestringfromhttp() set the cookie string and expires associated with the uri. note: this function is redundant and will most likely be
removed in a future revision of this interface. setcookiestring() will query the documenturi property off of nsihttpchannelinternal if supported, and setcookiestring() could also query the date header from the channel if achannel supports nsihttpchannel. void setcookiestringfromhttp( in nsiuri auri, in nsiuri afirsturi, in nsiprompt aprompt, in string acookie, in string aservertime, ...
nsIDBChangeListener
d to filter out events that you yourself started. ainstigator may also be null. onhdrdeleted() called when a header is deleted from the database. void onhdrdeleted(in nsimsgdbhdr ahdrchanged, in nsmsgkey aparentkey, in long aflags, in nsidbchangelistener ainstigator); parameters ahdrchanged the nsimsgdbhdr of the message that was
removed. aparentkey the key of the parent folder for deleted header. the typedef of nsmsgkey is given in mailnewstypes2.idl. aflags the flags on the message. flags are defined in nsmsgmessageflags. ainstigator the caller who deleted the header. this can be used to filter out events that you yourself started. ainstigator may also be null. onhdradded() called when a header is added to the databas...
... typedef of nsmsgkey is given in mailnewstypes2.idl. ainstigator the caller who changed the parent. this can be used to filter out events that you yourself started. ainstigator may also be null. onannouncergoingaway() called when an announcer is being deleted. void onannouncergoingaway(in nsidbchangeannouncer ainstigator); parameters ainstigator the nsidbchangeannouncer that is being
removed. onreadchanged() called when the read state of news messages changes. only used by nsinewsdatabase databases. others use the onhdrflagschanged() method. void onreadchanged(in nsidbchangelistener ainstigator); parameters ainstigator the caller who changed the read state. this can be used to filter out events that you yourself started. ainstigator may also be null. onjunkscorechanged(...
nsIDOMMozNetworkStatsManager
val end, [optional] in jsval options /* networkstatsgetoptions */); nsidomdomrequest addalarm(in nsisupports network, in long threshold, [optional] in jsval options /* networkstatsalarmoptions */); nsidomdomrequest getallalarms([optional] in nsisupports network); nsidomdomrequest
removealarms([optional] in long alarmid); nsidomdomrequest clearstats(in nsisupports network); nsidomdomrequest clearallstats(); nsidomdomrequest getavailablenetworks(); nsidomdomrequest getavailableservicetypes(); attributes attribute type description samplerate long minimum time in milliseconds between samples stored in the data...
...rement from both origins are merged. to know in advance which kind of origin is available, the moznetworkstatsmanager.getavailablenetworks method returns an array of interfaces. return value an alarm object with the same fields as that in the system message; alarmid, network, threshold, and data. exceptions thrown invalidnetwork the network must be in the return of getavailablenetworks.
removealarms()
remove all network alarms. if an alarmid is provided, then only that alarm is
removed. nsidomdomrequest
removealarms([optional] in long alarmid); parameters alarmid id of an alarm, like the one returned by addalarm. return value an nsidomdomrequest object. clearstats()
remove all stats related with the provided network from db. nsidomdomrequest clearstats(in nsisupports netw...
nsIDOMNSHTMLDocument
is not implemented in gecko. value some commands require an argument. you can pass null for those commands that do not need an argument. return value true if the command was recognized, false otherwise. execcommandshowhelp() obsolete since gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) this method never did anything but throw an exception, and was
removed entirely in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11). boolean execcommandshowhelp( in domstring commandid ); parameters commandid the name of the command. return value this method is not supported and always throws an exception. getselection() domstring getselection(); parameters none. return value the text of the current selection, the same as window.getselect...
...lean querycommandsupported( in domstring commandid ); parameters commandid the name of the command to query. return value returns true if the command is supported on the current range, false otherwise. querycommandtext() obsolete since gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) this method never did anything but throw an exception, and was
removed entirely in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11). domstring querycommandtext( in domstring commandid ); parameters commandid the name of the command to query. return value this method is not supported and always throws an exception. querycommandvalue() domstring querycommandvalue( in domstring commandid ); parameters commandid the name of the com...
nsIDOMOfflineResourceList
rce list. dom/interfaces/offline/nsidomofflineresourcelist.idlscriptable please add a summary to this article. last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports method overview void mozadd(in domstring uri); boolean mozhasitem(in domstring uri); domstring mozitem(in unsigned long index); void moz
remove(in domstring uri); void swapcache(); void update(); attributes attribute type description mozitems nsidomofflineresourcelist the list of dynamically-managed entries in the offline resource list. read only. mozlength unsigned long the number of entries in the dynamically managed offline resource list. read only. onch...
... the item at the specific offset into the list of cached resources. note: this method is deprecated in firefox 3.5; you should instead access the list directly using the items attribute. domstring mozitem( in unsigned long index ); parameters index the index of the cached item whose uri should be returned. return value an domstring containing the uri of the specified resource. moz
remove()
removes an item from the list of dynamically managed entries. if this was the last reference to the given uri in the application cache, the cache entry is
removed. void moz
remove( in domstring uri ); parameters uri the uri of the item to
remove from the list. swapcache() swaps in the newest version of the application cache. the newest version of resources are updated on first re...
nsIDOMStorage2
cal storage object can be retrieved from the window's localstorage attribute. dom/public/idl/storage/nsidomstorage2.idlscriptable please add a summary to this article. last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void clear(); domstring getitem(in domstring key); domstring key(in unsigned long index); void
removeitem(in domstring key); void setitem(in domstring key, in domstring data); attributes attribute type description length unsigned long the number of keys stored in local storage. methods clear() clears the contents of this storage context; this
removes all values bound to the domain or origin. void clear(); parameters none. getitem() returns from local storage the data corresponding...
...to the specified key, or null if no data exists for the given key. key() returns the key for the item stored at the specified index in the data store. domstring key( in unsigned long index ); parameters index the index for which the corresponding key should be returned. return value a string containing the requested key. exceptions thrown index_size_errthere is no key at the specified index.
removeitem() given a key,
removes the corresponding entry from local storage. void
removeitem( in domstring key ); parameters key the key for which data should be
removed from storage. setitem() sets the value corresponding to a given key. if the key does not already exist, a new key is added, associated with the specified value. if the key already exists, the existing value is replaced with the s...
nsIDOMXULSelectControlElement
selectedindex long selecteditem nsidomxulselectcontrolitemelement value domstring methods appenditem() nsidomxulselectcontrolitemelement appenditem( in domstring label, in domstring value ); parameters label value return value getindexofitem() long getindexofitem( in ...
...) long getindexofitem( in nsidomxulselectcontrolitemelement item ); parameters item return value getitematindex() nsidomxulselectcontrolitemelement getitematindex( in long index ); parameters index return value insertitemat() nsidomxulselectcontrolitemelement insertitemat( in long index, in domstring label, in domstring value ); parameters index label value return value
removeitemat() nsidomxulselectcontrolitemelement
removeitemat( in long index ); parameters index return value ...
nsIDictionary
extensions/xml-rpc/idl/nsidictionary.idlscriptable a simple mutable table of objects, maintained as key/value pairs. objects can be located and managed by referencing them by key. 66 introduced gecko 1.0 obsolete gecko 1.9.1 inherits from: nsisummary last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) note: this interface was
removed in firefox 3.5; use dict.jsm instead. see bug 668424 for further information. method overview boolean haskey(in string key); void getkeys(out pruint32 count, [retval, array, size_is(count)] out string keys); nsisupports getvalue(in string key); void setvalue(in string key, in nsisupports value); nsisupports deletevalue(in string key); void clear...
... the key is already present, the new value replaces the old one. void setvalue( in string key, in nsisupports value ); parameters key the key by which the value can be accessed. value the value to store. deletevalue() find the value indicated by the key. nsisupports deletevalue( in string key ); parameters key the key indicating the pair to be
removed. return value the
removed value. if the key doesn't exist, ns_error_failure will be returned. clear() delete all key-value pairs from the dictionary. void clear(); parameters none. ...
nsIDocShell
ng unloaded as well. void firepagehidenotification( in boolean isunload ); parameters isunload if true, fire the unload event in addition to the pagehide event. native code only!fireunloadnotification obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. notify the associated content viewer and all child docshells that they are about to be unloaded. void fireunloadnotification(); parameters none. getdocshellenumerator() get an enumerator over this docshell and its children. nsisimpleenumerator getdocshellenumerator( in long aitemtype, in long adirection ); parameters aitemtype only include docsh...
...rageforuri( in nsiuri uri, in domstring documenturi ); parameters uri the domain of the storage object to retrieve. documenturi if a new storage object needs to be created, it will be created with a reference to this document.documenturi in its storageevent. return value the session storage object for the supplied domain. historypurged() notification that entries have been
removed from the beginning of a nsshistory which has this as its rootdocshell. void historypurged( in long numentries ); parameters numentries the number of entries
removed. native code only!internalload loads the given uri. this method is identical to loaduri() except that its parameter list is broken out instead of being packaged inside of an nsidocshellloadinfo object. void internalload(...
nsIEventListenerService
read only. obsolete since gecko 7.0 methods geteventtargetchainfor() returns an array of event targe...
...rget target, in domstring type, in nsidomeventlistener listener, in boolean usecapture ); parameters target the nsidomeventtarget for the event target to listen an event. type the event name to listen. listener the nsidomeventlistener which listens the event. usecapture true if to listen the event in capture phase, otherwise, false.
removesystemeventlistener()
remove a system-group eventlistener from a event target. void
removesystemeventlistener( in nsidomeventtarget target, in domstring type, in nsidomeventlistener listener, in boolean usecapture ); parameters target the nsidomeventtarget for the event target listening the event. type the listening event name. listener the nsid...
nsIHttpActivityDistributor
void addobserver( in nsihttpactivityobserver aobserver ); parameters aobserver the nsihttpactivityobserver that should receive notifications of http transport activity; this object's nsihttpactivityobserver.observeactivity() method will be called each time activ...
...sihttpactivityobserver aobserver); methods addobserver() begins delivery of notifications of http transport activity. void addobserver( in nsihttpactivityobserver aobserver ); parameters aobserver the nsihttpactivityobserver that should receive notifications of http transport activity; this object's nsihttpactivityobserver.observeactivity() method will be called each time activity occurs.
removeobserver() stops delivery of notifications of http transport activity. void
removeobserver( in nsihttpactivityobserver aobserver ); parameters aobserver the nsihttpactivityobserver that should no longer receive notifications of http transport activity. see also monitoring http activity nsihttpactivityobserver ...
nsILocalFileMac
eturns the target of the alias. if followlinks is false, returns the unresolved alias file. fsspec getfsspec(); parameters none. return value the fsspec of the file object. native code only!inittoappwithcreatorcode obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. init this object to point to an application having the given creator code. if this app is missing, this will fail. it will first look for running application with the given creator. void inittoappwithcreatorcode( in ostype aappcreator ); parameters aappcreator the signature of the app. native code only!initwithcfurl init this object with a cfurlref. note:...
...code only!initwithfsref init this object with an fsref. note: supported only for xp_macosx. void initwithfsref( [const] in fsrefptr afsref ); parameters afsref the native fsref. native code only!initwithfsspec obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. init this object with an fsspec legacy method - leaving in place for now. void initwithfsspec( [const] in fsspecptr afilespec ); parameters afilespec the native file spec. ispackage() boolean ispackage(); parameters none. return value true if a directory is determined to be a package under mac os 9/x. launchwithdoc() launch the application that this file...
nsIMicrosummary
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface defines attributes and methods for dealing with microsummaries generated by an nsimicrosummarygenerator. 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was
removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void addobserver(in nsimicrosummaryobserver observer); boolean equals(in nsimicrosummary aother); void
removeobserver(in nsimicrosummaryobserver observer); void update(); attributes attribute type description content astring the content of the microsummary. ...
...summaries equal if they summarize the same page with the same microsummary-generator (see also nsimicrosummarygenerator.equals()). boolean equals( in nsimicrosummary aother ); parameters aother the microsummary to compare against. return value returns true if the microsummaries are equal. false if they aren't. note: this method returns false if either objects don't have a generator
removeobserver()
remove a microsummary observer from this microsummary. void
removeobserver( in nsimicrosummaryobserver observer ); parameters observer the microsummary observer to
remove. update() update the microsummary, first loading its generator and page content as necessary. if you want know when a microsummary finishes updating, add an observer before calling this method. void update...
nsIMicrosummarySet
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface provides access to sets of microsummaries returned from the nsimicrosummaryservice. 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) warning: microsummary support was
removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void addobserver(in nsimicrosummaryobserver observer); nsisimpleenumerator enumerate(); void
removeobserver(in nsimicrosummaryobserver observer); methods addobserver() add a microsummary observer to this microsummary set. adding an observer to a set is the equivale...
...ing an observer to a set is the equivalent of adding it to each constituent microsummary. void addobserver( in nsimicrosummaryobserver observer ); parameters observer the microsummary observer to add. enumerate() retrieve an nsisimpleenumerator of microsummaries in the set. nsisimpleenumerator enumerate(); parameters none. return value an enumerator of nsimicrosummary objects.
removeobserver()
remove a microsummary observer from this microsummary. void
removeobserver( in nsimicrosummaryobserver observer ); parameters observer the microsummary observer to
remove. see also nsimicrosummaryservice microsummary topics creating a microsummary ...
nsIMsgAccount
nsimsgaccount mailnews/base/public/nsimsgaccount.idlscriptable an account consists of an incoming server and one or more outgoing identities. inherits from: nsisupports last changed in gecko 1.7 method overview void addidentity(in nsimsgidentity identity); void clearallvalues(); void init(); void
removeidentity(in nsimsgidentity identity); astring tostring(); attributes attribute type description defaultidentity nsimsgidentity identities nsisupportsarray read only. outgoing identity list (array of nsimsgidentity's) incomingserver nsimsgincomingserver incoming server stuff key acstring internal key identifying itself methods addidentity() adds a new identity to this account. void addidentity( in nsimsgidentity identity ); parameters identity the i...
... addidentity() adds a new identity to this account. void addidentity( in nsimsgidentity identity ); parameters identity the identity to add. clearallvalues() clear all user preferences associated with an account. void clearallvalues(); parameters none. init() initializes an account. void init(); parameters none. exceptions thrown ns_error_already_opened if it is called more then once
removeidentity()
removes an identity from this account. void
removeidentity( in nsimsgidentity identity ); parameters identity the identity to
remove. ...
nsIMsgSendLater
messaging account. inherits from: nsistreamlistener implemented by: @mozilla.org/messengercompose/sendlater;1. to create an instance, use var msgsendlater = components.classes["@mozilla.org/messengercompose/sendlater;1"] .getservice(components.interfaces.nsimsgsendlater); method overview void sendunsentmessages(in nsimsgidentity identity); void
removelistener(in nsimsgsendlaterlistener listener); void addlistener(in nsimsgsendlaterlistener listener); nsimsgfolder getunsentmessagesfolder](in nsimsgidentity identity); attributes attribute type description msgwindow nsimsgwindow methods sendunsentmessages() sends all unsent messages for an identity. void sendunsentmessages(in nsi...
...listener); nsimsgfolder getunsentmessagesfolder](in nsimsgidentity identity); attributes attribute type description msgwindow nsimsgwindow methods sendunsentmessages() sends all unsent messages for an identity. void sendunsentmessages(in nsimsgidentity identity) parameters identity the nsimsgidentity to send unsent messages for
removelistener()
remove an event listener from this nsisendmsglater instance void
removelistener(in nsimsgsendlaterlistener listener); parameters listener the nsimsgsendlaterlistener to
remove. addlistener() add an event listener to this nsisendmsglater instance. void addlistener(in nsimsgsendlaterlistener listener); parameters listener the nsimsgsendlaterlistener to add. getun...
nsIMsgThread
iew void addchild(in nsimsgdbhdr child, in nsimsgdbhdr inreplyto, in boolean threadinthread, in nsidbchangeannouncer announcer); nsimsgdbhdr getchildat(in long index); nsmsgkey getchildkeyat(in long index); nsimsgdbhdr getchild(in nsmsgkey msgkey); nsimsgdbhdr getchildhdrat(in long index); nsimsgdbhdr getroothdr(out long index); void
removechildat(in long index); void
removechildhdr(in nsimsgdbhdr child, in nsidbchangeannouncer announcer); void markchildread(in boolean bread); nsimsgdbhdr getfirstunreadchild(); nsisimpleenumerator enumeratemessages(in nsmsgkey parent); attributes attribute type description threadkey nsmsgkey unsigned long key designating this ...
...x); parameters index the index to get the key from getchild() nsimsgdbhdr getchild(in nsmsgkey msgkey); parameters msgkey the index to get the key from getchildhdrat() nsimsgdbhdr getchildhdrat(in long index); parameters index the index to get the message from. getroothdr() nsimsgdbhdr getroothdr(out long index); return index changed to the index of the root.
removechildat() void
removechildat(in long index); parameters index the index to
remove the message from
removechildhdr() void
removechildhdr(in nsimsgdbhdr child, in nsidbchangeannouncer announcer); parameters child the message to
remove announcer an nsidbchangeannouncer to receive notification when the change is made. markchildread() void markchildread(in boolean bread); para...
nsIMutableArray
rray.queryelementat() will never return a null value. any of these methods may throw ns_error_out_of_memory when the array must grow to complete the call, but the allocation fails. method overview void appendelement(in nsisupports element, in boolean weak); void clear(); void insertelementat(in nsisupports element, in unsigned long index, in boolean weak); void
removeelementat(in unsigned long index); void replaceelementat(in nsisupports element, in unsigned long index, in boolean weak); methods appendelement() append an element at the end of the array. void appendelement( in nsisupports element, in boolean weak ); parameters element the element to append. weak whether or not to store the element using a weak reference. e...
...p. if the position is equal to the current length of the array, the new element is appended. an index lower than 0 or higher than the current length of the array is invalid and will be ignored. weak whether or not to store the element using a weak reference. exceptions thrown ns_error_failure when a weak reference is requested, but the element does not support nsiweakreference.
removeelementat()
remove an element at a specific position, moving all elements stored at a higher position down one. to
remove a specific element, use nsiarray.indexof() to find the index first, then call
removeelementat. void
removeelementat( in unsigned long index ); parameters index the position of the item. replaceelementat() replace the element at the given position. void replaceeleme...
nsINavHistoryResult
ckaged interaction with a nsitreeboxobject. if you need a different view, you'll need to create your own viewer interface. the viewer provides notifications to the controller when view events occur; this is done using the nsinavhistoryresultviewobserver interface. method overview void addobserver(in nsinavhistoryresultobserver aobserver, in boolean aownsweak); void
removeobserver(in nsinavhistoryresultobserver aobserver); attributes attribute type description root nsinavhistorycontainerresultnode the root of the results. this container gives you access to all the results in the tree. note: keep in mind that you need to open containers for their results to be valid. when a r...
...er for changes that occur on the result. void addobserver( in nsinavhistoryresultobserver aobserver, in boolean aownsweak ); parameters aobserver an object that implements the nsinavhistoryresultobserver interface, which will receive notifications of changes on the result. aownsweak if false, the result will keep an owning reference to the observer, which must be
removed by calling
removeobserver(). if true, the result will keep a weak reference to the observer, which must implement the nsisupportsweakreference interface.
removeobserver()
removes an observer that was added by a previous call to addobserver(). void
removeobserver( in nsinavhistoryresultobserver aobserver ); parameters aobserver the observer to
remove. see also nsinavhistory...
nsIProtocolProxyService
or a lengthy period of time. by passing this flag to resolve, one can failover to asyncresolve to avoid locking up the calling thread if a pac query is required. when this flag is passed to resolve, resolve may throw the exception ns_base_stream_would_block to indicate that it failed due to this flag being present. methods resolve() deprecated since gecko 18 this method has been
removed in firefox 18. use resolveasync instead previous doc this method returns a nsiproxyinfo instance that identifies a proxy to be used for loading the given uri. otherwise, this method returns null indicating that a direct connection should be used. if this proxy is unavailable, getfailoverforproxy() may be called to determine the correct secondary proxy to be used. if the protocol handler fo...
...proxies for the given uri, and then it applies the proxy filters. the filters have the opportunity to modify the list of proxies. if two filters register for the same position, then the filters will be visited in the order in which they were registered. if the filter is already registered, then its position will be updated. after filters have been run, any disabled or disallowed proxies will be
removed from the list. a proxy is disabled if it had previously failed-over to another proxy (see getfailoverforproxy()). a proxy is disallowed, for example, if it is a http proxy and the nsiprotocolhandler for the queried uri does not permit proxying via http. if a nsiprotocolhandler disallows all proxying, then filters will never have a chance to intercept proxy requests for such urls. note: it is p...
nsISessionStore
ated. atab the tab to duplicate (can come from a different window). return value an nsidomnode representing the new tab, the content of which is a duplicate of atab. forgetclosedtab() nsidomnode forgetclosedtab( in nsidomwindow awindow, in unsigned long aindex ); parameters awindow is the browser window associated with the closed tab. aindex is the index of the closed tab to be
removed (fifo ordered). return value forgetclosedwindow() nsidomnode forgetclosedwindow( in unsigned long aindex ); parameters aindex is the index of the closed window to be
removed (fifo ordered). return value exceptions thrown ns_error_invalid_arg when aindex does not map to a closed window. getbrowserstate() returns the current state of all of windows and all of their tabs. ...
.... setwindowstate() sets the state of a single window to a given stored state. void setwindowstate( in nsidomwindow awindow, in astring astate, in boolean aoverwrite ); parameters awindow the nsidomwindow whose state is to be set to the state indicated by astate. astate the saved state to apply to the specified window. aoverwrite if this parameter is true, all existing tabs are
removed and replaced with the tabs in the state astate. if it's false, the tabs in astate are added to the tabs already in the window. setwindowvalue() sets the value corresponding to a given key for a specified window. void setwindowvalue( in nsidomwindow awindow, in astring akey, in astring astringvalue ); parameters awindow the browser window for which the value is to be set. akey t...
nsISupportsArray
aelement, in unsigned long aindex); violates the xpcom interface guidelines boolean insertelementsat(in nsisupportsarray aother, in unsigned long aindex); violates the xpcom interface guidelines long lastindexof([const] in nsisupports apossibleelement); violates the xpcom interface guidelines boolean moveelement(in long afrom, in long ato); violates the xpcom interface guidelines boolean
removeelementat(in unsigned long aindex); violates the xpcom interface guidelines boolean
removeelementsat(in unsigned long aindex, in unsigned long acount); violates the xpcom interface guidelines boolean
removelastelement([const] in nsisupports aelement); violates the xpcom interface guidelines boolean replaceelementat(in nsisupports aelement, in unsigned long aindex); violates the xpcom interfa...
...aother aindex return value violates the xpcom interface guidelines lastindexof() long lastindexof( [const] in nsisupports apossibleelement ); parameters apossibleelement return value violates the xpcom interface guidelines moveelement() boolean moveelement( in long afrom, in long ato ); parameters afrom ato return value violates the xpcom interface guidelines
removeelementat() boolean
removeelementat( in unsigned long aindex ); parameters aindex return value violates the xpcom interface guidelines
removeelementsat() boolean
removeelementsat( in unsigned long aindex, in unsigned long acount ); parameters aindex acount return value violates the xpcom interface guidelines
removelastelement() boolean
removelastelement( [const] in ...
nsIToolkitProfile
public/nsitoolkitprofile.idlscriptable represents a user profile. inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) you should not create these objects yourself; to obtain them, use the nsitoolkitprofileservice interface to create and obtain them. method overview nsiprofilelock lock(out nsiprofileunlocker aunlocker); void
remove(in boolean
removefiles); attributes attribute type description localdir nsilocalfile the location of the profile local directory, which may be the same as the root directory. see nsiprofilelock.localdirectory(). read only. name autf8string the profile's name. rootdir nsilocalfile the location of the profile directory. read only. ...
...nnot be returned to javascript as the error causes an exception to be thrown. the unlocker object is only available in gecko 34 or later when running on windows vista or later. return value an nsiprofilelock object which holds a profile lock as long as you hold a reference to it. example: var profile = profilelist.getnext().queryinterface(ci.nsitoolkitprofile); var locker = profile.lock({});
remove()
removes the profile from the registry of profiles. void
remove( in boolean
removefiles ); parameters
removefiles indicates whether or not the profile directory should be
removed when the profile is
removed from the profile list. see also profile management nsitoolkitprofileservice nsiprofilelock nsiprofileunlocker ...
nsITransactionManager
this is commonly referred to as the number of levels of undo. a value of -1 means no limit. a value of zero means the transaction manager will execute each tra...
...some implementations if there is a batch at the top of the undo stack. nsitransaction peekundostack(); parameters none. return value an addref'd pointer to the nsitransaction at the top of the undo stack. redotransaction() pops the topmost transaction on the redo stack, calls it's nsitransaction.redotransaction() method, then pushes it on the undo stack. void redotransaction(); parameters none.
removelistener()
removes a listener from the transaction manager's notification list. the listener's nsitransactionlistener.release() method is called. void
removelistener( in nsitransactionlistener alistener ); parameters alistener the nsitransactionlistener to
remove. undotransaction() pops the topmost transaction on the undo stack, calls it's nsitransaction.undotransaction() method, then pushes ...
nsITransferable
ispriv...
...erface(ci.nsiwebnavigation) .queryinterface(ci.nsiloadcontext); in c++ callers, if you have the corresponding document, you can just call nsidocument.getloadcontext() to get to the load context object. islargedataset() returns true if the data is large. boolean islargedataset(); parameters none. return value true if the data is large; otherwise, the result is false.
removedataflavor()
removes the data flavor matching the given one (as determined by a string comparison), along with the corresponding data. void
removedataflavor( in string adataflavor ); parameters adataflavor the data flavor to
remove. settransferdata() sets the data in the transferable with the specified flavor. the transferable maintains its own copy of the data, so you can safely disc...
nsITreeBoxObject
height the height of the element iscellcropped() determine if the text of a cell is being cropped or not. boolean iscellcropped(in long row, in nsitreecolumn col); parameters row the index of the row col the nsitreecolumn rowcountchanged() notify the tree that the number of rows changed. the view is responsible for calling this notification method when rows are added or
removed. for non-contiguous additions/removals, this method should be called multiple times. void rowcountchanged(in long index, in long count); parameters index the position at which the new rows were added or at which rows were
removed. count the number of rows added or
removed. use negative values for
removed rows. example you deleted the row with index rowindex. inform the tree a...
...this must be followed by calling endupdatebatch(), otherwise the tree will get out of sync. void beginupdatebatch(); endupdatebatch() notify the tree that the view has completed a batch update. ...
nsIURLParser
rectorypos directorylen basenamepos basenamelen extensionpos extensionlen parsepath() breaks the path string up into its 4 major components: a file path, a param string, a query string, and a reference string. ...
...melen extensionpos extensionlen parsepath() breaks the path string up into its 4 major components: a file path, a param string, a query string, and a reference string. ...
nsIWindowWatcher
boutmyextension", "chrome,centerscreen", null); note: versions of gecko before gecko 2.0 would ignore some of the chrome flags when opening a chrome window without an opener window, instead behaving as if the "all" flag was present. this was fixed in bug 509124. registernotification() clients of this service can register themselves to be notified when a window is opened or closed (added to or
removed from this service). this method adds an nsiobserver to the list of objects to be notified. void registernotification( in nsiobserver aobserver ); parameters note: be careful about generating open/close window events inside nsiobserver.observe(). for example the following code will block the system because it will open windows continuously: function mywindowobserver() { this.observe=fun...
...d in by the app. openwindow() will use it to create new windows. void setwindowcreator( in nsiwindowcreator creator ); parameters creator the nsiwindowcreator callback. if this is null the callback will be cleared and window creation capabilities lost. unregisternotification() clients of this service can register themselves to be notified when a window is opened or closed (added to or
removed from this service). this method
removes an nsiobserver from the list of objects to be notified. void unregisternotification( in nsiobserver aobserver ); parameters aobserver the nsiobserver to be
removed. ...
nsIXMLHttpRequest
try to avoid using it. nsixmlhttprequest along with nsijsxmlhttprequest and nsixmlhttprequesteventtarget are mozilla's implementation details of the dom xmlhttprequest object. note: if you're a web developer or a mozilla add-on developer, please refer to the xmlhttprequest documentation instead. this page contains documentation, specific to mozilla application and add-on developers. ...
... req.open('post', "http://www.foo.bar:8080/nietzsche.do", true); req.send('your=data&and=more&stuff=here'); example 2 var {cu: utils, cc: classes, ci: instances} = components; cu.import('resource://gre/modules/services.jsm'); function xhr(url, cb) { let xhr = cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createinstance(ci.nsixmlhttprequest); let handler = ev => { evf(m => xhr.
removeeventlistener(m, handler, !1)); switch (ev.type) { case 'load': if (xhr.status == 200) { cb(xhr.response); break; } default: services.prompt.alert(null, 'xhr error', 'error fetching package: ' + xhr.statustext + ' [' + ev.type + ':' + xhr.status + ']'); break; ...
nsIXULTemplateQueryProcessor
methods, except for translateref(). the builder will then call compilequery() for each query in the template to compile the queries. when results need to be generated, the builder will call generateresults(). the initializeforbuilding(), compilequery() and addbinding() methods may not be called after generateresults() has been called until the builder indicates that the generated output is being
removed by calling the done() method. currently, the datasource supplied to the methods will always be an nsirdfdatasource or a dom node, and will always be the same one in between calls to initializeforbuilding() and done(). method overview void addbinding(in nsidomnode arulenode, in nsiatom avar, in nsiatom aref, in astring aexpr); print32 compareresults(in nsixultemplateresult aleft, in nsixulte...
...mnode aquery, in nsiatom arefvariable, in nsiatom amembervariable ); parameters abuilder the template builder. aquery <query> node to compile. arefvariable the reference variable. amembervariable the member variable. return value a compiled query object. done() called when the template builder is being destroyed so that the query processor can clean up any state. the query processor should
remove as much state as possible, such as results or references to the builder. this method will also be called when the template is going to be rebuilt. void done(); parameters none. generateresults() generate the results of a query and return them in an enumerator. the enumerator must contain nsixultemplateresult objects. if there are no results, an empty enumerator must be returned. the datasource w...
nsIXULTemplateResult
ord. a result is expected to only be created by a query processor. each result also contains a set of variable bindings. the value for a particular variable may be retrieved using the getbindingfor() and getbindingobjectfor() methods. method overview astring getbindingfor(in nsiatom avar); nsisupports getbindingobjectfor(in nsiatom avar); void hasbeen
removed(); void rulematched(in nsisupports aquery, in nsidomnode arulenode); attributes attribute type description id astring id of the result. the dom element created for this result, if any, will have its id attribute set to this value. the id must be unique for a query. iscontainer boolean true...
...le such as ?name for this result. this method may return null for a variable, even if getbindingfor() returns a non-null value for the same variable. this method is provided as a convenience when sorting results. nsisupports getbindingobjectfor( in nsiatom avar ); parameters avar the variable to look up. return value the value for the variable or null if it has no value. hasbeen
removed() indicate that the output for a result has been
removed and that the result is no longer being used by the builder. void hasbeen
removed(); parameters none. rulematched() indicate that a particular rule of a query has matched and that output will be generated for it. both the query as compiled by the query processor's nsixultemplatequeryprocessor.compilequery() method and the xul <rule> element...
nsIXULWindow
contextflags pruint32 contextflags are from nsiwindowcreator2. docshell nsidocshell the docshell owning the xul for this window. read only. intrinsicallysize...
..., or a browser object. or down the road any other object that supports being a docshelltreeitem query accordingly to determine the capabilities. nsidocshelltreeitem getcontentshellbyid( in wstring id ); parameters id the id of the content shell, which is the same as the "type" attribute on the containing frame element. return value the tree item corresponding to the given id, if any.
removechildwindow() tell this window that it has lost a child xul window. note that xul windows do not currently track child xul windows. void
removechildwindow( in nsixulwindow achild ); parameters achild the child window being
removed. showmodal() shows the window as a modal window. that is, ensures that it is visible and runs a local event loop, exiting only once the window has been clos...
nsIZipWriter
exceptions thrown ns_error_not_initialized if no zip file has been opened. file nsifile the zip file being written to. read only. in...
...essqueue() again will continue where operations left off. void processqueue( in nsirequestobserver aobserver, in nsisupports acontext ); parameters aobserver the observer to receive notifications from the queue. acontext the context to pass to the observer. exceptions thrown ns_error_not_initialized no zip file is open. ns_error_in_progress the queue is already in progress.
removeentry()
removes an entry from the zip file. void
removeentry( in autf8string azipentry, in boolean aqueue ); parameters azipentry the path of the entry to
remove from the zip file. aqueue true to place the
remove operation into the queue, or false to process it at once. will be performed when processqueue() is called. exceptions thrown ns_error_not_initialized no zip file is op...
XPCOM string functions
ns_cstringcontainerinit function initializes a nscstringcontainer instance for use as a nsacstring.ns_cstringcontainerinit2the ns_cstringcontainerinit2 function initializes a nscstringcontainer instance for use as a nsacstring.ns_cstringcopythe ns_cstringcopy function copies the value from one nsacstring instance to another. this is a low-level api.ns_cstringcutdatathe ns_cstringcutdata function
removes a section of the string's internal buffer. this is a low-level api.ns_cstringgetdatathe ns_cstringgetdata function gives the caller read access to the string's internal buffer.ns_cstringgetmutabledatathe ns_cstringgetmutabledata function gives the caller write access to the string's internal buffer.ns_cstringinsertdatathe ns_cstringinsertdata function appends data to the existing value of a nsac...
...eleases any memory allocated by a nsstringcontainer instance. this is a low-level api.ns_stringcontainerinitthe ns_stringcontainerinit function initializes a nsstringcontainer instance for use as a nsastring. this is a low-level api.ns_stringcopythe ns_stringcopy function copies the value from one nsastring instance to another. this is a low-level api.ns_stringcutdatathe ns_stringcutdata function
removes a section of the string's internal buffer. this is a low-level api.ns_stringgetdatathe ns_stringgetdata function gives the caller access to the string's internal buffer. this is a low-level api.ns_stringinsertdatathe ns_stringinsertdata function appends data to the existing value of a nsacstring instance. this is a low-level api.ns_stringsetdatathe ns_stringsetdata function copies data into the ...
Setting HTTP request headers
the second statement does the actual registering. we are saying we want httprequestobserver to be notified (by calling its observe method) when a "http-on-modify-request" topic takes place (which we know happens just before each http request). unregistering you should unregister the observer on shutdown. failing to do that may cause memory leaks. to unregister the observer use nsiobserverservice.
removeobserver as follows: observerservice.
removeobserver(httprequestobserver, "http-on-modify-request"); all-in-one example here is a slightly different version of our httprequestobserver object. while the previous version we showed before was good for learning, in an actual real-world application, you'd probably want to code it more like the following. var httprequestobserver = { observe: function(s...
...xpcom components you need to register a single http-on-modify-request observer per ap...
XPCOM category image-sniffing-services
...
...to allow "third-party" xpcom components to identify images based on their content. if mozilla's built-in image code cannot identify an image, then any xpcom components implementing the nsicontentsniffer interface may register under the "image-sniffing-services" category, and will be queried to determine the mime type of the image being downloaded. note: this category was
removed. see bug 813787 -
remove support for image-sniffing-services. ...
Events
saved searches, virtual folders, a quicksearch onsortchanged the sort method in the messages list has been changed ...
...saved searches, virtual folders, a quicksearch onsortchanged the sort method in the messages list has been changed ...
Spam filtering
is does not work for news, but it would be possible to add support for this. (there is a bug on it.). ...
... unknown (user can't see this, looks like "not junk") mark as junk add tokens to bad unknown (user can't see this, looks like "not junk") mark as not junk add tokens to good not junk mark as junk
remove tokens from good, add tokens to bad not junk mark as not junk no op junk mark as junk no op junk mark as not junk
remove tokens from bad, add tokens to good ...
Activity Manager examples
t process.contextobj = folder.server; // account in question gactivitymanager.addactivity(process); // step 2: showing some progress let percent = 50; process.setprogress(percent, "junk processing 25 of 50 messages", 25, 50); // step 3: removing the process and adding an event using process' attributes process.state = components.interfaces.nsiactivityprocess.state_completed; gactivitymanager.
removeactivity(process.id); let event = components.classes["@mozilla.org/activity-event;1"].createinstance(nsiae); // localization is omitted, initiator is omitted event.init(folder.prettiestname + " is processed", null, "no junk found", process.starttime, // start time date.now()); // completion time event.contexttype = process.contexttype; // opti...
...cel: function(aactivity) { let initiator = aactivity.initiator; if (initiator) { let folder = aactivity.getsubjects({})[0]; .... // assuming that the initiator has some way to cancel // the junk processing for given folder if (initiator.cancelfolderop(folder)) { aactivity.state = components.interfaces.nsiactivityprocess.state_canceled; gactivitymanager.
removeactivity(aactivity.id); return cr.ns_success; } } return cr.ns_failure; } } // step 2: modify the previous sample to add initiator, subject // and associate a nsiactivitycancelhandler component ... // assuming that gjunkprocessor is the entity initiating the junk processing // activity, and it has cancelfolderop method that cancels the operations on folders process.init("process...
Using popup notifications
of your secondary actions from the drop-down menu, the corresponding callback is invoked. choosing the "not now" option dismisses the notification; it can be brought back by clicking on the notification icon again. implementing a timeout function for the popup notification you can use a timeout to make your notification automatically disappear after some amount of time, by calling notification.
remove() as shown below. components.utils.import('resource://gre/modules/popupnotifications.jsm'); var notify = new popupnotifications(gbrowser, document.getelementbyid("notification-popup"), document.getelementbyid("notification-popup-box")); var notification = notify.show( // browser gbrowser.selectedbrowser, // popup id "pdes-popup", // message "hi, there!,...
... ...
Debugger.Script - Firefox Developer Tools
array containing the handler objects for all the breakpoints set atoffset in this script. ifoffset is omitted, return the handlers of all breakpoints set anywhere in this script. ifoffset is present, but not a valid offset in this script, throw an error. if the instance refers to webassembly code, throw a typeerror. clearbreakpoint(handler, [offset]) if the instance refers to a jsscript,
remove all breakpoints set in this debugger instance that usehandler as their handler. ifoffset is given,
remove only those breakpoints set atoffset that usehandler; ifoffset is not a valid offset in this script, throw an error. note that, if breakpoints using other handler objects are set at the same location(s) ashandler, they remain in place. clearallbreakpoints([offset]) if the instance refers...
... set in this debugger instance that usehandler as their handler. ifoffset is given,
remove only those breakpoints set atoffset that usehandler; ifoffset is not a valid offset in this script, throw an error. note that, if breakpoints using other handler objects are set at the same location(s) ashandler, they remain in place. clearallbreakpoints([offset]) if the instance refers to a jsscript,
remove all breakpoints set in this script. ifoffset is present,
remove all breakpoints set at that offset in this script; ifoffset is not a valid bytecode offset in this script, throw an error. isincatchscope([offset]) if the instance refers to a jsscript, this is true if this offset falls within the scope of a try block, and false otherwise. if the instance refers to webassembly code, throw a typ...
Dominators view - Firefox Developer Tools
he retaining paths for a node, you have to select the node in the dominators tree panel: here, we've selected an object, and can see a single path back to a gc root. the window gc root holds a reference to an htmldivelement object, and that holds a reference to an object, and so on. if you look in the dominators tree panel, you can trace the same path there. ...
... example let's see how some simple code is reflected in the dominators view. ...
Migrating from Firebug - Firefox Developer Tools
generated scripts are only listed there when they are named via a //# sourceurl comment. managing breakpoints in firebug you can set different types of breakpoints, which are all listed within the breakpoints side panel. in the devtools the breakpoints are shown below each script source within the sources side panel. those panels allow you to enable and disable single or all breakpoints and to
remove single breakpoints or all of them at once. they do currently only allow to set script breakpoints. xhr, dom, cookie and error breakpoints are not supported yet (see bug 821610, bug 1004678, bug 895893 and bug 1165010). while there are no breakpoints for single javascript errors, there is a setting pause on exceptions within the debugger panel options. step through code once the script execution...
... to right-click the cookie and choose edit from the context menu. then a dialog pops up allowing you to edit the data of the cookie and save it. inside the storage inspector you just have to double-click the data you want to edit. then an inline editor allows you to edit the value. delete cookies firebug's cookies panel allows you to delete all cookies of a website via the menu option cookies >
remove cookies or by pressing ctrl+shift+o. it also allows you to only
remove session cookies via cookies >
remove session cookies and to
remove single cookies by right-clicking them and choosing delete. the devtools storage inspector allows to
remove all cookies and a single one by right-clicking on a cookie and choosing delete all resp. delete "<cookie name>". additionally, it allows to delete all coo...
Examine and edit CSS - Firefox Developer Tools
is also gets the target icon: , giving you a convenient way to highlight the currently selected element in the page. filtering rules there's a box at the top of the rules view labeled "filter styles": as you type: any rules which don't contain the typed string at all are hidden any declarations which contain the typed string are highlighted click the "x" at the end of the search box to
remove the filter. while in the rules view, you can press ctrl / cmd + f to focus the search field. once you've typed in a filter, you can press esc to
remove it again. strict search by default, the search box highlights all declarations which contain any part of the string. for example, searching for "color" will highlight declarations containing border-bottom-color and background-color as well ...
...ted settings, you can type "font" in the search box, and only properties with "font" in the name will be listed. you can also search for the values of properties: to find the rule responsible for setting the font to "lucida grande", type that in the search box. while in the computed view, you can press ctrl / cmd + f to focus the search field. once you've typed in a filter, you can press esc to
remove it again. edit rules if you click on a declaration or a selector in the rules view you can edit it and see the results immediately. you can also tab through the different existing properties and values, and start editing them by pressing enter or space. to add a new declaration to a rule, click on the last line of the rule (the line occupied by the closing brace). as you start typing a proper...
Examine and edit HTML - Firefox Developer Tools
an perform certain common tasks on a specific node using a popup context menu. to activate this menu, context-click the element. the menu contains the following items — click on the links to find the description of each command in the context menu reference: edit as html create new node duplicate node delete node attributes add attribute copy attribute value edit attribute
remove attribute break on ... subtree modification attribute 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 ...
...urrently selected element. see inserting new nodes. duplicate node create a copy of this element, and insert the copy immediately after this element. delete node delete the element from the dom. attribute/add attribute add an attribute to the element. attribute/edit attribute (only when invoked on an attribute) edit the attribute. attribute/
remove attribute (only when invoked on an attribute)
remove the attribute. open link in new tab (only when invoked over a link, such as an href attribute) opens the linked item in a new tab. open file in debugger (only when invoked over a link to a js source) opens the linked source in the debugger. open file in style-editor (only when invoked over a link to a css ...
Allocations - Firefox Developer Tools
in the example above: 8904 samples were taken in signallater(), which is 28.57% of the total number of samples taken those samples allocated 1102888 bytes, which is 30.01% of the total memory allocated in all samples next to each function name is a disclosure arrow. click this to see the places this function was called from: here you can see that signallater() was called from two places:
removeinner() and setselectioninner(). in this way you can walk back up the call stack, and understand better the context for these allocations. self cost and total cost you'll see that there are separate sets of columns for "self" and for "total". "self" records samples taken only in this function. "total" records samples taken in this function or in functions called by this function. at the top l...
... taken in this function or in functions called by this function. at the top level, these are always the same, since the view presents "leaf" functions at the top level (that is, it presents an inverted view of the call stack). but if you start walking back up the call stack, you'll see the difference: here, 8904 samples were taken in signallater(). but signallater() was called from two places:
removeinner() and setselectioninner(). both these functions have 0 in self count, meaning that no allocations were seen directly in these functions. however,
removeinner() has 8901 in total count, while setselectioninner() has just 3 in total count. this is telling us that, of the 8904 allocations seen in signallater(), all but three came through the
removeinner() branch. allocations and garbage collec...
Settings - Firefox Developer Tools
but not enabled by default. available toolbox buttons this group of checkboxes determines which tools get an icon in the toolbox's toolbar. as of firefox 62, if the option to "select an iframe as the currently targeted document" is checked, the icon will appear in the toolbar while the settings tab is displayed, even if the current page doesn't include any iframes. note that in firefox 52 we
removed the checkbox to toggle the "select element" button. the "select element" button is now always shown. themes this enables you to choose one of two themes. there's a light theme, which is the default: a dark theme: common preferences settings that apply to more than one tool. there's just one of these: enable persistent logs a setting to control whether or not the we...
...ble service worker registrations from insecure websites. enable browser chrome and add-on debugging toolboxes enable you to use developer tools in the context of the browser itself, and not only web content. enable remote debugging enable the developer tools to debug remote firefox instances. enable worker debugging enable a panel within the debugger to debug workers. note: this option got
removed from the ui in firefox 56, because this version ships with a new debugger ui, but it can still be enabled for the old ui by setting the preference devtools.debugger.workers to true. ...
AnimationEvent.initAnimationEvent() - Web APIs
do not use this method; instead, use the standard constructor, animationevent(), to create a synthetic animationevent. ...
...do not use this method; instead, use the standard constructor, animationevent(), to create a synthetic animationevent. ...
Background Tasks API - Web APIs
ed into the task handler as an input parameter, to allow the task to receive custom data. to enqueue the task, we push an object onto the tasklist array; the object contains the taskhandler and taskdata values under the names handler and data, respectively, then increment totaltaskcount, which reflects the total number of tasks which have ever been enqueued (we don't decrement it when tasks are
removed from the queue). next, we check to see if we already have an idle callback created; if taskhandle is 0, we know there isn't an idle callback yet, so we call requestidlecallback() to create one. it's configured to call a function called runtaskqueue(), which we'll look at shortly, and with a timeout of 1 second, so that it will be run at least once per second even if there isn't any actual idle ...
... ); } else { taskhandle = 0; } } runtaskqueue()'s core is a loop which continues as long as there's time left (as determined by checking deadline.timeremaining) to be sure it's more than 0 or if the timeout limit was reached (deadline.didtimeout is true), and as long as there are tasks in the task list. for each task in the queue that we have time to execute, we do the following: we
remove the task object from the queue. we increment currenttasknumber to track how many tasks we've executed. we call the task's handler, task.handler, passing into it the task's data object (task.data). we call a function, schedulestatusrefresh(), to handle scheduling a screen update to reflect changes to our progress. when time runs out, if there are still tasks left in the list, we call requesti...
CSSStyleDeclaration - Web APIs
t". cssstyledeclaration.getpropertyvalue() returns the property value given a property name. cssstyledeclaration.item() returns a css property name by its index, or the empty string if the index is out-of-bounds. an alternative to accessing nodelist[i] (which instead returns undefined when i is out-of-bounds). this is mostly useful for non-javascript dom implementations. cssstyledeclaration.
removeproperty()
removes a property from the css declaration block. cssstyledeclaration.setproperty() modifies an existing css property or creates a new css property in the declaration block. cssstyledeclaration.getpropertycssvalue() only supported via getcomputedstyle in firefox. returns the property value as a cssprimitivevalue or null for shorthand properties. example var styleobj = documen...
... css property in the declaration block. cssstyledeclaration.getpropertycssvalue() only supported via getcomputedstyle in firefox. returns the property value as a cssprimitivevalue or null for shorthand properties. example var styleobj = document.stylesheets[0].cssrules[0].style; console.log(styleobj.csstext); for (var i = styleobj.length; i--;) { var namestring = styleobj[i]; styleobj.
removeproperty(namestring); } console.log(styleobj.csstext); specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration' in that specification. working draft merged the dom level 2 style css2properties interface into cssstyledeclaration. document object model (dom) level 2 style specificationthe definition of '...
ChildNode - Web APIs
the childnode mixin contains methods and properties that are common to all types of node objects that can have a parent. it's implemented by element, documenttype, and characterdata objects. properties there are neither inherited, nor specific properties. methods there are no inherited methods. childnode.
remove()
removes this childnode from the children list of its parent. childnode.before() inserts a set of node or domstring objects in the children list of this childnode's parent, just before this childnode. domstring objects are inserted as equivalent text nodes. childnode.after() inserts a set of node or domstring objects in the children list of this childnode's parent, just after this childnode. domstring objects are inserted as equivalent text nodes. childnode.replacewit...
... as equivalent text nodes. specifications specification status comment domthe definition of 'childnode' in that specification. living standard split the elementtraversal interface in parentnode and childnode. previouselementsibling and nextelementsibling are now defined on the latter. the characterdata and documenttype implemented the new interfaces. added the
remove(), before(), after() and replacewith() methods. element traversal specificationthe definition of 'elementtraversal' in that specification. obsolete added the initial definition of its properties to the elementtraversal pure interface and use it on element. polyfill external on github: childnode.js ...
Constraint validation API - Web APIs
trols, such as <input>, <select> and <textarea>, can restrict the format of allowable values, using attributes like required and pattern to set basic constraints. however, you may want to impose more complex constraints, or to provide clearer reporting of validation failures than the defaults. this can be done using the constraint validation api. note: client-side constraint validation doesn't
remove the need for validation on the server side. even though client-side validation can prevent many common kinds of invalid values, invalid ones can still be sent by older browsers or by attackers trying to trick your web application. therefore, you need to also validate input values on the server side, in a way that is consistent with what is done on the client side. client side validation is a tool...
...lue. we therefore do this every time the input event is raised. if you don't do this, and a custom validity was previously set, the input will register as invalid, even if it current contains a valid value on submission. note: firefox supported a proprietary error attribute — x-moz-errormessage — for many versions, which allowed you set custom error messages in a similar way. this has been
removed as of version 66 (see bug 1513890). specifications specification status comment html living standardthe definition of 'constraint validation api' in that specification. living standard html 5.1the definition of 'constraint validation api' in that specification. recommendation no change from the previous snapshot html5. html5the definition...
ContentIndexEvent() - Web APIs
xevent = new contentindexevent(type, contentindexeventinit); parameters type a domstring indicating the event which occurred. for contentindexevent, this is always delete. eventinitdict optional an options object containing any initialization data you want to populate the contentindexevent object with. the options are: id: the id of the indexed content you want the contentindexevent to
remove. ...
... eventinitdict optional an options object containing any initialization data you want to populate the contentindexevent object with. the options are: id: the id of the indexed content you want the contentindexevent to
remove. return value a contentindexevent object configured using the given inputs. examples this examples constructs a new contentindexevent with the relevant id. var
removedata = { id : 'unique-content-id' } var cievent = new contentindexevent('contentdelete',
removedata); cievent.id; // should return 'unique-content-id' specifications specification status comment unknownthe definition of 'contentindexevent' in that specification. unknown initial definition. ...
ContentIndexEvent - Web APIs
the contentdelete event is only fired when the deletion happens due to interaction with the browser's built-in user interface. it is not fired when the contentindex.delete method is called. ...
...terface inherits the properties of its parent interface, extendableevent. id read only a string which identifies the deleted content index via it's id. methods while contentindexevent offers no methods of its own, it inherits any specified by its parent interface, extendableevent. examples this example shows the sevice worker script listening for the contentdelete event and logs the
removed content index id. self.addeventlistener('contentdelete', (event) => { console.log(event.id); // logs content index id, which can then be used to determine what content to delete from your cache }); specifications specification status comment unknownthe definition of 'contentindexevent' in that specification. unknown initial definition. ...
DOMTokenList - Web APIs
eturns the value of the list as a domstring. methods domtokenlist.item(index) returns the item in the list by its index, or undefined if index is greater than or equal to the list's length. domtokenlist.contains(token) returns true if the list contains the given token, otherwise false. domtokenlist.add(token1[, token2[, ...tokenn]]) adds the specified token(s) to the list. domtokenlist.
remove(token1[, token2[, ...tokenn]])
removes the specified token(s) from the list. domtokenlist.replace(oldtoken, newtoken) replaces token with newtoken. domtokenlist.supports(token) returns true if a given token is in the associated attribute's supported tokens. domtokenlist.toggle(token [, force])
removes token from the list if it exists, or adds token to the list if it doesn't. returns a bool...
...for example: <span class=" d d e f"></span> let span = document.queryselector("span"); let classes = span.classlist; span.classlist.add("x"); span.textcontent = `span classlist is "${classes}"`; the output looks like this: specifications specification status comment domthe definition of 'domtokenlist' in that specification. ...
DataTransfer.mozClearDataAt() - Web APIs
the datatransfer.mozcleardataat() method
removes the data associated with the given format for an item at the specified index. the index must be in the range from zero to the number of items minus one. if the format argument is not provided, then the data associated with all formats is
removed. if the format is not found, then this method has no effect. if the last format for the item is
removed, the entire item is
removed, reducing mozitemcount by one. removing the last format for a particular index
removes that item entirely, shifting the remaining items down and changing their indices. note: this method is gecko-specific. syntax void datatransfer.mozcleardataat([type], index); arguments type a string representing the type of the drag data to
remove from the drag data object. i...
...moving the last format for a particular index
removes that item entirely, shifting the remaining items down and changing their indices. note: this method is gecko-specific. syntax void datatransfer.mozcleardataat([type], index); arguments type a string representing the type of the drag data to
remove from the drag data object. index a unsigned long representing the index of the data to
remove. return value void example this example shows the use of the mozcleardataat() method in a dragend event handler. function dragend_handler(event) { var dt = event.datatransfer; //
remove a text/html item dt.mozcleardataat("text/html", 1); } specifications this method is not defined in any web standard. ...
DataTransferItemList.clear() - Web APIs
the drag data store in which this list is kept is only writable while handling the dragstart event. while handling drop, the drag data store is in read-only mode, and this method silently does nothing. no exception is thrown. syntax datatransferitemlist.clear(); parameters none. return value undefined example this example shows the use of the clear() method. ...
...string(function (s){ console.log("... drop: uri = " + s); }); } } } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } function dragend_handler(ev) { console.log("dragend"); var datalist = ev.datatransfer.items; for (var i = 0; i < datalist.length; i++) { datalist.
remove(i); } // clear any remaining drag data datalist.clear(); } result result link specifications specification status comment html living standardthe definition of 'clear()' in that specification. living standard html 5.1the definition of 'clear()' in that specification. recommendation not included in w3c html5 recommendation ...
Document.open() - Web APIs
syntax document.open(); parameters none. return value a document object instance. examples the following simple code opens the document and replaces its content with a number of different html fragments, before closing it again. ...
... syntax document.open(); parameters none. return value a document object instance. examples the following simple code opens the document and replaces its content with a number of different html fragments, before closing it again. ...
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
the dom methods presented here are not specific to html; they also apply to xml. the demonstrations provided here will work fine in any modern browser, including all versions of firefox and ie 5+. the dom methods presented here are part of the document object model (core) level 1 specification. ...
...r any other element you want with createelement. for example, if you want to create a new <p> element as a child of the <body> element, you can use the mybody in the previous example and append a new element node. to create a node simply call document.createelement("tagname"). for example: mynewptagnode = document.createelement("p"); mybody.appendchild(mynewptagnode); removing nodes with the
removechild(..) method nodes can be
removed. the following code
removes text node mytextnode (containing the word "world") from the second <p> element, myp. myp.
removechild(mytextnode); text node mytextnode (containing the word "world") still exists. the following code attaches mytextnode to the recently created <p> element, mynewptagnode. mynewptagnode.appendchild(mytextnode); the final state fo...
Element: cut event - Web APIs
tion through the browser's user interface. if the user attempts a cut action on uneditable content, the cut event still fires but the event object contains no data. bubbles yes cancelable yes interface clipboardevent event handler property oncut the event's default action is to copy the current selection (if any) to the system clipboard and
remove it from the document. a handler for this event can modify the clipboard contents by calling setdata(format, data) on the event's clipboardevent.clipboarddata property, and cancelling the default action using event.preventdefault(). note though that cancelling the default action will also prevent the document from being updated. so an event handler which wants to emulate the default action for "...
...odify the clipboard contents by calling setdata(format, data) on the event's clipboardevent.clipboarddata property, and cancelling the default action using event.preventdefault(). note though that cancelling the default action will also prevent the document from being updated. so an event handler which wants to emulate the default action for "cut" while modifying the clipboard must also manually
remove the selection from the document. the handler cannot read the clipboard data. it's possible to construct and dispatch a synthetic cut event, but this will not affect the system clipboard or the document's contents. examples live example html <div class="source" contenteditable="true">try cutting text from this box...</div> <div class="target" contenteditable="true">...and pasting it into thi...
Element.toggleAttribute() - Web APIs
t is not present) on the given element. syntax element.toggleattribute(name [, force]); parameters name a domstring specifying the name of the attribute to be toggled. the attribute name is automatically converted to all lower-case when toggleattribute() is called on an html element in an html document. force optional a boolean value to determine whether the attribute should be added or
removed, no matter whether the attribute is present or not at the moment. return value true if attribute name is eventually present, and false otherwise. exceptions invalidcharactererror the specified attribute name contains one or more characters which are not valid in attribute names. example in the following example, toggleattribute() is used to toggle the readonly attribute of a <input>. ...
... methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - -
removeattribute (dom 1)
removeattributens
removeattributenode - polyfill if (!element.prototype.toggleattribute) { element.prototype.toggleattribute = function(name, force) { if(force !== void 0) force = !!force if (this.hasattribute(name)) { if (force) return true; this.
removeattribute(name); return false; } if (force === false) return false; this.setattr...
EventTarget - Web APIs
solas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor eventtarget() creates a new eventtarget object instance. methods eventtarget.addeventlistener() registers an event handler of a specific event type on the eventtarget. eventtarget.
removeeventlistener()
removes an event listener from the eventtarget. eventtarget.dispatchevent() dispatches an event to this eventtarget. additional methods in mozilla chrome codebase mozilla includes a couple of extensions for use by js-implemented event targets to implement onevent properties. see also webidl bindings. void seteventhandler(domstring type, eventhandler handler) eventhandl...
... eventhandler geteventhandler(domstring type) example simple implementation of eventtarget var eventtarget = function() { this.listeners = {}; }; eventtarget.prototype.listeners = null; eventtarget.prototype.addeventlistener = function(type, callback) { if (!(type in this.listeners)) { this.listeners[type] = []; } this.listeners[type].push(callback); }; eventtarget.prototype.
removeeventlistener = function(type, callback) { if (!(type in this.listeners)) { return; } var stack = this.listeners[type]; for (var i = 0, l = stack.length; i < l; i++) { if (stack[i] === callback){ stack.splice(i, 1); return; } } }; eventtarget.prototype.dispatchevent = function(event) { if (!(event.type in this.listeners)) { return true; } var stack = th...
Using files from web applications - Web APIs
= this; this.xhr.upload.addeventlistener("progress", function(e) { if (e.lengthcomputable) { const percentage = math.round((e.loaded * 100) / e.total); self.ctrl.update(percentage); } }, false); xhr.upload.addeventlistener("load", function(e){ self.ctrl.update(100); const canvas = self.ctrl.ctx.canvas; canvas.parentnode.
removechild(canvas); }, false); xhr.open("post", "http://demos.hacks.mozilla.org/paul/demos/resources/webservices/devnull.php"); xhr.overridemimetype('text/plain; charset=x-user-defined-binary'); reader.onload = function(evt) { xhr.send(evt.target.result); }; reader.readasbinarystring(file); } the fileupload() function shown above creates a throbber, which is used to display progre...
...ad progress listener is set to update the throbber with new percentage information so that as the upload progresses the throbber will be updated based on the latest information. the xmlhttprequest's upload load event handler is set to update the throbber progress information to 100% to ensure the progress indicator actually reaches 100% (in case of granularity quirks during the process). it then
removes the throbber since it's no longer needed. this causes the throbber to disappear once the upload is complete. the request to upload the image file is opened by calling xmlhttprequest's open() method to start generating a post request. the mime type for the upload is set by calling the xmlhttprequest function overridemimetype(). in this case, we're using a generic mime type; you may or may not n...
HTMLCanvasElement.toDataURL() - Web APIs
= canvas.todataurl('image/jpeg', 0.5); var lowquality = canvas.todataurl('image/jpeg', 0.1); example: dynamically change images you can use this technique in coordination with mouse events in order to dynamically change images (gray-scale vs. ...
...ale vs. ...
HTMLElement: animationcancel event - Web APIs
therefore, either directly or because any of its containing nodes are hidden. an event handler for this event can be added by setting the onanimationcancel property, or using addeventlistener(). ...
...ntlog.textcontent}'animation started' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.textcontent = `${animationeventlog.textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation ended'`; animation.classlist.
remove('active'); applyanimation.textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classli...
HTMLElement: animationend event - Web APIs
the animationend event is fired when a css animation has completed. if the animation aborts before reaching completion, such as if the element is
removed from the dom or the animation is
removed from the element, the animationend event is not fired. bubbles yes cancelable no interface animationevent event handler property onanimationend examples this example gets an element that's being animated and listens for the animationend event: const animated = document.queryselector('.animated'); animated.addeventlistener('animationend', () => { console.log('animation ended'); }); the same, but using the onanimationend event handler property: const animated = document.queryselector('.animated'); animated.onanimationend = () => { console.l...
...ntlog.textcontent}'animation started' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.textcontent = `${animationeventlog.textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation ended'`; animation.classlist.
remove('active'); applyanimation.textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classli...
HTMLIsIndexElement - Web APIs
this latest specification requires that this element implements htmlunknownelement rather than htmlisindexelement. properties inherits properties from its parent, htmlelement. htmlisindexelement.form read only is a htmlformelement representing the <form> element it belongs too. ...
... too. it can have the null value, if <isindex> isn't part of any form. htmlisindexelement.prompt is a domstring representing a text to be prompted for the field. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html5the definition of 'htmlisindexelement' in that specification. recommendation
removed. <isindex> must now implement htmlunknownelement. document object model (dom) level 2 html specificationthe definition of 'htmlisindexelement' in that specification. obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'htmlisindexelement' in that specification. obsolete initial ...
HTMLMediaElement.play() - Web APIs
it tries to play the video, and if successful sets the class name of the playbutton element to "playing". if playback fails to sta...
...("playbutton"); playbutton.addeventlistener("click", handleplaybutton, false); playvideo(); async function playvideo() { try { await videoelem.play(); playbutton.classlist.add("playing"); } catch(err) { playbutton.classlist.
remove("playing"); } } function handleplaybutton() { if (videoelem.paused) { playvideo(); } else { videoelem.pause(); playbutton.classlist.
remove("playing"); } } in this example, playback of video is toggled off and on by the async playvideo() function. it tries to play the video, and if successful sets the class name of the playbutton element to "playing". if playback fails to start, the playbutton element's class is cleared, restoring its default appearance. this ensures that the play button matches the actual state of playback by wat...
HTMLMediaElement.textTracks - Web APIs
the read-only texttracks property on htmlmediaelement objects returns a texttracklist object listing all of the texttrack objects representing the media element's text tracks, in the same order as in the list of text tracks. you can detect when tracks are added to and
removed from an <audio> or <video> element using the addtrack and
removetrack events. however, these events aren't sent directly to the media element itself. instead, they're sent to the track list object of the htmlmediaelement that corresponds to the type of track that was added to the element the returned list is live; that is, as tracks are added to and
removed from the media element, the list's contents change dynamically. once you have a reference to the list, you can monitor it for changes to detect when new tex...
... see event handlers in texttracklist to learn more about watching for changes to a media element's track list. ...
HTMLElement.blur() - Web APIs
living standard html 5.1the definition of 'blur' in that specification. ...
... living standard html 5.1the definition of 'blur' in that specification. ...
HTMLOrForeignElement.dataset - Web APIs
of the same html attribute, but in camelcase and with no dashes, dots, etc. in addition to the information below, you'll find a how-to guide for using html data attributes in our article using data attributes. name conversion dash-style to camelcase conversion a custom data attribute name is transformed to a key for the domstringmap entry with the following rules the prefix data- is
removed (including the dash); for any dash (u+002d) followed by an ascii lowercase letter a to z, the dash is
removed, and the letter is transformed into its uppercase counterpart; other characters (including other dashes) are left unchanged. camelcase to dash-style conversion the opposite transformation, which maps a key to an attribute name, uses the following rules: restriction: befo...
...ct property of the dataset, as in element.dataset.keyname attributes can also be set and read using the bracket syntax, as in element.dataset[keyname] the in operator can be used to check whether a given attribute exists. setting values when an attribute is set, its value is always converted into a string. for example: null is converted into the string "null". to
remove an attribute, you can use the delete operator. syntax const dataattrmap = element.dataset value a domstringmap. examples <div id="user" data-id="1234567890" data-user="johndoe" data-date-of-birth>john doe</div> const el = document.queryselector('#user'); // el.id === 'user' // el.dataset.id === '1234567890' // el.dataset.user === 'johndoe' // el.dataset.dateofbirth === '' // set the da...
HTMLSelectElement - Web APIs
nt.willvalidateread only a boolean that indicates whether the button is a candidate for constraint validation. it is false if any conditions bar it from constraint validation. methods this interface inherits the methods of htmlelement, and of element and node. htmlselectelement.add() adds an element to the collection of option elements for this select element. htmlselectelement.blur()
removes input focus from this element. this method is now implemented on htmlelement. htmlselectelement.checkvalidity() checks whether the element has any constraints and whether it satisfies them. if the element fails its constraints, the browser fires a cancelable invalid event at the element (and returns false). htmlselectelement.focus() gives input focus to this element. this method is now impl...
...-style brackets or parentheses, without calling this method explicitly. htmlselectelement.nameditem() gets the item in the options collection with the specified name. the name string can match either the id or the name attribute of an option node. you can also access an item by specifying the name in array-style brackets or parentheses, without calling this method explicitly. htmlselectelement.
remove()
removes the element at the specified index from the options collection for this select element. htmlselectelement.reportvalidity() this method reports the problems with the constraints on the element, if any, to the user. if there are problems, it fires a cancelable invalid event at the element, and returns false; if there are no problems, it returns true. htmlselectelement.setcustomvalidit...
HTMLTableRowElement - Web APIs
the surrounding context. the possible values are "left", "right", and "center". htmltablerowelement.bgcolor is a domstring containing the background color of the cells. it reflects the obsolete bgcolor attribute. htmltablerowelement.cells read only returns a live htmlcollection containing the cells in the row. the htmlcollection is live and is automatically updated when cells are added or
removed. htmltablerowelement.ch is a domstring containing one single character. this character is the one to align all the cell of a column on. it reflects the char and default to the decimal points associated with the language, e.g. '.' for english, or ',' for french. this property was optional and was not very well supported. htmltablerowelement.choff is a domstring containing a integer indica...
...row is not part of a section, returns -1. htmltablerowelement.valign is a domstring representing an enumerated value indicating how the content of the cell must be vertically aligned. it reflects the valign attribute and can have one of the following values: "top", "middle", "bottom", or "baseline". methods inherits methods from its parent, htmlelement. htmltablerowelement.deletecell()
removes the cell at the given position in the row. if the given position is greater (or equal as it starts at zero) than the amount of cells in the row, or is smaller than 0, it raises a domexception with the indexsizeerror value. htmltablerowelement.insertcell() inserts a new cell just before the given position in the row. if the given position is not given or is -1, it appends the cell to the row. i...
HTMLTableSectionElement - Web APIs
containing an enumerated value reflecting the align attribute. it indicates the alignment of the element's contents with respect to the surrounding context. the possible values are "left", "right", and "center". htmltablesectionelement.rows read only returns a live htmlcollection containing the rows in the section. the htmlcollection is live and is automatically updated when rows are added or
removed. htmltablesectionelement.ch is a domstring containing one single chararcter. this character is the one to align all the cell of a column on. it reflects the char and default to the decimal points associated with the language, e.g. '.' for english, or ',' for french. this property was optional and was not very well supported. htmltablesectionelement.choff is a domstring containing a integ...
...l and was not very well supported. htmltablesectionelement.valign is a domstring representing an enumerated value indicating how the content of the cell must be vertically aligned. it reflects the valign attribute and can have one of the following values: "top", "middle", "bottom", or "baseline". methods inherits methods from its parent, htmlelement. htmltablesectionelement.deleterow()
removes the cell at the given position in the section. if the given position is greater (or equal as it starts at zero) than the amount of rows in the section, or is smaller than 0, it raises a domexception with the indexsizeerror value. htmltablesectionelement.insertrow() inserts a new row just before the given position in the section. if the given position is not given or is -1, it appends the row t...
HTML Drag and Drop API - Web APIs
t, datatransfer, datatransferitem and datatransferitemlist. the dragevent interface has a constructor and one datatransfer property, which is a datatransfer object. datatransfer objects include the drag event's state, such as the type of drag being done (like copy or move), the drag's data (one or more items), and the mime type of each drag item. datatransfer objects also have methods to add or
remove items to the drag's data. the dragevent and datatransfer interfaces should be the only ones needed to add html drag and drop capabilities to an application. (firefox supports some gecko-specific extensions to the datatransfer object, but those extensions will only work on firefox.) each datatransfer object contains an items property, which is a list of datatransferitem objects. a datatransferit...
...a list of datatransferitem objects. a datatransferitem object represents a single drag item, each with a kind property (either string or file) and a type property for the data item's mime type. the datatransferitem object also has methods to get the drag item's data. the datatransferitemlist object is a list of datatransferitem objects. the list object has methods to add a drag item to the list,
remove a drag item from the list, and clear the list of all drag items. a key difference between the datatransfer and datatransferitem interfaces is that the former uses the synchronous getdata() method to access a drag item's data, but the latter instead uses the asynchronous getasstring() method. note: dragevent and datatransfer are broadly supported on desktop browsers. however, the datatransferite...
IDBDatabaseException - Web APIs
in the indexeddb api, an idbdatabaseexception object represents exception conditions that can be encountered while performing database operations. attributes attribute type description code unsigned short the most appropriate error code for the condition. message domstring error message describing the exception raised. constants note: do not rely on the numeric values of the constants, which might change as the specifications continue to change. use the constant names instead. ...
...rements. non_transient_err 2 an operation was not allowed on an object. unless the cause of the error is corrected, retrying the same operation would result in failure. not_allowed_err 6 an operation was called on an object where it is not allowed or at a time when it is not allowed. it also occurs if a request is made on a source object that has been deleted or
removed. more specific variants of this error includes: transaction_inactive_err and read_only_err. not_found_err 3 the operation failed because the requested database object could not be found; for example, an object store did not exist but was being opened. quota_err 11 either there's not enough remaining storage space or the storage quota was reached and the us...
Timing element visibility with the Intersection Observer API - Web APIs
tself doesn't state whether the document has switched from visible to invisible or vice-versa, the document.hidden property is checked to see if the document is not currently visible. since it's theoretically possible to get called multiple times, we only proceed if we haven't already paused the timers and saved the visibility states of the existing ads. to pause the timers, all we need to do is
remove the ads from the set of visible ads (visibleads) and mark them as inactive. to do so, we begin by saving the set of visible ads into a variable known as previouslyvisibleads to be sure we can restore them when the user tabs back into the document, and we then empty the visibleads set so they won't be treated as visible. then, for each of the ads that are being suspended, we call our updateadtimer...
...ow it has just transitioned from the obscured state to the visible state. if it's become at least 75% visible, then we consider the ad visible and we start the timer by setting the ad's dataset.lastviewstarted attribute to the transition time in entry.time, then add the ad to the set visibleads so we know to process it as time goes by. if the ad has transitioned to the not-intersecting state, we
remove the ad from the set of visible ads. then we have one special behavior: we look to see if entry.ratio is 0.0; if it is, that means the element has become totally obscured. if that's the case, and the ad has been visible for at least a minute total, we call a function we'll create called replacead() to replace the existing ad with a new one. this way, the user sees a variety of ads over time, but t...
LocalFileSystem - Web APIs
ts) to speed up performance, while creating persistent storage for unique data—such as drafts of emails that were composed while offline—that should not be lost before they are backed up into the cloud. using persistent storage the requestfilesystem() method lets you ask for persistent or temporary storage. persistent storage is storage that stays in the browser unless the app or the user
removes it, but the user must grant you permission before you can use it. in contrast, temporary storage is automatically granted without any user permission, but it can be expunged by the browser at any time. to use persistent storage with the file system api, chrome exposes a requestquota api. so to request storage, you need to do something like the following: var requestedbytes = 1024*1024*10; // ...
... persistent 1 storage that stays in the browser unless the user or the app expunges it. the user must grant permission before the app can use this type of storage. methods requestfilesystem() requests a file system where data should be stored. you access a sandboxed file system by requesting a localfilesystem object using this global m...
LocalMediaStream - Web APIs
warning: this interface is no longer available in any mainstream browser. do not use localmediastream; you need to update any code that does use it as soon as possible or your content or application will stop working. ...
... ...
MediaDevices - Web APIs
the mediadevices interface provides access to connected media input devices like cameras and microphones, as well as screen sharing. in essence, it lets you obtain access to any hardware source of media data. properties inherits properties from its parent interface, eventtarget. events devicechange fired when a media input or output device is attached to or
removed from the user's computer. also available via the ondevicechange property. methods inherits methods from its parent interface, eventtarget. enumeratedevices() obtains an array of information about the media input and output devices available on the system. getsupportedconstraints() returns an object conforming to mediatracksupportedconstraints indicating which constrainable properties are supported on the mediastreamt...
...lector('video'); var constraints = window.constraints = { audio: false, video: true }; var errorelement = document.queryselector('#errormsg'); navigator.mediadevices.getusermedia(constraints) .then(function(stream) { var videotracks = stream.getvideotracks(); console.log('got stream with constraints:', constraints); console.log('using video device: ' + videotracks[0].label); stream.on
removetrack = function() { console.log('stream ended'); }; window.stream = stream; // make variable available to browser console video.srcobject = stream; }) .catch(function(error) { if (error.name === 'constraintnotsatisfiederror') { errormsg('the resolution ' + constraints.video.width.exact + 'x' + constraints.video.height.exact + ' px is not supported by your device.'); } el...
MediaStreamTrackEvent - Web APIs
these events are sent to the stream when these changes occur. ...
... track read only a mediastreamtrack object representing the track which was added to the stream. constructor mediastreamtrackevent() constructs a new mediastreamtrackevent with the specified configuration. methods also inherits methods from its parent event. specifications specification status ...
Metadata.modificationTime - Web APIs
dificationtime; value a date timestamp indicating when the file system entry was last changed. example this example tries to get a particular working file at tmp/workfile.json. once that file has been found, its metadata is obtained and the file's modification timestamp year is compared to the current year. ...
...mestamp year is compared to the current year. if it was last modified in a year at least five prior to the current year, the file is
removed and a new one is created. workingdirectory.getfile("tmp/workfile.json", { create: true }, function(fileentry) { fileentry.getmetadata(function(metadata) { if ((new date().getfullyear() - metadata.modificationtime.getfullyear()) >= 5) { fileentry.
remove(function() { workingdirectory.getfile("tmp/workfile.json", { create: true }, function(newentry) { fileentry = newentry; }); }); } }); }, handleerror); this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out ...
Microdata DOM API - Web APIs
you can't use them anymore and this document is kept as information only. microdata becomes even more useful when scripts can use it to expose information to the user, for example offering it in a form that can be used by other applications. the document.getitems(typenames) method provides access to the top-level microdata items. it returns a nodelist containing the items with the specified types, or all types if no argument is specified. ...
...rted property indices are as defined for htmlcollection objects. the supported property names consist of the property names of all the elements represented by the collection, in tree order, ignoring later duplicates. the names attribute must return a live read only array object giving the property names of all the elements represented by the collection, listed in tree order, but with duplicates
removed, leaving only the first occurrence of each name. the same object must be returned each time. the nameditem(name) method must return a propertynodelist object representing a live view of the htmlpropertiescollection object, further filtered so that the only nodes in the propertynodelist object are those that have a property name equal to name. the nodes in the propertynodelist object must be sor...
MutationObserver.MutationObserver() - Web APIs
erver configured to watch a node and all of its children for additions and removals of elements to the tree, as well as any changes to attributes on any of the elements in the tree. the callback function function callback(mutationlist, observer) { mutationlist.foreach( (mutation) => { switch(mutation.type) { case 'childlist': /* one or more children have been added to and/or
removed from the tree. (see mutation.addednodes and mutation.
removednodes.) */ break; case 'attributes': /* an attribute value changed on the element in mutation.target. the attribute name is in mutation.attributename, and its previous value is in mutation.oldvalue. */ break; } }); } the callback() function is i...
... it, we specify values of true for both childlist and attributes, so we get the information we want. then the observer is instantiated, specifying the callback() function. we begin observing the dom nodes of interest by calling observe(), specifying the target node and the options object. from this point until disconnect() is called, callback() will be called each time an element is added to or
removed from the dom tree rooted at targetnode, or any of those elements' attributes are changed. specifications specification status comment domthe definition of 'mutationobserver()' in that specification. living standard ...
MutationObserver - Web APIs
nobserver which will invoke a specified callback function when dom changes occur. methods disconnect() stops the mutationobserver instance from receiving further notifications until and unless observe() is called again. observe() configures the mutationobserver to begin receiving notifications through its callback function when dom changes matching the given options occur. takerecords()
removes all pending notifications from the mutationobserver's notification queue and returns them in a new array of mutationrecord objects. mutation observer & customize resize event listener & demo https://codepen.io/webgeeker/full/yjrzgg/ example the following example was adapted from this blog post. // select the node that will be observed for mutations const targetnode = document.getelementbyi...
... (which mutations to observe) const config = { attributes: true, childlist: true, subtree: true }; // callback function to execute when mutations are observed const callback = function(mutationslist, observer) { // use traditional 'for loops' for ie 11 for(let mutation of mutationslist) { if (mutation.type === 'childlist') { console.log('a child node has been added or
removed.'); } else if (mutation.type === 'attributes') { console.log('the ' + mutation.attributename + ' attribute was modified.'); } } }; // create an observer instance linked to the callback function const observer = new mutationobserver(callback); // start observing the target node for configured mutations observer.observe(targetnode, config); // later, you ...
NameList - Web APIs
items can be accessed by a 0-based index. ...
...items can be accessed by a 0-based index. ...
Node.setUserData() - Web APIs
note that such data will not be preserved when imported via node.importnode, as with node.clonenode() and node.renamenode() operations (though node.adoptnode does preserve the information), and equality tests in node.isequalnode() do not consider user data in making the assessment. this method offers the convenience of associating data with specific nodes without needing to alter the structure of a document and in a standard fashion, but it also means that extra steps may need to be taken if one wishes to serialize the information or include the information upon clone, import, or rename operations. ...
...eger (e.g., 1 to indicate a clone operation), the user key, the data on the node, the source node (null if being deleted), the destination node (the newly created node or null if none).if no handler is desired, one must specify null. userdata is the object to associate to userkey on somenode. if null, any previously registered object and userdatahandler associated to userkey on this node will be
removed. example var d = document.implementation.createdocument('', 'test', null); d.documentelement.setuserdata('key', 15, {handle:function (o, k, d, s, ds) {console.log(o+'::'+k+'::'+d+'::'+s+'::'+ds)}}); // 2::key::15::[object element]::[object element] console.log(d.documentelement.getuserdata('key')); // 15 var e = document.importnode(d.documentelement, true); // causes handler to be called cons...
Node.textContent - Web APIs
tcontent. if the node is a cdata section, comment, processing instruction, or text node, textcontent returns the text inside the node, i.e., the node.nodevalue. for other node types, textcontent returns the concatenation of the textcontent of every child node, excluding comments and processing instructions. (this is an empty string if the node has no children.) setting textcontent on a node
removes all of the node's children and replaces them with a single text node with the given string value. differences from innertext don't get confused by the differences between node.textcontent and htmlelement.innertext. although the names seem similar, there are important differences: textcontent gets the content of all elements, including <script> and <style> elements. in contrast, innertext on...
... is aware of styling and won’t return the text of “hidden” elements. moreover, since innertext takes css styles into account, reading the value of innertext triggers a reflow to ensure up-to-date computed styles. (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. it is impossible to insert the nodes again into any other element or into the same element after doing so. differences from innerhtml element.innerhtml returns html, as its name indicates. sometimes people use innerhtml to retrieve or write text inside an element, but textcontent has better performance because it...
RTCIceServer.url - Web APIs
you should instead use the newer urls property, which allows you to optionally specify multiple urls for the server. try to update any existing code to use that property instead. ...
...you should instead use the newer urls property, which allows you to optionally specify multiple urls for the server. try to update any existing code to use that property instead. ...
RTCPeerConnection.addStream() - Web APIs
at other browsers do not have it. ...
...tion instead: // add a track to a stream and the peer connection said stream was added to: stream.addtrack(track); if (pc.addtrack) { pc.addtrack(track, stream); } else { // if you have code listening for negotiationneeded events: settimeout(() => pc.dispatchevent(new event('negotiationneeded'))); } //
remove a track from a stream and the peer connection said stream was added to: stream.
removetrack(track); if (pc.
removetrack) { pc.
removetrack(pc.getsenders().find(sender => sender.track == track)); } else { // if you have code listening for negotiationneeded events: settimeout(() => pc.dispatchevent(new event('negotiationneeded'))); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rt...
Range.compareNode() - Web APIs
obsolete since gecko 1.9 (firefox 3)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be
removed at any time. try to avoid using it. the range.comparenode() returns a constant indicating the position of the node. the possible values are: node_before (0) node starts before the range node_after (1) node ends after the range node_before_and_after (2) node starts before and ends after the range node_inside (3) node starts after and ends before the range, i.e. the node is completely selected by the range. ...
...node() returns a constant indicating the position of the node. the possible values are: node_before (0) node starts before the range node_after (1) node ends after the range node_before_and_after (2) node starts before and ends after the range node_inside (3) node starts after and ends before the range, i.e. the node is completely selected by the range. warning: this method has been
removed from gecko 1.9 (firefox 3) and will not exist in future versions of firefox, which was the only browser implementing it; you should switch to range.compareboundarypoints() as soon as possible. the following function can be used as replacement: function rangecomparenode(range, node) { var noderange = node.ownerdocument.createrange(); try { noderange.selectnode(node); } catch (e) { ...
Range.selectNodeContents() - Web APIs
selected within a range. example range = document.createrange(); referencenode = document.getelementsbytagname("div")[0]; range.selectnodecontents(referencenode); live sample this example lets the user select and deselect a paragraph with buttons. document.createrange(), range.selectnodecontents(), and selection.addrange() are used to select the content. window.getselection() and selection.
removeallranges() are used to deselect it. html <p id="p"><b>use the buttons below</b> to select or deselect the contents of this paragraph.</p> <button id="select-button">select paragraph</button> <button id="deselect-button">deselect paragraph</button> javascript const p = document.getelementbyid('p'); const selectbutton = document.getelementbyid('select-button'); const deselectbutton = document.
...lect paragraph</button> <button id="deselect-button">deselect paragraph</button> javascript const p = document.getelementbyid('p'); const selectbutton = document.getelementbyid('select-button'); const deselectbutton = document.getelementbyid('deselect-button'); selectbutton.addeventlistener('click', e => { // clear any current selection const selection = window.getselection(); selection.
removeallranges(); // select paragraph const range = document.createrange(); range.selectnodecontents(p); selection.addrange(range); }); deselectbutton.addeventlistener('click', e => { const selection = window.getselection(); selection.
removeallranges(); }); result specifications specification status comment domthe definition of 'range.selectnodecontents()' in ...
SVGElement - Web APIs
lso be defined in svg using attributes of the form data-*, where * is the key name for the pair. this works just like html's htmlelement.dataset property and html's data-* global attribute. svgelement.classname read only an svganimatedstring that reflects the value of the class attribute on the given element, or the empty string if class is not present. this attribute is deprecated and may be
removed in a future version of this specification. authors are advised to use element.classlist instead. svgelement.ownersvgelementread only an svgsvgelement referring to the nearest ancestor <svg> element. null if the given element is the outermost <svg> element. svgelement.viewportelementread only the svgelement, which established the current viewport. often, the nearest ancestor <svg> element. ...
... via the onerror property. load fires on an svgelement when it is loaded in the browser. also available via the onload property. resize fired when an svg document is being resized. also available via the onresize property. scroll fired when an svg document view is being shifted along the x and/or y axes. also available via the onscroll property. unload fired when the dom implementation
removes an svg document from a window or frame. also available via the onunload property. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgelement' in that specification. candidate recommendation adds the dataset property. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgelement' in that s...
SVGGraphicsElement: cut event - Web APIs
on through the browserʼs user interface. if the user attempts a cut action on uneditable content, the cut event still fires but the event object contains no data. bubbles yes cancelable yes interface clipboardevent event handler property oncut the eventʼs default action is to copy the current selection (if any) to the system clipboard and
remove it from the document. a handler for this event can modify the clipboard contents by calling setdata(format, data) on the event's clipboardevent.clipboarddata property, and cancelling the default action using event.preventdefault(). note though that cancelling the default action will also prevent the document from being updated. so an event handler which wants to emulate the default action for ...
...dify the clipboard contents by calling setdata(format, data) on the event's clipboardevent.clipboarddata property, and cancelling the default action using event.preventdefault(). note though that cancelling the default action will also prevent the document from being updated. so an event handler which wants to emulate the default action for "cut" while modifying the clipboard must also manually
remove the selection from the document. the handler cannot read the clipboard data. it's possible to construct and dispatch a synthetic cut event, but this will not affect the system clipboard or the document's contents. specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg...
SVGPathElement - Web APIs
properties this interface also inherits properties from its parent, svggeometryelement. svgpathelement.pathlength an svganimatednumber corresponding to the pathlength attribute of the given <path> element. note: in svg 2 this property was moved to the svggeometryelem...
...tand-alone, parentless svgpathsegcurvetoquadraticsmoothabs object. svgpathelement.createsvgpathsegcurvetoquadraticsmoothrel() returns a stand-alone, parentless svgpathsegcurvetoquadraticsmoothrel object. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpathelement' in that specification. candidate recommendation
removed the getpathsegatlength() and createsvgpathseg* methods and moved the pathlength property and the gettotallength() and getpointatlength() methods to svggeometryelement. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement' in that specification. recommendation initial definition ...
SVGStyleElement - Web APIs
properties this interface also inherits properties from its parent interface, svgelement and implements properties from linkstyle. svgstyleelement.type a domstring corresponding to the type attribute of the given element. svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a read-only attribute. this restriction was
removed in svg 2. svgstyleelement.media a domstring corresponding to the media attribute of the given element. svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a read-only attribute. this restriction was
removed in svg 2. svgstyleelement.title a domstring corresponding to the title attribute of the given element. svg 1.1 d...
... methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement and implements methods from linkstyle. ...
Selection.deleteFromDocument() - Web APIs
the deletefromdocument() method of the selection interface deletes the selected text from the document's dom. syntax sel.deletefromdocument() parameters none. example this example lets you delete selected text by clicking a button. upon clicking the button, the window.getselection() method gets the selected text, and the deletefromdocument() method
removes it. ...
...ace deletes the selected text from the document's dom. syntax sel.deletefromdocument() parameters none. example this example lets you delete selected text by clicking a button. upon clicking the button, the window.getselection() method gets the selected text, and the deletefromdocument() method
removes it. html <p>try highlighting some of the text in this paragraph. ...
SourceBuffer.mode - Web APIs
e to segments when the initial value is sequence, an exception will be thrown. the existing segment order must be maintained in sequence mode. you can, however, change the value from segments to sequence. it just means the play order will be fixed, and new timestamps generated to reflect this. this property cannot be changed during while the sourcebuffer is processing either an appendbuffer() or
remove() call. syntax var mymode = sourcebuffer.mode; sourcebuffer.mode = 'sequence'; value a domstring. exceptions the following exceptions may be thrown when setting a new value for this property. exception explanation invalidaccesserror an attempt was made to set the value to segments when the initial value is sequence. invalidstateerror the sourcebuff...
...this property. exception explanation invalidaccesserror an attempt was made to set the value to segments when the initial value is sequence. invalidstateerror the sourcebuffer object is being updated (i.e. its sourcebuffer.updating property is currently true), the last media segment appended to this sourcebuffer is incomplete, or this sourcebuffer has been
removed from the mediasource. example this snippet sets the sourcebuffer mode to 'sequence' if it is currently set to 'segments', thus setting the play order to the sequence in which media segments are appended. var curmode = sourcebuffer.mode; if (curmode == 'segments') { sourcebuffer.mode = 'sequence'; } specifications specification status comment media source exte...
SpeechSynthesis.cancel() - Web APIs
the cancel() method of the speechsynthesis interface
removes all utterances from the utterance queue. if an utterance is currently being spoken, speaking will stop immediately. syntax speechsynthesisinstance.cancel(); returns void. parameters none. ...
... draft ...
Storage API - Web APIs
ge hasn't yet reached its quota. origin 2 has no data stored in it yet; it's just an empty box waiting for content. this origin, however, has a lower quota than the other two do. it may be a less-visited site, or one known to have lower data storage requirements. origin 3's storage unit is completely full; it's reached its quota and can't store any more data without some existing material being
removed. user agents are likely to use various techniques to determine the quota for various origins. one of the most likely methods—one which the specification specifically encourages, in fact—would be to consider the popularity and/or usage levels of individual sites to determine what their quotas should be. it's also conceivable that the browser might offer a user interface to customize these ...
...leared rather than providing some means of clearing only data from individual apis. if a box is marked as "persistent", the contents won't be cleared by the user agent without either the data's origin itself or the user specifically doing so. this includes scenarios such as the user selecting a "clear caches" or "clear recent history" option. the user will be asked specifically for permission to
remove persistent site storage units. quotas and usage estimates the user agent determines, using whatever mechanism it chooses, the maximum amount of storage a given site can use. this maximum is the origin's quota. the amount of this space which is in use by the site is called its usage. both of these values are estimates; there are several reasons why they're not precise: user agents are encoura...
SubtleCrypto.deriveBits() - Web APIs
.derivebits( { name: "ecdh", namedcurve: "p-384", public: publickey }, privatekey, 128 ); const buffer = new uint8array(sharedsecret, 0, 5); const sharedsecretvalue = document.queryselector(".ecdh .derived-bits-value"); sharedsecretvalue.classlist.add("fade-in"); sharedsecretvalue.addeventlistener("animationend", () => { sharedsecretvalue.classlist.
remove("fade-in"); }); sharedsecretvalue.textcontent = `${buffer}...[${sharedsecret.bytelength} bytes total]`; } // generate 2 ecdh key pairs: one for alice and one for bob // in more normal usage, they would generate their key pairs // separately and exchange public keys securely const generatealiceskeypair = window.crypto.subtle.generatekey( { name: "ecdh", namedcurve: "p-384" }, fa...
... "name": "pbkdf2", salt: salt, "iterations": 100000, "hash": "sha-256" }, keymaterial, 256 ); const buffer = new uint8array(derivedbits, 0, 5); const derivedbitsvalue = document.queryselector(".pbkdf2 .derived-bits-value"); derivedbitsvalue.classlist.add("fade-in"); derivedbitsvalue.addeventlistener("animationend", () => { derivedbitsvalue.classlist.
remove("fade-in"); }); derivedbitsvalue.textcontent = `${buffer}...[${derivedbits.bytelength} bytes total]`; } const derivebitsbutton = document.queryselector(".pbkdf2 .derive-bits-button"); derivebitsbutton.addeventlistener("click", () => { getderivedbits(); }); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.derivebits()'...
TouchEvent - Web APIs
.0 touch event types there are several types of event that can be fired to indicate that touch-related changes have occurred. you can determine which of these has happened by looking at the event's touchevent.type property. touchstart sent when the user places a touch point on the touch surface. the event's target will be the element in which the touch occurred. touchend sent when the user
removes a touch point from the surface (that is, when they lift a finger or stylus from the surface). this is also sent if the touch point moves off the edge of the surface; for example, if the user's finger slides off the edge of the screen. the event's target is the same element that received the touchstart event corresponding to the touch point, even if the touch point has moved outside that element...
..., when they lift a finger or stylus from the surface). this is also sent if the touch point moves off the edge of the surface; for example, if the user's finger slides off the edge of the screen. the event's target is the same element that received the touchstart event corresponding to the touch point, even if the touch point has moved outside that element. the touch point (or points) that were
removed from the surface can be found in the touchlist specified by the changedtouches attribute. touchmove sent when the user moves a touch point along the surface. the event's target is the same element that received the touchstart event corresponding to the touch point, even if the touch point has moved outside that element. this event is also sent if the values of the radius, rotation angle, or f...
User Timing API - Web APIs
ance entries in the performance timeline with the specified name and entrytype, thus set entrytype to "mark" to get all marks (and set name accordingly to retrieve more specific entries). performance.getentriesbytype(entrytype) returns all performance entries in the performance timeline with the specified entrytype, thus set entrytype to "mark" to get all marks. removing performance marks to
remove a specific mark from the performance timeline, call performance.clearmarks(name) where name is the name of the mark(s) you want
removed. if this method is called with no arguments, all mark type entries will be
removed from the performance timeline. performance measures measure events are also named by the application but they are placed between two marks thus they are effectively a midpoint be...
... the performance timeline with the specified name and entrytype, thus set entrytype to "measure" to get all measures (and set name accordingly to retrieve more specific entries). performance.getentriesbytype(entrytype) returns all performance entries in the performance timeline with the specified entrytype, thus set entrytype to "measure" to get all measures. removing performance measures to
remove a specific measure from the performance timeline, call performance.clearmeasures(name) where name is the name of the measure(s) you want
removed. if this method is called with no arguments, all measure type entries will be
removed from the performance timeline. interoperability as shown in the performance interface's browser compatibility table, the user timing methods are broadly implemented b...
Simple color animation - Web APIs
e]</strong> the animation </button> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : inline-block; font-size : inherit; margin : auto; padding : 0.6em; } window.addeventlistener("load", function setupanimation (evt) { "use strict" window.
removeeventlistener(evt.type, setupanimation, false); // a variable to hold a timer that drives the animation. var timer; // click event handlers. var button = document.queryselector("#animation-onoff"); var verb = document.queryselector("strong"); function startanimation(evt) { button.
removeeventlistener(evt.type, startanimation, false); button.addeventlistener("click", stopanimat...
...veeventlistener(evt.type, startanimation, false); button.addeventlistener("click", stopanimation, false); verb.innerhtml="stop"; // setup animation loop by redrawing every second. timer = setinterval(drawanimation, 1000); // give immediate feedback to user after clicking, by // drawing one animation frame. drawanimation(); } function stopanimation(evt) { button.
removeeventlistener(evt.type, stopanimation, false); button.addeventlistener("click", startanimation, false); verb.innerhtml="start"; // stop animation by clearing the timer. clearinterval(timer); } // call stopanimation() once to setup the initial event // handlers for canvas and button. stopanimation({type: "click"}); var gl; function drawanimation () { if (!gl) { ...
Advanced techniques: Creating and sequencing audio - Web APIs
w.settimeout(scheduler, lookahead); } we also need a draw function to update the ui, so we can see when the beat progresses. let lastnotedrawn = 3; function draw() { let drawnote = lastnotedrawn; let currenttime = audioctx.currenttime; while (notesinqueue.length && notesinqueue[0].time < currenttime) { drawnote = notesinqueue[0].note; notesinqueue.splice(0,1); //
remove note from queue } // we only need to draw if the note has moved. if (lastnotedrawn != drawnote) { pads.foreach(function(el, i) { el.children[lastnotedrawn].style.bordercolor = 'hsla(0, 0%, 10%, 1)'; el.children[drawnote].style.bordercolor = 'hsla(49, 99%, 50%, 1)'; }); lastnotedrawn = drawnote; } // set up to draw again req...
...en that disappears when the file has been fetched and decoded, then we can allow the scheduler to start using the play button click event. ...
Web Storage API - Web APIs
a different storage object is used for the sessionstorage and localstorage for each origin — they function and are controlled separately. note: from firefox 45 onwards, when the browser crashes/restarts, the amount of data saved per origin is limited to 10mb. this has been done to avoid memory issues caused by excessive usage of web storage. note: access to web storage from third-party i...
...e: access to web storage from third-party iframes is denied if the user has disabled third-party cookies (firefox implements this behaviour from version 43 onwards.) note: web storage is not the same as mozstorage (mozilla's xpcom interfaces to sqlite) or the session store api (an xpcom storage utility for use by extensions). web storage interfaces storage allows you to set, retrieve and
remove data for a specific domain and storage type (session or local.) window the web storage api extends the window object with two new properties — window.sessionstorage and window.localstorage — which provide access to the current domain's session and local storage objects respectively, and a window.onstorage event handler that fires when a storage area changes (e.g. a new item is stored.) sto...
Window.event - Web APIs
to change preferences in firefox, visit about:config.ie full support 4opera full support 7safari full ...
...to change preferences in firefox, visit about:config.opera android full support 10.1safari ios full support 1samsung i...
Window - Web APIs
instead. window.mozpaintcount returns the number of times the current document has been rendered to the screen in this window. this can be used to compute rendering performance. window.orientation read only returns the orientation in degrees (in 90 degree increments) of the viewport relative to the device's natural orientation. window.pkcs11 formerly provided access to install and
remove pkcs11 modules. window.returnvalue the return value to be returned to the function that called window.showmodaldialog() to display the window as a modal dialog. methods this interface inherits methods from the eventtarget interface and implements methods from windoworworkerglobalscope and eventtarget. window.alert() displays an alert dialog. window.blur() sets focus away from the win...
...rglobalscope.settimeout(). windoworworkerglobalscope.createimagebitmap() accepts a variety of different image sources, and returns a promise which resolves to an imagebitmap. optionally the source is cropped to the rectangle of pixels originating at (sx, sy) with width sw, and height sh. windoworworkerglobalscope.fetch() starts the process of fetching a resource from the network. eventtarget.
removeeventlistener
removes an event listener from the window. windoworworkerglobalscope.setinterval() schedules a function to execute every time a given number of milliseconds elapses. windoworworkerglobalscope.settimeout() schedules a function to execute in a given amount of time. deprecated methods window.back() moves back one in the window history. this method is deprecated; you shoul...
WindowOrWorkerGlobalScope.setInterval() - Web APIs
this method is defined by the windoworworkerglobalscope mixin. ...
...&& scroll(asheets[nidx], 0, true) && nidx++ === asheets.length - 1) { clean(); return; } ocurrent.nodevalue += spart.charat(0); spart = spart.slice(1); } function sheet (onode) { this.ref = onode; if (!onode.haschildnodes()) { return; } this.parts = array.prototype.slice.call(onode.childnodes); for (var nchild = 0; nchild < this.parts.length; nchild++) { onode.
removechild(this.parts[nchild]); this.parts[nchild] = new sheet(this.parts[nchild]); } } var nintervid, ocurrent = null, btyping = false, bstart = true, nidx = 0, spart = "", asheets = [], amap = []; this.rate = nrate || 100; this.play = function () { if (btyping) { return; } if (bstart) { var aitems = document.queryselectorall(sselector); if (aitems.len...
XSLTProcessor - Web APIs
ets a parameter in the xslt stylesheet that was imported. (sets the value of an <xsl:param>.) a null value for namespaceuri is treated the same as an empty string. [throws] any xsltprocessor.getparameter(string namespaceuri, string localname) gets the value of a parameter from the xslt stylesheet. a null value for namespaceuri is treated the same as an empty string. [throws] void xsltprocessor.
removeparameter(string namespaceuri, string localname)
removes the parameter if it was previously set. this will make the xsltprocessor use the default value for the parameter as specified in the stylesheet. a null value for namespaceuri is treated the same as an empty string. void xsltprocessor.clearparameters()
removes all set parameters from the xsltprocessor. the xsltprocessor will then use the d...
... if it was previously set. this will make the xsltprocessor use the default value for the parameter as specified in the stylesheet. a null value for namespaceuri is treated the same as an empty string. void xsltprocessor.clearparameters()
removes all set parameters from the xsltprocessor. the xsltprocessor will then use the defaults specified in the xslt stylesheet. void xsltprocessor.reset()
removes all parameters and stylesheets from the xsltprocessor. properties non-web-exposed properties the following properties are [chromeonly] and not exposed to web content: [chromeonly] attribute unsigned long xsltprocessor.flags flags that tweak the behavior of the processor. not reset by calling xsltprocessor.reset(). default value: 0 possible values are: name value ...
ARIA live regions - Accessibility
h aria-atomic="true", the screenreader announces "the set year is: changedvalue" advanced use case: roster a chat site would like to display a list of users currently logged in. display a list of users where a user's log-in and log-out status will be reflected dynamically (without a page reload). ...
...> <!-- use javascript to add
remove users here--> </ul> breakdown of aria live properties: aria-live="polite" indicates that the screen reader should wait until the user is idle before presenting updates to the user. this is the most commonly used value, as interrupting the user with "assertive" might interrupt their flow. aria-atomic is not set (false by default) so that only the added or
removed users should be spoken and not the entire roster each time. aria-relevant="additions removals" ensures that both users added or
removed to the roster will be spoken. ...
ARIA: feed role - Accessibility
a feed enables screen readers to use the browse mode reading cursor to both read and scroll through a stream of rich content that may continue scrolling infinitely by loading more content as the user reads. <section role="feed" aria-busy="false"> ... <article aria-posinset="427" aria-setsize="-1">...</article> <article aria-posinset="428" aria-setsize="-1">...</article> <article aria-posinset="429" aria-setsize="-1">...</article> ... ...
...ia roles, states, and properties aria-labelled if the feed has no visible title, the feed element has a label specified with aria-label. if it does, see aria-labelledby. aria-labelledby if the feed has a visible title, the feed element has aria-labelledby referring to the element containing the title. if not, add an aria-label. aria-busy when busy, such as when articles are being added or
removed from the feed, set aria-busy="true" during the update operation. make sure it's reset to false when the operation is complete or the changes may not become visible. article each section of content in a feed should be contained in an <article> or element with role article. each article should have an aria-labelledby referring to the article title or other child that can serve as a distinguishin...
WAI-ARIA Roles - Accessibility
a feed enables screen readers to use the browse mode reading cursor to both read and scroll through a stream of rich content that may continue scrolling infinitely by loading more content as the user reads.aria: figure rolethe aria figure role can be used to identify a figure inside page content where appropriate semantics do not already exist. a ...
...to assistive technologies that an element is a numerical counter the amount of elapsed time from a starting point or the remaining time until an end point. please claim the role you want to work on by adding your name after the role's name: (old pages are linked from https://developer.mozilla.org/docs/web/accessibility/aria/aria_techniques). ones for which the first draft is completed have been
removed from the below list. alertdialog banner combobox command columnheader (estelle) complementary composite definition directory feed gridcell (eric e) group input landmark link - old page listbox log - old page marquee math menu menubar menuitem menuitemcheckbox menuitemradio none note option presentation progressbar - old page radio - old page radiogroup range ...
An overview of accessible web applications and widgets - Accessibility
te that there is no custom classname used, only the status of the aria-hidden attribute on line 1. example 2b. attribute-based selector for indicating state div.tooltip[aria-hidden="true"] { display: none; } the javascript to update the aria-hidden property has the form shown in example 2c. ...
... for example, consider an "inline edit" widget: a component that allows users to edit a piece of text in place, without switching contexts. ...
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
ns of this event causes assistive technology crashes] event_object_show [can be important, depending on project] event_object_hide [can be important, depending on project] event_object_reorder [important for mutating docs] event_object_focus [important] event_object_selection [important] event_object_selectionadd [important for multiple selection] event_object_selection
remove [important for multiple selection] event_object_selectionwithin [important for multiple selection] event_object_statechange [important for checkboxes and radio buttons] event_object_locationchange event_object_namechange event_object_descriptionchange event_object_valuechange [important for sliders and progress meters] event_object_parentchange event_object_helpcha...
...ossible to know if and when the 3rd party assistive technology will use one of these signals to release the objects of yours that is is refcounting. this can lead to crashes where it releases something and the wrong time, when some of your dll's are unloaded but not others, and a destructor is called in an unloaded dll. solution: create a "shutdown" method for each internal accessible object, to
remove any references to other internal objects before any of your dll's are unloaded. in order to do this effectively, you will have to keep track of every accessible object that you create. the shutdown method for an accessibility object should be called whenever the document or ui object it refers to goes away. the easiest way to do that is to keep a pointer to an accessible in each internal ui objec...
Keyboard-navigable JavaScript widgets - Accessibility
keyboards. authors can also make a <div> or <span> keyboard accessible by adding a tabindex of 0. this is particularly useful for components that use interactive elements that do not exist in html. grouping controls for grouping widgets such as menus, tablists, grids, or tree views, the parent element should be in the tab order (tabindex="0"), and each descendent choice/tab/cell/row should be
removed from the tab order (tabindex="-1"). users should be able to navigate the descendent elements using arrow keys. (for a full description of the keyboard support that is normally expected for typical widgets, see the wai-aria authoring practices.) the example below shows this technique used with a nested menu control. once keyboard focus lands on the containing <ul> element, the javascript develop...
...note that disabled items within a grouped widget (such as menu items in a menu) should remain navigable using arrow keys. managing focus inside groups when a user tabs away from a widget and returns, focus should return to the specific element that had focus, for example, the tree item or grid cell. there are two techniques for accomplishing this:...
prefers-reduced-motion - CSS: Cascading Style Sheets
bottom of this page has a scaling movement that may be problematic for some readers. readers with vestibular motion disorders may wish to enable the reduce motion feature on their device before viewing the animation. syntax no-preference indicates that the user has made no preference known to the system. reduce indicates that user has notified the system that they prefer an interface that
removes or replaces the types of motion-based animation that trigger discomfort for those with vestibular motion disorders. user preferences for firefox, the reduce request is honoured if: in gtk/gnome: gnome tweaks > general tab (or appearance, depending on version) > animations is turned off. alternatively, add gtk-enable-animations = false to the [settings] block of the gtk 3 configuratio...
... in windows 10: settings > ease of access > display > show animations in windows. in windows 7: control panel > ease of access > make the computer easier to see > turn off all unnecessary animations (when possible). in macos: system preferences > accessibility > display > reduce motion. in ios: settings > general > accessibility > reduce motion. in android 9+: settings > accessibility >
remove animations. in firefox about:config: add a number preference called ui.prefersreducedmotion and set its value to 1. changes to this preference take effect immediately. examples this example has a scaling animation by default. if reduce motion is enabled in your accessibility preferences, the animation is toned down to a simple dissolve without vestibular motion triggers. html <div class="an...
Border-radius generator - CSS: Cascading Style Sheets
t_value = 0; slider.addeventlistener("click", function(e) { setvalue(obj.topic, obj.value + obj.step * sign); }); slider.addeventlistener("mousedown", function(e) { startx = e.clientx; start_value = obj.value; document.body.style.cursor = "e-resize"; document.addeventlistener("mousemove", slidermotion); }); document.addeventlistener("mouseup", function(e) { document.
removeeventlistener("mousemove", slidermotion); document.body.style.cursor = "auto"; slider.style.cursor = "pointer"; }); var slidermotion = function slidermotion(e) { slider.style.cursor = "e-resize"; var delta = (e.clientx - startx) / obj.sensivity | 0; var value = delta * obj.step + start_value; setvalue(obj.topic, value); } return slider; } var inputslider = function(n...
... document.addeventlistener('mouseup', dragend, false); } var dragstart = function dragstart(e) { if (e.button !== 0) return; active = true; lastx = e.clientx; lasty = e.clienty; document.addeventlistener('mousemove', mousedrag, false); } var dragend = function dragend(e) { if (e.button !== 0) return; if (active === true) { active = false; document.
removeeventlistener('mousemove', mousedrag, false); } } var mousedrag = function mousedrag(e) { notify(e.clientx - lastx, e.clienty - lasty); lastx = e.clientx; lasty = e.clienty; } var subscribe = function subscribe(callback) { subscribers.push(callback); } var unsubscribe = function unsubscribe(callback) { var index = subscribers.indexof(callback); subscribers.splic...
Using feature queries - CSS: Cascading Style Sheets
der browsers using floats. we can start by creating that floated layout with the following code, which gives us three columns. when browsers don't understand a css property or value, they ignore it. so we could start enhancing our layout by using css grid. browsers that do not support grid will ignore the grid value of the display property. once a floated item becomes a grid item, the float is
removed — something you can read more about in supporting older browsers. therefore the grid version should just overwrite the floated one. we have a problem however, caused by the width property we used on our floated items to make them display as three columns. this is now interpreted by grid as being the width of the column track, not the width of the container as it is for the float. what we n...
...you can read more about in supporting older browsers. therefore the grid version should just overwrite the floated one. we have a problem however, caused by the width property we used on our floated items to make them display as three columns. this is now interpreted by grid as being the width of the column track, not the width of the container as it is for the float. what we need is a way to
remove the width if display: grid is supported. this is exactly the situation feature queries solve. we can set the width back to auto if grid is supported. in the above scenario, it doesn't matter that ie11 doesn't support feature queries or css grid — it would get the floated version anyway, which is then overwritten by browsers that do support grid. an alternate way to write the above code is t...
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
hat the item is taking the area from grid column line 2 to 4, and starting after line 1. then it is offset in that area using the top and left properties. however, it has been taken out of flow as is usual for absolutely positioned items and so the auto-placement rules now place items into the same space. the item also doesn’t cause the additional row to be created to span to row line 3. if we
remove position: absolute from the rules for .box3 you can see how it would display without the positioning. a grid container as parent if the absolutely positioned child has a grid container as a parent but that container does not create a new positioning context, then it is taken out of flow as in the previous example. the positioning context will be whatever element creates a positioning context as...
...e how it would display without the positioning. a grid container as parent if the absolutely positioned child has a grid container as a parent but that container does not create a new positioning context, then it is taken out of flow as in the previous example. the positioning context will be whatever element creates a positioning context as is common to other layout methods. in our case, if we
remove position: relative from the wrapper above, positioning context is from the viewport, as shown in this image. once again the item no longer participates in the grid layout in terms of sizing or when other items are auto-placed. with a grid area as the parent if the absolutely positioned item is nested inside a grid area then you can create a positioning context on that area. in the below exam...
Subgrid - CSS: Cascading Style Sheets
s being created to hold those items. take a look at the next example — it uses the same parent and child grid as in the example above, however inside the subgrid i have twelve items trying to autoplace into ten grid cells. as the subgrid is on both dimensions there is nowhere for the extra two items to go and so they go into the last track of the grid, as defined in the specification. if we
remove the grid-template-rows value we enable regular creation of implicit tracks and, although these won't line up with the tracks of the parent, as many as are required will be created. the gap properties and subgrid if you have a gap, column-gap, or row-gap specified on the parent, this will be passed into the subgrid, so it will have the same spacing between tracks as the parent. in some situati...
... a track sizing method is used that allows content to affect the size. in such a case, auto-sized row tracks for example will grow to fit content in the main grid and content in the subgrid. as the subgrid value acts in much the same way as a regular nested grid, it is easy to switch between the two. for example, if you realise that you need an implicit grid for rows, all you would need to do is
remove the subgrid value of grid-template-rows and perhaps give a value for grid-auto-rows to control the implicit track sizing. specification specification status comment css grid layout module level 2 working draft initial definition of subgrids. see also on the mozilla developer youtube channel, see the videos laying out forms using subgrid and don't wait...
Testing media queries programmatically - CSS: Cascading Style Sheets
stener setup, passing an event object of type mediaquerylistevent as the argument to the callback function. ...
...bject also includes the media and matches properties, so you can query these features of the mediaquerylist by directly accessing it, or accessing the event object. ...
animation - CSS: Cascading Style Sheets
lidein; } .a3 { animation: 3s slidein; } .animation { background: #3f87a6; width: 100%; height: calc(100% - 1.5em); transform-origin: left center; } window.addeventlistener('load', function () { var animation = array.from(document.queryselectorall('.animation')); var button = array.from(document.queryselectorall('button')); function togglebutton (btn, type) { btn.classlist.
remove('play', 'pause', 'restart'); btn.classlist.add(type); btn.title = type.touppercase(type); } function playpause (i) { var btn = button[i]; var anim = animation[i]; if (btn.classlist.contains('play')) { anim.style.animationplaystate = 'running'; togglebutton(btn, 'pause'); } else if (btn.classlist.contains('pause')) { anim.style.animationplaystate = ...
...'play' : 'pause'); anim.style.animationplaystate = ''; anim.classlist.add('a' + (i + 1)); }, 100) } } animation.foreach(function (node, index) { node.addeventlistener('animationstart', function () { togglebutton(button[index], 'pause'); }); node.addeventlistener('animationen...
<display-box> - CSS: Cascading Style Sheets
selves. they are replaced by their pseudo-box and their child boxes. please note that the css display level 3 spec defines how the contents value should affect "unusual elements" — elements that aren’t rendered purely by css box concepts such as replaced elements. see appendix b: effects of display: contents on unusual elements for more details. due to a bug in browsers this will currently
remove the element from the accessibility tree — screen readers will not look at what's inside. see the accessibility concerns section below for more details. none turns off the display of an element so that it has no effect on layout (the document is rendered as though the element did not exist). all descendant elements also have their display turned off. to have an element take up the space that ...
...e display of an element so that it has no effect on layout (the document is rendered as though the element did not exist). all descendant elements also have their display turned off. to have an element take up the space that it would normally take, but without actually rendering anything, use the visibility property instead. accessibility concerns current implementations in most browsers will
remove from the accessibility tree any element with a display value of contents. this will cause the element — and in some browser versions, its descendant elements — to no longer be announced by screen reading technology. this is incorrect behavior according to the csswg specification. more accessible markup with display: contents | hidde de vries display: contents is not a css reset | adrian r...
min-width - CSS: Cascading Style Sheets
l support 12notes full support 12notes notes edge uses auto as the initial value for min-width.firefox full support 34 full support 34 no support 16 — 22notes notes firefox 18 and later (until the value was
removed), used auto as the initial value for min-width.ie no support noopera full support 12.1notes full support 12.1notes notes opera uses auto as the initial value for min-width.safari no support nowebview android ...
... 25notes full support 25notes notes chrome uses auto as the initial value for min-width.firefox android full support 34 full support 34 no support 16 — 22notes notes firefox 18 and later (until the value was
removed), used auto as the initial value for min-width.opera android full support 14notes full support 14notes notes opera uses auto as the initial value for min-width.safari ios no support nosamsung internet android full support ...
position - CSS: Cascading Style Sheets
right, bottom, and left. the offset does not affect the position of any other elements; thus, the space given for the element in the page layout is the same as if position were static. this value creates a new stacking context when the value of z-index is not auto. its effect on table-*-group, table-row, table-column, table-cell, and table-caption elements is undefined. absolute the element is
removed from the normal document flow, and no space is created for the element in the page layout. it is positioned relative to its closest positioned ancestor, if any; otherwise, it is placed relative to the initial containing block. its final position is determined by the values of top, right, bottom, and left. this value creates a new stacking context when the value of z-index is not auto. the margi...
...it is positioned relative to its closest positioned ancestor, if any; otherwise, it is placed relative to the initial containing block. its final position is determined by the values of top, right, bottom, and left. this value creates a new stacking context when the value of z-index is not auto. the margins of absolutely positioned boxes do not collapse with other margins. fixed the element is
removed from the normal document flow, and no space is created for the element in the page layout. it is positioned relative to the initial containing block established by the viewport, except when one of its ancestors has a transform, perspective, or filter property set to something other than none (see the css transforms spec), in which case that ancestor behaves as the containing block. (note that th...
text-overflow - CSS: Cascading Style Sheets
css value direction: ltr direction: rtl expected result live result expected result live result visible overflow 1234567890 1234567890 0987654321 1234567890 text-overflow: clip 1234567890 1234...
... ...
will-change - CSS: Cascading Style Sheets
-change to too many elements. the browser already tries as hard as it can to optimize everything. some of the stronger optimizations that are likely to be tied to will-change end up using a lot of a machine’s resources, and when overused like this can cause the page to slow down or consume a lot of resources. use sparingly. the normal behavior for optimizations that the browser make is to
remove the optimizations as soon as it can and revert back to normal. but adding will-change directly in a stylesheet implies that the targeted elements are always a few moments away from changing and the browser will keep the optimizations for much longer time than it would have otherwise. so it is a good practice to switch will-change on and off using script code before and after the change occurs. ...
...e-feature> = scroll-position | contents | <custom-ident> examples via script this is an example showing how to apply the will-change property through scripting, which is probably what you should be doing in most cases. var el = document.getelementbyid('element'); // set will-change when the element is hovered el.addeventlistener('mouseenter', hintbrowser); el.addeventlistener('animationend',
removehint); function hintbrowser() { // the optimizable properties that are going to change // in the animation's keyframes block this.style.willchange = 'transform, opacity'; } function
removehint() { this.style.willchange = 'auto'; } specifications specification status comment css will change module level 1the definition of 'will-change' in that specification. ...
Content categories - Developer guides
outline. heading content heading content defines the title of a section, whether marked by an explicit sectioning content element, or implicitly defined by the heading content itself. elements belonging to this category are <h1>, <h2>, <h3>, <h4>, <h5>, <h6> and <hgroup>. though likely to contain heading content, the <header> is not heading content itself. note: the <hgroup> element was
removed from the w3c html specification prior to html 5 being finalized, but is still part of the whatwg specification and is at least partially supported by most browsers. phrasing content phrasing content defines the text and the mark-up it contains. runs of phrasing content make up paragraphs. elements belonging to this category are <abbr>, <audio>, <b>, <bdo>, <br>, <button>, <canvas>, <cite>, <...
.... instead, they serve to support scripts, either by containing or specifying script code directly, or by specifying data that will be used by scripts. the script-supporting elements are: <script> <template> transparent content model if an element has a transparent content model, then its contents must be structured such that they would be valid html 5, even if the transparent element were
removed and replaced by the child elements. for example, the <del> and <ins> elements are transparent: <p>we hold these truths to be <del><em>sacred & undeniable</em></del> <ins>self-evident</ins>.</p> if those elements were
removed, this fragment would still be valid html (if not correct english). <p>we hold these truths to be <em>sacred & undeniable</em> self-evident.</p> other content ...
Making content editable - Developer guides
, you can transform your web page into a full and fast rich text editor. this article provides some information about this functionality. note: in firefox 63 beta/dev edition, some of the rich-text editing features have been disabled by default, for better cross-browser compatibility. these are object resizing on <img>, <table>, and absolutely-positioned elements; inline table editing to add or
remove rows and columns; and the grabber that allows moving of absolutely-positioned elements. see bug 1449564 and firefox-specific html editing ui has been deprecated for additional details. how does it work? all you have to do is set the contenteditable attribute on nearly any html element to make it editable. here's a simple example which creates a <div> element whose contents the user can edit. ...
...nes4eeujvigapwyac0csocq7sdlwjkakca6tomywiargqf3mrqviejkksvlibsfewhdrih4fh/dzmice3/c4nbqbads=" /> <img class="intlink" title="redo" onclick="formatdoc('redo');" src="data:image/gif;base64,r0lgodlhfgawamihab1chdljwl9vj1ie34kl8apd+7/i1////yh5baekaacalaaaaaawabyaaankelrc/jdksesyphi7siegsvxzeatdicqbvjjpqwzt9naednbqk1wcqsxlynxmaimhydofaeljasrrvazvrqqqxuy7cgx4tc6bswkaow==" /> <img class="intlink" title="
remove formatting" onclick="formatdoc('
removeformat')" src="data:image/png;base64,ivborw0kggoaaaansuheugaaabyaaaawcayaaadetgw7aaaabgdbtueaalgpc/xhbqaaaazis0deap8a/wd/ol2nkwaaaalwsflzaaaoxaaadsqblssogwaaaad0su1fb9oecqmckpi8ciiaaaaidevydenvbw1lbnqa9sywvwaaauhjrefuomtjybgfxab501zwbvval2nhnlmk6mxcjbf69zu+hz/9fb5o1lx+bg45qhl8/fyr5it3xrp/ywtuvvvk3veqgxz70tvbjy8+wv39+2/hz19/mgwjzzutyjaluobv9jimaxheyd3h7ku8fpj2...
User input and controls - Developer guides
andscape) through the screen orientation api. orientation data can be retrieved through the screen.orientation attribute or through the orientation media feature. when screen.orientation changes, the screen.orientationchange event is fired on the screen object. locking the screen orientation is made possible by invoking the screen.lockorientation method, while the screen.unlockorientation method
removes all the previous screen locks that have been set. note: more information about the screen orientation api can be found in managing screen orientation. fullscreen you might need to present an element of your application (such as a <video>, for example) in fullscreen mode. you can achieve this by calling element.requestfullscreen() on that element. bear in mind that many browsers still implem...
... at a time, allowing the user to draw in a <canvas> with more than one finger at a time. it will only work on a browser that supports touch events. simple pointer lock demo we've written a simple pointer lock demo to show you how to use it to set up a simple control system. the demo uses javascript to draw a ball inside a <canvas> element. when you click the canvas, pointer lock is then used to
remove the mouse pointer and allow you to move the ball directly using the mouse. contenteditable demo this is a working example showing how contenteditable can be used to create an editable document section, the state of which is then saved using localstorage. tutorials touch events guide managing screen orientation using fullscreen mode dragging and dropping multiple items drag operations g...
HTML attribute: multiple - HTML: Hypertext Markup Language
the attribute is not present. when multiple is set on the email input type, the user can inlclude zero (if not also required), one or more comma-separated email addresses. <input type="email" multiple name="emails" id="emails"> if and only if the multiple attribute is specified, the value can be a list of properly-formed comma-separated e-mail addresses. any trailing and leading whitespace is
removed from each address in the list. when multiple is set on the file input type, the user can select one or more files. the user can choose multiple files from the file picker in any way that their chosen platform allows (e.g. by holding down shift or control, and then clicking). <input type="file" multiple name="uploads" id="uploads"> when the attribute is omitted, the user can only select a sing...
...hful</option> <option value="sneezy@woodworkers.com">sneezy</option> <option value="dopey@woodworkers.com">dopey</option> <option value="doc@woodworkers.com">doc</option> </datalist> input:invalid {border: red solid 3px;} if and only if the multiple attribute is specified, the value can be a list of properly-formed comma-separated e-mail addresses. any trailing and leading whitespace is
removed from each address in the list. if the required attribute is present, at least one email address is required. some browsers support the appearance of the list of options from the associated <datalist> for subsequent email addresses when multiple is present. others do not. file input when multiple is set on the file input type, the user can select one or more files: <form method="post" encty...
<input type="search"> - HTML: Hypertext Markup Language
, although it's not mandatory. when submitted, the data name/value pair sent to the server will be q=searchterm. you must remember to set a name for your input, otherwise nothing will be submitted. differences between search and text types the main basic differences come in the way browsers handle them. the first thing to note is that some browsers show a cross icon that can be clicked on to
remove the search term instantly if desired. the following screenshot comes from chrome: in addition, modern browsers also tend to automatically store search terms previously entered across domains, which then come up as autocomplete options when subsequent searches are performed in search inputs on that domain. this helps users who tend to do searches on the same or similar search queries over time.
...search boxes. in many cases, users should just be allowed to search for anything, but there are a few cases to consider, such as searches against data of a known format. note: html form validation is not a substitute for scripts that ensure that the entered data is in the proper format. it's far too easy for someone to make adjustments to the html that allow them to bypass the validation, or to
remove it entirely. it's also possible for someone to simply bypass your html entirely and submit the data directly to your server. if your server-side code fails to validate the data it receives, disaster could strike when improperly-formatted data (or data which is too large, is of the wrong type, and so forth) is entered into your database. a note on styling there are useful pseudo-classes availab...
<input type="url"> - HTML: Hypertext Markup Language
selectiondirection methods select(), setrangetext() and setselectionrange(). value the <input> element's value attribute contains a domstring which is automatically validated as conforming to url syntax. more specifically, there are two possible value formats that will pass validation: an empty string ("") indicating that the user did not enter a value or that the value was
removed. a single properly-formed absolute url. this doesn't necessarily mean the url address exists, but it is at least formatted correctly. in simple terms, this means urlscheme://restofurl. see validation for details on how urls are validated to ensure that they're formatted properly. additional attributes in addition to the attributes that operate on all <input> elements regardless of their typ...
...eet the requirements to be a valid url. but there's also the option to add additional filtering to ensure that your own specialized needs are met, if you have any. important: html form validation is not a substitute for scripts that ensure that the entered data is in the proper format. it's far too easy for someone to make adjustments to the html that allow them to bypass the validation, or to
remove it entirely. it's also possible for someone to simply bypass your html entirely and submit the data directly to your server. if your server-side code fails to validate the data it receives, disaster could strike when improperly-formatted data (or data which is too large, is of the wrong type, and so forth) is entered into your database. basic validation browsers that support the url input type...
<isindex> - HTML: Hypertext Markup Language
summary <isindex> was an obsolete html element that put a text field in a page for querying the document. <isindex> provided a single line text input for entering a query string. when sent, the server would return a list of pages matching the query. its support depended on both the browser and the server to react to the query. <isindex> is
removed html standard. it was deprecated in html 4.01. the same behaviour can be achieved with an html form. all major browsers have now
removed <isindex>. attributes like all other html elements, this element accepted the global attributes. prompt this attribute added its value as a prompt for text field. action this attribute determined the server url to which the query was sent. example <head> <isindex prompt="search document..." action="/...
...pported by steve putz). tim berners-lee explains the purpose of isindex resulting in aggregated search results. kevin replies that he doesn't like the boolean nature of isindex and would prefer a system where everything is searchable and proposes to extend the current www framework with a specific httpd configuration and defined that some uris mapping create search queries. in 2016, after it was
removed from edge and chrome, it was proposed to
remove isindex from the standard; this removal was completed the next day, after which safari and firefox also
removed support. html reference the html standard classifies it as a obsolete and non-conforming feature. isindex element deprecated in html 4.01 isindex in html 3.2 isindex in html 2.0 as well the description of the behavior in queries an...
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
hich can be used to let you know when this state change occurs. 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. default style per the html specification, the default style for <summary> elements includes display: list-item. this makes it possible to change or
remove the icon displayed as the disclosure widget next to the label from the default, which is typically a triangle. you can also change the style to display: block to
remove the disclosure triangle. see the browser compatibility section for details, as not all browsers support full functionality of this element yet. examples below are some examples showing <summary> in use. you can find more examp...
...</li> <li>current invoice: $75.30</li> <li>due date: 5/6/19</li> </ol> </details> this currently has some spacing issues that could be addressed using css. warning: because the <summary> element has a default role of button (which strips all roles from child elements), this example will not work for users of assistive technologies such as screen readers. the <h4> will have its role
removed and thus will not be treated as a heading for these users. html in summaries this example adds some semantics to the <summary> element to indicate the label as important: <details open> <summary><strong>overview</strong></summary> <ol> <li>cash on hand: $500.00</li> <li>current invoice: $75.30</li> <li>due date: 5/6/19</li> </ol> </details> specifications speci...
Link types - HTML: Hypertext Markup Language
bsites create short links to make sharing links via instant messaging easier. <link> ??? sidebar obsolete since gecko 63 indicates that the hyperlink leads to a resource that would be better suited for a secondary browsing context, like a sidebar. browsers, that don't have such a context will ignore this keyword. while once part of the html specification, this has been
removed from the spec and is only implemented by versions of firefox prior to firefox 63. <a>, <area>, <link> <form> stylesheet defines an external resource to be used as a stylesheet. if the type is not set, the browser should assume it is a text/css stylesheet until further inspection. if used in combination with the alternate keyword, it defines an alternative style sheet; ...
...d prerender values. html living standardthe definition of 'link types' in that specification. living standard added opener and made noopener the default behavior for target="_blank" links. html5the definition of 'link types' in that specification. recommendation added tag, search, prefetch, noreferrer, nofollow, icon, and author. renamed copyright to license.
removed start, chapter, section, subsection, and appendix html 4.01 specificationthe definition of 'link types' in that specification. recommendation added alternate, stylesheet, start, chapter, section, subsection, appendix, and bookmark. renamed previous to prev.
removed top, and search. unknownthe definition of '<link>' in that specification. obsolete added top, ...
Set-Cookie - HTTP
g, must be from a secure page (https), must not have a domain specified (and therefore aren't sent to subdomains) and the path must be /. expires=<date> optional the maximum lifetime of the cookie as an http-date timestamp. see date for the required formatting. if unspecified, the cookie becomes a session cookie. a session finishes when the client shuts down, and session cookies will be
removed. warning: many web browsers have a session restore feature that will save all tabs and restore them next time the browser is used. session cookies will also be restored, as if the browser was never closed. when an expires date is set, the deadline is relative to the client the cookie is being set on, not the server. max-age=<number> optional number of seconds until the cookie expires...
...t a cookie must not be sent with cross-origin requests, providing some protection against cross-site request forgery attacks (csrf). browsers are migrating to have cookies default to samesite=lax. if a cookie is needed to be sent cross-origin, opt out of the samesite restriction using the none value. the none value requires the secure attribute. examples session cookie session cookies are
removed when the client shuts down. cookies are session cookies if they don't specify the expires or max-age attributes. set-cookie: sessionid=38afes7a8 permanent cookie instead of expiring when the client is closed, permanent cookies expire at a specific date (expires) or after a specific length of time (max-age). set-cookie: id=a3fwa; expires=wed, 21 oct 2015 07:28:00 gmt set-cookie: id=a3fwa; m...
X-XSS-Protection - HTTP
and safari that stops pages from loading when they detect reflected cross-site scripting (xss) attacks. although these protections are largely unnecessary in modern browsers when sites implement a strong content-security-policy that disables the use of inline javascript ('unsafe-inline'), they can still provide protections for users of older web browsers that don't yet support csp. chrome has
removed their xss auditor firefox have not, and will not implement x-xss-protection edge have retired their xss filter this means that if you do not need to support legacy browsers, it is recommended that you use content-security-policy without allowing unsafe-inline scripts instead. header type response header forbidden header name no syntax x-xss-protection: 0 x-x...
...ne scripts instead. header type response header forbidden header name no syntax x-xss-protection: 0 x-xss-protection: 1 x-xss-protection: 1; mode=block x-xss-protection: 1; report=<reporting-uri> 0 disables xss filtering. 1 enables xss filtering (usually default in browsers). if a cross-site scripting attack is detected, the browser will sanitize the page (
remove the unsafe parts). 1; mode=block enables xss filtering. rather than sanitizing the page, the browser will prevent rendering of the page if an attack is detected. 1; report=<reporting-uri> (chromium only) enables xss filtering. if a cross-site scripting attack is detected, the browser will sanitize the page and report the violation. this uses the functionality of the csp report-uri directive t...
HTTP headers - HTTP
more information. x-powered-by may be set by hosting environments or other frameworks and contains information about them while not providing any usefulness to the application or its visitors. unset this header to avoid exposing potential vulnerabilities. x-xss-protection enables cross-site scripting filtering. http public key pinning (hpkp) http public key pinning has been deprecated and
removed in favor of certificate transparency and expect-ct. public-key-pins associates a specific cryptographic public key with a certain web server to decrease the risk of mitm attacks with forged certificates. public-key-pins-report-only sends reports to the report-uri specified in the header and does still allow clients to connect to the server even if the pinning is violated. fetch metadata ...
...signatures for an exchange, each one accompanied by information about how to determine the authority of and refresh that signature. signed-headers the signed-headers header field identifies an ordered list of response header fields to include in a signature. server-timing communicates one or more metrics and descriptions for the given request-response cycle. service-worker-allowed used to
remove the path restriction by including this header in the response of the service worker script. sourcemap links generated code to a source map. upgrade the relevant rfc document for the upgrade header field is rfc 7230, section 6.7. the standard establishes rules for upgrading or changing to a different protocol on the current client, server, transport protocol connection. for example, this heade...
Redirections in HTTP - HTTP
rmanently get methods unchanged. others may or may not be changed to get.[1] reorganization of a web site. 308 permanent redirect method and body not changed. reorganization of a web site, with non-get links/operations. [1] the specification did not intend to allow method changes, but there are existing user agents that do change their method. 308 was created to
remove the ambiguity of the behavior when using non-get methods. temporary redirections sometimes the requested resource can't be accessed from its canonical location, but it can be accessed from another place. in this case, a temporary redirect can be used. search engine robots and other crawlers don't memorize the new, temporary url. temporary redirections are also used when creating, updating, or ...
...e result page doesn't re-trigger the operation. 307 temporary redirect method and body not changed the web page is temporarily unavailable for unforeseen reasons. better than 302 when non-get operations are available on the site. [2] the specification did not intend to allow method changes, but there are existing user agents that do change their method. 307 was created to
remove the ambiguity of the behavior when using non-get methods. special redirections 304 (not modified) redirects a page to the locally cached copy (that was stale), and 300 (multiple choice) is a manual redirection: the body, presented by the browser as a web page, lists the possible redirections and the user clicks on one to select it. code text typical use case 300 ...
A re-introduction to JavaScript (JS tutorial) - JavaScript
een the case since 2013 or so. unless you're certain of your string format, you can get surprising results on those older browsers: parseint('010'); // 8 parseint('0x10'); // 16 here, we see the parseint() function treat the first string as octal due to the leading 0, and the second string as hexadecimal due to the leading "0x". the hexadecimal notation is still in place; only octal has been
removed. if you want to convert a binary number to an integer, just change the base: parseint('11', 2); // 3 similarly, you can parse floating point numbers using the built-in parsefloat() function. unlike its parseint() cousin, parsefloat() always uses base 10. you can also use the unary + operator to convert values to numbers: + '42'; // 42 + '010'; // 10 + '0x10'; // 16 a special value cal...
... a string with the tostring() of each element separated by commas. a.tolocalestring() returns a string with the tolocalestring() of each element separated by commas. a.concat(item1[, item2[, ...[, itemn]]]) returns a new array with the items added on to it. a.join(sep) converts the array to a string — with values delimited by the sep param a.pop()
removes and returns the last item. a.push(item1, ..., itemn) appends items to the end of the array. a.shift()
removes and returns the first item. a.unshift(item1[, item2[, ...[, itemn]]]) prepends items to the start of the array. a.slice(start[, end]) returns a sub-array. a.sort([cmpfn]) takes an optional comparison function. a.splice(...
Details of the object model - JavaScript
inherits the name and dept properties from the employee object. adding and removing properties in class-based languages, you typically create a class at compile time and then you instantiate instances of the class either at compile time or at run time. you cannot change the number or the type of properties of a class after you define the class. in javascript, however, at run time you can add or
remove properties of any object. if you add a property to an object that is used as the prototype for a set of objects, the objects for which it is the prototype also get the new property. summary of differences the following table gives a short summary of some of these differences. the rest of this chapter describes the details of using javascript constructors and prototypes to create an object hiera...
... constructor function. inheritance model inherit properties by following the class chain. inherit properties by following the prototype chain. extension of properties class definition specifies all properties of all instances of a class. cannot add properties dynamically at run time. constructor function or prototype specifies an initial set of properties. can add or
remove properties dynamically to individual objects or to the entire set of objects. the employee example the remainder of this chapter uses the employee hierarchy shown in the following figure. a simple object hierarchy with the following objects: employee has the properties name (whose value defaults to the empty string) and dept (whose value defaults to "general"). manager is based...
Grammar and types - JavaScript
element: fish[0] is "lion" fish[1] is undefined fish[2] is "angel" if you include a trailing comma at the end of the list of elements, the comma is ignored. in the following example, the length of the array is three. there is no mylist[3]. all other commas in the list indicate a new element. note : trailing commas can create errors in older browser versions and it is a best practice to
remove them. let mylist = ['home', , 'school', ]; in the following example, the length of the array is four, and mylist[0] and mylist[2] are missing. let mylist = [ ,'home', , 'school']; in the following example, the length of the array is four, and mylist[1] and mylist[3] are missing. only the last comma is ignored. let mylist = ['home', , 'school', , ]; understanding the behavior of extra co...
...ole.log(quote); the result of this would be: he read "the cremation of sam mcgee" by r.w. service. to include a literal backslash inside a string, you must escape the backslash character. for example, to assign the file path c:\temp to a string, use the following: var home = 'c:\\temp'; you can also escape line breaks by preceding them with backslash. the backslash and line break are both
removed from the value of the string. var str = 'this string \ is broken \ across multiple \ lines.' console.log(str); // this string is broken across multiple lines. although javascript does not have "heredoc" syntax, you can get close by adding a line break escape and an escaped line break at the end of each line: var poem = 'roses are red,\n\ violets are blue.\n\ sugar is sweet,\n\ and so is fo...
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
the javascript warning about string generics occurs in firefox versions prior to 68. string generics have been
removed starting with firefox 68. message warning: string.charat is deprecated; use string.prototype.charat instead warning: string.charcodeat is deprecated; use string.prototype.charcodeat instead warning: string.concat is deprecated; use string.prototype.concat instead warning: string.contains is deprecated; use string.prototype.contains instead warning: string.endswith is deprecated; use string.prototype.endswith instead warning: string.includes is deprecated; use string.prototype.includes instead warning: string.indexof is deprecated; use string.prototype.inde...
...deprecated; use string.prototype.trim instead warning: string.trimleft is deprecated; use string.prototype.trimleft instead warning: string.trimright is deprecated; use string.prototype.trimright instead error type warning. javascript execution won't be halted. what went wrong? the non-standard generic string methods are deprecated and have been
removed in firefox 68 and later. string generics provide string instance methods on the string object allowing string methods to be applied to any object. examples deprecated syntax var num = 15; string.replace(num, /5/, '2'); standard syntax var num = 15; string(num).replace(/5/, '2'); shim the following is a shim to provide support to non-supporting browsers: /*globals define*/ // assumes all...
TypeError: Reduce of empty array with no initial value - JavaScript
the callback). however, if no initial value is provided, it will use the first element of the array or typedarray as the initial value. this error is raised when an empty array is provided because no initial value can be returned in that case. examples invalid cases this problem appears frequently when combined with a filter (array.prototype.filter(), typedarray.prototype.filter()) which will
remove all elements of the list. thus leaving none to be used as the initial value. var ints = [0, -1, -2, -3, -4, -5]; ints.filter(x => x > 0) //
removes all elements .reduce((x, y) => x + y) // no more elements to use for the initial value. similarly, the same issue can happen if there is a typo in a selector, or an unexpected number of elements in a list: var names = document.getele...
...me_list = array.prototype.reduce.call(names, (acc, name) => acc + ", " + name); valid cases these problems can be solved in two different ways. one way is to actually provide an initialvalue as the neutral element of the operator, such as 0 for the addition, 1 for a multiplication, or an empty string for a concatenation. var ints = [0, -1, -2, -3, -4, -5]; ints.filter(x => x > 0) //
removes all elements .reduce((x, y) => x + y, 0) // the initial value is the neutral element of the addition another way would be two to handle the empty case, either before calling reduce, or in the callback after adding an unexpected dummy initial value. var names = document.getelementsbyclassname("names"); var name_list1 = ""; if (names1.length >= 1) name_list1 = array.prototype.reduce.call...
Arrow function expressions - JavaScript
. ...
...) { return element.length; }); // the regular function above can be written as the arrow function below elements.map((element) => { return element.length; }); // [8, 6, 7, 9] // when there is only one parameter, we can
remove the surrounding parentheses elements.map(element => { return element.length; }); // [8, 6, 7, 9] // when the only statement in an arrow function is `return`, we can
remove `return` and
remove // the surrounding curly brackets elements.map(element => element.length); // [8, 6, 7, 9] // in this case, because we only need the length property, we can use destructuring parameter: // notice that the `length` corresponds to the property we want to get whereas the // obviously non-special `lengthfoobarx` is just the name of a variable which can be changed // to any valid ...
getter - JavaScript
roperty latest for object obj, which will return the last array item in log. const obj = { log: ['example','test'], get latest() { if (this.log.length === 0) return undefined; return this.log[this.log.length - 1]; } } console.log(obj.latest); // "test" note that attempting to assign a value to latest will not change it. deleting a getter using the delete operator if you want to
remove the getter, you can just delete it: delete obj.latest; defining a getter on existing objects using defineproperty to append a getter to an existing object later at any time, use object.defineproperty(). const o = {a: 0}; object.defineproperty(o, 'b', { get: function() { return this.a + 1; } }); console.log(o.b) // runs the getter, which yields a + 1 (which is 1) using a computed property ...
... you shouldn’t write a lazy getter for a property whose value you expect to change, because if the getter is lazy then it will not recalculate the value. note that getters are not “lazy” or “memozied” by nature; you must implement this technique if you desire this behavior. in the following example, the object has a getter as its own property. on getting the property, the property is
removed from the object and re-added, but implicitly as a data property this time. finally, the value gets returned. get notifier() { delete this.notifier; return this.notifier = document.getelementbyid('bookmarked-notification-anchor'); }, for firefox code, see also the xpcomutils.jsm code module, which defines the definelazygetter() function. get vs. defineproperty while using the get keyword ...
Array.prototype.reduce() - JavaScript
let myarray = ['a', 'b', 'a', 'b', 'c', 'e', 'e', 'c', 'd', 'd', 'd', 'd'] let myorderedarray = myarray.reduce(function (accumulator, currentvalue) { if (accumulator.inde...
...e.books] }, ['alphabet']) // allbooks = [ // 'alphabet', 'bible', 'harry potter', 'war and peace', // 'romeo and juliet', 'the lord of the rings', // 'the shining' // ]
remove duplicate items in an array note: if you are using an environment compatible with set and array.from(), you could use let orderedarray = array.from(new set(myarray)) to get an array where duplicate items have been
removed. let myarray = ['a', 'b', 'a', 'b', 'c', 'e', 'e', 'c', 'd', 'd', 'd', 'd'] let myorderedarray = myarray.reduce(function (accumulator, currentvalue) { if (accumulator.indexof(currentvalue) === -1) { accumulator.push(currentvalue) } return accumulator }, []) console.log(myorderedarray) replace .filter().map() with .reduce() using array.filter() then array.map() traverses the array ...
Intl.Locale.prototype.minimize() - JavaScript
description this method carries out the reverse of maximize(), removing any language, script, or region subtags from the locale language identifier (essentially the contents of basename). ...
...t the locale that would be added by calling locale.maximize(). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax locale.minimize() return value a locale instance whose basename property returns the result of the
remove likely subtags algorithm executed against locale.basename. description this method carries out the reverse of maximize(), removing any language, script, or region subtags from the locale language identifier (essentially the contents of basename). this is useful when there are superfluous subtags in the language identifier; for instance, "en-latn" can be simplified to "en", since "latn" is the ...
handler.deleteProperty() - JavaScript
invariants are violated, the proxy will throw a typeerror: a property cannot be deleted, if it exists as a non-configurable own property of the target object. examples trapping the delete operator the following code traps the delete operator. ...
...raps the delete operator. const p = new proxy({}, { deleteproperty: function(target, prop) { if (prop in target){ delete target[prop] console.log('property
removed: ' + prop) return true } else { console.log('property not found: ' + prop) return false } } }) let result p.a = 10 console.log('a' in p) // true result = delete p.a // "property
removed: a" console.log(result) // true console.log('a' in p) // false result = delete p.a // "property not found: a" console.log(result) // false specifications specification ecmascript (ecma-262)the definition of '[[delete]]' in that specification. ...
String.prototype.split() - JavaScript
ftover text is not included in the array at all. the array may contain fewer entries than limit if the end of the string is reached before the limit is reached. if limit is 1, str.split(separator)[0] is returned if limit is 0, [] is returned. return value an array of strings, split at each point where the separator occurs in the given string. description when found, separator is
removed from the string, and the substrings are returned in an array. if separator is a regular expression with capturing parentheses, then each time separator matches, the results (including any undefined results) of the capturing parentheses are spliced into the output array. if the separator is an array, then that array is coerced to a string and used as a separator. examples using split() when...
...rld that has such people in it. the original string is: "jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec" the separator is: "," the array has 12 elements: jan / feb / mar / apr / may / jun / jul / aug / sep / oct / nov / dec removing spaces from a string in the following example, split() looks for zero or more spaces, followed by a semicolon, followed by zero or more spaces—and, when found,
removes the spaces and the semicolon from the string. namelist is the array returned as a result of split(). const names = 'harry trump ;fred barney; helen rigby ; bill abel ;chris hand ' console.log(names) const re = /\s*(?:;|$)\s*/ const namelist = names.split(re) console.log(namelist) this logs two lines; the first line logs the original string, and the second line logs the resulting array. ha...
escape() - JavaScript
… … programmers should not use or assume the existence of these features and behaviours when writing new ecmascript code. … the escape() function computes a new string in which certain characters have been replaced by a hexadecimal escape sequence. ...
...… … programmers should not use or assume the existence of these features and behaviours when writing new ecmascript code. … the escape() function computes a new string in which certain characters have been replaced by a hexadecimal escape sequence. ...
caption - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements groupbox, checkbox ...
checkbox - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprovider, nsidomxulcheckboxelement ...
command - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related xul:list of commands ...
commandset - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
datepicker - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsidomxulcontrolelement ...
dialogheader - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements dialog, window ...
editor - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprovider ...
key - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), 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 th...
menubar - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements menu, menuitem, menulist, menupopup, menuseparator interfaces nsiaccessibleprovider ...
menuseparator - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements menu, menubar, menuitem, menulist, menupopup interfaces nsiaccessibleprovider, nsidomxulcontaineritemelement, nsidomxulselectcontrolitemelement ...
param - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
radio - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements radiogroup, checkbox interfaces nsiaccessibleprovider, nsidomxulselectcontrolitemelement, nsidomxullabeledcontrolelement ...
richlistitem - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprovider, nsidomxulselectcontrolitemelement ...
rule - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
scrollbar - Archive of obsolete content
getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(),
removeattribute(),
removeattributenode(),
removeattributens(),
removechild(),
removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...